mesa/src/compiler
Karol Herbst 71c66c254b nir: add support for gather offsets
Values inside the offsets parameter of textureGatherOffsets are required to be
constants in the range of [GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET,
GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET].

As this range is never outside [-32, 31] for all existing drivers inside mesa,
we can simply store the offsets as a int8_t[4][2] array inside nir_tex_instr.

Right now only Nvidia hardware supports this in hardware, so we can turn this
on inside Nouveau for the NIR path as it is already enabled with the TGSI one.

v2: use memcpy instead of for loops
    add missing bits to nir_instr_set
    don't show offsets if they are all 0
v3: default offsets aren't all 0
v4: rename offsets -> tg4_offsets
    rename nir_tex_instr_has_explicit_offsets -> nir_tex_instr_has_explicit_tg4_offsets

Signed-off-by: Karol Herbst <kherbst@redhat.com>
2019-03-21 02:58:41 +00:00
..
glsl nir: add support for gather offsets 2019-03-21 02:58:41 +00:00
nir nir: add support for gather offsets 2019-03-21 02:58:41 +00:00
spirv nir/spirv: don't use bare types, remove assert in split vars for testing 2019-03-21 10:25:40 +10:00
.gitignore nir/spirv: Remove a duplicate spirv2nir from .gitignore 2016-10-04 07:43:15 -07:00
Android.glsl.gen.mk android,autotools,i965: Fix location of float64_glsl.h 2019-01-31 19:04:30 +00:00
Android.glsl.mk android: glsl: build shader cache sources 2017-02-20 16:30:37 +00:00
Android.mk Android: glsl: add rules to generate ir_expression*.h header files 2016-09-06 15:58:55 +01:00
Android.nir.gen.mk Android: fix a missing nir_intrinsics.h error 2018-07-21 08:50:23 +02:00
Android.nir.mk android: fix libmesa_nir build 2017-07-21 08:47:56 +03:00
blob.c compiler/blob: Add blob_skip_bytes 2018-07-09 23:02:33 -07:00
blob.h compiler/blob: Add blob_skip_bytes 2018-07-09 23:02:33 -07:00
builtin_type_macros.h glsl_types: vec8/vec16 support 2018-03-25 10:42:54 -04:00
glsl_types.cpp glsl: add cl_size and cl_alignment 2019-03-19 04:08:07 +00:00
glsl_types.h glsl: add cl_size and cl_alignment 2019-03-19 04:08:07 +00:00
Makefile.am configure: allow building with python3 2018-10-31 19:15:50 +00:00
Makefile.glsl.am automake: Add float64.glsl to dist tarball 2019-01-29 23:24:57 +00:00
Makefile.nir.am nir/algebraic: Add unit tests for bitsize validation 2018-12-05 17:57:40 +01:00
Makefile.sources nir: Add a new pass to lower array dereferences on vectors 2019-03-15 23:10:27 -05:00
Makefile.spirv.am spirv: autotools: add vtn_gather_types_c.py in distribution tarball 2018-04-10 10:37:46 +02:00
meson.build meson: Build with Python 3 2018-08-10 15:15:09 -07:00
nir_types.cpp glsl: add cl_size and cl_alignment 2019-03-19 04:08:07 +00:00
nir_types.h glsl: add cl_size and cl_alignment 2019-03-19 04:08:07 +00:00
SConscript spirv: Fix building with SCons 2018-03-30 14:33:03 -06:00
SConscript.glsl scons: Generate float64_glsl.h for glsl_to_nir fp64 lowering 2019-03-02 14:33:44 -08:00
SConscript.nir nir: mako all the intrinsics 2018-03-27 08:36:37 -04:00
SConscript.spirv spirv: Fix building with SCons 2018-03-30 14:33:03 -06:00
shader_enums.c mesa: add MESA_SHADER_KERNEL 2019-01-21 20:36:41 +01:00
shader_enums.h nir/vtn: add support for SpvBuiltInGlobalLinearId 2019-03-05 22:28:29 +01:00
shader_info.h nir/spirv: improve parsing of the memory model 2019-03-05 22:28:29 +01:00