blob: 9e51c43284f95e4feeaca9d6024fe5109509d07f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
//TEST:SIMPLE(filecheck=GLSL):-target glsl -entry main
// Test that pointer casts in GLSL generate constructor-style casts instead of C-style casts
// This addresses issue https://github.com/shader-slang/slang/issues/7838
//GLSL: BufferPointer__S1_2(address_0)
[shader("vertex")]
float4 main(uint vertexID : SV_VertexID, uint64_t address) : SV_Position
{
// This should generate BufferPointer(address) instead of (BufferPointer)address in GLSL
let buffer = ConstBufferPointer<float4>(address);
return buffer[vertexID];
}
|