mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
v3d: Add safety checks for resource_create().
This should ease my debugging next time I screw it up.
This commit is contained in:
parent
6ad9e8690d
commit
332a5cf6a5
1 changed files with 6 additions and 0 deletions
|
|
@ -432,6 +432,12 @@ v3d_setup_slices(struct v3d_resource *rsc, uint32_t winsys_stride)
|
|||
*/
|
||||
bool uif_top = msaa;
|
||||
|
||||
/* Check some easy mistakes to make in a resource_create() call that
|
||||
* will break our setup.
|
||||
*/
|
||||
assert(prsc->array_size != 0);
|
||||
assert(prsc->depth0 != 0);
|
||||
|
||||
for (int i = prsc->last_level; i >= 0; i--) {
|
||||
struct v3d_resource_slice *slice = &rsc->slices[i];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue