mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-11 13:30:31 +01:00
check if ctx->Driver.GetBufferSize==NULL and no-op
This commit is contained in:
parent
af52ff0c99
commit
55e42e5b72
2 changed files with 10 additions and 5 deletions
|
|
@ -604,6 +604,10 @@ void _mesa_resizebuffers( GLcontext *ctx )
|
|||
if (MESA_VERBOSE & VERBOSE_API)
|
||||
_mesa_debug(ctx, "glResizeBuffersMESA\n");
|
||||
|
||||
if (!ctx->Driver.GetBufferSize) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ctx->WinSysDrawBuffer) {
|
||||
GLuint newWidth, newHeight;
|
||||
GLframebuffer *buffer = ctx->WinSysDrawBuffer;
|
||||
|
|
|
|||
|
|
@ -1629,11 +1629,12 @@ static void
|
|||
initialize_framebuffer_size(GLcontext *ctx, GLframebuffer *fb)
|
||||
{
|
||||
GLuint width, height;
|
||||
ASSERT(ctx->Driver.GetBufferSize);
|
||||
ctx->Driver.GetBufferSize(fb, &width, &height);
|
||||
if (ctx->Driver.ResizeBuffers)
|
||||
ctx->Driver.ResizeBuffers(ctx, fb, width, height);
|
||||
fb->Initialized = GL_TRUE;
|
||||
if (ctx->Driver.GetBufferSize) {
|
||||
ctx->Driver.GetBufferSize(fb, &width, &height);
|
||||
if (ctx->Driver.ResizeBuffers)
|
||||
ctx->Driver.ResizeBuffers(ctx, fb, width, height);
|
||||
fb->Initialized = GL_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue