We need to insert a (ss)nop when an instruction that doesn't support
(ss) needs it. However, when this happens in a block that needs to be
legalized more than once (e.g., because it is in a loop), the (ss)nop
would be inserted every iteration, causing an infinite loop.
Fix this by checking if the previous instructions is a nop and applying
(ss) there.
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 5993723471 ("freedreno/a3xx/compiler: scheduling/legalize fixes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36440>
(cherry picked from commit c8f9990733)
GFX9 might not have DCC but compressed FMASK. In this case, it needs
to be decompressed to handle feedback loops.
Fixes new VKCTS coverage dEQP-VK.dynamic_rendering.*_ms.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36550>
(cherry picked from commit 72cf81df54)
This change ensures a deterministic state compatible with
the expected ARB_shader_image_load_store behavior when an
incomplete shader image is detected.
Note: "spec/arb_shader_image_load_store/invalid/.*/address bounds test/.*"
are not addressed by this change.
This change was tested on cypress, palm, barts and cayman and
fixes the remaining issues concerning the following tests:
khr-gl4[2-6]/shader_image_load_store/incomplete_textures: fail pass
spec/arb_shader_image_load_store/invalid/.*/format mismatch test: fail pass
spec/arb_shader_image_load_store/invalid/.*/incompatible format test: fail pass
spec/arb_shader_image_load_store/invalid/.*/incomplete image test: fail pass
spec/arb_shader_image_load_store/invalid/.*/index bounds test: fail pass
spec/arb_shader_image_load_store/invalid/.*/invalid format test: fail pass
spec/arb_shader_image_load_store/invalid/.*/layer bounds test: fail pass
spec/arb_shader_image_load_store/invalid/.*/level bounds test: fail pass
spec/arb_shader_image_load_store/invalid/.*/target mismatch test: fail pass
spec/arb_shader_image_load_store/invalid/.*/unbound image test: fail pass
Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35685>
(cherry picked from commit d2be9f95e5)
This functionality is working properly on rv770, but some
issues remain for the newer r600 gpus. These issues are not the
same for cypress and for palm and beyond.
As far as palm and beyond is concerned this change is consistent
with the radeonsi commit: 50c95d0c54 "radeonsi: reject some
3-component formats as buffer textures". This is explained
in a comment of this other commit.
This change assumes that all the real evergreen gpus (before
palm) behave like cypress.
This change was tested on palm, barts and cayman. Here are the tests fixed:
deqp-gles3/functional/texture/specification/teximage2d_pbo/rgb16f_cube: fail pass
deqp-gles3/functional/texture/specification/teximage2d_pbo/rgb16i_cube: fail pass
deqp-gles3/functional/texture/specification/teximage2d_pbo/rgb16ui_cube: fail pass
deqp-gles31/functional/texture/specification/teximage3d_pbo/rgb16f_cube_array: fail pass
deqp-gles31/functional/texture/specification/teximage3d_pbo/rgb16i_cube_array: fail pass
deqp-gles31/functional/texture/specification/teximage3d_pbo/rgb16ui_cube_array: fail pass
This change was also tested on cypress. Here are the tests fixed:
deqp-gles3/functional/texture/specification/teximage[23]d_pbo/rgb565_2d: fail pass
deqp-gles3/functional/texture/specification/teximage[23]d_pbo/rgb565_cube: fail pass
deqp-gles3/functional/texture/specification/teximage[23]d_pbo/rgb5_a1_2d: fail pass
deqp-gles3/functional/texture/specification/teximage[23]d_pbo/rgb5_a1_cube: fail pass
deqp-gles3/functional/texture/specification/teximage[23]d_pbo/rgba4_2d: fail pass
deqp-gles3/functional/texture/specification/teximage[23]d_pbo/rgba4_cube: fail pass
deqp-gles3/functional/texture/specification/texsubimage[23]d_pbo/rgb565_2d: fail pass
deqp-gles3/functional/texture/specification/texsubimage[23]d_pbo/rgb565_cube: fail pass
deqp-gles3/functional/texture/specification/texsubimage[23]d_pbo/rgb5_a1_2d: fail pass
deqp-gles3/functional/texture/specification/texsubimage[23]d_pbo/rgb5_a1_cube: fail pass
deqp-gles3/functional/texture/specification/texsubimage[23]d_pbo/rgba4_2d: fail pass
deqp-gles3/functional/texture/specification/texsubimage[23]d_pbo/rgba4_cube: fail pass
deqp-gles31/functional/texture/specification/teximage3d_pbo/rgb565_cube_array: fail pass
deqp-gles31/functional/texture/specification/teximage3d_pbo/rgb5_a1_cube_array: fail pass
deqp-gles31/functional/texture/specification/teximage3d_pbo/rgba4_cube_array: fail pass
deqp-gles31/functional/texture/specification/texsubimage3d_pbo/rgb565_cube_array: fail pass
deqp-gles31/functional/texture/specification/texsubimage3d_pbo/rgb5_a1_cube_array: fail pass
deqp-gles31/functional/texture/specification/texsubimage3d_pbo/rgba4_cube_array: fail pass
Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35430>
(cherry picked from commit f352491834)
The variable "i" is updated to the type returned by
util_format_get_first_non_void_channel() which is int.
The function is refactored to handle "for_vbo" as false.
Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35430>
(cherry picked from commit bf76e5bb38)
Tracking for those jobs were missing and not reset when the batch was reissued.
Fixes: d1934e44fc ("panvk: Implement occlusion queries for JM")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35724>
(cherry picked from commit ab0f0323e0)
We could end up in situations where the active count wouldn't match the
varying_count causing a memory corruption.
This fix it by not relying on the active count anymore.
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 05020699b9 ("panvk: Move the linking bits to panvk_shader")
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35724>
(cherry picked from commit a1a98d1dc5)
If the mov node being handled here has modifiers, it cannot be
trivially removed. This happens in some shaders, so handle it
in the identity mov check for that optimization.
Fixes: d6987daef9 ("lima: ppir: introduce an optimizer")
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36490>
(cherry picked from commit 3020d27326)
The private BO can get removed due to WSI aliasing and that breaks the
submission code (expecting one).
Delay the registration on the device to when the image actually gets
bound and there is a private BO.
Fixes: b21e62b71a ("anv: avoid leaking private binding for aliased wsi image")
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36474>
(cherry picked from commit 9efb3ee511)
The delivered values in the coarse pixel size are 0 when coarse pixel
dispatch is disabled and that is screwing up our half pixel offset
adjustment.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36457>
(cherry picked from commit 9371e8d370)
Retrieving memory requirement size and alignment via
anv_image_get_memory_requirements() return's 0 before surfaces are added
by resolve_anb_image() and will assert in align64() when align is 0:
Abort message: '../src/util/u_math.h:713: uint64_t align64(uint64_t, uint64_t): assertion "util_is_power_of_two_nonzero64(alignment)" failed'
Refactor out anv_image_bind_from_gralloc() into resolve_anb_image() so
the checks are performed after the surface is adds.
Resolving also requires API 29 so return VK_ERROR_EXTENSION_NOT_PRESENT
without it.
Fixes: 43cb986d9e ("anv/android: resolve ANB swapchain images on bind")
Signed-off-by: Juston Li <justonli@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36060>
(cherry picked from commit e1ca09317e)
This check assumed that we would always get `VK_TIMEOUT` from
wsi_queue_pull() but the new explicit sync wait is smart enough to do
that for us. Unfortunately, the X11 code weasn't smart enough to know
that VK_NOT_READY (which is a positive return code) was also an early
exit condition.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12971
Fixes: 899263ecfc ("wsi/x11: support explicit sync")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tested-by: Adam Ivora
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36419>
(cherry picked from commit 064b9e5645)
transform_8x8_mode, pic_scaling_matrix_present_flag and
second_chroma_qp_index_offset may only be present in High profile.
Cc: mesa-stable
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36351>
(cherry picked from commit da5f3a1027)
uses_discard may be set when the nir shader contains a 'discard'
implemented with a nir 'terminate', in that case it may stil not
necessarily have a discard block.
Fixes a crash in shaders that have comp->uses_discard but no
comp->discard_block.
Fixes: fa9ddbe82b ("lima: ppir: optimize branches")
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36350>
(cherry picked from commit d620529ddb)
These params can change per frame, so we need to send the values
to firmware on every frame instead of only once at session init.
Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36353>
(cherry picked from commit e3715df4ee)
There is nothing guaranteeing that the currently used sampler view
indexes will be contiguous, which means the resulting extra sampler
views created by st_get_sampler_views may not be placed at the end of
the resulting array. Therefore, the exact indexes of these views must
be passed to the caller for releasing instead of simply assuming that
they will always be placed at the end.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13363
Fixes: 73da0dcddc ("gallium: eliminate frontend refcounting from samplerviews")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36397>
(cherry picked from commit abcd02a07d)
There's been a few years since these flags existed, let's drop them.
Fixes: ea03d0652d ("panfrost: Remove PAN_MESA_DEBUG=deqp")
Fixes: 7c7c38b126 ("panfrost: Remove unused debug parameter")
Acked-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36310>
(cherry picked from commit 2adcb4c81a)
This change is inspired by 1021d6fe62 ("dri: deal
with ARGB1555")
This issue is now mostly fixed with
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36081
Anyway, the dri3_cpp_for_fourcc entry is still missing and should
be added.
This change is useful for instance with r600 which
can handle this format.
Note: this mode was generated at the "glx visuals" level
on r600 by default before the commit d709b42180.
This change was tested on r600 palm and cayman with X11
loaded with a version of mesa generating this very mode:
glx/glx-visuals-depth -pixmap: fail pass
glx/glx-visuals-stencil -pixmap: fail pass
Fixes: 00aa095d53 ("dri: Support 1555/4444 formats")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34294>
(cherry picked from commit cea80e1a10)