From ff9db1a4cc0eefece2d0485a169b2a289b2ff6ef Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 21 Sep 2017 15:51:55 -0700 Subject: nir/spirv: Add support for device groups MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Samuel Iglesias Gonsálvez --- src/compiler/spirv/spirv_to_nir.c | 4 ++++ src/compiler/spirv/vtn_variables.c | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'src/compiler/spirv') diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 1c52f7ff615..f0122a43424 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -3283,6 +3283,10 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode, spv_check_supported(image_write_without_format, cap); break; + case SpvCapabilityDeviceGroup: + spv_check_supported(device_group, cap); + break; + case SpvCapabilityMultiView: spv_check_supported(multiview, cap); break; diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index 11d2aabac8c..da511a44b08 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -1293,6 +1293,10 @@ vtn_get_builtin_location(struct vtn_builder *b, *location = SYSTEM_VALUE_DRAW_ID; set_mode_system_value(b, mode); break; + case SpvBuiltInDeviceIndex: + *location = SYSTEM_VALUE_DEVICE_INDEX; + set_mode_system_value(b, mode); + break; case SpvBuiltInViewIndex: *location = SYSTEM_VALUE_VIEW_INDEX; set_mode_system_value(b, mode); -- cgit v1.2.3