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 <alyssa.rosenzweig@collabora.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user