mesa/src/nouveau/codegen
Faith Ekstrand 9f767db126 nv50/ir: Rework conversions for texture array indices
Currently, negative array texture indices get saturated to 0 which,
while technically in-bounds, isn't what we want for Vulkan with image
robustness or robustness2.  Vulkan requires that a negative index on a
texelFetch() count as out-of-bounds but a negative index on any other
texture operation gets clamped to 0.  (See the spec section entitled
"(u,v,w,a) to (i,j,k,l,n) Transformation And Array Layer Selection").

Instead of using CVT for TXF, we now take U32 MAX with 0xffff. Because
it's unsigned, this ensures that negative array indices clamp to 0xffff
and will be considered out-of-bounds by the hardware (there are a
maximum of 2048 array indices in an image descriptor).  For everything
other than TXF, we keep using an F32->U16 conversion but add a saturate.
This ensures that negative array indices clamp to 0 as per the Vulkan
spec.  Very large indices will clamp to 0xffff which the hardware will
clamp to the maximum array index.

This fixes 324 tests in the dEQP-VK.robustness.* group, all those for 1D
and 2D array textures

Acked-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24593>
2023-08-11 06:02:23 +00:00
..
lib nouveau: const cleanup 2022-09-16 14:23:47 +00:00
meson.build nouveau: Delete nv50_ir_from_tgsi.cpp 2023-07-21 02:40:35 +00:00
nv50_ir.cpp nouveau/codegen: Use a NULL format for PIPE_FORMAT_NONE for images 2023-08-01 18:58:03 +00:00
nv50_ir.h nouveau/codegen: Use a NULL format for PIPE_FORMAT_NONE for images 2023-08-01 18:58:03 +00:00
nv50_ir_bb.cpp nv50/ir: Remove Function.stackPtr 2023-07-19 11:47:10 +00:00
nv50_ir_build_util.cpp nouveau: Drop BuildUtil::DataArray 2023-07-21 02:40:35 +00:00
nv50_ir_build_util.h nouveau: Drop BuildUtil::Location 2023-07-21 02:40:36 +00:00
nv50_ir_driver.h nv50/ir: convert system values to gl_system_value 2023-08-05 00:39:34 +02:00
nv50_ir_emit_gk110.cpp
nv50_ir_emit_gm107.cpp gm107/ir: fix SULDP for loads without a known format 2023-07-25 23:15:41 +00:00
nv50_ir_emit_gv100.cpp gv100/ir: noop OP_BAR for now 2022-11-09 21:21:22 +00:00
nv50_ir_emit_gv100.h
nv50_ir_emit_nv50.cpp
nv50_ir_emit_nvc0.cpp
nv50_ir_from_common.cpp nouveau: Drop ConverterCommon::Subroutine 2023-07-21 02:40:35 +00:00
nv50_ir_from_common.h nouveau: Drop ConverterCommon::Subroutine 2023-07-21 02:40:35 +00:00
nv50_ir_from_nir.cpp nv50/ir: convert system values to gl_system_value 2023-08-05 00:39:34 +02:00
nv50_ir_graph.cpp
nv50_ir_graph.h
nv50_ir_inlines.h nv50/ir: add isUnsignedIntType() and isIntType() helpers 2022-09-09 17:32:13 +02:00
nv50_ir_lowering_gm107.cpp
nv50_ir_lowering_gm107.h nv50/ir: resolve -Woverloaded-virtual=1 warnings 2023-06-15 18:48:10 +00:00
nv50_ir_lowering_gv100.cpp
nv50_ir_lowering_gv100.h
nv50_ir_lowering_helper.cpp nv50/ir: handle U8/U16 integers converting to U64 2022-09-09 17:32:30 +02:00
nv50_ir_lowering_helper.h
nv50_ir_lowering_nv50.cpp
nv50_ir_lowering_nvc0.cpp nv50/ir: Rework conversions for texture array indices 2023-08-11 06:02:23 +00:00
nv50_ir_lowering_nvc0.h nv50/ir: resolve -Woverloaded-virtual=1 warnings 2023-06-15 18:48:10 +00:00
nv50_ir_peephole.cpp nv50/ir: fix OP_UNION resolving when used for vector values 2022-09-08 11:35:35 +00:00
nv50_ir_print.cpp nv50/ir: use own info struct for sys vals 2023-08-05 00:35:57 +02:00
nv50_ir_ra.cpp nv50/ir: Remove SpillSlot 2023-07-19 11:47:10 +00:00
nv50_ir_sched_gm107.h
nv50_ir_serialize.cpp nouveau: Drop tgsi support from nv50_ir_prog_info 2023-07-21 02:40:35 +00:00
nv50_ir_ssa.cpp nouveau: Make getSize return unsigned int 2023-03-17 16:08:33 +00:00
nv50_ir_target.cpp nvc0: initial Ada enablement 2023-07-19 09:08:16 +00:00
nv50_ir_target.h
nv50_ir_target_gm107.cpp
nv50_ir_target_gm107.h
nv50_ir_target_gv100.cpp
nv50_ir_target_gv100.h
nv50_ir_target_nv50.cpp nv50/ir: convert system values to gl_system_value 2023-08-05 00:39:34 +02:00
nv50_ir_target_nv50.h
nv50_ir_target_nvc0.cpp nvc0: fix num_gprs for Volta+ 2023-07-20 23:19:58 +00:00
nv50_ir_target_nvc0.h
nv50_ir_util.cpp
nv50_ir_util.h nouveau: Drop BuildUtil::DataArray 2023-07-21 02:40:35 +00:00