DirectXShaderCompiler
DirectXShaderCompiler copied to clipboard
[SPIR-V] Decorations on `vk::BufferPointer` aren't applied with no error or warning
Description
Context: Trying to apply Coherent decoration on PhysicalStorageBuffer address space pointer, because due to lack of Vulkan memory model #7180 we can't use MakeAvailable/MakeVisible on individual load/store and atomics.
Steps to Reproduce
Put a decoration on a vk::BufferPointer variable
https://godbolt.org/z/4qW5zKPzc
Actual Behavior
There's no error or warning, OpDecorate not present in emitted SPIR-V
Environment
- DXC version
- Host Operating System
Actually even decorations on Inline Spir-V typed members don't stick either
struct PSInput
{
float4 position : SV_Position;
float4 color : COLOR0;
};
#include "nbl/builtin/hlsl/bda/__ref.hlsl"
using namespace nbl::hlsl;
struct Wrapper
{
[[vk::ext_decorate(5356)]] spirv::bda_pointer_t<uint32_t> p;
};
float4 PSMain(PSInput input) : SV_Target0
{
Wrapper w;
w.p = spirv::bitcast<spirv::bda_pointer_t<uint32_t> >(0x0ull);
spirv::store<uint32_t,4>(w.p,45);
return input.color * input.color;
}
without any warning or error either