1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-01 16:24:12 +01:00

[dxbc] Decorate untyped write-only UAVs as NonReadable

This commit is contained in:
Philip Rebohle 2018-06-28 03:42:11 +02:00
parent 04bc13929f
commit c370eea948
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -888,6 +888,12 @@ namespace dxvk {
if (ins.controls.uavFlags().test(DxbcUavFlag::GloballyCoherent))
m_module.decorate(varId, spv::DecorationCoherent);
// On GPUs which don't support storageImageReadWithoutFormat,
// we have to decorate untyped UAVs as write-only
if (isUav && imageFormat == spv::ImageFormatUnknown
&& !m_moduleInfo.options.test(DxbcOption::UseStorageImageReadWithoutFormat))
m_module.decorate(varId, spv::DecorationNonReadable);
// Declare a specialization constant which will
// store whether or not the resource is bound.
const uint32_t specConstId = m_module.specConstBool(true);