mirror of
https://github.com/brl/mutter.git
synced 2025-02-02 06:42:28 +00:00
offscreen: allocate texture before querying slicing
Since we are planning on deferring more texture allocation work this makes sure we don't query whether a texture is sliced until we know it has been allocated. Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit b742638a1ce581f5a2c9f15907361c3b0c1b178c)
This commit is contained in:
parent
2e61318914
commit
a07d26e9ae
@ -734,6 +734,11 @@ cogl_framebuffer_allocate (CoglFramebuffer *framebuffer,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!cogl_texture_allocate (offscreen->texture, error))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
/* NB: it's only after allocating the texture that we will
|
||||||
|
* determine whether a texture needs slicing... */
|
||||||
if (cogl_texture_is_sliced (offscreen->texture))
|
if (cogl_texture_is_sliced (offscreen->texture))
|
||||||
{
|
{
|
||||||
_cogl_set_error (error, COGL_SYSTEM_ERROR,
|
_cogl_set_error (error, COGL_SYSTEM_ERROR,
|
||||||
@ -743,9 +748,6 @@ cogl_framebuffer_allocate (CoglFramebuffer *framebuffer,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cogl_texture_allocate (offscreen->texture, error))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
/* Forward the texture format as the internal format of the
|
/* Forward the texture format as the internal format of the
|
||||||
* framebuffer */
|
* framebuffer */
|
||||||
framebuffer->internal_format =
|
framebuffer->internal_format =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user