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
88c4464d
Commit
88c4464d
authored
Feb 03, 2017
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HLSL: Have loose uniforms also go through the makeTypeNonIo() path.
parent
2c5ab9c8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
14 deletions
+21
-14
hlsl.array.flatten.frag.out
Test/baseResults/hlsl.array.flatten.frag.out
+4
-4
hlsl.float4.frag.out
Test/baseResults/hlsl.float4.frag.out
+4
-5
hlsl.struct.frag.out
Test/baseResults/hlsl.struct.frag.out
+4
-4
revision.h
glslang/Include/revision.h
+1
-1
hlslParseHelper.cpp
hlsl/hlslParseHelper.cpp
+6
-0
hlslParseHelper.h
hlsl/hlslParseHelper.h
+2
-0
No files found.
Test/baseResults/hlsl.array.flatten.frag.out
View file @
88c4464d
...
@@ -87,7 +87,7 @@ gl_FragCoord origin is upper left
...
@@ -87,7 +87,7 @@ gl_FragCoord origin is upper left
0:35 move second child to first child (temp 4-element array of float)
0:35 move second child to first child (temp 4-element array of float)
0:35 'local_float_array' (temp 4-element array of float)
0:35 'local_float_array' (temp 4-element array of float)
0:35 g_floats: direct index for structure (layout(offset=384 ) uniform 4-element array of float)
0:35 g_floats: direct index for structure (layout(offset=384 ) uniform 4-element array of float)
0:35 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-element array of 3X3 matrix of float g_mats, layout(
binding=10
offset=192 ) uniform 4-element array of 3X3 matrix of float g_mats_explicit, layout(offset=384 ) uniform 4-element array of float g_floats})
0:35 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-element array of 3X3 matrix of float g_mats, layout(offset=192 ) uniform 4-element array of 3X3 matrix of float g_mats_explicit, layout(offset=384 ) uniform 4-element array of float g_floats})
0:35 Constant:
0:35 Constant:
0:35 2 (const uint)
0:35 2 (const uint)
0:37 move second child to first child (temp 4-component vector of float)
0:37 move second child to first child (temp 4-component vector of float)
...
@@ -165,7 +165,7 @@ gl_FragCoord origin is upper left
...
@@ -165,7 +165,7 @@ gl_FragCoord origin is upper left
0:? 'g_samp_explicit[0]' (layout(binding=5 ) uniform sampler)
0:? 'g_samp_explicit[0]' (layout(binding=5 ) uniform sampler)
0:? 'g_samp_explicit[1]' (layout(binding=6 ) uniform sampler)
0:? 'g_samp_explicit[1]' (layout(binding=6 ) uniform sampler)
0:? 'g_samp_explicit[2]' (layout(binding=7 ) uniform sampler)
0:? 'g_samp_explicit[2]' (layout(binding=7 ) uniform sampler)
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-element array of 3X3 matrix of float g_mats, layout(
binding=10
offset=192 ) uniform 4-element array of 3X3 matrix of float g_mats_explicit, layout(offset=384 ) uniform 4-element array of float g_floats})
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-element array of 3X3 matrix of float g_mats, layout(offset=192 ) uniform 4-element array of 3X3 matrix of float g_mats_explicit, layout(offset=384 ) uniform 4-element array of float g_floats})
0:? 'not_flattened_a' (global 5-element array of int)
0:? 'not_flattened_a' (global 5-element array of int)
0:? 'color' (layout(location=0 ) out 4-component vector of float)
0:? 'color' (layout(location=0 ) out 4-component vector of float)
...
@@ -261,7 +261,7 @@ gl_FragCoord origin is upper left
...
@@ -261,7 +261,7 @@ gl_FragCoord origin is upper left
0:35 move second child to first child (temp 4-element array of float)
0:35 move second child to first child (temp 4-element array of float)
0:35 'local_float_array' (temp 4-element array of float)
0:35 'local_float_array' (temp 4-element array of float)
0:35 g_floats: direct index for structure (layout(offset=384 ) uniform 4-element array of float)
0:35 g_floats: direct index for structure (layout(offset=384 ) uniform 4-element array of float)
0:35 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-element array of 3X3 matrix of float g_mats, layout(
binding=10
offset=192 ) uniform 4-element array of 3X3 matrix of float g_mats_explicit, layout(offset=384 ) uniform 4-element array of float g_floats})
0:35 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-element array of 3X3 matrix of float g_mats, layout(offset=192 ) uniform 4-element array of 3X3 matrix of float g_mats_explicit, layout(offset=384 ) uniform 4-element array of float g_floats})
0:35 Constant:
0:35 Constant:
0:35 2 (const uint)
0:35 2 (const uint)
0:37 move second child to first child (temp 4-component vector of float)
0:37 move second child to first child (temp 4-component vector of float)
...
@@ -339,7 +339,7 @@ gl_FragCoord origin is upper left
...
@@ -339,7 +339,7 @@ gl_FragCoord origin is upper left
0:? 'g_samp_explicit[0]' (layout(binding=5 ) uniform sampler)
0:? 'g_samp_explicit[0]' (layout(binding=5 ) uniform sampler)
0:? 'g_samp_explicit[1]' (layout(binding=6 ) uniform sampler)
0:? 'g_samp_explicit[1]' (layout(binding=6 ) uniform sampler)
0:? 'g_samp_explicit[2]' (layout(binding=7 ) uniform sampler)
0:? 'g_samp_explicit[2]' (layout(binding=7 ) uniform sampler)
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-element array of 3X3 matrix of float g_mats, layout(
binding=10
offset=192 ) uniform 4-element array of 3X3 matrix of float g_mats_explicit, layout(offset=384 ) uniform 4-element array of float g_floats})
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-element array of 3X3 matrix of float g_mats, layout(offset=192 ) uniform 4-element array of 3X3 matrix of float g_mats_explicit, layout(offset=384 ) uniform 4-element array of float g_floats})
0:? 'not_flattened_a' (global 5-element array of int)
0:? 'not_flattened_a' (global 5-element array of int)
0:? 'color' (layout(location=0 ) out 4-component vector of float)
0:? 'color' (layout(location=0 ) out 4-component vector of float)
...
...
Test/baseResults/hlsl.float4.frag.out
View file @
88c4464d
...
@@ -13,11 +13,11 @@ gl_FragCoord origin is upper left
...
@@ -13,11 +13,11 @@ gl_FragCoord origin is upper left
0:10 component-wise multiply (temp 4-component vector of float)
0:10 component-wise multiply (temp 4-component vector of float)
0:10 'input' (in 4-component vector of float)
0:10 'input' (in 4-component vector of float)
0:10 AmbientColor: direct index for structure (layout(offset=0 ) uniform 4-component vector of float)
0:10 AmbientColor: direct index for structure (layout(offset=0 ) uniform 4-component vector of float)
0:10 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float AmbientColor, layout(offset=16 ) uniform bool
Face ff1, layout(offset=20 ) uniform float ff2, layout(binding=0 offset=32 ) uniform 4-component vector of float ff3, layout(binding=1
offset=48 ) uniform 4-component vector of float ff4})
0:10 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float AmbientColor, layout(offset=16 ) uniform bool
ff1, layout(offset=20 ) uniform float ff2, layout(offset=32 ) uniform 4-component vector of float ff3, layout(
offset=48 ) uniform 4-component vector of float ff4})
0:10 Constant:
0:10 Constant:
0:10 0 (const uint)
0:10 0 (const uint)
0:? Linker Objects
0:? Linker Objects
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float AmbientColor, layout(offset=16 ) uniform bool
Face ff1, layout(offset=20 ) uniform float ff2, layout(binding=0 offset=32 ) uniform 4-component vector of float ff3, layout(binding=1
offset=48 ) uniform 4-component vector of float ff4})
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float AmbientColor, layout(offset=16 ) uniform bool
ff1, layout(offset=20 ) uniform float ff2, layout(offset=32 ) uniform 4-component vector of float ff3, layout(
offset=48 ) uniform 4-component vector of float ff4})
Linked fragment stage:
Linked fragment stage:
...
@@ -35,11 +35,11 @@ gl_FragCoord origin is upper left
...
@@ -35,11 +35,11 @@ gl_FragCoord origin is upper left
0:10 component-wise multiply (temp 4-component vector of float)
0:10 component-wise multiply (temp 4-component vector of float)
0:10 'input' (in 4-component vector of float)
0:10 'input' (in 4-component vector of float)
0:10 AmbientColor: direct index for structure (layout(offset=0 ) uniform 4-component vector of float)
0:10 AmbientColor: direct index for structure (layout(offset=0 ) uniform 4-component vector of float)
0:10 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float AmbientColor, layout(offset=16 ) uniform bool
Face ff1, layout(offset=20 ) uniform float ff2, layout(binding=0 offset=32 ) uniform 4-component vector of float ff3, layout(binding=1
offset=48 ) uniform 4-component vector of float ff4})
0:10 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float AmbientColor, layout(offset=16 ) uniform bool
ff1, layout(offset=20 ) uniform float ff2, layout(offset=32 ) uniform 4-component vector of float ff3, layout(
offset=48 ) uniform 4-component vector of float ff4})
0:10 Constant:
0:10 Constant:
0:10 0 (const uint)
0:10 0 (const uint)
0:? Linker Objects
0:? Linker Objects
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float AmbientColor, layout(offset=16 ) uniform bool
Face ff1, layout(offset=20 ) uniform float ff2, layout(binding=0 offset=32 ) uniform 4-component vector of float ff3, layout(binding=1
offset=48 ) uniform 4-component vector of float ff4})
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform 4-component vector of float AmbientColor, layout(offset=16 ) uniform bool
ff1, layout(offset=20 ) uniform float ff2, layout(offset=32 ) uniform 4-component vector of float ff3, layout(
offset=48 ) uniform 4-component vector of float ff4})
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
...
@@ -62,7 +62,6 @@ gl_FragCoord origin is upper left
...
@@ -62,7 +62,6 @@ gl_FragCoord origin is upper left
Name 17 ""
Name 17 ""
MemberDecorate 15($Global) 0 Offset 0
MemberDecorate 15($Global) 0 Offset 0
MemberDecorate 15($Global) 1 Offset 16
MemberDecorate 15($Global) 1 Offset 16
MemberDecorate 15($Global) 1 BuiltIn FrontFacing
MemberDecorate 15($Global) 2 Offset 20
MemberDecorate 15($Global) 2 Offset 20
MemberDecorate 15($Global) 3 Offset 32
MemberDecorate 15($Global) 3 Offset 32
MemberDecorate 15($Global) 4 Offset 48
MemberDecorate 15($Global) 4 Offset 48
...
...
Test/baseResults/hlsl.struct.frag.out
View file @
88c4464d
...
@@ -111,7 +111,7 @@ gl_FragCoord origin is upper left
...
@@ -111,7 +111,7 @@ gl_FragCoord origin is upper left
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:? 'input' (layout(location=0 ) in 4-component vector of float)
0:? 'input' (layout(location=0 ) in 4-component vector of float)
0:? 's' (layout(location=1 ) in structure{smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, layout(offset=4 ) temp bool ff2, layout(binding=0 offset=4 ) temp bool ff3, layout(binding=0 offset=4 ) temp 4-component vector of float ff4})
0:? 's' (layout(location=1 ) in structure{smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, layout(offset=4 ) temp bool ff2, layout(binding=0 offset=4 ) temp bool ff3, layout(binding=0 offset=4 ) temp 4-component vector of float ff4})
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform structure{temp bool b, temp bool c, temp 4-component vector of float a, temp 4-component vector of float d} s1, layout(
binding=5 offset=1620 ) uniform float ff5, layout(binding=8 offset=1636
) uniform float ff6})
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform structure{temp bool b, temp bool c, temp 4-component vector of float a, temp 4-component vector of float d} s1, layout(
offset=48 ) uniform float ff5, layout(offset=52
) uniform float ff6})
0:? 's_ff1' (in bool Face)
0:? 's_ff1' (in bool Face)
...
@@ -226,7 +226,7 @@ gl_FragCoord origin is upper left
...
@@ -226,7 +226,7 @@ gl_FragCoord origin is upper left
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:? '@entryPointOutput' (layout(location=0 ) out 4-component vector of float)
0:? 'input' (layout(location=0 ) in 4-component vector of float)
0:? 'input' (layout(location=0 ) in 4-component vector of float)
0:? 's' (layout(location=1 ) in structure{smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, layout(offset=4 ) temp bool ff2, layout(binding=0 offset=4 ) temp bool ff3, layout(binding=0 offset=4 ) temp 4-component vector of float ff4})
0:? 's' (layout(location=1 ) in structure{smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, layout(offset=4 ) temp bool ff2, layout(binding=0 offset=4 ) temp bool ff3, layout(binding=0 offset=4 ) temp 4-component vector of float ff4})
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform structure{temp bool b, temp bool c, temp 4-component vector of float a, temp 4-component vector of float d} s1, layout(
binding=5 offset=1620 ) uniform float ff5, layout(binding=8 offset=1636
) uniform float ff6})
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform structure{temp bool b, temp bool c, temp 4-component vector of float a, temp 4-component vector of float d} s1, layout(
offset=48 ) uniform float ff5, layout(offset=52
) uniform float ff6})
0:? 's_ff1' (in bool Face)
0:? 's_ff1' (in bool Face)
// Module Version 10000
// Module Version 10000
...
@@ -292,8 +292,8 @@ gl_FragCoord origin is upper left
...
@@ -292,8 +292,8 @@ gl_FragCoord origin is upper left
MemberDecorate 93(myS) 2 Offset 16
MemberDecorate 93(myS) 2 Offset 16
MemberDecorate 93(myS) 3 Offset 32
MemberDecorate 93(myS) 3 Offset 32
MemberDecorate 94($Global) 0 Offset 0
MemberDecorate 94($Global) 0 Offset 0
MemberDecorate 94($Global) 1 Offset
1620
MemberDecorate 94($Global) 1 Offset
48
MemberDecorate 94($Global) 2 Offset
1636
MemberDecorate 94($Global) 2 Offset
52
Decorate 94($Global) Block
Decorate 94($Global) Block
Decorate 96 DescriptorSet 0
Decorate 96 DescriptorSet 0
2: TypeVoid
2: TypeVoid
...
...
glslang/Include/revision.h
View file @
88c4464d
...
@@ -2,5 +2,5 @@
...
@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits.
// For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run).
// For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "Overload400-PrecQual.178
6
"
#define GLSLANG_REVISION "Overload400-PrecQual.178
7
"
#define GLSLANG_DATE "03-Feb-2017"
#define GLSLANG_DATE "03-Feb-2017"
hlsl/hlslParseHelper.cpp
View file @
88c4464d
...
@@ -159,6 +159,12 @@ bool HlslParseContext::shouldConvertLValue(const TIntermNode* node) const
...
@@ -159,6 +159,12 @@ bool HlslParseContext::shouldConvertLValue(const TIntermNode* node) const
return
false
;
return
false
;
}
}
void
HlslParseContext
::
growGlobalUniformBlock
(
TSourceLoc
&
loc
,
TType
&
memberType
,
TString
&
memberName
)
{
makeTypeNonIo
(
&
memberType
);
//?? losing offsets is okay?
TParseContextBase
::
growGlobalUniformBlock
(
loc
,
memberType
,
memberName
);
}
//
//
// Return a TLayoutFormat corresponding to the given texture type.
// Return a TLayoutFormat corresponding to the given texture type.
//
//
...
...
hlsl/hlslParseHelper.h
View file @
88c4464d
...
@@ -160,6 +160,8 @@ public:
...
@@ -160,6 +160,8 @@ public:
void
pushSwitchSequence
(
TIntermSequence
*
sequence
)
{
switchSequenceStack
.
push_back
(
sequence
);
}
void
pushSwitchSequence
(
TIntermSequence
*
sequence
)
{
switchSequenceStack
.
push_back
(
sequence
);
}
void
popSwitchSequence
()
{
switchSequenceStack
.
pop_back
();
}
void
popSwitchSequence
()
{
switchSequenceStack
.
pop_back
();
}
virtual
void
growGlobalUniformBlock
(
TSourceLoc
&
,
TType
&
,
TString
&
memberName
)
override
;
// Apply L-value conversions. E.g, turning a write to a RWTexture into an ImageStore.
// Apply L-value conversions. E.g, turning a write to a RWTexture into an ImageStore.
TIntermTyped
*
handleLvalue
(
const
TSourceLoc
&
,
const
char
*
op
,
TIntermTyped
*
node
);
TIntermTyped
*
handleLvalue
(
const
TSourceLoc
&
,
const
char
*
op
,
TIntermTyped
*
node
);
bool
lValueErrorCheck
(
const
TSourceLoc
&
,
const
char
*
op
,
TIntermTyped
*
)
override
;
bool
lValueErrorCheck
(
const
TSourceLoc
&
,
const
char
*
op
,
TIntermTyped
*
)
override
;
...
...
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