diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-12-19 16:46:28 -0500 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-12-24 22:42:07 -0500 |
commit | 62ce9001c20f0135544e8ca99ef1b10aaaa7f085 (patch) | |
tree | e894df99dd9f5f71a12f38407be37d75ca0d4694 | |
parent | 385a4f773f5a446a38d39ccb7526f9294e9757eb (diff) |
panfrost: Slight cleanup of Gallium's pan_attribute.c
Signed-off-by: Alyssa Rosenzweig <[email protected]>
-rw-r--r-- | src/gallium/drivers/panfrost/pan_attributes.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gallium/drivers/panfrost/pan_attributes.c b/src/gallium/drivers/panfrost/pan_attributes.c index c1b58b36610..68f2333d0dd 100644 --- a/src/gallium/drivers/panfrost/pan_attributes.c +++ b/src/gallium/drivers/panfrost/pan_attributes.c @@ -38,9 +38,6 @@ panfrost_emit_vertex_data(struct panfrost_batch *batch) union mali_attr attrs[PIPE_MAX_ATTRIBS * 2]; unsigned k = 0; - unsigned vertex_count = ctx->vertex_count; - unsigned instanced_count = ctx->instance_count; - for (unsigned i = 0; i < so->num_elements; ++i) { /* We map a mali_attr to be 1:1 with the mali_attr_meta, which * means duplicating some vertex buffers (who cares? aside from @@ -97,7 +94,7 @@ panfrost_emit_vertex_data(struct panfrost_batch *batch) unsigned divisor = elem->instance_divisor; - if (divisor && instanced_count == 1) { + if (divisor && ctx->instance_count == 1) { /* Silly corner case where there's a divisor(=1) but * there's no legitimate instancing. So we want *every* * attribute to be the same. So set stride to zero so @@ -106,7 +103,7 @@ panfrost_emit_vertex_data(struct panfrost_batch *batch) attrs[k].size = attrs[k].stride + chopped_addr; attrs[k].stride = 0; attrs[k++].elements |= MALI_ATTR_LINEAR; - } else if (instanced_count <= 1) { + } else if (ctx->instance_count <= 1) { /* Normal, non-instanced attributes */ attrs[k++].elements |= MALI_ATTR_LINEAR; } else { |