Only use flat varyings for integer texIndex.
Flat varyings aren't supported with ES 2.0, so just fall back to non-flat if we can only handle float. Change-Id: Id47a773b86666c46916efe5bcb1c629743977ccf Reviewed-on: https://skia-review.googlesource.com/73800 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
This commit is contained in:
parent
c60dea17d8
commit
eadb9f9a55
@ -40,7 +40,11 @@ static void append_index_uv_varyings(GrGLSLPrimitiveProcessor::EmitArgs& args,
|
||||
args.fVaryingHandler->addVarying("TextureCoords", uv);
|
||||
args.fVertBuilder->codeAppendf("%s = intCoords * %s;", uv->vsOut(), atlasSizeInvName);
|
||||
|
||||
args.fVaryingHandler->addFlatVarying("TexIndex", texIdx);
|
||||
if (args.fShaderCaps->integerSupport()) {
|
||||
args.fVaryingHandler->addFlatVarying("TexIndex", texIdx);
|
||||
} else {
|
||||
args.fVaryingHandler->addVarying("TexIndex", texIdx);
|
||||
}
|
||||
args.fVertBuilder->codeAppendf("%s = texIdx;", texIdx->vsOut());
|
||||
|
||||
if (st) {
|
||||
|
Loading…
Reference in New Issue
Block a user