summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2016-06-09 06:38:57 +1000
committerIan Romanick <[email protected]>2017-01-20 15:41:23 -0800
commit8ce53d4a2f3f44b8fa00a6a04ec0816f38d788db (patch)
treef3a9e5801ddaad1c85a304f90a282d2e93ab41ab /src/mesa/state_tracker
parente90830bb8eb6b143551152916ad9eafbee7731b5 (diff)
glsl: Add basic ARB_gpu_shader_int64 types
This adds the builtins and the lexer support. To avoid too many warnings, it adds basic support to the type in a few other places in mesa, mostly in the trivial places. It also adds a query to be used later for if a type is an integer 32 or 64. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_glsl_types.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_glsl_types.cpp b/src/mesa/state_tracker/st_glsl_types.cpp
index 857e143287f..37c3164254a 100644
--- a/src/mesa/state_tracker/st_glsl_types.cpp
+++ b/src/mesa/state_tracker/st_glsl_types.cpp
@@ -67,6 +67,12 @@ st_glsl_attrib_type_size(const struct glsl_type *type, bool is_vs_input)
return 2;
}
break;
+ case GLSL_TYPE_UINT64:
+ case GLSL_TYPE_INT64:
+ if (type->vector_elements <= 2 || is_vs_input)
+ return 1;
+ else
+ return 2;
case GLSL_TYPE_ARRAY:
assert(type->length > 0);
return st_glsl_attrib_type_size(type->fields.array, is_vs_input) * type->length;