From bbce1c538dc0cb8bf3769510283d11847dc07540 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 9 Jun 2016 09:39:48 +1000 Subject: glsl/ast/ir: Add 64-bit integer constant support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds support for 64-bit integer constants to the parser, ast and ir. v2: fix a few issues found in testing. v3: Add missing ir_constant copy contructor support. v4: Use PRIu64 and PRId64 in printfs in glsl_parser_extras.cpp. Suggested by Nicolai. Rebase on Marek's linalloc changes. Signed-off-by: Dave Airlie Reviewed-by: Ian Romanick [v2] Reviewed-by: Matt Turner [v3] Reviewed-by: Nicolai Hähnle --- src/compiler/glsl/glsl_parser_extras.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/compiler/glsl/glsl_parser_extras.cpp') diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index 26251ec9bb7..f542ce7f8ba 100644 --- a/src/compiler/glsl/glsl_parser_extras.cpp +++ b/src/compiler/glsl/glsl_parser_extras.cpp @@ -1248,6 +1248,14 @@ ast_expression::print(void) const printf("%f ", primary_expression.double_constant); break; + case ast_int64_constant: + printf("%" PRId64 " ", primary_expression.int64_constant); + break; + + case ast_uint64_constant: + printf("%" PRIu64 " ", primary_expression.uint64_constant); + break; + case ast_bool_constant: printf("%s ", primary_expression.bool_constant -- cgit v1.2.3