Alyssa Rosenzweig [Tue, 19 Apr 2022 17:02:30 +0000 (13:02 -0400)]
pan/bi: Simplify bi_propagate_pass_flags
Worklist-based dataflow analysis is overkill, we can just do DFS.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16045>
Alyssa Rosenzweig [Sat, 23 Apr 2022 17:31:54 +0000 (13:31 -0400)]
meson: Ignore unused variables in release builds
Variables that are only used for assertions are considered unused in release
builds. Don't treat this as an error, since we build with -Werror even for
release in CI. This causes reasonable code to build and pass tests locally (and
therefore to be queued for merge by reasonable developers), but later fail in CI
due to a variable used only as an assertion. This pattern is common enough we
have an ASSERTED macro to workaround the behaviour, but failing a CI run to
have the author go back and add in the ASSERTED and re-queue later is a recipe
for frustration, wasted time, and wasted CI bandwidth.
Disable this behaviour to reduce CI friction.
In my view, sprinkling in ASSERTED clutters the code, rather than helps; I find
CI's insistence on doing so actively counterproductive. Developers are free to
continue doing so after this change. But this way CI won't fail merge requests
over it. After all, CI enforces policy, and we shouldn't have "mark variables
only used for assertions as ASSERTED" as policy. Let's pick our battles wisely
and improve CI's signal-to-noise ratio.
As an added benefit, this eliminates a class of defects where ASSERTED is used
incorrectly, e.g:
c91e3c6a428 ("util: Should not use ASSERTED in util_thread_get_time_nano")
3e22fc27af9 ("zink: remove incorrect ASSERTED macro")
0d08ce287bf ("pan/bi: Remove dated ASSERTED properties")
Note that actual unused variables will be caught by debug builds. It is expected
that developers do debug builds locally before ramming code through CI, so that
should be caught.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Suggested-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Acked-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15582>
Marek Olšák [Tue, 19 Apr 2022 18:43:56 +0000 (14:43 -0400)]
ac/gpu_info: remove old and unused fields from radeon_info
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15966>
Marek Olšák [Sat, 2 Apr 2022 04:45:24 +0000 (00:45 -0400)]
ac,radeonsi: rework how scratch_waves is used and move it to ac_gpu_info.c
The addition of the "compute" parameter is for a future change.
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15966>
Marek Olšák [Fri, 15 Apr 2022 06:16:07 +0000 (02:16 -0400)]
ac/llvm: rename tbuffer -> buffer where tbuffer instructions are not generated
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15966>
Marek Olšák [Fri, 15 Apr 2022 06:00:55 +0000 (02:00 -0400)]
ac/llvm: don't use tbuffer_store as a fallback for swizzled stores
This depends on the offset computation fix from:
"ac/llvm: remove inst_offset parameter from ac_build_buffer_store_dword"
v2: The instruction type is changed to MUBUF, which requires us to clear
DATA_FORMAT with ADD_TID_ENABLE.
Reviewed-by: Mihai Preda <mhpreda@gmail.com> (v1)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15966>
Marek Olšák [Fri, 15 Apr 2022 05:31:53 +0000 (01:31 -0400)]
ac/llvm: remove unused code from ac_llvm_build.c/h
One forward declaration didn't have an implementation.
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15966>
Marek Olšák [Fri, 15 Apr 2022 05:30:15 +0000 (01:30 -0400)]
ac/llvm: remove immoffset parameter from ac_build_tbuffer_load_byte/short
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15966>
Marek Olšák [Fri, 15 Apr 2022 05:25:32 +0000 (01:25 -0400)]
ac/llvm: remove inst_offset parameter from ac_build_buffer_load
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15966>
Marek Olšák [Fri, 15 Apr 2022 05:18:44 +0000 (01:18 -0400)]
ac/llvm: use soffset correctly in ac_build_buffer_load
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15966>
Marek Olšák [Fri, 15 Apr 2022 05:08:16 +0000 (01:08 -0400)]
ac/llvm: remove inst_offset parameter from ac_build_buffer_store_dword
There was a bug that inst_offset was added to soffset in one codepath and
to voffset in all other codepaths. The correct behavior is to add it
to voffset.
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15966>
Marek Olšák [Fri, 15 Apr 2022 04:11:10 +0000 (00:11 -0400)]
ac/llvm: remove immoffset parameter from ac_build_tbuffer_load
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15966>
Marek Olšák [Fri, 15 Apr 2022 04:05:33 +0000 (00:05 -0400)]
ac/llvm: remove immoffset parameter from ac_build_tbuffer_store
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15966>
Marek Olšák [Tue, 22 Mar 2022 13:02:14 +0000 (09:02 -0400)]
ac/llvm: add AC_WAIT_EXP for ac_build_waitcnt
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15966>
Marek Olšák [Tue, 22 Mar 2022 13:07:20 +0000 (09:07 -0400)]
ac: add more non-shadowed registers to the lists
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15966>
Marek Olšák [Tue, 22 Mar 2022 13:17:03 +0000 (09:17 -0400)]
ac/surface/tests: generalize and extend gfx10 tests
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15966>
Marek Olšák [Thu, 10 Mar 2022 22:43:04 +0000 (17:43 -0500)]
amd: document chips
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15966>
Marek Olšák [Mon, 27 Dec 2021 00:12:17 +0000 (19:12 -0500)]
ac/llvm: remove LLVM pass ac_optimize_vs_outputs
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14414>
Marek Olšák [Mon, 13 Dec 2021 01:50:58 +0000 (20:50 -0500)]
radeonsi: assign param export indices before compilation
This moves the logic out of LLVM-specific codepaths.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14414>
Marek Olšák [Mon, 13 Dec 2021 02:20:09 +0000 (21:20 -0500)]
ac: add ac_nir_optimize_outputs, a NIR version of ac_optimize_vs_outputs
ac_optimize_vs_outputs is an LLVM IR pass, and it will be replaced by this.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14414>
Marek Olšák [Tue, 4 Jan 2022 19:41:46 +0000 (14:41 -0500)]
radeonsi: move si_shader_info::stage into si_shader_selector
This will help me see all places where we use "info", which will
be moved from si_shader_selector to shader variants.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14414>
Marek Olšák [Tue, 4 Jan 2022 18:34:16 +0000 (13:34 -0500)]
radeonsi: move most "info" fields from si_shader_selector into si_shader_info
It's where they should be, and future commits might require this.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14414>
Marek Olšák [Mon, 20 Dec 2021 01:10:03 +0000 (20:10 -0500)]
radeonsi: gather pipe_stream_output_info from NIR intrinsics
This stops pipe_stream_output_info from create_*s_state context functions
because NIR contains everything and can do more advanced shader linking
this way.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14414>
Marek Olšák [Mon, 13 Dec 2021 04:38:21 +0000 (23:38 -0500)]
radeonsi: apply key.ge.opt.kill_{outputs,pointsize,clipdistance} in NIR
This may be needed by ACO, but it doesn't do anything for LLVM yet other
than making the initial LLVM IR smaller.
It will be needed by a future commit, which rewrites ac_optimize_vs_outputs
in NIR, which relies on NIR matching the shader key.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14414>
Marek Olšák [Tue, 4 Jan 2022 14:03:04 +0000 (09:03 -0500)]
radeonsi: use nir_shader_get_entrypoint in si_nir_scan_shader
The typecast is needed because nir is const.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14414>
Marek Olšák [Mon, 3 Jan 2022 04:55:25 +0000 (23:55 -0500)]
radeonsi: add pipe_stream_output_info into si_shader_context
to reduce deltas for the next commit
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14414>
Marek Olšák [Sun, 2 Jan 2022 04:03:23 +0000 (23:03 -0500)]
radeonsi: scalarize IO instructions
The next commit will rely on this.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14414>
Marek Olšák [Mon, 3 Jan 2022 08:40:02 +0000 (03:40 -0500)]
radeonsi: run nir_io_add_const_offset_to_base for TES/TCS as late optimizations
Other stages don't have indirect indexing, so it's always const.
Doing it here should also remove dead load_const instructions.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14414>
Lionel Landwerlin [Fri, 22 Apr 2022 13:59:17 +0000 (16:59 +0300)]
anv: fix INTEL_DEBUG=sync
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
3684012770b2 ("anv: implement DEBUG_SYNC")
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16101>
Marek Olšák [Fri, 11 Mar 2022 06:40:32 +0000 (01:40 -0500)]
radeonsi: ignore AMD_DEBUG=nodcc if the texture is imported
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15965>
Marek Olšák [Mon, 11 Apr 2022 01:12:37 +0000 (21:12 -0400)]
radeonsi: dump shaders after si_shader_binary_upload to fix printed LDS stat
lds_size is set by si_shader_binary_upload, so it always printed zero.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15965>
Marek Olšák [Mon, 11 Apr 2022 01:08:00 +0000 (21:08 -0400)]
radeonsi: don't treat skipped GS copy shader compilation as successful
We don't expect the GS copy shader to ever use the scratch buffer,
so we just don't compile the shader, but the problem is we set ok to
true anyway.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15965>
Marek Olšák [Tue, 22 Mar 2022 09:08:35 +0000 (05:08 -0400)]
radeonsi: handle an out-of-bounds sampler/image index better
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15965>
Marek Olšák [Tue, 22 Mar 2022 07:15:01 +0000 (03:15 -0400)]
radeonsi: fix ALPHA_IS_ON_MSB determination
based on PAL
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15965>
Marek Olšák [Tue, 22 Mar 2022 06:13:20 +0000 (02:13 -0400)]
radeonsi: initialize line stipple config registers
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15965>
Marek Olšák [Tue, 22 Mar 2022 06:12:45 +0000 (02:12 -0400)]
radeonsi: set PA_SC_EDGERULE according to bottom_edge_rule state
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15965>
Marek Olšák [Tue, 22 Mar 2022 06:11:16 +0000 (02:11 -0400)]
radeonsi: add an SQTT workaround for chips with disabled RBs
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15965>
Marek Olšák [Mon, 21 Mar 2022 12:11:05 +0000 (08:11 -0400)]
radeonsi: don't compile monolithic PS for dual source blending
The code was compiling monolithic PS if a shader output didn't
have a color buffer, but dual src blending never has a color buffer
for mrt1.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15965>
Marek Olšák [Tue, 22 Mar 2022 13:03:37 +0000 (09:03 -0400)]
radeonsi: set more state bits for disabled binning
based on PAL
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15965>
Boris Brezillon [Fri, 22 Apr 2022 18:01:00 +0000 (11:01 -0700)]
dzn: Fix the STATIC_ASSERT() in dzn_meta_blits_get_context()
We care about the object key size, not the size of a pointer.
Fixes:
a012b219640 ("microsoft: Initial vulkan-on-12 driver")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16109>
Boris Brezillon [Fri, 22 Apr 2022 17:57:42 +0000 (10:57 -0700)]
dzn: Pass the dzn_event pointer to _mesa_hash_table_insert()
The key is supposed to be the dzn_event pointer, not the VkEvent
object, even if they do match in practice on 64bit builds.
Fixes:
a012b219640 ("microsoft: Initial vulkan-on-12 driver")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16109>
Boris Brezillon [Fri, 22 Apr 2022 17:55:55 +0000 (10:55 -0700)]
dzn: Add missing VKAPI_{ATTR,CALL} specifiers to BeginCommandBuffer()
Fixes:
a012b219640 ("microsoft: Initial vulkan-on-12 driver")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16109>
David Heidelberg [Fri, 15 Apr 2022 19:46:58 +0000 (21:46 +0200)]
ci: skqp: upgrade to skqp based on Android CTS 11.0 (r7)
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15987>
David Heidelberg [Fri, 15 Apr 2022 21:41:58 +0000 (23:41 +0200)]
ci: skqp: patch skqp to report also GL results
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15987>
Jason Ekstrand [Mon, 4 Oct 2021 19:24:57 +0000 (14:24 -0500)]
anv: Clean up pipeline cache helpers a bit
Instead of having two different helpers, delete the pipeline_cache ones.
Also, instead of manually handling the cache == NULL case in every
vkCreateFooPipelines call, handle it inside the helpers. This means
that BLORP can use them too by passing cache=NULL.
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13184>
Jason Ekstrand [Mon, 4 Oct 2021 18:38:19 +0000 (13:38 -0500)]
anv: Switch to the new common pipeline cache
This patch is intended to be somewhat minimal. There's a lot of cleanup
work that can be done but we'll leave that to later patches.
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13184>
Jason Ekstrand [Mon, 4 Oct 2021 19:13:33 +0000 (14:13 -0500)]
anv: Rename a fail label in CreateDevice
The rest of them are labeled with the thing they need to destroy first,
not the thing that failed.
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13184>
Jason Ekstrand [Mon, 4 Oct 2021 20:14:29 +0000 (15:14 -0500)]
vulkan/pipeline_cache: Add helpers for storing NIR in the cache
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13184>
Jason Ekstrand [Sat, 2 Oct 2021 08:38:28 +0000 (03:38 -0500)]
vulkan: Add a common VkPipelineCache implementation
This is partly copied+pasted from ANV but is mostly new code with lots
of reference counting bugs fixed (I hope!). The new cache caches
"object" which derive from a base vk_pipeline_class_object struct. It
uses a kernel-style "ops" interface for virtual methods on these objects
to allow for easy destruction (when the reference count hits zero) as
well as serialization an deserialization interfaces. This should allow
drivers to cache basically whatever they want without having to think
too hard about the details.
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13184>
Jason Ekstrand [Mon, 4 Oct 2021 21:36:23 +0000 (16:36 -0500)]
util/set: Respect found in search_or_add_pre_hashed
Fixes:
491e7decad0f "util/set: add the found param to search_or_add"
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13184>
Jason Ekstrand [Mon, 4 Oct 2021 16:58:33 +0000 (11:58 -0500)]
util/blob: Add align helpers
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13184>
Marek Olšák [Fri, 22 Apr 2022 06:16:23 +0000 (02:16 -0400)]
ac/surface: fix an addrlib race condition on gfx9
Addrlib calls GetMetaEquation, which generates and saves address equations
in a global table that is not thread safe.
Fixes:
df2cbdd2e32 - amd/addrlib: expose DCC address equations to drivers
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6361
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16091>
Marek Olšák [Fri, 22 Apr 2022 05:35:45 +0000 (01:35 -0400)]
nir: fix an uninitialized variable valgrind warning in nir_group_loads
pass_flags is only initialized for grouped loads, so change the order
Fixes:
33b4eb149ea - nir: add new SSA instruction scheduler grouping loads into indirection groups
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16090>
Pierre-Eric Pelloux-Prayer [Wed, 20 Apr 2022 09:09:40 +0000 (11:09 +0200)]
ac/surface: adjust gfx9.pitch[*] based on surf->blk_w
This is the same as
8275dc1ed57, but since gfx9.pitch[...] is
used for linear surfaces since
86262b6eac0 we need to update
it as well.
Fixes:
86262b6eac0 ("radeonsi,radv: fix usages of surf_pitch")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16053>
Dylan Baker [Wed, 16 Mar 2022 20:12:09 +0000 (13:12 -0700)]
util: remove simple_list
Down to two invasive linked list implementations in Mesa!
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15418>
Dylan Baker [Wed, 16 Mar 2022 20:10:46 +0000 (13:10 -0700)]
llvmpipe: replace uses of simple_list.h with list.h
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15418>
Dylan Baker [Wed, 16 Mar 2022 21:17:07 +0000 (14:17 -0700)]
llvmpipe: cleanup trailing whitespace
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15418>
Dylan Baker [Tue, 22 Feb 2022 20:07:51 +0000 (12:07 -0800)]
gallium/draw: use list.h instead of simple_list.h
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15418>
Dylan Baker [Wed, 16 Mar 2022 21:15:04 +0000 (14:15 -0700)]
gallium/draw: remove trailing whitespace
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15418>
Dylan Baker [Wed, 16 Feb 2022 22:55:51 +0000 (14:55 -0800)]
gallium/util/u_cache: replace simple_list.h with list.h
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15418>
Dylan Baker [Wed, 16 Mar 2022 21:12:33 +0000 (14:12 -0700)]
gallium/util/u_cache.c: remove trailing whitespace
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15418>
Dylan Baker [Wed, 16 Mar 2022 18:19:49 +0000 (11:19 -0700)]
util/list.h: add a function to move an item in a list
This allows for a 1:1 replacement of simple_list move_to_head (though
I've tried to make this function more generally useful.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15418>
Dylan Baker [Wed, 16 Feb 2022 22:46:42 +0000 (14:46 -0800)]
gallium/driver_trace: remove simple_list.h
Which isn't actually used
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15418>
Dylan Baker [Wed, 16 Feb 2022 22:45:43 +0000 (14:45 -0800)]
gallium/rbug: replace simple_list.h with list.h
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15418>
Dylan Baker [Wed, 16 Feb 2022 22:26:09 +0000 (14:26 -0800)]
r300: remove unused simple_list.h
It's unused, so let's not include it.
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15418>
Dylan Baker [Wed, 16 Feb 2022 22:25:07 +0000 (14:25 -0800)]
winsys/radeon: remove unused simple_list.h
It's not used, so let's not include it.
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15418>
Mike Blumenkrantz [Wed, 20 Apr 2022 19:53:35 +0000 (15:53 -0400)]
zink: add synchronization for buffer clears
cc: mesa-stable
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16098>
Mike Blumenkrantz [Thu, 21 Apr 2022 14:09:34 +0000 (10:09 -0400)]
zink: fix stride=0 for dynamic state vertex stride checking
this case shouldn't trigger the fully-baked fallback since it's
legal with dynamic state
Fixes:
1eada1b02d3 ("zink: selectively disable dynamic vertex stride")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16098>
Illia Abernikhin [Mon, 4 Apr 2022 13:37:28 +0000 (16:37 +0300)]
vulkan/runtime: repair thread safety in method vk_queue_start_submit_thread()
Accessing queue->submit.thread_run without holding lock vk_queue.submit.mutex.
Elsewhere, vk_queue.submit.thread_run is accessed with vk_queue.mutex
held 1 out of 2 times (1 of these accesses strongly imply that it is necessary).
Found by Coverity.
CID: 1503334
Signed-off-by: Illia Abernikhin <illia.abernikhin@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15736>
Pierre-Eric Pelloux-Prayer [Tue, 29 Mar 2022 11:43:39 +0000 (13:43 +0200)]
ac/spm: setup write broadcasting correctly
Based on PAL's PerfExperiment::BuildGrbmGfxIndex method.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15646>
Pierre-Eric Pelloux-Prayer [Tue, 29 Mar 2022 08:23:40 +0000 (10:23 +0200)]
radeonsi: make sure profile_peak is used before using sqtt
Using sqtt without this profile can cause hangs.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15646>
Pierre-Eric Pelloux-Prayer [Tue, 29 Mar 2022 12:37:01 +0000 (14:37 +0200)]
radeonsi/sqtt: enable spm counters on gfx10+
Tested on:
- navi10: L0 cache counter doesn't work (always 0)
- sienna_cichlid: L0 doesn't work (always 0) and L1 isn't visible in RGP
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15646>
Pierre-Eric Pelloux-Prayer [Tue, 29 Mar 2022 12:36:26 +0000 (14:36 +0200)]
radeonsi/sqtt: setup spm bo
The hardware will write SPM counters to this bo.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15646>
Pierre-Eric Pelloux-Prayer [Tue, 29 Mar 2022 12:30:53 +0000 (14:30 +0200)]
radeonsi: add spm counters setup code
Based on radv_spm.c and PAL.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15646>
Pierre-Eric Pelloux-Prayer [Tue, 29 Mar 2022 12:14:34 +0000 (14:14 +0200)]
radeonsi: add helpers to deal with spm counters
Based on radv_perfcounter.c
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15646>
Pierre-Eric Pelloux-Prayer [Tue, 29 Mar 2022 12:13:30 +0000 (14:13 +0200)]
radeonsi: make si_pc_emit_shaders non static
Also pass "cs" as a param to allow updating a specific cs.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15646>
Boris Brezillon [Thu, 7 Apr 2022 13:49:00 +0000 (06:49 -0700)]
dzn: Add KHR_draw_indirect_count support
Unfortunately it's not as simple as passing the indirect draw count
buffer to ExecuteIndirect. The compute job that populate the execute
buffer also needs to know the number of entries that need to be
patched. Instead of transitioning the indirect count buffer from
GENERIC_READ to INDIRECT_ARGUMENT we just keep at as a read-only
resource and copy the draw_count value to the exec buffer in the
compute job.
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15914>
Boris Brezillon [Wed, 6 Apr 2022 16:25:54 +0000 (18:25 +0200)]
dzn: Allow multiDrawIndirect and drawIndirectFirstInstance
Those are already supported, let's just toggle the switch.
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15914>
Juan A. Suarez Romero [Thu, 21 Apr 2022 14:26:39 +0000 (16:26 +0200)]
v3dv: duplicate key on hashtable insert
The key is created on stack, so as soon as the function returns this key
is lost, so the inserted key in the hashtable is invalid.
Rather, insert a duplicated version on heap.
This fixes a stack-buffer-overflow when running some Vulkan CTS tests.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16083>
Juan A. Suarez Romero [Thu, 21 Apr 2022 07:49:07 +0000 (09:49 +0200)]
gallium: move get_canonical_format hook to pipe_screen
pipe_context shouldn't have functions that return values because this
prevent multithreading.
Move this hook to pipe_screen.
Fixes:
606e42027e6 ("gallium: add hook on getting canonical format")
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16078>
Boris Brezillon [Wed, 20 Apr 2022 09:45:33 +0000 (02:45 -0700)]
dzn: Get rid of the render pass logic
The core provides generic render-pass -> dynamic-rendering wrappers,
so let's rely on them instead of implementing our own logic.
Suggested-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15913>
Boris Brezillon [Tue, 12 Apr 2022 13:01:10 +0000 (15:01 +0200)]
dzn: Add support for dynamic rendering
This is how D3D12 works, so nothing really complicated here. We just
add a bunch of states to the render state, patch the pipeline building
logic to support dynamic rendering, and add new functions to
Suggested-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15913>
Boris Brezillon [Wed, 20 Apr 2022 08:56:44 +0000 (10:56 +0200)]
dzn: Inline dzn_cmd_buffer_clear_attachments()
It's only called from dzn_CmdClearAttachments(), so let's move the
code there.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15913>
Boris Brezillon [Wed, 20 Apr 2022 08:36:10 +0000 (01:36 -0700)]
dzn: Move all render-related states to a substruct
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15913>
Boris Brezillon [Wed, 20 Apr 2022 08:23:58 +0000 (10:23 +0200)]
dzn: Set MAX_RTS to D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT
D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT == 8, so no functional change
here, it's just cleaner to use the D3D12 definition.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15913>
Boris Brezillon [Wed, 20 Apr 2022 08:12:06 +0000 (10:12 +0200)]
dzn: Pass an image view to dzn_cmd_buffer_clear_attachment()
Let the caller extract the image view from the attachment index, so
we can make this function framebuffer-agnostic and re-use it in the
dynamic rendering path.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15913>
Boris Brezillon [Wed, 6 Apr 2022 16:25:20 +0000 (18:25 +0200)]
dzn: Advertise KHR_shader_draw_parameters
We already pass those parameters to shaders, so let's advertise the
feature.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15912>
Boris Brezillon [Wed, 6 Apr 2022 16:23:37 +0000 (18:23 +0200)]
dzn: Update the draw_id sysval when issuing indirect draws
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15912>
Boris Brezillon [Wed, 6 Apr 2022 15:30:33 +0000 (17:30 +0200)]
dzn: Simplify the triangle_fan_rewrite_index shader
We don't need the first_vertex argument when turning non-indexed
triangle-fan draws into indexed triangle-list ones, the firstVertex
argument can simply be passed as a vertexOffset.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15912>
Boris Brezillon [Wed, 6 Apr 2022 15:25:14 +0000 (17:25 +0200)]
dzn: Fix exec_buf_stride calculation
The stride depends on the indirect draw arguments which are different if
triangle-fan emulation is required.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15912>
Boris Brezillon [Wed, 6 Apr 2022 08:24:33 +0000 (01:24 -0700)]
microsoft/spirv_to_dxil: Add a draw_id field to vertex_runtime_data
So we can support the draw_id system value.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15912>
Samuel Pitoiset [Thu, 21 Apr 2022 10:41:27 +0000 (12:41 +0200)]
radv: only apply enable_mrt_output_nan_fixup for 32-bit float MRTs
This is incorrect for 32-bit integer MRTs which are clamped to the
maximum value of the format, and returning 0 can break some shaders.
This fixes a rendering issue with RAGE2.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4329
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16080>
Dylan Baker [Fri, 22 Apr 2022 04:32:46 +0000 (21:32 -0700)]
docs: update calendar for 22.1.0-rc2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16089>
Dylan Baker [Fri, 22 Apr 2022 04:32:45 +0000 (21:32 -0700)]
docs: update calendar for 22.1.0-rc1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16089>
Dylan Baker [Fri, 22 Apr 2022 04:31:58 +0000 (21:31 -0700)]
docs: update calendar and link releases notes for 22.0.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16089>
Dylan Baker [Fri, 22 Apr 2022 04:31:09 +0000 (21:31 -0700)]
docs: Add sha256sums for 22.0.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16089>
Dylan Baker [Fri, 22 Apr 2022 04:03:38 +0000 (21:03 -0700)]
docs: add release notes for 22.0.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16089>
Mike Blumenkrantz [Fri, 15 Apr 2022 13:58:58 +0000 (09:58 -0400)]
zink: fix memory_barrier intrinsic
matching glsang behavior here
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15959>
Mike Blumenkrantz [Fri, 15 Apr 2022 13:58:48 +0000 (09:58 -0400)]
zink: always use vk mem model for shaders if available
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15959>
Mike Blumenkrantz [Thu, 14 Apr 2022 18:30:21 +0000 (14:30 -0400)]
zink: use vulkan memory model shader semantics for tcs barriers
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15959>