mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
mesa: Support EXT_framebuffer_blit targets in ES 3.0 as well.
GL_READ_FRAMEBUFFER and GL_DRAW_FRAMEBUFFER are valid targets in ES 3. Fixes 23 es3conform framebuffer_blit tests. Two more go from fail to crash, but that appears to be because they actually run now. Reviewed-and-tested-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
parent
f399a707c8
commit
c6ed42a89e
1 changed files with 5 additions and 4 deletions
|
|
@ -31,6 +31,7 @@
|
|||
* Brian Paul
|
||||
*/
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "buffers.h"
|
||||
#include "context.h"
|
||||
|
|
@ -162,13 +163,13 @@ invalidate_framebuffer(struct gl_framebuffer *fb)
|
|||
static struct gl_framebuffer *
|
||||
get_framebuffer_target(struct gl_context *ctx, GLenum target)
|
||||
{
|
||||
bool have_fb_blit = _mesa_is_gles3(ctx) ||
|
||||
(ctx->Extensions.EXT_framebuffer_blit && _mesa_is_desktop_gl(ctx));
|
||||
switch (target) {
|
||||
case GL_DRAW_FRAMEBUFFER:
|
||||
return ctx->Extensions.EXT_framebuffer_blit && _mesa_is_desktop_gl(ctx)
|
||||
? ctx->DrawBuffer : NULL;
|
||||
return have_fb_blit ? ctx->DrawBuffer : NULL;
|
||||
case GL_READ_FRAMEBUFFER:
|
||||
return ctx->Extensions.EXT_framebuffer_blit && _mesa_is_desktop_gl(ctx)
|
||||
? ctx->ReadBuffer : NULL;
|
||||
return have_fb_blit ? ctx->ReadBuffer : NULL;
|
||||
case GL_FRAMEBUFFER_EXT:
|
||||
return ctx->DrawBuffer;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue