summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_atom_texture.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-03-20 17:08:07 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-03-20 17:08:07 -0600
commit3b3774b1227743147159676795b542c0eb7c2bdf (patch)
treeef9f0d4b13d5304b67290a86424a32ea47f851c0 /src/mesa/state_tracker/st_atom_texture.c
parent0565e6888a332956661f6bc8b5778b058168e5f9 (diff)
gallium: catch some out of memory conditions in the texture image code.
st_finalize_texture()'s return code now indicates success/fail instead of presence of texture border (which we discard earlier).
Diffstat (limited to 'src/mesa/state_tracker/st_atom_texture.c')
-rw-r--r--src/mesa/state_tracker/st_atom_texture.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c
index 2a711e513d..9aef30f456 100644
--- a/src/mesa/state_tracker/st_atom_texture.c
+++ b/src/mesa/state_tracker/st_atom_texture.c
@@ -64,7 +64,10 @@ update_textures(struct st_context *st)
GLboolean flush, retval;
retval = st_finalize_texture(st->ctx, st->pipe, texObj, &flush);
- /* XXX retval indicates whether there's a texture border */
+ if (!retval) {
+ /* out of mem */
+ continue;
+ }
st->state.num_textures = unit + 1;
}