glsl/ast/ir: Add 64-bit integer constant support

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 <airlied@redhat.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> [v2]
Reviewed-by: Matt Turner <mattst88@gmail.com> [v3]
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
Dave Airlie
2016-06-09 09:39:48 +10:00
committed by Ian Romanick
parent 249007d13c
commit bbce1c538d
8 changed files with 193 additions and 8 deletions
+7 -2
View File
@@ -1260,6 +1260,12 @@ emit_inline_vector_constructor(const glsl_type *type,
case GLSL_TYPE_BOOL:
data.b[i + base_component] = c->get_bool_component(i);
break;
case GLSL_TYPE_UINT64:
data.u64[i + base_component] = c->get_uint64_component(i);
break;
case GLSL_TYPE_INT64:
data.i64[i + base_component] = c->get_int64_component(i);
break;
default:
assert(!"Should not get here.");
break;
@@ -1267,8 +1273,7 @@ emit_inline_vector_constructor(const glsl_type *type,
}
/* Mask of fields to be written in the assignment. */
constant_mask |=
((1U << rhs_components) - 1) << base_lhs_component;
constant_mask |= ((1U << rhs_components) - 1) << base_lhs_component;
constant_components += rhs_components;
base_component += rhs_components;