aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGpuCommandBuffer.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-06-18 12:52:47 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-18 17:13:58 +0000
commit19c1233c447f625c2522e7ecd0a0adecc629bb2f (patch)
tree891e06143986ade3aae8d4176ec8b426f70b896f /src/gpu/GrGpuCommandBuffer.cpp
parent146cf3ce7935019ecc63ce9e93450a8c122880d8 (diff)
Change how vertex/instance attributes are handled in geometry processors.
* No longer register vertex/instance attributes on base class, just counts * Separate instance and vertex attributes and remove InputRate and offset * Make attributes constexpr where possible Change-Id: I1f1d5e772fa177a96d2aeb805aab7b69f35bfae6 Reviewed-on: https://skia-review.googlesource.com/132405 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'src/gpu/GrGpuCommandBuffer.cpp')
-rw-r--r--src/gpu/GrGpuCommandBuffer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/GrGpuCommandBuffer.cpp b/src/gpu/GrGpuCommandBuffer.cpp
index 13ae6c9844..fa2ce077b5 100644
--- a/src/gpu/GrGpuCommandBuffer.cpp
+++ b/src/gpu/GrGpuCommandBuffer.cpp
@@ -33,12 +33,12 @@ bool GrGpuRTCommandBuffer::draw(const GrPipeline& pipeline,
int meshCount,
const SkRect& bounds) {
#ifdef SK_DEBUG
- SkASSERT(!primProc.hasInstanceAttribs() || this->gpu()->caps()->instanceAttribSupport());
+ SkASSERT(!primProc.hasInstanceAttributes() || this->gpu()->caps()->instanceAttribSupport());
for (int i = 0; i < meshCount; ++i) {
SkASSERT(!GrPrimTypeRequiresGeometryShaderSupport(meshes[i].primitiveType()) ||
this->gpu()->caps()->shaderCaps()->geometryShaderSupport());
- SkASSERT(primProc.hasVertexAttribs() == meshes[i].hasVertexData());
- SkASSERT(primProc.hasInstanceAttribs() == meshes[i].isInstanced());
+ SkASSERT(primProc.hasVertexAttributes() == meshes[i].hasVertexData());
+ SkASSERT(primProc.hasInstanceAttributes() == meshes[i].isInstanced());
}
#endif
auto resourceProvider = this->gpu()->getContext()->contextPriv().resourceProvider();
@@ -47,7 +47,7 @@ bool GrGpuRTCommandBuffer::draw(const GrPipeline& pipeline,
return false;
}
- if (primProc.numAttribs() > this->gpu()->caps()->maxVertexAttributes()) {
+ if (primProc.numVertexAttributes() > this->gpu()->caps()->maxVertexAttributes()) {
this->gpu()->stats()->incNumFailedDraws();
return false;
}