Even when FDM isn't enabled, we can still emit patchpoints and duplicate
the viewport per-view or per-layer because the pipeline may include
VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT.
Before 25202d3e47 ("tu: Remove fdm argument from tu6_emit_tile_select")
we just silently skipped applying those patchpoints, but now we actually
apply them which means we need to re-emit viewport and scissor for
subsequent render passes.
Fixes: 25202d3e47 ("tu: Remove fdm argument from tu6_emit_tile_select")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39965>
There were 2 issues in the commit being fixed :
1. loading from the wrong surface state
2. not being able to have the optimization passes cleanup the
nir_vector_extract()
We fix the first issue by reusing the nir_vector_extract() pattern in
the broken places.
We fix the second issue by reworking the internal vec4 format we use
for passing around descriptor information. In particular we put the
set in its own component so that it can be easily optimized and the
vector extraction constant folded.
Fixes: e94cb92cb0 ("anv: use internal surface state on Gfx12.5+ to access descriptor buffers")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40076>
This test has been reported failing by Mesa CI at 8f4de30d.
However it was seen passing and randomly failing in manual
testing, so mark it as a flake.
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Simon Perretta <simon.perretta@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40117>
These don't really fit in pan_texture anymore, so move them to a
separate pan_buffer-file.
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39294>
The function pan_emit_bview_surface_with_stride is only used by
pan_buffer_texture_emit, which cannot use ASTC compressed formats
(already disabled in the format list).
As well as dropping this functionality, also inline the static function
in its only caller.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39294>
Vivante hardware exhibits floating-point interpolation inconsistencies
at the diagonal seam when the blitter uses a two-triangle quad for scaled
NEAREST blits. Enable the single-triangle blitter mode to match the
proprietary driver's approach of using one oversized triangle
clipped by scissor.
Fixes dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag_*
Fixes dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_*
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39973>
When the blitter draws a textured quad using two triangles, the
interpolation at the diagonal seam between triangles can produce
slightly different texture coordinates for the same pixel position.
For NEAREST filtering this causes inconsistent texel selection at the
seam boundary, failing dEQP-GLES3 nearest_consistency_* tests.
V3D already works around a similar issue by reordering triangle indices
(use_index_buffer), but Vivante GPUs requires a stronger fix: drawing a
single oversized triangle and relying on scissor to clip to the actual
destination rectangle. This matches the approach used by Vivante's
proprietary driver.
Add a new use_single_triangle flag to blitter_context that drivers can
opt-in.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39973>
Quantization maps cannot work with cu_qp_delta_enabled = 1, and VCN1 is
unlikely to ever support it.
See 1dda9d56cb ("radv/video: Disable rate control modes for H265 encode on VCN1")
for additional details.
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40052>
Originally, I thought I could get away with not doing this because we
were sizing up the framebuffer boundary to include the superblocks.
However, that's not actually good enough because it's not just about
when we do a clear. It's actually required for AFBC writes to work
properly with small tiles.
Fixes: 6a56d35705 ("pan/fb: Fill out our own descriptors")
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39324>
When the the tile size is not a multiple of a superblock for the given
render target, there's a potential race condition between the write at
the end of one tile and reads in some other tile where the reads may
access a superblock in a partially updated state. If the tile size is a
multiple of a superblock, this shouldn't happen because no superblock is
ever used by more than one tile. But for small tiles, this can happen.
The hardware provides us an escape hatch: the reverse_issue_order bit.
This bit comes with a bit of a performance cost but it's necessary to
ensure rendering correctness.
Fixes: 6a56d35705 ("pan/fb: Fill out our own descriptors")
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39324>
Every time we need to adjust what goes to these helpers, it's a giant
pain because of all the function prototypes and the mode table. Just
put everything in a struct and pass that around.
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39324>
VK_IMAGE_LAYOUT_PREINITIALIZED is only well defined for linear images
in Vulkan, and linear images can't have DCC. So, this was dead code.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40070>
Dependencies in UNDEFs were already not propagated by
update_inst_scoreboard(), since the instruction there
was not consider neither ordered or unordered; and also
not being used to resolve implicit dependencies.
The generator was already ignoring any baked dependency
but for cases where UNDEF had two dependencies, a sync nop
would be generated -- which would be redundant with a
later sync nop.
Since we know UNDEFs have no dependencies, stop treating
them specially when trimming dependencies.
This patch remove this particular class of redundant sync nops.
No functional change is expected.
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39875>