summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2018-03-12 15:00:31 -0400
committerRob Clark <[email protected]>2018-03-25 10:42:54 -0400
commit2f181c8c183cc8b4d0450789bb20c2be48d32db3 (patch)
tree612dbe92456c69ce1d362abc2851c89201172dad /src/compiler/nir
parentf407edf3407396379e16b0be74b8d3b85d2ad7f0 (diff)
glsl_types: vec8/vec16 support
Not used in GL but 8 and 16 component vectors exist in OpenCL. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r--src/compiler/nir/nir_print.c4
-rw-r--r--src/compiler/nir/nir_validate.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c
index 7888dbd3384..21f13097651 100644
--- a/src/compiler/nir/nir_print.c
+++ b/src/compiler/nir/nir_print.c
@@ -85,7 +85,9 @@ print_register(nir_register *reg, print_state *state)
fprintf(fp, "r%u", reg->index);
}
-static const char *sizes[] = { "error", "vec1", "vec2", "vec3", "vec4" };
+static const char *sizes[] = { "error", "vec1", "vec2", "vec3", "vec4",
+ "error", "error", "error", "vec8",
+ "error", "error", "error", "vec16"};
static void
print_register_decl(nir_register *reg, print_state *state)
diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c
index a49948fbb48..725ba43152c 100644
--- a/src/compiler/nir/nir_validate.c
+++ b/src/compiler/nir/nir_validate.c
@@ -294,7 +294,9 @@ validate_ssa_def(nir_ssa_def *def, validate_state *state)
validate_assert(state, def->parent_instr == state->instr);
- validate_assert(state, def->num_components <= 4);
+ validate_assert(state, (def->num_components <= 4) ||
+ (def->num_components == 8) ||
+ (def->num_components == 16));
list_validate(&def->uses);
list_validate(&def->if_uses);