diff options
author | Neil Roberts <[email protected]> | 2017-12-18 18:33:32 +0100 |
---|---|---|
committer | Alejandro PiƱeiro <[email protected]> | 2018-07-31 13:33:37 +0200 |
commit | 9fbe5bd811d2c9dad3f45bc77ff611d839af2534 (patch) | |
tree | 168f3695aa3fa1b1dd6595e0ca1d8756595a4d5d /src/compiler | |
parent | 739bb9e3d4da6b46e7a076a7aad7eb4ea919e7c7 (diff) |
nir/types: Add a wrapper to access gl_type
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/nir_types.cpp | 6 | ||||
-rw-r--r-- | src/compiler/nir_types.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp index 3a3864414f3..c8a29404969 100644 --- a/src/compiler/nir_types.cpp +++ b/src/compiler/nir_types.cpp @@ -81,6 +81,12 @@ glsl_get_column_type(const struct glsl_type *type) return type->column_type(); } +GLenum +glsl_get_gl_type(const struct glsl_type *type) +{ + return type->gl_type; +} + enum glsl_base_type glsl_get_base_type(const struct glsl_type *type) { diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h index 817b7a9b345..db3a4dee2d9 100644 --- a/src/compiler/nir_types.h +++ b/src/compiler/nir_types.h @@ -59,6 +59,8 @@ glsl_get_function_return_type(const struct glsl_type *type); const struct glsl_function_param * glsl_get_function_param(const struct glsl_type *type, unsigned index); +GLenum glsl_get_gl_type(const struct glsl_type *type); + enum glsl_base_type glsl_get_base_type(const struct glsl_type *type); unsigned glsl_get_vector_elements(const struct glsl_type *type); |