Revert "Revert "Reland "Add ability to specify different GP textures for each mesh in a draw."""
This reverts commit cd7907b57d7624c9bb60cd914d175ed72d9b1365.
Readds optimization to draw single texture quads using GrPrimitiveType::kTriangles, non-indexed.
Removes disable on NVIDIA/VK as bounds issue was fixed here:
https://skia.googlesource.com/skia/+/c525d4f7101715d728fca1b7fd7f170115994646
Change-Id: Icbea3de0382c68318db8ecffb2244bc4c5fe84ad
Reviewed-on: https://skia-review.googlesource.com/155500
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrPipeline.h b/src/gpu/GrPipeline.h
index 5817ce8..5e75c65 100644
--- a/src/gpu/GrPipeline.h
+++ b/src/gpu/GrPipeline.h
@@ -73,7 +73,8 @@
explicit FixedDynamicState(const SkIRect& scissorRect) : fScissorRect(scissorRect) {}
FixedDynamicState() = default;
SkIRect fScissorRect = SkIRect::EmptyIRect();
- // Must have GrPrimitiveProcessor::numTextureSamplers() entries. Can be null if no samplers.
+ // Must have GrPrimitiveProcessor::numTextureSamplers() entries. Can be null if no samplers
+ // or textures are passed using DynamicStateArrays.
GrTextureProxy** fPrimitiveProcessorTextures = nullptr;
};
@@ -83,6 +84,10 @@
*/
struct DynamicStateArrays {
const SkIRect* fScissorRects = nullptr;
+ // Must have GrPrimitiveProcessor::numTextureSamplers() * num_meshes entries.
+ // Can be null if no samplers or to use the same textures for all meshes via'
+ // FixedDynamicState.
+ GrTextureProxy** fPrimitiveProcessorTextures = nullptr;
};
/**