forked from KhronosGroup/glslang
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request KhronosGroup#2977 from AMD-dwang/AMD_shader_early_…
…and_late_fragment_tests Add SPV_AMD_shader_early_and_late_fragment_tests
- Loading branch information
Showing
14 changed files
with
208 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.