mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 11:38:05 +02:00
r300g: return NULL texture early if buffer_create fails
This commit is contained in:
parent
da4185ca77
commit
950be3fa3c
1 changed files with 5 additions and 5 deletions
|
|
@ -979,16 +979,16 @@ struct pipe_resource* r300_texture_create(struct pipe_screen* screen,
|
|||
tex->buffer = rws->buffer_create(rws, 2048, base->bind, tex->domain,
|
||||
tex->size);
|
||||
|
||||
if (!tex->buffer) {
|
||||
FREE(tex);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
rws->buffer_set_tiling(rws, tex->buffer,
|
||||
tex->pitch[0] * util_format_get_blocksize(tex->b.b.format),
|
||||
tex->microtile,
|
||||
tex->macrotile);
|
||||
|
||||
if (!tex->buffer) {
|
||||
FREE(tex);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return (struct pipe_resource*)tex;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue