spirv: Add support for SPV_KHR_multiview

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
Jason Ekstrand
2017-03-21 15:24:25 -07:00
parent 99d0709553
commit f903f78b72
3 changed files with 9 additions and 0 deletions

View File

@@ -50,6 +50,7 @@ struct nir_spirv_supported_extensions {
bool image_read_without_format;
bool image_write_without_format;
bool int64;
bool multiview;
};
nir_function *spirv_to_nir(const uint32_t *words, size_t word_count,

View File

@@ -2730,6 +2730,10 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
spv_check_supported(image_write_without_format, cap);
break;
case SpvCapabilityMultiView:
spv_check_supported(multiview, cap);
break;
default:
unreachable("Unhandled capability");
}

View File

@@ -1036,6 +1036,10 @@ vtn_get_builtin_location(struct vtn_builder *b,
*location = SYSTEM_VALUE_DRAW_ID;
set_mode_system_value(mode);
break;
case SpvBuiltInViewIndex:
*location = SYSTEM_VALUE_VIEW_INDEX;
set_mode_system_value(mode);
break;
case SpvBuiltInHelperInvocation:
default:
unreachable("unsupported builtin");