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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Samuel Pitoiset [Fri, 25 Nov 2022 08:08:08 +0000 (09:08 +0100)]
radv: move some color blend helpers to radv_private.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20281>
Martin Roukala (né Peres) [Fri, 20 Jan 2023 07:45:58 +0000 (09:45 +0200)]
zink/ci: add spec@!opengl 1.1@line-smooth-stipple to the fails list
Fixes:
a8d2b288eee3 ("ci/piglit: 2023-01-19 uprev")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20807>
Rohan Garg [Wed, 18 Jan 2023 15:00:24 +0000 (16:00 +0100)]
iris: Don't flush the render cache for a compute batch
Make sure we comply with BSpec and ensure that certain flush flags
are not set for compute batches
Signed-off-by: Rohan Garg's avatarRohan Garg <rohan.garg@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15664>
Danylo Piliaiev [Thu, 19 Jan 2023 18:59:24 +0000 (19:59 +0100)]
tu/kgsl: do not use kgsl_command_object::offset
offset field in kgsl_command_object is NOT used by KGSL, so
we should offset directly to iova.
Fixes weird hangs on KGSL. E.g. fixes the hang in:
dEQP-VK.memory.pipeline_barrier.transfer_dst_storage_texel_buffer.1024
cc: mesa-stable
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20795>
Iván Briano [Thu, 19 Jan 2023 23:23:56 +0000 (15:23 -0800)]
anv: uncompressed views of compressed 3d images are now valid
There was a VUID-VkImageViewCreateInfo-image-04739 in the Vulkan 1.3
spec that said:
If image was created with the
VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT flag and format is a
non-compressed format, viewType must not be VK_IMAGE_VIEW_TYPE_3D
That VUID has since been removed, and when a view of a 3D image is
created, with put the depth into the array_len, so it won't be always 1.
Reviewed-by: Mark Janes <markjanes@swizzler.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20803>
Tatsuyuki Ishi [Sat, 14 Jan 2023 09:30:32 +0000 (18:30 +0900)]
radv: Fix depth-only-with-discard when epilogs are used.
For a depth-only-with-discard pipeline, spi_shader_col_format needs to be
fixed up to a single channel export, or otherwise discard will not work.
Since col_format can change depending on the dynamic state, precompute the
need for this workaround on pipeline creation and apply it when emitting
prolog states.
Fixes:
eb07a11b8f4 ("radv: add support for compiling PS epilogs on-demand")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20704>
Thomas H.P. Andersen [Wed, 18 Jan 2023 21:56:39 +0000 (22:56 +0100)]
meson: use sections in summary()
Makes the list easier to read
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12161>
Thomas H.P. Andersen [Mon, 2 Aug 2021 00:10:11 +0000 (02:10 +0200)]
meson: use summary()
Make use of mesons summary() to create and align the configuration
summary.
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12161>
Jesse Natalie [Thu, 19 Jan 2023 00:31:02 +0000 (16:31 -0800)]
dzn: Rework meta blit VS
Some D3D12 drivers, like my PC's AMD driver, don't like using a
dynamic index to load from a constant buffer that's bound via
root constants. Instead, just go ahead and load the full set of
vertex data and just bcsel which one to use.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20778>
Jesse Natalie [Thu, 19 Jan 2023 00:30:23 +0000 (16:30 -0800)]
dzn: Delete an unnecessary assert
As far as I can tell, having multiple levels in the view for a
color target just means to target the first one.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20778>
Jesse Natalie [Thu, 19 Jan 2023 00:29:52 +0000 (16:29 -0800)]
dzn: Enable independent blending
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20778>
David Heidelberg [Thu, 19 Jan 2023 15:09:13 +0000 (16:09 +0100)]
ci: bump ci-fairy with session support (robust downloads)
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20788>
David Heidelberg [Thu, 19 Jan 2023 14:10:23 +0000 (15:10 +0100)]
ci/piglit: 2023-01-19 uprev
Emergency uprev to get robustness against http 50x errors for traces.
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20788>
David Heidelberg [Wed, 18 Jan 2023 23:26:03 +0000 (00:26 +0100)]
ci: migrate from wget to curl
Better error handling is more reliable.
Options:
-L, follow location
--retry, number of retries
--retry-all-errors, does not fail on ALL errors, that's why there is -f
-f, fail fast with no output at all on server errors
--retry-delay, make curl sleep this amount of time before each retry
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20788>
David Heidelberg [Thu, 19 Jan 2023 16:37:14 +0000 (17:37 +0100)]
ci/piglit: explicitely define we want GLX tests
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20788>
Dylan Baker [Tue, 17 Jan 2023 18:11:13 +0000 (10:11 -0800)]
meson: use the same workaround for setting 'lib' on windows
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20752>
Dylan Baker [Tue, 17 Jan 2023 18:09:18 +0000 (10:09 -0800)]
meson: use [] instead of 'lib for !windows name_prefix
This is a poorly documented value that uses the default value, but
doesn't emit a warning. In the future Meson will fix this.
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20752>
Dylan Baker [Tue, 17 Jan 2023 17:50:26 +0000 (09:50 -0800)]
meson: use builtin support for reading version from a file
In meson 0.57 support was added for reading a version from a file to
meson natively, so we don't need this workaround anymore.
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20752>
Dylan Baker [Tue, 17 Jan 2023 17:46:41 +0000 (09:46 -0800)]
meson: remove version checks for < 0.59
Which is now required, so these are useless
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20752>
Jesse Natalie [Wed, 11 Jan 2023 21:09:49 +0000 (13:09 -0800)]
dzn: Enable multiview
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20650>
Jesse Natalie [Wed, 11 Jan 2023 19:03:20 +0000 (11:03 -0800)]
dzn: Implement multiview queries
This is a weird way to do queries, but in multiview, each query
takes up N slots, where N is the number of views. D3D doesn't do
it that way, and only has one result, which fortunately is a valid
way to do Vulkan queries. We just need to take care to zero out
the other view results, and make sure they get "signaled" when
the cmdbuf is submitted.
Note that it is invalid in D3D to use ResolveQueryData on query
slots that have never actually been begun/ended, so we zero out
the data by copying zeroes into the buffer. This probably could
be optimized but oh well.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20650>