Corentin Noël
a8d669b593
nir/split_64bit_vec3_and_vec4: Use the right number of components
...
Always make sure to correctly deref and store a 64bits variable
from the right number of components.
This fixes the `spec@arb_enhanced_layouts@matching_fp64_types_`
piglit tests for virgl.
Corrects this validation issue:
```
decl_var INTERP_MODE_FLAT dvec2[] var_7@2
decl_var INTERP_MODE_FLAT dvec2[] var_7@3
...
vec1 32 ssa_302 = deref_var &var_7@2 (function_temp dvec2[])
vec1 32 ssa_303 = deref_var &var_7@3 (function_temp dvec2[])
vec1 32 ssa_304 = deref_array &(*ssa_302)[ssa_301] (function_temp dvec2) /* &var_7@2[ssa_301] */
vec1 32 ssa_305 = deref_array &(*ssa_303)[ssa_301] (function_temp dvec2) /* &var_7@3[ssa_301] */
vec1 64 ssa_306 = mov ssa_110.z
intrinsic store_deref (ssa_305, ssa_306) (wrmask=x, access=0)
error: instr->num_components == glsl_get_vector_elements(dst->type) (../src/compiler/nir/nir_validate.c:632)
vec4 64 ssa_111 = vec4 ssa_14, ssa_13, ssa_12, ssa_109
vec1 32 ssa_307 = load_const (0x00000000 = 0.000000)
vec1 32 ssa_308 = iadd ssa_307, ssa_61
vec1 32 ssa_309 = deref_var &var_7@2 (function_temp dvec2[])
vec1 32 ssa_310 = deref_var &var_7@3 (function_temp dvec2[])
vec1 32 ssa_311 = deref_array &(*ssa_309)[ssa_308] (function_temp dvec2) /* &var_7@2[ssa_308] */
vec1 32 ssa_312 = deref_array &(*ssa_310)[ssa_308] (function_temp dvec2) /* &var_7@3[ssa_308] */
vec1 64 ssa_313 = mov ssa_111.w
intrinsic store_deref (ssa_312, ssa_313) (wrmask=, access=0)
error: (nir_intrinsic_write_mask(instr) & ~component_mask) == 0 (../src/compiler/nir/nir_validate.c:803)
```
Fixes: 496fd59d71 (add pass to split 64 bit vec3/4 variable access)
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23880 >
2023-06-29 10:59:57 +00:00
Lionel Landwerlin
d3003b0a41
Revert "isl: Set Depth to array len for 3D storage images"
...
This reverts commit 7e1b62ea5b .
This is now following the PRMs, RENDER_SURFACE_STATE Depth should be
programmed to the base level depth value.
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23868 >
2023-06-29 10:32:20 +00:00
Lionel Landwerlin
2e8c0a33e7
anv: implement storage image depth query using descriptor buffer read
...
The HW not returning the depth value we would like for
VK_EXT_sliced_view_of_3d, we can pull that value by reading the
RENDER_SURFACE_STATE struct directly.
Signed-off-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/23868 >
2023-06-29 10:32:20 +00:00
Iago Toral Quiroga
a7ccba2dfd
v3dv: fix blit path for compressed image to buffer copies
...
Here we were aliasing the full compressed image with an uncompressed
format that we would then use for sampling during the blit copy. This
had 2 issues:
1. Uncompressed image views would have smaller dimensions than the
compressed image, and thus, would also have less mip levels.
2. When sampling from smaller mip levels, the hw internally computes
the size of the mip level from the size of level 0, which then uses
to interpret the texture coordinates, but for some texture sizes
this size would not be an exact match for compressed and uncompressed
views.
To fix this, we modify the aliasing technique to only alias the
miplevel selected in the copy as a level 0 image and we ensure the
slice 0 for that image matches exactly the slice description of the
aliased mip level in the original image.
Fixes all test failures in
dEQP-VK.api.copy_and_blit.core.image_to_buffer.*
for compressed formats when we forcefully disable the TLB path.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23919 >
2023-06-29 10:13:42 +00:00
Iago Toral Quiroga
599e76617d
v3dv: use div_round_up for division by block size
...
We always want to round up when we divide by the block size.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23919 >
2023-06-29 10:13:42 +00:00
Lionel Landwerlin
a1fda29bd1
anv: look into batch bo reloc list looking for BOs to decode
...
On DG2 I ran into a case where the surface state was not being decoded
with INTEL_DEBUG=bat. This is because the surface states are not part
of a state pool there anymore. Instead BO are allocate manually and
placed in vma heap.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 96c33fb027 ("anv: enable direct descriptors on platforms with extended bindless offset")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23891 >
2023-06-29 09:24:07 +00:00
Yonggang Luo
5f7fb0a720
clang-format: Add nir_foreach_function_impl into src/.clang-format
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23903 >
2023-06-29 08:36:03 +00:00
Yonggang Luo
62ce223245
treewide: Switch to use nir_foreach_function_with_impl when possible
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23903 >
2023-06-29 08:36:03 +00:00
Yonggang Luo
b91bff3537
clang-format: Add nir_foreach_function_with_impl into src/.clang-format
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23903 >
2023-06-29 08:36:03 +00:00
Yonggang Luo
fde6b51749
nir: Split macro nir_foreach_function_with_impl out of nir_foreach_function_impl
...
This macro nir_foreach_function_with_impl can be used when func and func->impl are both accessed in
foreach loop
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23903 >
2023-06-29 08:36:03 +00:00
Erik Faye-Lund
afa79cd9b8
nir: use imm-helpers
...
We have to use 1ull instead of 1u because MSVC is stupid...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23855 >
2023-06-29 07:08:19 +00:00
Erik Faye-Lund
0d8c458e8f
gallium: use imm-helpers
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23855 >
2023-06-29 07:08:19 +00:00
Erik Faye-Lund
2a7ab2f7bd
etnaviv: use imm-helpers
...
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23855 >
2023-06-29 07:08:19 +00:00
Erik Faye-Lund
a6da9d7147
amd: use imm-helpers
...
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23855 >
2023-06-29 07:08:19 +00:00
Erik Faye-Lund
ee02893573
mesa/st: use imm-helpers
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23855 >
2023-06-29 07:08:19 +00:00
Erik Faye-Lund
33035ed216
hasvk: use imm-helpers
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23855 >
2023-06-29 07:08:19 +00:00
Erik Faye-Lund
6520b3e726
anv: use imm-helpers
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23855 >
2023-06-29 07:08:19 +00:00
Erik Faye-Lund
c4b6b0d949
intel: use imm-helpers
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23855 >
2023-06-29 07:08:19 +00:00
Erik Faye-Lund
0b57f76986
vc4: use imm-helpers
...
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23855 >
2023-06-29 07:08:19 +00:00
Erik Faye-Lund
6537b8b40b
radeonsi: use imm-helpers
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23855 >
2023-06-29 07:08:19 +00:00
Erik Faye-Lund
bd87f15ee9
d3d12: use imm-helpers
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23855 >
2023-06-29 07:08:19 +00:00
Erik Faye-Lund
f2afe52a14
r600/sfn: use imm-helpers
...
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23855 >
2023-06-29 07:08:19 +00:00
Erik Faye-Lund
1c524136c0
freedreno: use imm-helpers
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23855 >
2023-06-29 07:08:19 +00:00
Erik Faye-Lund
45e7e16222
pan: use imm-helpers
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23855 >
2023-06-29 07:08:18 +00:00
Erik Faye-Lund
80212172e4
v3dv: use imm-helpers
...
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23855 >
2023-06-29 07:08:18 +00:00
Erik Faye-Lund
b3b3be55c4
broadcom/compiler: use imm-helpers
...
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23855 >
2023-06-29 07:08:18 +00:00
Erik Faye-Lund
c69dc01796
vulkan: avoid needless constant-folding
...
While we're at it, also switch to the nir_f{add,mul}_imm helpers.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23855 >
2023-06-29 07:08:18 +00:00
Erik Faye-Lund
195399f857
mesa/st: use nir_ineg
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23855 >
2023-06-29 07:08:18 +00:00
Erik Faye-Lund
b9d3736302
microsoft/compiler: use nir_imm_zero
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23855 >
2023-06-29 07:08:18 +00:00
Yonggang Luo
30ab06bcf8
mapi: Remove dead struct _glapi_function in glapi/glapi_getproc.c
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23879 >
2023-06-29 01:36:09 +00:00
Yonggang Luo
1ed7a1282c
mapi: Merge get_static_proc_address into _glapi_get_proc_address
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23879 >
2023-06-29 01:36:09 +00:00
Yonggang Luo
e3b93887eb
mapi: Style fixes in glapi/glapi_getproc.c
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23879 >
2023-06-29 01:36:09 +00:00
Yonggang Luo
a63b7a03a1
util: sizeof bucket are always 32bit width, use align instead align64
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23732 >
2023-06-29 00:45:31 +00:00
Yonggang Luo
b7a0d34f89
util: Do not use align64 over unsigned int in register_allocate.c
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23732 >
2023-06-29 00:45:31 +00:00
Yonggang Luo
4d7c969dd8
util: Replace the usage of redundant u_align_u32 with align and remove u_align_u32
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23732 >
2023-06-29 00:45:30 +00:00
Yonggang Luo
7ac83b0961
util: Getting align and align64 consistence with ALIGN
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23732 >
2023-06-29 00:45:30 +00:00
Yonggang Luo
b45fb614a4
util: use uint32_t instead of unsigned in bitscan.h
...
uint32_t is more exact than unsigned for these functions
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23732 >
2023-06-29 00:45:30 +00:00
Yonggang Luo
3aa929ca46
util: Add function util_is_power_of_two_nonzero64 in bitscan.h
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23732 >
2023-06-29 00:45:30 +00:00
Donald Robson
3fc727b346
pvr: Rename rogue_fw.xml -> rogue_kmd_stream.xml.
...
The UMD does not care if firmware is used, and the current name isn't
very informative either.
Signed-off-by: Donald Robson <donald.robson@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23872 >
2023-06-28 22:26:07 +00:00
Matt Coster
70f86b25a1
pvr: Rename transfer 3D heap to transfer frag heap
...
This better matches the naming throughout the rest of the driver.
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23872 >
2023-06-28 22:26:07 +00:00
Sarah Walker
a76818e525
pvr: Merge main and extension command streams
...
Signed-off-by: Sarah Walker <sarah.walker@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23872 >
2023-06-28 22:26:07 +00:00
Sarah Walker
8d3e8c3ad9
pvr: Rename heap reserved area to static data carveout
...
Signed-off-by: Sarah Walker <sarah.walker@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23872 >
2023-06-28 22:26:07 +00:00
Sarah Walker
b0a45fc618
pvr: use pvr_csb_pack() to setup CR_FB_CDC_ZLS
...
Signed-off-by: Sarah Walker <sarah.walker@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23872 >
2023-06-28 22:26:07 +00:00
Sarah Walker
e714b35301
pvr: Fragment register fb_cdc_zls is feature dependent
...
Signed-off-by: Sarah Walker <sarah.walker@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23872 >
2023-06-28 22:26:07 +00:00
Prodea Alexandru-Liviu
5acbadddb4
microsoft/clc: Don't build compiler test if build-tests is false
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8161
Cc: mesa-stable
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23890 >
2023-06-28 22:09:13 +00:00
Sil Vilerino
1b7bf9a4f4
d3d12: Fix usage of D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAG, was using D3D12_VIDEO_ENCODER_SUPPORT_FLAG wrongly instead
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23904 >
2023-06-28 21:48:38 +00:00
Sil Vilerino
ed0087d75e
d3d12: Only set reduced_tx_set when supported by D3D12 caps (no libva caps for reduced_tx_set to map to)
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23904 >
2023-06-28 21:48:38 +00:00
Sil Vilerino
6de9402fa8
d3d12: Correct tx_mode_support reporting as specified in libva spec
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23904 >
2023-06-28 21:48:38 +00:00
Yonggang Luo
75ac852253
compiler: set alignment=1 by default for handling empty struct/interface in glsl_types.cpp
...
When there is no elements in struct/interface, the alignment of it should be 1 instead of 0.
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23841 >
2023-06-28 21:16:05 +00:00
Joshua Ashton
68b9ad0ba7
radv: Do not enable robustness for push constants with robustBufferAccess2
...
There is no spec text requiring this behaviour, it is only for buffers.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23885 >
2023-06-28 20:49:30 +00:00