yum-mirror/glslang

git clone https://git.yummers.dev/yum-mirror/glslang

John KessenichHLSL: Add bounds checking, shared with GLSL. Partially address #1032.bdbbc68e

main
340 B26 linesraw
1
2struct c1_t {
3    float4 x;
4};
5
6struct c2_t {
7    bool x;
8    float y;
9};
10
11ConstantBuffer<c1_t> cb1 : register(b12);
12ConstantBuffer<c2_t> cb2[3];
13ConstantBuffer<c2_t> cb3[2][4];
14
15cbuffer cbuff {
16    int c1;
17};
18
19float4 main() : SV_Target0
20{
21    if (cb3[1][2].x)
22        return cb1.x + cb2[1].y + c1;
23    else
24        return cb3[1][3].y;
25}
26