mesa/src/compiler
Alejandro Piñeiro c0cfa4f53b nir: add new opcodes to map new v71 packing/conversion instructions
Since v71, broadcom hw include specific packing/conversion
instructions, so this commit adds opcodes to be able to make use of
them, specially for image stores:

   * pack_2x16_to_unorm_2x8 (on backend vftounorm8/vftosnorm8):
     2x16-bit floating point to 2x8-bit unorm/snorm

   * f2unorm_16/f2snorm_16 (on backend ftounorm16/ftosnorm16):
     floating point to 16-bit unorm/snorm

   * pack_2x16_to_unorm_2x10/pack_2x16_to_unorm_10_2 (on backend
     vftounorm10lo/vftounorm10hi): used to convert a floating point to
     a r10g10b10a2 unorm

   * pack_32_to_r11g11b10 (on backend v11fpack): packs 2 2x16 FP into
     R11G11B10.

   * pack_uint_32_to_r10g10b10a2 (on backend v10pack): pack 2 2x16
     integer into R10G10B10A2

   * pack_4x16_to_4x8 (on backend v8pack): packs 2 2x16 bit integer
     into 4x8 bits.

   * pack_2x32_to_2x16 (on backend vpack): 2x32 bit to 2x16 integer
     pack

For the latter, it can be easly confused with the existing
pack_32_2x16_split. But note that this one receives two 16bit integer,
and packs them on a 32bit integer. But broadcom opcode takes two 32bit
integer, takes the lower halfword, and packs them as 2x16 on a 32bit
integer.

Interestingly broadcom also defines a similar one that packs the
higher halfword. Not used yet.

Note that at this point we use agnostic names, even if we add a _v3d
suffix as they are only available for broadcom, in order to follow
current NIR conventions.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25726>
2023-11-20 08:20:31 +00:00
..
clc clc: Add missing idep_vtn 2023-11-02 11:37:46 +00:00
glsl glsl: Use unsigned instead of enum type in ir_variable_data 2023-11-17 20:08:49 +00:00
isaspec isaspec : fix isaspec build error in aosp 2023-10-13 11:09:40 +00:00
nir nir: add new opcodes to map new v71 packing/conversion instructions 2023-11-20 08:20:31 +00:00
spirv vtn: add hack for system values placed in CrossWorkgroup memory 2023-11-15 08:34:57 +00:00
builtin_types.py compiler/types: Use Python to generate code for builtin types 2023-09-16 15:17:01 +00:00
builtin_types_c.py compiler/types: Use a string table for builtin type names 2023-09-16 15:17:01 +00:00
builtin_types_cpp_h.py compiler/types: Use Python to generate code for builtin types 2023-09-16 15:17:01 +00:00
builtin_types_h.py compiler/types: Use Python to generate code for builtin types 2023-09-16 15:17:01 +00:00
glsl_types.c nir/types: Support vectors in glsl_get_length() 2023-11-02 20:28:46 +00:00
glsl_types.h compiler/types: Move comments and reorganize declarations 2023-10-25 01:51:12 +00:00
glsl_types_impl.h compiler/types: Add remaining type extraction functions and use them in C++ 2023-10-25 01:51:12 +00:00
meson.build compiler,vulkan,drm-shim: Remove unused include directories from meson.build 2023-10-27 01:35:10 +00:00
nir_gl_types.h compiler/types: Flip wrapping of remaining small data getters 2023-10-25 01:51:12 +00:00
nir_types.h compiler/types: Move C declarations into glsl_types.h 2023-10-07 00:42:54 +00:00
shader_enums.c compiler: Inline mesa_vertices_per_prim 2023-11-07 00:05:54 +00:00
shader_enums.h compiler: Make u_decomposed_prims_for_vertices available to CL 2023-11-07 00:05:54 +00:00
shader_info.h nak: Encode program headers 2023-11-14 00:48:06 +00:00