platform/upstream/mesa.git
23 months agogallivm: refactor a bit the cache access in view of LLVM opaque pointers
Mihai Preda [Fri, 1 Jul 2022 09:52:25 +0000 (12:52 +0300)]
gallivm: refactor a bit the cache access in view of LLVM opaque pointers

LLVM 15 requires transition to opaque pointers; factorize a bit the cache
memthods to help this transition.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17650>

23 months agogallivm: fix a few llvm non-opaque pointers
Mihai Preda [Thu, 30 Jun 2022 06:14:02 +0000 (09:14 +0300)]
gallivm: fix a few llvm non-opaque pointers

As LLVM 15 transitions to opaque pointers, we need to update
the deprecated methods dealing with non-opaque pointers.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17650>

23 months agodzn: Retrieve validator version
Jesse Natalie [Sun, 17 Jul 2022 18:10:29 +0000 (11:10 -0700)]
dzn: Retrieve validator version

For platforms where there's no validator available, leave the field zero-initialized
to let the DXIL backend choose whatever target validator version it wants.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>

23 months agod3d12: Retrieve validator version
Jesse Natalie [Sun, 17 Jul 2022 18:08:13 +0000 (11:08 -0700)]
d3d12: Retrieve validator version

For platforms where there's no validator available, leave the field zero-initialized
to let the DXIL backend choose whatever target validator version it wants.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>

23 months agomicrosoft/compiler: Blacklist DXIL validator 1.6 from 20348 SDK
Jesse Natalie [Mon, 18 Jul 2022 17:37:03 +0000 (10:37 -0700)]
microsoft/compiler: Blacklist DXIL validator 1.6 from 20348 SDK

This version claims to support validator version 1.6, but doesn't
actually have the 1.6 changes (PSV v2, PSV resource v1, barycentrics).

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>

23 months agomicrosoft/compiler: Add a getter for a validator version from DXIL.dll
Jesse Natalie [Sun, 17 Jul 2022 18:08:04 +0000 (11:08 -0700)]
microsoft/compiler: Add a getter for a validator version from DXIL.dll

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>

23 months agomicrosoft/compiler: Support DXIL validator 1.7
Jesse Natalie [Sun, 17 Jul 2022 17:50:00 +0000 (10:50 -0700)]
microsoft/compiler: Support DXIL validator 1.7

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>

23 months agomicrosoft/compiler: Support DXIL validator 1.6
Jesse Natalie [Sun, 17 Jul 2022 17:26:49 +0000 (10:26 -0700)]
microsoft/compiler: Support DXIL validator 1.6

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>

23 months agomicrosoft/compiler: DXIL validator 1.6 uses a new PSV resource struct
Jesse Natalie [Sun, 17 Jul 2022 17:26:36 +0000 (10:26 -0700)]
microsoft/compiler: DXIL validator 1.6 uses a new PSV resource struct

This is a huge pain because it's an array, meaning that accessing
an entry in the array now depends on the validator version to use
the right element stride.

We could always just store the v1 and downconvert if needed... but
this isn't *that* bad that I felt I had to do it that way.

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>

23 months agomicrosoft/compiler: DXIL validator 1.6 uses a new PSV struct version
Jesse Natalie [Sun, 17 Jul 2022 17:24:39 +0000 (10:24 -0700)]
microsoft/compiler: DXIL validator 1.6 uses a new PSV struct version

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>

23 months agomicrosoft/compiler: Set the barycentrics flag for attribute_at_vertex
Jesse Natalie [Sun, 17 Jul 2022 17:22:02 +0000 (10:22 -0700)]
microsoft/compiler: Set the barycentrics flag for attribute_at_vertex

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>

23 months agomicrosoft/compiler: DXIL validator 1.6 counts UAVs differently
Jesse Natalie [Sun, 17 Jul 2022 17:21:28 +0000 (10:21 -0700)]
microsoft/compiler: DXIL validator 1.6 counts UAVs differently

Instead of counting the number of UAV arrays, it counts the
number of actual UAVs declared. This is more correct, but we
need to do the same accounting to set the 64 UAVs flag.

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>

23 months agomicrosoft/compiler: Correctly compute dynamic indexing I/O masks
Jesse Natalie [Sun, 17 Jul 2022 12:30:37 +0000 (05:30 -0700)]
microsoft/compiler: Correctly compute dynamic indexing I/O masks

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>

23 months agomicrosoft/compiler: Compute correct usage masks
Jesse Natalie [Sun, 17 Jul 2022 12:15:11 +0000 (05:15 -0700)]
microsoft/compiler: Compute correct usage masks

This starts actually updating the always-read/never-written
masks while processing the shader. Note that we follow DXC's
lead here and treat "always read" as "sometimes read."

This isn't strictly required, but might help drivers out.

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>

23 months agomicrosoft/compiler: Support DXIL validator version 1.5
Jesse Natalie [Sun, 17 Jul 2022 12:13:44 +0000 (05:13 -0700)]
microsoft/compiler: Support DXIL validator version 1.5

This version of the validator starts adding usage masks into
the DXIL, which then are expected to match the PSV and signature
data. The usage masks are "correct" meaning that the never-writes
mask no longer includes bits outside of components 0-3.

A future change will actually compute useful masks.

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>

23 months agomicrosoft/compiler: Lower I/O to scalar
Jesse Natalie [Sun, 17 Jul 2022 12:07:34 +0000 (05:07 -0700)]
microsoft/compiler: Lower I/O to scalar

A future change will start computing component masks while
processing I/O instructions, and only having to compute
a mask for one component per instruction simplifies things.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>

23 months agomicrosoft/compiler: Ensure 4-component position writes via NIR
Jesse Natalie [Sun, 17 Jul 2022 12:02:14 +0000 (05:02 -0700)]
microsoft/compiler: Ensure 4-component position writes via NIR

We're about to lower I/O to scalar, which means we'll end up with
multiple writes to position, and none of them has enough info to
fill in the blanks.

This causes a test that previously crashed on WARP (due to
StoreOutput with an undef not being handled) to fail more
gracefully - but that failure means that the test spends
forever just outputting errors, so explicitly skip it.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>

23 months agomicrosoft/compiler: Split signature processing into two parts
Jesse Natalie [Mon, 14 Feb 2022 17:40:08 +0000 (09:40 -0800)]
microsoft/compiler: Split signature processing into two parts

First, preprocess the signatures, strictly based on the variables
in the nir shader. Then, later, after the actual shader contents
have been processed, we emit the metadata.

This lets shader processing rely on the pre-processed data (e.g.
the row -> ID mapping needed for large VS inputs) while also allowing
the signature data to rely on data gathered during the shader traversal
(e.g. which components are actually used).

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>

23 months agomicrosoft/compiler: Emit metadata based on long-lived signature data
Jesse Natalie [Mon, 14 Feb 2022 17:14:49 +0000 (09:14 -0800)]
microsoft/compiler: Emit metadata based on long-lived signature data

Instead of using the short-lived semantic structure (that's used to
fill out the long-lived signature and PSV data), use the long-lived
ones. This is staging so we can hold off on emitting the metadata
until later.

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>

23 months agomicrosoft/compiler: Add a max validator version
Jesse Natalie [Sun, 13 Feb 2022 21:05:12 +0000 (13:05 -0800)]
microsoft/compiler: Add a max validator version

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>

23 months agomicrosoft/compiler: Add a max shader model option
Jesse Natalie [Mon, 20 Dec 2021 16:55:55 +0000 (08:55 -0800)]
microsoft/compiler: Add a max shader model option

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>

23 months agonir_lower_io_to_scalar: Support arrayed (per-vertex) I/O
Jesse Natalie [Sun, 17 Jul 2022 12:00:10 +0000 (05:00 -0700)]
nir_lower_io_to_scalar: Support arrayed (per-vertex) I/O

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>

23 months agor600: don't dump shader info to files on debug
Gert Wollny [Fri, 22 Jul 2022 17:39:38 +0000 (19:39 +0200)]
r600: don't dump shader info to files on debug

This was useful to bring up the NIR backend, but is not needed
anymore.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17678>

23 months agor600/sfn: Fix streamout with non-zero component write
Gert Wollny [Fri, 22 Jul 2022 14:30:39 +0000 (16:30 +0200)]
r600/sfn: Fix streamout with non-zero component write

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17678>

23 months agor600/sfn: Fix used of local shared write mask
Gert Wollny [Fri, 22 Jul 2022 13:51:50 +0000 (15:51 +0200)]
r600/sfn: Fix used of local shared write mask

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17678>

23 months agor600/sfn: Fix emmision of LDS instructions
Gert Wollny [Fri, 22 Jul 2022 18:17:59 +0000 (20:17 +0200)]
r600/sfn: Fix emmision of LDS instructions

Assert to catch more possible erros with LDS fecth/read
groups.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17678>

23 months agor600/sfn: Fix the kcache failure handling
Gert Wollny [Thu, 21 Jul 2022 15:52:48 +0000 (17:52 +0200)]
r600/sfn: Fix the kcache failure handling

Instead of starting a new block when the kcache handling failed,
try to continue scheduling instructions until kcache allocation
fails for all ready instruction.
With that we avoid a CF split withing an LDS fetch/read group.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17678>

23 months agor600/sfn: count LDS queue pop reads separately in assembler
Gert Wollny [Thu, 21 Jul 2022 15:52:05 +0000 (17:52 +0200)]
r600/sfn: count LDS queue pop reads separately in assembler

Otherwise the check whether the fetches and reads are balanced
could fail.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17678>

23 months agor600/sfn: lower undef to zero
Gert Wollny [Thu, 21 Jul 2022 11:36:49 +0000 (13:36 +0200)]
r600/sfn: lower undef to zero

It's what the backend would do anyway, so let's do it in nir and
give the optimizer some chance to profit from possible improvements.

Fixes a bad shader with "The Raven Remastered"

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17678>

23 months agor600/sfn: fix storing shader output array locations
Gert Wollny [Thu, 21 Jul 2022 10:34:21 +0000 (12:34 +0200)]
r600/sfn: fix storing shader output array locations

When lowering gl_Clipertex the driver_location may no longer correspond
to the array index, so fill the array by counting the array index up
according to outputs that need to be handled by the state setup.

Fixes: 3340c7ce359252ad09b3e4d338837944482fb248
    r600/sfn: lower CLIPVERTEX to clip planes

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17678>

23 months agor600/sfn: clean up some commented out code
Gert Wollny [Fri, 22 Jul 2022 17:55:48 +0000 (19:55 +0200)]
r600/sfn: clean up some commented out code

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17678>

23 months agor600/sfn: Initialize TestShaderFromString member m_instr_factory.
Vinson Lee [Sun, 17 Jul 2022 21:39:00 +0000 (14:39 -0700)]
r600/sfn: Initialize TestShaderFromString member m_instr_factory.

Fix defect reported by Coverity Scan.

Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member m_instr_factory is not
initialized in this constructor nor in any functions that it calls.

Fixes: 79ca456b483 ("r600/sfn: rewrite NIR backend")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17584>

23 months agovenus: add support for VK_KHR_dynamic_rendering
Ryan Neph [Wed, 20 Jul 2022 22:57:15 +0000 (15:57 -0700)]
venus: add support for VK_KHR_dynamic_rendering

Signed-off-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17668>

23 months agovenus: refactor VkCommandBufferBeginInfo fixups to function
Ryan Neph [Thu, 21 Jul 2022 23:34:14 +0000 (16:34 -0700)]
venus: refactor VkCommandBufferBeginInfo fixups to function

Signed-off-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17668>

23 months agopanfrost: Allow NULL streamout targets
Icecream95 [Thu, 14 Jul 2022 22:40:35 +0000 (10:40 +1200)]
panfrost: Allow NULL streamout targets

Fixes Piglit test
arb_enhanced_layouts-transform-feedback-layout-qualifiers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17447>

23 months agopanfrost: Don't unbind recently bound streamout targets
Icecream95 [Tue, 12 Jul 2022 09:55:50 +0000 (21:55 +1200)]
panfrost: Don't unbind recently bound streamout targets

When unbinding extra targets, start after the last new target.

Fixes: 5ff79735601 ("panfrost: Import streamout data structures")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17447>

23 months agopanfrost: Add a debug option for checking overflows on pool uploads
Icecream95 [Sun, 10 Jul 2022 09:10:19 +0000 (21:10 +1200)]
panfrost: Add a debug option for checking overflows on pool uploads

PAN_MESA_DEBUG=overflow will place objects as close as possible to a
protected region at the end of the buffer, so that overflows segfault.

Caught the bugs in all four of the preceding commits.

v2: memset the BO to 0xbb to catch code expecting zeroed allocations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17447>

23 months agopanfrost: Correctly calculate prefetch suppresion varying index
Icecream95 [Sun, 10 Jul 2022 08:57:24 +0000 (20:57 +1200)]
panfrost: Correctly calculate prefetch suppresion varying index

The xfb_base is a base index, it makes no sense to multiply that with
the number of streamout targets. Use addition instead to fix a buffer
overflow.

Fixes: 557633b142e ("panfrost: Suppress Bifrost prefetching")
Reported-by: Luc Ma <onion0709@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17447>

23 months agopanfrost: Clear the GENERAL varying buffer field if unused
Icecream95 [Fri, 22 Jul 2022 14:12:40 +0000 (02:12 +1200)]
panfrost: Clear the GENERAL varying buffer field if unused

Otherwise the indirect draw shader can read uninitialised data for the
stride, and the position varying buffer may be outside the heap BO.

The next commit fixes a bug that masked this one.

Fixes: 2e6d94c198e ("panfrost: Add helpers to support indirect draws")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17447>

23 months agopanfrost: Emit the correct number of attributes
Icecream95 [Sun, 10 Jul 2022 08:52:54 +0000 (20:52 +1200)]
panfrost: Emit the correct number of attributes

create_vertex_elements_state is sometimes called with a too large
num_elements argument, for example with util_blitter, which causes a
buffer overflow.

There is no documentation to forbid this practice, so don't rely on
so->num_elements being correct and instead use the vertex shader
attribute count, which matches the value used to allocate the
descriptors.

Use attributes_read_count rather than attribute_count because the
latter also includes images and PAN_VERTEX_ID/PAN_INSTANCE_ID.

Fixes: 76de3e691c6 ("panfrost: Merge attribute packing routines")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17447>

23 months agopanfrost: Only emit images when they are present
Icecream95 [Sun, 10 Jul 2022 08:48:16 +0000 (20:48 +1200)]
panfrost: Only emit images when they are present

nr_images is the trigger for allocating double the number of buffers
for attributes. When there are no images, there is not always enough
space for ALIGN_POT(k, 2) to not move k out of bounds, so don't
execute the line in that case.

Fixes: dc85f65e059 ("panfrost: emit shader image attribute descriptors")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17447>

23 months agozink: remove deqp fails for lavapipe
Mike Blumenkrantz [Fri, 22 Jul 2022 20:13:00 +0000 (16:13 -0400)]
zink: remove deqp fails for lavapipe

these are all broken tests, so ignore whatever results there were for now

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17721>

23 months agolavapipe: propagate xfb info for pipeline library rasterization stages
Mike Blumenkrantz [Fri, 22 Jul 2022 15:57:21 +0000 (11:57 -0400)]
lavapipe: propagate xfb info for pipeline library rasterization stages

Fixes: 202bbedc55a ("lavapipe: streamline xfb shader setup")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17716>

23 months agospirv: Fix array length of buffers larger than INT32_MAX.
Ian Romanick [Tue, 9 Feb 2021 19:18:48 +0000 (11:18 -0800)]
spirv: Fix array length of buffers larger than INT32_MAX.

Like 90a8fb03556e.

fossil-db results:

All Skylake and newer Intel platforms had similar results. (Ice Lake shown)
Instructions in all programs: 141442369 -> 141442363 (-0.0%)
Instructions helped: 1

Cycles in all programs: 9099270231 -> 9099270187 (-0.0%)
Cycles helped: 1

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17637>

23 months agoci/crocus: Fix the commented YML for blender-demo-cube_diorama.
Emma Anholt [Tue, 19 Jul 2022 19:41:35 +0000 (12:41 -0700)]
ci/crocus: Fix the commented YML for blender-demo-cube_diorama.

Fixes: c0930b552d01 ("ci/crocus: Disable the blender trace.")
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17637>

23 months agointel/vec4: Set lower_usub_sat
Ian Romanick [Wed, 20 Jul 2022 20:01:44 +0000 (13:01 -0700)]
intel/vec4: Set lower_usub_sat

Reviewed-by: Emma Anholt <emma@anholt.net>
Closes: #6900
Fixes: 90a8fb03 ("nir/lower_io: Fix array length of buffers larger than INT32_MAX.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17637>

23 months agonir: Split usub_sat lowering flag from uadd_sat.
Emma Anholt [Tue, 19 Jul 2022 19:34:03 +0000 (12:34 -0700)]
nir: Split usub_sat lowering flag from uadd_sat.

Intel vec4 would like to do uadd_sat, but use lowering for usub_sat.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17637>

23 months agoanv: disable dev.i915.perf_stream_paranoid=0 warning
Mike Blumenkrantz [Wed, 20 Jul 2022 19:04:22 +0000 (15:04 -0400)]
anv: disable dev.i915.perf_stream_paranoid=0 warning

this is spammed constantly even if ANV isn't used

fixes #6731

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17661>

23 months agoiris: Use fill_surface_states for compressed resources
Nanley Chery [Fri, 15 Jul 2022 16:05:24 +0000 (12:05 -0400)]
iris: Use fill_surface_states for compressed resources

In iris_create_surface, use the fill_surface_states helper function instead of
an open-coded solution for compressed resources.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17598>

23 months agoiris: Don't leak compressed resources in iris_create_surface
Nanley Chery [Fri, 15 Jul 2022 17:42:18 +0000 (13:42 -0400)]
iris: Don't leak compressed resources in iris_create_surface

Before this patch, we were leaking compressed resources in iris_create_surface.
Specifically, when we failed to create an uncompressed ISL surface and view for
a compressed resource, we didn't unreference the resource pointer we referenced
into the pipe_surface.

Fix this by delaying the pipe_surface initialization code to after attempting
to create the uncompressed surface and view.

Cc: 22.1 <mesa-stable>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17598>

23 months agoiris: Don't leak surface states for compressed resources
Nanley Chery [Fri, 15 Jul 2022 15:51:55 +0000 (11:51 -0400)]
iris: Don't leak surface states for compressed resources

Before this patch, we were leaking surface states in iris_create_surface.
Specifically, when we failed to create an uncompressed ISL surface and view for
a compressed resource, we didn't free surface states we allocated for it.

Fix this by attempting to create the uncompressed surface and view before we
allocate the surface states.

Cc: 22.1 <mesa-stable>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17598>

23 months agovk/util: simplify extensions gen code
Eric Engestrom [Thu, 21 Jul 2022 21:38:27 +0000 (22:38 +0100)]
vk/util: simplify extensions gen code

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17713>

23 months agovk/util: handful of pythonic cleanups
Eric Engestrom [Thu, 21 Jul 2022 21:38:27 +0000 (22:38 +0100)]
vk/util: handful of pythonic cleanups

No functional changes.

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17713>

23 months agoradv/rt: simplify lower_rt_instructions()
Daniel Schürmann [Tue, 5 Jul 2022 10:04:38 +0000 (12:04 +0200)]
radv/rt: simplify lower_rt_instructions()

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17301>

23 months agoradv/rt: fix nir_builder cursor in lower_rt_instructions()
Daniel Schürmann [Tue, 5 Jul 2022 09:49:29 +0000 (11:49 +0200)]
radv/rt: fix nir_builder cursor in lower_rt_instructions()

Fixes: 207ce6d658ac6d8f6421a02304b74645ff835e96 ('radv: Add helper to inline shaders into the main shader.')
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17301>

23 months agoradv/rt: Don't load ClosestHit SBT on every hit, but only once after traversal
Daniel Schürmann [Wed, 22 Jun 2022 09:35:47 +0000 (11:35 +0200)]
radv/rt: Don't load ClosestHit SBT on every hit, but only once after traversal

Quake II RTX:
Totals from 7 (0.01% of 134913) affected shaders:
CodeSize: 217592 -> 215956 (-0.75%)
Instrs: 39468 -> 39341 (-0.32%)
Latency: 761581 -> 746802 (-1.94%)
InvThroughput: 507721 -> 497870 (-1.94%)
Copies: 4621 -> 4585 (-0.78%)
Branches: 1598 -> 1584 (-0.88%)

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17301>

23 months agoradv/rt: use stage ID as handle for general and closestHit shaders
Daniel Schürmann [Fri, 22 Apr 2022 12:18:36 +0000 (14:18 +0200)]
radv/rt: use stage ID as handle for general and closestHit shaders

This avoids some code duplication and divergence.

Quake II RTX:
Totals from 7 (0.01% of 134913) affected shaders:
CodeSize: 218880 -> 217592 (-0.59%)
Instrs: 39692 -> 39468 (-0.56%)
Latency: 789091 -> 761581 (-3.49%)
InvThroughput: 526061 -> 507721 (-3.49%)
VClause: 1202 -> 1188 (-1.16%)
Copies: 4649 -> 4621 (-0.60%)
Branches: 1605 -> 1598 (-0.44%)

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17301>

23 months agoradv/rt: use derefs for the traversal stack
Daniel Schürmann [Thu, 21 Apr 2022 22:29:02 +0000 (00:29 +0200)]
radv/rt: use derefs for the traversal stack

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17301>

23 months agoradv: create RT traversal as separate shader
Daniel Schürmann [Thu, 21 Apr 2022 19:33:10 +0000 (21:33 +0200)]
radv: create RT traversal as separate shader

This will help in future to keep the main shader slim
when we have actual function calls.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17301>

23 months agoradv: Only create noop-fs for graphics pipelines
Daniel Schürmann [Fri, 13 May 2022 14:14:34 +0000 (16:14 +0200)]
radv: Only create noop-fs for graphics pipelines

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17301>

23 months agoanv: implement Wa_14015264727 for DG2
Tapani Pälli [Wed, 20 Jul 2022 12:29:22 +0000 (15:29 +0300)]
anv: implement Wa_14015264727 for DG2

On DG2 we need to flush data cache before fast clear operation.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17218>

23 months agoiris: implement Wa_14015264727 for DG2
Tapani Pälli [Wed, 20 Jul 2022 09:30:32 +0000 (12:30 +0300)]
iris: implement Wa_14015264727 for DG2

On DG2 we need to flush data cache before fast clear operation.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17218>

23 months agod3d12: Remove state tracking implementation details from header
Jesse Natalie [Thu, 21 Jul 2022 19:46:23 +0000 (12:46 -0700)]
d3d12: Remove state tracking implementation details from header

Now that the old state tracking code is removed, implementation details
no longer need to be leaked out of this single source file. Remove structs,
function declarations, 'd3d12_' prefixes, and add static when possible.

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>

23 months agod3d12: Add a transition flag indicating that state accumulation is needed
Jesse Natalie [Thu, 21 Jul 2022 17:15:25 +0000 (10:15 -0700)]
d3d12: Add a transition flag indicating that state accumulation is needed

Most call sites for transitions will only apply transitions to one or two
resources, and don't need to use the bo set, where each call is guaranteed
to insert the bo, only to walk the set immediately afterwards. Instead, they
can just append the barriers to the dynarray directly and skip the bo set.

Draws and dispatches still use the append approach, to accumulate the full
set of state needed for each subresource for the case where a single
[sub]resource is bound to the pipeline in multiple places.

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>

23 months agod3d12: Optimize transition_subresource_states that covers a whole resource
Jesse Natalie [Thu, 21 Jul 2022 17:00:01 +0000 (10:00 -0700)]
d3d12: Optimize transition_subresource_states that covers a whole resource

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>

23 months agod3d12: Extract core barrier logic
Jesse Natalie [Thu, 21 Jul 2022 16:21:41 +0000 (09:21 -0700)]
d3d12: Extract core barrier logic

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>

23 months agod3d12: Rename bind invalidate options to transition flags
Jesse Natalie [Thu, 21 Jul 2022 16:10:13 +0000 (09:10 -0700)]
d3d12: Rename bind invalidate options to transition flags

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>

23 months agod3d12: Swap the remainder of state tracking to new method
Jesse Natalie [Thu, 21 Jul 2022 03:25:29 +0000 (20:25 -0700)]
d3d12: Swap the remainder of state tracking to new method

Uses a set of d3d12_bo on the context to track which bos are pending
a transition instead of an intrusive linked list, since the bo may
need to be pending on multiple contexts at once.

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>

23 months agod3d12: Record a state fixup command list when necessary
Jesse Natalie [Wed, 20 Jul 2022 19:03:21 +0000 (12:03 -0700)]
d3d12: Record a state fixup command list when necessary

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>

23 months agod3d12: Track a global resource state for non-simultaneous-access resources
Jesse Natalie [Wed, 20 Jul 2022 14:45:59 +0000 (07:45 -0700)]
d3d12: Track a global resource state for non-simultaneous-access resources

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>

23 months agod3d12: Create/free context state entries
Jesse Natalie [Wed, 20 Jul 2022 14:02:38 +0000 (07:02 -0700)]
d3d12: Create/free context state entries

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>

23 months agod3d12: Treat depth/stencil as planar for plane count helper
Jesse Natalie [Wed, 20 Jul 2022 14:00:36 +0000 (07:00 -0700)]
d3d12: Treat depth/stencil as planar for plane count helper

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>

23 months agod3d12: Add a context state tracking structure
Jesse Natalie [Wed, 20 Jul 2022 12:31:01 +0000 (05:31 -0700)]
d3d12: Add a context state tracking structure

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>

23 months agod3d12: Notify contexts about deletion of bos
Jesse Natalie [Tue, 19 Jul 2022 22:42:04 +0000 (15:42 -0700)]
d3d12: Notify contexts about deletion of bos

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>

23 months agod3d12: Hold lock when removing resources from residency list
Jesse Natalie [Tue, 19 Jul 2022 22:30:07 +0000 (15:30 -0700)]
d3d12: Hold lock when removing resources from residency list

Also, remove them from the list before releasing the ID3D12Resource.

Fixes: 671deb54 ("d3d12: Add residency info to d3d12_bo")
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>

23 months agod3d12: Add a list of contexts alive for the current screen
Jesse Natalie [Tue, 19 Jul 2022 22:07:42 +0000 (15:07 -0700)]
d3d12: Add a list of contexts alive for the current screen

When a resource is destroyed, we'll need to let the contexts know.
This is guarded by the submit mutex, because we'll already be holding
that for at least one place where we want to iterate this list, and
it's low-frequency enough that re-using it is simpler than adding more
locks and creating confusing lock ordering.

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>

23 months agod3d12: Give bos a unique identifier to be used for state tracking
Jesse Natalie [Tue, 19 Jul 2022 21:47:47 +0000 (14:47 -0700)]
d3d12: Give bos a unique identifier to be used for state tracking

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>

23 months agod3d12: Move current resource state to new files
Jesse Natalie [Mon, 18 Jul 2022 23:11:59 +0000 (16:11 -0700)]
d3d12: Move current resource state to new files

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>

23 months agod3d12: Move desired resource state to new files
Jesse Natalie [Mon, 18 Jul 2022 21:28:30 +0000 (14:28 -0700)]
d3d12: Move desired resource state to new files

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>

23 months agod3d12: Add a blank d3d12_resource_state.h/cpp
Jesse Natalie [Mon, 18 Jul 2022 20:20:26 +0000 (13:20 -0700)]
d3d12: Add a blank d3d12_resource_state.h/cpp

This will host some code that's moving and ported to match style
with the rest of the driver, and other code that will be re-written.

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>

23 months agoutil/vbuf: handle multidraws
Mike Blumenkrantz [Thu, 21 Jul 2022 16:48:17 +0000 (12:48 -0400)]
util/vbuf: handle multidraws

this moves the handling from cso_conext to vbuf, which reduces overhead
for draws that aren't rewritten

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17686>

23 months agoglsl: correctly track cross slot component packing
Timothy Arceri [Fri, 22 Jul 2022 01:59:49 +0000 (11:59 +1000)]
glsl: correctly track cross slot component packing

Otherwise we will mix and match mesa's custom cross slot packing
with arb_enhanced_layouts style packing and we won't correctly
handle the size of the vars needed for the mesa custom packing.

The code was working correctly if the shader interface had both
a matching input and output but when we only had one side of
the interface we were only marking a single slot location as
packed.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Fixes: e5122a55435d ("glsl: add a NIR based varying linker")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6853
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17550>

23 months agoetnaviv: remove etna_align_up() function
Lucas Stach [Thu, 21 Jul 2022 19:50:37 +0000 (21:50 +0200)]
etnaviv: remove etna_align_up() function

It does the same thing as align() from u_math.h, no need to
have a etnaviv specific version.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17695>

23 months agozink: drop pointless comment
Erik Faye-Lund [Thu, 21 Jul 2022 10:22:43 +0000 (12:22 +0200)]
zink: drop pointless comment

We're already handling all the meaningful types here. The other types
like samplers, images, structs etc aren't really appropriate here.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17676>

23 months agozink: remove pointless assert
Erik Faye-Lund [Wed, 13 Apr 2022 08:32:26 +0000 (10:32 +0200)]
zink: remove pointless assert

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17676>

23 months agozink: remove pointless test
Erik Faye-Lund [Wed, 13 Apr 2022 08:30:28 +0000 (10:30 +0200)]
zink: remove pointless test

These are already all the bitsizes there are. No need to test for them.

Besides, get_uvec_type already contains an assert for the same
condition anyway.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17676>

23 months agoac/nir/ngg: Remember proper bit sizes of GS output variables.
Timur Kristóf [Sun, 17 Jul 2022 18:36:43 +0000 (20:36 +0200)]
ac/nir/ngg: Remember proper bit sizes of GS output variables.

The LLVM backend keeps track of 16-bit output variables and it will
miscompile shaders when these outputs aren't the correct bitsize.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17706>

23 months agoac/nir/ngg: Copy comment about LDS layout for NGG GS.
Timur Kristóf [Wed, 8 Sep 2021 08:37:09 +0000 (10:37 +0200)]
ac/nir/ngg: Copy comment about LDS layout for NGG GS.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17706>

23 months agoac/llvm: Use gs_prim_id for NGG VS.
Timur Kristóf [Sun, 17 Jul 2022 17:08:11 +0000 (19:08 +0200)]
ac/llvm: Use gs_prim_id for NGG VS.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17706>

23 months agoac/llvm: Add LLVM bug workaround to ac_build_mbcnt_add.
Timur Kristóf [Thu, 19 May 2022 21:13:28 +0000 (23:13 +0200)]
ac/llvm: Add LLVM bug workaround to ac_build_mbcnt_add.

LLVM always believes that this instruction's upper bound is the wave
size, regardless of ac_set_range_metadata and regardless of whether
the add source is used.

As a workaround, emit an extra add instruction.

Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17706>

23 months agoac/llvm: Implement load_num_subgroups for NGG shaders.
Timur Kristóf [Thu, 9 Sep 2021 14:19:37 +0000 (16:19 +0200)]
ac/llvm: Implement load_num_subgroups for NGG shaders.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17706>

23 months agoradv: Simplify the meta init fail path
Konstantin Seurer [Wed, 20 Jul 2022 12:49:38 +0000 (14:49 +0200)]
radv: Simplify the meta init fail path

Move most of the the cleanup into radv_device_init_meta.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17652>

23 months agoradv: Use RADV_META_SUSPEND_PREDICATING
Konstantin Seurer [Tue, 19 Jul 2022 12:39:06 +0000 (14:39 +0200)]
radv: Use RADV_META_SUSPEND_PREDICATING

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17625>

23 months agoradv: Add meta saving/restoring for predicating
Konstantin Seurer [Tue, 19 Jul 2022 12:11:15 +0000 (14:11 +0200)]
radv: Add meta saving/restoring for predicating

There are a bunch of places, where this is done manually.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17625>

23 months agollvmpipe: fix aniso cube map arrays.
Dave Airlie [Fri, 22 Jul 2022 03:59:11 +0000 (13:59 +1000)]
llvmpipe: fix aniso cube map arrays.

There was a coordinate missing when you have cube map arrays,
and aniso sampling.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fixes: ce2b711c0a5d ("gallivm: add support for anisotropic sampling.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17704>

23 months agoRevert "venus: suballocate more for layering"
Yiwei Zhang [Fri, 22 Jul 2022 01:16:34 +0000 (01:16 +0000)]
Revert "venus: suballocate more for layering"

This reverts commit f96e25ae0530be62e8c4b0ca6631643725753190.

It's causing vkbench oom failure on radv.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17701>

23 months agozink: Mark depth/stencil visual tests as flakes
Jason Ekstrand [Fri, 22 Jul 2022 00:18:09 +0000 (19:18 -0500)]
zink: Mark depth/stencil visual tests as flakes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17696>

23 months agovulkan: Don't assert VkGraphicsPipelineLibraryCreateInfoEXT::Flags == 0
Jason Ekstrand [Wed, 20 Jul 2022 23:17:21 +0000 (18:17 -0500)]
vulkan: Don't assert VkGraphicsPipelineLibraryCreateInfoEXT::Flags == 0

There are VUs that imply that this is a requirement but the CTS seems to
ignore it.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17696>

23 months agovulkan: Input assembly and depth/stencil can also be fully dynamic
Jason Ekstrand [Thu, 21 Jul 2022 19:41:43 +0000 (14:41 -0500)]
vulkan: Input assembly and depth/stencil can also be fully dynamic

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17696>

23 months agovulkan: Fix pipeline libraries with dynamic-only VI or FSR state
Jason Ekstrand [Wed, 20 Jul 2022 18:58:44 +0000 (13:58 -0500)]
vulkan: Fix pipeline libraries with dynamic-only VI or FSR state

When we initialize the graphics pipeline state, we skip VI and FSR state
if they're 100% dynamic.  We need to do this if the current set of
dynamic things contains VI/FSR or if the set of dynamic state already in
the vk_graphics_pipeline_state has them dynamic.  Look state->dynamic
after we've merged instead of just looking at the dynamic set from the
VkGraphicsPipelineCreateInfo we were passed.

Also, when we validate, we need to assume that VI and FSR exist or else
we'll assert if dynamic VI or FSR are set.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17696>