[Mesa-dev] [PATCH 33/59] glsl/standalone: Enable ARB_gpu_shader_int64
Ian Romanick
idr at freedesktop.org
Wed Oct 26 00:59:39 UTC 2016
From: Ian Romanick <ian.d.romanick at intel.com>
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/compiler/glsl/ir_builder_print_visitor.cpp | 16 +++++++++++++---
src/compiler/glsl/standalone_scaffolding.cpp | 1 +
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/src/compiler/glsl/ir_builder_print_visitor.cpp b/src/compiler/glsl/ir_builder_print_visitor.cpp
index d7bba9b..e4fc02c 100644
--- a/src/compiler/glsl/ir_builder_print_visitor.cpp
+++ b/src/compiler/glsl/ir_builder_print_visitor.cpp
@@ -394,13 +394,23 @@ ir_builder_print_visitor::visit(ir_constant *ir)
memcpy(&v, &ir->value.d[i], sizeof(v));
if (v != 0)
- /* FIXME: This won't actually work until ARB_gpu_shader_int64
- * support lands.
- */
print_without_indent("r%04X_data.u64[%u] = 0x%016" PRIx64 "; /* %g */\n",
my_index, i, v, ir->value.d[i]);
break;
}
+ case GLSL_TYPE_UINT64:
+ if (ir->value.u64[i] != 0)
+ print_without_indent("r%04X_data.u64[%u] = %" PRIu64 ";\n",
+ my_index,
+ i,
+ ir->value.u64[i]);
+ break;
+ case GLSL_TYPE_INT64:
+ if (ir->value.i64[i] != 0)
+ print_without_indent("r%04X_data.i64[%u] = %" PRId64 ";\n",
+ my_index,
+ i,
+ ir->value.i64[i]);
case GLSL_TYPE_BOOL:
if (ir->value.u[i] != 0)
print_without_indent("r%04X_data.u[%u] = 1;\n", my_index, i);
diff --git a/src/compiler/glsl/standalone_scaffolding.cpp b/src/compiler/glsl/standalone_scaffolding.cpp
index 35e40d6..c653c19 100644
--- a/src/compiler/glsl/standalone_scaffolding.cpp
+++ b/src/compiler/glsl/standalone_scaffolding.cpp
@@ -166,6 +166,7 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
ctx->Extensions.ARB_fragment_layer_viewport = true;
ctx->Extensions.ARB_gpu_shader5 = true;
ctx->Extensions.ARB_gpu_shader_fp64 = true;
+ ctx->Extensions.ARB_gpu_shader_int64 = true;
ctx->Extensions.ARB_sample_shading = true;
ctx->Extensions.ARB_shader_bit_encoding = true;
ctx->Extensions.ARB_shader_draw_parameters = true;
--
2.5.5
More information about the mesa-dev
mailing list