diff options
author | Zack Rusin <zackr@vmware.com> | 2009-12-07 18:13:57 -0500 |
---|---|---|
committer | Zack Rusin <zackr@vmware.com> | 2009-12-07 18:13:57 -0500 |
commit | 45412c2343a3ed1de388aca6a5ae25c49918c9bc (patch) | |
tree | 44303c67e10949cad86ed1bf1fe818c397288e7b /src/glx | |
parent | 9b5f260756356a73984d60c907c525b8a2f8cf94 (diff) | |
parent | cad14c2542698de144bb5434cefa02d7a00aaa74 (diff) |
Merge remote branch 'origin/master' into arb_geometry_shader4arb_geometry_shader4
Conflicts:
src/gallium/auxiliary/tgsi/tgsi_exec.c
src/mesa/glapi/glapitemp.h
src/mesa/glapi/glprocs.h
src/mesa/main/enums.c
src/mesa/main/remap_helper.h
src/mesa/state_tracker/st_atom_shader.c
src/mesa/state_tracker/st_program.c
src/mesa/state_tracker/st_program.h
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/x11/drisw_glx.c | 4 | ||||
-rw-r--r-- | src/glx/x11/glxextensions.c | 5 | ||||
-rw-r--r-- | src/glx/x11/glxextensions.h | 5 | ||||
-rw-r--r-- | src/glx/x11/indirect.c | 66 | ||||
-rw-r--r-- | src/glx/x11/indirect.h | 3 | ||||
-rw-r--r-- | src/glx/x11/indirect_init.c | 12 |
6 files changed, 94 insertions, 1 deletions
diff --git a/src/glx/x11/drisw_glx.c b/src/glx/x11/drisw_glx.c index 15e1586658..1866b2cc87 100644 --- a/src/glx/x11/drisw_glx.c +++ b/src/glx/x11/drisw_glx.c @@ -250,12 +250,14 @@ driCreateContext(__GLXscreenConfigs * psc, { __GLXDRIcontextPrivate *pcp, *pcp_shared; __GLXDRIconfigPrivate *config = (__GLXDRIconfigPrivate *) mode; - const __DRIcoreExtension *core = psc->core; + const __DRIcoreExtension *core; __DRIcontext *shared = NULL; if (!psc || !psc->driScreen) return NULL; + core = psc->core; + if (shareList) { pcp_shared = (__GLXDRIcontextPrivate *) shareList->driContext; shared = pcp_shared->driContext; diff --git a/src/glx/x11/glxextensions.c b/src/glx/x11/glxextensions.c index 473f46d1e5..6852128e2a 100644 --- a/src/glx/x11/glxextensions.c +++ b/src/glx/x11/glxextensions.c @@ -112,6 +112,7 @@ static const struct extension_info known_gl_extensions[] = { { GL(ARB_draw_buffers), VER(0,0), Y, N, N, N }, { GL(ARB_fragment_program), VER(0,0), Y, N, N, N }, { GL(ARB_fragment_program_shadow), VER(0,0), Y, N, N, N }, + { GL(ARB_framebuffer_object), VER(0,0), Y, N, N, N }, { GL(ARB_imaging), VER(0,0), Y, N, N, N }, { GL(ARB_multisample), VER(1,3), Y, N, N, N }, { GL(ARB_multitexture), VER(1,3), Y, N, N, N }, @@ -150,8 +151,11 @@ static const struct extension_info known_gl_extensions[] = { { GL(EXT_depth_bounds_test), VER(0,0), N, N, N, N }, { GL(EXT_draw_range_elements), VER(1,2), Y, N, Y, N }, { GL(EXT_fog_coord), VER(1,4), Y, N, N, N }, + { GL(EXT_framebuffer_blit), VER(0,0), Y, N, N, N }, + { GL(EXT_framebuffer_multisample), VER(0,0), Y, N, N, N }, { GL(EXT_framebuffer_object), VER(0,0), Y, N, N, N }, { GL(EXT_multi_draw_arrays), VER(1,4), Y, N, Y, N }, + { GL(EXT_packed_depth_stencil), VER(0,0), Y, N, N, N }, { GL(EXT_packed_pixels), VER(1,2), Y, N, N, N }, { GL(EXT_paletted_texture), VER(0,0), Y, N, N, N }, { GL(EXT_pixel_buffer_object), VER(0,0), N, N, N, N }, @@ -209,6 +213,7 @@ static const struct extension_info known_gl_extensions[] = { { GL(NV_fragment_program2), VER(0,0), Y, N, N, N }, { GL(NV_light_max_exponent), VER(0,0), Y, N, N, N }, { GL(NV_multisample_filter_hint), VER(0,0), Y, N, N, N }, + { GL(NV_packed_depth_stencil), VER(0,0), Y, N, N, N }, { GL(NV_point_sprite), VER(0,0), Y, N, N, N }, { GL(NV_texgen_reflection), VER(0,0), Y, N, N, N }, { GL(NV_texture_compression_vtc), VER(0,0), Y, N, N, N }, diff --git a/src/glx/x11/glxextensions.h b/src/glx/x11/glxextensions.h index 9f1c697487..652c5db1c8 100644 --- a/src/glx/x11/glxextensions.h +++ b/src/glx/x11/glxextensions.h @@ -74,6 +74,7 @@ enum GL_ARB_draw_buffers_bit, GL_ARB_fragment_program_bit, GL_ARB_fragment_program_shadow_bit, + GL_ARB_framebuffer_object_bit, GL_ARB_imaging_bit, GL_ARB_multisample_bit, GL_ARB_multitexture_bit, @@ -112,8 +113,11 @@ enum GL_EXT_depth_bounds_test_bit, GL_EXT_draw_range_elements_bit, GL_EXT_fog_coord_bit, + GL_EXT_framebuffer_blit_bit, + GL_EXT_framebuffer_multisample_bit, GL_EXT_framebuffer_object_bit, GL_EXT_multi_draw_arrays_bit, + GL_EXT_packed_depth_stencil_bit, GL_EXT_packed_pixels_bit, GL_EXT_paletted_texture_bit, GL_EXT_pixel_buffer_object_bit, @@ -164,6 +168,7 @@ enum GL_NV_fragment_program2_bit, GL_NV_light_max_exponent_bit, GL_NV_multisample_filter_hint_bit, + GL_NV_packed_depth_stencil_bit, GL_NV_point_sprite_bit, GL_NV_texgen_reflection_bit, GL_NV_texture_compression_vtc_bit, diff --git a/src/glx/x11/indirect.c b/src/glx/x11/indirect.c index e0cafd43bc..ea90ce4463 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,52 @@ __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); + } +} + +#define X_GLrop_FramebufferTextureLayerEXT 237 +void +__indirect_glFramebufferTextureLayerEXT(GLenum target, GLenum attachment, + GLuint texture, GLint level, + GLint layer) +{ + __GLXcontext *const gc = __glXGetCurrentContext(); + const GLuint cmdlen = 24; + emit_header(gc->pc, X_GLrop_FramebufferTextureLayerEXT, cmdlen); + (void) memcpy((void *) (gc->pc + 4), (void *) (&target), 4); + (void) memcpy((void *) (gc->pc + 8), (void *) (&attachment), 4); + (void) memcpy((void *) (gc->pc + 12), (void *) (&texture), 4); + (void) memcpy((void *) (gc->pc + 16), (void *) (&level), 4); + (void) memcpy((void *) (gc->pc + 20), (void *) (&layer), 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 0719a1b302..19a8c0d134 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,8 @@ 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); +extern HIDDEN void __indirect_glFramebufferTextureLayerEXT(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); # undef HIDDEN # undef FASTCALL diff --git a/src/glx/x11/indirect_init.c b/src/glx/x11/indirect_init.c index 852fe712c6..73ca993027 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,14 @@ __GLapi * __glXNewIndirectAPI( void ) glAPI->IsRenderbufferEXT = __indirect_glIsRenderbufferEXT; glAPI->RenderbufferStorageEXT = __indirect_glRenderbufferStorageEXT; + /* 316. GL_EXT_framebuffer_blit */ + + glAPI->BlitFramebufferEXT = __indirect_glBlitFramebufferEXT; + + /* 329. GL_EXT_texture_array */ + + glAPI->FramebufferTextureLayerEXT = __indirect_glFramebufferTextureLayerEXT; + return glAPI; } |