[Mesa-dev] [PATCH 2/2] radv: enable VK_KHR_shader_float16_int8
Samuel Pitoiset
samuel.pitoiset at gmail.com
Fri Apr 12 06:53:36 UTC 2019
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/amd/vulkan/radv_device.c | 2 +-
src/amd/vulkan/radv_shader.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index dacaac173ae..c517b56cd0f 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -902,7 +902,7 @@ void radv_GetPhysicalDeviceFeatures2(
VkPhysicalDeviceFloat16Int8FeaturesKHR *features =
(VkPhysicalDeviceFloat16Int8FeaturesKHR*)ext;
bool enabled = pdevice->rad_info.chip_class >= VI;
- features->shaderFloat16 = VK_FALSE;
+ features->shaderFloat16 = enabled && HAVE_LLVM >= 0x0800;
features->shaderInt8 = enabled;
break;
}
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index 7cde5e728e4..898195a71d4 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -252,6 +252,7 @@ radv_shader_compile_to_nir(struct radv_device *device,
.variable_pointers = true,
.storage_8bit = true,
.int8 = true,
+ .float16 = true,
},
.ubo_ptr_type = glsl_vector_type(GLSL_TYPE_UINT, 2),
.ssbo_ptr_type = glsl_vector_type(GLSL_TYPE_UINT, 2),
--
2.21.0
More information about the mesa-dev
mailing list