/**
* Remove outdated textures and create the requested ones.
*/
-static void
+static boolean
xmesa_st_framebuffer_validate_textures(struct st_framebuffer_iface *stfbi,
unsigned width, unsigned height,
unsigned mask)
xstfb->textures[i] =
xstfb->screen->resource_create(xstfb->screen, &templ);
+ if (!xstfb->textures[i])
+ return FALSE;
}
}
xstfb->texture_width = width;
xstfb->texture_height = height;
xstfb->texture_mask = mask;
+
+ return TRUE;
}
static boolean
struct xmesa_st_framebuffer *xstfb = xmesa_st_framebuffer(stfbi);
unsigned statt_mask, new_mask, i;
boolean resized;
+ boolean ret;
statt_mask = 0x0;
for (i = 0; i < count; i++)
/* revalidate textures */
if (resized || new_mask) {
- xmesa_st_framebuffer_validate_textures(stfbi,
- xstfb->buffer->width, xstfb->buffer->height, statt_mask);
+ ret = xmesa_st_framebuffer_validate_textures(stfbi,
+ xstfb->buffer->width, xstfb->buffer->height, statt_mask);
+ if (!ret)
+ return ret;
if (!resized) {
enum st_attachment_type back, front;