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
10f7fc73
Commit
10f7fc73
authored
Sep 25, 2016
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HLSL: Reverse what the driver is told about row/column majorness, matching the row-column reversal.
parent
88712f1a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
33 deletions
+37
-33
hlsl.buffer.frag.out
Test/baseResults/hlsl.buffer.frag.out
+0
-0
hlsl.layout.frag.out
Test/baseResults/hlsl.layout.frag.out
+18
-18
hlsl.reflection.vert.out
Test/baseResults/hlsl.reflection.vert.out
+7
-7
hlsl.buffer.frag
Test/hlsl.buffer.frag
+4
-0
revision.h
glslang/Include/revision.h
+2
-2
hlslGrammar.cpp
hlsl/hlslGrammar.cpp
+2
-2
hlslParseHelper.cpp
hlsl/hlslParseHelper.cpp
+4
-4
No files found.
Test/baseResults/hlsl.buffer.frag.out
View file @
10f7fc73
This diff is collapsed.
Click to expand it.
Test/baseResults/hlsl.layout.frag.out
View file @
10f7fc73
...
@@ -11,24 +11,24 @@ gl_FragCoord origin is upper left
...
@@ -11,24 +11,24 @@ gl_FragCoord origin is upper left
0:17 add (temp 4-component vector of float)
0:17 add (temp 4-component vector of float)
0:17 add (temp 4-component vector of float)
0:17 add (temp 4-component vector of float)
0:17 'input' (in 4-component vector of float)
0:17 'input' (in 4-component vector of float)
0:17 v1: direct index for structure (layout(
column
_major std430 offset=16 ) buffer 4-component vector of float)
0:17 v1: direct index for structure (layout(
row
_major std430 offset=16 ) buffer 4-component vector of float)
0:17 'anon@0' (layout(set=3 binding=5
column_major std430 ) buffer block{layout(column
_major std430 offset=16 ) buffer 4-component vector of float v1})
0:17 'anon@0' (layout(set=3 binding=5
row_major std430 ) buffer block{layout(row
_major std430 offset=16 ) buffer 4-component vector of float v1})
0:17 Constant:
0:17 Constant:
0:17 0 (const uint)
0:17 0 (const uint)
0:17 v5: direct index for structure (layout(
column
_major std430 offset=0 ) buffer 4-component vector of float)
0:17 v5: direct index for structure (layout(
row
_major std430 offset=0 ) buffer 4-component vector of float)
0:17 'anon@1' (layout(
column_major std430 push_constant ) buffer block{layout(column
_major std430 offset=0 ) buffer 4-component vector of float v5})
0:17 'anon@1' (layout(
row_major std430 push_constant ) buffer block{layout(row
_major std430 offset=0 ) buffer 4-component vector of float v5})
0:17 Constant:
0:17 Constant:
0:17 0 (const uint)
0:17 0 (const uint)
0:17 v1PostLayout: direct index for structure (layout(
column
_major std430 offset=16 ) buffer 4-component vector of float)
0:17 v1PostLayout: direct index for structure (layout(
row
_major std430 offset=16 ) buffer 4-component vector of float)
0:17 'anon@2' (layout(set=4 binding=7
column_major std430 ) buffer block{layout(column
_major std430 offset=16 ) buffer 4-component vector of float v1PostLayout})
0:17 'anon@2' (layout(set=4 binding=7
row_major std430 ) buffer block{layout(row
_major std430 offset=16 ) buffer 4-component vector of float v1PostLayout})
0:17 Constant:
0:17 Constant:
0:17 0 (const uint)
0:17 0 (const uint)
0:? Linker Objects
0:? Linker Objects
0:? 'anon@0' (layout(set=3 binding=5
column_major std430 ) buffer block{layout(column
_major std430 offset=16 ) buffer 4-component vector of float v1})
0:? 'anon@0' (layout(set=3 binding=5
row_major std430 ) buffer block{layout(row
_major std430 offset=16 ) buffer 4-component vector of float v1})
0:? 'anon@1' (layout(
column_major std430 push_constant ) buffer block{layout(column
_major std430 offset=0 ) buffer 4-component vector of float v5})
0:? 'anon@1' (layout(
row_major std430 push_constant ) buffer block{layout(row
_major std430 offset=0 ) buffer 4-component vector of float v5})
0:? 'specConst' (specialization-constant const int)
0:? 'specConst' (specialization-constant const int)
0:? 10 (const int)
0:? 10 (const int)
0:? 'anon@2' (layout(set=4 binding=7
column_major std430 ) buffer block{layout(column
_major std430 offset=16 ) buffer 4-component vector of float v1PostLayout})
0:? 'anon@2' (layout(set=4 binding=7
row_major std430 ) buffer block{layout(row
_major std430 offset=16 ) buffer 4-component vector of float v1PostLayout})
Linked fragment stage:
Linked fragment stage:
...
@@ -46,24 +46,24 @@ gl_FragCoord origin is upper left
...
@@ -46,24 +46,24 @@ gl_FragCoord origin is upper left
0:17 add (temp 4-component vector of float)
0:17 add (temp 4-component vector of float)
0:17 add (temp 4-component vector of float)
0:17 add (temp 4-component vector of float)
0:17 'input' (in 4-component vector of float)
0:17 'input' (in 4-component vector of float)
0:17 v1: direct index for structure (layout(
column
_major std430 offset=16 ) buffer 4-component vector of float)
0:17 v1: direct index for structure (layout(
row
_major std430 offset=16 ) buffer 4-component vector of float)
0:17 'anon@0' (layout(set=3 binding=5
column_major std430 ) buffer block{layout(column
_major std430 offset=16 ) buffer 4-component vector of float v1})
0:17 'anon@0' (layout(set=3 binding=5
row_major std430 ) buffer block{layout(row
_major std430 offset=16 ) buffer 4-component vector of float v1})
0:17 Constant:
0:17 Constant:
0:17 0 (const uint)
0:17 0 (const uint)
0:17 v5: direct index for structure (layout(
column
_major std430 offset=0 ) buffer 4-component vector of float)
0:17 v5: direct index for structure (layout(
row
_major std430 offset=0 ) buffer 4-component vector of float)
0:17 'anon@1' (layout(
column_major std430 push_constant ) buffer block{layout(column
_major std430 offset=0 ) buffer 4-component vector of float v5})
0:17 'anon@1' (layout(
row_major std430 push_constant ) buffer block{layout(row
_major std430 offset=0 ) buffer 4-component vector of float v5})
0:17 Constant:
0:17 Constant:
0:17 0 (const uint)
0:17 0 (const uint)
0:17 v1PostLayout: direct index for structure (layout(
column
_major std430 offset=16 ) buffer 4-component vector of float)
0:17 v1PostLayout: direct index for structure (layout(
row
_major std430 offset=16 ) buffer 4-component vector of float)
0:17 'anon@2' (layout(set=4 binding=7
column_major std430 ) buffer block{layout(column
_major std430 offset=16 ) buffer 4-component vector of float v1PostLayout})
0:17 'anon@2' (layout(set=4 binding=7
row_major std430 ) buffer block{layout(row
_major std430 offset=16 ) buffer 4-component vector of float v1PostLayout})
0:17 Constant:
0:17 Constant:
0:17 0 (const uint)
0:17 0 (const uint)
0:? Linker Objects
0:? Linker Objects
0:? 'anon@0' (layout(set=3 binding=5
column_major std430 ) buffer block{layout(column
_major std430 offset=16 ) buffer 4-component vector of float v1})
0:? 'anon@0' (layout(set=3 binding=5
row_major std430 ) buffer block{layout(row
_major std430 offset=16 ) buffer 4-component vector of float v1})
0:? 'anon@1' (layout(
column_major std430 push_constant ) buffer block{layout(column
_major std430 offset=0 ) buffer 4-component vector of float v5})
0:? 'anon@1' (layout(
row_major std430 push_constant ) buffer block{layout(row
_major std430 offset=0 ) buffer 4-component vector of float v5})
0:? 'specConst' (specialization-constant const int)
0:? 'specConst' (specialization-constant const int)
0:? 10 (const int)
0:? 10 (const int)
0:? 'anon@2' (layout(set=4 binding=7
column_major std430 ) buffer block{layout(column
_major std430 offset=16 ) buffer 4-component vector of float v1PostLayout})
0:? 'anon@2' (layout(set=4 binding=7
row_major std430 ) buffer block{layout(row
_major std430 offset=16 ) buffer 4-component vector of float v1PostLayout})
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
...
...
Test/baseResults/hlsl.reflection.vert.out
View file @
10f7fc73
...
@@ -4,16 +4,16 @@ Linked vertex stage:
...
@@ -4,16 +4,16 @@ Linked vertex stage:
Uniform reflection:
Uniform reflection:
anonMember3: offset
96
, type 8b52, size 1, index 0
anonMember3: offset
80
, type 8b52, size 1, index 0
s.a: offset -1, type 1404, size 1, index -1
s.a: offset -1, type 1404, size 1, index -1
scalar: offset 12, type 1404, size 1, index 0
scalar: offset 12, type 1404, size 1, index 0
m23: offset 16, type 8b67, size 1, index 0
m23: offset 16, type 8b67, size 1, index 0
scalarAfterm23: offset
64
, type 1404, size 1, index 0
scalarAfterm23: offset
48
, type 1404, size 1, index 0
c_m23: offset 16, type 8b67, size 1, index 0
c_m23: offset 16, type 8b67, size 1, index 0
c_scalarAfterm23: offset
64
, type 1404, size 1, index 0
c_scalarAfterm23: offset
48
, type 1404, size 1, index 0
scalarBeforeArray: offset
112
, type 1404, size 1, index 0
scalarBeforeArray: offset
96
, type 1404, size 1, index 0
floatArray: offset 1
28
, type 1406, size 5, index 0
floatArray: offset 1
12
, type 1406, size 5, index 0
scalarAfterArray: offset
208
, type 1404, size 1, index 0
scalarAfterArray: offset
192
, type 1404, size 1, index 0
memfloat2: offset 48, type 8b50, size 1, index 0
memfloat2: offset 48, type 8b50, size 1, index 0
memf1: offset 56, type 1406, size 1, index 0
memf1: offset 56, type 1406, size 1, index 0
memf2: offset 60, type 8b56, size 1, index 0
memf2: offset 60, type 8b56, size 1, index 0
...
@@ -73,7 +73,7 @@ anonMember1: offset 0, type 8b51, size 1, index 0
...
@@ -73,7 +73,7 @@ anonMember1: offset 0, type 8b51, size 1, index 0
uf1: offset -1, type 1406, size 1, index -1
uf1: offset -1, type 1406, size 1, index -1
Uniform block reflection:
Uniform block reflection:
: offset -1, type ffffffff, size
512
, index -1
: offset -1, type ffffffff, size
496
, index -1
Vertex attribute reflection:
Vertex attribute reflection:
attributeFloat: offset 0, type 1406, size 0, index 0
attributeFloat: offset 0, type 1406, size 0, index 0
...
...
Test/hlsl.buffer.frag
View file @
10f7fc73
...
@@ -20,6 +20,10 @@ tbuffer tbufName : register(b8) {
...
@@ -20,6 +20,10 @@ tbuffer tbufName : register(b8) {
float
f5
:
packoffset
(
c4
.
z
);
float
f5
:
packoffset
(
c4
.
z
);
float
f6
:
packoffset
(
c
);
float
f6
:
packoffset
(
c
);
float
f7
;
float
f7
;
float3x4
m1
;
row_major
float3x4
m2
;
column_major
float3x4
m3
;
float3x4
m4
;
};
};
float4
PixelShaderFunction
(
float4
input
)
:
COLOR0
float4
PixelShaderFunction
(
float4
input
)
:
COLOR0
...
...
glslang/Include/revision.h
View file @
10f7fc73
...
@@ -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.150
6
"
#define GLSLANG_REVISION "Overload400-PrecQual.150
7
"
#define GLSLANG_DATE "2
1
-Sep-2016"
#define GLSLANG_DATE "2
5
-Sep-2016"
hlsl/hlslGrammar.cpp
View file @
10f7fc73
...
@@ -491,10 +491,10 @@ bool HlslGrammar::acceptQualifier(TQualifier& qualifier)
...
@@ -491,10 +491,10 @@ bool HlslGrammar::acceptQualifier(TQualifier& qualifier)
qualifier
.
sample
=
true
;
qualifier
.
sample
=
true
;
break
;
break
;
case
EHTokRowMajor
:
case
EHTokRowMajor
:
qualifier
.
layoutMatrix
=
Elm
Row
Major
;
qualifier
.
layoutMatrix
=
Elm
Column
Major
;
break
;
break
;
case
EHTokColumnMajor
:
case
EHTokColumnMajor
:
qualifier
.
layoutMatrix
=
Elm
Column
Major
;
qualifier
.
layoutMatrix
=
Elm
Row
Major
;
break
;
break
;
case
EHTokPrecise
:
case
EHTokPrecise
:
qualifier
.
noContraction
=
true
;
qualifier
.
noContraction
=
true
;
...
...
hlsl/hlslParseHelper.cpp
View file @
10f7fc73
...
@@ -63,11 +63,11 @@ HlslParseContext::HlslParseContext(TSymbolTable& symbolTable, TIntermediate& int
...
@@ -63,11 +63,11 @@ HlslParseContext::HlslParseContext(TSymbolTable& symbolTable, TIntermediate& int
linkage
=
new
TIntermAggregate
;
linkage
=
new
TIntermAggregate
;
globalUniformDefaults
.
clear
();
globalUniformDefaults
.
clear
();
globalUniformDefaults
.
layoutMatrix
=
Elm
Column
Major
;
globalUniformDefaults
.
layoutMatrix
=
Elm
Row
Major
;
globalUniformDefaults
.
layoutPacking
=
ElpStd140
;
globalUniformDefaults
.
layoutPacking
=
ElpStd140
;
globalBufferDefaults
.
clear
();
globalBufferDefaults
.
clear
();
globalBufferDefaults
.
layoutMatrix
=
Elm
Column
Major
;
globalBufferDefaults
.
layoutMatrix
=
Elm
Row
Major
;
globalBufferDefaults
.
layoutPacking
=
ElpStd430
;
globalBufferDefaults
.
layoutPacking
=
ElpStd430
;
globalInputDefaults
.
clear
();
globalInputDefaults
.
clear
();
...
@@ -3624,11 +3624,11 @@ void HlslParseContext::setLayoutQualifier(const TSourceLoc& loc, TQualifier& qua
...
@@ -3624,11 +3624,11 @@ void HlslParseContext::setLayoutQualifier(const TSourceLoc& loc, TQualifier& qua
std
::
transform
(
id
.
begin
(),
id
.
end
(),
id
.
begin
(),
::
tolower
);
std
::
transform
(
id
.
begin
(),
id
.
end
(),
id
.
begin
(),
::
tolower
);
if
(
id
==
TQualifier
::
getLayoutMatrixString
(
ElmColumnMajor
))
{
if
(
id
==
TQualifier
::
getLayoutMatrixString
(
ElmColumnMajor
))
{
qualifier
.
layoutMatrix
=
Elm
Column
Major
;
qualifier
.
layoutMatrix
=
Elm
Row
Major
;
return
;
return
;
}
}
if
(
id
==
TQualifier
::
getLayoutMatrixString
(
ElmRowMajor
))
{
if
(
id
==
TQualifier
::
getLayoutMatrixString
(
ElmRowMajor
))
{
qualifier
.
layoutMatrix
=
Elm
Row
Major
;
qualifier
.
layoutMatrix
=
Elm
Column
Major
;
return
;
return
;
}
}
if
(
id
==
"push_constant"
)
{
if
(
id
==
"push_constant"
)
{
...
...
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