summaryrefslogtreecommitdiffstats
path: root/src/glsl/tests
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2015-04-20 10:16:55 +1000
committerDave Airlie <[email protected]>2015-07-23 17:25:25 +1000
commit57f24299b7fe0f7b20c2a3cf1e94c747825b568d (patch)
treec2de7c35d3d0eefe644110fa5f106d23010ba12b /src/glsl/tests
parentd16ff8ac783874c8ee74ef796b1c853829ff237d (diff)
glsl/types: add new subroutine type (v3.2)
This type will be used to store the name of subroutine types as in subroutine void myfunc(void); will store myfunc into a subroutine type. This is required to the parser can identify a subroutine type in a uniform decleration as a valid type, and also for looking up the type later. Also add contains_subroutine method. v2: handle subroutine to int comparisons, needed for lowering pass. v3: do subroutine to int with it's own IR operation to avoid hacking on asserts (Kayden) v3.1: fix warnings in this patch, fix nir, fix tgsi v3.2: fixup tests Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]> Signed-off-by: Dave Airlie <[email protected]> tests: fix warnings
Diffstat (limited to 'src/glsl/tests')
-rw-r--r--src/glsl/tests/uniform_initializer_utils.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glsl/tests/uniform_initializer_utils.cpp b/src/glsl/tests/uniform_initializer_utils.cpp
index b90bdcaed3b..5006387036f 100644
--- a/src/glsl/tests/uniform_initializer_utils.cpp
+++ b/src/glsl/tests/uniform_initializer_utils.cpp
@@ -102,6 +102,7 @@ generate_data_element(void *mem_ctx, const glsl_type *type,
case GLSL_TYPE_VOID:
case GLSL_TYPE_ERROR:
case GLSL_TYPE_INTERFACE:
+ case GLSL_TYPE_SUBROUTINE:
ASSERT_TRUE(false);
break;
}
@@ -134,6 +135,7 @@ generate_data_element(void *mem_ctx, const glsl_type *type,
case GLSL_TYPE_VOID:
case GLSL_TYPE_ERROR:
case GLSL_TYPE_INTERFACE:
+ case GLSL_TYPE_SUBROUTINE:
ASSERT_TRUE(false);
break;
}
@@ -238,6 +240,7 @@ verify_data(gl_constant_value *storage, unsigned storage_array_size,
case GLSL_TYPE_VOID:
case GLSL_TYPE_ERROR:
case GLSL_TYPE_INTERFACE:
+ case GLSL_TYPE_SUBROUTINE:
ASSERT_TRUE(false);
break;
}