v2: - Merge Float16 and Int8 capabilities into a single patch (Jason) - Merged patch that enabled SPIR-V front-end checks for these caps (except for Int8, which was already merged)
Reviewed-by: Jason Ekstrand <ja...@jlekstrand.net> (v1) --- src/compiler/shader_info.h | 1 + src/compiler/spirv/spirv_to_nir.c | 4 +++- src/intel/vulkan/anv_pipeline.c | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h index 3d871938751..4726c185243 100644 --- a/src/compiler/shader_info.h +++ b/src/compiler/shader_info.h @@ -38,6 +38,7 @@ struct spirv_supported_capabilities { bool descriptor_array_dynamic_indexing; bool device_group; bool draw_parameters; + bool float16; bool float64; bool geometry_streams; bool gcn_shader; diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 7e07de2bfc0..309ed6c59b0 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -3556,7 +3556,6 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode, case SpvCapabilityLinkage: case SpvCapabilityVector16: case SpvCapabilityFloat16Buffer: - case SpvCapabilityFloat16: case SpvCapabilitySparseResidency: vtn_warn("Unsupported SPIR-V capability: %s", spirv_capability_to_string(cap)); @@ -3573,6 +3572,9 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode, case SpvCapabilityFloat64: spv_check_supported(float64, cap); break; + case SpvCapabilityFloat16: + spv_check_supported(float16, cap); + break; case SpvCapabilityInt64: spv_check_supported(int64, cap); break; diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index e2024212bd9..0e8c4245df6 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -139,8 +139,10 @@ anv_shader_compile_to_nir(struct anv_device *device, .device_group = true, .draw_parameters = true, .float64 = pdevice->info.gen >= 8, + .float16 = pdevice->info.gen >= 8, .geometry_streams = true, .image_write_without_format = true, + .int8 = pdevice->info.gen >= 8, .int16 = pdevice->info.gen >= 8, .int64 = pdevice->info.gen >= 8, .min_lod = true, -- 2.17.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev