Revert "Revert "Add integer texture support.""

This reverts commit 9c7edb8311409a141b0dc1d5e480c68c629f1997.

Fixes ASAN errors

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4736

Change-Id: I1b1dae754d357b01da7169c8e7c59d7d8d8a10f6
Reviewed-on: https://skia-review.googlesource.com/4736
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/sksl/sksl.include b/src/sksl/sksl.include
index f57e62a..6458a15 100644
--- a/src/sksl/sksl.include
+++ b/src/sksl/sksl.include
@@ -251,6 +251,9 @@
 $gvec4 texture($gsampler1D sampler, float P);
 $gvec4 texture($gsampler1D sampler, float P, float bias);
 $gvec4 texture($gsampler2D sampler, vec2 P);
+// The above currently only expand to handle the float/fixed case. So we also declare this integer
+// version of texture().
+ivec4 texture(isampler2D sampler, vec2 P);
 vec4 texture(samplerExternalOES sampler, vec2 P, float bias);
 vec4 texture(samplerExternalOES sampler, vec2 P);
 
@@ -483,6 +486,7 @@
 vec4 texture1DProjLod(sampler1D sampler, vec4 coord, float lod);
 */
 vec4 texture2D(sampler2D sampler, vec2 coord);
+ivec4 texture2D(isampler2D sampler, vec2 coord);
 vec4 texture2D(samplerExternalOES sampler, vec2 coord);
 vec4 texture2D(sampler2D sampler, vec2 coord, float bias);
 vec4 texture2DProj(sampler2D sampler, vec3 coord);