From: Ian Romanick Date: Thu, 15 Sep 2016 18:21:28 +0000 (-0700) Subject: glsl/standalone: Enable ARB_gpu_shader_int64 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8358e58f2534f7e60c452bed2adb628d75b055c3;p=mesa.git glsl/standalone: Enable ARB_gpu_shader_int64 v2: Add missing break in GLSL_TYPE_INT64 case. Notice by Matt. Signed-off-by: Ian Romanick Reviewed-by: Matt Turner --- 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;