[Mesa-dev] [PATCH 52/77] glsl: add shader cache support for encoding double

Timothy Arceri timothy.arceri at collabora.com
Mon Oct 3 06:05:11 UTC 2016


---
 src/compiler/glsl/shader_cache.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp
index 1e49fbc..a8ca719 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -69,6 +69,7 @@ encode_type_to_blob(struct blob *blob, const glsl_type *type)
    case GLSL_TYPE_INT:
    case GLSL_TYPE_FLOAT:
    case GLSL_TYPE_BOOL:
+   case GLSL_TYPE_DOUBLE:
       encoding = (type->base_type << 24) |
          (type->vector_elements << 4) |
          (type->matrix_columns);
@@ -123,6 +124,7 @@ decode_type_from_blob(struct blob_reader *blob)
    case GLSL_TYPE_INT:
    case GLSL_TYPE_FLOAT:
    case GLSL_TYPE_BOOL:
+   case GLSL_TYPE_DOUBLE:
       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),
-- 
2.7.4



More information about the mesa-dev mailing list