mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 00:30:11 +01:00
Pad surface dimensions to multiples of 2.
Avoids an assertion failure with softpipe if requested width or height is odd.
This commit is contained in:
parent
b8ecec7abe
commit
617b39ce98
1 changed files with 4 additions and 0 deletions
|
|
@ -99,6 +99,10 @@ st_renderbuffer_alloc_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
|
|||
pipe->region_release(pipe, &strb->surface->region);
|
||||
}
|
||||
|
||||
/* Softpipe operates on quads, so pad dimensions to multiples of 2 */
|
||||
width += width & 1;
|
||||
height += height & 1;
|
||||
|
||||
strb->surface->region = pipe->region_alloc(pipe, cpp, width, height, flags);
|
||||
if (!strb->surface->region)
|
||||
return GL_FALSE; /* out of memory, try s/w buffer? */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue