Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/HansKristian-Work/dxil-spirv.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Kristian Arntzen <post@arntzen-software.no>2022-09-07 15:05:22 +0300
committerHans-Kristian Arntzen <post@arntzen-software.no>2022-09-07 15:12:42 +0300
commitd7be0510f3a4c93129440f0096180806e515812f (patch)
tree20fc98d51b223d3f84c8031760f47f1e4023f1e3 /dxil_converter.cpp
parent38d68d95e11fb86cea7ed58b49de51e56eee0dc4 (diff)
Do not tag SM 6.6 heap UAVs with readonly/writeonly.
Not safe since there might be descriptor aliasing here.
Diffstat (limited to 'dxil_converter.cpp')
-rw-r--r--dxil_converter.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/dxil_converter.cpp b/dxil_converter.cpp
index 4959bfc..fbf11ae 100644
--- a/dxil_converter.cpp
+++ b/dxil_converter.cpp
@@ -2683,6 +2683,16 @@ bool Converter::Impl::emit_global_heaps()
if (shader_analysis.require_uav_thread_group_coherence)
annotation->coherent = true;
+ if (annotation->resource_kind == DXIL::ResourceKind::StructuredBuffer ||
+ annotation->resource_kind == DXIL::ResourceKind::RawBuffer)
+ {
+ // In case there is aliasing through different declarations,
+ // we cannot emit NonWritable or NonReadable safely. Assume full read-write.
+ // Be a bit careful with typed resources since it's not always supported with read-write + typed.
+ annotation->tracking.has_read = true;
+ annotation->tracking.has_written = true;
+ }
+
info.uav_coherent = annotation->coherent;
info.uav_read = annotation->tracking.has_read;
info.uav_written = annotation->tracking.has_written;