Descriptor prefetches may be generated for instructions in control flow.
This means we cannot simply emit prefetches at the end of the preamble
because that may not be dominated by all their sources. This commit uses
the helpers introduced by e7ac1094f6 ("ir3: rematerialize preamble defs
in block dominated by sources") to find the correct block to insert
prefetches.
Fixes NIR validation errors in Dying Light 2.
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 4e2a0a5ad0 ("ir3: Add descriptor prefetching optimization on a7xx")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36885>
Some inputs is per vertex while vertex pipeline, and per primitive
when mesh pipeline. Put these inputs after other inputs to share
the same fragment shader code for two pipelines.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36749>
../src/compiler/glsl/ast_function.cpp
..\src\util/u_cpu_detect.h(168): error C2220: the following warning is treated as an error
..\src\util/u_cpu_detect.h(168): warning C4197: 'uint32_t *volatile ': top-level volatile in cast is ignored
[325/1703] Compiling C++ object src/compiler/glsl/libglsl.a.p/builtin_functions.cpp.obj
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36863>
As on Windows, all DLLs are exported use def files, there is no need do __declspec(dllexport) on the function marker.
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36863>
v3d_bo_set_reference, v3d_bo_unreference_locked_timed and
v3d_wait_seqno functions available since first v3d commit
45bb8f2957 ("broadcom: Add V3D 3.3 gallium driver called "vc5",
for BCM7268.") are not used since the beginning or since the
removal of its usage at 85f26828fe ("broadcom: only support
v42 and v71") and b225cdcecc ("broadcom/vc5: Update the UABI
for in/out syncobjs").
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36012>
Name the register, which is actually an array, and initialize it
programmatically using the same table as the per-primitive case. This
should produce the same value as the old hardcoded constant.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36892>
We had an extra 16 entries in the VK-to-HW table that were clearly
unnecessary because Vulkan does not allow values greater than 16 for the
primitive shading rate. This appears to be an extra debug/test thing
added by the blob. Similarly there were unused entries in the HW-to-VK
table that shouldn't be necessary. Delete them.
The HW-to-VK table was also inconsistent about whether invalid values
should be 0 or 11, fix that too.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36892>
This is allowed by the specification, as the following VUIDs state:
VUID-vkCmdResolveImage-srcImage-04446
If dstImage is of type VK_IMAGE_TYPE_3D, then for each element of
pRegions, srcSubresource.layerCount must be 1
VUID-vkCmdResolveImage-srcImage-04447
If dstImage is of type VK_IMAGE_TYPE_3D, then for each element of
pRegions, dstSubresource.baseArrayLayer must be 0 and
dstSubresource.layerCount must be 1
New tests coming for it: dEQP-VK.pipeline.*.multisample.3d.*
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36895>
st_finalize_nir() only affects:
* sampling
* uniforms
* shader images
if a nir pass doesn't affect one of these three things or does not
yield progresss, then there is no need to call this
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36879>
It's emitted as part of the MSAA state but re-emitting the NGG culling
state isn't necessary because ps.reads_fully_covered isn't used.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36875>
Like RADV_CMD_DIRTY_CB_RENDER_STATE is dirty when the custom blend mode
is updated. Shouldn't fix anything in practice because dynamic_states
is unlikely 0 but better that way.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36875>
A tu_bo object can be in the process of being dumped during queue submit
while also being destroyed on a separate thread. During destruction, tu_bo
should be removed from the device's dump_bo_list before unmapping, this
way the mapping of any given tu_bo won't disappear while it's being dumped.
Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36904>
These ops require more than three source values that could result
in readport conflicts, so check the readport configuration
before issuing alu operations and inject copy operations
when conflicts are identified.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36860>
When checking the readport config for a number of sources that
would be used in a multi-slot instruction, then return the index
of the source for which readport allocation fails.
With that we can later add a mov instruction to change the source
channels configuration.
In addition pass a std::array instead of a C-array to make the interface
more c++-like and prepare for the next patch.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36860>
This has gotten complicated enough that we need somewhere outside of the
driver itself to give an overall flow of how the feature is implemented.
This includes a few things that are enabled in the subsequent commits,
specifically the LRZ parts.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36475>