Mesa (main): lavapipe: enable KHR_shader_float16_int8
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Sep 16 04:47:05 UTC 2021
Module: Mesa
Branch: main
Commit: 3a27e406edf5339bb3f029f2542188d19eca4c6c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3a27e406edf5339bb3f029f2542188d19eca4c6c
Author: Dave Airlie <airlied at redhat.com>
Date: Mon Sep 6 10:30:40 2021 +1000
lavapipe: enable KHR_shader_float16_int8
Acked-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Reviewed-by: Roland Scheidegger <sroland at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11816>
---
src/gallium/frontends/lavapipe/lvp_device.c | 8 ++++++++
src/gallium/frontends/lavapipe/lvp_pipeline.c | 2 ++
2 files changed, 10 insertions(+)
diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c
index 95c3193f51a..1714a36b661 100644
--- a/src/gallium/frontends/lavapipe/lvp_device.c
+++ b/src/gallium/frontends/lavapipe/lvp_device.c
@@ -119,6 +119,7 @@ static const struct vk_device_extension_table lvp_device_extensions_supported =
.KHR_separate_depth_stencil_layouts = true,
.KHR_shader_atomic_int64 = true,
.KHR_shader_draw_parameters = true,
+ .KHR_shader_float16_int8 = true,
.KHR_storage_buffer_storage_class = true,
#ifdef LVP_USE_WSI_PLATFORM
.KHR_swapchain = true,
@@ -626,6 +627,13 @@ VKAPI_ATTR void VKAPI_CALL lvp_GetPhysicalDeviceFeatures2(
features->bufferDeviceAddressMultiDevice = false;
break;
}
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES: {
+ VkPhysicalDeviceShaderFloat16Int8Features *features =
+ (VkPhysicalDeviceShaderFloat16Int8Features*)ext;
+ features->shaderFloat16 = pdevice->pscreen->get_shader_param(pdevice->pscreen, PIPE_SHADER_FRAGMENT, PIPE_SHADER_CAP_FP16) != 0;
+ features->shaderInt8 = true;
+ break;
+ }
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR: {
VkPhysicalDeviceShaderAtomicInt64FeaturesKHR *features = (void *)ext;
features->shaderBufferInt64Atomics = true;
diff --git a/src/gallium/frontends/lavapipe/lvp_pipeline.c b/src/gallium/frontends/lavapipe/lvp_pipeline.c
index 07172fd789f..012ac0bd048 100644
--- a/src/gallium/frontends/lavapipe/lvp_pipeline.c
+++ b/src/gallium/frontends/lavapipe/lvp_pipeline.c
@@ -505,6 +505,8 @@ lvp_shader_compile_to_ir(struct lvp_pipeline *pipeline,
.subgroup_ballot = true,
.subgroup_quad = true,
.subgroup_vote = true,
+ .int8 = true,
+ .float16 = true,
},
.ubo_addr_format = nir_address_format_32bit_index_offset,
.ssbo_addr_format = nir_address_format_32bit_index_offset,
More information about the mesa-commit
mailing list