Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
e6cbc5b1
Commit
e6cbc5b1
authored
Dec 19, 2016
by
John Kessenich
Committed by
GitHub
Dec 19, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #624 from steve-lunarg/remapper-strip-removed
WIP: Remapper: remove debug info for IDs stripped in other passes
parents
4ba444b6
297754cf
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
246 additions
and
219 deletions
+246
-219
SPVRemapper.cpp
SPIRV/SPVRemapper.cpp
+48
-20
SPVRemapper.h
SPIRV/SPVRemapper.h
+2
-2
remap.basic.dcefunc.frag.out
Test/baseResults/remap.basic.dcefunc.frag.out
+14
-15
remap.basic.none.frag.out
Test/baseResults/remap.basic.none.frag.out
+12
-12
remap.basic.strip.frag.out
Test/baseResults/remap.basic.strip.frag.out
+10
-10
remap.hlsl.sample.basic.none.frag.out
Test/baseResults/remap.hlsl.sample.basic.none.frag.out
+11
-11
remap.hlsl.sample.basic.strip.frag.out
Test/baseResults/remap.hlsl.sample.basic.strip.frag.out
+5
-5
remap.hlsl.templatetypes.none.frag.out
Test/baseResults/remap.hlsl.templatetypes.none.frag.out
+6
-6
remap.similar_1a.none.frag.out
Test/baseResults/remap.similar_1a.none.frag.out
+58
-58
remap.similar_1b.none.frag.out
Test/baseResults/remap.similar_1b.none.frag.out
+60
-60
remap.switch.none.frag.out
Test/baseResults/remap.switch.none.frag.out
+20
-20
No files found.
SPIRV/SPVRemapper.cpp
View file @
e6cbc5b1
...
...
@@ -327,12 +327,10 @@ namespace spv {
bound
(
maxBound
);
// reset header ID bound to as big as it now needs to be
}
// Mark debug instructions for stripping
void
spirvbin_t
::
stripDebug
()
{
if
((
options
&
STRIP
)
==
0
)
return
;
// build local Id and name maps
// Strip instructions in the stripOp set: debug info.
process
(
[
&
](
spv
::
Op
opCode
,
unsigned
start
)
{
// remember opcodes we want to strip later
...
...
@@ -343,6 +341,32 @@ namespace spv {
op_fn_nop
);
}
// Mark instructions that refer to now-removed IDs for stripping
void
spirvbin_t
::
stripDeadRefs
()
{
process
(
[
&
](
spv
::
Op
opCode
,
unsigned
start
)
{
// strip opcodes pointing to removed data
switch
(
opCode
)
{
case
spv
:
:
OpName
:
case
spv
:
:
OpMemberName
:
case
spv
:
:
OpDecorate
:
case
spv
:
:
OpMemberDecorate
:
if
(
idPosR
.
find
(
asId
(
start
+
1
))
==
idPosR
.
end
())
stripInst
(
start
);
break
;
default
:
break
;
// leave it alone
}
return
true
;
},
op_fn_nop
);
strip
();
}
// Update local maps of ID, type, etc positions
void
spirvbin_t
::
buildLocalMaps
()
{
msg
(
2
,
2
,
std
::
string
(
"build local maps: "
));
...
...
@@ -351,7 +375,6 @@ namespace spv {
idMapL
.
clear
();
// preserve nameMap, so we don't clear that.
fnPos
.
clear
();
fnPosDCE
.
clear
();
fnCalls
.
clear
();
typeConstPos
.
clear
();
idPosR
.
clear
();
...
...
@@ -366,10 +389,6 @@ namespace spv {
// build local Id and name maps
process
(
[
&
](
spv
::
Op
opCode
,
unsigned
start
)
{
// remember opcodes we want to strip later
if
((
options
&
STRIP
)
&&
isStripOp
(
opCode
))
stripInst
(
start
);
unsigned
word
=
start
+
1
;
spv
::
Id
typeId
=
spv
::
NoResult
;
...
...
@@ -957,7 +976,6 @@ namespace spv {
if
(
call_it
==
fnCalls
.
end
()
||
call_it
->
second
==
0
)
{
changed
=
true
;
stripRange
.
push_back
(
fn
->
second
);
fnPosDCE
.
insert
(
*
fn
);
// decrease counts of called functions
process
(
...
...
@@ -1011,11 +1029,15 @@ namespace spv {
// Remove single-use function variables + associated decorations and names
process
(
[
&
](
spv
::
Op
opCode
,
unsigned
start
)
{
if
((
opCode
==
spv
::
OpVariable
&&
varUseCount
[
asId
(
start
+
2
)]
==
1
)
||
(
opCode
==
spv
::
OpDecorate
&&
varUseCount
[
asId
(
start
+
1
)]
==
1
)
||
(
opCode
==
spv
::
OpName
&&
varUseCount
[
asId
(
start
+
1
)]
==
1
))
{
stripInst
(
start
);
}
spv
::
Id
id
=
spv
::
NoResult
;
if
(
opCode
==
spv
::
OpVariable
)
id
=
asId
(
start
+
2
);
if
(
opCode
==
spv
::
OpDecorate
||
opCode
==
spv
::
OpName
)
id
=
asId
(
start
+
1
);
if
(
id
!=
spv
::
NoResult
&&
varUseCount
[
id
]
==
1
)
stripInst
(
start
);
return
true
;
},
op_fn_nop
);
...
...
@@ -1276,25 +1298,31 @@ namespace spv {
// Set up opcode tables from SpvDoc
spv
::
Parameterize
();
validate
();
// validate header
buildLocalMaps
();
validate
();
// validate header
buildLocalMaps
();
// build ID maps
msg
(
3
,
4
,
std
::
string
(
"ID bound: "
)
+
std
::
to_string
(
bound
()));
if
(
options
&
STRIP
)
stripDebug
();
strip
();
// strip out data we decided to eliminate
if
(
options
&
OPT_LOADSTORE
)
optLoadStore
();
if
(
options
&
OPT_FWD_LS
)
forwardLoadStores
();
if
(
options
&
DCE_FUNCS
)
dceFuncs
();
if
(
options
&
DCE_VARS
)
dceVars
();
if
(
options
&
DCE_TYPES
)
dceTypes
();
strip
();
// strip out data we decided to eliminate
strip
();
// strip out data we decided to eliminate
stripDeadRefs
();
// remove references to things we DCEed
// after the last strip, we must clean any debug info referring to now-deleted data
if
(
options
&
MAP_TYPES
)
mapTypeConst
();
if
(
options
&
MAP_NAMES
)
mapNames
();
if
(
options
&
MAP_FUNCS
)
mapFnBodies
();
mapRemainder
();
// map any unmapped IDs
applyMap
();
// Now remap each shader to the new IDs we've come up with
if
(
options
&
MAP_ALL
)
{
mapRemainder
();
// map any unmapped IDs
applyMap
();
// Now remap each shader to the new IDs we've come up with
}
}
// remap from a memory image
...
...
SPIRV/SPVRemapper.h
View file @
e6cbc5b1
...
...
@@ -239,7 +239,8 @@ private:
void
applyMap
();
// remap per local name map
void
mapRemainder
();
// map any IDs we haven't touched yet
void
stripDebug
();
// strip debug info
void
stripDebug
();
// strip all debug info
void
stripDeadRefs
();
// strips debug info for now-dead references after DCE
void
strip
();
// remove debug symbols
std
::
vector
<
spirword_t
>
spv
;
// SPIR words
...
...
@@ -264,7 +265,6 @@ private:
// Function start and end. use unordered_map because we'll have
// many fewer functions than IDs.
std
::
unordered_map
<
spv
::
Id
,
range_t
>
fnPos
;
std
::
unordered_map
<
spv
::
Id
,
range_t
>
fnPosDCE
;
// deleted functions
// Which functions are called, anywhere in the module, with a call count
std
::
unordered_map
<
spv
::
Id
,
int
>
fnCalls
;
...
...
Test/baseResults/remap.basic.dcefunc.frag.out
View file @
e6cbc5b1
...
...
@@ -3,34 +3,33 @@ Warning, version 450 is not yet complete; most version-specific features are pre
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by
19
// Id's are bound by
22
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 1
4 16
EntryPoint Fragment 4 "main" 1
7 19
ExecutionMode 4 OriginUpperLeft
Source GLSL 450
Name 4 "main"
Name 9 "dead_fn("
Name 14 "outf4"
Name 16 "inf"
Name 17 "outf4"
Name 19 "inf"
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 3
8: TypeFunction 7(fvec3)
1
0
: 6(float) Constant 0
1
1: 7(fvec3) ConstantComposite 10 10 10
1
2
: TypeVector 6(float) 4
1
3: TypePointer Output 12
(fvec4)
1
4(outf4): 13
(ptr) Variable Output
1
5
: TypePointer Input 6(float)
1
6(inf): 15
(ptr) Variable Input
1
1
: 6(float) Constant 0
1
2: 7(fvec3) ConstantComposite 11 11 11
1
5
: TypeVector 6(float) 4
1
6: TypePointer Output 15
(fvec4)
1
7(outf4): 16
(ptr) Variable Output
1
8
: TypePointer Input 6(float)
1
9(inf): 18
(ptr) Variable Input
4(main): 2 Function None 3
5: Label
17: 6(float) Load 16
(inf)
18: 12(fvec4) CompositeConstruct 17 17 17 17
Store 1
4(outf4) 18
20: 6(float) Load 19
(inf)
21: 15(fvec4) CompositeConstruct 20 20 20 20
Store 1
7(outf4) 21
Return
FunctionEnd
Test/baseResults/remap.basic.none.frag.out
View file @
e6cbc5b1
...
...
@@ -3,18 +3,18 @@ Warning, version 450 is not yet complete; most version-specific features are pre
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 2
0
// Id's are bound by 2
2
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 1
5 17
EntryPoint Fragment 4 "main" 1
7 19
ExecutionMode 4 OriginUpperLeft
Source GLSL 450
Name 4 "main"
Name 9 "dead_fn("
Name 1
5
"outf4"
Name 1
7
"inf"
Name 1
7
"outf4"
Name 1
9
"inf"
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
...
...
@@ -22,16 +22,16 @@ Warning, version 450 is not yet complete; most version-specific features are pre
8: TypeFunction 7(fvec3)
11: 6(float) Constant 0
12: 7(fvec3) ConstantComposite 11 11 11
1
3
: TypeVector 6(float) 4
1
4: TypePointer Output 13
(fvec4)
1
5(outf4): 14
(ptr) Variable Output
1
6
: TypePointer Input 6(float)
1
7(inf): 16
(ptr) Variable Input
1
5
: TypeVector 6(float) 4
1
6: TypePointer Output 15
(fvec4)
1
7(outf4): 16
(ptr) Variable Output
1
8
: TypePointer Input 6(float)
1
9(inf): 18
(ptr) Variable Input
4(main): 2 Function None 3
5: Label
18: 6(float) Load 17
(inf)
19: 13(fvec4) CompositeConstruct 18 18 18 18
Store 1
5(outf4) 19
20: 6(float) Load 19
(inf)
21: 15(fvec4) CompositeConstruct 20 20 20 20
Store 1
7(outf4) 21
Return
FunctionEnd
9(dead_fn(): 7(fvec3) Function None 8
...
...
Test/baseResults/remap.basic.strip.frag.out
View file @
e6cbc5b1
...
...
@@ -3,12 +3,12 @@ Warning, version 450 is not yet complete; most version-specific features are pre
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 2
0
// Id's are bound by 2
2
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 1
5 17
EntryPoint Fragment 4 "main" 1
7 19
ExecutionMode 4 OriginUpperLeft
2: TypeVoid
3: TypeFunction 2
...
...
@@ -17,16 +17,16 @@ Warning, version 450 is not yet complete; most version-specific features are pre
8: TypeFunction 7(fvec3)
11: 6(float) Constant 0
12: 7(fvec3) ConstantComposite 11 11 11
1
3
: TypeVector 6(float) 4
1
4: TypePointer Output 13
(fvec4)
1
5: 14
(ptr) Variable Output
1
6
: TypePointer Input 6(float)
1
7: 16
(ptr) Variable Input
1
5
: TypeVector 6(float) 4
1
6: TypePointer Output 15
(fvec4)
1
7: 16
(ptr) Variable Output
1
8
: TypePointer Input 6(float)
1
9: 18
(ptr) Variable Input
4: 2 Function None 3
5: Label
18: 6(float) Load 17
19: 13(fvec4) CompositeConstruct 18 18 18 18
Store 1
5 19
20: 6(float) Load 19
21: 15(fvec4) CompositeConstruct 20 20 20 20
Store 1
7 21
Return
FunctionEnd
9: 7(fvec3) Function None 8
...
...
Test/baseResults/remap.hlsl.sample.basic.none.frag.out
View file @
e6cbc5b1
...
...
@@ -3,7 +3,7 @@ WARNING: 0:4: 'immediate sampler state' : unimplemented
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 19
0
// Id's are bound by 19
1
Capability Shader
Capability Sampled1D
...
...
@@ -57,9 +57,9 @@ WARNING: 0:4: 'immediate sampler state' : unimplemented
Name 173 "psout"
Name 180 "Color"
Name 184 "Depth"
Name 18
7
"g_sSamp2d"
Name 18
8
"g_sSamp2D_b"
Name 1
89
"g_tTex1df4a"
Name 18
8
"g_sSamp2d"
Name 18
9
"g_sSamp2D_b"
Name 1
90
"g_tTex1df4a"
Decorate 41(g_tTex1df4) DescriptorSet 0
Decorate 41(g_tTex1df4) Binding 0
Decorate 45(g_sSamp) DescriptorSet 0
...
...
@@ -77,10 +77,10 @@ WARNING: 0:4: 'immediate sampler state' : unimplemented
Decorate 165(g_tTexcdu4) DescriptorSet 0
Decorate 180(Color) Location 0
Decorate 184(Depth) BuiltIn FragDepth
Decorate 18
7
(g_sSamp2d) DescriptorSet 0
Decorate 18
8
(g_sSamp2D_b) DescriptorSet 0
Decorate 1
89
(g_tTex1df4a) DescriptorSet 0
Decorate 1
89
(g_tTex1df4a) Binding 1
Decorate 18
8
(g_sSamp2d) DescriptorSet 0
Decorate 18
9
(g_sSamp2D_b) DescriptorSet 0
Decorate 1
90
(g_tTex1df4a) DescriptorSet 0
Decorate 1
90
(g_tTex1df4a) Binding 1
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
...
...
@@ -184,9 +184,9 @@ WARNING: 0:4: 'immediate sampler state' : unimplemented
180(Color): 179(ptr) Variable Output
183: TypePointer Output 35(float)
184(Depth): 183(ptr) Variable Output
18
7
(g_sSamp2d): 44(ptr) Variable UniformConstant
18
8
(g_sSamp2D_b): 44(ptr) Variable UniformConstant
1
89
(g_tTex1df4a): 40(ptr) Variable UniformConstant
18
8
(g_sSamp2d): 44(ptr) Variable UniformConstant
18
9
(g_sSamp2D_b): 44(ptr) Variable UniformConstant
1
90
(g_tTex1df4a): 40(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(mtest): 8(ptr) Variable Function
...
...
Test/baseResults/remap.hlsl.sample.basic.strip.frag.out
View file @
e6cbc5b1
...
...
@@ -3,7 +3,7 @@ WARNING: 0:4: 'immediate sampler state' : unimplemented
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 19
0
// Id's are bound by 19
1
Capability Shader
Capability Sampled1D
...
...
@@ -28,10 +28,10 @@ WARNING: 0:4: 'immediate sampler state' : unimplemented
Decorate 165 DescriptorSet 0
Decorate 180 Location 0
Decorate 184 BuiltIn FragDepth
Decorate 187 DescriptorSet 0
Decorate 188 DescriptorSet 0
Decorate 189 DescriptorSet 0
Decorate 189 Binding 1
Decorate 190 DescriptorSet 0
Decorate 190 Binding 1
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
...
...
@@ -135,9 +135,9 @@ WARNING: 0:4: 'immediate sampler state' : unimplemented
180: 179(ptr) Variable Output
183: TypePointer Output 35(float)
184: 183(ptr) Variable Output
187: 44(ptr) Variable UniformConstant
188: 44(ptr) Variable UniformConstant
189: 40(ptr) Variable UniformConstant
189: 44(ptr) Variable UniformConstant
190: 40(ptr) Variable UniformConstant
4: 2 Function None 3
5: Label
9: 8(ptr) Variable Function
...
...
Test/baseResults/remap.hlsl.templatetypes.none.frag.out
View file @
e6cbc5b1
remap.hlsl.templatetypes.none.frag
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 1
49
// Id's are bound by 1
50
Capability Shader
Capability Float64
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 146 14
8
EntryPoint Fragment 4 "main" 146 14
9
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 9 "r00"
...
...
@@ -39,9 +39,9 @@ remap.hlsl.templatetypes.none.frag
Name 136 "r65"
Name 141 "r66"
Name 146 "@entryPointOutput"
Name 14
8
"input"
Name 14
9
"input"
Decorate 146(@entryPointOutput) Location 0
Decorate 14
8
(input) Location 0
Decorate 14
9
(input) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
...
...
@@ -157,8 +157,8 @@ remap.hlsl.templatetypes.none.frag
144: 139 ConstantComposite 72 126 142 143
145: TypePointer Output 6(float)
146(@entryPointOutput): 145(ptr) Variable Output
14
7
: TypePointer Input 7(fvec4)
14
8(input): 147
(ptr) Variable Input
14
8
: TypePointer Input 7(fvec4)
14
9(input): 148
(ptr) Variable Input
4(main): 2 Function None 3
5: Label
9(r00): 8(ptr) Variable Function
...
...
Test/baseResults/remap.similar_1a.none.frag.out
View file @
e6cbc5b1
...
...
@@ -3,12 +3,12 @@ Warning, version 450 is not yet complete; most version-specific features are pre
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 8
2
// Id's are bound by 8
6
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 5
0 69 71
EntryPoint Fragment 4 "main" 5
3 73 75
ExecutionMode 4 OriginUpperLeft
Source GLSL 450
Name 4 "main"
...
...
@@ -18,13 +18,13 @@ Warning, version 450 is not yet complete; most version-specific features are pre
Name 13 "bound"
Name 17 "r"
Name 19 "x"
Name 42 "param"
Name 50 "ini4"
Name 69 "outf4"
Name 71 "inf"
Name 74 "param"
Name 44 "param"
Name 53 "ini4"
Name 73 "outf4"
Name 75 "inf"
Name 78 "param"
Decorate 50(ini4) Flat
Name 82 "param"
Decorate 53(ini4) Flat
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
...
...
@@ -37,35 +37,35 @@ Warning, version 450 is not yet complete; most version-specific features are pre
28: TypeBool
30: 8(float) Constant 1056964608
34: 6(int) Constant 1
38
: 6(int) Constant 2
48
: TypeVector 6(int) 4
49: TypePointer Input 48
(ivec4)
5
0(ini4): 49
(ptr) Variable Input
5
1
: TypeInt 32 0
5
2: 51
(int) Constant 1
5
3
: TypePointer Input 6(int)
5
6: 51
(int) Constant 2
6
1: 51
(int) Constant 0
67
: TypeVector 8(float) 4
68: TypePointer Output 67
(fvec4)
69(outf4): 68
(ptr) Variable Output
7
0
: TypePointer Input 8(float)
7
1(inf): 70
(ptr) Variable Input
40
: 6(int) Constant 2
51
: TypeVector 6(int) 4
52: TypePointer Input 51
(ivec4)
5
3(ini4): 52
(ptr) Variable Input
5
4
: TypeInt 32 0
5
5: 54
(int) Constant 1
5
6
: TypePointer Input 6(int)
5
9: 54
(int) Constant 2
6
4: 54
(int) Constant 0
71
: TypeVector 8(float) 4
72: TypePointer Output 71
(fvec4)
73(outf4): 72
(ptr) Variable Output
7
4
: TypePointer Input 8(float)
7
5(inf): 74
(ptr) Variable Input
4(main): 2 Function None 3
5: Label
74(param): 7(ptr) Variable Function
78(param): 7(ptr) Variable Function
72: 8(float) Load 71(inf)
73: 6(int) ConvertFToS 72
Store 74(param) 73
75: 8(float) FunctionCall 11(Test1(i1;) 74(param)
76: 8(float) Load 71(inf)
82(param): 7(ptr) Variable Function
76: 8(float) Load 75(inf)
77: 6(int) ConvertFToS 76
Store 78(param) 77
79: 8(float) FunctionCall 14(Test2(i1;) 78(param)
80: 8(float) FAdd 75 79
81: 67(fvec4) CompositeConstruct 80 80 80 80
Store 69(outf4) 81
79: 8(float) FunctionCall 11(Test1(i1;) 78(param)
80: 8(float) Load 75(inf)
81: 6(int) ConvertFToS 80
Store 82(param) 81
83: 8(float) FunctionCall 14(Test2(i1;) 82(param)
84: 8(float) FAdd 79 83
85: 71(fvec4) CompositeConstruct 84 84 84 84
Store 73(outf4) 85
Return
FunctionEnd
11(Test1(i1;): 8(float) Function None 9
...
...
@@ -101,31 +101,31 @@ Warning, version 450 is not yet complete; most version-specific features are pre
14(Test2(i1;): 8(float) Function None 9
13(bound): 7(ptr) FunctionParameter
15: Label
42(param): 7(ptr) Variable Function
37: 6(int) Load 13(bound)
39: 28(bool) SGreaterThan 37 38
SelectionMerge 41 None
BranchConditional 39 40 45
40: Label
43: 6(int) Load 13(bound)
Store 42(param) 43
44: 8(float) FunctionCall 11(Test1(i1;) 42(param)
ReturnValue 44
45: Label
46: 6(int) Load 13(bound)
47: 6(int) IMul 46 38
54: 53(ptr) AccessChain 50(ini4) 52
55: 6(int) Load 54
57: 53(ptr) AccessChain 50(ini4) 56
44(param): 7(ptr) Variable Function
39: 6(int) Load 13(bound)
41: 28(bool) SGreaterThan 39 40
SelectionMerge 43 None
BranchConditional 41 42 48
42: Label
45: 6(int) Load 13(bound)
Store 44(param) 45
46: 8(float) FunctionCall 11(Test1(i1;) 44(param)
ReturnValue 46
48: Label
49: 6(int) Load 13(bound)
50: 6(int) IMul 49 40
57: 56(ptr) AccessChain 53(ini4) 55
58: 6(int) Load 57
59: 6(int) IMul 55 58
60: 6(int) IAdd 47 59
62: 53(ptr) AccessChain 50(ini4) 61
63: 6(int) Load 62
64: 6(int) IAdd 60 63
65: 8(float) ConvertSToF 64
ReturnValue 65
41: Label
66: 8(float) Undef
ReturnValue 66
60: 56(ptr) AccessChain 53(ini4) 59
61: 6(int) Load 60
62: 6(int) IMul 58 61
63: 6(int) IAdd 50 62
65: 56(ptr) AccessChain 53(ini4) 64
66: 6(int) Load 65
67: 6(int) IAdd 63 66
68: 8(float) ConvertSToF 67
ReturnValue 68
43: Label
70: 8(float) Undef
ReturnValue 70
FunctionEnd
Test/baseResults/remap.similar_1b.none.frag.out
View file @
e6cbc5b1
...
...
@@ -3,12 +3,12 @@ Warning, version 450 is not yet complete; most version-specific features are pre
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by
87
// Id's are bound by
91
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 5
5 74 76
EntryPoint Fragment 4 "main" 5
8 78 80
ExecutionMode 4 OriginUpperLeft
Source GLSL 450
Name 4 "main"
...
...
@@ -18,13 +18,13 @@ Warning, version 450 is not yet complete; most version-specific features are pre
Name 13 "bound"
Name 17 "r"
Name 19 "x"
Name 47 "param"
Name 55 "ini4"
Name 74 "outf4"
Name 76 "inf"
Name 79 "param"
Name 49 "param"
Name 58 "ini4"
Name 78 "outf4"
Name 80 "inf"
Name 83 "param"
Decorate 55(ini4) Flat
Name 87 "param"
Decorate 58(ini4) Flat
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
...
...
@@ -38,36 +38,36 @@ Warning, version 450 is not yet complete; most version-specific features are pre
30: 8(float) Constant 1056964608
34: 6(int) Constant 1
36: 8(float) Constant 1045220557
4
1
: 6(int) Constant 2
5
1
: 6(int) Constant 4
5
3
: TypeVector 6(int) 4
5
4: TypePointer Input 53
(ivec4)
5
5(ini4): 54
(ptr) Variable Input
5
6
: TypeInt 32 0
57: 56
(int) Constant 1
58
: TypePointer Input 6(int)
6
1: 56
(int) Constant 2
6
6: 56
(int) Constant 0
7
2
: TypeVector 8(float) 4
7
3: TypePointer Output 72
(fvec4)
7
4(outf4): 73
(ptr) Variable Output
7
5
: TypePointer Input 8(float)
76(inf): 75
(ptr) Variable Input
4
3
: 6(int) Constant 2
5
4
: 6(int) Constant 4
5
6
: TypeVector 6(int) 4
5
7: TypePointer Input 56
(ivec4)
5
8(ini4): 57
(ptr) Variable Input
5
9
: TypeInt 32 0
60: 59
(int) Constant 1
61
: TypePointer Input 6(int)
6
4: 59
(int) Constant 2
6
9: 59
(int) Constant 0
7
6
: TypeVector 8(float) 4
7
7: TypePointer Output 76
(fvec4)
7
8(outf4): 77
(ptr) Variable Output
7
9
: TypePointer Input 8(float)
80(inf): 79
(ptr) Variable Input
4(main): 2 Function None 3
5: Label
79(param): 7(ptr) Variable Function
83(param): 7(ptr) Variable Function
77: 8(float) Load 76(inf)
78: 6(int) ConvertFToS 77
Store 79(param) 78
80: 8(float) FunctionCall 11(Test1(i1;) 79(param)
81: 8(float) Load 76(inf)
87(param): 7(ptr) Variable Function
81: 8(float) Load 80(inf)
82: 6(int) ConvertFToS 81
Store 83(param) 82
84: 8(float) FunctionCall 14(Test2(i1;) 83(param)
85: 8(float) FAdd 80 84
86: 72(fvec4) CompositeConstruct 85 85 85 85
Store 74(outf4) 86
84: 8(float) FunctionCall 11(Test1(i1;) 83(param)
85: 8(float) Load 80(inf)
86: 6(int) ConvertFToS 85
Store 87(param) 86
88: 8(float) FunctionCall 14(Test2(i1;) 87(param)
89: 8(float) FAdd 84 88
90: 76(fvec4) CompositeConstruct 89 89 89 89
Store 78(outf4) 90
Return
FunctionEnd
11(Test1(i1;): 8(float) Function None 9
...
...
@@ -106,32 +106,32 @@ Warning, version 450 is not yet complete; most version-specific features are pre
14(Test2(i1;): 8(float) Function None 9
13(bound): 7(ptr) FunctionParameter
15: Label
47(param): 7(ptr) Variable Function
40: 6(int) Load 13(bound)
42: 28(bool) SGreaterThan 40 41
SelectionMerge 44 None
BranchConditional 42 43 49
43: Label
45: 6(int) Load 13(bound)
46: 6(int) IMul 45 41
Store 47(param) 46
48: 8(float) FunctionCall 11(Test1(i1;) 47(param)
ReturnValue 48
49: Label
50: 6(int) Load 13(bound)
52: 6(int) IMul 50 51
59: 58(ptr) AccessChain 55(ini4) 57
60: 6(int) Load 59
62: 58(ptr) AccessChain 55(ini4) 61
49(param): 7(ptr) Variable Function
42: 6(int) Load 13(bound)
44: 28(bool) SGreaterThan 42 43
SelectionMerge 46 None
BranchConditional 44 45 52
45: Label
47: 6(int) Load 13(bound)
48: 6(int) IMul 47 43
Store 49(param) 48
50: 8(float) FunctionCall 11(Test1(i1;) 49(param)
ReturnValue 50
52: Label
53: 6(int) Load 13(bound)
55: 6(int) IMul 53 54
62: 61(ptr) AccessChain 58(ini4) 60
63: 6(int) Load 62
64: 6(int) IMul 60 63
65: 6(int) IAdd 52 64
67: 58(ptr) AccessChain 55(ini4) 66
68: 6(int) Load 67
69: 6(int) IAdd 65 68
70: 8(float) ConvertSToF 69
ReturnValue 70
44: Label
71: 8(float) Undef
ReturnValue 71
65: 61(ptr) AccessChain 58(ini4) 64
66: 6(int) Load 65
67: 6(int) IMul 63 66
68: 6(int) IAdd 55 67
70: 61(ptr) AccessChain 58(ini4) 69
71: 6(int) Load 70
72: 6(int) IAdd 68 71
73: 8(float) ConvertSToF 72
ReturnValue 73
46: Label
75: 8(float) Undef
ReturnValue 75
FunctionEnd
Test/baseResults/remap.switch.none.frag.out
View file @
e6cbc5b1
...
...
@@ -5,7 +5,7 @@ WARNING: 0:5: '' : all default precisions are highp; use precision statements to
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 4
4
// Id's are bound by 4
8
Capability Shader
1: ExtInstImport "GLSL.std.450"
...
...
@@ -20,8 +20,8 @@ WARNING: 0:5: '' : all default precisions are highp; use precision statements to
Decorate 23(FragColor) RelaxedPrecision
Decorate 23(FragColor) Location 0
Decorate 29 RelaxedPrecision
Decorate 3
5
RelaxedPrecision
Decorate 4
1
RelaxedPrecision
Decorate 3
6
RelaxedPrecision
Decorate 4
3
RelaxedPrecision
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
...
...
@@ -36,12 +36,12 @@ WARNING: 0:5: '' : all default precisions are highp; use precision statements to
23(FragColor): 22(ptr) Variable Output
24: 10(int) Constant 0
27: 6(float) Constant 0
3
0
: 10(int) Constant 1
3
3
: 6(float) Constant 1065353216
3
6
: 10(int) Constant 2
39
: 6(float) Constant 1073741824
4
2
: 6(float) Constant 3212836864
4
3: 7(fvec4) ConstantComposite 42 42 42 42
3
1
: 10(int) Constant 1
3
4
: 6(float) Constant 1065353216
3
8
: 10(int) Constant 2
41
: 6(float) Constant 1073741824
4
5
: 6(float) Constant 3212836864
4
6: 7(fvec4) ConstantComposite 45 45 45 45
4(main): 2 Function None 3
5: Label
13: 12(ptr) AccessChain 9(in0) 11
...
...
@@ -53,7 +53,7 @@ WARNING: 0:5: '' : all default precisions are highp; use precision statements to
case 1: 18
case 2: 19
20: Label
Store 23(FragColor) 4
3
Store 23(FragColor) 4
6
Branch 21
17: Label
25: 12(ptr) AccessChain 9(in0) 24
...
...
@@ -63,18 +63,18 @@ WARNING: 0:5: '' : all default precisions are highp; use precision statements to
Store 23(FragColor) 29
Branch 21
18: Label
3
1: 12(ptr) AccessChain 9(in0) 30
3
2: 6(float) Load 31
3
4: 6(float) FAdd 32 33
3
5: 7(fvec4) CompositeConstruct 34 34 34 34
Store 23(FragColor) 3
5
3
2: 12(ptr) AccessChain 9(in0) 31
3
3: 6(float) Load 32
3
5: 6(float) FAdd 33 34
3
6: 7(fvec4) CompositeConstruct 35 35 35 35
Store 23(FragColor) 3
6
Branch 21
19: Label
3
7: 12(ptr) AccessChain 9(in0) 36
38: 6(float) Load 37
4
0: 6(float) FAdd 38 39
4
1: 7(fvec4) CompositeConstruct 40 40 40 40
Store 23(FragColor) 4
1
3
9: 12(ptr) AccessChain 9(in0) 38
40: 6(float) Load 39
4
2: 6(float) FAdd 40 41
4
3: 7(fvec4) CompositeConstruct 42 42 42 42
Store 23(FragColor) 4
3
Branch 21
21: Label
Return
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment