Use t-namespace for ByteAddressBuffer.
FXC caught it, but not glslang, hm ...
This commit is contained in:
Родитель
918b451b7e
Коммит
cc532cb7b6
|
@ -1,5 +1,5 @@
|
|||
RWByteAddressBuffer wo : register(u1);
|
||||
ByteAddressBuffer ro : register(u0);
|
||||
ByteAddressBuffer ro : register(t0);
|
||||
|
||||
static uint3 gl_GlobalInvocationID;
|
||||
struct SPIRV_Cross_Input
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
RWByteAddressBuffer WriteOnly : register(u2);
|
||||
ByteAddressBuffer ReadOnly : register(u0);
|
||||
ByteAddressBuffer ReadOnly : register(t0);
|
||||
RWByteAddressBuffer ReadWrite : register(u1);
|
||||
|
||||
void comp_main()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
static const uint3 gl_WorkGroupSize = uint3(4u, 1u, 1u);
|
||||
|
||||
ByteAddressBuffer _22 : register(u0);
|
||||
ByteAddressBuffer _22 : register(t0);
|
||||
RWByteAddressBuffer _44 : register(u1);
|
||||
|
||||
static uint3 gl_GlobalInvocationID;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
RWByteAddressBuffer wo : register(u1);
|
||||
ByteAddressBuffer ro : register(u0);
|
||||
ByteAddressBuffer ro : register(t0);
|
||||
|
||||
static uint3 gl_GlobalInvocationID;
|
||||
struct SPIRV_Cross_Input
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
RWByteAddressBuffer WriteOnly : register(u2);
|
||||
ByteAddressBuffer ReadOnly : register(u0);
|
||||
ByteAddressBuffer ReadOnly : register(t0);
|
||||
RWByteAddressBuffer ReadWrite : register(u1);
|
||||
|
||||
void comp_main()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
static const uint3 gl_WorkGroupSize = uint3(4u, 1u, 1u);
|
||||
|
||||
ByteAddressBuffer _22 : register(u0);
|
||||
ByteAddressBuffer _22 : register(t0);
|
||||
RWByteAddressBuffer _44 : register(u1);
|
||||
|
||||
static uint3 gl_GlobalInvocationID;
|
||||
|
|
|
@ -2280,7 +2280,11 @@ string CompilerHLSL::to_resource_binding(const SPIRVariable &var)
|
|||
if (storage == StorageClassUniform)
|
||||
{
|
||||
if (has_decoration(type.self, DecorationBufferBlock))
|
||||
space = "u"; // UAV
|
||||
{
|
||||
uint64_t flags = get_buffer_block_flags(var);
|
||||
bool is_readonly = (flags & (1ull << DecorationNonWritable)) != 0;
|
||||
space = is_readonly ? "t" : "u"; // UAV
|
||||
}
|
||||
else if (has_decoration(type.self, DecorationBlock))
|
||||
space = "b"; // Constant buffers
|
||||
}
|
||||
|
|
|
@ -7,10 +7,10 @@ export PATH="./external/glslang-build/StandAlone:./external/spirv-tools-build/to
|
|||
echo "Using glslangValidation in: $(which glslangValidator)."
|
||||
echo "Using spirv-opt in: $(which spirv-opt)."
|
||||
|
||||
./test_shaders.py shaders --update || exit 1
|
||||
./test_shaders.py shaders --update --opt || exit 1
|
||||
./test_shaders.py shaders-msl --msl --update || exit 1
|
||||
./test_shaders.py shaders-msl --msl --update --opt || exit 1
|
||||
./test_shaders.py shaders-hlsl --hlsl --update || exit 1
|
||||
./test_shaders.py shaders-hlsl --hlsl --update --opt || exit 1
|
||||
./test_shaders.py shaders || exit 1
|
||||
./test_shaders.py shaders --opt || exit 1
|
||||
./test_shaders.py shaders-msl --msl || exit 1
|
||||
./test_shaders.py shaders-msl --msl --opt || exit 1
|
||||
./test_shaders.py shaders-hlsl --hlsl || exit 1
|
||||
./test_shaders.py shaders-hlsl --hlsl --opt || exit 1
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче