Commit dad64085 by John Kessenich

Merge pull request #98 from amdrexu/myfix

SPV: Fix an issue related with using CubeArrayShadow for texture()
parents 2c034784 71519fe7
......@@ -1901,9 +1901,11 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
// Check for texture functions other than queries
bool cubeCompare = sampler.dim == glslang::EsdCube && sampler.arrayed && sampler.shadow;
// check for bias argument
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;
if (cracked.offset)
++nonBiasArgCount;
......
......@@ -268,7 +268,7 @@ Linked fragment stage:
124: 15(fvec4) Load 78(i)
127: 126(ptr) AccessChain 78(i) 125
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
132: 84 Load 86(Isca)
133: 15(fvec4) Load 78(i)
......
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)
......@@ -5,6 +5,7 @@ uniform sampler2DRect sr;
uniform sampler3D s3D;
uniform samplerCube sCube;
uniform samplerCubeShadow sCubeShadow;
uniform samplerCubeArrayShadow sCubeArrayShadow;
uniform sampler2DShadow s2DShadow;
uniform sampler2DArray s2DArray;
uniform sampler2DArrayShadow s2DArrayShadow;
......@@ -35,6 +36,7 @@ out vec4 FragData;
void main()
{
vec4 v = texture(s2D, c2D);
v.y += texture(sCubeArrayShadow, c4D, c1D);
v += textureProj(s3D, c4D);
v += textureLod(s2DArray, c3D, 1.2);
v.y += textureOffset(s2DShadow, c3D, ivec2(3), c1D);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment