diff options
author | Jason Ekstrand <[email protected]> | 2017-09-21 15:51:55 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-03-07 12:13:47 -0800 |
commit | ff9db1a4cc0eefece2d0485a169b2a289b2ff6ef (patch) | |
tree | abae254b6379ef442df9569d1c52b69ab7f4f32c /src/compiler/nir | |
parent | ddc4069122168feb34d4a272a6ef90ba1b4a07db (diff) |
nir/spirv: Add support for device groups
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r-- | src/compiler/nir/nir.h | 2 | ||||
-rw-r--r-- | src/compiler/nir/nir_lower_system_values.c | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index c676331000f..804a6561bff 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -1888,6 +1888,8 @@ typedef struct nir_shader_compiler_options { bool lower_cs_local_index_from_id; + bool lower_device_index_to_zero; + /** * Should nir_lower_io() create load_interpolated_input intrinsics? * diff --git a/src/compiler/nir/nir_lower_system_values.c b/src/compiler/nir/nir_lower_system_values.c index 3594f4ae5ce..fb560ee21bb 100644 --- a/src/compiler/nir/nir_lower_system_values.c +++ b/src/compiler/nir/nir_lower_system_values.c @@ -133,6 +133,11 @@ convert_block(nir_block *block, nir_builder *b) break; } + case SYSTEM_VALUE_DEVICE_INDEX: + if (b->shader->options->lower_device_index_to_zero) + sysval = nir_imm_int(b, 0); + break; + default: break; } |