Revert "Revert "Add support for image load to SkSL""
This reverts commit cb115bdeed5898ded3fdbe572a14616cff809b7c.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4900
Change-Id: Ibcb381bae83d0cfc1a1226be90792061d401426a
Reviewed-on: https://skia-review.googlesource.com/4900
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/sksl/SkSLContext.h b/src/sksl/SkSLContext.h
index 80ad7fb..a42a4cc 100644
--- a/src/sksl/SkSLContext.h
+++ b/src/sksl/SkSLContext.h
@@ -78,8 +78,14 @@
, fSampler1DArrayShadow_Type(new Type("sampler1DArrayShadow"))
, fSampler2DArrayShadow_Type(new Type("sampler2DArrayShadow"))
, fSamplerCubeArrayShadow_Type(new Type("samplerCubeArrayShadow"))
+
// Related to below FIXME, gsampler*s don't currently expand to cover integer case.
, fISampler2D_Type(new Type("isampler2D", SpvDim2D, false, false, false, true))
+
+ // FIXME express these as "gimage2D" that expand to image2D, iimage2D, and uimage2D.
+ , fImage2D_Type(new Type("image2D", SpvDim2D, false, false, false, true))
+ , fIImage2D_Type(new Type("iimage2D", SpvDim2D, false, false, false, true))
+
// FIXME figure out what we're supposed to do with the gsampler et al. types)
, fGSampler1D_Type(new Type("$gsampler1D", static_type(*fSampler1D_Type)))
, fGSampler2D_Type(new Type("$gsampler2D", static_type(*fSampler2D_Type)))
@@ -195,8 +201,12 @@
const std::unique_ptr<Type> fSampler2DArrayShadow_Type;
const std::unique_ptr<Type> fSamplerCubeArrayShadow_Type;
+
const std::unique_ptr<Type> fISampler2D_Type;
+ const std::unique_ptr<Type> fImage2D_Type;
+ const std::unique_ptr<Type> fIImage2D_Type;
+
const std::unique_ptr<Type> fGSampler1D_Type;
const std::unique_ptr<Type> fGSampler2D_Type;
const std::unique_ptr<Type> fGSampler3D_Type;