HLSL: Add bounds checking, shared with GLSL. Partially address #1032.
This commit is contained in:
parent
346dd7c747
commit
bdbbc68e29
7 changed files with 39 additions and 40 deletions
|
|
@ -45,7 +45,7 @@ gl_FragCoord origin is upper left
|
|||
0:24 direct index (layout( row_major std140) temp 4-element array of block{layout( row_major std140) uniform bool x, layout( row_major std140) uniform float y})
|
||||
0:24 'cb3' (layout( row_major std140) uniform 2-element array of 4-element array of block{layout( row_major std140) uniform bool x, layout( row_major std140) uniform float y})
|
||||
0:24 Constant:
|
||||
0:24 2 (const int)
|
||||
0:24 1 (const int)
|
||||
0:24 Constant:
|
||||
0:24 3 (const int)
|
||||
0:24 Constant:
|
||||
|
|
@ -113,7 +113,7 @@ gl_FragCoord origin is upper left
|
|||
0:24 direct index (layout( row_major std140) temp 4-element array of block{layout( row_major std140) uniform bool x, layout( row_major std140) uniform float y})
|
||||
0:24 'cb3' (layout( row_major std140) uniform 2-element array of 4-element array of block{layout( row_major std140) uniform bool x, layout( row_major std140) uniform float y})
|
||||
0:24 Constant:
|
||||
0:24 2 (const int)
|
||||
0:24 1 (const int)
|
||||
0:24 Constant:
|
||||
0:24 3 (const int)
|
||||
0:24 Constant:
|
||||
|
|
@ -231,7 +231,7 @@ gl_FragCoord origin is upper left
|
|||
54: 7(fvec4) FAdd 45 53
|
||||
ReturnValue 54
|
||||
56: Label
|
||||
58: 41(ptr) AccessChain 18(cb3) 21 57 20
|
||||
58: 41(ptr) AccessChain 18(cb3) 20 57 20
|
||||
59: 6(float) Load 58
|
||||
60: 7(fvec4) CompositeConstruct 59 59 59 59
|
||||
ReturnValue 60
|
||||
|
|
|
|||
|
|
@ -21,6 +21,6 @@ float4 main() : SV_Target0
|
|||
if (cb3[1][2].x)
|
||||
return cb1.x + cb2[1].y + c1;
|
||||
else
|
||||
return cb3[2][3].y;
|
||||
return cb3[1][3].y;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue