diff options
author | Marek Olšák <marek.olsak@amd.com> | 2023-03-10 23:03:58 -0500 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2023-04-26 17:37:24 +0100 |
commit | 32c5980e63d8a17c0428eaee8e498058e3806ed9 (patch) | |
tree | 10f08195ab5e0fe5dbfb04c27e1fda84b2056bd4 /src/compiler | |
parent | cf9829388a5c4a82409686f85079c55dbf7ee244 (diff) | |
download | mesa-32c5980e63d8a17c0428eaee8e498058e3806ed9.tar.gz mesa-32c5980e63d8a17c0428eaee8e498058e3806ed9.tar.bz2 mesa-32c5980e63d8a17c0428eaee8e498058e3806ed9.zip |
nir: fix 2 bugs in nir_create_passthrough_tcs
- VAR31 was ignored.
- Only a half of the 16-bit slot was passed through, though I'm not sure
if nir_lower_io handles vec8. The slots are only for GLES and I don't
think a passthrough TCS is possible with GLES.
Fixes: a8e84f50bc6c8 - nir: Add helper to create passthrough TCS shader
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21861>
(cherry picked from commit ace8a7068e0afde499f6f0146daa6041f4b9d250)
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/nir/nir_passthrough_tcs.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/compiler/nir/nir_passthrough_tcs.c b/src/compiler/nir/nir_passthrough_tcs.c index d0ddca21adc..0d2edbccd60 100644 --- a/src/compiler/nir/nir_passthrough_tcs.c +++ b/src/compiler/nir/nir_passthrough_tcs.c @@ -77,10 +77,9 @@ nir_create_passthrough_tcs_impl(const nir_shader_compiler_options *options, for (unsigned i = 0; i < num_locations; i++) { const struct glsl_type *type; unsigned semantic = locations[i]; - if (semantic < VARYING_SLOT_VAR31 && semantic != VARYING_SLOT_EDGE) + if ((semantic <= VARYING_SLOT_VAR31 && semantic != VARYING_SLOT_EDGE) || + semantic >= VARYING_SLOT_VAR0_16BIT) type = glsl_array_type(glsl_vec4_type(), 0, 0); - else if (semantic >= VARYING_SLOT_VAR0_16BIT) - type = glsl_array_type(glsl_vector_type(GLSL_TYPE_FLOAT16, 4), 0, 0); else continue; |