Just use nir_def_bits_used() instead of the manually written conditions.
These are gathered from bits of load_scalar_arg(vs_state_bits):
- uses_vs_state_indexed
- uses_gs_state_provoking_vtx_first
- uses_gs_state_outprim
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
This is a step towards gathering shader info from shader variants instead of
input NIR.
uses_fbfetch_output can be ignored because it's already lowered to image
loads.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
It shouldn't affect uses_vmem_load_other because divergent descriptors
are loaded with SMEM in waterfall loops.
Also all this removed code is highly questionable. Indirect access doesn't
matter for anything. Divergent access does, and that's handled correctly.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
r600 is the only driver using this functionality, so let's move it there.
There's a few functions we used that aren't available outside of
u_blitter.c, but it turns out these aren't really needed. The first one
is blitter_check_saved_vertex_states(), that one just verifies that
certain states are saved as they should be. It's a bit sad to lose these
checks, but they are currently always passing, so nothing should break
by dropping them right now.
The second one is blitter_disable_render_cond(), and this one is also OK
to drop, because r600 never calls util_blitter_save_render_condition()
in the first place.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34954>
This is just a hint as far as I can tell. We're allowed to ignore it (as we do),
we just shouldn't be warning about it.
This quiets piles of annoying SPIR-V warnings when running CTS.
SPIR-V WARNING:
In file ../src/compiler/spirv/vtn_cfg.c:144
Function parameter Decoration not handled: SpvDecorationFPFastMathMode
1340 bytes into the SPIR-V binary
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34909>
for specifiers like %v4f, we need to store the whole vector. u_printf can
already handle this from OpenCL, we just need to match that here.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34909>
ls_sb_slot is unused now in cs_tracing_ctx and cs_exception_handler_ctx.
Let's remove it.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34808>
This commit adds automatic insertion of WAIT instructions based
on the already existing cs_load_store_tracker.
Dependencies through memory need to be handled manually by the
user using the cs_flush_[loads/stores] functions.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34808>
Also remove pending_stores check from cs_dst_tuple.
This is not required as the staging regs are read synchronously.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34808>
This commit moves cs_load_store_tracker from the cs_builder_conf
to cs_builder and makes it no longer optional to supply.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34808>
The indirect CSD job is added to the list of jobs when the device do not
support CPU queues. Otherwise it is not added, which means the job is
not free when the command buffer frees all the resources, generating a
leak.
This fixes this leak by identifying the job that contains the indirect
CSD job, and freeing it before freeing the job itself.
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/34892>
REQ_RES is a quite expensive operation, so calling it before and after
each RUN-command slows down RUN-command heavy workloads.
This commit moves REQ_RES calls to subqueue_init.
Reviewed-by: John Anthony <john.anthony@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33512>
Progression logic is deprecated since v11 (removed on v14) and
we don't plan to use it.
This removes all PROGRESS_* helper in cs_builder.h.
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34947>
Progression logic is deprecated since v11 and we don't plan to use it.
Let's get ride of all increment logic on all instructions.
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34947>
This commit moves boilerplate code surrounding NIR flags in a common
NAK_AS_U32 macro. The code only checks that the flag structure
has only 32 bits and then copies it into a 32-bit int.
Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34940>
Evergreen and cayman have the hardware support for this extension.
This is described by the manual as EXPORT_RAT_INST_INC_UINT_RTN
and EXPORT_RAT_INST_DEC_UINT_RTN.
This change was tested and passes the piglit tests (17/17)
on cypress, palm and cayman.
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34501>
'X4.exe' is the executable. But there is also a script 'X4' that is used to
launch the game. This script is what steam uses.
This updates driconf to match that.
This also brings the executable in line with other configs for the game.
Fixes: 5532f13566 ("driconf: override vendor id for X4 Foundations on NVK")
Fixes: 8654a7727f ("driconf: set vk_zero_vram driconf for X4 Foundations")
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34168>
This optimization used to optimize the allocated space for descriptors
when immutable samplers are equal. Though, this was basically broken :
- descriptor copies were broken for combiner image sampler (or sampler)
with equal immutable samplers because 96 bytes were copied instead of
64 bytes (cf. the linked ticket). This could be fixed but it's not
worth it.
- the value returned by vkGetDescriptorLayoutSupport() was broken, it
should have been 96 with no immutable samplers (or when they aren't
equal)
This optimization was also not applied for descriptor buffers which is
the default for vkd3d-proton and Zink. DXVK doesn't use db but it
doesn't use immutable samplers, so basically only native vulkan games
would be concerned.
Note that immutable samplers would still be inlined in shaders if no
indirect access which should be 99.9% of the usecase.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11165
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34928>
In a scenario where the viewports/scissors are a dynamic state but the
count is static (ie. updated when a graphics pipeline is bound), the
driver wasn't considering that and it was re-emitting the previous
number of viewports/scissors.
This fixes rendering issue with Blender.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13127
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34921>