SPV: Fix #1399 emit ImageGatherExtended when using ConstOffsets operand
diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp
old mode 100644
new mode 100755
index 27ce71c..10d655b
--- a/SPIRV/SpvBuilder.cpp
+++ b/SPIRV/SpvBuilder.cpp
@@ -1570,7 +1570,8 @@
 
 // Accept all parameters needed to create a texture instruction.
 // Create the correct instruction based on the inputs, and make the call.
-Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, bool fetch, bool proj, bool gather, bool noImplicitLod, const TextureParameters& parameters)
+Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, bool fetch, bool proj, bool gather,
+    bool noImplicitLod, const TextureParameters& parameters)
 {
     static const int maxTextureArgs = 10;
     Id texArgs[maxTextureArgs] = {};
@@ -1623,6 +1624,7 @@
         texArgs[numArgs++] = parameters.offset;
     }
     if (parameters.offsets) {
+        addCapability(CapabilityImageGatherExtended);
         mask = (ImageOperandsMask)(mask | ImageOperandsConstOffsetsMask);
         texArgs[numArgs++] = parameters.offsets;
     }
diff --git a/Test/baseResults/hlsl.gathercmpRGBA.offset.dx10.frag.out b/Test/baseResults/hlsl.gathercmpRGBA.offset.dx10.frag.out
index 732ee25..fe99df5 100644
--- a/Test/baseResults/hlsl.gathercmpRGBA.offset.dx10.frag.out
+++ b/Test/baseResults/hlsl.gathercmpRGBA.offset.dx10.frag.out
@@ -460,6 +460,7 @@
 // Id's are bound by 164
 
                               Capability Shader
+                              Capability ImageGatherExtended
                               Capability Sampled1D
                1:             ExtInstImport  "GLSL.std.450"
                               MemoryModel Logical GLSL450
diff --git a/Test/baseResults/spv.float16Fetch.frag.out b/Test/baseResults/spv.float16Fetch.frag.out
index c6803e8..67ddd61 100644
--- a/Test/baseResults/spv.float16Fetch.frag.out
+++ b/Test/baseResults/spv.float16Fetch.frag.out
@@ -5,6 +5,7 @@
 
                               Capability Shader
                               Capability Float16
+                              Capability ImageGatherExtended
                               Capability StorageImageMultisample
                               Capability ImageCubeArray
                               Capability ImageRect
diff --git a/Test/baseResults/spv.sparseTexture.frag.out b/Test/baseResults/spv.sparseTexture.frag.out
index 3c67ccc..d94f643 100644
--- a/Test/baseResults/spv.sparseTexture.frag.out
+++ b/Test/baseResults/spv.sparseTexture.frag.out
@@ -4,6 +4,7 @@
 // Id's are bound by 438
 
                               Capability Shader
+                              Capability ImageGatherExtended
                               Capability StorageImageMultisample
                               Capability SampledRect
                               Capability SparseResidency
diff --git a/Test/baseResults/spv.textureGatherBiasLod.frag.out b/Test/baseResults/spv.textureGatherBiasLod.frag.out
index ad79292..faa4dba 100644
--- a/Test/baseResults/spv.textureGatherBiasLod.frag.out
+++ b/Test/baseResults/spv.textureGatherBiasLod.frag.out
@@ -4,6 +4,7 @@
 // Id's are bound by 298
 
                               Capability Shader
+                              Capability ImageGatherExtended
                               Capability SparseResidency
                               Capability SampledCubeArray
                               Capability ImageGatherBiasLodAMD
diff --git a/glslang/Include/revision.h b/glslang/Include/revision.h
index d18126d..b8773ac 100644
--- a/glslang/Include/revision.h
+++ b/glslang/Include/revision.h
@@ -1,3 +1,3 @@
 // This header is generated by the make-revision script.
 
-#define GLSLANG_PATCH_LEVEL 2765
+#define GLSLANG_PATCH_LEVEL 2767