@@ -167,9 +167,9 @@ bool textureFuncs( Sampler1D<vector<T,N>> gsampler1D
167
167
168
168
constexpr float coord = 0 . 5 ;
169
169
170
- constexpr ivec2 offset2D = ivec2(0 );
171
- constexpr ivec3 offset3D = ivec3(0 );
172
- constexpr ivec2 offsets [4 ] = { ivec2(0 ), ivec2(0 ), ivec2(0 ), ivec2(0 ) };
170
+ constexpr ivec2 offset2D = ivec2(2 );
171
+ constexpr ivec3 offset3D = ivec3(3 );
172
+ constexpr ivec2 offsets [4 ] = { ivec2(1 ), ivec2(2 ), ivec2(3 ), ivec2(4 ) };
173
173
174
174
bool ignoreResultF32 = ignoreResult && T is float ;
175
175
bool ignoreResultI32 = ignoreResult && T is int32_t ;
@@ -704,8 +704,8 @@ bool textureFuncs( Sampler1D<vector<T,N>> gsampler1D
704
704
705
705
// GLSL: textureOffset({{.*}}sampler1D
706
706
// SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
707
- // S-PIR : OpImageSampleImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
708
- && gvec4(T(0 )) == textureOffset(gsampler1D, float (coord), int (0 ))
707
+ // SPIR : OpImageSampleImplicitLod {{.*}}[[LOAD]]{{.*}}ConstOffset %
708
+ && gvec4(T(0 )) == textureOffset(gsampler1D, float (coord), int (1 ))
709
709
710
710
// GLSL: textureOffset({{.*}}sampler1D
711
711
// SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1D
@@ -714,7 +714,7 @@ bool textureFuncs( Sampler1D<vector<T,N>> gsampler1D
714
714
715
715
// GLSL: textureOffset({{.*}}sampler2D
716
716
// SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2D
717
- // S-PIR : OpImageSampleImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
717
+ // SPIR : OpImageSampleImplicitLod {{.*}}[[LOAD]]{{.*}}ConstOffset %
718
718
&& gvec4(T(0 )) == textureOffset(gsampler2D, vec2(coord), offset2D)
719
719
720
720
// GLSL: textureOffset({{.*}}sampler2D
@@ -724,7 +724,7 @@ bool textureFuncs( Sampler1D<vector<T,N>> gsampler1D
724
724
725
725
// GLSL: textureOffset({{.*}}sampler3D
726
726
// SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler3D
727
- // S-PIR : OpImageSampleImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
727
+ // SPIR : OpImageSampleImplicitLod {{.*}}[[LOAD]]{{.*}}ConstOffset %
728
728
&& gvec4(T(0 )) == textureOffset(gsampler3D, vec3(coord), offset3D)
729
729
730
730
// GLSL: textureOffset({{.*}}sampler3D
@@ -734,7 +734,7 @@ bool textureFuncs( Sampler1D<vector<T,N>> gsampler1D
734
734
735
735
// GLSL: textureOffset({{.*}}sampler2DShadow
736
736
// SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DShadow
737
- // S-PIR : OpImageSampleDrefImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
737
+ // SPIR : OpImageSampleDrefImplicitLod {{.*}}[[LOAD]]{{.*}}ConstOffset %
738
738
&& (float (0 ) == textureOffset(uniform_sampler2DShadow, vec3(coord), offset2D) || ignoreResultF32)
739
739
740
740
// GLSL: textureOffset({{.*}}sampler2DShadow
@@ -744,12 +744,12 @@ bool textureFuncs( Sampler1D<vector<T,N>> gsampler1D
744
744
745
745
// GLSL: textureOffset({{.*}}sampler2DRect
746
746
// SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRect
747
- // S-PIR : OpImageSampleImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
747
+ // SPIR : OpImageSampleImplicitLod {{.*}}[[LOAD]]{{.*}}ConstOffset %
748
748
&& gvec4(T(0 )) == textureOffset(gsampler2DRect, vec2(coord), offset2D)
749
749
750
750
// GLSL: textureOffset({{.*}}sampler2DRectShadow
751
751
// SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DRectShadow
752
- // S-PIR : OpImageSampleDrefImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
752
+ // SPIR : OpImageSampleDrefImplicitLod {{.*}}[[LOAD]]{{.*}}ConstOffset %
753
753
&& float (0 ) == textureOffset(uniform_sampler2DRectShadow, vec3(coord), offset2D)
754
754
755
755
// GLSL: textureOffset({{.*}}sampler1DShadow
@@ -764,8 +764,8 @@ bool textureFuncs( Sampler1D<vector<T,N>> gsampler1D
764
764
765
765
// GLSL: textureOffset({{.*}}sampler1DArray
766
766
// SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArray
767
- // S-PIR : OpImageSampleImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
768
- && gvec4(T(0 )) == textureOffset(gsampler1DArray, vec2(coord), int (0 ))
767
+ // SPIR : OpImageSampleImplicitLod {{.*}}[[LOAD]]{{.*}}ConstOffset %
768
+ && gvec4(T(0 )) == textureOffset(gsampler1DArray, vec2(coord), int (1 ))
769
769
770
770
// GLSL: textureOffset({{.*}}sampler1DArray
771
771
// SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler1DArray
@@ -774,7 +774,7 @@ bool textureFuncs( Sampler1D<vector<T,N>> gsampler1D
774
774
775
775
// GLSL: textureOffset({{.*}}sampler2DArray
776
776
// SPIR: [[LOAD:%[1-9][0-9]*]] = OpLoad{{.*}}sampler2DArray
777
- // S-PIR : OpImageSampleImplicitLod {{.*}}[[LOAD]]{{.*}} ConstOffset %
777
+ // SPIR : OpImageSampleImplicitLod {{.*}}[[LOAD]]{{.*}}ConstOffset %
778
778
&& gvec4(T(0 )) == textureOffset(gsampler2DArray, vec3(coord), offset2D)
779
779
780
780
// GLSL: textureOffset({{.*}}sampler2DArray
0 commit comments