diff options
author | Karol Herbst <kherbst@redhat.com> | 2018-07-19 12:44:20 +0200 |
---|---|---|
committer | Jérôme Glisse <jglisse@redhat.com> | 2018-07-25 12:43:49 -0400 |
commit | b7a81860242a733556668da8e8547dc9f5e5ce6a (patch) | |
tree | 9a719e0a142f44519403a0a909456a8d5a6a6d2f | |
parent | 589a89397778f7838d2391b871b64d0b7c3e92e6 (diff) |
TMP
-rw-r--r-- | src/compiler/nir/nir_lower_system_values.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/compiler/nir/nir_lower_system_values.c b/src/compiler/nir/nir_lower_system_values.c index af22481761..691940bb4e 100644 --- a/src/compiler/nir/nir_lower_system_values.c +++ b/src/compiler/nir/nir_lower_system_values.c @@ -94,11 +94,12 @@ convert_block(nir_block *block, nir_builder *b) * If the local work group size is variable we can't lower the global * invocation id here. */ - if (b->shader->info.cs.local_size_variable) { - break; - } + nir_ssa_def *group_size; + if (b->shader->info.cs.local_size_variable) + group_size = nir_load_local_group_size(b, bit_size); + else + group_size = build_local_group_size(b, bit_size); - nir_ssa_def *group_size = build_local_group_size(b, bit_size); nir_ssa_def *group_id = nir_load_work_group_id(b, bit_size); nir_ssa_def *local_id = nir_load_local_invocation_id(b, bit_size); |