Enable VK_EXT_rasterization_order_attachment_access and
VK_ARM_rasterization_order_attachment_access for PAN_ARCH >= 10.
All three feature flags are enabled: color, depth, and stencil
rasterization order attachment access.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40675>
When rasterization order attachment access flags are set, disable Forward
Pixel Kill for color and force ZS tile buffer reads for depth/stencil.
This ensures fragment shader reads see results from all previously
submitted fragments in rasterization order.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40675>
Copy rasterization_order_access from vk_graphics_pipeline_state to
vk_dynamic_graphics_state during vk_dynamic_graphics_state_fill().
This makes the flags accessible at draw time for drivers.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40675>
Extract VK_EXT_rasterization_order_attachment_access pipeline create flags
from VkPipelineColorBlendStateCreateInfo::flags and
VkPipelineDepthStencilStateCreateInfo::flags into a new
rasterization_order_access field on vk_graphics_pipeline_state.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40675>
If explicit DGC preprocess is used and emitted in a separate command
buffer, ACE must wait for the DGC prepare shader to be finished before
using it, otherwise it might just read invalid packets from the IB.
Because it's not possible to know if explicit DGC preprocess was
recorded in a separate cmdbuf, the only way to fix it is to make sure
that any compute dispatches are synchronized if task shaders are used.
This fixes random "Illegal opcode in command stream" issues
reported by AMDGPU with test_amplification_shader_execute_indirect_state
from vkd3d-proton.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42293>
The BOP event should be after pending cache flushes are emitted in the
GFX CS, otherwise the ACE CS might start too early and that could
cause some random synchronization issues.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42293>
The UBO special case checked I->seg before checking the instruction
message, but atomics store I->atom_opc in the same union field. Since
BI_ATOM_OPC_AUMIN aliases BI_SEG_UBO, AUMIN atomics were skipped from
memory dependency tracking.
Only apply the UBO special case to load/store instructions so atomics are
serialized correctly.
Fixes test:
KHR-GLES31.core.shader_image_load_store.basic-allTargets-atomicCS.
Fixes: 41b39d6d5d ("pan/va: Do scoreboard analysis")
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42266>
v3d_launch_grid() created the job before reading the indirect
dispatch parameters, so the zero-workgroup early-out returned without
freeing it. Create the job only once the dispatch is known to proceed,
right before its first use, so the skip path has nothing to free.
Signed-off-by: JaeHoon Lee <dlwognsdc610@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42169>
v3d_disk_cache_retrieve() returns without freeing the buffer
returned by disk_cache_get() when the blob reader overruns.
Signed-off-by: JaeHoon Lee <dlwognsdc610@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42169>
v3d_render_blit() copies untiled sources into a tiled temporary
before checking if the blitter supports the operation. The
unsupported path returned without releasing the temporary like the
regular path does at the end of the blit.
Signed-off-by: JaeHoon Lee <dlwognsdc610@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42169>
v3d_create_sampler_view() takes a reference on the texture before
setting up the view, but the shadow resource error path frees the
view without releasing it. Release the reference before bailing so
the texture reference count stays balanced.
Signed-off-by: JaeHoon Lee <dlwognsdc610@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42169>
This can reuse most of the implementation done for cmd_draw_rects, just
that the layer count needs to be passed correctly to RUN_FULLSCREEN.
Tested-by: Marc Alcala Prieto <marc.alcalaprieto@arm.com>
Reviewed-by: Aksel Hjerpbakk <aksel.hjerpbakk@arm.com>
Reviewed-by: Marc Alcala Prieto <marc.alcalaprieto@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41732>
This implements a new function that will be used for the vk_meta paths
that call cmd_draw_rects.
Tested-by: Marc Alcala Prieto <marc.alcalaprieto@arm.com>
Reviewed-by: Aksel Hjerpbakk <aksel.hjerpbakk@arm.com>
Reviewed-by: Marc Alcala Prieto <marc.alcalaprieto@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41732>
These changes aim to make it easier to reuse this code for implementing
a cmd_draw_rects PanVK specific function that will use RUN_FULLSCREEN.
For this we need to setup the dcd a bit differently and having separate
build functions helps a lot since we mostly want to skip checking the
dirty state and moving values into registers that are done in the
prepare_draw functions.
Tested-by: Marc Alcala Prieto <marc.alcalaprieto@arm.com>
Reviewed-by: Aksel Hjerpbakk <aksel.hjerpbakk@arm.com>
Reviewed-by: Marc Alcala Prieto <marc.alcalaprieto@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41732>
For V14, the view mask is moved to Primitive Flags 2. Instead we have a
layer index flag in Primitive Flags but this was missed during the
initial support for V14.
Fixes: 4258888f4d ("pan/genxml: Add v14 definition")
Tested-by: Marc Alcala Prieto <marc.alcalaprieto@arm.com>
Reviewed-by: Aksel Hjerpbakk <aksel.hjerpbakk@arm.com>
Reviewed-by: Marc Alcala Prieto <marc.alcalaprieto@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41732>
This can happen when the scheduler moves a reduce operation after the last
position export in legacy VS.
It also doesn't make sense to break here. In ancient aco history null exports
were added in the assembler just before the last exec write, but we no longer
do that.
Cc: mesa-stable
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42290>
In some cases INTEL_DEBUG=hex was not working. It was getting a
failure from gen_scan_raw_layout() if the program had been padded by a
compact nop instruction.
We add this pad instruction to make the program end on an uncompacted
instruction boundary. (Perhaps this padding is not necessary.)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42144>