Fixes https://bugs.freedesktop.org/show_bug.cgi?id=43047
and https://bugs.freedesktop.org/show_bug.cgi?id=43048
Note: This is a candidate for the 7.11 branch.
Tested-by: Vinson Lee <vlee@vmware.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
pipe_surface_reference( &strb->surface, NULL );
pipe_resource_reference( &strb->texture, NULL );
+ if (width == 0 || height == 0) {
+ /* if size is zero, nothing to allocate */
+ return GL_TRUE;
+ }
+
/* Setup new texture template.
*/
memset(&template, 0, sizeof(template));