-
Notifications
You must be signed in to change notification settings - Fork 858
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #2264: OpEntryPoint incorrectly including function parameters.
- Loading branch information
1 parent
68b2e15
commit c30d335
Showing
4 changed files
with
101 additions
and
10 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
72 changes: 72 additions & 0 deletions
72
Test/baseResults/spv.1.4.OpEntryPoint.opaqueParams.vert.out
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,72 @@ | ||
spv.1.4.OpEntryPoint.opaqueParams.vert | ||
// Module Version 10400 | ||
// Generated by (magic number): 80008 | ||
// Id's are bound by 45 | ||
|
||
Capability Shader | ||
Capability ImageQuery | ||
1: ExtInstImport "GLSL.std.450" | ||
MemoryModel Logical GLSL450 | ||
EntryPoint Vertex 4 "main" 41 42 43 | ||
Source GLSL 450 | ||
Name 4 "main" | ||
Name 18 "funOpaque(s21;t21;p1;" | ||
Name 15 "s2D" | ||
Name 16 "t2D" | ||
Name 17 "s" | ||
Name 40 "size" | ||
Name 41 "s2D" | ||
Name 42 "t2D" | ||
Name 43 "s" | ||
Decorate 41(s2D) DescriptorSet 0 | ||
Decorate 41(s2D) Binding 0 | ||
Decorate 42(t2D) DescriptorSet 0 | ||
Decorate 42(t2D) Binding 1 | ||
Decorate 43(s) DescriptorSet 0 | ||
Decorate 43(s) Binding 3 | ||
2: TypeVoid | ||
3: TypeFunction 2 | ||
6: TypeFloat 32 | ||
7: TypeImage 6(float) 2D sampled format:Unknown | ||
8: TypeSampledImage 7 | ||
9: TypePointer UniformConstant 8 | ||
10: TypePointer UniformConstant 7 | ||
11: TypeSampler | ||
12: TypePointer UniformConstant 11 | ||
13: TypeVector 6(float) 2 | ||
14: TypeFunction 13(fvec2) 9(ptr) 10(ptr) 12(ptr) | ||
21: TypeInt 32 1 | ||
22: 21(int) Constant 0 | ||
24: TypeVector 21(int) 2 | ||
30: 6(float) Constant 1056964608 | ||
31: 13(fvec2) ConstantComposite 30 30 | ||
32: TypeVector 6(float) 4 | ||
33: 6(float) Constant 0 | ||
39: TypePointer Function 13(fvec2) | ||
41(s2D): 9(ptr) Variable UniformConstant | ||
42(t2D): 10(ptr) Variable UniformConstant | ||
43(s): 12(ptr) Variable UniformConstant | ||
4(main): 2 Function None 3 | ||
5: Label | ||
40(size): 39(ptr) Variable Function | ||
44: 13(fvec2) FunctionCall 18(funOpaque(s21;t21;p1;) 41(s2D) 42(t2D) 43(s) | ||
Store 40(size) 44 | ||
Return | ||
FunctionEnd | ||
18(funOpaque(s21;t21;p1;): 13(fvec2) Function None 14 | ||
15(s2D): 9(ptr) FunctionParameter | ||
16(t2D): 10(ptr) FunctionParameter | ||
17(s): 12(ptr) FunctionParameter | ||
19: Label | ||
20: 8 Load 15(s2D) | ||
23: 7 Image 20 | ||
25: 24(ivec2) ImageQuerySizeLod 23 22 | ||
26: 13(fvec2) ConvertSToF 25 | ||
27: 7 Load 16(t2D) | ||
28: 11 Load 17(s) | ||
29: 8 SampledImage 27 28 | ||
34: 32(fvec4) ImageSampleExplicitLod 29 31 Lod 33 | ||
35: 13(fvec2) VectorShuffle 34 34 0 1 | ||
36: 13(fvec2) FMul 26 35 | ||
ReturnValue 36 | ||
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,15 @@ | ||
#version 450 | ||
|
||
layout(binding = 0) uniform sampler2D s2D; | ||
layout(binding = 1) uniform texture2D t2D; | ||
layout(binding = 3) uniform sampler s; | ||
|
||
vec2 funOpaque(in sampler2D s2D, texture2D t2D, sampler s) | ||
{ | ||
return textureSize(s2D, 0) * texture(sampler2D(t2D, s), vec2(0.5)).xy; | ||
} | ||
|
||
void main() | ||
{ | ||
vec2 size = funOpaque(s2D, t2D, s); | ||
} |
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