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/mesa | |
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/mesa')
-rw-r--r-- | src/mesa/main/glspirv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/glspirv.c b/src/mesa/main/glspirv.c index 4a8165fa4e1..9a663074816 100644 --- a/src/mesa/main/glspirv.c +++ b/src/mesa/main/glspirv.c @@ -239,7 +239,7 @@ _mesa_spirv_to_nir(struct gl_context *ctx, for (unsigned i = 0; i < spirv_data->NumSpecializationConstants; ++i) { spec_entries[i].id = spirv_data->SpecializationConstantsIndex[i]; - spec_entries[i].data32 = spirv_data->SpecializationConstantsValue[i]; + spec_entries[i].value.u32 = spirv_data->SpecializationConstantsValue[i]; spec_entries[i].defined_on_module = false; } @@ -370,7 +370,7 @@ _mesa_SpecializeShaderARB(GLuint shader, for (unsigned i = 0; i < numSpecializationConstants; ++i) { spec_entries[i].id = pConstantIndex[i]; - spec_entries[i].data32 = pConstantValue[i]; + spec_entries[i].value.u32 = pConstantValue[i]; spec_entries[i].defined_on_module = false; } |