We have been able to to handle indirect offsets on GS outputs for
a while and we have just implemented this for VS, so we can enable
this capability and avoid the horrible if-ladder code to convert
indirect output indices to constant indices.
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10723>
When spilling a register, the number of temps can be increased when
introducing a temporal variable.
Those nodes are not elegible to be spilled, but we need to take care of
no accessing out-of-bounds of the arrays defined with a size equal to
the original number of temps.
Fixes address sanitizer error on
KHR-GLES3.shaders.uniform_block.random.all_shared_buffer.14 (and many
others).
v2 (Iago):
- Add clarification in assertion.
- Use `vir_get_temp` to increase num_temps.
v3 (Iago):
- Update clarification
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10643>
When switching from a normal texture to a texture storage, unreference
the old one to avoid leaking it.
v2 (Emma):
- Update commit message
Reviewed-by: Emma Anholt <emma@anholt.net>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10643>
Do not leak pipe resource if scanout resource creation fails.
Fixes: bf6973199d ("v3d: Allow the UIF modifier with renderonly.")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10643>
Without this check, if we receive any attribs from the client, we either
find an X11/XCB screen fd in there, or we keep going until we end up in
random bits of memory and crash.
Fixes: 4aebd86f9a ("egl/x11: pick the user requested screen")
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10717>
Since 70813c1c13 ("meson: Remove kmsro from gallium-drivers"), it is no
longer necessary to include kmsro in the gallium-drivers list; kmsro
will be automatically enabled if it may be required. Simplify the docs
for lima and panfrost accordingly to reflect the change.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10727>
these tests take over 5 minutes just locally, and the codepaths are mostly
shared with llvmpipe in the draw module, so there's not much point in running
them given that other drivers are more likely to catch any issues here over
softpipe, which is only more likely to catch timeouts
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10708>
The spec requires at least 2, but says "No specific guarantees are made
about higher priority queues receiving more processing time or better
quality of service than lower priority queues." So, we can just leave the
priorities as a stub.
Fixes dEQP-VK.info.device_properties
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10470>
This fixes the following UBSAN warning:
../mesa/src/gallium/drivers/panfrost/pan_resource.c:889:16: runtime error: member access within null pointer of type 'struct panfrost_resource'
#0 0xffff79787a1c in panfrost_resource_get_stencil ../mesa/src/gallium/drivers/panfrost/pan_resource.c:889
#1 0xffff7997af44 in u_transfer_helper_resource_destroy ../mesa/src/gallium/auxiliary/util/u_transfer_helper.c:141
#2 0xffff77187f14 in pipe_resource_reference ../mesa/src/gallium/auxiliary/util/u_inlines.h:150
#3 0xffff77187f14 in st_bufferobj_free ../mesa/src/mesa/state_tracker/st_cb_bufferobjects.c:87
#4 0xffff774be848 in _mesa_reference_buffer_object_ ../mesa/src/mesa/main/bufferobj.c:504
#5 0xffff77c2cb3c in _vbo_DestroyContext ../mesa/src/mesa/vbo/vbo_context.c:208
#6 0xffff771bd854 in st_destroy_context ../mesa/src/mesa/state_tracker/st_context.c:1082
#7 0xffff76f4b3cc in dri_destroy_context ../mesa/src/gallium/state_trackers/dri/dri_context.c:245
#8 0xffff76f298a0 in driDestroyContext ../mesa/src/mesa/drivers/dri/common/dri_util.c:528
#9 0xffff863ac118 in dri2_destroy_context ../mesa/src/egl/drivers/dri2/egl_dri2.c:1463
#10 0xffff86372484 in eglDestroyContext ../mesa/src/egl/main/eglapi.c:826
#11 0xaaaabf5ebe24 in tcu::surfaceless::EglRenderContext::~EglRenderContext() (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x63e24)
#12 0xaaaabf5ebeb8 in tcu::surfaceless::EglRenderContext::~EglRenderContext() (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x63eb8)
#13 0xaaaabf5ece30 in deqp::gles2::TestPackage::deinit() (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x64e30)
#14 0xaaaabfaabad0 in tcu::TestHierarchyIterator::next() (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x523ad0)
#15 0xaaaabfa7b65c in tcu::TestSessionExecutor::iterate() (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x4f365c)
#16 0xaaaabfa5a564 in tcu::App::iterate() (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x4d2564)
#17 0xaaaabf5ea20c in main (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x6220c)
#18 0xffff85d322a8 in __libc_start_main ../csu/libc-start.c:308
#19 0xaaaabf5ea8dc (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x628dc)
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10695>
If we fail to create an image, we need to report this, otherwise we'll
start doing crazy stuff, like reporting a required size of zero.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10689>
We need this for Lavapipe; we shouldn't fail to create an vkImage that
is too large, we should instead fail to allocate memory for it.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10689>
This isn't the perfect error-code, but we don't really have anything
better, it seems.
The ideal fix here would be to fix LLVMpipe to support larger textures,
but this is probably as far as I'm interested in chasing down this path
for now.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10689>
It's possible to get all width, height and depth as negative here, and
if we take the util_logbase2 of that, we get a nonsense value that might
be outside of the range the driver supports. So let's clamp to zero here
to avoid having to make the drivers overly pessimistic about what the
state-tracker demands.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10689>
Includes counters and renderstages, as well as CPU process/freq, vblank,
dma_fence, etc. This is a more reasonable starting point for system
level tracing.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901>
We can avoid re-sending the configuration cmdstream constantly if we
know the device has not suspended since the last sampling period.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901>
Not really direct perfetto support, but add a way that tracepoints can
be associated with a driver provided callback which can generate
perfetto events using the timestamps collected on the GPU.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901>
Various places around mesa which might want to register a data-source,
etc, should call util_perfetto_init() first to ensure we connect to the
tracing service.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901>
A shorter interval lets us have more granularity to see counter changes
per tile pass.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901>
In radv_get_modifier_flags, we had a special case for multi-planar
formats. However ac_is_modifier_supported should already take care of
rejecting unsupported modifiers for multi-planar buffers.
Some time ago, ac_is_modifier_supported rejected any non-linear modifier
for multi-planar formats. 35e25ea1d0 ("ac/surface: allow non-DCC modifiers
for YUV on GFX9+") changed that to allow non-DCC modifiers with
multi-planar formats on GFX9+. Since then, the radv check has been out
of sync.
A similar patch was applied to radeonsi in 979e138695 ("radeonsi: stop
special-casing YUV formats in si_query_dmabuf_modifiers").
This fixes tiling artifacts with NV12 buffers.
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10623>
We relied on mm_slab_new choosing the same bucket the caller used, just
pass it in.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8765>
It seems common for there to be holes.
fossil-db (GFX10.3, robustBufferAccess enabled):
Totals from 33791 (23.10% of 146267) affected shaders:
(no statistics changed)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7871>
This reverts commit a8a6b9fb2fdcb1bea55707fa0c2b8e96f03c6b5b.
This is no longer necessary now that we fixup the size when creating the
descriptors.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7871>
In the future, we might have vertex attribute loads from the same binding
but with different descriptors. Since they will be loading from the same
buffer, we should continue grouping them into clauses.
No fossil-db changes.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7871>
The condition for enabling it was incorrect, and was always false.
Therefore, it was never really enabled.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10683>
The GS copy shader is not used with NGG GS.
This fixes a big bug when NGG GS is running in Wave32 mode.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10683>
Fixes issues with upcoming CTS test testing empty structs.
v2: decorate with UNUSED as only used in assert (Timothy)
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10681>