nir_lower_multiview creates a loop that loops over the view mask and
uses indirect stores. Since we only support direct
store_per_view_output, we have to make sure these indirects are gone.
Lowering the IO vars to temporaries will replace them with indirects on
registers.
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 6a1c8d3a0c ("ir3, freedreno, turnip: Lower io earlier")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14787
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39694>
When sampling a subpass input attachment when multiview is been used
the the view index is required.
This becomes an extra output from the vertex shader which is then
iterated into the fragment shader input where it is then used as the
array layer index when sampling the subpass input attachment.
However this extra output was not having its interpolation mode
configured correctly leading to incorrect instructions being added
causing the view index to always be zero and thus sampling the
subpass input attachment incorrectly.
Fix is to make sure the view index interpolation mode is set to flat.
Fix:
dEQP-VK.multiview.input_attachments.no_queries.1_2_4_8_16_32
dEQP-VK.multiview.input_attachments.no_queries.1_2_4_8
dEQP-VK.multiview.input_attachments.no_queries.15_15_15_15
dEQP-VK.multiview.input_attachments.no_queries.15
dEQP-VK.multiview.input_attachments.no_queries.5_10_5_10
dEQP-VK.multiview.input_attachments.no_queries.8_1_1_8
dEQP-VK.multiview.input_attachments.no_queries.8
dEQP-VK.multiview.input_attachments.no_queries.max_multi_view_view_count
dEQP-VK.multiview.renderpass2.input_attachments.no_queries.1_2_4_8_16_32
dEQP-VK.multiview.renderpass2.input_attachments.no_queries.1_2_4_8
dEQP-VK.multiview.renderpass2.input_attachments.no_queries.15_15_15_15
dEQP-VK.multiview.renderpass2.input_attachments.no_queries.15
dEQP-VK.multiview.renderpass2.input_attachments.no_queries.5_10_5_10
dEQP-VK.multiview.renderpass2.input_attachments.no_queries.8_1_1_8
dEQP-VK.multiview.renderpass2.input_attachments.no_queries.8
dEQP-VK.multiview.renderpass2.input_attachments.no_queries.max_multi_view_view_count
Signed-off-by: Nick Hamilton <nick.hamilton@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39715>
Fix compiler error:
../src/freedreno/decode/cffdec.c:580:7: error: assigning to 'char *'
from 'const char *' discards qualifiers
[-Werror,-Wincompatible-pointer-types-discards-qualifiers]
580 | p = strstr(name, "CONST");
| ^ ~~~~~~~~~~~~~~~~~~~~~
glibc now provides C23-style type-generic string functions. strstr
returns const char * when passed a const char * argument. Update p
declaration to const since it's only used for offset calculation.
Fixes: 1ea4ef0d3b ("freedreno: slurp in decode tools")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39770>
The driver either does a fast-clear using compute or a slow clear
using graphics, so the "fast" clear using graphics isn't used at all.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39731>
If `PVR_SHIM_DEVICE_BVNC` is not set, we would try the bvnc
corresponding to whatever was in uninitialised memory, which would
likely fail, and then fallback to `DEFAULT_DEVICE_BVNC`.
Instead, initialize to `DEFAULT_DEVICE_BVNC` so that "unset bvnc" and
"invalid bvnc" behave the same.
Fixes: ba104d3e92 ("pvr: add support for drm-shim")
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39766>
glibc master has been C23'fying the functions which is resulting errors
Several functions assigned results of bsearch/strstr/strpbrk/memchr to
non-const pointers, triggering -Wincompatible-pointer-types-discards-qualifiers
under clang/gcc with -Werror. Cast bsearch return values where needed and
propagate const correctness for strstr/strpbrk/memchr results.
Removes build failures with strict warning flags without changing behavior.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
[Eric: changed the glxglvnd.c hunk to add the missing `const` instead of casting it away]
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38594>
It's actually an unrelated change, it's a weird difference between
fast-clears and slow clears, but it looks exactly the same for humans.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39729>
Right after "normal" layout transitions and just before the rendering
state is set, mostly because it doesn't need to be saved/restored
either.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39729>
This was added specifically for vectorized stores, so allow for loads.
Without this, the pass will fail to vectorize 2 consecutive 16-bit loads
into a single 32-bit load.
Fixes: 2ed79f80ba ("nir/load_store_vectorize: Skip new bit-sizes that are unaligned with high_offset")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39713>
This has not been problem before the compression hint given to kernel
but now that we set it we hit problems when allocating bo if modifier
does not support compression.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14625
Fixes: f91de58818 ("anv: Add support to DRM_XE_GEM_CREATE_FLAG_NO_COMPRESSION")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39710>
In glibc 2.43 the strstr function now propagate const to the output, triggering -Wincompatible-pointer-types-discards-qualifiers
under clang/gcc with -Werror.
Fix two of these cases by adding the const qualifier.
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39767>
lower_store_component() always returns false even though it modifies
NIR instructions (rewrites sources, creates new SSA defs, removes
previous stores). This triggers the "NIR changed but no progress
reported" assertion in nir_shader_intrinsics_pass.
Return true when a store_output or store_per_view_output intrinsic is
processed, since the function always modifies the shader in that case.
Closes: https://gitlab.freedesktop.org/panfrost/mesa/-/issues/274
Cc: mesa-stable
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39757>
Linux v6.4+ provides a syscall called riscv_hwprobe that could detect
multiple characteristics of the running CPU on RISC-V platform.
Implement real check_os_riscv_support() with it and support extensions
detectable by it on Linux v6.5 .
When the toolchain has no riscv_hwprobe definition or the kernel at
runtime does not support it, the fallback code still assumes GC.
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39154>
Add a few RISC-V extensions that could be detected by the riscv_hwprobe
interface of Linux v6.5+, and add caps for FD/C extensions.
The real probe code will come in the following commit, only a stub that
still assumes GC is added.
Adding these bits also changed the size of non-cache-related CPU
information from 4 dwords to 5, so the code hashing it for shader cache
in llvmpipe is also updated.
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39154>
Those have long been supported by vn_image_deferred_info_init because of
AHB support. For non-aliased ANB image, those are directly passed from
the platform swapchain create info as well. So we just need to drop the
obsolete asserts to make newer Android platform and ANGLE happy.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39750>
This is the shader key for the fragment shader. Nobody even knows
what the windowizer/masker unit is or does anymore. Even on Gen4-6,
"fs" is still clearer. This makes the codebase easier to read.
This is only about 15 years overdue.
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39748>
This is the program data for the fragment shader. Nobody even knows
what the windowizer/masker unit is or does anymore. Even on Gen4-6,
"fs" is still clearer. This makes the codebase easier to read.
This is only about 15 years overdue.
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39748>
This started out as dynamic configuration for MSAA related state, but
has since expanded to cover many dynamic fragment shader options.
We rename it to intel_fs_config, similar to intel_tess_config, to
better indicate its purpose.
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39748>
This, plus the single-threading of piglit, means that
arb_timer_query-timestamp-get seems to usually pass now, rather than
usually fail. Still listed as a flake because I haven't stress tested.
Oh, and add in a test that flake-timeouted (3 minutes long) twice in a row
for me.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39747>
Assign a new QPitch when fast-clearing the unaligned top rows on a
redescribed surface. Fixes the following piglit test on gfx12.5:
$ test_folder=generated_tests/spec/EXT_shader_framebuffer_fetch/execution/gles3/
$ ./bin/shader_runner_gles3 $test_folder/single-slice-2darray.shader_test -auto -fbo
Reported-by: Kenneth Graunke <kenneth@whitecape.org>
Fixes: 3e331e4fe9 ("intel/blorp: Optimize non-zero-layer fast-clears")
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39722>
This should hopefully prevent shift/reduce issues in the future. To help
debugging, also make bison always generate counterexamples.
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39735>
Trying to parse mova(.u)?.r causes a shift/reduce conflicts with the
rule for regular mova(.u). Work around this by (dis)assembling it as
mova.r(.u)?.
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39735>