diff options
author | Hans-Kristian Arntzen <post@arntzen-software.no> | 2020-04-03 12:21:41 +0300 |
---|---|---|
committer | Hans-Kristian Arntzen <post@arntzen-software.no> | 2020-04-03 12:50:50 +0300 |
commit | 28bf9057df1ff525695f3f80ebe9a3d1bb8f19de (patch) | |
tree | ff670c157bb9db28ae6a4bcb1b155890166c4d50 /spirv_hlsl.hpp | |
parent | e58e8d5dbe03ea2cc755dbaf43ffefa1b8d77bef (diff) |
HLSL: Add support for treating NonWritable UAV texture as SRV instead.
Diffstat (limited to 'spirv_hlsl.hpp')
-rw-r--r-- | spirv_hlsl.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spirv_hlsl.hpp b/spirv_hlsl.hpp index 29b38e62..acc15069 100644 --- a/spirv_hlsl.hpp +++ b/spirv_hlsl.hpp @@ -113,6 +113,11 @@ public: // Forces a storage buffer to always be declared as UAV, even if the readonly decoration is used. // By default, a readonly storage buffer will be declared as ByteAddressBuffer (SRV) instead. bool force_storage_buffer_as_uav = false; + + // Forces any storage image type marked as NonWritable to be considered an SRV instead. + // For this to work with function call parameters, NonWritable must be considered to be part of the type system + // so that NonWritable image arguments are also translated to Texture rather than RWTexture. + bool nonwritable_uav_texture_as_srv = false; }; explicit CompilerHLSL(std::vector<uint32_t> spirv_) |