Commit Graph

132604 Commits

Author SHA1 Message Date
Erik Faye-Lund a22b85ce5e zink: document some more features for higher GL versions
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8212>
2020-12-23 17:20:49 +00:00
Alyssa Rosenzweig 93af193eeb pan/bi: Add helpers for manipulating the ISA
These will be used to generate various files for the IR.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:57 +00:00
Alyssa Rosenzweig 46584f2d46 pan/bi: Move copyright notice to common code
No reason to duplicate this all over the place.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:57 +00:00
Alyssa Rosenzweig 4d76a3d4a1 pan/bi: Add explicit meson dependency on the ISA helpers
This logic was slightly busted before.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:57 +00:00
Alyssa Rosenzweig c3625f4ca8 pan/bi: Rename isa_parse to bifrost_isa
We use this for non-parsing code as well. Make the name clear.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:57 +00:00
Alyssa Rosenzweig 27e37a7746 pan/bi: Add pseudo register formats to XML
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:57 +00:00
Alyssa Rosenzweig cffc1d90da pan/bi: Add staging register counts to ISA.xml
Message-passing instructions that read/write staging registers access
either:

* a fixed number of registers
* vecsize registers (/2 for LD/ST_CVT if register_format is 16-bit)
* a computed number for TEXC

This adds the fixed counts into the XML for the first type and space to
specify the latter types.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:57 +00:00
Alyssa Rosenzweig faa18708d1 pan/bi: Fix rounding name for HADD in XML
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:57 +00:00
Alyssa Rosenzweig 27f91eb66b pan/bi: Mark message types in ISA.xml
Message-passing instructions have an associated message type, which the
clause header needs to signal. Instead of open coding this, let's
annotate the XML. Instructions not otherwise marked do not generate
messages.

Three exceptions apply:

* UBO loads need to use the attribute message type.
* Tile buffer access to Z/S needs ZS message type
* LD_VAR_SPECIAL.fragz needs ZS message type

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:57 +00:00
Alyssa Rosenzweig 2b5cfd0df9 pan/bi: Use consistent neg naming
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:57 +00:00
Alyssa Rosenzweig 550bbcdcd1 pan/bi: Use canonical inactive result
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:57 +00:00
Alyssa Rosenzweig 5789bbfdbc pan/bi: Use canonical subgroup size
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:57 +00:00
Alyssa Rosenzweig c41cecd404 pan/bi: Use canonical lane ops
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:57 +00:00
Alyssa Rosenzweig 876f37ed59 pan/bi: Use canonical name for segments
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:57 +00:00
Alyssa Rosenzweig f47ec85ef6 pan/bi: Use canonical min/max semantics
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:57 +00:00
Alyssa Rosenzweig c7e494268e pan/bi: Use canonical update modes
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:57 +00:00
Alyssa Rosenzweig 3797fc9af9 pan/bi: Use canonical sample names
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:57 +00:00
Alyssa Rosenzweig 2e84a1b4d8 pan/bi: Use canonical varying names
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:57 +00:00
Alyssa Rosenzweig 030854a3b8 pan/bi: Use canonical names for rounding modes
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:56 +00:00
Alyssa Rosenzweig 6e481500d0 pan/bi: Use canonical names for clamps
Prepare to generate this enum by correctly naming the open-coded
variant.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:56 +00:00
Alyssa Rosenzweig 569886359b pan/bi: Don't treat extend as per-source
There is only one per instruction so it just complicates things.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:56 +00:00
Alyssa Rosenzweig aa91f9dcc0 pan/bi: Use consistent naming of lane/lane0
It's always a source modifier.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:56 +00:00
Alyssa Rosenzweig 2470a6bc9a pan/bi: Use consistent wls naming
Compare naming in the data structures.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:56 +00:00
Alyssa Rosenzweig 3b6ef4ef10 pan/bi: Use consistent negX/absX naming
We already use plain neg/abs for this, don't mix it. Will avoid weird
enums for abs/neg with a generated IR.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:56 +00:00
Alyssa Rosenzweig 258c1f5b24 pan/bi: Defer newline printing in disassembler
Easy reduction in generated code, while we're at it. Pretty obvious
change after working on similar fixes for the other generators.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:56 +00:00
Alyssa Rosenzweig 6d81df6e0c pan/bi: Mark some instructions as unused
Certain transcendental instructions are not even possible to generate
since these bits are lowered away before the Bifrost backend is touched,
as far as I know.

Job management instructions (most interestingly DOORBELL) do not
correspond to OpenGL/OpenCL/Vulkan.

Segment arithmetic seems mostly useless for real code, any actual use
case I can think of is already covered by indirect loads/stores which
does the segment arithmetic implicitly. I've never seen this in blob
code, probably just a future proofing thing.

Dropping these instructions corresponds to a 3% reduction in generated
lines of code for the printer, builder, and packer for the new IR. Not a
terrible yield for functionality we'll likely never need.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:56 +00:00
Alyssa Rosenzweig b45978c8e1 pan/bi: Add pseudo-instruction mechanism
Useful for instructions that need to be modeled in the IR (with support
in the builder and printer) but will always be lowered away before
packing since they don't correspond to anything real.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:56 +00:00
Alyssa Rosenzweig d47e0af56b pan/bi: Add unused instruction mechanism
Certain instructions are highly unlikely to ever be used in the Bifrost
compiler, due to differences in the Mesa stack versus the Arm compiler,
as well as hardware features added speculatively and that never became
API visible. It doesn't make sense to include these instructions in the
IR, so let's disable them, while retaining complete disassembly.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:56 +00:00
Alyssa Rosenzweig f31922faf7 pan/bi: Remove bi_is_live_after
Unused on Bifrost, and only used on Midgard for something that doesn't
apply to Bifrost.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:56 +00:00
Alyssa Rosenzweig 6a46b38d12 pan/bi: Label shader-db shaders
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:56 +00:00
Alyssa Rosenzweig bcd0a285bb pan/bi: Drop on-board packing tests
These tests were designed before having access to canonical information
about the hardware and thus had two purposes:

* Validating that our understanding of an instruction (as defined by IR
  semantics) matches hardware behaviour -- obsoleted by new information.

* Validating that the IR packing code is correct -- obsoleted by
  rewriting the IR and rewriting the packing.

I dislike removing tests as much as the next person, but the value of
these will be nil by the end of the series, and will prove burdensome.
Proper unit tests will be useful, however.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
2020-12-23 17:06:56 +00:00
David Stevens df09ada411 egl/dri2: fix image loaderPrivate type mixup
The first callback which uses an image's loaderPrivate data was recently
added. Prior to this, dri2_create_image_khr_texture had been setting the
unused loaderPrivate field on the image it creates. This caused a
pointer type mixup in platform_android when it started using the new
callback. Fix this by no longer unnecessarily setting loaderPrivate in
dri2_create_image_khr_texture.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4010
Fixes: a2fb87eea6 ("egl/android: implement image cleanup callback")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8211>
2020-12-24 00:05:15 +09:00
Samuel Pitoiset 2d0c723ce6 radv: make sure FMASK compression is enabled for MSAA copies
Fixes dEQP-VK.api.copy_and_blit.*.4_bit. I think the MSAA2x and
MSAA8x just passed by luck.

Fixes: 7b21ce401f ("radv: disable FMASK compression when drawing with GENERAL layout")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7915>
2020-12-23 11:25:34 +00:00
Danylo Piliaiev a6bdbd5c0f freedreno: Fix FD_MESA_DEBUG=flush debug option
fd_batch_check_size() should be after fd_batch_unlock_submit(),
otherwise batch_flush() called from fd_batch_check_size()
would wait on mutex forever.

Fixes: 02298ed1 "freedreno: Add submit lock"

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8205>
2020-12-23 09:25:33 +00:00
Indrajit Kumar Das 00c30420cb radeonsi/gfx10: fix issue with multiple overflow queries on the same context
In gfx10_sh_query_end a new query buffer is being allocated if there are pending
shader queries. However since emit_shader_query is called only once per draw
command, this newly allocated buffer is not used subsequently.
So even though this newly allocated buffer is treated as the last query buffer,
it is never actually used by any of the queries. Essentially there is no need
to allocate a new query buffer on the same context i.e. draw command.
The existing query buffer can be used to provide the answers to multiple queries.
Allocating an extra buffer makes subsequent queries wait on a query buffer whose
fence will never be triggered since there are no subsequent draw commands to
trigger the same.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8083>
2020-12-23 04:16:45 +00:00
Michael Tang 0b3379c7be microsoft/compiler: Add spirv2dxil executable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8043>
2020-12-22 13:28:22 -08:00
Michael Tang ecbb179c57 util: Implement os_read_file for Windows
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8043>
2020-12-22 13:28:21 -08:00
Michael Tang 67e48bee1e microsoft/compiler: Add dedicated spirv_to_dxil libraries
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8043>
2020-12-22 13:28:21 -08:00
Andres Gomez 050241d81a ci: remove all tracie remains
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>
2020-12-22 18:31:01 +00:00
Andres Gomez 54bdec63ef ci: add piglit job to baremetal and remove tracie ones
v2:
  - Squashed the commit to remove tracie jobs (Eric).

v3:
  - Rename *-piglit-traces jobs with *-traces (Eric).

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>
2020-12-22 18:31:01 +00:00
Andres Gomez 8f34b9471f ci: refactor arm64 jobs in preparation for piglit addition
v2:
  - Rename the ".arm64-deqp-test-vk" template as
    ".arm64-deqp-test-freedreno-vk" (Eric).

v3:
  - Rename the ".arm64-test" template as ".freedreno-test" (Eric).
  - Rename the ".arm64-deqp-test" template as
    ".baremetal-deqp-test" (Eric).
  - Rename the ".arm64-deqp-test-freedreno-vk" template as
    ".baremetal-deqp-test-freedreno-vk".

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>
2020-12-22 18:31:01 +00:00
Andres Gomez dcb8f62554 ci: add piglit jobs to LAVA and remove tracie ones
v2:
  - Squashed the commit to remove tracie jobs (Eric).

v3:
  - Rename *-piglit-traces jobs with *-traces.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> [v2]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>
2020-12-22 18:31:01 +00:00
Andres Gomez 654bfb0012 ci: build piglit inside baremetal and LAVA's rootfs
v2:
  - Updated the ci-fairy commit to use.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>
2020-12-22 18:31:01 +00:00
Andres Gomez 3b5bc2f10d ci: move API specification to driver instead of test suite
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>
2020-12-22 18:31:01 +00:00
Andres Gomez 5f6f84bf81 ci: move general build commands to their own section
The STRIP_CMD env var is used in several build scripts, not just by
dEQP.

Also, we want to have the rootfs destination directory created so it
also exists for builds that only move directory trees in there.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>
2020-12-22 18:31:01 +00:00
Andres Gomez 8860fa931e ci: add Vulkan piglit traces jobs and remove tracie ones
v2:
  - Rename *-piglit-traces jobs with *-traces.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> [v1]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>
2020-12-22 18:31:01 +00:00
Andres Gomez fe30b6b4ae ci: only modify LD_LIBRARY_PATH when running the piglit cmd
Doing it earlier may interfere with the optional command wrapper.

v2:
  - Fixed typo (Eric).

Suggested-by: Michel Dänzer <mdaenzer@redhat.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>
2020-12-22 18:31:01 +00:00
Andres Gomez 09429fa85b ci: add piglit replay jobs and remove tracie ones
Along the way, modify the piglit run script and refactor the way
piglit jobs are generated.

v2:
  - Squashed the commit to remove tracie jobs (Eric).

v3:
  - Extend information in the comments about the need to use a
    running X server for replaying with Vulkan (Tomeu).
  - Do actually fail if the upload doesn't work (Tomeu).

v4:
  - Rename *-piglit-traces jobs with *-traces.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> [v3]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>
2020-12-22 18:31:01 +00:00
Andres Gomez 6b9b9baeab ci: specify MinIO's host URL in a global variable
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>
2020-12-22 18:31:01 +00:00
Andres Gomez 9705434579 ci: build piglit in the Vulkan testing image
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>
2020-12-22 18:31:01 +00:00