HLSL: Handle greater/less depth modes. Fixes issue #489.
This commit is contained in:
parent
a305166ea4
commit
9e079535a0
9 changed files with 158 additions and 13 deletions
57
Test/baseResults/hlsl.depthGreater.frag.out
Executable file
57
Test/baseResults/hlsl.depthGreater.frag.out
Executable file
|
|
@ -0,0 +1,57 @@
|
|||
hlsl.depthGreater.frag
|
||||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
using depth_greater
|
||||
0:? Sequence
|
||||
0:2 Function Definition: PixelShaderFunction(f1; (global void)
|
||||
0:2 Function Parameters:
|
||||
0:2 'depth' (out float FragDepth)
|
||||
0:? Sequence
|
||||
0:3 move second child to first child (temp float)
|
||||
0:3 'depth' (out float FragDepth)
|
||||
0:3 Constant:
|
||||
0:3 0.200000
|
||||
0:? Linker Objects
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
|
||||
|
||||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
using depth_greater
|
||||
0:? Sequence
|
||||
0:2 Function Definition: PixelShaderFunction(f1; (global void)
|
||||
0:2 Function Parameters:
|
||||
0:2 'depth' (out float FragDepth)
|
||||
0:? Sequence
|
||||
0:3 move second child to first child (temp float)
|
||||
0:3 'depth' (out float FragDepth)
|
||||
0:3 Constant:
|
||||
0:3 0.200000
|
||||
0:? Linker Objects
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 10
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "PixelShaderFunction" 8
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
ExecutionMode 4 DepthGreater
|
||||
Name 4 "PixelShaderFunction"
|
||||
Name 8 "depth"
|
||||
Decorate 8(depth) BuiltIn FragDepth
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypePointer Output 6(float)
|
||||
8(depth): 7(ptr) Variable Output
|
||||
9: 6(float) Constant 1045220557
|
||||
4(PixelShaderFunction): 2 Function None 3
|
||||
5: Label
|
||||
Store 8(depth) 9
|
||||
Return
|
||||
FunctionEnd
|
||||
58
Test/baseResults/hlsl.depthLess.frag.out
Executable file
58
Test/baseResults/hlsl.depthLess.frag.out
Executable file
|
|
@ -0,0 +1,58 @@
|
|||
hlsl.depthLess.frag
|
||||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
using depth_less
|
||||
0:? Sequence
|
||||
0:2 Function Definition: PixelShaderFunction( (global float FragDepth)
|
||||
0:2 Function Parameters:
|
||||
0:? Sequence
|
||||
0:3 Sequence
|
||||
0:3 move second child to first child (temp float)
|
||||
0:? '@entryPointOutput' (out float unknown built-in variable)
|
||||
0:3 Constant:
|
||||
0:3 0.200000
|
||||
0:3 Branch: Return
|
||||
0:? Linker Objects
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
|
||||
|
||||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
using depth_less
|
||||
0:? Sequence
|
||||
0:2 Function Definition: PixelShaderFunction( (global float FragDepth)
|
||||
0:2 Function Parameters:
|
||||
0:? Sequence
|
||||
0:3 Sequence
|
||||
0:3 move second child to first child (temp float)
|
||||
0:? '@entryPointOutput' (out float unknown built-in variable)
|
||||
0:3 Constant:
|
||||
0:3 0.200000
|
||||
0:3 Branch: Return
|
||||
0:? Linker Objects
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 11
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "PixelShaderFunction" 8
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
ExecutionMode 4 DepthLess
|
||||
Name 4 "PixelShaderFunction"
|
||||
Name 8 "@entryPointOutput"
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypePointer Output 6(float)
|
||||
8(@entryPointOutput): 7(ptr) Variable Output
|
||||
9: 6(float) Constant 1045220557
|
||||
4(PixelShaderFunction): 2 Function None 3
|
||||
5: Label
|
||||
Store 8(@entryPointOutput) 9
|
||||
Return
|
||||
FunctionEnd
|
||||
4
Test/hlsl.depthGreater.frag
Normal file
4
Test/hlsl.depthGreater.frag
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
void PixelShaderFunction(out float depth : SV_DepthGreaterEqual)
|
||||
{
|
||||
depth = 0.2;
|
||||
}
|
||||
4
Test/hlsl.depthLess.frag
Normal file
4
Test/hlsl.depthLess.frag
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
float PixelShaderFunction() : SV_DepthLessEqual
|
||||
{
|
||||
return 0.2;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue