Temporary hack to force text texture index varying to be float.
Previous experiment showed disabling integer support in GrShaderCaps
improved ANGLE D3D11 ES3 perf.
Trying to determine if perf hit on ANGLE D3D11 ES3 is from
integer vertex attribs and unpack operations in VS or from
using an int varying to communicate the index to the FS.
Will revert this after observing trend on perf.skia.org.
Change-Id: I40f4c0397b1377922c3018be864c1b7048bcfba9
Bug: skia:10644
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315866
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/effects/GrBitmapTextGeoProc.cpp b/src/gpu/effects/GrBitmapTextGeoProc.cpp
index f960540..1c11e26 100644
--- a/src/gpu/effects/GrBitmapTextGeoProc.cpp
+++ b/src/gpu/effects/GrBitmapTextGeoProc.cpp
@@ -40,7 +40,7 @@
kFloat2_GrSLType, "AtlasSizeInv", &atlasDimensionsInvName);
GrGLSLVarying uv(kFloat2_GrSLType);
- GrSLType texIdxType = args.fShaderCaps->integerSupport() ? kInt_GrSLType : kFloat_GrSLType;
+ GrSLType texIdxType = args.fShaderCaps->integerSupport() && !SK_FORCE_MULTITEX_ATLAS_IDX_VARYING_TO_FLOAT ? kInt_GrSLType : kFloat_GrSLType;
GrGLSLVarying texIdx(texIdxType);
append_index_uv_varyings(args, btgp.numTextureSamplers(), btgp.inTextureCoords().name(),
atlasDimensionsInvName, &uv, &texIdx, nullptr);