aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_serialize.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason@jlekstrand.net>2020-07-29 14:00:29 -0500
committerMarge Bot <eric+marge@anholt.net>2020-11-05 23:36:46 +0000
commit84a8ca1db889564f2ca6bad9f65504615ef4080b (patch)
tree66f2ede54387564746b6a416e800fa0c9642002f /src/compiler/nir/nir_serialize.c
parentaa4ea9c7ea6375fc2460092a6059fc2a32c56efb (diff)
downloadexternal_mesa3d-84a8ca1db889564f2ca6bad9f65504615ef4080b.tar.gz
external_mesa3d-84a8ca1db889564f2ca6bad9f65504615ef4080b.tar.bz2
external_mesa3d-84a8ca1db889564f2ca6bad9f65504615ef4080b.zip
nir: Add new variable modes for ray-tracing
If we were desperate to reduce bits, we could probably also use shader_in/out for hit attributes as they really are an output from intersection shaders and read-only in any-hit and closest-hit shaders. However, other passes such as nir_gether_info like to assume that anything with nir_var_shader_in/out is indexed using vec4 locations for interface matching. It's easier to just add a new variable mode. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6479>
Diffstat (limited to 'src/compiler/nir/nir_serialize.c')
-rw-r--r--src/compiler/nir/nir_serialize.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/nir/nir_serialize.c b/src/compiler/nir/nir_serialize.c
index 2617a731f9e..7f99d2fd138 100644
--- a/src/compiler/nir/nir_serialize.c
+++ b/src/compiler/nir/nir_serialize.c
@@ -637,9 +637,9 @@ union packed_instr {
unsigned instr_type:4;
unsigned deref_type:3;
unsigned cast_type_same_as_last:1;
- unsigned modes:12; /* deref_var redefines this */
+ unsigned modes:14; /* deref_var redefines this */
unsigned packed_src_ssa_16bit:1; /* deref_var redefines this */
- unsigned _pad:3; /* deref_var redefines this */
+ unsigned _pad:1; /* deref_var redefines this */
unsigned dest:8;
} deref;
struct {
@@ -984,7 +984,7 @@ static void
write_deref(write_ctx *ctx, const nir_deref_instr *deref)
{
assert(deref->deref_type < 8);
- assert(deref->modes < (1 << 12));
+ assert(deref->modes < (1 << 14));
union packed_instr header;
header.u32 = 0;