Add SPV_AMD_shader_early_and_late_fragment_tests
This commit is contained in:
parent
68c1880c09
commit
070863af69
14 changed files with 207 additions and 22 deletions
41
Test/baseResults/spv.earlyAndlateFragmentTests.frag.out
Normal file
41
Test/baseResults/spv.earlyAndlateFragmentTests.frag.out
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
spv.earlyAndlateFragmentTests.frag
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 16
|
||||
|
||||
Capability Shader
|
||||
Extension "SPV_AMD_shader_early_and_late_fragment_tests"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 8 11
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
ExecutionMode 4 EarlyAndLateFragmentTestsAMD
|
||||
ExecutionMode 4 DepthReplacing
|
||||
ExecutionMode 4 DepthLess
|
||||
Source GLSL 450
|
||||
SourceExtension "GL_ARB_fragment_shader_interlock"
|
||||
SourceExtension "GL_ARB_shader_stencil_export"
|
||||
SourceExtension "GL_EXT_fragment_shading_rate"
|
||||
Name 4 "main"
|
||||
Name 8 "gl_FragDepth"
|
||||
Name 11 "instanceIndex"
|
||||
Decorate 8(gl_FragDepth) BuiltIn FragDepth
|
||||
Decorate 11(instanceIndex) Flat
|
||||
Decorate 11(instanceIndex) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypePointer Output 6(float)
|
||||
8(gl_FragDepth): 7(ptr) Variable Output
|
||||
9: TypeInt 32 1
|
||||
10: TypePointer Input 9(int)
|
||||
11(instanceIndex): 10(ptr) Variable Input
|
||||
14: 6(float) Constant 1117913088
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
12: 9(int) Load 11(instanceIndex)
|
||||
13: 6(float) ConvertSToF 12
|
||||
15: 6(float) FDiv 13 14
|
||||
Store 8(gl_FragDepth) 15
|
||||
Return
|
||||
FunctionEnd
|
||||
|
|
@ -10,6 +10,7 @@ spv.shaderStencilExport.frag
|
|||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 8
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
ExecutionMode 4 StencilRefReplacingEXT
|
||||
Source GLSL 450
|
||||
SourceExtension "GL_ARB_shader_stencil_export"
|
||||
Name 4 "main"
|
||||
|
|
|
|||
12
Test/spv.earlyAndlateFragmentTests.frag
Normal file
12
Test/spv.earlyAndlateFragmentTests.frag
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#version 450 core
|
||||
#extension GL_EXT_fragment_shading_rate : enable
|
||||
#extension GL_ARB_shader_stencil_export : enable
|
||||
#extension GL_ARB_fragment_shader_interlock : enable
|
||||
#extension GL_AMD_shader_early_and_late_fragment_tests : enable
|
||||
layout(location = 0) flat in int instanceIndex;
|
||||
layout(early_and_late_fragment_tests_amd) in;
|
||||
layout(depth_less) out float gl_FragDepth;
|
||||
void main()
|
||||
{
|
||||
gl_FragDepth = float(instanceIndex) / float(81);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue