diff options
author | Jason Ekstrand <[email protected]> | 2018-10-12 19:03:30 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-01-10 19:15:27 -0600 |
commit | b90e55a5d5d6e30f5a48d80bbb9aef578003b522 (patch) | |
tree | dff94ac7446d4d7b440f7c19ab490ec60c5bf350 /src/compiler | |
parent | 73ddfbeb858bb6d22da20bc80c6d91cf0a5e776a (diff) |
compiler/types: Serialize/deserialize subpass input types correctly
They have glsl_sampler_dim enum values of 8 and 9 which don't work when
you & them with 0x7. Fortunately, we have plenty of bits.
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl_types.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp index 00be0e00a9e..9d5451dbb7c 100644 --- a/src/compiler/glsl_types.cpp +++ b/src/compiler/glsl_types.cpp @@ -2311,14 +2311,14 @@ decode_type_from_blob(struct blob_reader *blob) explicit_stride, (u >> 10) & 0x1); } case GLSL_TYPE_SAMPLER: - return glsl_type::get_sampler_instance((enum glsl_sampler_dim) ((u >> 4) & 0x07), + return glsl_type::get_sampler_instance((enum glsl_sampler_dim) ((u >> 4) & 0x0f), (u >> 3) & 0x01, (u >> 2) & 0x01, (glsl_base_type) ((u >> 0) & 0x03)); case GLSL_TYPE_SUBROUTINE: return glsl_type::get_subroutine_instance(blob_read_string(blob)); case GLSL_TYPE_IMAGE: - return glsl_type::get_image_instance((enum glsl_sampler_dim) ((u >> 3) & 0x07), + return glsl_type::get_image_instance((enum glsl_sampler_dim) ((u >> 3) & 0x0f), (u >> 2) & 0x01, (glsl_base_type) ((u >> 0) & 0x03)); case GLSL_TYPE_ATOMIC_UINT: |