From 7534c536ca0f4b2b123200f421460094034f37a3 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Mon, 29 Apr 2019 13:53:29 +0200 Subject: mesa: add EXT_dsa (Named)Framebuffer functions These functions dont support display list as specified: Should the selector-free versions of various OpenGL 3.0 and EXT_framebuffer_object framebuffer object commands not be allowed in display lists [...]? RESOLVED: Yes --- src/mesa/main/buffers.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) (limited to 'src/mesa/main/buffers.c') diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index 4e48b76fcb8..a47438920b4 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -35,6 +35,7 @@ #include "context.h" #include "enums.h" #include "fbobject.h" +#include "hash.h" #include "mtypes.h" #include "util/bitscan.h" #include "util/u_math.h" @@ -376,6 +377,25 @@ _mesa_NamedFramebufferDrawBuffer_no_error(GLuint framebuffer, GLenum buf) } +void GLAPIENTRY +_mesa_FramebufferDrawBufferEXT(GLuint framebuffer, GLenum buf) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_framebuffer *fb; + + if (framebuffer) { + fb = _mesa_lookup_framebuffer_dsa(ctx, framebuffer, + "glFramebufferDrawBufferEXT"); + if (!fb) + return; + } + else + fb = ctx->WinSysDrawBuffer; + + draw_buffer_error(ctx, fb, buf, "glFramebufferDrawBufferEXT"); +} + + void GLAPIENTRY _mesa_NamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf) { @@ -649,6 +669,24 @@ _mesa_DrawBuffers(GLsizei n, const GLenum *buffers) draw_buffers_error(ctx, ctx->DrawBuffer, n, buffers, "glDrawBuffers"); } +void GLAPIENTRY +_mesa_FramebufferDrawBuffersEXT(GLuint framebuffer, GLsizei n, + const GLenum *bufs) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_framebuffer *fb; + + if (framebuffer) { + fb = _mesa_lookup_framebuffer_dsa(ctx, framebuffer, + "glFramebufferDrawBuffersEXT"); + if (!fb) + return; + } + else + fb = ctx->WinSysDrawBuffer; + + draw_buffers_error(ctx, fb, n, bufs, "glFramebufferDrawBuffersEXT"); +} void GLAPIENTRY _mesa_NamedFramebufferDrawBuffers_no_error(GLuint framebuffer, GLsizei n, @@ -959,6 +997,25 @@ _mesa_NamedFramebufferReadBuffer_no_error(GLuint framebuffer, GLenum src) } +void GLAPIENTRY +_mesa_FramebufferReadBufferEXT(GLuint framebuffer, GLenum buf) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_framebuffer *fb; + + if (framebuffer) { + fb = _mesa_lookup_framebuffer_dsa(ctx, framebuffer, + "glFramebufferReadBufferEXT"); + if (!fb) + return; + } + else + fb = ctx->WinSysDrawBuffer; + + read_buffer_err(ctx, fb, buf, "glFramebufferReadBufferEXT"); +} + + void GLAPIENTRY _mesa_NamedFramebufferReadBuffer(GLuint framebuffer, GLenum src) { -- cgit v1.2.3