panfrost: Don't upload empty push uniform table

Instead zero out the pointer in this case.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10772>
This commit is contained in:
Alyssa Rosenzweig 2021-05-12 13:21:40 -04:00 committed by Marge Bot
parent 5c069ff512
commit df3edfc729
1 changed files with 5 additions and 1 deletions

View File

@ -1205,6 +1205,11 @@ panfrost_emit_const_buf(struct panfrost_batch *batch,
}
}
buf->dirty_mask = 0;
if (ss->info.push.count == 0)
return ubos.gpu;
/* Copy push constants required by the shader */
struct panfrost_ptr push_transfer =
panfrost_pool_alloc_aligned(&batch->pool,
@ -1259,7 +1264,6 @@ panfrost_emit_const_buf(struct panfrost_batch *batch,
memcpy(push_cpu + i, (uint8_t *) mapped_ubo + src.offset, 4);
}
buf->dirty_mask = 0;
return ubos.gpu;
}