Yogesh Mohan Marimuthu [Thu, 1 Dec 2022 09:29:34 +0000 (14:59 +0530)]
egl: add render_gpu tag to dri2_dpy->fd and dri2_dpy->dri_screen variable
v1: add render_gpu_tag (Pierre-Eric)
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
Yogesh Mohanmarimuthu [Wed, 20 Oct 2021 14:48:05 +0000 (20:18 +0530)]
egl/wayland: for prime, allocate linear_copy from display GPU VRAM
Allocates VRAM in display GPU in case of prime. Then the dma_buf is imported
into prime GPU.
v4: add image tag to __DRIimage (Marek Olšák)
v3: move display fd opening to separate commit (Pierre-Eric)
image_format_to_fourcc() non-static to seperate commit (Pierre-Eric)
v2: close query fds after linear_copy buffer import (Marek Olšák)
use image_format_to_fourcc() from loader_dri3_helper.c (Marek Olšák)
Signed-off-by: Yogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
Yogesh Mohanmarimuthu [Mon, 22 Nov 2021 14:25:41 +0000 (19:55 +0530)]
loader: make image_format_to_fourcc() non-static
the image_format_to_fourcc() function will be used from
egl/wayland hence make it non-static. Also move the function
into loader_dri_helper.c from loader_dri3_helper.c since
loader_dri3_helper library depends on xcb which will make
egl wayland depend on xcb indirectly.
v2: add loader tag to extern image_format_to_fourcc() (Marek Olšák)
V3: move image_format_to_fourcc to loader_dri_helper.c
Signed-off-by: Yogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
Yogesh Mohanmarimuthu [Mon, 22 Nov 2021 13:15:18 +0000 (18:45 +0530)]
egl/wayland: keep display fd open for prime
Keep the display fd open for creating DRI screen on display gpu in
case of prime.
Signed-off-by: Yogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
Yogesh Mohanmarimuthu [Mon, 18 Oct 2021 16:14:25 +0000 (21:44 +0530)]
loader,glx,egl/x11: init dri_screen_display_gpu in struct loader_dri3_drawable
Initialize dri_screendisplay_gpu variable in struct laoder_dri3_drawable.
Also make dri_screen_display_gpu variable as input parameter to function
loader_dri3_drawable_init() since dri_screen variable is initialized this way.
This also helps to avoid duplicate initializing dri_screen_display_gpu
in glx and egl code.
Signed-off-by: Yogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
Yogesh Mohanmarimuthu [Mon, 18 Oct 2021 04:22:16 +0000 (09:52 +0530)]
egl: create DRI screen for display GPU in case of prime
The created DRI screen can be used to allocate VRAM memory from
display GPU in case of prime.
v2: remove extra whitespace (Marek Olšák)
Signed-off-by: Yogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
Yogesh Mohanmarimuthu [Mon, 22 Nov 2021 15:34:53 +0000 (21:04 +0530)]
egl,egl/x11: keep display fd open for prime
Keep the display fd open for creating DRI screen on display gpu in
case of prime. Also close the fd opened in dri2_display_destroy()
Signed-off-by: Yogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
Yogesh Mohanmarimuthu [Sun, 17 Oct 2021 16:54:10 +0000 (22:24 +0530)]
egl: add fd_display_gpu to struct dri2_egl_display
fd opened on display gpu is saved in fd_display_gpu. It is later used
to create dri screen on display gpu.
Signed-off-by: Yogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
Tapani Pälli [Mon, 23 Jan 2023 08:57:20 +0000 (10:57 +0200)]
intel/genxml: set unused 3DSTATE_PS_EXTRA field as mbz
Wa_14015360517 mentions situations where HW produces invalid
occlusion query results when "Pixel Shader Does not write to RT"
bit is set.
"When Pixel Shader Kills Pixel is set, SW must perform a dummy render
target write from the shader and not set this bit, so that Occlusion
Query is correct."
Another situation is when writing to UAV or to NULL render target.
Patch sets field as 'must be zero' to discourage possible use of it.
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/20849>
Tapani Pälli [Thu, 12 Jan 2023 09:52:16 +0000 (11:52 +0200)]
mesa: move component bits queries as GL ES only
These enums have been removed/deprecated long time ago from desktop
GL. Here we remove them from modern GL while still allow for compat
contexts (~old apps). This change matches proprietary drivers and makes
our behaviour same within CTS with some tests.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20719>
Iago Toral Quiroga [Tue, 24 Jan 2023 07:24:49 +0000 (08:24 +0100)]
v3dv: ensure we allocate at least the requested space for a CL
While we are already ensuring we allocate at least 8192 bytes should
this not be the first allocation and our allocations are typically just
a few bytes, multilayered framebuffers with large numbers of layers may
require more space than that in a single allocation.
Fixes:
3325950648 ('v3dv: increase BO allocation size when growing CLs')
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20871>
Mike Blumenkrantz [Fri, 20 Jan 2023 19:53:32 +0000 (14:53 -0500)]
mesa: (more) correctly handle incomplete depth textures
according to GL spec, incomplete shadow samplers should return 0
this is technically possible for drivers to do using a RGBA texture in
the sense that somehow it's been working, but it's broken at the gallium-level
for what drivers should be expecting to see in such circumstances given
that such scenarios have been binding a RGBA texture to use with shadow samplers
instead, we can give drivers a fallback Z32 texture to avoid format/sampler
mismatches and complying with expected behavior
see also KHR-GL46.incomplete_texture_access.sampler for driver-specific testing
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20817>
Mike Blumenkrantz [Fri, 20 Jan 2023 19:52:21 +0000 (14:52 -0500)]
mesa: populate gl_program::ShadowSamplers mask from shader data
this data is already processed, it just isn't being propagated for whatever reason
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20817>
Mike Blumenkrantz [Fri, 20 Jan 2023 18:58:52 +0000 (13:58 -0500)]
mesa: remove dead parameter doc for _mesa_new_texture_object()
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20817>
Mike Blumenkrantz [Thu, 5 Jan 2023 21:49:23 +0000 (16:49 -0500)]
zink: pass depth swizzle data block to shader compile
with everything now hooked up, this should fix all related test failures
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20598>
Mike Blumenkrantz [Wed, 4 Jan 2023 20:24:24 +0000 (15:24 -0500)]
zink: remove old depth swizzle workaround
this is already handled in match_tex_dests(), so it does nothing here
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20598>
Mike Blumenkrantz [Fri, 6 Jan 2023 15:38:22 +0000 (10:38 -0500)]
zink: create another samplerview for shadow textures
when doing legacy depth texture mode sampling, it's necessary to keep
another view that has the right (R in component 0) swizzle so that depth
values can actually be returned in cases where it would otherwise be
a constant value due to swizzling
this also allows zink_sampler_view::shadow_needs_shader_swizzle to be removed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20598>
Mike Blumenkrantz [Thu, 5 Jan 2023 21:43:08 +0000 (16:43 -0500)]
zink: plug in the program/module parts of shadow texture mode emulation
this is clunky because of how big the swizzle data block is,
but the gist of it is the data block is stored onto the shader module key
after all the other data, and then it gets manually hashed/compared in
relevant cases
it's gross, but so is this functionality
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20598>
Mike Blumenkrantz [Thu, 5 Jan 2023 21:39:08 +0000 (16:39 -0500)]
zink: block pipeline fast-pathing for any programs using depth texture modes
the data for this is too big to compress into a shader key, so these pipelines
will always consume more cpu
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20598>
Mike Blumenkrantz [Thu, 5 Jan 2023 21:36:30 +0000 (16:36 -0500)]
zink: rework depth sampler splatting in shaders
this enables passing a zink_fs_shadow_key to the compiler to manually
apply a swizzle other than R/R/R/R to depth texture results
currently no data is passed, so the previous splatting behavior is preserved
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20598>
Mike Blumenkrantz [Thu, 5 Jan 2023 21:34:18 +0000 (16:34 -0500)]
zink: add a fs shader key member to indicate depth texturing mode
this does nothing now besides track the data
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20598>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>