Mesa (master): vtn: support SpvCapabilitySparseResidency
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jan 6 20:54:16 UTC 2021
Module: Mesa
Branch: master
Commit: f7a5b8ed35405e4c2ca447f4006d349619497744
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f7a5b8ed35405e4c2ca447f4006d349619497744
Author: Rhys Perry <pendingchaos02 at gmail.com>
Date: Mon Nov 23 14:14:57 2020 +0000
vtn: support SpvCapabilitySparseResidency
Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7774>
---
src/compiler/shader_info.h | 1 +
src/compiler/spirv/spirv_to_nir.c | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h
index 66634697832..fb9349100f9 100644
--- a/src/compiler/shader_info.h
+++ b/src/compiler/shader_info.h
@@ -76,6 +76,7 @@ struct spirv_supported_capabilities {
bool float_controls;
bool shader_clock;
bool shader_viewport_index_layer;
+ bool sparse_residency;
bool stencil_export;
bool storage_8bit;
bool storage_16bit;
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index fbe9d44b2c7..d5fe6483eb8 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -4256,11 +4256,14 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
break;
case SpvCapabilityLinkage:
- case SpvCapabilitySparseResidency:
vtn_warn("Unsupported SPIR-V capability: %s",
spirv_capability_to_string(cap));
break;
+ case SpvCapabilitySparseResidency:
+ spv_check_supported(sparse_residency, cap);
+ break;
+
case SpvCapabilityMinLod:
spv_check_supported(min_lod, cap);
break;
More information about the mesa-commit
mailing list