- Immediates are not allowed in 2nd src.
- Immediates are 12 bits, not sign-extended.
- Only one of the first two sources can be shared when not scalar ALU.
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32181>
The algorithm is exactly the same for other opcodes so we don't have to
have to copy paste it.
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32181>
ir3 has a number of bitwise triops (e.g., shrm == (src0 >> src1) & src2)
that don't have NIR-equivalents. Doing instruction selection for them is
a lot more convenient using algebraic patterns than to have to manually
match for them. This patch add NIR opcodes for these instructions.
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32181>
This reverts commit c49a71c03c.
It broke radeonsi.
GBM can't set __DRI_IMAGE_USE_BACKBUFFER if gbm itself doesn't use it as
a back buffer by rendering to it and calling SwapBuffers. If another
library uses it as a back buffer, that library should set
__DRI_IMAGE_USE_BACKBUFFER, not GBM. A different flag could be added
to indicate the behavior that the original commit expected.
Fixes: c49a71c03c - gbm: mark surface buffers as explicit flushed
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11996
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32345>
This was used to parse glsl ir in string format and create real ir with
it. It was previously used for some really old test infrastructure which
has now been removed so lets burn this with fire also.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32364>
This test only tests that a redundant continue is removed. This test is
not very useful and there are hundreds of lines of supporting test
infrastructure that can be removed if we drop it.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32364>
In commit a34982063 (Support standalone executable builds on Android,
2024-09-12) upstream VK-GL-CTS added support for building deqp as an
executable command for Android, this change is included in the vulkan
branch used by build-deqp.sh so the custom patches can be dropped for
the Vulkan CTS build.
After that and by passing -DDEQP_ANDROID_EXE=ON deqp can now be built
with DEQP_API=tools.
[Eric]
Note that the upstream solution seems to be broken on EGL, so GL & GLES
continue to use the local android patches; for more details, see:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168#note_2676128
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
this comes up with clc.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
opposite of nir_remove_non_entrypoint. this operation comes up with
precompiling.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
mark nir_functions as entrypoints according to the source.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
for cl kernel libraries with many entrypoints. spirv can represent, nir should
be able to as well.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
for compiling libraries full of kernels.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
common code has a generic version, so we don't need to handroll this.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
GFX10.3 and earlier were configured to count the number of dwords written,
and VGT_STRMOUT_DRAW_OPAQUE_VERTEX_STRIDE was also configured in dw units.
GFX11+ on the other hand used nir code that would use bytes.
This commit aligns radeonsi's logic on the radv's one, and use STRMOUT_DATA_TYPE
to configure older chips to use bytes as well.
This fixes GTF-GL46.gtf40.GL3Tests.transform_feedback2.transform_feedback2_two_buffers.
It also seems to have an effect on:
- dEQP-GLES3.functional.transform_feedback.random.separate.*
- dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.*
but the results seem flaky so need further investigation.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281>
The specification doesn't say which error should be reported, but
piglit expects BadMatch:
/* The GLX_ARB_create_context_robustness spec does not say what error
* code should be generated. However, similar cases (e.g., valid GL
* versions) specify BadMatch. This is also the behavior of NVIDIA's
* closed-source driver.
*/
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281>
Front rendering and (display) DCC are causing artifacts on screen.
si_texture_get_handle deals with this problem by disabling dcc, but
we can make it simpler by not allocating DCC at all when this flag
is set.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281>
a7xx hardware has 8x MSAA capabilities we can expose. The 8-bit sample
count flag is included in the supported sample counts when computing image
format properties for MSAA-capable image creation conditions, with the
exception of 128-bit formats that don't support 8x MSAA.
UBWC blocksize logic is updated to cover cases of 16-bit and 32-bit formats
that support 8x MSAA. The per-cpp blocksize array is adjusted to also cover
128-byte values for which UBWC has to be disabled anyway.
VK_EXT_sample_locations implementation is adjusted to support sampling in
up to 8 locations, achieved by writing into additional sample location
registers.
Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32180>