mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-21 06:30:36 +01:00
asahi: Don't crash on VBOs without resources
There's a Firefox QuakeJS heisenbug that triggers this sometimes, by binding vertex attributes with no buffer... Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Signed-off-by: Asahi Lina <lina@asahilina.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20365>
This commit is contained in:
parent
331c2f4b7e
commit
cea15fe06d
1 changed files with 5 additions and 0 deletions
|
|
@ -75,6 +75,11 @@ agx_push_location_direct(struct agx_batch *batch, struct agx_push push,
|
|||
struct pipe_vertex_buffer vb = ctx->vertex_buffers[push.vbo];
|
||||
assert(!vb.is_user_buffer);
|
||||
|
||||
if (!vb.buffer.resource) {
|
||||
*address = 0;
|
||||
return ptr.gpu;
|
||||
}
|
||||
|
||||
struct agx_resource *rsrc = agx_resource(vb.buffer.resource);
|
||||
agx_batch_reads(batch, rsrc);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue