Commit Graph

132779 Commits

Author SHA1 Message Date
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
Andres Gomez ef28b1b30f ci: update piglit's version so it features replayer
We also need that summary's aggregate command can use JUnit as backend,
a cross-compilation fix for its CMakeList.txt, a fix for the JUnit
backend and a small change in replayer's compare output.

v2:
  - Updated the piglit commit so it features another couple of needed
    fixes.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> [v1]
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 37258a6c4b ci: spread the usage of the FDO_UPSTREAM_REPO 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 645e7b4b6c ci: install ci-fairy in the testing images
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 ac03a9f715 ci: use ephemeral packages when building the build-base image
v2:
  - Update tag for the android_build image (Michel).

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> [v1]
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 f5269b0b6a ci: specify source and build directories with CMake
The -S and -B flags were officially introduced in CMake 3.13.

Avoids the following warning:

"
CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.
"

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.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
Caio Marcelo de Oliveira Filho f41ae4d592 spirv2nir: Add --opengl (-g) argument for OpenGL SPIR-V
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8156>
2020-12-22 09:34:00 -08:00
Trevor Woerner e550ca8888 docs/egl.rst: switch true→enabled
The old "true/false" values for some of the configuration options have been
deprecated in favour of enabled/disabled.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8173>
2020-12-22 17:02:28 +00:00
Andres Gomez 6a93a6e17b ci: Bump deqp to current vulkan-cts-1.2.5.0 also in the Lava jobs
The tag update was forgotten after e384476d1e ("ci: Bump deqp to
current vulkan-cts-1.2.5.0").

Noticeably, this introduces 2 more failures in the panfrost-t860 job:
  - dEQP-GLES3.functional.shaders.matrix.inverse.dynamic.lowp_mat2_float_vertex
  - dEQP-GLES3.functional.shaders.matrix.inverse.dynamic.mediump_mat2_float_vertex,Fail

Fixes: e384476d1e ("ci: Bump deqp to current vulkan-cts-1.2.5.0")
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8198>
2020-12-22 16:13:37 +00:00
Mike Blumenkrantz 63d900964b doc/features: mark off tessellation for zink
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8199>
2020-12-22 14:48:52 +00:00
Daniel Schürmann b1e12747b9 aco: create VMEM clauses slightly more aggressive
Totals from 3325 (2.39% of 139391) affected shaders (NAVI10):
SGPRs: 331528 -> 331056 (-0.14%); split: -0.14%, +0.00%
VGPRs: 306164 -> 337764 (+10.32%); split: -0.02%, +10.34%
CodeSize: 38843180 -> 38865388 (+0.06%); split: -0.04%, +0.10%
MaxWaves: 18908 -> 17028 (-9.94%); split: +0.01%, -9.95%
Instrs: 7423908 -> 7427934 (+0.05%); split: -0.06%, +0.12%
Cycles: 527411756 -> 526388408 (-0.19%); split: -0.21%, +0.02%
VMEM: 1148421 -> 992660 (-13.56%); split: +0.10%, -13.67%
SMEM: 227337 -> 232380 (+2.22%); split: +2.26%, -0.04%
VClause: 146416 -> 111171 (-24.07%); split: -24.10%, +0.03%
SClause: 243674 -> 243689 (+0.01%); split: -0.00%, +0.01%
Copies: 663496 -> 660333 (-0.48%); split: -0.85%, +0.37%
Branches: 223725 -> 223721 (-0.00%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7903>
2020-12-22 15:08:40 +01:00
Daniel Schürmann ac40301dbb aco: schedule position exports in the same pass as memory operations
No fossil-db changes.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7903>
2020-12-22 15:08:40 +01:00
Daniel Schürmann 0287ebeef3 aco: fix def-use distance calculation when scheduling.
This change also increases the VMEM_MAX_MOVES
to mitigate some of the scheduling changes.

Totals from 34301 (24.61% of 139391) affected shaders:
SGPRs: 2515440 -> 2552304 (+1.47%); split: -1.25%, +2.71%
VGPRs: 1786676 -> 1794724 (+0.45%); split: -0.31%, +0.76%
CodeSize: 151079856 -> 151209828 (+0.09%); split: -0.06%, +0.15%
MaxWaves: 392454 -> 388966 (-0.89%); split: +0.39%, -1.28%
Instrs: 28870746 -> 28895907 (+0.09%); split: -0.09%, +0.17%
Cycles: 960450680 -> 961315796 (+0.09%); split: -0.09%, +0.18%
VMEM: 19027987 -> 19796223 (+4.04%); split: +7.49%, -3.45%
SMEM: 2434691 -> 2394829 (-1.64%); split: +2.80%, -4.43%
VClause: 551776 -> 543051 (-1.58%); split: -1.73%, +0.15%
SClause: 1230147 -> 1227637 (-0.20%); split: -1.40%, +1.20%
Copies: 1957640 -> 1963617 (+0.31%); split: -1.11%, +1.41%
Branches: 611747 -> 612504 (+0.12%); split: -0.11%, +0.23%

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7903>
2020-12-22 15:08:40 +01:00
Daniel Schürmann 3f14140f48 aco: allow to schedule SALU/SMEM through exec changes
Totals from 16794 (12.05% of 139391) affected shaders (NAVI10):
SGPRs: 757760 -> 762048 (+0.57%); split: -0.39%, +0.95%
VGPRs: 402844 -> 402744 (-0.02%); split: -0.04%, +0.02%
CodeSize: 22290900 -> 22285068 (-0.03%); split: -0.06%, +0.04%
MaxWaves: 294163 -> 294222 (+0.02%); split: +0.03%, -0.01%
Instrs: 4190074 -> 4188513 (-0.04%); split: -0.08%, +0.04%
Cycles: 40685028 -> 40678640 (-0.02%); split: -0.03%, +0.02%
VMEM: 7711867 -> 7704315 (-0.10%); split: +0.28%, -0.38%
SMEM: 942472 -> 1007052 (+6.85%); split: +7.15%, -0.30%
VClause: 92990 -> 92974 (-0.02%); split: -0.03%, +0.01%
SClause: 263700 -> 263810 (+0.04%); split: -0.38%, +0.42%
Copies: 277467 -> 276988 (-0.17%); split: -0.37%, +0.20%
Branches: 45899 -> 45896 (-0.01%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7903>
2020-12-22 15:08:40 +01:00
Daniel Schürmann 4a70c4d383 aco: make pred_by_exec_mask() accessible in other files
and rename to needs_exec_mask().

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7903>
2020-12-22 15:08:40 +01:00
Daniel Schürmann 2116b4504e aco: don't emit parallelcopy when switching to WQM.
The reason was an RA bug which has been fixed a while ago.
This change fixes some register demand miscalculations.

Totals from 1013 (0.73% of 139391) affected shaders (NAVI10):
CodeSize: 6050408 -> 6047504 (-0.05%); split: -0.05%, +0.00%
Instrs: 1160533 -> 1159765 (-0.07%); split: -0.07%, +0.00%
Cycles: 8027212 -> 8024140 (-0.04%); split: -0.04%, +0.00%
VMEM: 296195 -> 296091 (-0.04%)
SMEM: 73003 -> 73011 (+0.01%); split: +0.05%, -0.04%
SClause: 37221 -> 37222 (+0.00%)
Copies: 70931 -> 70166 (-1.08%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7903>
2020-12-22 15:08:40 +01:00
Mike Blumenkrantz f815b87e18 zink: export tess shader pipe caps
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8152>
2020-12-22 13:46:38 +00:00
Mike Blumenkrantz 6324699e67 zink: handle partial writes to shader outputs
this is super gross. spirv doesn't provide any facility for doing per-component
writes, which means all components of a value must be written every time

to this end, we need to manually split both the src and dst composites and
do per-component access for each store in order to accurately handle both
non-sequential wrmasks (which could be handled by nir_lower_wrmasks, yes, but
we aren't using it) as well as partial wrmasks

see also mesa/mesa#4006

Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8152>
2020-12-22 13:46:38 +00:00
Mike Blumenkrantz 334759d850 zink: implement passthrough tcs shader injection
GL allows the pipeline to "infer" a tcs shader if a tes shader is bound using
API-specified default values for gl_TessLevelOuter and gl_TessLevelInner,
but VK requires that both shaders be explicitly present

to handle this, create a generic tcs which translates all vs outputs to
invocation-based arrays and copy the appropriate value to the expected tes
input array location. also emit the default inner/outer values as push constants
so we don't have to recompile the shaders whenever the api calls occur

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8152>
2020-12-22 13:46:38 +00:00
Mike Blumenkrantz 938b7c480e zink: add stubs for tess outer/inner level handling
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8152>
2020-12-22 13:46:38 +00:00
Mike Blumenkrantz 841d665209 zink: add push constant handling to get_storage_class()
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8152>
2020-12-22 13:46:38 +00:00
Mike Blumenkrantz 15f478fe84 zink: only run nir_lower_clip_halfz for last vertex processing stage
this lets us remove the calcs to un-convert POS during load

Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8152>
2020-12-22 13:46:38 +00:00
Mike Blumenkrantz 5b2c397c54 zink: add handling for tcs and tes shader states
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8152>
2020-12-22 13:46:38 +00:00
Mike Blumenkrantz 536520d056 zink: support PIPE_PRIM_PATCHES
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8152>
2020-12-22 13:46:38 +00:00
Mike Blumenkrantz 291bbac12c zink: set tess info in pipeline creation
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8152>
2020-12-22 13:46:38 +00:00
Mike Blumenkrantz 2891e0b74e zink: pull xfb info from tess shader when applicable
if it's the last vertex stage then it does the xfb

Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8152>
2020-12-22 13:46:38 +00:00