diff options
Diffstat (limited to 'src/glx/x11')
-rw-r--r-- | src/glx/x11/indirect.c | 46 | ||||
-rw-r--r-- | src/glx/x11/indirect.h | 2 | ||||
-rw-r--r-- | src/glx/x11/indirect_init.c | 8 |
3 files changed, 56 insertions, 0 deletions
diff --git a/src/glx/x11/indirect.c b/src/glx/x11/indirect.c index e0cafd43bcb..3ca71f56ff8 100644 --- a/src/glx/x11/indirect.c +++ b/src/glx/x11/indirect.c @@ -8604,6 +8604,26 @@ __indirect_glDrawBuffersARB(GLsizei n, const GLenum * bufs) } } +#define X_GLrop_RenderbufferStorageMultisample 4331 +void +__indirect_glRenderbufferStorageMultisample(GLenum target, GLsizei samples, + GLenum internalformat, + GLsizei width, GLsizei height) +{ + __GLXcontext *const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 24; + emit_header(gc->pc, X_GLrop_RenderbufferStorageMultisample, cmdlen); + (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4); + (void) memcpy((void *) (gc->pc + 8), (void *) (&samples), 4); + (void) memcpy((void *) (gc->pc + 12), (void *) (&internalformat), 4); + (void) memcpy((void *) (gc->pc + 16), (void *) (&width), 4); + (void) memcpy((void *) (gc->pc + 20), (void *) (&height), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { + (void) __glXFlushRenderBuffer(gc, gc->pc); + } +} + #define X_GLrop_SampleMaskSGIS 2048 void __indirect_glSampleMaskSGIS(GLclampf value, GLboolean invert) @@ -10597,6 +10617,32 @@ __indirect_glRenderbufferStorageEXT(GLenum target, GLenum internalformat, } } +#define X_GLrop_BlitFramebufferEXT 4330 +void +__indirect_glBlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, + GLint srcY1, GLint dstX0, GLint dstY0, + GLint dstX1, GLint dstY1, GLbitfield mask, + GLenum filter) +{ + __GLXcontext *const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 44; + emit_header(gc->pc, X_GLrop_BlitFramebufferEXT, cmdlen); + (void) memcpy((void *) (gc->pc + 4), (void *) (&srcX0), 4); + (void) memcpy((void *) (gc->pc + 8), (void *) (&srcY0), 4); + (void) memcpy((void *) (gc->pc + 12), (void *) (&srcX1), 4); + (void) memcpy((void *) (gc->pc + 16), (void *) (&srcY1), 4); + (void) memcpy((void *) (gc->pc + 20), (void *) (&dstX0), 4); + (void) memcpy((void *) (gc->pc + 24), (void *) (&dstY0), 4); + (void) memcpy((void *) (gc->pc + 28), (void *) (&dstX1), 4); + (void) memcpy((void *) (gc->pc + 32), (void *) (&dstY1), 4); + (void) memcpy((void *) (gc->pc + 36), (void *) (&mask), 4); + (void) memcpy((void *) (gc->pc + 40), (void *) (&filter), 4); + gc->pc += cmdlen; + if (__builtin_expect(gc->pc > gc->limit, 0)) { + (void) __glXFlushRenderBuffer(gc, gc->pc); + } +} + # undef FASTCALL # undef NOINLINE diff --git a/src/glx/x11/indirect.h b/src/glx/x11/indirect.h index 0719a1b3024..4a1b81ca6e6 100644 --- a/src/glx/x11/indirect.h +++ b/src/glx/x11/indirect.h @@ -572,6 +572,7 @@ extern HIDDEN void __indirect_glGetQueryObjectuivARB(GLuint id, GLenum pname, GL extern HIDDEN void __indirect_glGetQueryivARB(GLenum target, GLenum pname, GLint * params); extern HIDDEN GLboolean __indirect_glIsQueryARB(GLuint id); extern HIDDEN void __indirect_glDrawBuffersARB(GLsizei n, const GLenum * bufs); +extern HIDDEN void __indirect_glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); extern HIDDEN void __indirect_glSampleMaskSGIS(GLclampf value, GLboolean invert); extern HIDDEN void __indirect_glSamplePatternSGIS(GLenum pattern); extern HIDDEN void __indirect_glColorPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); @@ -710,6 +711,7 @@ extern HIDDEN void __indirect_glGetRenderbufferParameterivEXT(GLenum target, GLe extern HIDDEN GLboolean __indirect_glIsFramebufferEXT(GLuint framebuffer); extern HIDDEN GLboolean __indirect_glIsRenderbufferEXT(GLuint renderbuffer); extern HIDDEN void __indirect_glRenderbufferStorageEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +extern HIDDEN void __indirect_glBlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); # undef HIDDEN # undef FASTCALL diff --git a/src/glx/x11/indirect_init.c b/src/glx/x11/indirect_init.c index 852fe712c66..aa9a6bb2b0e 100644 --- a/src/glx/x11/indirect_init.c +++ b/src/glx/x11/indirect_init.c @@ -588,6 +588,10 @@ __GLapi * __glXNewIndirectAPI( void ) glAPI->DrawBuffersARB = __indirect_glDrawBuffersARB; + /* 45. GL_ARB_framebuffer_object */ + + glAPI->RenderbufferStorageMultisample = __indirect_glRenderbufferStorageMultisample; + /* 25. GL_SGIS_multisample */ glAPI->SampleMaskSGIS = __indirect_glSampleMaskSGIS; @@ -768,6 +772,10 @@ __GLapi * __glXNewIndirectAPI( void ) glAPI->IsRenderbufferEXT = __indirect_glIsRenderbufferEXT; glAPI->RenderbufferStorageEXT = __indirect_glRenderbufferStorageEXT; + /* 316. GL_EXT_framebuffer_blit */ + + glAPI->BlitFramebufferEXT = __indirect_glBlitFramebufferEXT; + return glAPI; } |