mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-19 21:28:32 +02:00
gallium: if we run out of memory in st_TexImage, flush and try again.
If the driver buffers a scene flushing should release old textures and make space for new ones. Fixes problem with texdown.c test.
This commit is contained in:
parent
0b8e19ffc5
commit
8d249ca620
1 changed files with 9 additions and 2 deletions
|
|
@ -481,8 +481,15 @@ st_TexImage(GLcontext * ctx,
|
|||
if (!stObj->pt) {
|
||||
guess_and_alloc_texture(ctx->st, stObj, stImage);
|
||||
if (!stObj->pt) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage");
|
||||
return;
|
||||
/* Probably out of memory.
|
||||
* Try flushing any pending rendering, then retry.
|
||||
*/
|
||||
st_finish(ctx->st);
|
||||
guess_and_alloc_texture(ctx->st, stObj, stImage);
|
||||
if (!stObj->pt) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue