summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/buffers.c
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <[email protected]>2019-04-29 13:53:29 +0200
committerMarek Olšák <[email protected]>2019-07-30 22:04:26 -0400
commit7534c536ca0f4b2b123200f421460094034f37a3 (patch)
treede7fa784e8deafc2c0e055f6ea3e4b8c91a62714 /src/mesa/main/buffers.c
parente26c6764f240d748a82c353f7c9a8b30f8a27cd6 (diff)
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
Diffstat (limited to 'src/mesa/main/buffers.c')
-rw-r--r--src/mesa/main/buffers.c57
1 files changed, 57 insertions, 0 deletions
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"
@@ -377,6 +378,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)
{
GET_CURRENT_CONTEXT(ctx);
@@ -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,
@@ -960,6 +998,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)
{
GET_CURRENT_CONTEXT(ctx);