diff options
author | Jason Ekstrand <[email protected]> | 2020-04-22 14:05:13 -0500 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-24 09:23:59 +0000 |
commit | f4addfdde39070879ed8b1f08fe3bd85f2b0e392 (patch) | |
tree | 28b0ba769682558d79f4baff1984d11b9a374ec2 /src/compiler/spirv/nir_spirv.h | |
parent | 6211e79ba5f4be57c088fdf6140854f67c9a37ec (diff) |
spirv: Use nir_const_value for spec constants
When we originally wrote spirv_to_nir we didn't have a good scalar value
union to handily use so we rolled our own thing for spec constants. Now
that we have nir_const_value, we can use that and simplify a bunch of
the spec constant logic.
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Acked-by: Bas Nieuwenhuizen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4675>
Diffstat (limited to 'src/compiler/spirv/nir_spirv.h')
-rw-r--r-- | src/compiler/spirv/nir_spirv.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/compiler/spirv/nir_spirv.h b/src/compiler/spirv/nir_spirv.h index 37fbf351bc9..3d6f74e43ca 100644 --- a/src/compiler/spirv/nir_spirv.h +++ b/src/compiler/spirv/nir_spirv.h @@ -37,10 +37,7 @@ extern "C" { struct nir_spirv_specialization { uint32_t id; - union { - uint32_t data32; - uint64_t data64; - }; + nir_const_value value; bool defined_on_module; }; |