forked from KhronosGroup/glslang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make modifications of GL_EXT_spirv_intrinsics
1. spirv_execution_mode_id and spirv_decorate_id could support specialization constants. The original implementation always assume only normal frontend constants are valid. It is not true. 2. spirv_type donesn't support type_specifier as an option of spirv_type_parameter. At present, only constant_expression is the valid option.
- Loading branch information
Showing
10 changed files
with
2,200 additions
and
2,188 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
spv.intrinsicsSpecConst.vert | ||
Validation failed | ||
// Module Version 10000 | ||
// Generated by (magic number): 8000a | ||
// Id's are bound by 13 | ||
|
||
Capability Shader | ||
1: ExtInstImport "GLSL.std.450" | ||
MemoryModel Logical GLSL450 | ||
EntryPoint Vertex 4 "main" 10 | ||
ExecutionModeId 4 DenormFlushToZero 7 | ||
Source GLSL 450 | ||
SourceExtension "GL_EXT_spirv_intrinsics" | ||
Name 4 "main" | ||
Name 7 "targetWidth" | ||
Name 10 "pointSize" | ||
Name 11 "builtIn" | ||
Decorate 7(targetWidth) SpecId 5 | ||
Decorate 10(pointSize) Location 0 | ||
Decorate 11(builtIn) SpecId 6 | ||
DecorateId 10(pointSize) BuiltIn 11(builtIn) | ||
2: TypeVoid | ||
3: TypeFunction 2 | ||
6: TypeInt 32 0 | ||
7(targetWidth): 6(int) SpecConstant 32 | ||
8: TypeFloat 32 | ||
9: TypePointer Output 8(float) | ||
10(pointSize): 9(ptr) Variable Output | ||
11(builtIn): 6(int) SpecConstant 1 | ||
12: 8(float) Constant 1082130432 | ||
4(main): 2 Function None 3 | ||
5: Label | ||
Store 10(pointSize) 12 | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#version 450 core | ||
|
||
#extension GL_EXT_spirv_intrinsics: enable | ||
|
||
layout(constant_id = 5) const uint targetWidth = 32; | ||
spirv_execution_mode_id(4460/*=DenormFlushToZero*/, targetWidth); | ||
|
||
layout(constant_id = 6) const uint builtIn = 1; | ||
spirv_decorate_id(11/*=BuiltIn*/, builtIn) out float pointSize; | ||
|
||
void main() | ||
{ | ||
pointSize = 4.0; | ||
} |
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
Oops, something went wrong.