[Mesa-dev] [PATCH 08/50] glsl: Add 64-bit integer support to uniform initialiser code
Ian Romanick
idr at freedesktop.org
Tue Nov 29 03:25:23 UTC 2016
From: Dave Airlie <airlied at redhat.com>
Just add support to the double case, same code should work.
Signed-off-by: Dave Airlie <airlied at redhat.com>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
---
src/compiler/glsl/link_uniform_initializers.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/compiler/glsl/link_uniform_initializers.cpp b/src/compiler/glsl/link_uniform_initializers.cpp
index 52293e5..adabaf7 100644
--- a/src/compiler/glsl/link_uniform_initializers.cpp
+++ b/src/compiler/glsl/link_uniform_initializers.cpp
@@ -64,14 +64,14 @@ copy_constant_to_storage(union gl_constant_value *storage,
storage[i].f = val->value.f[i];
break;
case GLSL_TYPE_DOUBLE:
+ case GLSL_TYPE_UINT64:
+ case GLSL_TYPE_INT64:
/* XXX need to check on big-endian */
memcpy(&storage[i * 2].u, &val->value.d[i], sizeof(double));
break;
case GLSL_TYPE_BOOL:
storage[i].b = val->value.b[i] ? boolean_true : 0;
break;
- case GLSL_TYPE_INT64:
- case GLSL_TYPE_UINT64:
case GLSL_TYPE_ARRAY:
case GLSL_TYPE_STRUCT:
case GLSL_TYPE_IMAGE:
--
2.7.4
More information about the mesa-dev
mailing list