Mesa (master): intel/compiler: handle GLSL_TYPE_INTERFACE as GLSL_TYPE_STRUCT
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Mar 25 02:11:29 UTC 2019
Module: Mesa
Branch: master
Commit: fb024f5e72014efea5007684c7e61cd31a2cd9c8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fb024f5e72014efea5007684c7e61cd31a2cd9c8
Author: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
Date: Thu Mar 21 15:02:38 2019 -0700
intel/compiler: handle GLSL_TYPE_INTERFACE as GLSL_TYPE_STRUCT
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
---
src/intel/compiler/brw_fs.cpp | 2 +-
src/intel/compiler/brw_shader.cpp | 2 +-
src/intel/compiler/brw_vec4_visitor.cpp | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
index fb6c23e5f9c..964cde07215 100644
--- a/src/intel/compiler/brw_fs.cpp
+++ b/src/intel/compiler/brw_fs.cpp
@@ -542,6 +542,7 @@ type_size_scalar(const struct glsl_type *type)
case GLSL_TYPE_ARRAY:
return type_size_scalar(type->fields.array) * type->length;
case GLSL_TYPE_STRUCT:
+ case GLSL_TYPE_INTERFACE:
size = 0;
for (i = 0; i < type->length; i++) {
size += type_size_scalar(type->fields.structure[i].type);
@@ -558,7 +559,6 @@ type_size_scalar(const struct glsl_type *type)
return 1;
case GLSL_TYPE_VOID:
case GLSL_TYPE_ERROR:
- case GLSL_TYPE_INTERFACE:
case GLSL_TYPE_FUNCTION:
unreachable("not reached");
}
diff --git a/src/intel/compiler/brw_shader.cpp b/src/intel/compiler/brw_shader.cpp
index 1a9f097fd5b..f9e88d43539 100644
--- a/src/intel/compiler/brw_shader.cpp
+++ b/src/intel/compiler/brw_shader.cpp
@@ -55,6 +55,7 @@ brw_type_for_base_type(const struct glsl_type *type)
case GLSL_TYPE_ARRAY:
return brw_type_for_base_type(type->fields.array);
case GLSL_TYPE_STRUCT:
+ case GLSL_TYPE_INTERFACE:
case GLSL_TYPE_SAMPLER:
case GLSL_TYPE_ATOMIC_UINT:
/* These should be overridden with the type of the member when
@@ -72,7 +73,6 @@ brw_type_for_base_type(const struct glsl_type *type)
return BRW_REGISTER_TYPE_Q;
case GLSL_TYPE_VOID:
case GLSL_TYPE_ERROR:
- case GLSL_TYPE_INTERFACE:
case GLSL_TYPE_FUNCTION:
unreachable("not reached");
}
diff --git a/src/intel/compiler/brw_vec4_visitor.cpp b/src/intel/compiler/brw_vec4_visitor.cpp
index 7d6032a31e1..16ee31d730a 100644
--- a/src/intel/compiler/brw_vec4_visitor.cpp
+++ b/src/intel/compiler/brw_vec4_visitor.cpp
@@ -611,6 +611,7 @@ type_size_xvec4(const struct glsl_type *type, bool as_vec4)
assert(type->length > 0);
return type_size_xvec4(type->fields.array, as_vec4) * type->length;
case GLSL_TYPE_STRUCT:
+ case GLSL_TYPE_INTERFACE:
size = 0;
for (i = 0; i < type->length; i++) {
size += type_size_xvec4(type->fields.structure[i].type, as_vec4);
@@ -630,7 +631,6 @@ type_size_xvec4(const struct glsl_type *type, bool as_vec4)
return DIV_ROUND_UP(BRW_IMAGE_PARAM_SIZE, 4);
case GLSL_TYPE_VOID:
case GLSL_TYPE_ERROR:
- case GLSL_TYPE_INTERFACE:
case GLSL_TYPE_FUNCTION:
unreachable("not reached");
}
More information about the mesa-commit
mailing list