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
71519fe7
Commit
71519fe7
authored
Nov 11, 2015
by
Rex Xu
Committed by
unknown
Nov 22, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SPV: Fix an issue related with using CubeArrayShadow for texture()
parent
2c034784
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
33 deletions
+6
-33
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+3
-1
spv.130.frag.out
Test/baseResults/spv.130.frag.out
+1
-1
spv.140.vert.out
Test/baseResults/spv.140.vert.out
+0
-31
spv.newTexture.frag.out
Test/baseResults/spv.newTexture.frag.out
+0
-0
spv.newTexture.frag
Test/spv.newTexture.frag
+2
-0
No files found.
SPIRV/GlslangToSpv.cpp
View file @
71519fe7
...
@@ -1901,9 +1901,11 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
...
@@ -1901,9 +1901,11 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
// Check for texture functions other than queries
// Check for texture functions other than queries
bool
cubeCompare
=
sampler
.
dim
==
glslang
::
EsdCube
&&
sampler
.
arrayed
&&
sampler
.
shadow
;
// check for bias argument
// check for bias argument
bool
bias
=
false
;
bool
bias
=
false
;
if
(
!
cracked
.
lod
&&
!
cracked
.
gather
&&
!
cracked
.
grad
&&
!
cracked
.
fetch
)
{
if
(
!
cracked
.
lod
&&
!
cracked
.
gather
&&
!
cracked
.
grad
&&
!
cracked
.
fetch
&&
!
cubeCompare
)
{
int
nonBiasArgCount
=
2
;
int
nonBiasArgCount
=
2
;
if
(
cracked
.
offset
)
if
(
cracked
.
offset
)
++
nonBiasArgCount
;
++
nonBiasArgCount
;
...
...
Test/baseResults/spv.130.frag.out
View file @
71519fe7
...
@@ -268,7 +268,7 @@ Linked fragment stage:
...
@@ -268,7 +268,7 @@ Linked fragment stage:
124: 15(fvec4) Load 78(i)
124: 15(fvec4) Load 78(i)
127: 126(ptr) AccessChain 78(i) 125
127: 126(ptr) AccessChain 78(i) 125
128: 14(float) Load 127
128: 14(float) Load 127
129: 14(float) ImageSampleDrefImplicitLod 123 124 128
Bias 128
129: 14(float) ImageSampleDrefImplicitLod 123 124 128
Store 122(f) 129
Store 122(f) 129
132: 84 Load 86(Isca)
132: 84 Load 86(Isca)
133: 15(fvec4) Load 78(i)
133: 15(fvec4) Load 78(i)
...
...
Test/baseResults/spv.140.vert.out
deleted
100644 → 0
View file @
2c034784
Error: unable to open input file: spv.140.vert
Usage: glslangValidator [option]... [file]...
Where: each 'file' ends in .<stage>, where <stage> is one of
.conf to provide an optional config file that replaces the default configuration
(see -c option below for generating a template)
.vert for a vertex shader
.tesc for a tessellation control shader
.tese for a tessellation evaluation shader
.geom for a geometry shader
.frag for a fragment shader
.comp for a compute shader
Compilation warnings and errors will be printed to stdout.
To get other information, use one of the following options:
(Each option must be specified separately, but can go anywhere in the command line.)
-V create SPIR-V in file <stage>.spv
-H print human readable form of SPIR-V; turns on -V
-E print pre-processed glsl. Cannot be used with -V, -H or -l.
-c configuration dump; use to create default configuration file (redirect to a .conf file)
-d default to desktop (#version 110) when there is no version in the shader (default is ES version 100)
-i intermediate tree (glslang AST) is printed out
-l link validation of all input files
-m memory leak mode
-q dump reflection query database
-r relaxed semantic error-checking mode
-s silent mode
-t multi-threaded mode
-v print version strings
-w suppress warnings (except as required by #extension : warn)
Test/baseResults/spv.newTexture.frag.out
View file @
71519fe7
This diff is collapsed.
Click to expand it.
Test/spv.newTexture.frag
View file @
71519fe7
...
@@ -5,6 +5,7 @@ uniform sampler2DRect sr;
...
@@ -5,6 +5,7 @@ uniform sampler2DRect sr;
uniform
sampler3D
s3D
;
uniform
sampler3D
s3D
;
uniform
samplerCube
sCube
;
uniform
samplerCube
sCube
;
uniform
samplerCubeShadow
sCubeShadow
;
uniform
samplerCubeShadow
sCubeShadow
;
uniform
samplerCubeArrayShadow
sCubeArrayShadow
;
uniform
sampler2DShadow
s2DShadow
;
uniform
sampler2DShadow
s2DShadow
;
uniform
sampler2DArray
s2DArray
;
uniform
sampler2DArray
s2DArray
;
uniform
sampler2DArrayShadow
s2DArrayShadow
;
uniform
sampler2DArrayShadow
s2DArrayShadow
;
...
@@ -35,6 +36,7 @@ out vec4 FragData;
...
@@ -35,6 +36,7 @@ out vec4 FragData;
void
main
()
void
main
()
{
{
vec4
v
=
texture
(
s2D
,
c2D
);
vec4
v
=
texture
(
s2D
,
c2D
);
v
.
y
+=
texture
(
sCubeArrayShadow
,
c4D
,
c1D
);
v
+=
textureProj
(
s3D
,
c4D
);
v
+=
textureProj
(
s3D
,
c4D
);
v
+=
textureLod
(
s2DArray
,
c3D
,
1
.
2
);
v
+=
textureLod
(
s2DArray
,
c3D
,
1
.
2
);
v
.
y
+=
textureOffset
(
s2DShadow
,
c3D
,
ivec2
(
3
),
c1D
);
v
.
y
+=
textureOffset
(
s2DShadow
,
c3D
,
ivec2
(
3
),
c1D
);
...
...
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