summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2016-09-15 11:21:28 -0700
committerIan Romanick <[email protected]>2017-01-20 15:41:23 -0800
commit8358e58f2534f7e60c452bed2adb628d75b055c3 (patch)
tree7c836b23dfc92dbaf2106c42a0aa79c66c203338
parent8dfea5348ca8b537d371876372ca83e1dfccaaa9 (diff)
glsl/standalone: Enable ARB_gpu_shader_int64
v2: Add missing break in GLSL_TYPE_INT64 case. Notice by Matt. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
-rw-r--r--src/compiler/glsl/ir_builder_print_visitor.cpp17
-rw-r--r--src/compiler/glsl/standalone_scaffolding.cpp1
2 files changed, 15 insertions, 3 deletions
diff --git a/src/compiler/glsl/ir_builder_print_visitor.cpp b/src/compiler/glsl/ir_builder_print_visitor.cpp
index 91a73c9efbc..2638e7d4222 100644
--- a/src/compiler/glsl/ir_builder_print_visitor.cpp
+++ b/src/compiler/glsl/ir_builder_print_visitor.cpp
@@ -396,13 +396,24 @@ 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]);
+ break;
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 546ba722ed3..5f1b2d0c312 100644
--- a/src/compiler/glsl/standalone_scaffolding.cpp
+++ b/src/compiler/glsl/standalone_scaffolding.cpp
@@ -178,6 +178,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;