summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2024-05-17 18:10:35 -0700
committerGitHub <noreply@github.com>2024-05-17 18:10:35 -0700
commit40360431dfac9ec122a0300471d42be9d265f452 (patch)
treecd042b8de4a1c57fa54d70db2aed4c2c234a3cca /tests
parent0a5908dc9a0cde87dcb14176b9053c2fbaf31cfd (diff)
SPIR-V support for GLSL texture functions (#4184)
* SPIR-V support for GLSL texture functions Closes #4147 This commit implements GLSL texture functions with SPIR-V intrinsics. It also implements some of missing GLSL implementations. - textureProj - textureLod - texelFetchOffset - textureProjOffset - textureLodOffset - textureProjLod - textureProjLodOffset - textureGrad - textureGradOffset - textureProjGrad - textureProjGradOffset * Fix SPIR-V issues discovered while improving the test case. * Add __requireComputeDerivative() whenever sampling * Do not touch GetDimensions
Diffstat (limited to 'tests')
-rw-r--r--tests/glsl-intrinsic/intrinsic-texture.slang1278
1 files changed, 1102 insertions, 176 deletions
diff --git a/tests/glsl-intrinsic/intrinsic-texture.slang b/tests/glsl-intrinsic/intrinsic-texture.slang
index a136ca1da..5e79ef2c0 100644
--- a/tests/glsl-intrinsic/intrinsic-texture.slang
+++ b/tests/glsl-intrinsic/intrinsic-texture.slang
@@ -1,25 +1,15 @@
#version 450 core
#extension GL_EXT_texture_shadow_lod : enable
-//TEST:SIMPLE(filecheck=CHECK_GLSL): -allow-glsl -stage compute -entry computeMain -target glsl -DCOMPUTE
-//TEST:SIMPLE(filecheck=CHECK_GLSL): -allow-glsl -stage fragment -entry computeMain -target glsl
-//TEST:SIMPLE(filecheck=CHECK_SPV): -allow-glsl -stage fragment -entry computeMain -target spirv -emit-spirv-via-glsl
-//TEST:SIMPLE(filecheck=CHECK_SPV_DIRECT): -allow-glsl -stage compute -entry computeMain -target spirv -DCOMPUTE
-//TEST:SIMPLE(filecheck=CHECK_SPV_DIRECT): -allow-glsl -stage fragment -entry computeMain -target spirv
-//TEST:SIMPLE(filecheck=CHECK_CUDA): -allow-glsl -stage compute -entry computeMain -target cuda -DCOMPUTE
-//TEST:SIMPLE(filecheck=CHECK_CUDA): -allow-glsl -stage fragment -entry computeMain -target cuda
-
-// Disabling following targets because they are currently causing compile errors.
-//DISABLE_TEST:SIMPLE(filecheck=CHECK_HLSL): -allow-glsl -stage compute -entry computeMain -target hlsl -DCOMPUTE
-//DISABLE_TEST:SIMPLE(filecheck=CHECK_CPP): -allow-glsl -stage compute -entry computeMain -target cpp -DCOMPUTE
-
-// It appears that CUDA doesn't have implementations for multisampling samplers.
-// When targetting glsl and spirv, the DEBUG build of slangc encounters issues with "Array" variant
-// of multisampling samplers: sampler2DMSArray, isampler2DMSArray and usampler2DMSArray.
-//#define TEST_when_multisampling_works
-
-//RWStructuredBuffer<float> outputBuffer;
-//layout(location = 0) out vec4 o_color;
+//TEST:SIMPLE(filecheck=HLSL): -allow-glsl -stage compute -entry computeMain -target hlsl -DCOMPUTE
+//TEST:SIMPLE(filecheck=HLSL): -allow-glsl -stage fragment -entry computeMain -target hlsl
+//TEST:SIMPLE(filecheck=GLSL): -allow-glsl -stage compute -entry computeMain -target glsl -DCOMPUTE
+//TEST:SIMPLE(filecheck=GLSL): -allow-glsl -stage fragment -entry computeMain -target glsl
+//TEST:SIMPLE(filecheck=SPIR): -allow-glsl -stage fragment -entry computeMain -target spirv -emit-spirv-via-glsl
+//TEST:SIMPLE(filecheck=SPIR): -allow-glsl -stage compute -entry computeMain -target spirv -DCOMPUTE
+//TEST:SIMPLE(filecheck=SPIR): -allow-glsl -stage fragment -entry computeMain -target spirv
+//TEST:SIMPLE(filecheck=CUDA): -allow-glsl -stage compute -entry computeMain -target cuda -DCOMPUTE
+//TEST:SIMPLE(filecheck=CUDA): -allow-glsl -stage fragment -entry computeMain -target cuda
buffer MyBlockName
{
@@ -44,10 +34,8 @@ uniform sampler1DArray uniform_sampler1DArray;
uniform sampler2DArray uniform_sampler2DArray;
uniform samplerCubeArray uniform_samplerCubeArray;
uniform samplerBuffer uniform_samplerBuffer;
-#if defined(TEST_when_multisampling_works)
uniform sampler2DMS uniform_sampler2DMS;
uniform sampler2DMSArray uniform_sampler2DMSArray;
-#endif // #if defined(TEST_when_multisampling_works)
uniform isampler1D uniform_isampler1D;
uniform isampler2D uniform_isampler2D;
@@ -58,10 +46,8 @@ uniform isampler1DArray uniform_isampler1DArray;
uniform isampler2DArray uniform_isampler2DArray;
uniform isamplerCubeArray uniform_isamplerCubeArray;
uniform isamplerBuffer uniform_isamplerBuffer;
-#if defined(TEST_when_multisampling_works)
uniform isampler2DMS uniform_isampler2DMS;
uniform isampler2DMSArray uniform_isampler2DMSArray;
-#endif // #if defined(TEST_when_multisampling_works)
uniform usampler1D uniform_usampler1D;
uniform usampler2D uniform_usampler2D;
@@ -72,10 +58,8 @@ uniform usampler1DArray uniform_usampler1DArray;
uniform usampler2DArray uniform_usampler2DArray;
uniform usamplerCubeArray uniform_usamplerCubeArray;
uniform usamplerBuffer uniform_usamplerBuffer;
-#if defined(TEST_when_multisampling_works)
uniform usampler2DMS uniform_usampler2DMS;
uniform usampler2DMSArray uniform_usampler2DMSArray;
-#endif // #if defined(TEST_when_multisampling_works)
__generic<T : __BuiltinFloatingPointType, let N : int>
bool textureFuncs( Sampler1D<vector<T,N>> gsampler1D
@@ -87,280 +71,1234 @@ bool textureFuncs( Sampler1D<vector<T,N>> gsampler1D
, Sampler2DArray<vector<T,N>> gsampler2DArray
, SamplerCubeArray<vector<T,N>> gsamplerCubeArray
, SamplerBuffer<vector<T,N>> gsamplerBuffer
-#if defined(TEST_when_multisampling_works)
, Sampler2DMS<vector<T,N>> gsampler2DMS
, Sampler2DMSArray<vector<T,N>> gsampler2DMSArray
-#endif // #if defined(TEST_when_multisampling_works)
)
{
+ // GLSL-LABEL: textureFuncs_0
typealias gvec4 = vector<T,4>;
- constexpr ivec2 ivec2_0 = ivec2(0);
+ constexpr ivec2 offset2D = ivec2(0);
+ constexpr ivec3 offset3D = ivec3(0);
+ constexpr ivec2 offsets[4] = { ivec2(0), ivec2(0), ivec2(0), ivec2(0) };
return true
// 8.9.1. Texture Query Functions
+
+ // GLSL: textureSize({{.*}}sampler1D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQuerySize{{.*}}[[IMAGE]]
&& int(0) == textureSize(gsampler1D, int(0))
+
+ // GLSL: textureSize({{.*}}sampler2D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQuerySize{{.*}}[[IMAGE]]
&& ivec2(0) == textureSize(gsampler2D, int(0))
+
+ // GLSL: textureSize({{.*}}sampler3D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler3D
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQuerySize{{.*}}[[IMAGE]]
&& ivec3(0) == textureSize(gsampler3D, int(0))
+
+ // GLSL: textureSize({{.*}}samplerCube
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCube
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQuerySize{{.*}}[[IMAGE]]
&& ivec2(0) == textureSize(gsamplerCube, int(0))
+
+ // GLSL: textureSize({{.*}}sampler1DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DShadow
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQuerySize{{.*}}[[IMAGE]]
&& int(0) == textureSize(uniform_sampler1DShadow, int(0))
+
+ // GLSL: textureSize({{.*}}sampler2DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DShadow
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQuerySize{{.*}}[[IMAGE]]
&& ivec2(0) == textureSize(uniform_sampler2DShadow, int(0))
+
+ // GLSL: textureSize({{.*}}samplerCubeShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCubeShadow
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQuerySize{{.*}}[[IMAGE]]
&& ivec2(0) == textureSize(uniform_samplerCubeShadow, int(0))
+
+ // GLSL: textureSize({{.*}}samplerCubeArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCubeArray
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQuerySize{{.*}}[[IMAGE]]
&& ivec3(0) == textureSize(gsamplerCubeArray, int(0))
+
+ // GLSL: textureSize({{.*}}samplerCubeArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCubeArrayShadow
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQuerySize{{.*}}[[IMAGE]]
&& ivec3(0) == textureSize(uniform_samplerCubeArrayShadow, int(0))
+
+ // GLSL: textureSize({{.*}}sampler2DRect
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRect
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQuerySize{{.*}}[[IMAGE]]
&& ivec2(0) == textureSize(gsampler2DRect)
+
+ // GLSL: textureSize({{.*}}sampler2DRectShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRectShadow
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQuerySize{{.*}}[[IMAGE]]
&& ivec2(0) == textureSize(uniform_sampler2DRectShadow)
+
+ // GLSL: textureSize({{.*}}sampler1DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArray
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQuerySize{{.*}}[[IMAGE]]
&& ivec2(0) == textureSize(gsampler1DArray, int(0))
+
+ // GLSL: textureSize({{.*}}sampler1DArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArrayShadow
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQuerySize{{.*}}[[IMAGE]]
&& ivec2(0) == textureSize(uniform_sampler1DArrayShadow, int(0))
+
+ // GLSL: textureSize({{.*}}sampler2DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArray
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQuerySize{{.*}}[[IMAGE]]
&& ivec3(0) == textureSize(gsampler2DArray, int(0))
+
+ // GLSL: textureSize({{.*}}sampler2DArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArrayShadow
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQuerySize{{.*}}[[IMAGE]]
&& ivec3(0) == textureSize(uniform_sampler2DArrayShadow, int(0))
+
+ // GLSL: imageSize({{.*}}samplerBuffer
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerBuffer
+ // SPIR: OpImageQuerySize{{.*}}[[LOAD]]
&& int(0) == textureSize(gsamplerBuffer)
-#if defined(TEST_when_multisampling_works)
+
+ // GLSL: textureSize({{.*}}sampler2DMS
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DMS
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQuerySize{{.*}}[[IMAGE]]
&& ivec2(0) == textureSize(gsampler2DMS)
+
+ // GLSL: textureSize({{.*}}sampler2DMSArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DMSArray
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQuerySize{{.*}}[[IMAGE]]
&& ivec3(0) == textureSize(gsampler2DMSArray)
-#endif // #if defined(TEST_when_multisampling_works)
+
+ // GLSL: textureQueryLod({{.*}}sampler1D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // SPIR: OpImageQueryLod{{.*}}[[LOAD]]
&& vec2(0) == textureQueryLod(gsampler1D, float(0))
+
+ // GLSL: textureQueryLod({{.*}}sampler2D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: OpImageQueryLod{{.*}}[[LOAD]]
&& vec2(0) == textureQueryLod(gsampler2D, vec2(0))
+
+ // GLSL: textureQueryLod({{.*}}sampler3D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler3D
+ // SPIR: OpImageQueryLod{{.*}}[[LOAD]]
&& vec2(0) == textureQueryLod(gsampler3D, vec3(0))
+
+ // GLSL: textureQueryLod({{.*}}samplerCube
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCube
+ // SPIR: OpImageQueryLod{{.*}}[[LOAD]]
&& vec2(0) == textureQueryLod(gsamplerCube, vec3(0))
+
+ // GLSL: textureQueryLod({{.*}}sampler1DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArray
+ // SPIR: OpImageQueryLod{{.*}}[[LOAD]]
&& vec2(0) == textureQueryLod(gsampler1DArray, float(0))
+
+ // GLSL: textureQueryLod({{.*}}sampler2DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArray
+ // SPIR: OpImageQueryLod{{.*}}[[LOAD]]
&& vec2(0) == textureQueryLod(gsampler2DArray, vec2(0))
+
+ // GLSL: textureQueryLod({{.*}}samplerCubeArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCubeArray
+ // SPIR: OpImageQueryLod{{.*}}[[LOAD]]
&& vec2(0) == textureQueryLod(gsamplerCubeArray, vec3(0))
+
+ // GLSL: textureQueryLod({{.*}}sampler1DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DShadow
+ // SPIR: OpImageQueryLod{{.*}}[[LOAD]]
&& vec2(0) == textureQueryLod(uniform_sampler1DShadow, float(0))
+
+ // GLSL: textureQueryLod({{.*}}sampler2DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DShadow
+ // SPIR: OpImageQueryLod{{.*}}[[LOAD]]
&& vec2(0) == textureQueryLod(uniform_sampler2DShadow, vec2(0))
+
+ // GLSL: textureQueryLod({{.*}}samplerCubeShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCubeShadow
+ // SPIR: OpImageQueryLod{{.*}}[[LOAD]]
&& vec2(0) == textureQueryLod(uniform_samplerCubeShadow, vec3(0))
+
+ // GLSL: textureQueryLod({{.*}}sampler1DArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArrayShadow
+ // SPIR: OpImageQueryLod{{.*}}[[LOAD]]
&& vec2(0) == textureQueryLod(uniform_sampler1DArrayShadow, float(0))
+
+ // GLSL: textureQueryLod({{.*}}sampler2DArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArrayShadow
+ // SPIR: OpImageQueryLod{{.*}}[[LOAD]]
&& vec2(0) == textureQueryLod(uniform_sampler2DArrayShadow, vec2(0))
+
+ // GLSL: textureQueryLod({{.*}}samplerCubeArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCubeArrayShadow
+ // SPIR: OpImageQueryLod{{.*}}[[LOAD]]
&& vec2(0) == textureQueryLod(uniform_samplerCubeArrayShadow, vec3(0))
+
+ // GLSL: textureQueryLevels({{.*}}sampler1D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQueryLevels{{.*}}[[IMAGE]]
&& int(0) == textureQueryLevels(gsampler1D)
+
+ // GLSL: textureQueryLevels({{.*}}sampler2D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQueryLevels{{.*}}[[IMAGE]]
&& int(0) == textureQueryLevels(gsampler2D)
+
+ // GLSL: textureQueryLevels({{.*}}sampler3D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler3D
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQueryLevels{{.*}}[[IMAGE]]
&& int(0) == textureQueryLevels(gsampler3D)
+
+ // GLSL: textureQueryLevels({{.*}}samplerCube
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCube
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQueryLevels{{.*}}[[IMAGE]]
&& int(0) == textureQueryLevels(gsamplerCube)
+
+ // GLSL: textureQueryLevels({{.*}}sampler1DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArray
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQueryLevels{{.*}}[[IMAGE]]
&& int(0) == textureQueryLevels(gsampler1DArray)
+
+ // GLSL: textureQueryLevels({{.*}}sampler2DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArray
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQueryLevels{{.*}}[[IMAGE]]
&& int(0) == textureQueryLevels(gsampler2DArray)
+
+ // GLSL: textureQueryLevels({{.*}}samplerCubeArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCubeArray
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQueryLevels{{.*}}[[IMAGE]]
&& int(0) == textureQueryLevels(gsamplerCubeArray)
+
+ // GLSL: textureQueryLevels({{.*}}sampler1DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DShadow
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQueryLevels{{.*}}[[IMAGE]]
&& int(0) == textureQueryLevels(uniform_sampler1DShadow)
+
+ // GLSL: textureQueryLevels({{.*}}sampler2DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DShadow
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQueryLevels{{.*}}[[IMAGE]]
&& int(0) == textureQueryLevels(uniform_sampler2DShadow)
+
+ // GLSL: textureQueryLevels({{.*}}samplerCubeShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCubeShadow
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQueryLevels{{.*}}[[IMAGE]]
&& int(0) == textureQueryLevels(uniform_samplerCubeShadow)
+
+ // GLSL: textureQueryLevels({{.*}}sampler1DArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArrayShadow
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQueryLevels{{.*}}[[IMAGE]]
&& int(0) == textureQueryLevels(uniform_sampler1DArrayShadow)
+
+ // GLSL: textureQueryLevels({{.*}}sampler2DArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArrayShadow
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQueryLevels{{.*}}[[IMAGE]]
&& int(0) == textureQueryLevels(uniform_sampler2DArrayShadow)
+
+ // GLSL: textureQueryLevels({{.*}}samplerCubeArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCubeArrayShadow
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQueryLevels{{.*}}[[IMAGE]]
&& int(0) == textureQueryLevels(uniform_samplerCubeArrayShadow)
-#if defined(TEST_when_multisampling_works)
+
+ // GLSL: textureSamples({{.*}}sampler2DMS
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DMS
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQuerySamples{{.*}}[[IMAGE]]
&& int(0) == textureSamples(gsampler2DMS)
+
+ // GLSL: textureSamples({{.*}}sampler2DMSArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DMSArray
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageQuerySamples{{.*}}[[IMAGE]]
&& int(0) == textureSamples(gsampler2DMSArray)
-#endif // #if defined(TEST_when_multisampling_works)
// 8.9.2. Texel Lookup Functions
+
+ // GLSL: texture({{.*}}sampler1D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // SPIR: OpImageSampleImplicitLod{{.*}}[[LOAD]]
&& gvec4(T(0)) == texture(gsampler1D, float(0))
+
+ // GLSL: texture({{.*}}sampler1D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // SPIR: OpImageSampleImplicitLod{{.*}}[[LOAD]]{{.*}} Bias %
&& gvec4(T(0)) == texture(gsampler1D, float(0), float(0))
+
+ // GLSL: texture({{.*}}sampler2D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: OpImageSampleImplicitLod{{.*}}[[LOAD]]
&& gvec4(T(0)) == texture(gsampler2D, vec2(0))
+
+ // GLSL: texture({{.*}}sampler2D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: OpImageSampleImplicitLod{{.*}}[[LOAD]]{{.*}} Bias %
&& gvec4(T(0)) == texture(gsampler2D, vec2(0), float(0))
+
+ // GLSL: texture({{.*}}sampler3D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler3D
+ // SPIR: OpImageSampleImplicitLod{{.*}}[[LOAD]]
&& gvec4(T(0)) == texture(gsampler3D, vec3(0))
+
+ // GLSL: texture({{.*}}sampler3D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler3D
+ // SPIR: OpImageSampleImplicitLod{{.*}}[[LOAD]]{{.*}} Bias %
&& gvec4(T(0)) == texture(gsampler3D, vec3(0), float(0))
+
+ // GLSL: texture({{.*}}samplerCube
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCube
+ // SPIR: OpImageSampleImplicitLod{{.*}}[[LOAD]]
&& gvec4(T(0)) == texture(gsamplerCube, vec3(0) )
+
+ // GLSL: texture({{.*}}samplerCube
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCube
+ // SPIR: OpImageSampleImplicitLod{{.*}}[[LOAD]]{{.*}} Bias %
&& gvec4(T(0)) == texture(gsamplerCube, vec3(0), float(0))
+
+ // GLSL: texture({{.*}}sampler1DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DShadow
+ // SPIR: OpImageSampleDrefImplicitLod{{.*}}[[LOAD]]
&& float(0) == texture(uniform_sampler1DShadow, vec3(0))
+
+ // GLSL: texture({{.*}}sampler1DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DShadow
+ // SPIR: OpImageSampleDrefImplicitLod{{.*}}[[LOAD]]{{.*}} Bias %
&& float(0) == texture(uniform_sampler1DShadow, vec3(0), float(0))
+
+ // GLSL: texture({{.*}}sampler2DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DShadow
+ // SPIR: OpImageSampleDrefImplicitLod{{.*}}[[LOAD]]
&& float(0) == texture(uniform_sampler2DShadow, vec3(0))
+
+ // GLSL: texture({{.*}}sampler2DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DShadow
+ // SPIR: OpImageSampleDrefImplicitLod{{.*}}[[LOAD]]{{.*}} Bias %
&& float(0) == texture(uniform_sampler2DShadow, vec3(0), float(0))
+
+ // GLSL: texture({{.*}}samplerCubeShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCubeShadow
+ // SPIR: OpImageSampleDrefImplicitLod{{.*}}[[LOAD]]
&& float(0) == texture(uniform_samplerCubeShadow, vec4(0))
+
+ // GLSL: texture({{.*}}samplerCubeShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCubeShadow
+ // SPIR: OpImageSampleDrefImplicitLod{{.*}}[[LOAD]]{{.*}} Bias %
&& float(0) == texture(uniform_samplerCubeShadow, vec4(0), float(0))
+
+ // GLSL: texture({{.*}}sampler2DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArray
+ // SPIR: OpImageSampleImplicitLod{{.*}}[[LOAD]]
&& gvec4(T(0)) == texture(gsampler2DArray, vec3(0))
+
+ // GLSL: texture({{.*}}sampler2DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArray
+ // SPIR: OpImageSampleImplicitLod{{.*}}[[LOAD]]{{.*}} Bias %
&& gvec4(T(0)) == texture(gsampler2DArray, vec3(0), float(0))
+
+ // GLSL: texture({{.*}}samplerCubeArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCubeArray
+ // SPIR: OpImageSampleImplicitLod{{.*}}[[LOAD]]
&& gvec4(T(0)) == texture(gsamplerCubeArray, vec4(0) )
+
+ // GLSL: texture({{.*}}samplerCubeArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCubeArray
+ // SPIR: OpImageSampleImplicitLod{{.*}}[[LOAD]]{{.*}} Bias %
&& gvec4(T(0)) == texture(gsamplerCubeArray, vec4(0), float(0))
+
+ // GLSL: texture({{.*}}sampler1DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArray
+ // SPIR: OpImageSampleImplicitLod{{.*}}[[LOAD]]
&& gvec4(T(0)) == texture(gsampler1DArray, vec2(0))
+
+ // GLSL: texture({{.*}}sampler1DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArray
+ // SPIR: OpImageSampleImplicitLod{{.*}}[[LOAD]]{{.*}} Bias %
&& gvec4(T(0)) == texture(gsampler1DArray, vec2(0), float(0))
+
+ // GLSL: texture({{.*}}sampler1DArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArrayShadow
+ // SPIR: OpImageSampleDrefImplicitLod{{.*}}[[LOAD]]
&& float(0) == texture(uniform_sampler1DArrayShadow, vec3(0))
+
+ // GLSL: texture({{.*}}sampler1DArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArrayShadow
+ // SPIR: OpImageSampleDrefImplicitLod{{.*}}[[LOAD]]{{.*}} Bias %
&& float(0) == texture(uniform_sampler1DArrayShadow, vec3(0), float(0))
+
+ // GLSL: texture({{.*}}sampler2DArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArrayShadow
+ // SPIR: OpImageSampleDrefImplicitLod{{.*}}[[LOAD]]
&& float(0) == texture(uniform_sampler2DArrayShadow, vec4(0))
+
+ // GLSL: texture({{.*}}sampler2DRect
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRect
+ // SPIR: OpImageSampleImplicitLod{{.*}}[[LOAD]]
&& gvec4(T(0)) == texture(gsampler2DRect, vec2(0))
+
+ // GLSL: texture({{.*}}sampler2DRectShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRectShadow
+ // SPIR: OpImageSampleDrefImplicitLod{{.*}}[[LOAD]]
&& float(0) == texture(uniform_sampler2DRectShadow, vec3(0))
+
+ // GLSL: texture({{.*}}samplerCubeArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCubeArrayShadow
+ // SPIR: OpImageSampleDrefImplicitLod{{.*}}[[LOAD]]
&& float(0) == texture(uniform_samplerCubeArrayShadow, vec4(0), float(0))
+
+ // GLSL: textureProj({{.*}}sampler1D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // SPIR: OpImageSampleProjImplicitLod {{.*}}[[LOAD]]
&& gvec4(T(0)) == textureProj(gsampler1D, vec2(0))
+
+ // GLSL: textureProj({{.*}}sampler1D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // SPIR: OpImageSampleProjImplicitLod {{.*}}[[LOAD]]{{.*}} Bias %
&& gvec4(T(0)) == textureProj(gsampler1D, vec2(0), float(0))
+
+ // GLSL: textureProj({{.*}}sampler1D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // SPIR: OpImageSampleProjImplicitLod {{.*}}[[LOAD]]
&& gvec4(T(0)) == textureProj(gsampler1D, vec4(0))
+
+ // GLSL: textureProj({{.*}}sampler1D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // SPIR: OpImageSampleProjImplicitLod {{.*}}[[LOAD]]{{.*}} Bias %
&& gvec4(T(0)) == textureProj(gsampler1D, vec4(0), float(0))
+
+ // GLSL: textureProj({{.*}}sampler2D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: OpImageSampleProjImplicitLod {{.*}}[[LOAD]]
&& gvec4(T(0)) == textureProj(gsampler2D, vec3(0))
+
+ // GLSL: textureProj({{.*}}sampler2D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: OpImageSampleProjImplicitLod {{.*}}[[LOAD]]{{.*}} Bias %
&& gvec4(T(0)) == textureProj(gsampler2D, vec3(0), float(0))
+
+ // GLSL: textureProj({{.*}}sampler2D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: OpImageSampleProjImplicitLod {{.*}}[[LOAD]]
&& gvec4(T(0)) == textureProj(gsampler2D, vec4(0))
+
+ // GLSL: textureProj({{.*}}sampler2D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: OpImageSampleProjImplicitLod {{.*}}[[LOAD]]{{.*}} Bias %
&& gvec4(T(0)) == textureProj(gsampler2D, vec4(0), float(0))
+
+ // GLSL: textureProj({{.*}}sampler3D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler3D
+ // SPIR: OpImageSampleProjImplicitLod {{.*}}[[LOAD]]
&& gvec4(T(0)) == textureProj(gsampler3D, vec4(0))
+
+ // GLSL: textureProj({{.*}}sampler3D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler3D
+ // SPIR: OpImageSampleProjImplicitLod {{.*}}[[LOAD]]{{.*}} Bias %
&& gvec4(T(0)) == textureProj(gsampler3D, vec4(0), float(0))
+
+ // GLSL: textureProj({{.*}}sampler1DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DShadow
+ // SPIR: OpImageSampleProjDrefImplicitLod {{.*}}[[LOAD]]
&& float(0) == textureProj(uniform_sampler1DShadow, vec4(0))
+
+ // GLSL: textureProj({{.*}}sampler1DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DShadow
+ // SPIR: OpImageSampleProjDrefImplicitLod {{.*}}[[LOAD]]{{.*}} Bias %
&& float(0) == textureProj(uniform_sampler1DShadow, vec4(0), float(0))
+
+ // GLSL: textureProj({{.*}}sampler2DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DShadow
+ // SPIR: OpImageSampleProjDrefImplicitLod {{.*}}[[LOAD]]
&& float(0) == textureProj(uniform_sampler2DShadow, vec4(0))
+
+ // GLSL: textureProj({{.*}}sampler2DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DShadow
+ // SPIR: OpImageSampleProjDrefImplicitLod {{.*}}[[LOAD]]{{.*}} Bias %
&& float(0) == textureProj(uniform_sampler2DShadow, vec4(0), float(0))
+
+ // GLSL-COUNT-2: textureProj({{.*}}sampler2DRect
+ // SPIR-COUNT-2: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRect
+ // SPIR: OpImageSampleProjImplicitLod {{.*}}[[LOAD]]
&& gvec4(T(0)) == textureProj(gsampler2DRect, vec3(0))
&& gvec4(T(0)) == textureProj(gsampler2DRect, vec4(0))
+
+ // GLSL: textureProj({{.*}}sampler2DRectShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRectShadow
+ // SPIR: OpImageSampleProjDrefImplicitLod {{.*}}[[LOAD]]
&& float(0) == textureProj(uniform_sampler2DRectShadow, vec4(0))
+
+ // GLSL: textureLod({{.*}}sampler1D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Lod %
&& gvec4(T(0)) == textureLod(gsampler1D, float(0), float(0))
+
+ // GLSL: textureLod({{.*}}sampler2D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Lod %
&& gvec4(T(0)) == textureLod(gsampler2D, vec2(0), float(0))
+
+ // GLSL: textureLod({{.*}}sampler3D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler3D
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Lod %
&& gvec4(T(0)) == textureLod(gsampler3D, vec3(0), float(0))
+
+ // GLSL: textureLod({{.*}}samplerCube
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCube
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Lod %
&& gvec4(T(0)) == textureLod(gsamplerCube, vec3(0), float(0))
+
+ // GLSL: textureLod({{.*}}sampler2DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DShadow
+ // SPIR: OpImageSampleDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Lod %
&& float(0) == textureLod(uniform_sampler2DShadow, vec3(0), float(0))
+
+ // GLSL: textureLod({{.*}}sampler1DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DShadow
+ // SPIR: OpImageSampleDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Lod %
&& float(0) == textureLod(uniform_sampler1DShadow, vec3(0), float(0))
+
+ // GLSL: textureLod({{.*}}sampler1DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArray
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Lod %
&& gvec4(T(0)) == textureLod(gsampler1DArray, vec2(0), float(0))
+
+ // GLSL: textureLod({{.*}}sampler1DArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArrayShadow
+ // SPIR: OpImageSampleDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Lod %
&& float(0) == textureLod(uniform_sampler1DArrayShadow, vec3(0), float(0))
+
+ // GLSL: textureLod({{.*}}sampler2DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArray
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Lod %
&& gvec4(T(0)) == textureLod(gsampler2DArray, vec3(0), float(0))
+
+ // GLSL: textureLod({{.*}}samplerCubeArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCubeArray
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Lod %
&& gvec4(T(0)) == textureLod(gsamplerCubeArray, vec4(0), float(0))
- && gvec4(T(0)) == textureOffset(gsampler1D, float(0), __LINE__)
- && gvec4(T(0)) == textureOffset(gsampler1D, float(0), __LINE__, float(0))
- && gvec4(T(0)) == textureOffset(gsampler2D, vec2(0), { __LINE__ })
- && gvec4(T(0)) == textureOffset(gsampler2D, vec2(0), { __LINE__ }, float(0))
- && gvec4(T(0)) == textureOffset(gsampler3D, vec3(0), { __LINE__ })
- && gvec4(T(0)) == textureOffset(gsampler3D, vec3(0), { __LINE__ }, float(0))
- && float(0) == textureOffset(uniform_sampler2DShadow, vec3(0), { __LINE__ })
- && float(0) == textureOffset(uniform_sampler2DShadow, vec3(0), { __LINE__ }, float(0))
- && gvec4(T(0)) == textureOffset(gsampler2DRect, vec2(0), { __LINE__ })
- && float(0) == textureOffset(uniform_sampler2DRectShadow, vec3(0), { __LINE__ })
- && float(0) == textureOffset(uniform_sampler1DShadow, vec3(0), __LINE__)
- && float(0) == textureOffset(uniform_sampler1DShadow, vec3(0), __LINE__, float(0))
- && gvec4(T(0)) == textureOffset(gsampler1DArray, vec2(0), __LINE__)
- && gvec4(T(0)) == textureOffset(gsampler1DArray, vec2(0), __LINE__, float(0))
- && gvec4(T(0)) == textureOffset(gsampler2DArray, vec3(0), { __LINE__ })
- && gvec4(T(0)) == textureOffset(gsampler2DArray, vec3(0), { __LINE__ }, float(0))
- && float(0) == textureOffset(uniform_sampler1DArrayShadow, vec3(0), __LINE__)
- && float(0) == textureOffset(uniform_sampler1DArrayShadow, vec3(0), __LINE__, float(0))
- && float(0) == textureOffset(uniform_sampler2DArrayShadow, vec4(0), { __LINE__ })
+
+ // GLSL: textureOffset({{.*}}sampler1D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // S-PIR: OpImageSampleImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && gvec4(T(0)) == textureOffset(gsampler1D, float(0), int(0))
+
+ // GLSL: textureOffset({{.*}}sampler1D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // SPIR: OpImageSampleImplicitLod {{.*}}[[LOAD]]{{.*}} Bias|ConstOffset %
+ && gvec4(T(0)) == textureOffset(gsampler1D, float(0), int(0), float(0))
+
+ // GLSL: textureOffset({{.*}}sampler2D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // S-PIR: OpImageSampleImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && gvec4(T(0)) == textureOffset(gsampler2D, vec2(0), offset2D)
+
+ // GLSL: textureOffset({{.*}}sampler2D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: OpImageSampleImplicitLod {{.*}}[[LOAD]]{{.*}} Bias|ConstOffset %
+ && gvec4(T(0)) == textureOffset(gsampler2D, vec2(0), offset2D, float(0))
+
+ // GLSL: textureOffset({{.*}}sampler3D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler3D
+ // S-PIR: OpImageSampleImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && gvec4(T(0)) == textureOffset(gsampler3D, vec3(0), offset3D)
+
+ // GLSL: textureOffset({{.*}}sampler3D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler3D
+ // SPIR: OpImageSampleImplicitLod {{.*}}[[LOAD]]{{.*}} Bias|ConstOffset %
+ && gvec4(T(0)) == textureOffset(gsampler3D, vec3(0), offset3D, float(0))
+
+ // GLSL: textureOffset({{.*}}sampler2DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DShadow
+ // S-PIR: OpImageSampleDrefImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && float(0) == textureOffset(uniform_sampler2DShadow, vec3(0), offset2D)
+
+ // GLSL: textureOffset({{.*}}sampler2DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DShadow
+ // SPIR: OpImageSampleDrefImplicitLod {{.*}}[[LOAD]]{{.*}} Bias|ConstOffset %
+ && float(0) == textureOffset(uniform_sampler2DShadow, vec3(0), offset2D, float(0))
+
+ // GLSL: textureOffset({{.*}}sampler2DRect
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRect
+ // S-PIR: OpImageSampleImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && gvec4(T(0)) == textureOffset(gsampler2DRect, vec2(0), offset2D)
+
+ // GLSL: textureOffset({{.*}}sampler2DRectShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRectShadow
+ // S-PIR: OpImageSampleDrefImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && float(0) == textureOffset(uniform_sampler2DRectShadow, vec3(0), offset2D)
+
+ // GLSL: textureOffset({{.*}}sampler1DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DShadow
+ // SPIR: OpImageSampleDrefImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && float(0) == textureOffset(uniform_sampler1DShadow, vec3(0), int(0))
+
+ // GLSL: textureOffset({{.*}}sampler1DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DShadow
+ // SPIR: OpImageSampleDrefImplicitLod {{.*}}[[LOAD]]{{.*}} Bias|ConstOffset %
+ && float(0) == textureOffset(uniform_sampler1DShadow, vec3(0), int(0), float(0))
+
+ // GLSL: textureOffset({{.*}}sampler1DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArray
+ // S-PIR: OpImageSampleImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && gvec4(T(0)) == textureOffset(gsampler1DArray, vec2(0), int(0))
+
+ // GLSL: textureOffset({{.*}}sampler1DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArray
+ // SPIR: OpImageSampleImplicitLod {{.*}}[[LOAD]]{{.*}} Bias|ConstOffset %
+ && gvec4(T(0)) == textureOffset(gsampler1DArray, vec2(0), int(0), float(0))
+
+ // GLSL: textureOffset({{.*}}sampler2DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArray
+ // S-PIR: OpImageSampleImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && gvec4(T(0)) == textureOffset(gsampler2DArray, vec3(0), offset2D)
+
+ // GLSL: textureOffset({{.*}}sampler2DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArray
+ // SPIR: OpImageSampleImplicitLod {{.*}}[[LOAD]]{{.*}} Bias|ConstOffset %
+ && gvec4(T(0)) == textureOffset(gsampler2DArray, vec3(0), offset2D, float(0))
+
+ // GLSL: textureOffset({{.*}}sampler1DArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArrayShadow
+ // SPIR: OpImageSampleDrefImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && float(0) == textureOffset(uniform_sampler1DArrayShadow, vec3(0), int(0))
+
+ // GLSL: textureOffset({{.*}}sampler1DArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArrayShadow
+ // SPIR: OpImageSampleDrefImplicitLod {{.*}}[[LOAD]]{{.*}} Bias|ConstOffset %
+ && float(0) == textureOffset(uniform_sampler1DArrayShadow, vec3(0), int(0), float(0))
+
+ // GLSL: textureOffset({{.*}}sampler2DArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArrayShadow
+ // SPIR: OpImageSampleDrefImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && float(0) == textureOffset(uniform_sampler2DArrayShadow, vec4(0), offset2D)
+
+ // GLSL: texelFetch({{.*}}sampler1D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageFetch {{.*}}[[IMAGE]]{{.*}} Lod %
&& gvec4(T(0)) == texelFetch(gsampler1D, int(0), int(0))
+
+ // GLSL: texelFetch({{.*}}sampler2D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageFetch {{.*}}[[IMAGE]]{{.*}} Lod %
&& gvec4(T(0)) == texelFetch(gsampler2D, ivec2(0), int(0))
+
+ // GLSL: texelFetch({{.*}}sampler3D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler3D
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageFetch {{.*}}[[IMAGE]]{{.*}} Lod %
&& gvec4(T(0)) == texelFetch(gsampler3D, ivec3(0), int(0))
+
+ // GLSL: texelFetch({{.*}}sampler2DRect
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRect
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageFetch {{.*}}[[IMAGE]]
&& gvec4(T(0)) == texelFetch(gsampler2DRect, ivec2(0))
+
+ // GLSL: texelFetch({{.*}}sampler1DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArray
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageFetch {{.*}}[[IMAGE]]{{.*}} Lod %
&& gvec4(T(0)) == texelFetch(gsampler1DArray, ivec2(0), int(0))
+
+ // GLSL: texelFetch({{.*}}sampler2DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArray
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageFetch {{.*}}[[IMAGE]]{{.*}} Lod %
&& gvec4(T(0)) == texelFetch(gsampler2DArray, ivec3(0), int(0))
+
+ // GLSL: imageLoad({{.*}}samplerBuffer
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerBuffer
+ // SPIR: OpImageRead {{.*}}[[LOAD]]
&& gvec4(T(0)) == texelFetch(gsamplerBuffer, int(0))
-#if defined(TEST_when_multisampling_works)
+
+ // GLSL: texelFetch({{.*}}sampler2DMS
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DMS
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // S-PIR: OpImageFetch {{.*}}[[IMAGE]]{{.*}} Lod %
&& gvec4(T(0)) == texelFetch(gsampler2DMS, ivec2(0), int(0))
+
+ // GLSL: texelFetch({{.*}}sampler2DMSArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DMSArray
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // S-PIR: OpImageFetch {{.*}}[[IMAGE]]{{.*}} Lod %
&& gvec4(T(0)) == texelFetch(gsampler2DMSArray, ivec3(0), int(0))
-#endif // #if defined(TEST_when_multisampling_works)
- && gvec4(T(0)) == texelFetchOffset(gsampler1D, int(0), int(0), __LINE__)
- && gvec4(T(0)) == texelFetchOffset(gsampler2D, ivec2(0), int(0), { __LINE__ })
- && gvec4(T(0)) == texelFetchOffset(gsampler3D, ivec3(0), int(0), { __LINE__ })
- && gvec4(T(0)) == texelFetchOffset(gsampler2DRect, ivec2(0), { __LINE__ })
- && gvec4(T(0)) == texelFetchOffset(gsampler1DArray, ivec2(0), int(0), __LINE__)
- && gvec4(T(0)) == texelFetchOffset(gsampler2DArray, ivec3(0), int(0), { __LINE__ })
- && gvec4(T(0)) == textureProjOffset(gsampler1D, vec2(0), __LINE__)
- && gvec4(T(0)) == textureProjOffset(gsampler1D, vec2(0), __LINE__, float(0))
- && gvec4(T(0)) == textureProjOffset(gsampler1D, vec4(0), __LINE__)
- && gvec4(T(0)) == textureProjOffset(gsampler1D, vec4(0), __LINE__,float(0))
- && gvec4(T(0)) == textureProjOffset(gsampler2D, vec3(0), { __LINE__ })
- && gvec4(T(0)) == textureProjOffset(gsampler2D, vec3(0), { __LINE__ }, float(0))
- && gvec4(T(0)) == textureProjOffset(gsampler2D, vec4(0), { __LINE__ })
- && gvec4(T(0)) == textureProjOffset(gsampler2D, vec4(0), { __LINE__ }, float(0))
- && gvec4(T(0)) == textureProjOffset(gsampler3D, vec4(0), { __LINE__ })
- && gvec4(T(0)) == textureProjOffset(gsampler3D, vec4(0), { __LINE__ }, float(0))
- && gvec4(T(0)) == textureProjOffset(gsampler2DRect, vec3(0), { __LINE__ })
- && gvec4(T(0)) == textureProjOffset(gsampler2DRect, vec4(0), { __LINE__ })
- && float(0) == textureProjOffset(uniform_sampler2DRectShadow, vec4(0), { __LINE__ })
- && float(0) == textureProjOffset(uniform_sampler1DShadow, vec4(0), __LINE__)
- && float(0) == textureProjOffset(uniform_sampler1DShadow, vec4(0), __LINE__, float(0))
- && float(0) == textureProjOffset(uniform_sampler2DShadow, vec4(0), { __LINE__ })
- && float(0) == textureProjOffset(uniform_sampler2DShadow, vec4(0), { __LINE__ }, float(0))
- && gvec4(T(0)) == textureLodOffset(gsampler1D, float(0), float(0), __LINE__)
- && gvec4(T(0)) == textureLodOffset(gsampler2D, vec2(0), float(0), { __LINE__ })
- && gvec4(T(0)) == textureLodOffset(gsampler3D, vec3(0), float(0), { __LINE__ })
- && float(0) == textureLodOffset(uniform_sampler1DShadow, vec3(0), float(0), __LINE__)
- && float(1) == textureLodOffset(uniform_sampler2DShadow, vec3(0), float(0), { __LINE__ })
- && gvec4(T(0)) == textureLodOffset(gsampler1DArray, vec2(0), float(0), __LINE__)
- && gvec4(T(0)) == textureLodOffset(gsampler2DArray, vec3(0), float(0), { __LINE__ })
- && float(0) == textureLodOffset(uniform_sampler1DArrayShadow, vec3(0), float(0), __LINE__)
+
+ // GLSL: texelFetchOffset({{.*}}sampler1D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageFetch {{.*}}[[IMAGE]]{{.*}} Lod|ConstOffset %
+ && gvec4(T(0)) == texelFetchOffset(gsampler1D, int(0), int(0), int(0))
+
+ // GLSL: texelFetchOffset({{.*}}sampler2D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageFetch {{.*}}[[IMAGE]]{{.*}} Lod|ConstOffset %
+ && gvec4(T(0)) == texelFetchOffset(gsampler2D, ivec2(0), int(0), offset2D)
+
+ // GLSL: texelFetchOffset({{.*}}sampler3D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler3D
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageFetch {{.*}}[[IMAGE]]{{.*}} Lod|ConstOffset %
+ && gvec4(T(0)) == texelFetchOffset(gsampler3D, ivec3(0), int(0), offset3D)
+
+ // GLSL: texelFetchOffset({{.*}}sampler2DRect
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRect
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageFetch {{.*}}[[IMAGE]]{{.*}} Lod|ConstOffset %
+ && gvec4(T(0)) == texelFetchOffset(gsampler2DRect, ivec2(0), offset2D)
+
+ // GLSL: texelFetchOffset({{.*}}sampler1DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArray
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageFetch {{.*}}[[IMAGE]]{{.*}} Lod|ConstOffset %
+ && gvec4(T(0)) == texelFetchOffset(gsampler1DArray, ivec2(0), int(0), int(0))
+
+ // GLSL: texelFetchOffset({{.*}}sampler2DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArray
+ // SPIR: [[IMAGE:%[1-9][0-9]*]] = OpImage{{.*}}[[LOAD]]
+ // SPIR: OpImageFetch {{.*}}[[IMAGE]]{{.*}} Lod|ConstOffset %
+ && gvec4(T(0)) == texelFetchOffset(gsampler2DArray, ivec3(0), int(0), offset2D)
+
+ // GLSL: textureProjOffset({{.*}}sampler1D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // SPIR: OpImageSampleProjImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && gvec4(T(0)) == textureProjOffset(gsampler1D, vec2(0), int(0))
+
+ // GLSL: textureProjOffset({{.*}}sampler1D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // SPIR: OpImageSampleProjImplicitLod {{.*}}[[LOAD]]{{.*}} Bias|ConstOffset %
+ && gvec4(T(0)) == textureProjOffset(gsampler1D, vec2(0), int(0), float(0))
+
+ // GLSL: textureProjOffset({{.*}}sampler1D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // SPIR: OpImageSampleProjImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && gvec4(T(0)) == textureProjOffset(gsampler1D, vec4(0), int(0))
+
+ // GLSL: textureProjOffset({{.*}}sampler1D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // SPIR: OpImageSampleProjImplicitLod {{.*}}[[LOAD]]{{.*}} Bias|ConstOffset %
+ && gvec4(T(0)) == textureProjOffset(gsampler1D, vec4(0), int(0),float(0))
+
+ // GLSL: textureProjOffset({{.*}}sampler2D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: OpImageSampleProjImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && gvec4(T(0)) == textureProjOffset(gsampler2D, vec3(0), offset2D)
+
+ // GLSL: textureProjOffset({{.*}}sampler2D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: OpImageSampleProjImplicitLod {{.*}}[[LOAD]]{{.*}} Bias|ConstOffset %
+ && gvec4(T(0)) == textureProjOffset(gsampler2D, vec3(0), offset2D, float(0))
+
+ // GLSL: textureProjOffset({{.*}}sampler2D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: OpImageSampleProjImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && gvec4(T(0)) == textureProjOffset(gsampler2D, vec4(0), offset2D)
+
+ // GLSL: textureProjOffset({{.*}}sampler2D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: OpImageSampleProjImplicitLod {{.*}}[[LOAD]]{{.*}} Bias|ConstOffset %
+ && gvec4(T(0)) == textureProjOffset(gsampler2D, vec4(0), offset2D, float(0))
+
+ // GLSL: textureProjOffset({{.*}}sampler3D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler3D
+ // SPIR: OpImageSampleProjImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && gvec4(T(0)) == textureProjOffset(gsampler3D, vec4(0), offset3D)
+
+ // GLSL: textureProjOffset({{.*}}sampler3D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler3D
+ // SPIR: OpImageSampleProjImplicitLod {{.*}}[[LOAD]]{{.*}} Bias|ConstOffset %
+ && gvec4(T(0)) == textureProjOffset(gsampler3D, vec4(0), offset3D, float(0))
+
+ // GLSL-COUNT-2: textureProjOffset({{.*}}sampler2DRect
+ // SPIR-COUNT-2: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRect
+ // SPIR: OpImageSampleProjImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && gvec4(T(0)) == textureProjOffset(gsampler2DRect, vec3(0), offset2D)
+ && gvec4(T(0)) == textureProjOffset(gsampler2DRect, vec4(0), offset2D)
+
+ // GLSL: textureProjOffset({{.*}}sampler2DRectShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRectShadow
+ // SPIR: OpImageSampleProjDrefImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && float(0) == textureProjOffset(uniform_sampler2DRectShadow, vec4(0), offset2D)
+
+ // GLSL: textureProjOffset({{.*}}sampler1DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DShadow
+ // SPIR: OpImageSampleProjDrefImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && float(0) == textureProjOffset(uniform_sampler1DShadow, vec4(0), int(0))
+
+ // GLSL: textureProjOffset({{.*}}sampler1DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DShadow
+ // SPIR: OpImageSampleProjDrefImplicitLod {{.*}}[[LOAD]]{{.*}} Bias|ConstOffset %
+ && float(0) == textureProjOffset(uniform_sampler1DShadow, vec4(0), int(0), float(0))
+
+ // GLSL: textureProjOffset({{.*}}sampler2DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DShadow
+ // SPIR: OpImageSampleProjDrefImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && float(0) == textureProjOffset(uniform_sampler2DShadow, vec4(0), offset2D)
+
+ // GLSL: textureProjOffset({{.*}}sampler2DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DShadow
+ // SPIR: OpImageSampleProjDrefImplicitLod {{.*}}[[LOAD]]{{.*}} Bias|ConstOffset %
+ && float(0) == textureProjOffset(uniform_sampler2DShadow, vec4(0), offset2D, float(0))
+
+ // GLSL: textureLodOffset({{.*}}sampler1D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Lod|ConstOffset %
+ && gvec4(T(0)) == textureLodOffset(gsampler1D, float(0), float(0), 0)
+
+ // GLSL: textureLodOffset({{.*}}sampler2D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Lod|ConstOffset %
+ && gvec4(T(0)) == textureLodOffset(gsampler2D, vec2(0), float(0), offset2D)
+
+ // GLSL: textureLodOffset({{.*}}sampler3D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler3D
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Lod|ConstOffset %
+ && gvec4(T(0)) == textureLodOffset(gsampler3D, vec3(0), float(0), offset3D)
+
+ // GLSL: textureLodOffset({{.*}}sampler1DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DShadow
+ // SPIR: OpImageSampleDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Lod|ConstOffset %
+ && float(0) == textureLodOffset(uniform_sampler1DShadow, vec3(0), float(0), 0)
+
+ // GLSL: textureLodOffset({{.*}}sampler2DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DShadow
+ // SPIR: OpImageSampleDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Lod|ConstOffset %
+ && float(1) == textureLodOffset(uniform_sampler2DShadow, vec3(0), float(0), offset2D)
+
+ // GLSL: textureLodOffset({{.*}}sampler1DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArray
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Lod|ConstOffset %
+ && gvec4(T(0)) == textureLodOffset(gsampler1DArray, vec2(0), float(0), 0)
+
+ // GLSL: textureLodOffset({{.*}}sampler2DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArray
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Lod|ConstOffset %
+ && gvec4(T(0)) == textureLodOffset(gsampler2DArray, vec3(0), float(0), offset2D)
+
+ // GLSL: textureLodOffset({{.*}}sampler1DArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArrayShadow
+ // SPIR: OpImageSampleDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Lod|ConstOffset %
+ && float(0) == textureLodOffset(uniform_sampler1DArrayShadow, vec3(0), float(0), int(0))
+
+ // GLSL-COUNT-2: textureProjLod({{.*}}sampler1D
+ // SPIR-COUNT-2: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // SPIR: OpImageSampleProjExplicitLod {{.*}}[[LOAD]]{{.*}} Lod %
&& gvec4(T(0)) == textureProjLod(gsampler1D, vec2(0), float(0))
&& gvec4(T(0)) == textureProjLod(gsampler1D, vec4(0), float(0))
+
+ // GLSL-COUNT-2: textureProjLod({{.*}}sampler2D
+ // SPIR-COUNT-2: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: OpImageSampleProjExplicitLod {{.*}}[[LOAD]]{{.*}} Lod %
&& gvec4(T(0)) == textureProjLod(gsampler2D, vec3(0), float(0))
&& gvec4(T(0)) == textureProjLod(gsampler2D, vec4(0), float(0))
+
+ // GLSL: textureProjLod({{.*}}sampler3D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler3D
+ // SPIR: OpImageSampleProjExplicitLod {{.*}}[[LOAD]]{{.*}} Lod %
&& gvec4(T(0)) == textureProjLod(gsampler3D, vec4(0), float(0))
+
+ // GLSL: textureProjLod({{.*}}sampler1DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DShadow
+ // SPIR: OpImageSampleProjDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Lod %
&& float(0) == textureProjLod(uniform_sampler1DShadow, vec4(0), float(0))
+
+ // GLSL: textureProjLod({{.*}}sampler2DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DShadow
+ // SPIR: OpImageSampleProjDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Lod %
&& float(0) == textureProjLod(uniform_sampler2DShadow, vec4(0), float(0))
- && gvec4(T(0)) == textureProjLodOffset(gsampler1D, vec2(0), float(0), __LINE__)
- && gvec4(T(0)) == textureProjLodOffset(gsampler1D, vec4(0), float(0), __LINE__)
- && gvec4(T(0)) == textureProjLodOffset(gsampler2D, vec3(0), float(0), { __LINE__ })
- && gvec4(T(0)) == textureProjLodOffset(gsampler2D, vec4(0), float(0), { __LINE__ })
- && gvec4(T(0)) == textureProjLodOffset(gsampler3D, vec4(0), float(0), { __LINE__ })
- && float(0) == textureProjLodOffset(uniform_sampler1DShadow, vec4(0), float(0), __LINE__)
- && float(0) == textureProjLodOffset(uniform_sampler2DShadow, vec4(0), float(0), { __LINE__ })
+
+ // GLSL-COUNT-2: textureProjLodOffset({{.*}}sampler1D
+ // SPIR-COUNT-2: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // SPIR: OpImageSampleProjExplicitLod {{.*}}[[LOAD]]{{.*}} Lod|ConstOffset %
+ && gvec4(T(0)) == textureProjLodOffset(gsampler1D, vec2(0), float(0), 0)
+ && gvec4(T(0)) == textureProjLodOffset(gsampler1D, vec4(0), float(0), 0)
+
+ // GLSL-COUNT-2: textureProjLodOffset({{.*}}sampler2D
+ // SPIR-COUNT-2: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: OpImageSampleProjExplicitLod {{.*}}[[LOAD]]{{.*}} Lod|ConstOffset %
+ && gvec4(T(0)) == textureProjLodOffset(gsampler2D, vec3(0), float(0), offset2D)
+ && gvec4(T(0)) == textureProjLodOffset(gsampler2D, vec4(0), float(0), offset2D)
+
+ // GLSL: textureProjLodOffset({{.*}}sampler3D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler3D
+ // SPIR: OpImageSampleProjExplicitLod {{.*}}[[LOAD]]{{.*}} Lod|ConstOffset %
+ && gvec4(T(0)) == textureProjLodOffset(gsampler3D, vec4(0), float(0), offset3D)
+
+ // GLSL: textureProjLodOffset({{.*}}sampler1DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DShadow
+ // SPIR: OpImageSampleProjDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Lod|ConstOffset %
+ && float(0) == textureProjLodOffset(uniform_sampler1DShadow, vec4(0), float(0), int(0))
+
+ // GLSL: textureProjLodOffset({{.*}}sampler2DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DShadow
+ // SPIR: OpImageSampleProjDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Lod|ConstOffset %
+ && float(0) == textureProjLodOffset(uniform_sampler2DShadow, vec4(0), float(0), offset2D)
+
+ // GLSL: textureGrad({{.*}}sampler1D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Grad %
&& gvec4(T(0)) == textureGrad(gsampler1D, float(0), float(0), float(0))
+
+ // GLSL: textureGrad({{.*}}sampler2D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Grad %
&& gvec4(T(0)) == textureGrad(gsampler2D, vec2(0), vec2(0), vec2(0))
+
+ // GLSL: textureGrad({{.*}}sampler3D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler3D
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Grad %
&& gvec4(T(0)) == textureGrad(gsampler3D, vec3(0), vec3(0), vec3(0))
+
+ // GLSL: textureGrad({{.*}}samplerCube
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCube
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Grad %
&& gvec4(T(0)) == textureGrad(gsamplerCube, vec3(0), vec3(0), vec3(0))
+
+ // GLSL: textureGrad({{.*}}sampler2DRect
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRect
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Grad %
&& gvec4(T(0)) == textureGrad(gsampler2DRect, vec2(0), vec2(0), vec2(0))
+
+ // GLSL: textureGrad({{.*}}sampler2DRectShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRectShadow
+ // SPIR: OpImageSampleDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Grad %
&& float(0) == textureGrad(uniform_sampler2DRectShadow, vec3(0), vec2(0), vec2(0))
+
+ // GLSL: textureGrad({{.*}}sampler1DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DShadow
+ // SPIR: OpImageSampleDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Grad %
&& float(0) == textureGrad(uniform_sampler1DShadow, vec3(0), float(0), float(0))
+
+ // GLSL: textureGrad({{.*}}sampler1DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArray
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Grad %
&& gvec4(T(0)) == textureGrad(gsampler1DArray, vec2(0), float(0), float(0))
+
+ // GLSL: textureGrad({{.*}}sampler2DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArray
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Grad %
&& gvec4(T(0)) == textureGrad(gsampler2DArray, vec3(0), vec2(0), vec2(0))
+
+ // GLSL: textureGrad({{.*}}sampler1DArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArrayShadow
+ // SPIR: OpImageSampleDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Grad %
&& float(0) == textureGrad(uniform_sampler1DArrayShadow, vec3(0), float(0), float(0))
+
+ // GLSL: textureGrad({{.*}}sampler2DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DShadow
+ // SPIR: OpImageSampleDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Grad %
&& float(0) == textureGrad(uniform_sampler2DShadow, vec3(0), vec2(0), vec2(0))
+
+ // GLSL: textureGrad({{.*}}samplerCubeShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCubeShadow
+ // SPIR: OpImageSampleDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Grad %
&& float(0) == textureGrad(uniform_samplerCubeShadow, vec4(0), vec3(0), vec3(0))
+
+ // GLSL: textureGrad({{.*}}sampler2DArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArrayShadow
+ // SPIR: OpImageSampleDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Grad %
&& float(0) == textureGrad(uniform_sampler2DArrayShadow, vec4(0), vec2(0), vec2(0))
+
+ // GLSL: textureGrad({{.*}}samplerCubeArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCubeArray
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Grad %
&& gvec4(T(0)) == textureGrad(gsamplerCubeArray, vec4(0), vec3(0), vec3(0))
- && gvec4(T(0)) == textureGradOffset(gsampler1D, float(0), float(0), float(0), __LINE__)
- && gvec4(T(0)) == textureGradOffset(gsampler2D, vec2(0), vec2(0), vec2(0), { __LINE__ })
- && gvec4(T(0)) == textureGradOffset(gsampler3D, vec3(0), vec3(0), vec3(0), { __LINE__ })
- && gvec4(T(0)) == textureGradOffset(gsampler2DRect, vec2(0), vec2(0), vec2(0), { __LINE__ })
- && float(0) == textureGradOffset(uniform_sampler2DRectShadow, vec3(0), vec2(0), vec2(0), { __LINE__ })
- && float(0) == textureGradOffset(uniform_sampler1DShadow, vec3(0), float(0), float(0), __LINE__)
- && float(0) == textureGradOffset(uniform_sampler2DShadow, vec3(0), vec2(0), vec2(0), { __LINE__ })
- && gvec4(T(0)) == textureGradOffset(gsampler2DArray, vec3(0), vec2(0), vec2(0), { __LINE__ })
- && gvec4(T(0)) == textureGradOffset(gsampler1DArray, vec2(0), float(0), float(0), __LINE__)
- && float(0) == textureGradOffset(uniform_sampler1DArrayShadow, vec3(0), float(0), float(0), __LINE__)
- && float(0) == textureGradOffset(uniform_sampler2DArrayShadow, vec4(0), vec2(0), vec2(0), { __LINE__ })
+
+ // GLSL: textureGradOffset({{.*}}sampler1D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Grad|ConstOffset %
+ && gvec4(T(0)) == textureGradOffset(gsampler1D, float(0), float(0), float(0), 0)
+
+ // GLSL: textureGradOffset({{.*}}sampler2D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Grad|ConstOffset %
+ && gvec4(T(0)) == textureGradOffset(gsampler2D, vec2(0), vec2(0), vec2(0), offset2D)
+
+ // GLSL: textureGradOffset({{.*}}sampler3D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler3D
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Grad|ConstOffset %
+ && gvec4(T(0)) == textureGradOffset(gsampler3D, vec3(0), vec3(0), vec3(0), offset3D)
+
+ // GLSL: textureGradOffset({{.*}}sampler2DRect
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRect
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Grad|ConstOffset %
+ && gvec4(T(0)) == textureGradOffset(gsampler2DRect, vec2(0), vec2(0), vec2(0), offset2D)
+
+ // GLSL: textureGradOffset({{.*}}sampler2DRectShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRectShadow
+ // SPIR: OpImageSampleDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Grad|ConstOffset %
+ && float(0) == textureGradOffset(uniform_sampler2DRectShadow, vec3(0), vec2(0), vec2(0), offset2D)
+
+ // GLSL: textureGradOffset({{.*}}sampler1DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DShadow
+ // SPIR: OpImageSampleDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Grad|ConstOffset %
+ && float(0) == textureGradOffset(uniform_sampler1DShadow, vec3(0), float(0), float(0), int(0))
+
+ // GLSL: textureGradOffset({{.*}}sampler2DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DShadow
+ // SPIR: OpImageSampleDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Grad|ConstOffset %
+ && float(0) == textureGradOffset(uniform_sampler2DShadow, vec3(0), vec2(0), vec2(0), offset2D)
+
+ // GLSL: textureGradOffset({{.*}}sampler2DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArray
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Grad|ConstOffset %
+ && gvec4(T(0)) == textureGradOffset(gsampler2DArray, vec3(0), vec2(0), vec2(0), offset2D)
+
+ // GLSL: textureGradOffset({{.*}}sampler1DArray
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArray
+ // SPIR: OpImageSampleExplicitLod {{.*}}[[LOAD]]{{.*}} Grad|ConstOffset %
+ && gvec4(T(0)) == textureGradOffset(gsampler1DArray, vec2(0), float(0), float(0), int(0))
+
+ // GLSL: textureGradOffset({{.*}}sampler1DArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArrayShadow
+ // SPIR: OpImageSampleDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Grad|ConstOffset %
+ && float(0) == textureGradOffset(uniform_sampler1DArrayShadow, vec3(0), float(0), float(0), int(0))
+
+ // GLSL: textureGradOffset({{.*}}sampler2DArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArrayShadow
+ // SPIR: OpImageSampleDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Grad|ConstOffset %
+ && float(0) == textureGradOffset(uniform_sampler2DArrayShadow, vec4(0), vec2(0), vec2(0), offset2D)
+
+ // GLSL-COUNT-2: textureProjGrad({{.*}}sampler1D
+ // SPIR-COUNT-2: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // SPIR: OpImageSampleProjExplicitLod {{.*}}[[LOAD]]{{.*}} Grad %
&& gvec4(T(0)) == textureProjGrad(gsampler1D, vec2(0), float(0), float(0))
&& gvec4(T(0)) == textureProjGrad(gsampler1D, vec4(0), float(0), float(0))
+
+ // GLSL-COUNT-2: textureProjGrad({{.*}}sampler2D
+ // SPIR-COUNT-2: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: OpImageSampleProjExplicitLod {{.*}}[[LOAD]]{{.*}} Grad %
&& gvec4(T(0)) == textureProjGrad(gsampler2D, vec3(0), vec2(0), vec2(0))
&& gvec4(T(0)) == textureProjGrad(gsampler2D, vec4(0), vec2(0), vec2(0))
+
+ // GLSL: textureProjGrad({{.*}}sampler3D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler3D
+ // SPIR: OpImageSampleProjExplicitLod {{.*}}[[LOAD]]{{.*}} Grad %
&& gvec4(T(0)) == textureProjGrad(gsampler3D, vec4(0), vec3(0), vec3(0))
+
+ // GLSL-COUNT-2: textureProjGrad({{.*}}sampler2DRect
+ // SPIR-COUNT-2: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRect
+ // SPIR: OpImageSampleProjExplicitLod {{.*}}[[LOAD]]{{.*}} Grad %
&& gvec4(T(0)) == textureProjGrad(gsampler2DRect, vec3(0), vec2(0), vec2(0))
&& gvec4(T(0)) == textureProjGrad(gsampler2DRect, vec4(0), vec2(0), vec2(0))
+
+ // GLSL: textureProjGrad({{.*}}sampler2DRectShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRectShadow
+ // SPIR: OpImageSampleProjDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Grad %
&& float(0) == textureProjGrad(uniform_sampler2DRectShadow, vec4(0), vec2(0), vec2(0))
+
+ // GLSL: textureProjGrad({{.*}}sampler1DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DShadow
+ // SPIR: OpImageSampleProjDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Grad %
&& float(0) == textureProjGrad(uniform_sampler1DShadow, vec4(0), float(0), float(0))
+
+ // GLSL: textureProjGrad({{.*}}sampler2DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DShadow
+ // SPIR: OpImageSampleProjDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Grad %
&& float(0) == textureProjGrad(uniform_sampler2DShadow, vec4(0), vec2(0), vec2(0))
- && gvec4(T(0)) == textureProjGradOffset(gsampler1D, vec2(0), float(0), float(0), __LINE__)
- && gvec4(T(0)) == textureProjGradOffset(gsampler1D, vec4(0), float(0), float(0), __LINE__)
- && gvec4(T(0)) == textureProjGradOffset(gsampler2D, vec3(0), vec2(0), vec2(0), { __LINE__ })
- && gvec4(T(0)) == textureProjGradOffset(gsampler2D, vec4(0), vec2(0), vec2(0), { __LINE__ })
- && gvec4(T(0)) == textureProjGradOffset(gsampler3D, vec4(0), vec3(0), vec3(0), { __LINE__ })
- && gvec4(T(0)) == textureProjGradOffset(gsampler2DRect, vec3(0), vec2(0), vec2(0), { __LINE__ })
- && gvec4(T(0)) == textureProjGradOffset(gsampler2DRect, vec4(0), vec2(0), vec2(0), { __LINE__ })
- && float(0) == textureProjGradOffset(uniform_sampler2DRectShadow, vec4(0), vec2(0), vec2(0), { __LINE__ })
- && float(0) == textureProjGradOffset(uniform_sampler1DShadow, vec4(0), float(0), float(0), __LINE__)
- && float(0) == textureProjGradOffset(uniform_sampler2DShadow, vec4(0), vec2(0), vec2(0), { __LINE__ })
+
+ // GLSL-COUNT-2: textureProjGradOffset({{.*}}sampler1D
+ // SPIR-COUNT-2: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
+ // SPIR: OpImageSampleProjExplicitLod {{.*}}[[LOAD]]{{.*}} Grad|ConstOffset %
+ && gvec4(T(0)) == textureProjGradOffset(gsampler1D, vec2(0), float(0), float(0), 0)
+ && gvec4(T(0)) == textureProjGradOffset(gsampler1D, vec4(0), float(0), float(0), 0)
+
+ // GLSL-COUNT-2: textureProjGradOffset({{.*}}sampler2D
+ // SPIR-COUNT-2: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: OpImageSampleProjExplicitLod {{.*}}[[LOAD]]{{.*}} Grad|ConstOffset %
+ && gvec4(T(0)) == textureProjGradOffset(gsampler2D, vec3(0), vec2(0), vec2(0), offset2D)
+ && gvec4(T(0)) == textureProjGradOffset(gsampler2D, vec4(0), vec2(0), vec2(0), offset2D)
+
+ // GLSL: textureProjGradOffset({{.*}}sampler3D
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler3D
+ // SPIR: OpImageSampleProjExplicitLod {{.*}}[[LOAD]]{{.*}} Grad|ConstOffset %
+ && gvec4(T(0)) == textureProjGradOffset(gsampler3D, vec4(0), vec3(0), vec3(0), offset3D)
+
+ // GLSL-COUNT-2: textureProjGradOffset({{.*}}sampler2DRect
+ // SPIR-COUNT-2: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRect
+ // SPIR: OpImageSampleProjExplicitLod {{.*}}[[LOAD]]{{.*}} Grad|ConstOffset %
+ && gvec4(T(0)) == textureProjGradOffset(gsampler2DRect, vec3(0), vec2(0), vec2(0), offset2D)
+ && gvec4(T(0)) == textureProjGradOffset(gsampler2DRect, vec4(0), vec2(0), vec2(0), offset2D)
+
+ // GLSL: textureProjGradOffset({{.*}}sampler2DRectShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRectShadow
+ // SPIR: OpImageSampleProjDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Grad|ConstOffset %
+ && float(0) == textureProjGradOffset(uniform_sampler2DRectShadow, vec4(0), vec2(0), vec2(0), offset2D)
+
+ // GLSL: textureProjGradOffset({{.*}}sampler1DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DShadow
+ // SPIR: OpImageSampleProjDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Grad|ConstOffset %
+ && float(0) == textureProjGradOffset(uniform_sampler1DShadow, vec4(0), float(0), float(0), int(0))
+
+ // GLSL: textureProjGradOffset({{.*}}sampler2DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DShadow
+ // SPIR: OpImageSampleProjDrefExplicitLod {{.*}}[[LOAD]]{{.*}} Grad|ConstOffset %
+ && float(0) == textureProjGradOffset(uniform_sampler2DShadow, vec4(0), vec2(0), vec2(0), offset2D)
// 8.9.4. Texture Gather Functions
+
+ // GLSL-COUNT-2: textureGather({{.*}}sampler2D
+ // SPIR-COUNT-2: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: OpImageGather {{.*}}[[LOAD]]
&& gvec4(T(0)) == textureGather(gsampler2D, vec2(0))
&& gvec4(T(0)) == textureGather(gsampler2D, vec2(0), int(0))
+
+ // GLSL-COUNT-2: textureGather({{.*}}sampler2DArray
+ // SPIR-COUNT-2: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArray
+ // SPIR: OpImageGather {{.*}}[[LOAD]]
&& gvec4(T(0)) == textureGather(gsampler2DArray, vec3(0))
&& gvec4(T(0)) == textureGather(gsampler2DArray, vec3(0), int(0))
+
+ // GLSL-COUNT-2: textureGather({{.*}}samplerCube
+ // SPIR-COUNT-2: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCube
+ // SPIR: OpImageGather {{.*}}[[LOAD]]
&& gvec4(T(0)) == textureGather(gsamplerCube, vec3(0))
&& gvec4(T(0)) == textureGather(gsamplerCube, vec3(0), int(0))
+
+ // GLSL-COUNT-2: textureGather({{.*}}samplerCubeArray
+ // SPIR-COUNT-2: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCubeArray
+ // SPIR: OpImageGather {{.*}}[[LOAD]]
&& gvec4(T(0)) == textureGather(gsamplerCubeArray, vec4(0))
&& gvec4(T(0)) == textureGather(gsamplerCubeArray, vec4(0), int(0))
+
+ // GLSL-COUNT-2: textureGather({{.*}}sampler2DRect
+ // SPIR-COUNT-2: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRect
+ // SPIR: OpImageGather {{.*}}[[LOAD]]
&& gvec4(T(0)) == textureGather(gsampler2DRect, vec2(0))
&& gvec4(T(0)) == textureGather(gsampler2DRect, vec2(0), int(0))
+
+ // GLSL: textureGather({{.*}}sampler2DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DShadow
+ // SPIR: OpImageDrefGather {{.*}}[[LOAD]]
&& vec4(0) == textureGather(uniform_sampler2DShadow, vec2(0), float(0))
+
+ // GLSL: textureGather({{.*}}sampler2DArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArrayShadow
+ // SPIR: OpImageDrefGather {{.*}}[[LOAD]]
&& vec4(0) == textureGather(uniform_sampler2DArrayShadow, vec3(0), float(0))
+
+ // GLSL: textureGather({{.*}}samplerCubeShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCubeShadow
+ // SPIR: OpImageDrefGather {{.*}}[[LOAD]]
&& vec4(0) == textureGather(uniform_samplerCubeShadow, vec3(0), float(0))
+
+ // GLSL: textureGather({{.*}}samplerCubeArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}samplerCubeArrayShadow
+ // SPIR: OpImageDrefGather {{.*}}[[LOAD]]
&& vec4(0) == textureGather(uniform_samplerCubeArrayShadow, vec4(0), float(0))
+
+ // GLSL: textureGather({{.*}}sampler2DRectShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRectShadow
+ // SPIR: OpImageDrefGather {{.*}}[[LOAD]]
&& vec4(0) == textureGather(uniform_sampler2DRectShadow, vec2(0), float(0))
- && gvec4(T(0)) == textureGatherOffset(gsampler2D, vec2(0), { __LINE__ })
- && gvec4(T(0)) == textureGatherOffset(gsampler2D, vec2(0), { __LINE__ }, int(0))
- && gvec4(T(0)) == textureGatherOffset(gsampler2DArray, vec3(0), { __LINE__ })
- && gvec4(T(0)) == textureGatherOffset(gsampler2DArray, vec3(0), { __LINE__ }, int(0))
- && vec4(0) == textureGatherOffset(uniform_sampler2DShadow, vec2(0), float(0), { __LINE__ })
- && vec4(0) == textureGatherOffset(uniform_sampler2DArrayShadow, vec3(0), float(0), { __LINE__ })
- && gvec4(T(0)) == textureGatherOffset(gsampler2DRect, vec2(0), { __LINE__ })
- && gvec4(T(0)) == textureGatherOffset(gsampler2DRect, vec2(0), { __LINE__ }, int(0))
- && vec4(0) == textureGatherOffset(uniform_sampler2DRectShadow, vec2(0), float(0), { __LINE__ })
- && gvec4(T(0)) == textureGatherOffsets(gsampler2D, vec2(0), { __LINE__ })
- && gvec4(T(0)) == textureGatherOffsets(gsampler2D, vec2(0), { __LINE__ }, int(0))
- && gvec4(T(0)) == textureGatherOffsets(gsampler2DArray, vec3(0), { __LINE__ })
- && gvec4(T(0)) == textureGatherOffsets(gsampler2DArray, vec3(0), { __LINE__ }, int(0))
- && vec4(0) == textureGatherOffsets(uniform_sampler2DShadow, vec2(0), float(0), { __LINE__ })
- && vec4(0) == textureGatherOffsets(uniform_sampler2DArrayShadow, vec3(0), float(0), { __LINE__ })
- && gvec4(T(0)) == textureGatherOffsets(gsampler2DRect, vec2(0), { __LINE__ })
- && gvec4(T(0)) == textureGatherOffsets(gsampler2DRect, vec2(0), { __LINE__ }, int(0))
- && vec4(0) == textureGatherOffsets(uniform_sampler2DRectShadow, vec2(0), float(0), { __LINE__ })
+
+ // GLSL-COUNT-2: textureGatherOffset({{.*}}sampler2D
+ // SPIR-COUNT-2: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: OpImageGather {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && gvec4(T(0)) == textureGatherOffset(gsampler2D, vec2(0), offset2D)
+ && gvec4(T(0)) == textureGatherOffset(gsampler2D, vec2(0), offset2D, int(0))
+
+ // GLSL-COUNT-2: textureGatherOffset({{.*}}sampler2DArray
+ // SPIR-COUNT-2: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArray
+ // SPIR: OpImageGather {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && gvec4(T(0)) == textureGatherOffset(gsampler2DArray, vec3(0), offset2D)
+ && gvec4(T(0)) == textureGatherOffset(gsampler2DArray, vec3(0), offset2D, int(0))
+
+ // GLSL: textureGatherOffset({{.*}}sampler2DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DShadow
+ // SPIR: OpImageDrefGather {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && vec4(0) == textureGatherOffset(uniform_sampler2DShadow, vec2(0), float(0), offset2D)
+
+ // GLSL: textureGatherOffset({{.*}}sampler2DArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArrayShadow
+ // SPIR: OpImageDrefGather {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && vec4(0) == textureGatherOffset(uniform_sampler2DArrayShadow, vec3(0), float(0), offset2D)
+
+ // GLSL-COUNT-2: textureGatherOffset({{.*}}sampler2DRect
+ // SPIR-COUNT-2: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRect
+ // SPIR: OpImageGather {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && gvec4(T(0)) == textureGatherOffset(gsampler2DRect, vec2(0), offset2D)
+ && gvec4(T(0)) == textureGatherOffset(gsampler2DRect, vec2(0), offset2D, int(0))
+
+ // GLSL: textureGatherOffset({{.*}}sampler2DRectShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRectShadow
+ // SPIR: OpImageDrefGather {{.*}}[[LOAD]]{{.*}} ConstOffset %
+ && vec4(0) == textureGatherOffset(uniform_sampler2DRectShadow, vec2(0), float(0), offset2D)
+
+ // GLSL-COUNT-2: textureGatherOffsets({{.*}}sampler2D
+ // SPIR-COUNT-2: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
+ // SPIR: OpImageGather {{.*}}[[LOAD]]{{.*}} ConstOffsets %
+ && gvec4(T(0)) == textureGatherOffsets(gsampler2D, vec2(0), offsets)
+ && gvec4(T(0)) == textureGatherOffsets(gsampler2D, vec2(0), offsets, int(0))
+
+ // GLSL-COUNT-2: textureGatherOffsets({{.*}}sampler2DArray
+ // SPIR-COUNT-2: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArray
+ // SPIR: OpImageGather {{.*}}[[LOAD]]{{.*}} ConstOffsets %
+ && gvec4(T(0)) == textureGatherOffsets(gsampler2DArray, vec3(0), offsets)
+ && gvec4(T(0)) == textureGatherOffsets(gsampler2DArray, vec3(0), offsets, int(0))
+
+ // GLSL: textureGatherOffsets({{.*}}sampler2DShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DShadow
+ // SPIR: OpImageDrefGather {{.*}}[[LOAD]]{{.*}} ConstOffsets %
+ && vec4(0) == textureGatherOffsets(uniform_sampler2DShadow, vec2(0), float(0), offsets)
+
+ // GLSL: textureGatherOffsets({{.*}}sampler2DArrayShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArrayShadow
+ // SPIR: OpImageDrefGather {{.*}}[[LOAD]]{{.*}} ConstOffsets %
+ && vec4(0) == textureGatherOffsets(uniform_sampler2DArrayShadow, vec3(0), float(0), offsets)
+
+ // GLSL-COUNT-2: textureGatherOffsets({{.*}}sampler2DRect
+ // SPIR-COUNT-2: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRect
+ // SPIR: OpImageGather {{.*}}[[LOAD]]{{.*}} ConstOffsets %
+ && gvec4(T(0)) == textureGatherOffsets(gsampler2DRect, vec2(0), offsets)
+ && gvec4(T(0)) == textureGatherOffsets(gsampler2DRect, vec2(0), offsets, int(0))
+
+ // GLSL: textureGatherOffsets({{.*}}sampler2DRectShadow
+ // SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRectShadow
+ // SPIR: OpImageDrefGather {{.*}}[[LOAD]]{{.*}} ConstOffsets %
+ && vec4(0) == textureGatherOffsets(uniform_sampler2DRectShadow, vec2(0), float(0), offsets)
// 8.9.5. Compatibility Profile Texture Functions
+ // Compatibility functions work for GLSL but not for SPIR-V.
+ // We cannot test the SPIR-V asm here for these functions.
+ // We also cannot test GLSL source for them because we don't directly
+ // call them. If we do, the spirv-via-glsl path cannot work.
+
&& vec4(0) == texture1D(uniform_sampler1D, float(0))
&& vec4(0) == texture1D(uniform_sampler1D, float(0), float(0))
&& vec4(0) == texture1DProj(uniform_sampler1D, vec2(0))
@@ -413,15 +1351,16 @@ bool itextureFuncs(Sampler1D<vector<T, N>> gsampler1D
, Sampler2DArray<vector<T, N>> gsampler2DArray
, SamplerCubeArray<vector<T, N>> gsamplerCubeArray
, SamplerBuffer<vector<T, N>> gsamplerBuffer
-#if defined(TEST_when_multisampling_works)
, Sampler2DMS<vector<T, N>> gsampler2DMS
, Sampler2DMSArray<vector<T, N>> gsampler2DMSArray
-#endif // #if defined(TEST_when_multisampling_works)
)
{
+ // GLSL-LABEL: itextureFuncs_0
typealias gvec4 = vector<T, 4>;
- constexpr ivec2 ivec2_0 = ivec2(0);
+ constexpr ivec2 offset2D = ivec2(0);
+ constexpr ivec3 offset3D = ivec3(0);
+ constexpr ivec2 offsets[4] = { ivec2(0), ivec2(0), ivec2(0), ivec2(0) };
return true
// 8.9.1. Texture Query Functions
@@ -441,10 +1380,8 @@ bool itextureFuncs(Sampler1D<vector<T, N>> gsampler1D
&& ivec3(0) == textureSize(gsampler2DArray, int(0))
&& ivec3(0) == textureSize(uniform_sampler2DArrayShadow, int(0))
&& int(0) == textureSize(gsamplerBuffer)
-#if defined(TEST_when_multisampling_works)
&& ivec2(0) == textureSize(gsampler2DMS)
&& ivec3(0) == textureSize(gsampler2DMSArray)
-#endif
&& gvec4(T(0)) == texelFetch(gsampler1D, int(0), int(0))
&& gvec4(T(0)) == texelFetch(gsampler2D, ivec2(0), int(0))
&& gvec4(T(0)) == texelFetch(gsampler3D, ivec3(0), int(0))
@@ -452,16 +1389,15 @@ bool itextureFuncs(Sampler1D<vector<T, N>> gsampler1D
&& gvec4(T(0)) == texelFetch(gsampler1DArray, ivec2(0), int(0))
&& gvec4(T(0)) == texelFetch(gsampler2DArray, ivec3(0), int(0))
&& gvec4(T(0)) == texelFetch(gsamplerBuffer, int(0))
-#if defined(TEST_when_multisampling_works)
&& gvec4(T(0)) == texelFetch(gsampler2DMS, ivec2(0), int(0))
&& gvec4(T(0)) == texelFetch(gsampler2DMSArray, ivec3(0), int(0))
-#endif // #if defined(TEST_when_multisampling_works)
- && gvec4(T(0)) == texelFetchOffset(gsampler1D, int(0), int(0), __LINE__)
- && gvec4(T(0)) == texelFetchOffset(gsampler2D, ivec2(0), int(0), { __LINE__ })
- && gvec4(T(0)) == texelFetchOffset(gsampler3D, ivec3(0), int(0), { __LINE__ })
- && gvec4(T(0)) == texelFetchOffset(gsampler2DRect, ivec2(0), { __LINE__ })
- && gvec4(T(0)) == texelFetchOffset(gsampler1DArray, ivec2(0), int(0), __LINE__)
- && gvec4(T(0)) == texelFetchOffset(gsampler2DArray, ivec3(0), int(0), { __LINE__ })
+ && gvec4(T(0)) == texelFetchOffset(gsampler1D, int(0), int(0), 0)
+ && gvec4(T(0)) == texelFetchOffset(gsampler2D, ivec2(0), int(0), offset2D)
+ && gvec4(T(0)) == texelFetchOffset(gsampler3D, ivec3(0), int(0), offset3D)
+ && gvec4(T(0)) == texelFetchOffset(gsampler2DRect, ivec2(0), offset2D)
+ && gvec4(T(0)) == texelFetchOffset(gsampler1DArray, ivec2(0), int(0), int(0))
+ && gvec4(T(0)) == texelFetchOffset(gsampler2DArray, ivec3(0), int(0), offset2D)
+
// 8.9.4. Texture Gather Functions
&& gvec4(T(0)) == textureGather(gsampler2D, vec2(0))
&& gvec4(T(0)) == textureGather(gsampler2D, vec2(0), int(0))
@@ -478,24 +1414,24 @@ bool itextureFuncs(Sampler1D<vector<T, N>> gsampler1D
&& vec4(0) == textureGather(uniform_samplerCubeShadow, vec3(0), float(0))
&& vec4(0) == textureGather(uniform_samplerCubeArrayShadow, vec4(0), float(0))
&& vec4(0) == textureGather(uniform_sampler2DRectShadow, vec2(0), float(0))
- && gvec4(T(0)) == textureGatherOffset(gsampler2D, vec2(0), { __LINE__ })
- && gvec4(T(0)) == textureGatherOffset(gsampler2D, vec2(0), { __LINE__ }, int(0))
- && gvec4(T(0)) == textureGatherOffset(gsampler2DArray, vec3(0), { __LINE__ })
- && gvec4(T(0)) == textureGatherOffset(gsampler2DArray, vec3(0), { __LINE__ }, int(0))
- && vec4(0) == textureGatherOffset(uniform_sampler2DShadow, vec2(0), float(0), { __LINE__ })
- && vec4(0) == textureGatherOffset(uniform_sampler2DArrayShadow, vec3(0), float(0), { __LINE__ })
- && gvec4(T(0)) == textureGatherOffset(gsampler2DRect, vec2(0), { __LINE__ })
- && gvec4(T(0)) == textureGatherOffset(gsampler2DRect, vec2(0), { __LINE__ }, int(0))
- && vec4(0) == textureGatherOffset(uniform_sampler2DRectShadow, vec2(0), float(0), { __LINE__ })
- && gvec4(T(0)) == textureGatherOffsets(gsampler2D, vec2(0), { __LINE__ })
- && gvec4(T(0)) == textureGatherOffsets(gsampler2D, vec2(0), { __LINE__ }, int(0))
- && gvec4(T(0)) == textureGatherOffsets(gsampler2DArray, vec3(0), { __LINE__ })
- && gvec4(T(0)) == textureGatherOffsets(gsampler2DArray, vec3(0), { __LINE__ }, int(0))
- && vec4(0) == textureGatherOffsets(uniform_sampler2DShadow, vec2(0), float(0), { __LINE__ })
- && vec4(0) == textureGatherOffsets(uniform_sampler2DArrayShadow, vec3(0), float(0), { __LINE__ })
- && gvec4(T(0)) == textureGatherOffsets(gsampler2DRect, vec2(0), { __LINE__ })
- && gvec4(T(0)) == textureGatherOffsets(gsampler2DRect, vec2(0), { __LINE__ }, int(0))
- && vec4(0) == textureGatherOffsets(uniform_sampler2DRectShadow, vec2(0), float(0), { __LINE__ })
+ && gvec4(T(0)) == textureGatherOffset(gsampler2D, vec2(0), offset2D)
+ && gvec4(T(0)) == textureGatherOffset(gsampler2D, vec2(0), offset2D, int(0))
+ && gvec4(T(0)) == textureGatherOffset(gsampler2DArray, vec3(0), offset2D)
+ && gvec4(T(0)) == textureGatherOffset(gsampler2DArray, vec3(0), offset2D, int(0))
+ && vec4(0) == textureGatherOffset(uniform_sampler2DShadow, vec2(0), float(0), offset2D)
+ && vec4(0) == textureGatherOffset(uniform_sampler2DArrayShadow, vec3(0), float(0), offset2D)
+ && gvec4(T(0)) == textureGatherOffset(gsampler2DRect, vec2(0), offset2D)
+ && gvec4(T(0)) == textureGatherOffset(gsampler2DRect, vec2(0), offset2D, int(0))
+ && vec4(0) == textureGatherOffset(uniform_sampler2DRectShadow, vec2(0), float(0), offset2D)
+ && gvec4(T(0)) == textureGatherOffsets(gsampler2D, vec2(0), offsets)
+ && gvec4(T(0)) == textureGatherOffsets(gsampler2D, vec2(0), offsets, int(0))
+ && gvec4(T(0)) == textureGatherOffsets(gsampler2DArray, vec3(0), offsets)
+ && gvec4(T(0)) == textureGatherOffsets(gsampler2DArray, vec3(0), offsets, int(0))
+ && vec4(0) == textureGatherOffsets(uniform_sampler2DShadow, vec2(0), float(0), offsets)
+ && vec4(0) == textureGatherOffsets(uniform_sampler2DArrayShadow, vec3(0), float(0), offsets)
+ && gvec4(T(0)) == textureGatherOffsets(gsampler2DRect, vec2(0), offsets)
+ && gvec4(T(0)) == textureGatherOffsets(gsampler2DRect, vec2(0), offsets, int(0))
+ && vec4(0) == textureGatherOffsets(uniform_sampler2DRectShadow, vec2(0), float(0), offsets)
;
}
@@ -504,12 +1440,11 @@ bool itextureFuncs(Sampler1D<vector<T, N>> gsampler1D
#endif
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{
- // CHECK_GLSL: void main(
- // CHECK_SPV: OpEntryPoint
- // CHECK_SPV_DIRECT: OpEntryPoint
- // CHECK_HLSL: void computeMain(
- // CHECK_CUDA: void computeMain(
- // CHECK_CPP: void _computeMain(
+ // GLSL: void main(
+ // GLSL_SPIRV: OpEntryPoint
+ // HLSL: void computeMain(
+ // CUDA: void computeMain(
+ // CPP: void _computeMain(
outputBuffer.result = true
&& textureFuncs(
@@ -522,10 +1457,8 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
, uniform_sampler2DArray
, uniform_samplerCubeArray
, uniform_samplerBuffer
-#if defined(TEST_when_multisampling_works)
, uniform_sampler2DMS
, uniform_sampler2DMSArray
-#endif // #if defined(TEST_when_multisampling_works)
)
&& itextureFuncs(
uniform_isampler1D
@@ -537,10 +1470,8 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
, uniform_isampler2DArray
, uniform_isamplerCubeArray
, uniform_isamplerBuffer
-#if defined(TEST_when_multisampling_works)
, uniform_isampler2DMS
, uniform_isampler2DMSArray
-#endif // #if defined(TEST_when_multisampling_works)
)
&& itextureFuncs(
uniform_usampler1D
@@ -552,13 +1483,8 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
, uniform_usampler2DArray
, uniform_usamplerCubeArray
, uniform_usamplerBuffer
-#if defined(TEST_when_multisampling_works)
, uniform_usampler2DMS
, uniform_usampler2DMSArray
-#endif // #if defined(TEST_when_multisampling_works)
);
-
- //outputBuffer[0] = float(r);
- //o_color[0] = float(r);
}