with a sequence like this:
glClear(STENCIL)
glBeginTransformFeedback()
...
glEndTransformFeedback()
glClear(STENCIL)
The second clear sometimes may produce an unexpected result.
Calling si_flush_gfx_cs() when doing ngg -> legacy transition seems to be a
valid workaround (both for the synthetic reproducer and the real Blender bug).
Using flush flags or events (BOTTOM_OF_PIPE_TS, RESET_TO_LOWEST_VGT) didn't help.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2941
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7750>
When the VAAPI deinterlacing filter is chained with other VAAPI
post-processing filters, the image might get deinterlaced multiple
times, as the filters after the deinterlacing filter might still see an
interlaced buffer.
Signed-off-by: Thong Thai <thong.thai@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6803>
Updates the height of the blitting parameter to use the actual image
height instead of the buffer height, otherwise when scaling, garbage
lines are shown in the output.
Signed-off-by: Thong Thai <thong.thai@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6803>
Z32_S8X24 variants are actually stored in 2 planes (one per component),
we have to adjust the bytes_per_pixel value accordingly.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7653>
So we don't have to calculate it again when we create a texture or
framebuffer descriptor.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7653>
If we don't do that we end up with DATA_INVALID faults when accessing
3D textures on Bifrost.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7653>
Those are two different things, and the fact that Midgard use the same
offset in the texture descriptor for both things is just an
implementation detail.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7653>
I don't know if we have tests for MRT + MSAA but that would hit this.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7653>
It works fine, and without it, the lowering bloats GLES2 shaders (by a
factor of 20x for one shader on t-rex!)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7615>
If valgrind is installed, these components need to find valgrind.h.
Fixes: 53f7d539cd ("util: Add helgrind support for simple_mtx")
Closes: #3876
Acked-by: Rob Clark <robclark@freedesktop.org>
Vulkan can't scale while resolving using vkCmdResolveImage. For this we
need to use util_blitter.
The reason this wasn't a problem in the past, was that glBlitFramebuffer
always set pipe_blit_info::render_condition_enable, and we always used
that to bail out to util_blitter. When the latter changed, this broke.
Fixes: 19906022e2 ("zink: more accurately track supported blits")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7745>
These pass CTS, but I think are missing some stuff CTS doesn't test.
This is one of the base Vulkan 1.0 features and I'd like to support
it for conformance.
Cc: "20.3" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7705>
8 seems more correct, however it fixes a bunch of explict lod
tests but breaks some lod query tests.
Cc: "20.3" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7705>
This also needs another lines fix, but at least align the code
with tri and points
Cc: "20.3" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7705>
Fixes one case in
dEQP-VK.rasterization.primitives_multisample_4_bit.no_stipple.points
Cc: "20.3" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7705>
You have to count the stats pre-culling here.
Just like dc261cdd42 did for lines.
VK-GL-CTS dEQP-VK.query_pool.statistics_query.clipping_primitives*point_list
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7705>
Fixes:
dEQP-VK.wsi.xcb.swapchain.acquire.too_many
Cc: "20.3" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7705>
I'd only half ported private memory support, finish the job.
Cc: "20.3" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7705>
Until recently, we ended up using u_blitter here, because
info->render_condition_enable was always true here. But when we recently
fixed that overly broad check, this broke.
So let's fix layered-resolves, by actually checking if the resource has
layers respect them in that case, similar to what we do in blit_native.
Fixes: 19906022e2 ("zink: more accurately track supported blits")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3843
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7737>
The warning is a bit misleading about where it shows up.. it complains
about the shader key, due to shader key being calculated from (among
other things) stream_output state that had some uninitialized garbage
in the padding.
==84572== Uninitialised byte(s) found during client check request
==84572== at 0x60548E8: blob_write_bytes (blob.c:163)
==84572== by 0x6534EF7: compute_variant_key (ir3_disk_cache.c:111)
==84572== by 0x6535143: ir3_disk_cache_retrieve (ir3_disk_cache.c:171)
==84572== by 0x654D82F: create_variant (ir3_shader.c:251)
==84572== by 0x654DA2B: ir3_shader_get_variant (ir3_shader.c:301)
==84572== by 0x645B2CB: ir3_shader_variant (ir3_gallium.c:113)
==84572== by 0x645B7EB: ir3_shader_create (ir3_gallium.c:219)
==84572== by 0x645BAA7: ir3_shader_state_create (ir3_gallium.c:285)
==84572== by 0x6506003: fd6_shader_state_create (fd6_program.c:1136)
==84572== by 0x64676C7: assemble_tgsi (freedreno_program.c:105)
==84572== by 0x64679DF: fd_prog_init (freedreno_program.c:188)
==84572== by 0x6506157: fd6_prog_init (fd6_program.c:1172)
==84572== Address 0xeff1588 is 424 bytes inside a block of size 480 alloc'd
==84572== at 0x4866FA4: malloc (vg_replace_malloc.c:307)
==84572== by 0x605D46F: ralloc_size (ralloc.c:133)
==84572== by 0x605D52F: rzalloc_size (ralloc.c:166)
==84572== by 0x654DFF7: ir3_shader_from_nir (ir3_shader.c:473)
==84572== by 0x645B6C7: ir3_shader_create (ir3_gallium.c:182)
==84572== by 0x645BAA7: ir3_shader_state_create (ir3_gallium.c:285)
==84572== by 0x6506003: fd6_shader_state_create (fd6_program.c:1136)
==84572== by 0x64676C7: assemble_tgsi (freedreno_program.c:105)
==84572== by 0x64679DF: fd_prog_init (freedreno_program.c:188)
==84572== by 0x6506157: fd6_prog_init (fd6_program.c:1172)
==84572== by 0x64CB36F: fd6_context_create (fd6_context.c:154)
==84572== by 0x59D93BB: st_api_create_context (st_manager.c:917)
Somehow this was showing up with dEQP-GLES31.info.vendor but not other
things.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7717>
1) Propagate the change to only emit markers in debug builds (and add
the WFI that ensures they are synchronized with GPU. We could
consider dropping them entirely, since the GPU devcoredump support
in newer kernels is more useful. But it is still an occasionally
useful fallback.
2) Use p_atomic_inc_return() to placate helgrind
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7717>
It can only be done if a TCS input is accessed without indirect indexing and
with gl_InvocationID as the vertex index, and the number of VS and TCS threads
is the same.
This eliminates LDS stores and loads for VS->TCS IO, reducing shader lifetime
and LDS traffic.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7623>
Instead of:
if (VS) {
VS;
}
if (TCS) {
TCS;
}
Do this if the number of threads is the same in VS and TCS:
exec = enabled_threads;
VS;
TCS;
Skipping declare_vb_descriptor_input_sgprs is needed to match the VS return
values.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7623>