asahi: Skip over holes in the vbufs

Fixes dEQP-GLES2.functional.vertex_arrays.multiple_attributes.stride.3_float2_17_float2_17_float2_0

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730>
This commit is contained in:
Alyssa Rosenzweig
2021-07-05 17:32:34 -04:00
committed by Marge Bot
parent 4c7a07e3b6
commit 8d79fdea81
2 changed files with 3 additions and 3 deletions

View File

@@ -938,9 +938,9 @@ agx_update_vs(struct agx_context *ctx)
memcpy(key.attributes, ctx->attributes,
sizeof(key.attributes[0]) * AGX_MAX_ATTRIBS);
for (unsigned i = 0; i < key.num_vbufs; ++i) {
u_foreach_bit(i, ctx->vb_mask) {
assert((ctx->vertex_buffers[i].stride & 0x3) == 0);
key.vbuf_strides[i] = ctx->vertex_buffers[i].stride / 4; // TODO: alignment
key.vbuf_strides[i] = ctx->vertex_buffers[i].stride / 4;
}
struct asahi_shader_key akey = {

View File

@@ -71,7 +71,7 @@ agx_push_location_direct(struct agx_context *ctx, struct agx_push push,
struct agx_ptr ptr = agx_pool_alloc_aligned(&batch->pool, count * sizeof(uint64_t), 8);
uint64_t *addresses = ptr.cpu;
for (unsigned i = 0; i < count; ++i) {
u_foreach_bit(i, ctx->vb_mask) {
struct pipe_vertex_buffer vb = ctx->vertex_buffers[i];
assert(!vb.is_user_buffer);