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

Timothy Arceri timothy.arceri at collabora.com
Wed Jun 1 06:23:49 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 dce8543..4565d01 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -68,6 +68,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);
@@ -122,6 +123,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.5.5



More information about the mesa-dev mailing list