diff options
author | Jason Ekstrand <[email protected]> | 2018-12-12 13:56:02 -0600 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-01-08 00:38:29 +0000 |
commit | a392ddb7810912ad36217849a06481229065cf11 (patch) | |
tree | f832effe61c7bd5fa3cd669093f44b6b154a7bef /src | |
parent | 70ed049cc6a682fba084cf57e06728fa5934881b (diff) |
glsl_type: Support serializing 8 and 16-bit types
Reviewed-by: Alejandro PiƱeiro <[email protected]>
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/glsl_types.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp index e6262371bd0..67f3967d0c1 100644 --- a/src/compiler/glsl_types.cpp +++ b/src/compiler/glsl_types.cpp @@ -2082,10 +2082,15 @@ encode_type_to_blob(struct blob *blob, const glsl_type *type) case GLSL_TYPE_UINT: case GLSL_TYPE_INT: case GLSL_TYPE_FLOAT: - case GLSL_TYPE_BOOL: + case GLSL_TYPE_FLOAT16: case GLSL_TYPE_DOUBLE: + case GLSL_TYPE_UINT8: + case GLSL_TYPE_INT8: + case GLSL_TYPE_UINT16: + case GLSL_TYPE_INT16: case GLSL_TYPE_UINT64: case GLSL_TYPE_INT64: + case GLSL_TYPE_BOOL: encoding = (type->base_type << 24) | (type->vector_elements << 4) | (type->matrix_columns); @@ -2168,10 +2173,15 @@ decode_type_from_blob(struct blob_reader *blob) case GLSL_TYPE_UINT: case GLSL_TYPE_INT: case GLSL_TYPE_FLOAT: - case GLSL_TYPE_BOOL: + case GLSL_TYPE_FLOAT16: case GLSL_TYPE_DOUBLE: + case GLSL_TYPE_UINT8: + case GLSL_TYPE_INT8: + case GLSL_TYPE_UINT16: + case GLSL_TYPE_INT16: case GLSL_TYPE_UINT64: case GLSL_TYPE_INT64: + case GLSL_TYPE_BOOL: return glsl_type::get_instance(base_type, (u >> 4) & 0x0f, u & 0x0f); case GLSL_TYPE_SAMPLER: return glsl_type::get_sampler_instance((enum glsl_sampler_dim) ((u >> 4) & 0x07), |