commit | 7dbd45d2c7427d2c679d6507435d2f0220bf64ef | [log] [tgz] |
---|---|---|
author | bsalomon <bsalomon@google.com> | Wed Mar 23 10:40:53 2016 -0700 |
committer | Commit bot <commit-bot@chromium.org> | Wed Mar 23 10:40:53 2016 -0700 |
tree | ae53a6f2d968b65da8706e791617988e86af3118 | |
parent | 1443c6920c4b7aa80811c30ed9cdc81395d5df4f [diff] [blame] |
Make max number of vertex attributes be checked dynamically GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1822343002 Review URL: https://codereview.chromium.org/1822343002
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp index f3f00f1..ce15b41 100644 --- a/src/gpu/GrGpu.cpp +++ b/src/gpu/GrGpu.cpp
@@ -492,12 +492,16 @@ //////////////////////////////////////////////////////////////////////////////// -void GrGpu::draw(const GrPipeline& pipeline, +bool GrGpu::draw(const GrPipeline& pipeline, const GrPrimitiveProcessor& primProc, const GrMesh* meshes, int meshCount) { + if (primProc.numAttribs() > this->caps()->maxVertexAttributes()) { + return false; + } this->handleDirtyContext(); this->onDraw(pipeline, primProc, meshes, meshCount); + return true; }