platform/upstream/mesa.git
17 months agozink: track depth swizzle on samplerviews
Mike Blumenkrantz [Thu, 5 Jan 2023 21:28:33 +0000 (16:28 -0500)]
zink: track depth swizzle on samplerviews

this will provide info for shader rewrites

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

17 months agozink: add an extra_data param to zink_shader_compile
Mike Blumenkrantz [Thu, 5 Jan 2023 21:27:43 +0000 (16:27 -0500)]
zink: add an extra_data param to zink_shader_compile

this is extra shader key data that can be used in various ways per stage
and is too large to fit into the shader key

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

17 months agozink: break out tex dest rewriting into separate function
Mike Blumenkrantz [Thu, 5 Jan 2023 18:36:13 +0000 (13:36 -0500)]
zink: break out tex dest rewriting into separate function

no functional changes

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

17 months agozink: flag old-style shadow tex mask for fragment shaders
Mike Blumenkrantz [Thu, 5 Jan 2023 18:32:25 +0000 (13:32 -0500)]
zink: flag old-style shadow tex mask for fragment shaders

this will be useful for handling depth texturing modes

only 32 are tracked now for performance reasons

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

17 months agoradv/winsys: fix incorrect PCIID for GFX11 in the null winsys
Samuel Pitoiset [Mon, 23 Jan 2023 07:58:31 +0000 (08:58 +0100)]
radv/winsys: fix incorrect PCIID for GFX11 in the null winsys

Fixes: bbad550f3d4 ("radv/winsys: fill real info for CHIP_GFX1100")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20850>

17 months agointel/fs: avoid cmod optimization on instruction with different write_mask
Lionel Landwerlin [Mon, 23 Jan 2023 09:58:50 +0000 (11:58 +0200)]
intel/fs: avoid cmod optimization on instruction with different write_mask

I've been running into failures with tests like :

dEQP-VK.robustness.robustness2.bind.notemplate.rgba32i.unroll.nonvolatile.uniform_buffer_dynamic.no_fmt_qual.len_4.samples_1.1d.frag

With the load_global_const_block_intel NIR intrinsic, you can load a
vec8/vec16 with a predicate. The predicate is correctly uniformized to
feed into the SEND instruction's flag register.

The problem is that a series of optimization first remove the
find_live_channel and then changes the broadcast into a simple MOV
instruction, on the assumption that the first channel is always active
if there is not control flow. This is correct.

But after that the cmod optimzation will remove this instruction :

   mov.nz.f0.0(16) null:D, vgrf16+0.0<0>:D NoMask

because it seems to be equivalent to :

   cmp.g.f0.0(16) vgrf16:D, vgrf12:D, 63d

In this case vgrf16 is the predicate to the load block SEND
instruction. Since the execution mask is different between both, some
of the channels of the SEND instruction end up not being loaded or
loaded with the wrong predication and we end up with incorrect UBO
data.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20852>

17 months agoci/piglit: Exclude swapbuffers front-readback tests with PIGLIT_PLATFORM=gbm.
Emma Anholt [Thu, 19 Jan 2023 20:18:58 +0000 (12:18 -0800)]
ci/piglit: Exclude swapbuffers front-readback tests with PIGLIT_PLATFORM=gbm.

These are expected to fail by the design of gbm.  Don't make each driver
track them.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Martin Roukala <martin.roukala@mupuf.org>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20798>

17 months agoci/piglit: Add some common piglit skips for Mesa CI's testing of glx.
Emma Anholt [Tue, 3 Jan 2023 20:25:19 +0000 (12:25 -0800)]
ci/piglit: Add some common piglit skips for Mesa CI's testing of glx.

Since our X servers don't have a compositor, and we run tests in parallel,
various swap and frontbuffer tests won't ever be stable.  Rather than
having every driver have to track those flakes, make a general X11 skips
list as a known issue of our CI rather than pointing fingers at drivers.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Martin Roukala <martin.roukala@mupuf.org>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20798>

17 months agoci: Move PIGLIT_PLATFORM settings out of the .tomls.
Emma Anholt [Thu, 19 Jan 2023 21:20:27 +0000 (13:20 -0800)]
ci: Move PIGLIT_PLATFORM settings out of the .tomls.

I'm going to add some automatic platform-based skips lists shortly (like
all-skips but more targeted), and this avoids needing to add them to each
.toml.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Martin Roukala <martin.roukala@mupuf.org>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Acked-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20798>

17 months agoci/freedreno: Switch the piglit job to using a deqp-runner suite.
Emma Anholt [Tue, 29 Nov 2022 22:15:00 +0000 (14:15 -0800)]
ci/freedreno: Switch the piglit job to using a deqp-runner suite.

This is one of the few remaining piglit-runner.sh users.

I think the notable change here is that we no longer set
EGL_PLATFORM=surfaceless like the piglit-runner.sh script did.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Martin Roukala <martin.roukala@mupuf.org>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20798>

17 months agoci/zink: Clear issue #7781 flakes.
Emma Anholt [Thu, 19 Jan 2023 22:57:36 +0000 (14:57 -0800)]
ci/zink: Clear issue #7781 flakes.

These tests all had valgrind UAF complaints that got fixed with the MR
closing that bug.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Martin Roukala <martin.roukala@mupuf.org>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20798>

17 months agoci/zink: Drop glx-swap-copy xfails.
Emma Anholt [Thu, 19 Jan 2023 20:02:35 +0000 (12:02 -0800)]
ci/zink: Drop glx-swap-copy xfails.

These now skip, since there are no preserved configs any more.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Martin Roukala <martin.roukala@mupuf.org>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20798>

17 months agoci/zink: Drop xfail for copy-sub-buffer.
Emma Anholt [Thu, 19 Jan 2023 19:48:25 +0000 (11:48 -0800)]
ci/zink: Drop xfail for copy-sub-buffer.

This is a skip these days, since the ext isn't supported in the kopper
world.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Martin Roukala <martin.roukala@mupuf.org>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20798>

17 months agoci: Drop windowoverlap xfails, since it's always skipped.
Emma Anholt [Thu, 19 Jan 2023 20:20:50 +0000 (12:20 -0800)]
ci: Drop windowoverlap xfails, since it's always skipped.

e31d08d307d0aa2b2c7441e85f12c7e5deee4bc9 made it a skip, so no need to
track these any more.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Martin Roukala <martin.roukala@mupuf.org>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20798>

17 months agoci/virgl: Disable iris traces for now while it's unstable.
Emma Anholt [Mon, 23 Jan 2023 22:58:25 +0000 (14:58 -0800)]
ci/virgl: Disable iris traces for now while it's unstable.

4 spurious fails today it looks like with the same
"[drm:virtio_gpu_get_capsets] *ERROR* timed out waiting for cap set 0"
signature.  It had started by at least Jan 20.

https://gitlab.freedesktop.org/mesa/mesa/-/jobs/35240569#L2929 (today)

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

17 months agoradv: stop using radv_pipeline_has_stage() in BindPipeline
Mike Blumenkrantz [Tue, 10 Jan 2023 16:04:01 +0000 (11:04 -0500)]
radv: stop using radv_pipeline_has_stage() in BindPipeline

this incurs a small amount of unnecessary cpu overhead as compared to just
checking bitflags

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

17 months agohasvk: check the return value of anv_execbuf_add_bo_bitset()
Paulo Zanoni [Tue, 17 Jan 2023 22:32:19 +0000 (14:32 -0800)]
hasvk: check the return value of anv_execbuf_add_bo_bitset()

This is the Hasvk version of Anv's:
  3d37950fd9dd ("anv: check the return value of anv_execbuf_add_bo_bitset()")

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20800>

17 months agohasvk: don't leave undefined values in exec->syncobj_values
Paulo Zanoni [Tue, 17 Jan 2023 22:28:37 +0000 (14:28 -0800)]
hasvk: don't leave undefined values in exec->syncobj_values

This is the Hasvk version of Anv's:
  ad6a036a6815 ("anv: don't leave undefined values in exec->syncobj_values")

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20800>

17 months agoci: Uprev kernel to 6.1.7
Sergi Blanch Torne [Tue, 3 Jan 2023 15:24:49 +0000 (16:24 +0100)]
ci: Uprev kernel to 6.1.7

Once prepared the archive in gfx-ci/linux for kernel 6.1 pointing to 6.1.7 and
with the patches for mesa, update the link. Also, enable some kconfigs needed
for the Adreno and USB.

One job in AMD required an expectation file to be updated with one test. Also,
an mt8192 device tree has been included in the arm64 trees for lava build.

Co-developed-by: Daniel Stone <daniels@collabora.com>
Co-developed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Co-developed-by: Helen Koike <helen.koike@collabora.com>
Co-developed-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20855>

17 months agoutil/fossilize_db: fix macOS inotify build error
Juston Li [Tue, 17 Jan 2023 20:57:48 +0000 (12:57 -0800)]
util/fossilize_db: fix macOS inotify build error

require <sys/inotify.h> for fossilize_db

Fixes: 3b69b67545b ("util/fossilize_db: add runtime RO foz db loading via FOZ_DBS_DYNAMIC_LIST")

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20755>

17 months agoradeonsi/vcn: check fence before destroying decoder
Boyuan Zhang [Fri, 20 Jan 2023 04:23:56 +0000 (23:23 -0500)]
radeonsi/vcn: check fence before destroying decoder

Add a fence_wait before destroying decoder to make sure destory message has
been processed by firmware.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Sajeesh Sidharthan <sajeesh.sidharthan@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20805>

17 months agoradeonsi/vcn: check fence before destroying dpb
Boyuan Zhang [Fri, 20 Jan 2023 04:22:20 +0000 (23:22 -0500)]
radeonsi/vcn: check fence before destroying dpb

Add a fence_wait before destroying dpb buffer in dpg_unref_list to make sure
previous decode job has been done. (for DPB_DYNAMIC_TIER_2)

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Sajeesh Sidharthan <sajeesh.sidharthan@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20805>

17 months agoRevert "aco: Combine v_cvt_u32_f32 with insert to v_cvt_pk_u8_f32."
Georg Lehmann [Sat, 21 Jan 2023 16:08:03 +0000 (17:08 +0100)]
Revert "aco: Combine v_cvt_u32_f32 with insert to v_cvt_pk_u8_f32."

This reverts commit 6d020540474b43c7e9a3175638bb04be68d80dbb.

v_cvt_pk_u8_f32 returns 0xff instead of v_cvt_u32_f32 & 0xff if the input is
larger than 255.

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

Cc: mesa-stable
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20829>

17 months agozink: update gl43 profile to allow imageRobustAccess
SoroushIMG [Fri, 20 Jan 2023 17:31:53 +0000 (17:31 +0000)]
zink: update gl43 profile to allow imageRobustAccess

Now that zink can use imageRobustAccess and handle txf with invalid LODs,
update the profile to require either VK_EXT_image_robustness or VK_EXT_robustness2.

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

17 months agozink: lower LOD-invalid txf when imageRobustAccess2 is missing
SoroushIMG [Fri, 20 Jan 2023 17:00:56 +0000 (17:00 +0000)]
zink: lower LOD-invalid txf when imageRobustAccess2 is missing

GL robust buffer access applies to texelFetch with out of bounds LODs.
imageRobustAccess2 guarantees this, but imageRobustAccess does not.
Therefore, the txf robustness lowering pass from earlier is used
to provide this guarantee and support ARB/KHR robust_buffer_access_behavior.

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

17 months agozink: add robust_access field to shader key
SoroushIMG [Fri, 20 Jan 2023 16:59:41 +0000 (16:59 +0000)]
zink: add robust_access field to shader key

Since shaders can be shared even between robust and non-robust
contexts, the robustness state needs to be tracked.

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

17 months agozink: add VK_EXT_image_robustness
SoroushIMG [Fri, 20 Jan 2023 16:58:27 +0000 (16:58 +0000)]
zink: add VK_EXT_image_robustness

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

17 months agozink: add zink_cs_key
SoroushIMG [Fri, 20 Jan 2023 16:02:34 +0000 (16:02 +0000)]
zink: add zink_cs_key

Also, add shader key handling to compute programs.
This will be used later on for the rb_image workaround.

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

17 months agozink: add pass checking for lod overflow in txf
SoroushIMG [Thu, 27 Oct 2022 22:39:33 +0000 (23:39 +0100)]
zink: add pass checking for lod overflow in txf

Will be used later to workaround missing robustImageAccess2 along
with robustImageAccess.

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

17 months agozink: use actual swapchain object for surface comparison
Mike Blumenkrantz [Fri, 20 Jan 2023 18:11:37 +0000 (13:11 -0500)]
zink: use actual swapchain object for surface comparison

the outer swapchain object is persistent, which means checking it
will never yield an update after the first check

fixes #8122

Fixes: b2739c9f005 ("zink: set surface->dt when updating swapchain"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20814>

17 months agoaco/tests: update assembler tests for latest LLVM 16
Rhys Perry [Tue, 17 Jan 2023 15:03:32 +0000 (15:03 +0000)]
aco/tests: update assembler tests for latest LLVM 16

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20747>

17 months agoaco/tests: fix assembler.gfx11.vop12c_v128 with LLVM 15
Rhys Perry [Tue, 17 Jan 2023 14:53:44 +0000 (14:53 +0000)]
aco/tests: fix assembler.gfx11.vop12c_v128 with LLVM 15

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8089
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20747>

17 months agoradeonsi: respect smoothing_enabled
Erik Faye-Lund [Fri, 20 Jan 2023 10:39:27 +0000 (11:39 +0100)]
radeonsi: respect smoothing_enabled

When this was last changed, the smoothing_enabled flag seems to have
been forgotten about, breaking line-smoothing (and probably also polygon
smoothing).

Fixes: 4147add280e ("radeonsi: update db_eqaa even if msaa is disabled")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20810>

17 months agov3dv: increase BO allocation size when growing CLs
Iago Toral Quiroga [Thu, 19 Jan 2023 12:40:44 +0000 (13:40 +0100)]
v3dv: increase BO allocation size when growing CLs

This can significantly reduce the number of allocations required
to record large command buffers with thousands of draw calls and
it improves significantly vkoverhead's results.

fps_avg helped:   serious_sam_trace01_1280x720.gfxr:                17.96 -> 18.50 (3.01%)
fps_avg helped:   vehicle-game-2.gfxr:                              9.09 -> 9.33 (2.67%)
fps_avg helped:   ue4_shooter_game_high_quality.gfxr:               17.40 -> 17.66 (1.48%)
fps_avg helped:   ue4_shooter_game_low_quality.gfxr:                25.25 -> 25.61 (1.44%)
fps_avg helped:   ue4_sun_temple.gfxr:                              24.93 -> 25.15 (0.86%)
fps_avg helped:   vkQuake_capture_frames_1_through_1200.gfxr:       52.54 -> 52.95 (0.78%)
fps_avg helped:   rbdoom-3-bfg_capture.gfxr:                        13.87 -> 13.96 (0.69%)
fps_avg helped:   sponza_demo02_800x600.gfxr:                       19.59 -> 19.63 (0.21%)

fps_avg HURT:   ue4_shooter_game_shooting_high_quality.gfxr:      19.14 -> 18.95 (-0.98%)
fps_avg HURT:   sponza_demo01_800x600.gfxr:                       20.03 -> 20 (-0.09%)
fps_avg HURT:   quake3e_capture_frames_1_through_1800.gfxr:       57.34 -> 57.34 (-0.01%)
fps_avg HURT:   serious_sam_trace02_1280x720.gfxr:                38.27 -> 38.27 (-0.01%)

total fps_min in shared programs: 311.74 -> 313.91 (0.69%)
fps_min in affected programs: 311.74 -> 313.91 (0.69%)
helped: 10
HURT: 2

total fps_max in shared programs: 319.54 -> 320.24 (0.22%)
fps_max in affected programs: 319.54 -> 320.24 (0.22%)
helped: 6
HURT: 6

total fps_avg in shared programs: 315.41 -> 317.36 (0.62%)
fps_avg in affected programs: 315.41 -> 317.36 (0.62%)
helped: 8
HURT: 4

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20787>

17 months agov3dv: drop unused field from v3dv_cmd_buffer
Iago Toral Quiroga [Tue, 17 Jan 2023 12:55:34 +0000 (13:55 +0100)]
v3dv: drop unused field from v3dv_cmd_buffer

Not needed since we moved to the common sync framework.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20787>

17 months agoegl/dri2: avoid undefined unlocks
Jonathan Gray [Sun, 15 Jan 2023 02:48:10 +0000 (13:48 +1100)]
egl/dri2: avoid undefined unlocks

unlocks were incorrectly added to paths using dri2_egl_display() as
well as those using dri2_egl_display_lock()

pthread_mutex_unlock() when unlocked is documented by posix as
being undefined behaviour.  On OpenBSD pthread_mutex_unlock() will call
abort(3) if this happens.

Fixes: f1efe037dfd ("egl/dri2: Add display lock")
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20712>

17 months agoci: bump Mold to the 1.10.0
David Heidelberg [Fri, 20 Jan 2023 21:02:45 +0000 (22:02 +0100)]
ci: bump Mold to the 1.10.0

mold 1.9.0 was up to 10% slower than 1.8.0 on some multicore machines. We fixed the performance regression and made it even faster than 1.8.0.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20819>

17 months agoci: Sir trace has small invisible change in rendering
David Heidelberg [Fri, 20 Jan 2023 21:33:30 +0000 (22:33 +0100)]
ci: Sir trace has small invisible change in rendering

Unrelated to MR itself.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20819>

17 months agoradv: add an early out in radv_cmd_buffer_flush_dynamic_state()
Mike Blumenkrantz [Mon, 12 Sep 2022 19:16:32 +0000 (15:16 -0400)]
radv: add an early out in radv_cmd_buffer_flush_dynamic_state()

no point checking all the states if they're known to be unset

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20653>

17 months agov3dv: use common code for descriptor update template
Thomas H.P. Andersen [Thu, 15 Sep 2022 22:50:04 +0000 (00:50 +0200)]
v3dv: use common code for descriptor update template

Use the common code and structs for this. Depends on !14780

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18625>

17 months agoglx: fix a macro being invoked with the wrong parameter name
Adam Stylinski [Sat, 21 Jan 2023 17:51:28 +0000 (12:51 -0500)]
glx: fix a macro being invoked with the wrong parameter name

Strangely, this was somehow compiling with GCC but my futile efforts to
build mesa with msan caused me to find clang refusing to compile because
of this. Unknown how many bugs this could fix or how GCC did manage to
find "config" in scope but it's fairly obvious that this is the correct
parameter that should be used.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20830>

17 months agoradv: Enable extended SAH for shallow BVHs
Konstantin Seurer [Wed, 11 Jan 2023 21:53:53 +0000 (22:53 +0100)]
radv: Enable extended SAH for shallow BVHs

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20656>

17 months agoradv: Wrap internal build type inside a build_config struct
Konstantin Seurer [Wed, 11 Jan 2023 20:46:02 +0000 (21:46 +0100)]
radv: Wrap internal build type inside a build_config struct

This will be useful for finer control over build configurations.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20656>

17 months agoradv: Add a shader variant for PLOC with extended SAH
Konstantin Seurer [Wed, 11 Jan 2023 20:36:31 +0000 (21:36 +0100)]
radv: Add a shader variant for PLOC with extended SAH

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20656>

17 months agoradv/bvh: Add a define for extended SAH
Konstantin Seurer [Wed, 11 Jan 2023 20:28:52 +0000 (21:28 +0100)]
radv/bvh: Add a define for extended SAH

This will be used to only chose depth aware SAH when we know that it's
more optimal and doesn't increase build overhead too much.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20656>

17 months agoradv/bvh/meson: Add the option to set defines
Konstantin Seurer [Wed, 11 Jan 2023 20:22:44 +0000 (21:22 +0100)]
radv/bvh/meson: Add the option to set defines

This is useful for compiling different variants of the same shader.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20656>

17 months agoci: be explicit about the `meson setup` subcommand
Eric Engestrom [Sat, 21 Jan 2023 12:51:27 +0000 (12:51 +0000)]
ci: be explicit about the `meson setup` subcommand

The old way of doing things is deprecated.

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20827>

17 months agor600/sfn: Fix splitting of multislot alu ops
Gert Wollny [Sat, 21 Jan 2023 10:26:55 +0000 (11:26 +0100)]
r600/sfn: Fix splitting of multislot alu ops

The old source must not incorporate the start slot as lookup
index.

Fixes: commit 573448f93cbbeeae22295e7f943c7120598780d4
  r600/sfn: prepare alu split for use of variable length dot

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

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

17 months agor600/sfn: Fix opcode and result dest slot mask for variable size dot
Gert Wollny [Sat, 21 Jan 2023 10:17:58 +0000 (11:17 +0100)]
r600/sfn: Fix opcode and result dest slot mask for variable size dot

Fixes: commit 2df023a1f1990aad6c20eca85af19c7d21a43203
    r600/sfn: pre-evaluate allowed dest mask in Alu instructions

Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8120

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

17 months agoglthread: disallow glthread if buffer uploads are unsupported
Marek Olšák [Sun, 18 Dec 2022 21:44:48 +0000 (16:44 -0500)]
glthread: disallow glthread if buffer uploads are unsupported

to remove fail paths that defeat the purpose of glthread.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>

17 months agoglthread: do vertex uploads if an index buffer is present for MultiDrawElements
Marek Olšák [Sun, 18 Dec 2022 20:56:50 +0000 (15:56 -0500)]
glthread: do vertex uploads if an index buffer is present for MultiDrawElements

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>

17 months agoglthread: remove the vbo_upload_ratio_too_large fallback for glMultiDrawElements
Marek Olšák [Sat, 24 Dec 2022 17:36:49 +0000 (12:36 -0500)]
glthread: remove the vbo_upload_ratio_too_large fallback for glMultiDrawElements

This would be possible to implement, but we don't know of any app where
it would help.

Now glthread fully handles all non-VBO uploads except glDrawIndirect.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>

17 months agoglthread: make marshal functions for glBegin/End attribs non-static
Marek Olšák [Wed, 21 Dec 2022 06:55:46 +0000 (01:55 -0500)]
glthread: make marshal functions for glBegin/End attribs non-static

for a future commit

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>

17 months agoglthread: pack and name the type of glthread_vao::Attrib
Marek Olšák [Wed, 21 Dec 2022 06:48:00 +0000 (01:48 -0500)]
glthread: pack and name the type of glthread_vao::Attrib

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>

17 months agomesa: move gl_vertex_format_user definition into glthread.h
Marek Olšák [Wed, 21 Dec 2022 06:36:51 +0000 (01:36 -0500)]
mesa: move gl_vertex_format_user definition into glthread.h

glthread.h needs it and it can't include mtypes.h because mtypes.h
includes it.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>

17 months agoglthread: do vertex uploads if an index buffer is present for glDrawElements
Marek Olšák [Sun, 18 Dec 2022 20:56:50 +0000 (15:56 -0500)]
glthread: do vertex uploads if an index buffer is present for glDrawElements

glthread didn't implement uploading non-VBO vertices if indices were
in a buffer. This implements that.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>

17 months agoglthread: change multi_draw_elements_async() to never fail due to large size
Marek Olšák [Tue, 13 Dec 2022 04:31:16 +0000 (23:31 -0500)]
glthread: change multi_draw_elements_async() to never fail due to large size

Some callers (not visible here) silently ignore the return value. Remove
the return value and handle the failure in multi_draw_elements_async.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>

17 months agoglthread: execute glMultiDrawArrays(draw_count < 0) asynchronously
Marek Olšák [Tue, 13 Dec 2022 03:30:51 +0000 (22:30 -0500)]
glthread: execute glMultiDrawArrays(draw_count < 0) asynchronously

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>

17 months agoglthread: set GL_OUT_OF_MEMORY if we fail to upload vertices
Marek Olšák [Tue, 17 Jan 2023 19:37:03 +0000 (14:37 -0500)]
glthread: set GL_OUT_OF_MEMORY if we fail to upload vertices

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>

17 months agoglthread: set GL_OUT_OF_MEMORY if we fail to upload indices
Marek Olšák [Tue, 17 Jan 2023 19:37:03 +0000 (14:37 -0500)]
glthread: set GL_OUT_OF_MEMORY if we fail to upload indices

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>

17 months agoglthread: handle GL_*_ARRAY in glEnable/Disable
Marek Olšák [Mon, 26 Dec 2022 19:59:53 +0000 (14:59 -0500)]
glthread: handle GL_*_ARRAY in glEnable/Disable

Surprisingly, the GL compatibility profile allows these in both
glEnableClientState and glEnable.

Fixes: 0b1dd185913 - glthread: track which vertex array attribs are enabled

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>

17 months agoglapi: autogenerate function parameters with no space between * and variable
Marek Olšák [Sun, 18 Dec 2022 23:40:08 +0000 (18:40 -0500)]
glapi: autogenerate function parameters with no space between * and variable

print "int *v" instead of "int * v".

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>

17 months agomesa: allow GL_UNSIGNED_INT64_ARB as vertex format for ARB_bindless_texture
Marek Olšák [Wed, 21 Dec 2022 10:45:51 +0000 (05:45 -0500)]
mesa: allow GL_UNSIGNED_INT64_ARB as vertex format for ARB_bindless_texture

This wasn't implemented, but the spec requires it.

Fixes: 1fe7b1f9724 - mesa: implement ARB_bindless_texture

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>

17 months agoutil: fix util_is_vbo_upload_ratio_too_large
Marek Olšák [Mon, 19 Dec 2022 06:17:13 +0000 (01:17 -0500)]
util: fix util_is_vbo_upload_ratio_too_large

It was wrong. For example, if the draw vertex count was 10 and the upload
vertex count was 150, u_vbuf wouldn't unroll the draw and would instead
memcpy 150 vertices. This fixes that case.

Fixes: 068a3bf0d7c - util: move and adjust the vertex upload heuristic equation from u_vbuf

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20824>

17 months agoglthread: fix an upload buffer leak
Marek Olšák [Fri, 20 Jan 2023 00:57:02 +0000 (19:57 -0500)]
glthread: fix an upload buffer leak

Fixes: befbd54864d29 - glthread: don't use atomics for refcounting to decrease overhead on AMD Zen

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20804>

17 months agoanv: fix preemption enable emission in gpu_memcpy
Lionel Landwerlin [Fri, 20 Jan 2023 07:41:04 +0000 (09:41 +0200)]
anv: fix preemption enable emission in gpu_memcpy

This has to be before the MI_BATCH_BUFFER_END otherwise it has no
effect.

This also was messing around with you batch length alignment.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b9aa66d5d0 ("anv: disable preemption for 3DPRIMITIVE during streamout")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20802>

17 months agoradv: remove redundant type sizing
Mike Blumenkrantz [Thu, 19 Jan 2023 16:31:11 +0000 (11:31 -0500)]
radv: remove redundant type sizing

this is already 8 bits

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20751>

17 months agoradv: add some graphics pipeline hints to optimize pipeline bind
Mike Blumenkrantz [Tue, 17 Jan 2023 15:50:45 +0000 (10:50 -0500)]
radv: add some graphics pipeline hints to optimize pipeline bind

this is a costly function, and we want to avoid loading random struct data
as much as possible

these struct members aren't accessed anywhere else in the function, so eliminating
access avoids some cpu overhead

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20751>

17 months agoradv: simplify depth aspect check in radv_handle_image_transition()
Mike Blumenkrantz [Tue, 17 Jan 2023 15:41:55 +0000 (10:41 -0500)]
radv: simplify depth aspect check in radv_handle_image_transition()

this info is already available, so reduce cpu overhead

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20751>

17 months agoradv: reorder dynamic state checks during bind
Mike Blumenkrantz [Tue, 17 Jan 2023 15:40:49 +0000 (10:40 -0500)]
radv: reorder dynamic state checks during bind

this avoids potential out-of-order reads from a struct that spans
18 CPU cachelines

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20751>

17 months agoradv: repack radv_graphics_pipeline struct
Mike Blumenkrantz [Fri, 13 Jan 2023 17:03:55 +0000 (12:03 -0500)]
radv: repack radv_graphics_pipeline struct

this reduces the number of cachelines used by the struct and allows for
improved memory access

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20751>

17 months agodzn: Support basic subgroups
Jesse Natalie [Wed, 18 Jan 2023 22:15:54 +0000 (14:15 -0800)]
dzn: Support basic subgroups

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

17 months agospirv2dxil: Support basic subgroups
Jesse Natalie [Wed, 18 Jan 2023 22:15:04 +0000 (14:15 -0800)]
spirv2dxil: Support basic subgroups

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

17 months agospirv2dxil: Use 32-bit shared offsets
Jesse Natalie [Wed, 18 Jan 2023 22:14:38 +0000 (14:14 -0800)]
spirv2dxil: Use 32-bit shared offsets

nir_build_deref_var assumes that you're going to do so, and
there's no reason to use 64-bit types for Vulkan compute.

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

17 months agomicrosoft/compiler: Add lowering passes for basic subgroup vars
Jesse Natalie [Wed, 18 Jan 2023 22:13:41 +0000 (14:13 -0800)]
microsoft/compiler: Add lowering passes for basic subgroup vars

DXIL doesn't have a "subgroup ID" or "num subgroups" construct,
so add lowering to construct them. Subgroup ID is done using
once-per-subgroup atomics on a workgroup-shared variable, and
then broadcasting that (using read_first_invocation) to the other
threads. Num subgroups is just a division with the workgroup size.

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

17 months agomicrosoft/compiler: Implement a few basic wave/subgroup intrinsics
Jesse Natalie [Wed, 18 Jan 2023 22:12:03 +0000 (14:12 -0800)]
microsoft/compiler: Implement a few basic wave/subgroup intrinsics

These are the ones that map perfectly between SPIR-V and DXIL that
are in the "basic" extension group (except for read-lane-first,
but we'll use with some lowering shortly).

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

17 months agomicrosoft/compiler: Add an overload param to unary function helpers
Jesse Natalie [Wed, 18 Jan 2023 22:10:25 +0000 (14:10 -0800)]
microsoft/compiler: Add an overload param to unary function helpers

Subgroup ops aren't i32, they use none.

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

17 months agozink: don't use ds3 blend states without color attachments
Mike Blumenkrantz [Thu, 19 Jan 2023 20:35:17 +0000 (15:35 -0500)]
zink: don't use ds3 blend states without color attachments

this is illegal and causes validation errors

cc: mesa-stable

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

17 months agozink: delete need_blend_constants
Mike Blumenkrantz [Thu, 19 Jan 2023 20:22:08 +0000 (15:22 -0500)]
zink: delete need_blend_constants

this is an artifact of very old code before the dynamic state was set
for all graphics pipelines

now the checks only cause blend constants to not be updated, which triggers
bugs and validation failures

cc: mesa-stable

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

17 months agointel/dev: Split hwconfig i915 specific code
José Roberto de Souza [Thu, 22 Sep 2022 18:31:01 +0000 (11:31 -0700)]
intel/dev: Split hwconfig i915 specific code

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20437>

17 months agointel/dev: Move i915 code to i915/intel_device_info.c
José Roberto de Souza [Mon, 22 Aug 2022 18:44:53 +0000 (11:44 -0700)]
intel/dev: Move i915 code to i915/intel_device_info.c

No behavior changes here.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20437>

17 months agointel/dev: Export functions that will be used by different kernel drivers
José Roberto de Souza [Mon, 22 Aug 2022 18:14:36 +0000 (11:14 -0700)]
intel/dev: Export functions that will be used by different kernel drivers

No behavior changes here.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20437>

17 months agoradv: remove an old FIXME about a possible bug with TC-compat HTILE
Samuel Pitoiset [Thu, 19 Jan 2023 09:14:53 +0000 (10:14 +0100)]
radv: remove an old FIXME about a possible bug with TC-compat HTILE

I added this FIXME 2 years ago because it was unclear if it was
broken or not. Since, CTS coverage improved and the number of tests
with depth/stencil on the compute queue increased a lot. vkd3d-proton
also widely uses depth/stencil with GENERAL on GFX10+ and likely with
async compute as well. No issues so far.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4048
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20785>

17 months agofreedreno: Add driconf to disable conservative LRZ
Rob Clark [Mon, 16 Jan 2023 16:35:06 +0000 (08:35 -0800)]
freedreno: Add driconf to disable conservative LRZ

The problematic sequence of draws is pretty rare.  But there are a small
handful of games which do not exhibit the problematic sequence and for
which invalidating LRZ on draws with blend plus depthwrite enabled hurts
performance slightly.  This driconf option enables opting in to the
previous behavior.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20708>

17 months agoutil/xmlconfig: Use os_get_option()
Rob Clark [Mon, 16 Jan 2023 16:38:03 +0000 (08:38 -0800)]
util/xmlconfig: Use os_get_option()

Enable the property_get() fallback on android.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20708>

17 months agoturnip: Invalidate LRZ on blend+depthwrite
Rob Clark [Sat, 14 Jan 2023 19:18:26 +0000 (11:18 -0800)]
turnip: Invalidate LRZ on blend+depthwrite

See the previous commit for details.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20708>

17 months agoturnip: Rename lrz force_disable_mask
Rob Clark [Tue, 17 Jan 2023 16:41:54 +0000 (08:41 -0800)]
turnip: Rename lrz force_disable_mask

Prep to use it to communicate more than just force-disable cases.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20708>

17 months agofreedreno/a6xx: Invalidate LRZ on blend+depthwrite
Rob Clark [Sat, 14 Jan 2023 18:17:53 +0000 (10:17 -0800)]
freedreno/a6xx: Invalidate LRZ on blend+depthwrite

Writing depth with blend enabled means we need to invalidate LRZ,
because the written depth value could mean that a later draw with
depth enabled (where we would otherwise write LRZ) could have
fragments which don't pass the depth test due to this draw.  For
example, consider this sequence of draws, with depth mode GREATER:

  draw A:
    z=0.1, fragments pass
  draw B:
    z=0.4, fragments pass
    blend enabled (LRZ write disabled)
    depth write enabled
  draw C:
    z=0.2, fragments don't pass
    blend disabled
    depth write enabled

Normally looking at the state in draw C, we'd assume we could
enable LRZ write.  But this would cause early-z/lrz to discard
fragments from draw A which should be visible due to draw B.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8065
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20708>

17 months agofreedreno/a6xx: Add LRZ perf warn for ztest direction changes
Rob Clark [Sat, 14 Jan 2023 18:16:36 +0000 (10:16 -0800)]
freedreno/a6xx: Add LRZ perf warn for ztest direction changes

Add a perf warning when LRZ invalidate happens due to depth test
direction reversal.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20708>

17 months agogallium/util: Add util_writes_depth() helper
Rob Clark [Sat, 14 Jan 2023 17:31:54 +0000 (09:31 -0800)]
gallium/util: Add util_writes_depth() helper

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20708>

17 months agoradeonsi: report 0 block size for Polaris HEVC encoding
Rose Hudson [Sun, 15 Jan 2023 12:20:07 +0000 (12:20 +0000)]
radeonsi: report 0 block size for Polaris HEVC encoding

makes encoded videos resemble the input again :)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7992
Fixes: c4482a3c1a9 ("radeonsi/vcn: enable multi-slice encoding")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20714>

17 months agoradv: Make NGG query emission a dirty flag.
Timur Kristóf [Tue, 10 Jan 2023 22:39:42 +0000 (23:39 +0100)]
radv: Make NGG query emission a dirty flag.

Don't emit the NGG query user SGPR if its state doesn't change.
Based on original work by Mike Blumenkrantz.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18819>

17 months agoiris: add restrictions for 3DSTATE_RASTER::AntiAliasingEnable
Tapani Pälli [Thu, 12 Jan 2023 12:17:12 +0000 (14:17 +0200)]
iris: add restrictions for 3DSTATE_RASTER::AntiAliasingEnable

Field must be disabled if any render targets have integer
format, additionally for Gfx12+ field must be disabled when
num multisamples > 1 or forced multisample count > 1.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7892
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20671>

17 months agohasvk: add restrictions for 3DSTATE_RASTER::AntiAliasingEnable
Tapani Pälli [Fri, 13 Jan 2023 13:52:00 +0000 (15:52 +0200)]
hasvk: add restrictions for 3DSTATE_RASTER::AntiAliasingEnable

Field must be disabled if any render targets have integer format.

Cc: mesa-stable
Signed-off-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/20671>

17 months agoanv: add restrictions for 3DSTATE_RASTER::AntiAliasingEnable
Tapani Pälli [Thu, 12 Jan 2023 16:33:25 +0000 (18:33 +0200)]
anv: add restrictions for 3DSTATE_RASTER::AntiAliasingEnable

Field must be disabled if any render targets have integer
format, additionally for Gfx12+ field must be disabled when
num multisamples > 1 or forced multisample count > 1.

Cc: mesa-stable
Signed-off-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/20671>

17 months agoradv: advertise extendedDynamicState3ColorBlendEquation
Samuel Pitoiset [Thu, 24 Nov 2022 15:01:45 +0000 (16:01 +0100)]
radv: advertise extendedDynamicState3ColorBlendEquation

This enables full ds3 support with Zink!

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20281>

17 months agoradv: fix detecting that blend is enabled when all CB states are dynamic
Samuel Pitoiset [Fri, 9 Dec 2022 10:16:53 +0000 (11:16 +0100)]
radv: fix detecting that blend is enabled when all CB states are dynamic

It's allowed to be NULL.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20281>

17 months agoradv: enable compiling PS epilogs on-demand for dynamic color blend equations
Samuel Pitoiset [Tue, 10 Jan 2023 09:48:01 +0000 (10:48 +0100)]
radv: enable compiling PS epilogs on-demand for dynamic color blend equations

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20281>

17 months agoradv: add support for dynamic blend equation
Samuel Pitoiset [Fri, 6 Jan 2023 14:29:44 +0000 (15:29 +0100)]
radv: add support for dynamic blend equation

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20281>

17 months agoradv: add a new helper for normalizing blend factors
Samuel Pitoiset [Wed, 18 Jan 2023 07:25:54 +0000 (08:25 +0100)]
radv: add a new helper for normalizing blend factors

It will be also used when compiling PS epilogs on-demand.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20281>