summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-03-23 12:10:42 +1100
committerTimothy Arceri <[email protected]>2018-03-28 09:59:38 +1100
commitb260efbd5eed4fd89e7928cfc2103f058a1e86d2 (patch)
tree535c7ca353b5a6ac9ecaaddcc780eba2c156eced /src
parent51f175028dcc69e055d7e612024f7bfe79d7ed5d (diff)
radeonsi/nir: fix input processing for packed varyings
The location was only being incremented the first time we processed a location. This meant we would incorrectly skip some elements of an array if the first element was packed and proccessed previously but other elements were not. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_nir.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
index 82b2440d0b5..6444a8b5dde 100644
--- a/src/gallium/drivers/radeonsi/si_shader_nir.c
+++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
@@ -852,7 +852,7 @@ bool si_nir_build_llvm(struct si_shader_context *ctx, struct nir_shader *nir)
/* Packed components share the same location so skip
* them if we have already processed the location.
*/
- if (processed_inputs & ((uint64_t)1 << loc)) {
+ if (processed_inputs & ((uint64_t)1 << (loc + i))) {
input_idx += 4;
continue;
}
@@ -870,8 +870,7 @@ bool si_nir_build_llvm(struct si_shader_context *ctx, struct nir_shader *nir)
bitcast_inputs(ctx, data, input_idx);
}
- processed_inputs |= ((uint64_t)1 << loc);
- loc++;
+ processed_inputs |= ((uint64_t)1 << (loc + i));
input_idx += 4;
}
}