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
e1b2e39a
Commit
e1b2e39a
authored
Dec 07, 2013
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow layout aliasing for desktop vertex inputs.
git-svn-id:
https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24400
e7fa87d3-cd2b-0410-9028-fcbf551c1848
parent
5f15d422
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
14 deletions
+19
-14
430.vert
Test/430.vert
+4
-0
430.vert.out
Test/baseResults/430.vert.out
+3
-1
Todo.txt
Todo.txt
+2
-3
revision.h
glslang/Include/revision.h
+2
-2
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+0
-2
linkValidate.cpp
glslang/MachineIndependent/linkValidate.cpp
+8
-6
No files found.
Test/430.vert
View file @
e1b2e39a
...
@@ -41,4 +41,7 @@ layout(location = 10) out S cs[2]; // 10 through 10 + 2 * 22 - 1 = 53
...
@@ -41,4 +41,7 @@ layout(location = 10) out S cs[2]; // 10 through 10 + 2 * 22 - 1 = 53
layout
(
location
=
54
)
out
float
cf
;
layout
(
location
=
54
)
out
float
cf
;
layout
(
location
=
53
)
out
float
cg
;
// ERROR, collision at 31
layout
(
location
=
53
)
out
float
cg
;
// ERROR, collision at 31
layout
(
location
=
10
)
in
vec4
alias1
;
layout
(
location
=
10
)
in
vec4
alias2
;
// okay for vertex input on desktop
float
gl_ClipDistance
[
17
];
// ERROR, size too big
float
gl_ClipDistance
[
17
];
// ERROR, size too big
\ No newline at end of file
Test/baseResults/430.vert.out
View file @
e1b2e39a
...
@@ -12,7 +12,7 @@ ERROR: 0:28: '' : cannot use invariant qualifier on a function parameter
...
@@ -12,7 +12,7 @@ ERROR: 0:28: '' : cannot use invariant qualifier on a function parameter
ERROR: 0:30: '' : cannot use layout qualifiers on a function parameter
ERROR: 0:30: '' : cannot use layout qualifiers on a function parameter
ERROR: 0:31: '' : cannot use auxiliary or interpolation qualifiers on a function parameter
ERROR: 0:31: '' : cannot use auxiliary or interpolation qualifiers on a function parameter
ERROR: 0:42: 'location' : repeated use of location 53
ERROR: 0:42: 'location' : repeated use of location 53
ERROR: 0:4
4
: 'gl_ClipDistance array size' : must be less than gl_MaxClipDistances (8)
ERROR: 0:4
7
: 'gl_ClipDistance array size' : must be less than gl_MaxClipDistances (8)
ERROR: 13 compilation errors. No code generated.
ERROR: 13 compilation errors. No code generated.
...
@@ -45,6 +45,8 @@ ERROR: node is still EOpNull!
...
@@ -45,6 +45,8 @@ ERROR: node is still EOpNull!
0:? 'cs' (layout(location=10 ) smooth out 2-element array of structure{m,f})
0:? 'cs' (layout(location=10 ) smooth out 2-element array of structure{m,f})
0:? 'cf' (layout(location=54 ) smooth out float)
0:? 'cf' (layout(location=54 ) smooth out float)
0:? 'cg' (layout(location=53 ) smooth out float)
0:? 'cg' (layout(location=53 ) smooth out float)
0:? 'alias1' (layout(location=10 ) in 4-component vector of float)
0:? 'alias2' (layout(location=10 ) in 4-component vector of float)
0:? 'gl_VertexID' (gl_VertexId int)
0:? 'gl_VertexID' (gl_VertexId int)
0:? 'gl_InstanceID' (gl_InstanceId int)
0:? 'gl_InstanceID' (gl_InstanceId int)
...
...
Todo.txt
View file @
e1b2e39a
...
@@ -33,9 +33,8 @@ Link Validation
...
@@ -33,9 +33,8 @@ Link Validation
- ...
- ...
+ exactly one main
+ exactly one main
+ ES 3.0: fragment outputs all have locations, if more than one
+ ES 3.0: fragment outputs all have locations, if more than one
- ES 3.0: location aliasing/overlap (except desktop vertex shader inputs)
+ location aliasing/overlap (except desktop vertex shader inputs)
- Non ES: binding overlap
- Non ES: binding overlap for atomic counters
+ location overlap
+ Non ES: geometry shader input array sizes and input layout qualifier declaration
+ Non ES: geometry shader input array sizes and input layout qualifier declaration
+ Non ES: read or write to both gl_ClipVertex and gl_ClipDistance
+ Non ES: read or write to both gl_ClipVertex and gl_ClipDistance
+ Non ES: write to only one of gl_FragColor, gl_FragData, or user-declared
+ Non ES: write to only one of gl_FragColor, gl_FragData, or user-declared
...
...
glslang/Include/revision.h
View file @
e1b2e39a
...
@@ -9,5 +9,5 @@
...
@@ -9,5 +9,5 @@
// source have to figure out how to create revision.h just to get a build
// source have to figure out how to create revision.h just to get a build
// going. However, if it is not updated, it can be a version behind.
// going. However, if it is not updated, it can be a version behind.
#define GLSLANG_REVISION "2439
6
"
#define GLSLANG_REVISION "2439
7
"
#define GLSLANG_DATE "2013/12/06 1
4:45:15
"
#define GLSLANG_DATE "2013/12/06 1
6:57:42
"
glslang/MachineIndependent/ParseHelper.cpp
View file @
e1b2e39a
...
@@ -2694,8 +2694,6 @@ void TParseContext::layoutTypeCheck(TSourceLoc loc, const TSymbol& symbol)
...
@@ -2694,8 +2694,6 @@ void TParseContext::layoutTypeCheck(TSourceLoc loc, const TSymbol& symbol)
// an array of size N, all elements of the array from binding through binding + N 1 must be within this
// an array of size N, all elements of the array from binding through binding + N 1 must be within this
// range."
// range."
//
//
// TODO: 4.2 binding limits: binding error checking against limits, arrays
//
if
(
type
.
getBasicType
()
!=
EbtSampler
&&
type
.
getBasicType
()
!=
EbtBlock
)
if
(
type
.
getBasicType
()
!=
EbtSampler
&&
type
.
getBasicType
()
!=
EbtBlock
)
error
(
loc
,
"requires block, or sampler/image, or atomic-counter type"
,
"binding"
,
""
);
error
(
loc
,
"requires block, or sampler/image, or atomic-counter type"
,
"binding"
,
""
);
// TODO: 4.2 functionality: atomic counter: include in test above
// TODO: 4.2 functionality: atomic counter: include in test above
...
...
glslang/MachineIndependent/linkValidate.cpp
View file @
e1b2e39a
...
@@ -476,12 +476,14 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ
...
@@ -476,12 +476,14 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ
TRange
range
=
{
qualifier
.
layoutSlotLocation
,
qualifier
.
layoutSlotLocation
+
size
-
1
};
TRange
range
=
{
qualifier
.
layoutSlotLocation
,
qualifier
.
layoutSlotLocation
+
size
-
1
};
// check for collisions
// check for collisions, except for vertex inputs on desktop
for
(
size_t
r
=
0
;
r
<
usedLocations
[
set
].
size
();
++
r
)
{
if
(
!
(
profile
!=
EEsProfile
&&
language
==
EShLangVertex
&&
qualifier
.
isPipeInput
()))
{
if
(
range
.
last
>=
usedLocations
[
set
][
r
].
start
&&
for
(
size_t
r
=
0
;
r
<
usedLocations
[
set
].
size
();
++
r
)
{
range
.
start
<=
usedLocations
[
set
][
r
].
last
)
{
if
(
range
.
last
>=
usedLocations
[
set
][
r
].
start
&&
// there is a collision; pick one
range
.
start
<=
usedLocations
[
set
][
r
].
last
)
{
return
std
::
max
(
range
.
start
,
usedLocations
[
set
][
r
].
start
);
// there is a collision; pick one
return
std
::
max
(
range
.
start
,
usedLocations
[
set
][
r
].
start
);
}
}
}
}
}
...
...
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