diff options
author | Dave Airlie <[email protected]> | 2016-06-09 09:39:48 +1000 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2017-01-20 15:41:23 -0800 |
commit | bbce1c538dc0cb8bf3769510283d11847dc07540 (patch) | |
tree | 54c9174e9a8ee7cd9c882e3de110d2ec248a1983 /src/compiler/glsl/ir.h | |
parent | 249007d13cf10cdc1359a15939b50f947f1cae6a (diff) |
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 <[email protected]>
Reviewed-by: Ian Romanick <[email protected]> [v2]
Reviewed-by: Matt Turner <[email protected]> [v3]
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ir.h')
-rw-r--r-- | src/compiler/glsl/ir.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/glsl/ir.h b/src/compiler/glsl/ir.h index a11dccd2e9b..afcbe295c39 100644 --- a/src/compiler/glsl/ir.h +++ b/src/compiler/glsl/ir.h @@ -2093,6 +2093,8 @@ union ir_constant_data { float f[16]; bool b[16]; double d[16]; + uint64_t u64[16]; + int64_t i64[16]; }; @@ -2104,6 +2106,8 @@ public: ir_constant(int i, unsigned vector_elements=1); ir_constant(float f, unsigned vector_elements=1); ir_constant(double d, unsigned vector_elements=1); + ir_constant(uint64_t u64, unsigned vector_elements=1); + ir_constant(int64_t i64, unsigned vector_elements=1); /** * Construct an ir_constant from a list of ir_constant values @@ -2154,6 +2158,8 @@ public: double get_double_component(unsigned i) const; int get_int_component(unsigned i) const; unsigned get_uint_component(unsigned i) const; + int64_t get_int64_component(unsigned i) const; + uint64_t get_uint64_component(unsigned i) const; /*@}*/ ir_constant *get_array_element(unsigned i) const; |