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
a3d8557a
Commit
a3d8557a
authored
Aug 14, 2014
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turn on the sampler 2DMS types for ES 3.1.
git-svn-id:
https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27741
e7fa87d3-cd2b-0410-9028-fcbf551c1848
parent
58f5a5e7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
114 additions
and
9 deletions
+114
-9
310.vert
Test/310.vert
+22
-0
310.frag.out
Test/baseResults/310.frag.out
+9
-6
310.vert.out
Test/baseResults/310.vert.out
+70
-1
Todo.txt
Todo.txt
+1
-1
Initialize.cpp
glslang/MachineIndependent/Initialize.cpp
+7
-1
Scan.cpp
glslang/MachineIndependent/Scan.cpp
+5
-0
No files found.
Test/310.vert
View file @
a3d8557a
...
@@ -47,3 +47,24 @@ void main()
...
@@ -47,3 +47,24 @@ void main()
v4
=
unpackUnorm4x8
(
u1
);
v4
=
unpackUnorm4x8
(
u1
);
v4
=
unpackSnorm4x8
(
u1
);
v4
=
unpackSnorm4x8
(
u1
);
}
}
precision
highp
sampler2DMS
;
precision
highp
isampler2DMS
;
precision
highp
usampler2DMS
;
uniform
sampler2DMS
s2dms
;
uniform
isampler2DMS
is2dms
;
uniform
usampler2DMS
us2dms
;
uniform
usampler2DMSArray
us2dmsa
;
// ERROR
void
foo
()
{
ivec2
v2
;
v2
=
textureSize
(
s2dms
);
v2
=
textureSize
(
us2dms
);
vec4
v4
=
texelFetch
(
s2dms
,
v2
,
2
);
ivec4
iv4
=
texelFetch
(
is2dms
,
v2
,
2
);
textureSamples
(
s2dms
);
// ERROR
}
\ No newline at end of file
Test/baseResults/310.frag.out
View file @
a3d8557a
...
@@ -23,15 +23,12 @@ ERROR: 0:78: 'location' : too large for fragment output
...
@@ -23,15 +23,12 @@ ERROR: 0:78: 'location' : too large for fragment output
ERROR: 0:78: 'location' : overlapping use of location 40
ERROR: 0:78: 'location' : overlapping use of location 40
ERROR: 0:79: 'non-literal layout-id value' : not supported with this profile: es
ERROR: 0:79: 'non-literal layout-id value' : not supported with this profile: es
ERROR: 0:79: 'layout-id value' : cannot be negative
ERROR: 0:79: 'layout-id value' : cannot be negative
ERROR: 0:92: 'sampler2DMS' : Reserved word.
ERROR: 0:98: 'textureSize' : no matching overloaded function found
ERROR: 0:98: 'assign' : cannot convert from 'const float' to 'highp 2-component vector of int'
ERROR: 0:99: 'writeonly' : argument cannot drop memory qualifier when passed to formal parameter
ERROR: 0:99: 'writeonly' : argument cannot drop memory qualifier when passed to formal parameter
ERROR: 0:102: 'out' : cannot be bool
ERROR: 0:102: 'out' : cannot be bool
ERROR: 0:103: 'image2D' : sampler/image types can only be used in uniform variables or function parameters: imageOut
ERROR: 0:103: 'image2D' : sampler/image types can only be used in uniform variables or function parameters: imageOut
ERROR: 0:103: '' : image variables not declared 'writeonly' must have a format layout qualifier
ERROR: 0:103: '' : image variables not declared 'writeonly' must have a format layout qualifier
ERROR: 0:104: 'out' : cannot be a matrix
ERROR: 0:104: 'out' : cannot be a matrix
ERROR:
31
compilation errors. No code generated.
ERROR:
28
compilation errors. No code generated.
Shader version: 310
Shader version: 310
...
@@ -225,7 +222,10 @@ ERROR: node is still EOpNull!
...
@@ -225,7 +222,10 @@ ERROR: node is still EOpNull!
0:97 'isamp2DA' (uniform highp isampler2DArray)
0:97 'isamp2DA' (uniform highp isampler2DArray)
0:97 Constant:
0:97 Constant:
0:97 3 (const int)
0:97 3 (const int)
0:98 'v2' (highp 2-component vector of int)
0:98 move second child to first child (highp 2-component vector of int)
0:98 'v2' (highp 2-component vector of int)
0:98 Function Call: textureSize(s21; (highp 2-component vector of int)
0:98 's2dms' (uniform highp sampler2DMS)
0:99 move second child to first child (highp 2-component vector of int)
0:99 move second child to first child (highp 2-component vector of int)
0:99 'v2' (highp 2-component vector of int)
0:99 'v2' (highp 2-component vector of int)
0:99 Function Call: imageSize(I21; (highp 2-component vector of int)
0:99 Function Call: imageSize(I21; (highp 2-component vector of int)
...
@@ -455,7 +455,10 @@ ERROR: node is still EOpNull!
...
@@ -455,7 +455,10 @@ ERROR: node is still EOpNull!
0:97 'isamp2DA' (uniform highp isampler2DArray)
0:97 'isamp2DA' (uniform highp isampler2DArray)
0:97 Constant:
0:97 Constant:
0:97 3 (const int)
0:97 3 (const int)
0:98 'v2' (highp 2-component vector of int)
0:98 move second child to first child (highp 2-component vector of int)
0:98 'v2' (highp 2-component vector of int)
0:98 Function Call: textureSize(s21; (highp 2-component vector of int)
0:98 's2dms' (uniform highp sampler2DMS)
0:99 move second child to first child (highp 2-component vector of int)
0:99 move second child to first child (highp 2-component vector of int)
0:99 'v2' (highp 2-component vector of int)
0:99 'v2' (highp 2-component vector of int)
0:99 Function Call: imageSize(I21; (highp 2-component vector of int)
0:99 Function Call: imageSize(I21; (highp 2-component vector of int)
...
...
Test/baseResults/310.vert.out
View file @
a3d8557a
...
@@ -4,7 +4,10 @@ ERROR: 0:3: 'shared' : not supported in this stage: vertex
...
@@ -4,7 +4,10 @@ ERROR: 0:3: 'shared' : not supported in this stage: vertex
ERROR: 0:4: 'local_size_x' : there is no such layout identifier for this stage taking an assigned value
ERROR: 0:4: 'local_size_x' : there is no such layout identifier for this stage taking an assigned value
ERROR: 0:5: 'buffer' : buffers can be declared only as blocks
ERROR: 0:5: 'buffer' : buffers can be declared only as blocks
ERROR: 0:10: 'location' : overlapping use of location 3
ERROR: 0:10: 'location' : overlapping use of location 3
ERROR: 4 compilation errors. No code generated.
ERROR: 0:58: 'usampler2DMSArray' : Reserved word.
ERROR: 0:58: 'sampler/image' : type requires declaration of default precision qualifier
ERROR: 0:67: 'textureSamples' : no matching overloaded function found
ERROR: 7 compilation errors. No code generated.
Shader version: 310
Shader version: 310
...
@@ -126,6 +129,35 @@ ERROR: node is still EOpNull!
...
@@ -126,6 +129,35 @@ ERROR: node is still EOpNull!
0:48 'v4' (mediump 4-component vector of float)
0:48 'v4' (mediump 4-component vector of float)
0:48 Function Call: unpackSnorm4x8(u1; (mediump 4-component vector of float)
0:48 Function Call: unpackSnorm4x8(u1; (mediump 4-component vector of float)
0:48 'u1' (highp uint)
0:48 'u1' (highp uint)
0:60 Function Definition: foo( (void)
0:60 Function Parameters:
0:? Sequence
0:63 move second child to first child (highp 2-component vector of int)
0:63 'v2' (highp 2-component vector of int)
0:63 Function Call: textureSize(s21; (highp 2-component vector of int)
0:63 's2dms' (uniform highp sampler2DMS)
0:64 move second child to first child (highp 2-component vector of int)
0:64 'v2' (highp 2-component vector of int)
0:64 Function Call: textureSize(us21; (highp 2-component vector of int)
0:64 'us2dms' (uniform highp usampler2DMS)
0:65 Sequence
0:65 move second child to first child (highp 4-component vector of float)
0:65 'v4' (highp 4-component vector of float)
0:65 Function Call: texelFetch(s21;vi2;i1; (highp 4-component vector of float)
0:65 's2dms' (uniform highp sampler2DMS)
0:65 'v2' (highp 2-component vector of int)
0:65 Constant:
0:65 2 (const int)
0:66 Sequence
0:66 move second child to first child (highp 4-component vector of int)
0:66 'iv4' (highp 4-component vector of int)
0:66 Function Call: texelFetch(is21;vi2;i1; (highp 4-component vector of int)
0:66 'is2dms' (uniform highp isampler2DMS)
0:66 'v2' (highp 2-component vector of int)
0:66 Constant:
0:66 2 (const int)
0:67 Constant:
0:67 0.000000
0:? Linker Objects
0:? Linker Objects
0:? 's' (shared highp 4-component vector of float)
0:? 's' (shared highp 4-component vector of float)
0:? 'v' (buffer highp 4-component vector of float)
0:? 'v' (buffer highp 4-component vector of float)
...
@@ -133,6 +165,10 @@ ERROR: node is still EOpNull!
...
@@ -133,6 +165,10 @@ ERROR: node is still EOpNull!
0:? 'y' (layout(location=3 ) uniform highp 4X4 matrix of float)
0:? 'y' (layout(location=3 ) uniform highp 4X4 matrix of float)
0:? 'xi' (layout(location=2 ) smooth out highp 4X4 matrix of float)
0:? 'xi' (layout(location=2 ) smooth out highp 4X4 matrix of float)
0:? 'yi' (layout(location=3 ) smooth out highp 4X4 matrix of float)
0:? 'yi' (layout(location=3 ) smooth out highp 4X4 matrix of float)
0:? 's2dms' (uniform highp sampler2DMS)
0:? 'is2dms' (uniform highp isampler2DMS)
0:? 'us2dms' (uniform highp usampler2DMS)
0:? 'us2dmsa' (uniform mediump usampler2DMSArray)
0:? 'gl_VertexID' (gl_VertexId highp int)
0:? 'gl_VertexID' (gl_VertexId highp int)
0:? 'gl_InstanceID' (gl_InstanceId highp int)
0:? 'gl_InstanceID' (gl_InstanceId highp int)
...
@@ -259,6 +295,35 @@ ERROR: node is still EOpNull!
...
@@ -259,6 +295,35 @@ ERROR: node is still EOpNull!
0:48 'v4' (mediump 4-component vector of float)
0:48 'v4' (mediump 4-component vector of float)
0:48 Function Call: unpackSnorm4x8(u1; (mediump 4-component vector of float)
0:48 Function Call: unpackSnorm4x8(u1; (mediump 4-component vector of float)
0:48 'u1' (highp uint)
0:48 'u1' (highp uint)
0:60 Function Definition: foo( (void)
0:60 Function Parameters:
0:? Sequence
0:63 move second child to first child (highp 2-component vector of int)
0:63 'v2' (highp 2-component vector of int)
0:63 Function Call: textureSize(s21; (highp 2-component vector of int)
0:63 's2dms' (uniform highp sampler2DMS)
0:64 move second child to first child (highp 2-component vector of int)
0:64 'v2' (highp 2-component vector of int)
0:64 Function Call: textureSize(us21; (highp 2-component vector of int)
0:64 'us2dms' (uniform highp usampler2DMS)
0:65 Sequence
0:65 move second child to first child (highp 4-component vector of float)
0:65 'v4' (highp 4-component vector of float)
0:65 Function Call: texelFetch(s21;vi2;i1; (highp 4-component vector of float)
0:65 's2dms' (uniform highp sampler2DMS)
0:65 'v2' (highp 2-component vector of int)
0:65 Constant:
0:65 2 (const int)
0:66 Sequence
0:66 move second child to first child (highp 4-component vector of int)
0:66 'iv4' (highp 4-component vector of int)
0:66 Function Call: texelFetch(is21;vi2;i1; (highp 4-component vector of int)
0:66 'is2dms' (uniform highp isampler2DMS)
0:66 'v2' (highp 2-component vector of int)
0:66 Constant:
0:66 2 (const int)
0:67 Constant:
0:67 0.000000
0:? Linker Objects
0:? Linker Objects
0:? 's' (shared highp 4-component vector of float)
0:? 's' (shared highp 4-component vector of float)
0:? 'v' (buffer highp 4-component vector of float)
0:? 'v' (buffer highp 4-component vector of float)
...
@@ -266,6 +331,10 @@ ERROR: node is still EOpNull!
...
@@ -266,6 +331,10 @@ ERROR: node is still EOpNull!
0:? 'y' (layout(location=3 ) uniform highp 4X4 matrix of float)
0:? 'y' (layout(location=3 ) uniform highp 4X4 matrix of float)
0:? 'xi' (layout(location=2 ) smooth out highp 4X4 matrix of float)
0:? 'xi' (layout(location=2 ) smooth out highp 4X4 matrix of float)
0:? 'yi' (layout(location=3 ) smooth out highp 4X4 matrix of float)
0:? 'yi' (layout(location=3 ) smooth out highp 4X4 matrix of float)
0:? 's2dms' (uniform highp sampler2DMS)
0:? 'is2dms' (uniform highp isampler2DMS)
0:? 'us2dms' (uniform highp usampler2DMS)
0:? 'us2dmsa' (uniform mediump usampler2DMSArray)
0:? 'gl_VertexID' (gl_VertexId highp int)
0:? 'gl_VertexID' (gl_VertexId highp int)
0:? 'gl_InstanceID' (gl_InstanceId highp int)
0:? 'gl_InstanceID' (gl_InstanceId highp int)
Todo.txt
View file @
a3d8557a
...
@@ -85,7 +85,7 @@ Shader Functionality to Implement/Finish
...
@@ -85,7 +85,7 @@ Shader Functionality to Implement/Finish
- overlapping offsets
- overlapping offsets
+ frexp/ldexp
+ frexp/ldexp
+ packUnorm4x8(),packSnorm4x8(), unpackUnorm4x8(), unpackSnorm4x8()
+ packUnorm4x8(),packSnorm4x8(), unpackUnorm4x8(), unpackSnorm4x8()
-
2DMS samplers and images
+
2DMS samplers and images
- inheritance of memory qualifiers in block members
- inheritance of memory qualifiers in block members
GLSL 1.2
GLSL 1.2
+ Handle multiple compilation units per stage
+ Handle multiple compilation units per stage
...
...
glslang/MachineIndependent/Initialize.cpp
View file @
a3d8557a
...
@@ -1757,7 +1757,11 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile)
...
@@ -1757,7 +1757,11 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile)
if
((
ms
||
image
)
&&
shadow
)
if
((
ms
||
image
)
&&
shadow
)
continue
;
continue
;
if
(
ms
&&
(
profile
==
EEsProfile
||
version
<
150
))
if
(
ms
&&
profile
!=
EEsProfile
&&
version
<
150
)
continue
;
if
(
ms
&&
image
&&
profile
==
EEsProfile
)
continue
;
if
(
ms
&&
profile
==
EEsProfile
&&
version
<
310
)
continue
;
continue
;
for
(
int
arrayed
=
0
;
arrayed
<=
1
;
++
arrayed
)
{
// loop over "bool" arrayed or not
for
(
int
arrayed
=
0
;
arrayed
<=
1
;
++
arrayed
)
{
// loop over "bool" arrayed or not
...
@@ -1777,6 +1781,8 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile)
...
@@ -1777,6 +1781,8 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile)
continue
;
continue
;
if
(
dim
==
EsdBuffer
&&
(
shadow
||
arrayed
||
ms
))
if
(
dim
==
EsdBuffer
&&
(
shadow
||
arrayed
||
ms
))
continue
;
continue
;
if
(
ms
&&
arrayed
&&
profile
==
EEsProfile
)
continue
;
for
(
int
bType
=
0
;
bType
<
3
;
++
bType
)
{
// float, int, uint results
for
(
int
bType
=
0
;
bType
<
3
;
++
bType
)
{
// float, int, uint results
...
...
glslang/MachineIndependent/Scan.cpp
View file @
a3d8557a
...
@@ -842,6 +842,11 @@ int TScanContext::tokenizeIdentifier()
...
@@ -842,6 +842,11 @@ int TScanContext::tokenizeIdentifier()
case
SAMPLER2DMS
:
case
SAMPLER2DMS
:
case
ISAMPLER2DMS
:
case
ISAMPLER2DMS
:
case
USAMPLER2DMS
:
case
USAMPLER2DMS
:
afterType
=
true
;
if
(
parseContext
.
profile
==
EEsProfile
&&
parseContext
.
version
>=
310
)
return
keyword
;
return
es30ReservedFromGLSL
(
150
);
case
SAMPLER2DMSARRAY
:
case
SAMPLER2DMSARRAY
:
case
ISAMPLER2DMSARRAY
:
case
ISAMPLER2DMSARRAY
:
case
USAMPLER2DMSARRAY
:
case
USAMPLER2DMSARRAY
:
...
...
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