831 Commits

Author SHA1 Message Date
Eric Engestrom
e1e7e7bf17 .pick_status.json: Mark af895692b3 as denominated 2023-06-27 14:14:21 +01:00
Samuel Pitoiset
034fc76054 radv/amdgpu: fix dumping cs with RADV_DEBUG=noibs
The ib_buffer is NULL now.

Fixes: 50e6b16855 ("radv/amdgpu: Use fallback submit for queues that can't use IBs.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23646>
(cherry picked from commit 8af705a856)
2023-06-27 14:05:22 +01:00
Gert Wollny
2ac642c5f9 r600/sfn: Don't clear clear group flag on vec4 that comes from TEX or FETCH
If we consider clearing the group flag of a vec4 register that is used as
source for some instruction we have to take into account that the parent
of the register element may also be part of a group in the parent instruction.
In this case we must not clear the group flag.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9118

Fixes:  f3415cb26a (r600/sfn: copy propagate register load chains)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23813>
(cherry picked from commit 34163e19f7)
2023-06-27 13:54:08 +01:00
Hyunjun Ko
4a288b1dd5 anv/video: fix to set U/V offset correctly.
Fixes: 98c58a16ef ("anv: add initial video decode support for h264.")

Closes: mesa/mesa#9227

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23819>
(cherry picked from commit 23d4e21d83)
2023-06-27 13:54:07 +01:00
Timothy Arceri
004e527fbf glsl: call nir_opt_find_array_copies() when linking
shader-db results IRIS (BDW):

total instructions in shared programs: 17883388 -> 17859658 (-0.13%)
instructions in affected programs: 48100 -> 24370 (-49.33%)
helped: 6
HURT: 0
helped stats (abs) min: 1450 max: 7028 x̄: 3955.00 x̃: 3387
helped stats (rel) min: 40.31% max: 51.92% x̄: 47.07% x̃: 48.96%
95% mean confidence interval for instructions value: -6613.28 -1296.72
95% mean confidence interval for instructions %-change: -52.73% -41.40%
Instructions are helped.

total cycles in shared programs: 866961809 -> 863521521 (-0.40%)
cycles in affected programs: 9179396 -> 5739108 (-37.48%)
helped: 6
HURT: 0
helped stats (abs) min: 252584 max: 972430 x̄: 573381.33 x̃: 495130
helped stats (rel) min: 21.80% max: 48.65% x̄: 35.01% x̃: 34.58%
95% mean confidence interval for cycles value: -917157.00 -229605.67
95% mean confidence interval for cycles %-change: -47.61% -22.40%
Cycles are helped.

total spills in shared programs: 20417 -> 15521 (-23.98%)
spills in affected programs: 6966 -> 2070 (-70.28%)
helped: 6
HURT: 0

total fills in shared programs: 25151 -> 21005 (-16.48%)
fills in affected programs: 4374 -> 228 (-94.79%)
helped: 6
HURT: 0

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9055
Fixes: d75a36a9ee ("glsl: remove do_copy_propagation_elements() optimisation pass")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23737>
(cherry picked from commit d336bc3926)
2023-06-27 13:54:06 +01:00
Lina Versace
d93ab51421 venus: Fix detection of push descriptor set
- Fix null deref. VkPipelineLayoutCreateInfo::pSetLayouts is allowed to
  contain VK_NULL_HANDLE.
- The loop 'break' was misplaced.

Fixes crash in
dEQP-VK.pipeline.pipeline_library.graphics_library.fast.0_00_11_11 after
VK_EXT_graphics_pipeline_library is enabled in a later patch.

Fixes: 91966f2eff ("venus: extend lifetime of push descriptor set layout")
Signed-off-by: Lina Versace <linyaa@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23810>
(cherry picked from commit 98c8d7b7cf)
2023-06-27 13:54:05 +01:00
Yiwei Zhang
b2c94821ff venus: suballocate feedback slot with feedback buffer alignment
Venus sync feedback design relies on concurrent host device resource
access. To avoid device flush overwriting host writes, we must
suballocate the slots with a minimum size of the buffer alignment.

Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23633>
(cherry picked from commit 2f729ff6aa)
2023-06-27 13:54:04 +01:00
Lionel Landwerlin
249c76e27b anv: align buffers to a cache line
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9217
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23794>
(cherry picked from commit 8509ebb68a)
2023-06-27 13:54:03 +01:00
Yonggang Luo
be04c20aa7 mapi: Fixes check_table.cpp for DrawArraysInstancedARB and DrawElementsInstancedARB
The compile error when compiled with "-Dglx=xlib -D shared-glapi=disabled":
check_table.cpp:1133:37: error: ‘struct _glapi_table’ has no member named ‘DrawArraysInstancedARB’; did you mean ‘DrawArraysInstanced’?
 1133 |    { "glDrawArraysInstancedARB", _O(DrawArraysInstancedARB) },

Fixes: 5679ef99b8 ("glapi: remove EXT and ARB suffixes from Draw functions")

Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23793>
(cherry picked from commit 7af2c45947)
2023-06-27 13:54:02 +01:00
Mike Blumenkrantz
16964024b6 nir/lower_tex: ignore saturate for txf ops
saturate is used for GL_CLAMP emulation, and GL_CLAMP cannot be used
with txf

ref #9226

cc: mesa-stable

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23750>
(cherry picked from commit 402ae3b132)
2023-06-27 13:54:01 +01:00
Eric Engestrom
552ac035f0 asahi: drop unnecessary DRM_FORMAT_MOD_{LINEAR,INVALID} fallbacks
Since afe134a49c ("asahi: Drop macOS backend"), `drm_fourcc.h` is
unconditionally included, meaning these defines are now dead code.

Fixes: afe134a49c ("asahi: Drop macOS backend")
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23773>
(cherry picked from commit 63f44951ac)
2023-06-27 13:53:58 +01:00
Karmjit Mahil
b4cd2c34e5 pvr: Fix dynamic offset patching
Previously the set of dynamic offsets were being reused per each
binding. That's now fixed, by using an offset to determine where
each binding's dynamic offsets reside.

Tests fixed:
  dEQP-VK.binding_model.descriptor_copy.{compute,graphics}
    .{uniform,storage}_buffer_dynamic_0

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Fixes: aa791961a8 ("pvr: Add support for dynamic buffers descriptors")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23587>
(cherry picked from commit b902fb2e14)
2023-06-27 13:53:46 +01:00
SoroushIMG
753abf8b45 pvr: Fix barrier insertion on merged subpasses
The driver can merge subpasses within a render pass into a single
hw render. While doing so it makes the assumption that the subpasses
in an hw render will all be submitted in a single job.

On vkCmdPipelineBarrier() the driver was previously incorrectly
inserting an event sub-cmd on a merged subpass, breaking that
assumption leading to incorrect values for input attachments.

Signed-off-by: Soroush Kashani <soroush.kashani@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Fixes: 6d672e0336 ("pvr: Add initial vkCmdPipelineBarrier skeleton.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23693>
(cherry picked from commit 4071b8e7f3)
2023-06-27 13:52:24 +01:00
Karmjit Mahil
9d31e05b8a pvr: Fix seg fault on empty descriptor set
Vulkan allows empty descriptor sets to be created. When we setup
the descriptor set addresses table we fill in the address of the
`bo` for each valid/currently bound desc set. For empty desc sets
there is no `bo` which was causing a seg fault. Now skip them,
leaving their address set to `~0`.

Reported-by: Simon Perretta <simon.perretta@imgtec.com>
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Fixes: ce67f5ac94 ("pvr: Write descriptor set addrs table dev addr into shareds")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23692>
(cherry picked from commit 822dc384b1)
2023-06-27 13:52:23 +01:00
Eric Engestrom
5f3317ec1c .pick_status.json: Update to f9e6d35f65 2023-06-27 13:51:38 +01:00
Eric Engestrom
13a309b928 .pick_status.json: Update to 337908440e 2023-06-24 14:09:52 +01:00
Lionel Landwerlin
ed62199266 anv: track buffer writes from shaders for query results writes
In the following sequence :
   - write buffer B with a shader
   - barrier on buffer from shader-write to transfer
   - vkCmdCopyQueryPoolResults to buffer B

The barrier should take care of ordering things between the shader
writes and vkCmdCopyQueryPoolResults.

The problem is that vkCmdCopyQueryPoolResults runs on the command
streamer and that is not coherent or synchronized in the same way as
shaders.

This change marks the barrier has potentially containing pending
buffer writes for queries so that we can insert the necessary flush
for vkCmdCopyQueryPoolResults later.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9013
Cc: mesa-stable
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23675>
(cherry picked from commit cab8495625)
2023-06-24 14:09:40 +01:00
Lionel Landwerlin
b99d3dd3d9 anv: limit ANV_PIPE_RENDER_TARGET_BUFFER_WRITES to blorp operations using 3D
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23074>
(cherry-picked from commit 455a13fb7f)
2023-06-24 14:09:40 +01:00
Mike Blumenkrantz
7f7ddcb0a2 zink: always clamp NUM_QUERIES to 500
this avoids ooming on some weaker GPUs with big query energy

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23729>
(cherry picked from commit 1ca87a300d)
2023-06-21 22:01:23 +01:00
Mike Blumenkrantz
a1acbaea39 zink: acquire persistently bound swapchain descriptors before setting usage
if a swapchain image is bound as a sampler across batches then it needs
to be acquired again before it is used

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23729>
(cherry picked from commit 6b204c6162)
2023-06-21 22:01:23 +01:00
Mike Blumenkrantz
b94aca6dbf zink: fix ubo array sizing in ntv
there are only 2 ubos that can be emitted, except the emitted ubos
can start at an offset based on the first-used ubo, which means this
has to support the full range of ubo indices

fixes oob access in game Beyond All Reason

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23729>
(cherry picked from commit 9803174942)
2023-06-21 22:01:23 +01:00
Eric Engestrom
f2fa64def1 .pick_status.json: Update to b687cbe36c 2023-06-21 22:01:23 +01:00
Dave Airlie
4bebab6c55 radv/video: drop incorrect defines for uapi ones.
I missed there's an off by one, and found the kernel defined
the correct bits, so just use that.

Fixes: 9477f117f4 ("radv/video: add initial frameworking.")
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23757>
(cherry picked from commit 146adbd2f4)
2023-06-21 13:14:30 +01:00
Patrick Lerda
144ac599c5 util/blitter: fix util_blitter_clear_buffer() refcnt imbalance
Indeed, the vertex state was restored using a specific
condition at the util_blitter_restore_vertex_states()
level. This change ensures that the condition is the
same when the vertex state is saved.

The function util_blitter_clear_buffer() is only called
by the r600 driver on pre-evergreen gpus.

This issue is triggered on a rv770 gpu with "piglit/bin/fbo-1d -auto -fbo"
or "piglit/bin/draw_buffers_gles2 -auto -fbo"
while setting GALLIUM_REFCNT_LOG=refcnt.log.

Fixes: 5f566faa46 ("radeonsi: don't save and restore vertex buffers and elements for u_blitter")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23721>
(cherry picked from commit 23c003b88c)
2023-06-21 13:13:01 +01:00
Mike Blumenkrantz
4dcacfff6a zink: add COHERENT requirement for CACHED memory
zink doesn't handle non-coherent cached memory correctly, so ensure
that scenario is never hit

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23728>
(cherry picked from commit 7a169254c5)
2023-06-21 13:13:00 +01:00
Eric Engestrom
c08692ab6b .pick_status.json: Update to 48b32124c6 2023-06-21 13:12:51 +01:00
Karol Herbst
8bdf4b2b41 compiler/types: fix size of padded OpenCL Structs
In C the size of a struct { uin32_t a; uint8_t b; } is 8, not 5, so we have
to account for the biggest alignment across all struct members.

Funny that the OpenCL CTS doesn't catch that.

Fixes: 44d32e62fb ("glsl: add cl_size and cl_alignment")
Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23701>
(cherry picked from commit 4431e5a222)
2023-06-20 13:38:04 +01:00
Lionel Landwerlin
9c599dff88 anv: avoid private buffer allocations in vkGetDeviceImageMemoryRequirementsKHR
The whole point of vkGetDeviceImageMemoryRequirementsKHR is to avoid
creating an image so we should completely avoid any allocation like
the private binding.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 4075dd16ab ("anv: implement vkGetDeviceImageMemoryRequirementsKHR")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23720>
(cherry picked from commit 0e728ea7b0)
2023-06-20 13:38:03 +01:00
Gert Wollny
db633a8caa r600: Split tex CF only if written component is read
There is no need to split the CF if only the register ID
in a previous write is the same, we should look at the actual
slots instead, ut we have also to take writes of 0 and 1 into
account.

Cc: mesa-stable

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23710>
(cherry picked from commit 3a569fbf9b)
2023-06-20 13:38:01 +01:00
Marek Olšák
cf19bd944d radeonsi: fix RB+ and gfx11 issues with framebuffer state
This fixes most gfx11 test failures.

Fixes: 9fecac091f - radeonsi/gfx11: scattered register deltas

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23687>
(cherry picked from commit d891bd7c3a)
2023-06-20 13:37:59 +01:00
Marek Olšák
a2a63c5339 radeonsi: don't convert L8A8 to R8A8 when blitting via compute to fix gfx7
Fixes: 0482ff3158 - radeonsi: don't do image stores with RGBX, L, LA, I, and SRGB formats
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8707
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9176

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23687>
(cherry picked from commit 9078301ff8)
2023-06-20 13:31:11 +01:00
Eric Engestrom
f38154889f .pick_status.json: Mark 5db031bf3e as denominated 2023-06-20 13:31:09 +01:00
Tim Pambor
73c5434c25 virgl: Fix stack overflow in virgl_bind_sampler_states
Triggered on hosts with more than 32 samplers.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9207
Fixes: 63c4c559 ("virgl: obtain supported number of shader sampler views from host")
Signed-off-by: Tim Pambor <tp@osasysteme.de>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23678>
(cherry picked from commit 1ad79cb84f)
2023-06-20 12:17:51 +01:00
Mike Blumenkrantz
f7ac8d19c1 lavapipe: correctly update shader object per-stage push constant sizes
Fixes: 8b3022c918 ("lavapipe: implement EXT_shader_object")

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23663>
(cherry picked from commit b7f37265ac)
2023-06-20 12:17:49 +01:00
Mike Blumenkrantz
d7839ab2a7 lavapipe: more fixes for sample shading
this fixes the case where a draw without sample shading precedes
a draw with sample shading without changes to the sample mask

Fixes: cc9e958053 ("lavapipe: fix DS3 min sample setting")

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23663>
(cherry picked from commit cb03191e82)
2023-06-20 12:17:48 +01:00
Matt Turner
5e54b211e3 meson: Remove reference to removed SWR driver
Fixes: e2de00876a ("gallium/swr: Remove common code and build options")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23679>
(cherry picked from commit ce467c6b33)
2023-06-20 12:17:02 +01:00
Eric Engestrom
9f91082b67 .pick_status.json: Update to a2d40c09b7 2023-06-20 12:16:51 +01:00
Nanley Chery
8e4950928c Revert "iris: Add missed tile flush flag"
This reverts commit 0523607ebb.

The issue that commit worked around seems to have been fixed as of
commit 1c8b4940eb ("iris: Emit flushes for push constant source
buffers"). I could no longer reproduce it from that point onward with
this revert applied.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18725>
(cherry picked from commit bb6d300b3a)
2023-06-15 22:28:13 +01:00
Nanley Chery
de04140973 intel/blorp: Avoid 32bpc fast clear sampling issue
For 32bpc formats, the ICL+ sampler fetches the raw clear color dwords
used for rendering instead of the converted pixel dwords typically used
for sampling. The CLEAR_COLOR struct page documents this for 128bpp
formats, but not for 32bpp and 64bpp formats.

In blorp_copy, map R11G11B10_FLOAT to R8G8B8A8_UINT instead of R32_UINT.
This will cause the sampler to fetch the clear color pixel, allowing
drivers to keep clear color support enabled during copies.

If iris is forced to convert blits to copies, this patch fixes the
following test on gfx12:

  dEQP-GLES3.functional.fbo.color.repeated_clear.blit.rbo.r11f_g11f_b10f

At the moment, both iris and anv won't hit this issue outside of
blorp_copy. This is due to the read/write access restrictions they
currently place on texture views that reinterpret the surface format.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8964
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23604>
(cherry picked from commit f0b6b57c77)
2023-06-15 22:28:13 +01:00
Rhys Perry
5b14568dad ac: fix PIPE_FORMAT_R11G11B10_FLOAT DST_SEL_W
Previously, the W component would be incorrect for attributes using this
format when loaded in RADV's vertex shader prologs.

Fixes dEQP-VK.pipeline.fast_linked_library.vertex_input.*b10g11r11*missing_components*

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: 6a2ada93b4 ("ac: add ac_vtx_format_info")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23645>
(cherry picked from commit 4291cc5255)
2023-06-15 22:28:13 +01:00
Samuel Pitoiset
be57dc25ac radv: reset some dynamic states when the fragment shader stage is unbound
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23494>
(cherry picked from commit 71b6108f67)
2023-06-15 22:27:56 +01:00
Samuel Pitoiset
2c81fbf6d9 radv: fix re-emitting some dynamic states when the previous FS is NULL
If the previous FS is NULL, some dynamic states still need to be
re-emitted.

Doesn't fix anything known.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23494>
(cherry picked from commit 00968f38ca)
2023-06-15 22:21:26 +01:00
Qiang Yu
d1f7f07fcb ac/nir/ngg: fix ngg_gs_clear_primflags crash
We get current_clear_primflag_idx_var==NULL when stream 0 output
number is known, so output_compile_time_known==true. But we also
need this variable when stream 1~3 output number is unknown or
vertex number is less than a primitive's needs.

Fixes: 60ac5dda82 ("ac: Add NIR lowering for NGG GS.")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23614>
(cherry picked from commit c36e0e3f79)
2023-06-15 22:18:52 +01:00
Mike Blumenkrantz
86aba43272 zink: strip format list when disabling mutable during image creation
drivers shouldn't be getting a format list if it won't be used

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23514>
(cherry picked from commit ff1e667e45)
2023-06-15 22:12:58 +01:00
Mike Blumenkrantz
17663b7111 lavapipe: add version uuid to shader binary validation
this ensures compatible shader binaries across versions

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23636>
(cherry picked from commit 1563aea69f)
2023-06-15 22:12:43 +01:00
Lionel Landwerlin
6cfd019a85 anv: fix incorrect batch for 3DSTATE_CONSTANT_ALL emission
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c950fe97a0 ("anv: implement generated (indexed) indirect draws")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23074>
(cherry picked from commit d7c28e526b)
2023-06-15 22:12:42 +01:00
Lionel Landwerlin
d6d2f3661f anv: disable mesh/task for generated draws
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c950fe97a0 ("anv: implement generated (indexed) indirect draws")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23074>
(cherry picked from commit 0da39bf8ee)
2023-06-15 22:12:42 +01:00
Mike Blumenkrantz
4c443d2115 zink: massively shrink qbo size for timestamp queries
timestamp queries can only ever record a single value, so
the qbo only needs to be large enough for that single value

fixes #9092

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23631>
(cherry picked from commit d032de726a)
2023-06-15 22:12:41 +01:00
Mike Blumenkrantz
f259a7b0c3 lavapipe: use PACKAGE_VERSION for cache uuid in release builds
MESA_GIT_SHA1 is defined as "", which results in invalid access

fixes #7673

Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20520>
(cherry picked from commit c17d0cc488)
2023-06-15 22:11:48 +01:00
Mike Blumenkrantz
8259af094e zink: only try to create srgb mutable images if the vk format is supported
otherwise this is just a regular single-format image

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23626>
(cherry picked from commit 8f56228ace)
2023-06-15 22:11:44 +01:00