We always use sample_id to load the sample position from memory.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41461>
no change in behavior other than getting pixel_coord from the beginning
unconditionally
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41461>
FYI, ac_nir_lower_ps_early is only used by radeonsi.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41461>
The scalarBlockLayout feature was already exposed via the Vulkan 1.2
feature struct, but Vulkan 1.1 clients (e.g. Dawn) need the EXT to
discover it.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41673>
B10G11R11_UFLOAT_PACK32 maps to V3D_INTERNAL_TYPE_16F on the TLB,
which canonicalizes NaN bit patterns when arbitrary 32 bits are
reinterpreted as that format. The same canonicalization happens in
the blit shader when sampling a B10G11R11 source. Both break the
bit-exactness that vkCmdCopyImage, vkCmdCopyImageToBuffer and
vkCmdCopyBufferToImage require, since the spec defines them as raw
byte copies for any pair of texel-size compatible formats.
Fix it by aliasing the format to R32_UINT whenever B10G11R11 is
involved.
This fixes dEQP-VK.api.copy_and_blit.*b10g11r11*,
dEQP-VK.image.subresource_layout.*b10g11r11* and
dEQP-VK.api.image_clearing.*b10g11r11* failures on V3D 7.1.7 (rpi5)
and V3D 4.2 (rpi4).
Assisted-by: Claude Opus 4.7
Cc: mesa-stable
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41599>
The HW can do up to UINT32_MAX but we're using that value to signal
indirect dispatch arguments.
A game like Resident Evil Requiem will use more than 64k on X
dimension.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41592>
to strengthen it and fix a rare case of incorrect behavior.
This is the incorrect behavior that's fixed:
if (invocation_id == 0)
patch_output[0] = invocation_id;
else if (invocation_id == 1)
patch_output[1] = invocation_id;
else
patch_output[2] = invocation_id;
The stored SSA defs are the same, but each invocation writes a different
value to different outputs, so they are not duplicated, but the code
incorrectly treated them as duplicated and removed [1] and [2].
The requirement for correctness is that if an output is duplicated,
it must have stores in the same blocks as the output it duplicates.
To fix the incorrect behavior, awareness of blocks is added to the algorithm,
which leads to the following new cases that are optimized:
1. Different blocks store different SSA defs, but equal in each block:
if (..) {
output[0] = a;
output[1] = a; // eliminated
} else {
output[0] = b;
output[1] = b; // eliminated
}
2. Different GS emit sections store different SSA defs, but equal in each
section:
output[0] = a;
output[1] = a; // eliminated
emit_vertex;
output[0] = b;
output[1] = b; // eliminated
emit_vertex;
3. A weird case that could be duplicated but is left alone due to
the counterexample above:
if (..)
output[0] = a;
else
output[1] = a;
Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41329>
By adding it to the list of files needed to compile `libmesa` instead of
relying on the racy "build this no matter what" mechanism which is
intended only for root nodes (≈ the binaries that we provide to users).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41617>
This is temporarily using the main software backend's driver id to
ensure a valid status on CTS. It'll be updated once the vulkan headers
are updated with mr 8272 on khronos side.
Test: dEQP-VK.api.driver_properties#driver_id_match
Reviewed-by: David Gilhooley <djgilhooley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41656>
Fixes the following with meson2hermetic:
src/freedreno/registers/adreno/a6xx_perfcntrs.py/genrule.sbox.textproto
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "gen_header.py", line 1220, in <module>
File "gen_header.py", line 1216, in main
File "gen_header.py", line 1177, in dump_py_defines
File "gen_header.py", line 688, in parse
File "gen_header.py", line 680, in do_parse
File "external/python/cpython3/Modules/pyexpat.c", line 471, in StartElement
File "gen_header.py", line 732, in start_element
File "gen_header.py", line 673, in do_parse
FileNotFoundError:
[Errno 2] No such file or directory: './out/src/freedreno/registers/adreno/adreno_common.xml'
Soong/Bazel `genrules` run in a separate sandbox, and require that
all dependencies be explicitly declared. It is necessary for
reproducible, hermetic and distributed builds.
Meson prefers explicit dependency declaration too, but does not
require it. For example, if `adreno_common.xml` is modified, and
it is in `depend_files` for the `adreno_pm4.xml.h` custom_target,
meson knows to re-gen `adreno_pm4.xml.h` during incremental builds.
For freedreno, the custom targets in `src/freedreno/registers/*`
don't declare all XML dependencies that are actually used.
This patch fixes this. The other option is workaround this in
meson2hermetic, but being more explicit conceptually more correct.
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41518>
Fixes:
src/freedreno/vulkan/tu_knl_kgsl.cc:1455:16:
error: 'alignof' applied to an expression is a GNU extension [-Werror,-Wgnu-alignof-expression]
alignof(*objs), VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41518>
Fixes:
src/freedreno/vulkan/tu_cmd_buffer.cc:2162:10:
error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
The other option is the [[fallthrough]] annotation.
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41518>
UBO and sampler descriptors are smaller than texture descriptors, but
the nature of Vulkan descriptor sets means we need to make them just as
big. Zero out the remaining dwords so that we don't get garbage that
trips up asserts in gfxrecon-replay.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41608>
As most work for maintenance5 is already done in the common Vulkan
runtime, functions required by it are implemented in pvr driver and
blitting functions are changed to use common functions for acquiring
subresource layer count, advertise VK_KHR_maintenance5 now.
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41569>
It's implemented like GetDeviceImageMemoryRequirements by creating a
temporary image.
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41569>
As the functionality of GetImageSubresourceLayout was already a
dedicated function, simply changing the parameters for the function call
is enough to implement GetImageSubresourceLayout2.
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41569>
As the implementation of GetRenderAreaGranularity does not reference the
render pass object, just move it to a new function and use it for both
functions.
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41569>
As index buffer bound checking isn't yet supported by the driver, the
newly added size parameter is just assert-checked.
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41569>
With VK_KHR_maintenance5, the layerCount member of
VkImageSubresourceLayers can be VK_REMAINING_ARRAY_LAYERS.
Change any direct access to this member to the common runtime function
vk_image_subresource_layer_count, which can handle the maint5 case.
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41569>
VK_KHR_maintenance5 requires the driver to accept values beyond the
defined enumerants for physical-device-level functions. Although the
VkImageType enumeration hasn't received any new enumerants since
VK_VERSION_1_0, it's possible that it gets extended in the future.
Change the code to return a VK_ERROR_FORMAT_NOT_SUPPORTED instead of
using UNREACHABLE (which triggers an assert).
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41569>
Apparently we emitted uninitialized values for VSC in tu6_emit_tile_select
when HW binning wasn't used, which Adreno 630 doesn't like and hangs.
Instead of adding even more conditions, just always init VSC state,
the rare cases where initializing it can be skipped - not worth
the complexity.
Fixes: 49191f46e6 ("tu/a6xx: Emit VSC addresses for each bin to restore after preemption")
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41604>
We could add an error check instead, but we actually need `features` to be fully
initialized and we'd be setting it to `0` in the else, so let's just initialize
`val = 0` and not have to care whether etna_gpu_get_param() succeeds.
Fixes: 358e1f10c5 ("etnaviv: drm: Initialize etna_core_info based on kernel features")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41621>
Some apps when they see adreno just blindly stuff in this compiler arg.
Just silently ignore it.
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41520>
> ../src/glx/driwindows_glx.c:445:1: error: static declaration of ‘driwindowsCreateScreen’ follows non-static declaration
> 445 | driwindowsCreateScreen(int screen, struct glx_display *priv, bool driver_name_is_inferred)
> ../src/glx/glxclient.h:160:20: note: previous declaration of ‘driwindowsCreateScreen’ with type ‘struct glx_screen *(int, struct glx_display *, _Bool)’
> 160 | struct glx_screen *driwindowsCreateScreen(int screen, struct glx_display *priv, bool driver_name_is_inferred);
Since driwindowsCreateScreen() is now called directly, rather than via
function pointers in the _GLXDRIdisplay structure, it needs to be
public.
Fixes: 0d78711cfb ("glx: delete __GLXDRIdisplay")
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41421>