diff options
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r-- | src/compiler/glsl/ir_builder_print_visitor.cpp | 17 | ||||
-rw-r--r-- | src/compiler/glsl/standalone_scaffolding.cpp | 1 |
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; |