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
60ce877d
Unverified
Commit
60ce877d
authored
Apr 19, 2021
by
Greg Fischer
Committed by
GitHub
Apr 19, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2609 from ZhiqianXia/Feature2
TextureOffset not support sampler2DArrayShadow sampler until 430.
parents
84274372
12f3eb8e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
0 deletions
+86
-0
textureoffset_sampler2darrayshadow.vert.out
Test/baseResults/textureoffset_sampler2darrayshadow.vert.out
+63
-0
textureoffset_sampler2darrayshadow.vert
Test/textureoffset_sampler2darrayshadow.vert
+11
-0
Types.h
glslang/Include/Types.h
+1
-0
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+10
-0
AST.FromFile.cpp
gtests/AST.FromFile.cpp
+1
-0
No files found.
Test/baseResults/textureoffset_sampler2darrayshadow.vert.out
0 → 100644
View file @
60ce877d
textureoffset_sampler2darrayshadow.vert
ERROR: 0:9: 'sampler' : TextureOffset does not support sampler2DArrayShadow : ES Profile
ERROR: 1 compilation errors. No code generated.
Shader version: 300
ERROR: node is still EOpNull!
0:7 Function Definition: main( ( global void)
0:7 Function Parameters:
0:9 Sequence
0:9 move second child to first child ( temp highp 4-component vector of float)
0:9 'gl_Position' ( gl_Position highp 4-component vector of float Position)
0:9 Construct vec4 ( temp highp 4-component vector of float)
0:9 textureOffset ( global mediump float)
0:9 's' ( uniform mediump sampler2DArrayShadow)
0:9 Constant:
0:9 0.000000
0:9 0.000000
0:9 0.000000
0:9 0.000000
0:9 Constant:
0:9 0 (const int)
0:9 0 (const int)
0:10 move second child to first child ( temp highp 4-component vector of float)
0:10 'gl_Position' ( gl_Position highp 4-component vector of float Position)
0:10 'dEQP_Position' ( in highp 4-component vector of float)
0:? Linker Objects
0:? 'dEQP_Position' ( in highp 4-component vector of float)
0:? 's' ( uniform mediump sampler2DArrayShadow)
0:? 'gl_VertexID' ( gl_VertexId highp int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId highp int InstanceId)
Linked vertex stage:
Shader version: 300
ERROR: node is still EOpNull!
0:7 Function Definition: main( ( global void)
0:7 Function Parameters:
0:9 Sequence
0:9 move second child to first child ( temp highp 4-component vector of float)
0:9 'gl_Position' ( gl_Position highp 4-component vector of float Position)
0:9 Construct vec4 ( temp highp 4-component vector of float)
0:9 textureOffset ( global mediump float)
0:9 's' ( uniform mediump sampler2DArrayShadow)
0:9 Constant:
0:9 0.000000
0:9 0.000000
0:9 0.000000
0:9 0.000000
0:9 Constant:
0:9 0 (const int)
0:9 0 (const int)
0:10 move second child to first child ( temp highp 4-component vector of float)
0:10 'gl_Position' ( gl_Position highp 4-component vector of float Position)
0:10 'dEQP_Position' ( in highp 4-component vector of float)
0:? Linker Objects
0:? 'dEQP_Position' ( in highp 4-component vector of float)
0:? 's' ( uniform mediump sampler2DArrayShadow)
0:? 'gl_VertexID' ( gl_VertexId highp int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId highp int InstanceId)
Test/textureoffset_sampler2darrayshadow.vert
0 → 100644
View file @
60ce877d
#version 300 es
precision
mediump
float
;
in
highp
vec4
dEQP_Position
;
uniform
mediump
sampler2DArrayShadow
s
;
void
main
()
{
gl_Position
=
vec4
(
textureOffset
(
s
,
vec4
(
0
),
ivec2
(
0
)));
gl_Position
=
dEQP_Position
;
}
glslang/Include/Types.h
View file @
60ce877d
...
@@ -115,6 +115,7 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
...
@@ -115,6 +115,7 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
#endif
#endif
bool
is1D
()
const
{
return
dim
==
Esd1D
;
}
bool
is1D
()
const
{
return
dim
==
Esd1D
;
}
bool
is2D
()
const
{
return
dim
==
Esd2D
;
}
bool
isBuffer
()
const
{
return
dim
==
EsdBuffer
;
}
bool
isBuffer
()
const
{
return
dim
==
EsdBuffer
;
}
bool
isRect
()
const
{
return
dim
==
EsdRect
;
}
bool
isRect
()
const
{
return
dim
==
EsdRect
;
}
bool
isSubpass
()
const
{
return
dim
==
EsdSubpass
;
}
bool
isSubpass
()
const
{
return
dim
==
EsdSubpass
;
}
...
...
glslang/MachineIndependent/ParseHelper.cpp
View file @
60ce877d
...
@@ -2191,6 +2191,16 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
...
@@ -2191,6 +2191,16 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
"[gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]"
);
"[gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]"
);
}
}
}
}
if
(
callNode
.
getOp
()
==
EOpTextureOffset
)
{
TSampler
s
=
arg0
->
getType
().
getSampler
();
if
(
s
.
is2D
()
&&
s
.
isArrayed
()
&&
s
.
isShadow
())
{
if
(
isEsProfile
())
error
(
loc
,
"TextureOffset does not support sampler2DArrayShadow : "
,
"sampler"
,
"ES Profile"
);
else
if
(
version
<=
420
)
error
(
loc
,
"TextureOffset does not support sampler2DArrayShadow : "
,
"sampler"
,
"version <= 420"
);
}
}
}
}
break
;
break
;
...
...
gtests/AST.FromFile.cpp
View file @
60ce877d
...
@@ -281,6 +281,7 @@ INSTANTIATE_TEST_SUITE_P(
...
@@ -281,6 +281,7 @@ INSTANTIATE_TEST_SUITE_P(
"terminate.frag"
,
"terminate.frag"
,
"terminate.vert"
,
"terminate.vert"
,
"negativeWorkGroupSize.comp"
,
"negativeWorkGroupSize.comp"
,
"textureoffset_sampler2darrayshadow.vert"
,
})),
})),
FileNameAsCustomTestSuffix
FileNameAsCustomTestSuffix
);
);
...
...
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