sna: Give kgem_create_buffer_2d a unique id
The gen3, among others, backend uses the unique id of a buffer to track the currently attached buffer and uses 0 as the invalid value. Linear buffers as created by kgem_create_buffer_2d were not being assigned a unique id causing mayhem when they were then being passed to the backends as render targets and sources. In particular, gen3 did not notice the switch in render target and did not emit commands to change the GPU target nor attach the buffer to the batch, causing the sna_read_boxes to fail and for us to trigger an assertion for an uncomsumed read buffer. Reported-by: Clemens Eisserer <linuxhippy@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42718 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
d21e80433f
commit
8a91c7d857
|
|
@ -3178,6 +3178,7 @@ struct kgem_bo *kgem_create_buffer_2d(struct kgem *kgem,
|
|||
}
|
||||
|
||||
bo->pitch = stride;
|
||||
bo->unique_id = kgem_get_unique_id(kgem);
|
||||
return bo;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue