mesa/src/gallium/auxiliary
Alyssa Rosenzweig a6a3a7a881 gallium: Add pipe_image_view::single_layer_view
OpenGL has a goofy feature that allows creating an image view of a single layer
of an array texture... in which case that image is treated as non-arrayed in
shader. If you have a 16x16x16 3D texture and bind the third layer, you get a
16x16 2D texture instead of a 16x16x1 3D texture. That distinction matters to
the hardware on AGX, since the texture dimension needs to match between the
shader and the pipe_image_view. If the shader is going to use image2D, we need
to know that the pipe_image_view should be treated as 2D (even though the
underlying resource is 3D).

"But, Alyssa, we already have first_layer and last_layer. Surely you can just
check if first_layer == last_layer?" you ask. The problem is that doesn't
distinguish a 16x16x1 3D texture (accessed as image3D in the shader) from a
16x16 slice (accessed as image2D in the shader) of a 16x16x16 3D texture. To
solve, we add a boolean flag indicating we want to create a view (with a lower
dimension than the underlying resource). This provides an unambiguous way to
communicate this case to drivers.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23142>
2023-05-22 16:41:10 +00:00
..
cso_cache cso: unbind fb state when unbinding the context 2023-05-03 23:45:36 +00:00
draw draw: move to use common sampler/image binding code 2023-05-17 01:19:24 +00:00
driver_ddebug tree-wide: Convert all usage of #ifdef PIPE_(OS|ARCH|CC)_* to #if DETECT_(OS|ARCH|CC)_* by use grep 2022-11-15 20:35:55 +00:00
driver_noop gallium: fixup some inconsistent uses of enum pipe_shader_type. 2022-08-04 08:17:39 +00:00
driver_trace aux/trace: fix GALLIUM_TRACE_NIR handling 2023-03-28 16:17:39 +00:00
gallivm llvmpipe: only include old Transform includes when needed 2023-05-17 09:12:32 +02:00
hud hud: add GALLIUM_HUD_OPACITY envvar 2023-03-06 16:50:27 +00:00
indices gallium: decompose quad strips into quads if supported 2023-03-24 13:11:12 +00:00
nir nir: Drop unused name from nir_ssa_dest_init 2023-05-17 23:46:16 +00:00
os util/u_process: remove util_get_process_name_may_override() 2023-01-31 22:02:58 +00:00
pipe-loader pipe-loader: avoid undefined memcpy behavior 2023-05-12 19:05:23 +00:00
pipebuffer gallium: Replace the usage of __FUNCTION__ with __func__ in all gallium code 2022-11-22 06:53:47 +00:00
postprocess postprocess: move the definition of pp_filters into **/pp_init.c 2023-01-03 14:45:28 +00:00
renderonly kmsro: Fix renderonly_scanout BO aliasing 2022-12-25 19:23:27 +09:00
rtasm tree-wide: Fixes multi-line macro width after replace to __func__ 2022-11-22 06:53:47 +00:00
target-helpers gallium: Drop Asahi-as-a-swrast hack 2023-05-20 16:59:16 +00:00
tessellator gallium: use c++11 alignas instead of PIPE_ALIGN_VAR 2022-06-14 15:08:38 +00:00
tgsi tgsi: use locale independent float and double parsing 2023-04-27 15:43:33 +00:00
translate translate: do not clamp element index in generic_run 2023-04-19 20:53:27 +00:00
util gallium: Add pipe_image_view::single_layer_view 2023-05-22 16:41:10 +00:00
vl vl/dri3: avoid deadlocking when polling deleted windows for events 2023-02-16 15:55:47 +00:00
meson.build draw: move to use common sampler/image binding code 2023-05-17 01:19:24 +00:00