diff options
author | Jonathan Marek <[email protected]> | 2020-07-03 22:10:40 -0400 |
---|---|---|
committer | Jonathan Marek <[email protected]> | 2020-07-06 08:48:10 -0400 |
commit | 2044bdac4fbba0df471faa2a5736139c17c97857 (patch) | |
tree | 804f869e1cc680ace35b3ccb666a93bd8d7c4aac | |
parent | b76c6dcbc55d6d2bfdb92950ec5af00430aef943 (diff) |
Revert "nir: Add an option for lowering TessLevelInner/Outer to vecs"
This reverts commit d2df0761200ba9680f0d22defaa02c33fb051fcf.
The option is not used by any driver.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5744>
-rw-r--r-- | src/compiler/spirv/nir_spirv.h | 6 | ||||
-rw-r--r-- | src/compiler/spirv/vtn_variables.c | 24 |
2 files changed, 0 insertions, 30 deletions
diff --git a/src/compiler/spirv/nir_spirv.h b/src/compiler/spirv/nir_spirv.h index 70f29fd104e..acfcc084f41 100644 --- a/src/compiler/spirv/nir_spirv.h +++ b/src/compiler/spirv/nir_spirv.h @@ -69,12 +69,6 @@ struct spirv_to_nir_options { */ bool tess_levels_are_sysvals; - /* Whether to lower TessLevelInner/Outer from their SPIR-V declarations - * as arrays of floats to vec4 and vec2 respectively. This is the same as - * LowerTessLevel in GLSL. - */ - bool lower_tess_levels_to_vec; - struct spirv_supported_capabilities caps; /* Address format for various kinds of pointers. */ diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index 51b40801091..837a0abaadd 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -1620,11 +1620,6 @@ apply_var_decoration(struct vtn_builder *b, switch (builtin) { case SpvBuiltInTessLevelOuter: case SpvBuiltInTessLevelInner: - /* Since the compact flag is only valid on arrays, don't set it if - * we are lowering TessLevelInner/Outer to vec4/vec2. */ - if (!b->options || !b->options->lower_tess_levels_to_vec) - var_data->compact = true; - break; case SpvBuiltInClipDistance: case SpvBuiltInCullDistance: var_data->compact = true; @@ -1835,22 +1830,6 @@ var_decoration_cb(struct vtn_builder *b, struct vtn_value *val, int member, } } -static void -var_decoration_tess_level_vec_cb( - struct vtn_builder *b, struct vtn_value *val, int member, - const struct vtn_decoration *dec, void *void_var) -{ - struct vtn_variable *vtn_var = void_var; - if (dec->decoration == SpvDecorationBuiltIn) { - SpvBuiltIn builtin = dec->operands[0]; - if (builtin == SpvBuiltInTessLevelOuter) { - vtn_var->var->type = glsl_vector_type(GLSL_TYPE_FLOAT, 4); - } else if (builtin == SpvBuiltInTessLevelInner) { - vtn_var->var->type = glsl_vector_type(GLSL_TYPE_FLOAT, 2); - } - } -} - enum vtn_variable_mode vtn_storage_class_to_mode(struct vtn_builder *b, SpvStorageClass class, @@ -2436,9 +2415,6 @@ vtn_create_variable(struct vtn_builder *b, struct vtn_value *val, vtn_foreach_decoration(b, val, var_decoration_cb, var); vtn_foreach_decoration(b, val, ptr_decoration_cb, val->pointer); - if (b->options && b->options->lower_tess_levels_to_vec) - vtn_foreach_decoration(b, val, var_decoration_tess_level_vec_cb, var); - /* Propagate access flags from the OpVariable decorations. */ val->pointer->access |= var->access; |