summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-07-11 15:46:22 -0700
committerAlyssa Rosenzweig <[email protected]>2019-07-12 07:38:37 -0700
commit5f4f8aec748427462bb4539dcfbe0e622842327a (patch)
tree42ba4612eee71c8675b88eb44f74e12ab70ba78a /src/gallium/drivers/panfrost
parent6d8490f9009289c7543aebe6e99d9a627f2383b8 (diff)
panfrost: Initialize shift/extra_flags
Don't rely on them being preinitialized to zero; this can cause junk to appear on the wire. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost')
-rw-r--r--src/gallium/drivers/panfrost/pan_context.c3
-rw-r--r--src/gallium/drivers/panfrost/pan_instancing.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index cc3a00902e6..f9b11b691da 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -530,6 +530,7 @@ panfrost_emit_varyings(
slot->elements = varying_address | MALI_ATTR_LINEAR;
slot->stride = stride;
slot->size = stride * count;
+ slot->shift = slot->extra_flags = 0;
ctx->varying_height += ALIGN_POT(slot->size, 64);
assert(ctx->varying_height < ctx->varying_mem.bo->size);
@@ -541,7 +542,7 @@ static void
panfrost_emit_point_coord(union mali_attr *slot)
{
slot->elements = MALI_VARYING_POINT_COORD | MALI_ATTR_LINEAR;
- slot->stride = slot->size = 0;
+ slot->stride = slot->size = slot->shift = slot->extra_flags = 0;
}
static void
diff --git a/src/gallium/drivers/panfrost/pan_instancing.c b/src/gallium/drivers/panfrost/pan_instancing.c
index a4d5b8823ac..e74cc4365cb 100644
--- a/src/gallium/drivers/panfrost/pan_instancing.c
+++ b/src/gallium/drivers/panfrost/pan_instancing.c
@@ -308,6 +308,9 @@ panfrost_emit_vertex_data(struct panfrost_job *batch)
* correctness) so the data doesn't get clamped away */
attrs[k].size += chopped_addr;
+ /* For non-instancing make sure we initialize */
+ attrs[k].shift = attrs[k].extra_flags = 0;
+
/* Instancing uses a dramatically different code path than
* linear, so dispatch for the actual emission now that the
* common code is finished */