From 4208a8c02615841702619eb5891c0a61f96a5a00 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 1 Oct 2009 16:41:24 -0600 Subject: savage: s/Xfree/_mesa_free/ --- src/mesa/drivers/dri/savage/savage_xmesa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/drivers/dri/savage/savage_xmesa.c') diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c index 931ceff0a8..06179edae3 100644 --- a/src/mesa/drivers/dri/savage/savage_xmesa.c +++ b/src/mesa/drivers/dri/savage/savage_xmesa.c @@ -436,7 +436,7 @@ savageCreateContext( const __GLcontextModes *mesaVis, if (ctx->Const.MaxTextureLevels <= 6) { /*spec requires at least 64x64*/ __driUtilMessage("Not enough texture memory. " "Falling back to indirect rendering."); - Xfree(imesa); + _mesa_free(imesa); return GL_FALSE; } -- cgit v1.2.3 From 3e34a2a2b97e7c93955deedb7c12b73bccd6662d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 5 Oct 2009 18:11:35 -0600 Subject: drivers: don't include texformat.h And remove other unneeded #includes while we're at it. --- src/mesa/drivers/dri/gamma/gamma_tex.c | 13 +++++-------- src/mesa/drivers/dri/i810/i810tex.c | 1 - src/mesa/drivers/dri/i810/i810texmem.c | 1 - src/mesa/drivers/dri/i810/i810texstate.c | 1 - src/mesa/drivers/dri/i915/i830_texblend.c | 1 - src/mesa/drivers/dri/i915/i830_texstate.c | 1 - src/mesa/drivers/dri/i915/i830_vtbl.c | 1 - src/mesa/drivers/dri/i915/i915_texstate.c | 1 - src/mesa/drivers/dri/i915/i915_vtbl.c | 1 - src/mesa/drivers/dri/i965/brw_vs_surface_state.c | 1 - src/mesa/drivers/dri/i965/brw_wm.c | 1 - src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 1 - src/mesa/drivers/dri/intel/intel_blit.c | 1 - src/mesa/drivers/dri/intel/intel_fbo.c | 1 - src/mesa/drivers/dri/intel/intel_span.c | 1 - src/mesa/drivers/dri/intel/intel_tex_format.c | 1 - src/mesa/drivers/dri/intel/intel_tex_image.c | 1 - src/mesa/drivers/dri/mach64/mach64_tex.c | 1 - src/mesa/drivers/dri/mach64/mach64_texmem.c | 11 +++++------ src/mesa/drivers/dri/mach64/mach64_texstate.c | 1 - src/mesa/drivers/dri/mga/mga_texstate.c | 15 ++++++--------- src/mesa/drivers/dri/mga/mgatex.c | 13 ++++++------- src/mesa/drivers/dri/r128/r128_tex.c | 1 - src/mesa/drivers/dri/r128/r128_texmem.c | 1 - src/mesa/drivers/dri/r128/r128_texstate.c | 1 - src/mesa/drivers/dri/r200/r200_tex.c | 1 - src/mesa/drivers/dri/r200/r200_texstate.c | 1 - src/mesa/drivers/dri/r300/r300_state.c | 1 - src/mesa/drivers/dri/r300/r300_tex.c | 1 - src/mesa/drivers/dri/r300/r300_texstate.c | 1 - src/mesa/drivers/dri/r600/r600_tex.c | 1 - src/mesa/drivers/dri/r600/r600_texstate.c | 1 - src/mesa/drivers/dri/r600/r700_state.c | 1 - src/mesa/drivers/dri/radeon/radeon_fbo.c | 1 - src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c | 1 - src/mesa/drivers/dri/radeon/radeon_tex.c | 1 - src/mesa/drivers/dri/radeon/radeon_texstate.c | 1 - src/mesa/drivers/dri/radeon/radeon_texture.c | 1 - src/mesa/drivers/dri/s3v/s3v_tex.c | 4 ---- src/mesa/drivers/dri/savage/savage_xmesa.c | 2 +- src/mesa/drivers/dri/savage/savagetex.c | 23 +++++++++-------------- src/mesa/drivers/dri/sis/sis_tex.c | 8 +++----- src/mesa/drivers/dri/sis/sis_texstate.c | 1 - src/mesa/drivers/dri/tdfx/tdfx_state.c | 1 - src/mesa/drivers/dri/tdfx/tdfx_tex.c | 1 - src/mesa/drivers/dri/unichrome/via_tex.c | 3 +-- 46 files changed, 36 insertions(+), 93 deletions(-) (limited to 'src/mesa/drivers/dri/savage/savage_xmesa.c') diff --git a/src/mesa/drivers/dri/gamma/gamma_tex.c b/src/mesa/drivers/dri/gamma/gamma_tex.c index 97797d4788..0dad250e4d 100644 --- a/src/mesa/drivers/dri/gamma/gamma_tex.c +++ b/src/mesa/drivers/dri/gamma/gamma_tex.c @@ -1,21 +1,18 @@ -#include -#include - #include "main/glheader.h" #include "main/mtypes.h" +#include "main/colormac.h" #include "main/imports.h" #include "main/simple_list.h" #include "main/enums.h" +#include "main/mm.h" #include "main/texstore.h" -#include "teximage.h" -#include "main/texformat.h" -#include "texobj.h" +#include "main/teximage.h" +#include "main/texobj.h" + #include "swrast/swrast.h" -#include "main/mm.h" #include "gammacontext.h" -#include "colormac.h" /* diff --git a/src/mesa/drivers/dri/i810/i810tex.c b/src/mesa/drivers/dri/i810/i810tex.c index 8166393eb1..2f6978f5aa 100644 --- a/src/mesa/drivers/dri/i810/i810tex.c +++ b/src/mesa/drivers/dri/i810/i810tex.c @@ -28,7 +28,6 @@ #include "main/simple_list.h" #include "main/enums.h" #include "main/texstore.h" -#include "main/texformat.h" #include "main/teximage.h" #include "main/texobj.h" #include "main/colormac.h" diff --git a/src/mesa/drivers/dri/i810/i810texmem.c b/src/mesa/drivers/dri/i810/i810texmem.c index c2a5d95fc7..d93afbf9ef 100644 --- a/src/mesa/drivers/dri/i810/i810texmem.c +++ b/src/mesa/drivers/dri/i810/i810texmem.c @@ -30,7 +30,6 @@ #include "main/enums.h" #include "main/colormac.h" #include "main/mm.h" -#include "main/texformat.h" #include "i810screen.h" #include "i810_dri.h" diff --git a/src/mesa/drivers/dri/i810/i810texstate.c b/src/mesa/drivers/dri/i810/i810texstate.c index b873ddbecb..bff28c11c8 100644 --- a/src/mesa/drivers/dri/i810/i810texstate.c +++ b/src/mesa/drivers/dri/i810/i810texstate.c @@ -25,7 +25,6 @@ #include "main/glheader.h" #include "main/macros.h" #include "main/mtypes.h" -#include "main/texformat.h" #include "main/simple_list.h" #include "main/enums.h" #include "main/mm.h" diff --git a/src/mesa/drivers/dri/i915/i830_texblend.c b/src/mesa/drivers/dri/i915/i830_texblend.c index 09f7f37e76..3f64be8c96 100644 --- a/src/mesa/drivers/dri/i915/i830_texblend.c +++ b/src/mesa/drivers/dri/i915/i830_texblend.c @@ -30,7 +30,6 @@ #include "main/mtypes.h" #include "main/simple_list.h" #include "main/enums.h" -#include "main/texformat.h" #include "main/texstore.h" #include "main/mm.h" diff --git a/src/mesa/drivers/dri/i915/i830_texstate.c b/src/mesa/drivers/dri/i915/i830_texstate.c index 837ae57074..98fb853c68 100644 --- a/src/mesa/drivers/dri/i915/i830_texstate.c +++ b/src/mesa/drivers/dri/i915/i830_texstate.c @@ -27,7 +27,6 @@ #include "main/mtypes.h" #include "main/enums.h" -#include "main/texformat.h" #include "intel_mipmap_tree.h" #include "intel_tex.h" diff --git a/src/mesa/drivers/dri/i915/i830_vtbl.c b/src/mesa/drivers/dri/i915/i830_vtbl.c index d53900b329..22f8bc7f19 100644 --- a/src/mesa/drivers/dri/i915/i830_vtbl.c +++ b/src/mesa/drivers/dri/i915/i830_vtbl.c @@ -26,7 +26,6 @@ **************************************************************************/ #include "glapi/glapi.h" -#include "main/texformat.h" #include "i830_context.h" #include "i830_reg.h" diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c index d6f6cfdb49..03ed8a6311 100644 --- a/src/mesa/drivers/dri/i915/i915_texstate.c +++ b/src/mesa/drivers/dri/i915/i915_texstate.c @@ -27,7 +27,6 @@ #include "main/mtypes.h" #include "main/enums.h" -#include "main/texformat.h" #include "intel_mipmap_tree.h" #include "intel_tex.h" diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c index 1c3da63da9..a4b00b06e7 100644 --- a/src/mesa/drivers/dri/i915/i915_vtbl.c +++ b/src/mesa/drivers/dri/i915/i915_vtbl.c @@ -32,7 +32,6 @@ #include "main/imports.h" #include "main/macros.h" #include "main/colormac.h" -#include "main/texformat.h" #include "tnl/t_context.h" #include "tnl/t_vertex.h" diff --git a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c index 89f47522a1..4fa3269bed 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c @@ -30,7 +30,6 @@ */ #include "main/mtypes.h" -#include "main/texformat.h" #include "main/texstore.h" #include "shader/prog_parameter.h" diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index 46df778bee..5a2ac1a651 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -29,7 +29,6 @@ * Keith Whitwell */ -#include "main/texformat.h" #include "brw_context.h" #include "brw_util.h" #include "brw_wm.h" diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 855fe7593d..ea559d2ac7 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -31,7 +31,6 @@ #include "main/mtypes.h" -#include "main/texformat.h" #include "main/texstore.h" #include "shader/prog_parameter.h" diff --git a/src/mesa/drivers/dri/intel/intel_blit.c b/src/mesa/drivers/dri/intel/intel_blit.c index 799b22cc90..0158bd309f 100644 --- a/src/mesa/drivers/dri/intel/intel_blit.c +++ b/src/mesa/drivers/dri/intel/intel_blit.c @@ -29,7 +29,6 @@ #include "main/mtypes.h" #include "main/context.h" #include "main/enums.h" -#include "main/texformat.h" #include "main/colormac.h" #include "intel_blit.h" diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c index 1be381b9ea..3b4b90f2dc 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.c +++ b/src/mesa/drivers/dri/intel/intel_fbo.c @@ -33,7 +33,6 @@ #include "main/framebuffer.h" #include "main/renderbuffer.h" #include "main/context.h" -#include "main/texformat.h" #include "main/texrender.h" #include "drivers/common/meta.h" diff --git a/src/mesa/drivers/dri/intel/intel_span.c b/src/mesa/drivers/dri/intel/intel_span.c index f754ce0cd1..5bbcce6fe4 100644 --- a/src/mesa/drivers/dri/intel/intel_span.c +++ b/src/mesa/drivers/dri/intel/intel_span.c @@ -29,7 +29,6 @@ #include "main/macros.h" #include "main/mtypes.h" #include "main/colormac.h" -#include "main/texformat.h" #include "intel_buffers.h" #include "intel_fbo.h" diff --git a/src/mesa/drivers/dri/intel/intel_tex_format.c b/src/mesa/drivers/dri/intel/intel_tex_format.c index 22c010bbd7..eca0f6d572 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_format.c +++ b/src/mesa/drivers/dri/intel/intel_tex_format.c @@ -1,7 +1,6 @@ #include "intel_context.h" #include "intel_tex.h" #include "intel_chipset.h" -#include "main/texformat.h" #include "main/enums.h" diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c index f32ff0dd05..b159010b8e 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_image.c +++ b/src/mesa/drivers/dri/intel/intel_tex_image.c @@ -7,7 +7,6 @@ #include "main/convolve.h" #include "main/context.h" #include "main/texcompress.h" -#include "main/texformat.h" #include "main/texstore.h" #include "main/texgetimage.h" #include "main/texobj.h" diff --git a/src/mesa/drivers/dri/mach64/mach64_tex.c b/src/mesa/drivers/dri/mach64/mach64_tex.c index 02433e5dd8..cce0e4d3ff 100644 --- a/src/mesa/drivers/dri/mach64/mach64_tex.c +++ b/src/mesa/drivers/dri/mach64/mach64_tex.c @@ -41,7 +41,6 @@ #include "main/simple_list.h" #include "main/enums.h" #include "main/texstore.h" -#include "main/texformat.h" #include "main/teximage.h" #include "main/texobj.h" #include "main/imports.h" diff --git a/src/mesa/drivers/dri/mach64/mach64_texmem.c b/src/mesa/drivers/dri/mach64/mach64_texmem.c index e83aeae3e1..b97e9eec25 100644 --- a/src/mesa/drivers/dri/mach64/mach64_texmem.c +++ b/src/mesa/drivers/dri/mach64/mach64_texmem.c @@ -31,6 +31,11 @@ * Jose Fonseca */ +#include "main/context.h" +#include "main/macros.h" +#include "main/simple_list.h" +#include "main/imports.h" + #include "mach64_context.h" #include "mach64_state.h" #include "mach64_ioctl.h" @@ -38,12 +43,6 @@ #include "mach64_tris.h" #include "mach64_tex.h" -#include "main/context.h" -#include "main/macros.h" -#include "main/simple_list.h" -#include "main/texformat.h" -#include "main/imports.h" - /* Destroy hardware state associated with texture `t'. */ diff --git a/src/mesa/drivers/dri/mach64/mach64_texstate.c b/src/mesa/drivers/dri/mach64/mach64_texstate.c index c333355324..df0a09a5c1 100644 --- a/src/mesa/drivers/dri/mach64/mach64_texstate.c +++ b/src/mesa/drivers/dri/mach64/mach64_texstate.c @@ -33,7 +33,6 @@ #include "main/imports.h" #include "main/context.h" #include "main/macros.h" -#include "main/texformat.h" #include "mach64_context.h" #include "mach64_ioctl.h" diff --git a/src/mesa/drivers/dri/mga/mga_texstate.c b/src/mesa/drivers/dri/mga/mga_texstate.c index d52f0fac75..54eda62a96 100644 --- a/src/mesa/drivers/dri/mga/mga_texstate.c +++ b/src/mesa/drivers/dri/mga/mga_texstate.c @@ -27,22 +27,19 @@ * Keith Whitwell */ -#include +#include "main/context.h" +#include "main/enums.h" +#include "main/macros.h" #include "main/mm.h" +#include "main/imports.h" +#include "main/simple_list.h" + #include "mgacontext.h" #include "mgatex.h" #include "mgaregs.h" #include "mgatris.h" #include "mgaioctl.h" -#include "main/context.h" -#include "main/enums.h" -#include "main/macros.h" -#include "main/imports.h" - -#include "main/simple_list.h" -#include "main/texformat.h" - #define MGA_USE_TABLE_FOR_FORMAT #ifdef MGA_USE_TABLE_FOR_FORMAT #define TMC_nr_tformat (MESA_FORMAT_YCBCR_REV + 1) diff --git a/src/mesa/drivers/dri/mga/mgatex.c b/src/mesa/drivers/dri/mga/mgatex.c index 71a8400e3b..9163371b33 100644 --- a/src/mesa/drivers/dri/mga/mgatex.c +++ b/src/mesa/drivers/dri/mga/mgatex.c @@ -27,23 +27,22 @@ #include "main/glheader.h" #include "main/mm.h" -#include "mgacontext.h" -#include "mgatex.h" -#include "mgaregs.h" -#include "mgatris.h" -#include "mgaioctl.h" - #include "main/colormac.h" #include "main/context.h" #include "main/enums.h" #include "main/simple_list.h" #include "main/imports.h" #include "main/macros.h" -#include "main/texformat.h" #include "main/texstore.h" #include "main/teximage.h" #include "main/texobj.h" +#include "mgacontext.h" +#include "mgatex.h" +#include "mgaregs.h" +#include "mgatris.h" +#include "mgaioctl.h" + #include "swrast/swrast.h" #include "xmlpool.h" diff --git a/src/mesa/drivers/dri/r128/r128_tex.c b/src/mesa/drivers/dri/r128/r128_tex.c index 6acda445f7..0a1207fb89 100644 --- a/src/mesa/drivers/dri/r128/r128_tex.c +++ b/src/mesa/drivers/dri/r128/r128_tex.c @@ -44,7 +44,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "main/simple_list.h" #include "main/enums.h" #include "main/texstore.h" -#include "main/texformat.h" #include "main/teximage.h" #include "main/texobj.h" #include "main/imports.h" diff --git a/src/mesa/drivers/dri/r128/r128_texmem.c b/src/mesa/drivers/dri/r128/r128_texmem.c index 84f8563b89..4ddcb86bcd 100644 --- a/src/mesa/drivers/dri/r128/r128_texmem.c +++ b/src/mesa/drivers/dri/r128/r128_texmem.c @@ -41,7 +41,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "main/context.h" #include "main/macros.h" #include "main/simple_list.h" -#include "main/texformat.h" #include "main/imports.h" #define TEX_0 1 diff --git a/src/mesa/drivers/dri/r128/r128_texstate.c b/src/mesa/drivers/dri/r128/r128_texstate.c index 2e71c25861..cb2b5f9536 100644 --- a/src/mesa/drivers/dri/r128/r128_texstate.c +++ b/src/mesa/drivers/dri/r128/r128_texstate.c @@ -36,7 +36,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "main/imports.h" #include "main/context.h" #include "main/macros.h" -#include "main/texformat.h" #include "r128_context.h" #include "r128_state.h" diff --git a/src/mesa/drivers/dri/r200/r200_tex.c b/src/mesa/drivers/dri/r200/r200_tex.c index 36d9e37d87..5a21a8b9c5 100644 --- a/src/mesa/drivers/dri/r200/r200_tex.c +++ b/src/mesa/drivers/dri/r200/r200_tex.c @@ -38,7 +38,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "main/enums.h" #include "main/image.h" #include "main/simple_list.h" -#include "main/texformat.h" #include "main/texstore.h" #include "main/teximage.h" #include "main/texobj.h" diff --git a/src/mesa/drivers/dri/r200/r200_texstate.c b/src/mesa/drivers/dri/r200/r200_texstate.c index 1a6fa9f548..20ec6fffaf 100644 --- a/src/mesa/drivers/dri/r200/r200_texstate.c +++ b/src/mesa/drivers/dri/r200/r200_texstate.c @@ -36,7 +36,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "main/imports.h" #include "main/context.h" #include "main/macros.h" -#include "main/texformat.h" #include "main/teximage.h" #include "main/texobj.h" #include "main/enums.h" diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index 3060f49aaf..ac20c08e20 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -45,7 +45,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "main/framebuffer.h" #include "main/simple_list.h" #include "main/api_arrayelt.h" -#include "main/texformat.h" #include "swrast/swrast.h" #include "swrast_setup/swrast_setup.h" diff --git a/src/mesa/drivers/dri/r300/r300_tex.c b/src/mesa/drivers/dri/r300/r300_tex.c index 10daeca9e6..27b78a912f 100644 --- a/src/mesa/drivers/dri/r300/r300_tex.c +++ b/src/mesa/drivers/dri/r300/r300_tex.c @@ -40,7 +40,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "main/image.h" #include "main/mipmap.h" #include "main/simple_list.h" -#include "main/texformat.h" #include "main/texstore.h" #include "main/teximage.h" #include "main/texobj.h" diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c index cb826248f3..1e9bd3e849 100644 --- a/src/mesa/drivers/dri/r300/r300_texstate.c +++ b/src/mesa/drivers/dri/r300/r300_texstate.c @@ -39,7 +39,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "main/imports.h" #include "main/context.h" #include "main/macros.h" -#include "main/texformat.h" #include "main/teximage.h" #include "main/texobj.h" #include "main/enums.h" diff --git a/src/mesa/drivers/dri/r600/r600_tex.c b/src/mesa/drivers/dri/r600/r600_tex.c index 47081c968e..20965bb3c8 100644 --- a/src/mesa/drivers/dri/r600/r600_tex.c +++ b/src/mesa/drivers/dri/r600/r600_tex.c @@ -40,7 +40,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "main/image.h" #include "main/mipmap.h" #include "main/simple_list.h" -#include "main/texformat.h" #include "main/texstore.h" #include "main/teximage.h" #include "main/texobj.h" diff --git a/src/mesa/drivers/dri/r600/r600_texstate.c b/src/mesa/drivers/dri/r600/r600_texstate.c index 55b455edc0..35186ef970 100644 --- a/src/mesa/drivers/dri/r600/r600_texstate.c +++ b/src/mesa/drivers/dri/r600/r600_texstate.c @@ -39,7 +39,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "main/imports.h" #include "main/context.h" #include "main/macros.h" -#include "main/texformat.h" #include "main/teximage.h" #include "main/texobj.h" #include "main/enums.h" diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c index fbff109455..65f83b8315 100644 --- a/src/mesa/drivers/dri/r600/r700_state.c +++ b/src/mesa/drivers/dri/r600/r700_state.c @@ -46,7 +46,6 @@ #include "shader/prog_parameter.h" #include "shader/prog_statevars.h" #include "vbo/vbo.h" -#include "main/texformat.h" #include "r600_context.h" diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c index 90ea2ec335..3f4f382d6c 100644 --- a/src/mesa/drivers/dri/radeon/radeon_fbo.c +++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c @@ -33,7 +33,6 @@ #include "main/framebuffer.h" #include "main/renderbuffer.h" #include "main/context.h" -#include "main/texformat.h" #include "main/texrender.h" #include "drivers/common/meta.h" diff --git a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c index 5429525587..86f596deb9 100644 --- a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c +++ b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c @@ -32,7 +32,6 @@ #include "main/simple_list.h" #include "main/texcompress.h" -#include "main/texformat.h" static GLuint radeon_compressed_texture_size(GLcontext *ctx, GLsizei width, GLsizei height, GLsizei depth, diff --git a/src/mesa/drivers/dri/radeon/radeon_tex.c b/src/mesa/drivers/dri/radeon/radeon_tex.c index 99865fff27..60981aada2 100644 --- a/src/mesa/drivers/dri/radeon/radeon_tex.c +++ b/src/mesa/drivers/dri/radeon/radeon_tex.c @@ -38,7 +38,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "main/enums.h" #include "main/image.h" #include "main/simple_list.h" -#include "main/texformat.h" #include "main/texstore.h" #include "main/teximage.h" #include "main/texobj.h" diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c b/src/mesa/drivers/dri/radeon/radeon_texstate.c index cb17f48bf3..c7786381ae 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texstate.c +++ b/src/mesa/drivers/dri/radeon/radeon_texstate.c @@ -38,7 +38,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "main/colormac.h" #include "main/context.h" #include "main/macros.h" -#include "main/texformat.h" #include "main/teximage.h" #include "main/texobj.h" #include "main/enums.h" diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c index 17e42e72ee..8e9276c5ae 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.c +++ b/src/mesa/drivers/dri/radeon/radeon_texture.c @@ -34,7 +34,6 @@ #include "main/convolve.h" #include "main/mipmap.h" #include "main/texcompress.h" -#include "main/texformat.h" #include "main/texstore.h" #include "main/teximage.h" #include "main/texobj.h" diff --git a/src/mesa/drivers/dri/s3v/s3v_tex.c b/src/mesa/drivers/dri/s3v/s3v_tex.c index ec1182f34f..517f5e5ca7 100644 --- a/src/mesa/drivers/dri/s3v/s3v_tex.c +++ b/src/mesa/drivers/dri/s3v/s3v_tex.c @@ -2,16 +2,12 @@ * Author: Max Lingua */ -#include -#include - #include "main/glheader.h" #include "main/mtypes.h" #include "main/simple_list.h" #include "main/enums.h" #include "main/mm.h" #include "main/texstore.h" -#include "main/texformat.h" #include "main/teximage.h" #include "swrast/swrast.h" diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c index 06179edae3..048fbe452c 100644 --- a/src/mesa/drivers/dri/savage/savage_xmesa.c +++ b/src/mesa/drivers/dri/savage/savage_xmesa.c @@ -574,7 +574,7 @@ savageDestroyContext(__DRIcontextPrivate *driContextPriv) _mesa_destroy_context(imesa->glCtx); /* no longer use vertex_dma_buf*/ - Xfree(imesa); + _mesa_free(imesa); } } diff --git a/src/mesa/drivers/dri/savage/savagetex.c b/src/mesa/drivers/dri/savage/savagetex.c index 796da4fc0d..6c97bb6c70 100644 --- a/src/mesa/drivers/dri/savage/savagetex.c +++ b/src/mesa/drivers/dri/savage/savagetex.c @@ -23,29 +23,24 @@ */ -#include -#include - -#include - +#include "main/context.h" #include "main/mm.h" -#include "savagecontext.h" -#include "savagetex.h" -#include "savagetris.h" -#include "savageioctl.h" -#include "main/simple_list.h" -#include "main/enums.h" -#include "savage_bci.h" - #include "main/macros.h" -#include "main/texformat.h" #include "main/texstore.h" #include "main/texobj.h" #include "main/convolve.h" #include "main/colormac.h" +#include "main/simple_list.h" +#include "main/enums.h" #include "swrast/swrast.h" +#include "savagecontext.h" +#include "savagetex.h" +#include "savagetris.h" +#include "savageioctl.h" +#include "savage_bci.h" + #include "xmlpool.h" #define TILE_INDEX_DXT1 0 diff --git a/src/mesa/drivers/dri/sis/sis_tex.c b/src/mesa/drivers/dri/sis/sis_tex.c index 5dc05146b1..951c470dad 100644 --- a/src/mesa/drivers/dri/sis/sis_tex.c +++ b/src/mesa/drivers/dri/sis/sis_tex.c @@ -28,17 +28,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Eric Anholt */ -#include "sis_context.h" -#include "sis_alloc.h" -#include "sis_tex.h" - #include "swrast/swrast.h" #include "main/imports.h" -#include "main/texformat.h" #include "main/texstore.h" #include "main/teximage.h" #include "main/texobj.h" +#include "sis_context.h" +#include "sis_alloc.h" +#include "sis_tex.h" #include "xmlpool.h" #define ALIGN(value, align) (GLubyte *)((long)(value + align - 1) & ~(align - 1)) diff --git a/src/mesa/drivers/dri/sis/sis_texstate.c b/src/mesa/drivers/dri/sis/sis_texstate.c index 46417ce414..a507173b21 100644 --- a/src/mesa/drivers/dri/sis/sis_texstate.c +++ b/src/mesa/drivers/dri/sis/sis_texstate.c @@ -36,7 +36,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "main/colormac.h" #include "main/context.h" #include "main/macros.h" -#include "main/texformat.h" #include "sis_context.h" #include "sis_state.h" diff --git a/src/mesa/drivers/dri/tdfx/tdfx_state.c b/src/mesa/drivers/dri/tdfx/tdfx_state.c index 591df8a905..cf2712720f 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_state.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_state.c @@ -40,7 +40,6 @@ #include "main/mtypes.h" #include "main/colormac.h" -#include "main/texformat.h" #include "main/texstore.h" #include "main/teximage.h" diff --git a/src/mesa/drivers/dri/tdfx/tdfx_tex.c b/src/mesa/drivers/dri/tdfx/tdfx_tex.c index 5e9421aa2a..0cd9051613 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_tex.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_tex.c @@ -42,7 +42,6 @@ #include "main/image.h" #include "main/mipmap.h" #include "main/texcompress.h" -#include "main/texformat.h" #include "main/teximage.h" #include "main/texstore.h" #include "main/texobj.h" diff --git a/src/mesa/drivers/dri/unichrome/via_tex.c b/src/mesa/drivers/dri/unichrome/via_tex.c index fa7542c5cb..a72dcd6be2 100644 --- a/src/mesa/drivers/dri/unichrome/via_tex.c +++ b/src/mesa/drivers/dri/unichrome/via_tex.c @@ -35,13 +35,12 @@ #include "main/convolve.h" #include "main/context.h" #include "main/mipmap.h" +#include "main/mm.h" #include "main/simple_list.h" #include "main/texcompress.h" -#include "main/texformat.h" #include "main/texobj.h" #include "main/texstore.h" -#include "main/mm.h" #include "via_context.h" #include "via_fb.h" #include "via_tex.h" -- cgit v1.2.3 From 1160acbfea986a821761d18f5f14d5d2cb0dea8c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 22 Oct 2009 19:49:21 -0600 Subject: dri/drivers: update driNewRenderbuffer() to take a gl_format Now pass a specific MESA_FORMAT_x token to indicate the renderbuffer's format. This is better than passing a GLenum and having to guess the specific format. I'm unable to test all the drivers, but any issues should be easy to fix. --- src/mesa/drivers/dri/common/drirenderbuffer.c | 61 +++++++++++++------------- src/mesa/drivers/dri/common/drirenderbuffer.h | 3 +- src/mesa/drivers/dri/fb/fb_dri.c | 4 +- src/mesa/drivers/dri/fb/fb_egl.c | 4 +- src/mesa/drivers/dri/ffb/ffb_xmesa.c | 8 ++-- src/mesa/drivers/dri/i810/i810screen.c | 6 +-- src/mesa/drivers/dri/mach64/mach64_screen.c | 8 ++-- src/mesa/drivers/dri/mach64/mach64_span.c | 14 +++--- src/mesa/drivers/dri/mga/mga_xmesa.c | 14 +++--- src/mesa/drivers/dri/mga/mgaspan.c | 20 ++++----- src/mesa/drivers/dri/r128/r128_screen.c | 10 ++--- src/mesa/drivers/dri/r128/r128_span.c | 18 ++++---- src/mesa/drivers/dri/s3v/s3v_xmesa.c | 10 ++--- src/mesa/drivers/dri/savage/savage_xmesa.c | 10 ++--- src/mesa/drivers/dri/savage/savagespan.c | 18 ++++---- src/mesa/drivers/dri/sis/sis_span.c | 20 ++++----- src/mesa/drivers/dri/tdfx/tdfx_screen.c | 10 ++--- src/mesa/drivers/dri/trident/trident_context.c | 10 ++--- src/mesa/drivers/dri/unichrome/via_screen.c | 12 ++--- src/mesa/drivers/dri/unichrome/via_span.c | 21 +++++---- 20 files changed, 136 insertions(+), 145 deletions(-) (limited to 'src/mesa/drivers/dri/savage/savage_xmesa.c') diff --git a/src/mesa/drivers/dri/common/drirenderbuffer.c b/src/mesa/drivers/dri/common/drirenderbuffer.c index 6fa1c6caa0..4e7e92c82b 100644 --- a/src/mesa/drivers/dri/common/drirenderbuffer.c +++ b/src/mesa/drivers/dri/common/drirenderbuffer.c @@ -54,7 +54,7 @@ driDeleteRenderbuffer(struct gl_renderbuffer *rb) * \param pitch pixels per row */ driRenderbuffer * -driNewRenderbuffer(GLenum format, GLvoid *addr, +driNewRenderbuffer(gl_format format, GLvoid *addr, GLint cpp, GLint offset, GLint pitch, __DRIdrawablePrivate *dPriv) { @@ -80,46 +80,47 @@ driNewRenderbuffer(GLenum format, GLvoid *addr, /* Make sure we're using a null-valued GetPointer routine */ assert(drb->Base.GetPointer(NULL, &drb->Base, 0, 0) == NULL); - drb->Base.InternalFormat = format; - - if (format == GL_RGBA || format == GL_RGB5 || format == GL_RGBA8) { - /* Color */ - drb->Base.DataType = GL_UNSIGNED_BYTE; - if (format == GL_RGB5) { - drb->Base.Format = MESA_FORMAT_RGB565; + switch (format) { + case MESA_FORMAT_ARGB8888: + if (cpp == 2) { + /* override format */ + format = MESA_FORMAT_RGB565; } - else { - drb->Base.Format = MESA_FORMAT_ARGB8888; - } - } - else if (format == GL_DEPTH_COMPONENT16) { - /* Depth */ - /* we always Get/Put 32-bit Z values */ - drb->Base.DataType = GL_UNSIGNED_INT; - drb->Base.Format = MESA_FORMAT_Z16; - } - else if (format == GL_DEPTH_COMPONENT24) { + drb->Base.DataType = GL_UNSIGNED_BYTE; + break; + case MESA_FORMAT_Z16: /* Depth */ /* we always Get/Put 32-bit Z values */ drb->Base.DataType = GL_UNSIGNED_INT; - drb->Base.Format = MESA_FORMAT_Z32; - } - else if (format == GL_DEPTH_COMPONENT32) { + assert(cpp == 2); + break; + case MESA_FORMAT_Z32: /* Depth */ /* we always Get/Put 32-bit Z values */ drb->Base.DataType = GL_UNSIGNED_INT; - drb->Base.Format = MESA_FORMAT_Z32; - } - else { + assert(cpp == 4); + break; + case MESA_FORMAT_Z24_S8: + drb->Base.DataType = GL_UNSIGNED_INT_24_8_EXT; + assert(cpp == 4); + break; + case MESA_FORMAT_S8_Z24: + drb->Base.DataType = GL_UNSIGNED_INT_24_8_EXT; + assert(cpp == 4); + break; + case MESA_FORMAT_S8: /* Stencil */ - ASSERT(format == GL_STENCIL_INDEX8_EXT); drb->Base.DataType = GL_UNSIGNED_BYTE; - drb->Base.Format = MESA_FORMAT_S8; + break; + default: + _mesa_problem(NULL, "Bad format 0x%x in driNewRenderbuffer", format); + return NULL; } - /* XXX if we were allocating a user-created renderbuffer, we'd have - * to fill in the Red/Green/Blue/.../Bits values too. - */ + drb->Base.Format = format; + + drb->Base.InternalFormat = + drb->Base._BaseFormat = _mesa_get_format_base_format(format); drb->Base.AllocStorage = driRenderbufferStorage; drb->Base.Delete = driDeleteRenderbuffer; diff --git a/src/mesa/drivers/dri/common/drirenderbuffer.h b/src/mesa/drivers/dri/common/drirenderbuffer.h index cf55286b30..9712c0017b 100644 --- a/src/mesa/drivers/dri/common/drirenderbuffer.h +++ b/src/mesa/drivers/dri/common/drirenderbuffer.h @@ -11,6 +11,7 @@ #define DRIRENDERBUFFER_H #include "main/mtypes.h" +#include "main/formats.h" #include "dri_util.h" @@ -63,7 +64,7 @@ typedef struct { extern driRenderbuffer * -driNewRenderbuffer(GLenum format, GLvoid *addr, +driNewRenderbuffer(gl_format format, GLvoid *addr, GLint cpp, GLint offset, GLint pitch, __DRIdrawablePrivate *dPriv); diff --git a/src/mesa/drivers/dri/fb/fb_dri.c b/src/mesa/drivers/dri/fb/fb_dri.c index 571b8922d5..fd869b2fe7 100644 --- a/src/mesa/drivers/dri/fb/fb_dri.c +++ b/src/mesa/drivers/dri/fb/fb_dri.c @@ -437,7 +437,7 @@ fbCreateBuffer( __DRIscreenPrivate *driScrnPriv, /* XXX double-check these parameters (bpp vs cpp, etc) */ { - driRenderbuffer *drb = driNewRenderbuffer(GL_RGBA, + driRenderbuffer *drb = driNewRenderbuffer(MESA_FORMAT_ARGB8888, driScrnPriv->pFB, driScrnPriv->fbBPP / 8, driScrnPriv->fbOrigin, @@ -451,7 +451,7 @@ fbCreateBuffer( __DRIscreenPrivate *driScrnPriv, /* XXX what are the correct origin/stride values? */ GLvoid *backBuf = _mesa_malloc(driScrnPriv->fbStride * driScrnPriv->fbHeight); - driRenderbuffer *drb = driNewRenderbuffer(GL_RGBA, + driRenderbuffer *drb = driNewRenderbuffer(MESA_FORMAT_ARGB8888, backBuf, driScrnPriv->fbBPP /8, driScrnPriv->fbOrigin, diff --git a/src/mesa/drivers/dri/fb/fb_egl.c b/src/mesa/drivers/dri/fb/fb_egl.c index 4e41860d8c..eb7adf8224 100644 --- a/src/mesa/drivers/dri/fb/fb_egl.c +++ b/src/mesa/drivers/dri/fb/fb_egl.c @@ -692,7 +692,7 @@ fbCreateScreenSurfaceMESA(_EGLDriver *drv, EGLDisplay dpy, EGLConfig cfg, /* front color renderbuffer */ { - driRenderbuffer *drb = driNewRenderbuffer(GL_RGBA, display->pFB, + driRenderbuffer *drb = driNewRenderbuffer(MESA_FORMAT_ARGB8888, display->pFB, bytesPerPixel, origin, stride, NULL); fbSetSpanFunctions(drb, &vis); @@ -703,7 +703,7 @@ fbCreateScreenSurfaceMESA(_EGLDriver *drv, EGLDisplay dpy, EGLConfig cfg, /* back color renderbuffer */ if (vis.doubleBufferMode) { GLubyte *backBuf = _mesa_malloc(stride * height); - driRenderbuffer *drb = driNewRenderbuffer(GL_RGBA, backBuf, + driRenderbuffer *drb = driNewRenderbuffer(MESA_FORMAT_ARGB8888, backBuf, bytesPerPixel, origin, stride, NULL); fbSetSpanFunctions(drb, &vis); diff --git a/src/mesa/drivers/dri/ffb/ffb_xmesa.c b/src/mesa/drivers/dri/ffb/ffb_xmesa.c index 3b9f5c6759..09cc26d09e 100644 --- a/src/mesa/drivers/dri/ffb/ffb_xmesa.c +++ b/src/mesa/drivers/dri/ffb/ffb_xmesa.c @@ -347,7 +347,7 @@ ffbCreateBuffer(__DRIscreenPrivate *driScrnPriv, { driRenderbuffer *frontRb - = driNewRenderbuffer(GL_RGBA, NULL, bpp, offset, bogusPitch, + = driNewRenderbuffer(MESA_FORMAT_ARGB8888, NULL, bpp, offset, bogusPitch, driDrawPriv); ffbSetSpanFunctions(frontRb, mesaVis); _mesa_add_renderbuffer(fb, BUFFER_FRONT_LEFT, &frontRb->Base); @@ -355,7 +355,7 @@ ffbCreateBuffer(__DRIscreenPrivate *driScrnPriv, if (mesaVis->doubleBufferMode) { driRenderbuffer *backRb - = driNewRenderbuffer(GL_RGBA, NULL, bpp, offset, bogusPitch, + = driNewRenderbuffer(MESA_FORMAT_ARGB8888, NULL, bpp, offset, bogusPitch, driDrawPriv); ffbSetSpanFunctions(backRb, mesaVis); _mesa_add_renderbuffer(fb, BUFFER_BACK_LEFT, &backRb->Base); @@ -363,7 +363,7 @@ ffbCreateBuffer(__DRIscreenPrivate *driScrnPriv, if (mesaVis->depthBits == 16) { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT16, NULL, bpp, offset, + = driNewRenderbuffer(MESA_FORMAT_Z16, NULL, bpp, offset, bogusPitch, driDrawPriv); ffbSetDepthFunctions(depthRb, mesaVis); _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &depthRb->Base); @@ -371,7 +371,7 @@ ffbCreateBuffer(__DRIscreenPrivate *driScrnPriv, if (mesaVis->stencilBits > 0 && !swStencil) { driRenderbuffer *stencilRb - = driNewRenderbuffer(GL_STENCIL_INDEX8_EXT, NULL, bpp, offset, + = driNewRenderbuffer(MESA_FORMAT_S8, NULL, bpp, offset, bogusPitch, driDrawPriv); ffbSetStencilFunctions(stencilRb, mesaVis); _mesa_add_renderbuffer(fb, BUFFER_STENCIL, &stencilRb->Base); diff --git a/src/mesa/drivers/dri/i810/i810screen.c b/src/mesa/drivers/dri/i810/i810screen.c index 6e49f3466c..b0256abbfb 100644 --- a/src/mesa/drivers/dri/i810/i810screen.c +++ b/src/mesa/drivers/dri/i810/i810screen.c @@ -293,7 +293,7 @@ i810CreateBuffer( __DRIscreenPrivate *driScrnPriv, { driRenderbuffer *frontRb - = driNewRenderbuffer(GL_RGBA, + = driNewRenderbuffer(MESA_FORMAT_ARGB8888, driScrnPriv->pFB, screen->cpp, /*screen->frontOffset*/0, screen->backPitch, @@ -304,7 +304,7 @@ i810CreateBuffer( __DRIscreenPrivate *driScrnPriv, if (mesaVis->doubleBufferMode) { driRenderbuffer *backRb - = driNewRenderbuffer(GL_RGBA, + = driNewRenderbuffer(MESA_FORMAT_ARGB8888, screen->back.map, screen->cpp, screen->backOffset, screen->backPitch, @@ -315,7 +315,7 @@ i810CreateBuffer( __DRIscreenPrivate *driScrnPriv, if (mesaVis->depthBits == 16) { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT16, + = driNewRenderbuffer(MESA_FORMAT_Z16, screen->depth.map, screen->cpp, screen->depthOffset, screen->backPitch, diff --git a/src/mesa/drivers/dri/mach64/mach64_screen.c b/src/mesa/drivers/dri/mach64/mach64_screen.c index 6440027ca4..a7222ec960 100644 --- a/src/mesa/drivers/dri/mach64/mach64_screen.c +++ b/src/mesa/drivers/dri/mach64/mach64_screen.c @@ -316,7 +316,7 @@ mach64CreateBuffer( __DRIscreenPrivate *driScrnPriv, { driRenderbuffer *frontRb - = driNewRenderbuffer(GL_RGBA, + = driNewRenderbuffer(MESA_FORMAT_ARGB8888, NULL, screen->cpp, screen->frontOffset, screen->frontPitch, @@ -327,7 +327,7 @@ mach64CreateBuffer( __DRIscreenPrivate *driScrnPriv, if (mesaVis->doubleBufferMode) { driRenderbuffer *backRb - = driNewRenderbuffer(GL_RGBA, + = driNewRenderbuffer(MESA_FORMAT_ARGB8888, NULL, screen->cpp, screen->backOffset, screen->backPitch, @@ -338,7 +338,7 @@ mach64CreateBuffer( __DRIscreenPrivate *driScrnPriv, if (mesaVis->depthBits == 16) { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT16, + = driNewRenderbuffer(MESA_FORMAT_Z16, NULL, screen->cpp, screen->depthOffset, screen->depthPitch, driDrawPriv); @@ -348,7 +348,7 @@ mach64CreateBuffer( __DRIscreenPrivate *driScrnPriv, else if (mesaVis->depthBits == 24) { /* XXX I don't think 24-bit Z is supported - so this isn't used */ driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT24, + = driNewRenderbuffer(MESA_FORMAT_Z24_S8, NULL, screen->cpp, screen->depthOffset, screen->depthPitch, diff --git a/src/mesa/drivers/dri/mach64/mach64_span.c b/src/mesa/drivers/dri/mach64/mach64_span.c index 91d46ce32e..500319e0e3 100644 --- a/src/mesa/drivers/dri/mach64/mach64_span.c +++ b/src/mesa/drivers/dri/mach64/mach64_span.c @@ -157,15 +157,13 @@ void mach64DDInitSpanFuncs( GLcontext *ctx ) void mach64SetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis) { - if (drb->Base.InternalFormat == GL_RGBA) { - if (vis->redBits == 5 && vis->greenBits == 6 && vis->blueBits == 5) { - mach64InitPointers_RGB565(&drb->Base); - } - else { - mach64InitPointers_ARGB8888(&drb->Base); - } + if (drb->Base.Format == MESA_FORMAT_RGB565) { + mach64InitPointers_RGB565(&drb->Base); } - else if (drb->Base.InternalFormat == GL_DEPTH_COMPONENT16) { + else if (drb->Base.Format == MESA_FORMAT_ARGB8888) { + mach64InitPointers_ARGB8888(&drb->Base); + } + else if (drb->Base.Format == MESA_FORMAT_Z16) { mach64InitDepthPointers_z16(&drb->Base); } } diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.c b/src/mesa/drivers/dri/mga/mga_xmesa.c index 0dc76fea50..4ca71ca505 100644 --- a/src/mesa/drivers/dri/mga/mga_xmesa.c +++ b/src/mesa/drivers/dri/mga/mga_xmesa.c @@ -723,7 +723,7 @@ mgaCreateBuffer( __DRIscreenPrivate *driScrnPriv, { driRenderbuffer *frontRb - = driNewRenderbuffer(GL_RGBA, + = driNewRenderbuffer(MESA_FORMAT_ARGB8888, NULL, screen->cpp, screen->frontOffset, screen->frontPitch, @@ -734,7 +734,7 @@ mgaCreateBuffer( __DRIscreenPrivate *driScrnPriv, if (mesaVis->doubleBufferMode) { driRenderbuffer *backRb - = driNewRenderbuffer(GL_RGBA, + = driNewRenderbuffer(MESA_FORMAT_ARGB8888, NULL, screen->cpp, screen->backOffset, screen->backPitch, @@ -745,7 +745,7 @@ mgaCreateBuffer( __DRIscreenPrivate *driScrnPriv, if (mesaVis->depthBits == 16) { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT16, + = driNewRenderbuffer(MESA_FORMAT_Z16, NULL, screen->cpp, screen->depthOffset, screen->depthPitch, @@ -757,7 +757,7 @@ mgaCreateBuffer( __DRIscreenPrivate *driScrnPriv, /* XXX is this right? */ if (mesaVis->stencilBits) { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT24, + = driNewRenderbuffer(MESA_FORMAT_Z24_S8, NULL, screen->cpp, screen->depthOffset, screen->depthPitch, @@ -767,7 +767,7 @@ mgaCreateBuffer( __DRIscreenPrivate *driScrnPriv, } else { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT32, + = driNewRenderbuffer(MESA_FORMAT_Z32, NULL, screen->cpp, screen->depthOffset, screen->depthPitch, @@ -778,7 +778,7 @@ mgaCreateBuffer( __DRIscreenPrivate *driScrnPriv, } else if (mesaVis->depthBits == 32) { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT32, + = driNewRenderbuffer(MESA_FORMAT_Z32, NULL, screen->cpp, screen->depthOffset, screen->depthPitch, @@ -789,7 +789,7 @@ mgaCreateBuffer( __DRIscreenPrivate *driScrnPriv, if (mesaVis->stencilBits > 0 && !swStencil) { driRenderbuffer *stencilRb - = driNewRenderbuffer(GL_STENCIL_INDEX8_EXT, + = driNewRenderbuffer(MESA_FORMAT_S8, NULL, screen->cpp, screen->depthOffset, screen->depthPitch, diff --git a/src/mesa/drivers/dri/mga/mgaspan.c b/src/mesa/drivers/dri/mga/mgaspan.c index 5b6d323ca9..2ff1cac8e2 100644 --- a/src/mesa/drivers/dri/mga/mgaspan.c +++ b/src/mesa/drivers/dri/mga/mgaspan.c @@ -206,24 +206,22 @@ void mgaDDInitSpanFuncs( GLcontext *ctx ) void mgaSetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis) { - if (drb->Base.InternalFormat == GL_RGBA) { - if (vis->redBits == 5 && vis->greenBits == 6 && vis->blueBits == 5) { - mgaInitPointers_565(&drb->Base); - } - else { - mgaInitPointers_8888(&drb->Base); - } + if (drb->Base.Format == MESA_FORMAT_RGB565) { + mgaInitPointers_565(&drb->Base); } - else if (drb->Base.InternalFormat == GL_DEPTH_COMPONENT16) { + else if (drb->Base.Format == MESA_FORMAT_ARGB8888) { + mgaInitPointers_8888(&drb->Base); + } + else if (drb->Base.Format == MESA_FORMAT_Z16) { mgaInitDepthPointers_z16(&drb->Base); } - else if (drb->Base.InternalFormat == GL_DEPTH_COMPONENT24) { + else if (drb->Base.Format == MESA_FORMAT_Z24_S8) { mgaInitDepthPointers_z24_s8(&drb->Base); } - else if (drb->Base.InternalFormat == GL_DEPTH_COMPONENT32) { + else if (drb->Base.Format == MESA_FORMAT_Z32) { mgaInitDepthPointers_z32(&drb->Base); } - else if (drb->Base.InternalFormat == GL_STENCIL_INDEX8_EXT) { + else if (drb->Base.Format == MESA_FORMAT_S8) { mgaInitStencilPointers_z24_s8(&drb->Base); } } diff --git a/src/mesa/drivers/dri/r128/r128_screen.c b/src/mesa/drivers/dri/r128/r128_screen.c index f5bcc2f290..652dad51f2 100644 --- a/src/mesa/drivers/dri/r128/r128_screen.c +++ b/src/mesa/drivers/dri/r128/r128_screen.c @@ -284,7 +284,7 @@ r128CreateBuffer( __DRIscreenPrivate *driScrnPriv, { driRenderbuffer *frontRb - = driNewRenderbuffer(GL_RGBA, + = driNewRenderbuffer(MESA_FORMAT_ARGB8888, NULL, screen->cpp, screen->frontOffset, screen->frontPitch, @@ -295,7 +295,7 @@ r128CreateBuffer( __DRIscreenPrivate *driScrnPriv, if (mesaVis->doubleBufferMode) { driRenderbuffer *backRb - = driNewRenderbuffer(GL_RGBA, + = driNewRenderbuffer(MESA_FORMAT_ARGB8888, NULL, screen->cpp, screen->backOffset, screen->backPitch, @@ -306,7 +306,7 @@ r128CreateBuffer( __DRIscreenPrivate *driScrnPriv, if (mesaVis->depthBits == 16) { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT16, + = driNewRenderbuffer(MESA_FORMAT_Z16, NULL, screen->cpp, screen->depthOffset, screen->depthPitch, @@ -316,7 +316,7 @@ r128CreateBuffer( __DRIscreenPrivate *driScrnPriv, } else if (mesaVis->depthBits == 24) { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT24, + = driNewRenderbuffer(MESA_FORMAT_S8_Z24, NULL, screen->cpp, screen->depthOffset, screen->depthPitch, @@ -327,7 +327,7 @@ r128CreateBuffer( __DRIscreenPrivate *driScrnPriv, if (mesaVis->stencilBits > 0 && !swStencil) { driRenderbuffer *stencilRb - = driNewRenderbuffer(GL_STENCIL_INDEX8_EXT, + = driNewRenderbuffer(MESA_FORMAT_S8, NULL, screen->cpp, screen->depthOffset, screen->depthPitch, diff --git a/src/mesa/drivers/dri/r128/r128_span.c b/src/mesa/drivers/dri/r128/r128_span.c index dd177e0def..d238cc3c94 100644 --- a/src/mesa/drivers/dri/r128/r128_span.c +++ b/src/mesa/drivers/dri/r128/r128_span.c @@ -433,21 +433,19 @@ void r128DDInitSpanFuncs( GLcontext *ctx ) void r128SetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis) { - if (drb->Base.InternalFormat == GL_RGBA) { - if (vis->redBits == 5 && vis->greenBits == 6 && vis->blueBits == 5) { - r128InitPointers_RGB565(&drb->Base); - } - else { - r128InitPointers_ARGB8888(&drb->Base); - } + if (drb->Base.Format == MESA_FORMAT_RGB565) { + r128InitPointers_RGB565(&drb->Base); } - else if (drb->Base.InternalFormat == GL_DEPTH_COMPONENT16) { + else if (drb->Base.Format == MESA_FORMAT_ARGB8888) { + r128InitPointers_ARGB8888(&drb->Base); + } + else if (drb->Base.Format == MESA_FORMAT_Z16) { r128InitDepthPointers_z16(&drb->Base); } - else if (drb->Base.InternalFormat == GL_DEPTH_COMPONENT24) { + else if (drb->Base.Format == MESA_FORMAT_S8_Z24) { r128InitDepthPointers_z24_s8(&drb->Base); } - else if (drb->Base.InternalFormat == GL_STENCIL_INDEX8_EXT) { + else if (drb->Base.Format == MESA_FORMAT_S8) { radeonInitStencilPointers_z24_s8(&drb->Base); } } diff --git a/src/mesa/drivers/dri/s3v/s3v_xmesa.c b/src/mesa/drivers/dri/s3v/s3v_xmesa.c index 85f1481769..f1e123d676 100644 --- a/src/mesa/drivers/dri/s3v/s3v_xmesa.c +++ b/src/mesa/drivers/dri/s3v/s3v_xmesa.c @@ -70,7 +70,7 @@ s3vCreateBuffer( __DRIscreenPrivate *driScrnPriv, { driRenderbuffer *frontRb - = driNewRenderbuffer(GL_RGBA, NULL, screen->cpp, + = driNewRenderbuffer(MESA_FORMAT_ARGB8888, NULL, screen->cpp, screen->frontOffset, screen->frontPitch, driDrawPriv); s3vSetSpanFunctions(frontRb, mesaVis); @@ -79,7 +79,7 @@ s3vCreateBuffer( __DRIscreenPrivate *driScrnPriv, if (mesaVis->doubleBufferMode) { driRenderbuffer *backRb - = driNewRenderbuffer(GL_RGBA, NULL, screen->cpp, + = driNewRenderbuffer(MESA_FORMAT_ARGB8888, NULL, screen->cpp, screen->backOffset, screen->backPitch, driDrawPriv); s3vSetSpanFunctions(backRb, mesaVis); @@ -89,7 +89,7 @@ s3vCreateBuffer( __DRIscreenPrivate *driScrnPriv, if (mesaVis->depthBits == 16) { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT16, NULL, screen->cpp, + = driNewRenderbuffer(MESA_FORMAT_Z16, NULL, screen->cpp, screen->depthOffset, screen->depthPitch, driDrawPriv); s3vSetSpanFunctions(depthRb, mesaVis); @@ -97,7 +97,7 @@ s3vCreateBuffer( __DRIscreenPrivate *driScrnPriv, } else if (mesaVis->depthBits == 24) { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT24, NULL, screen->cpp, + = driNewRenderbuffer(MESA_FORMAT_Z24_S8, NULL, screen->cpp, screen->depthOffset, screen->depthPitch, driDrawPriv); s3vSetSpanFunctions(depthRb, mesaVis); @@ -107,7 +107,7 @@ s3vCreateBuffer( __DRIscreenPrivate *driScrnPriv, /* no h/w stencil yet? if (mesaVis->stencilBits > 0) { driRenderbuffer *stencilRb - = driNewRenderbuffer(GL_STENCIL_INDEX8_EXT, NULL, + = driNewRenderbuffer(MESA_FORMAT_S8, NULL, screen->cpp, screen->depthOffset, screen->depthPitch, driDrawPriv); s3vSetSpanFunctions(stencilRb, mesaVis); diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c index 048fbe452c..9eea728319 100644 --- a/src/mesa/drivers/dri/savage/savage_xmesa.c +++ b/src/mesa/drivers/dri/savage/savage_xmesa.c @@ -602,7 +602,7 @@ savageCreateBuffer( __DRIscreenPrivate *driScrnPriv, { driRenderbuffer *frontRb - = driNewRenderbuffer(GL_RGBA, + = driNewRenderbuffer(MESA_FORMAT_ARGB8888, (GLubyte *) screen->aperture.map + 0x01000000 * TARGET_FRONT, screen->cpp, @@ -615,7 +615,7 @@ savageCreateBuffer( __DRIscreenPrivate *driScrnPriv, if (mesaVis->doubleBufferMode) { driRenderbuffer *backRb - = driNewRenderbuffer(GL_RGBA, + = driNewRenderbuffer(MESA_FORMAT_ARGB8888, (GLubyte *) screen->aperture.map + 0x01000000 * TARGET_BACK, screen->cpp, @@ -628,7 +628,7 @@ savageCreateBuffer( __DRIscreenPrivate *driScrnPriv, if (mesaVis->depthBits == 16) { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT16, + = driNewRenderbuffer(MESA_FORMAT_Z16, (GLubyte *) screen->aperture.map + 0x01000000 * TARGET_DEPTH, screen->zpp, @@ -639,7 +639,7 @@ savageCreateBuffer( __DRIscreenPrivate *driScrnPriv, } else if (mesaVis->depthBits == 24) { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT24, + = driNewRenderbuffer(MESA_FORMAT_S8_Z24, (GLubyte *) screen->aperture.map + 0x01000000 * TARGET_DEPTH, screen->zpp, @@ -651,7 +651,7 @@ savageCreateBuffer( __DRIscreenPrivate *driScrnPriv, if (mesaVis->stencilBits > 0 && !swStencil) { driRenderbuffer *stencilRb - = driNewRenderbuffer(GL_STENCIL_INDEX8_EXT, + = driNewRenderbuffer(MESA_FORMAT_S8, (GLubyte *) screen->aperture.map + 0x01000000 * TARGET_DEPTH, screen->zpp, diff --git a/src/mesa/drivers/dri/savage/savagespan.c b/src/mesa/drivers/dri/savage/savagespan.c index 9615e34013..3bb6fbcc63 100644 --- a/src/mesa/drivers/dri/savage/savagespan.c +++ b/src/mesa/drivers/dri/savage/savagespan.c @@ -255,15 +255,13 @@ void savageSetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis, GLboolean float_depth) { - if (drb->Base.InternalFormat == GL_RGBA) { - if (vis->redBits == 5 && vis->greenBits == 6 && vis->blueBits == 5) { - savageInitPointers_565(&drb->Base); - } - else { - savageInitPointers_8888(&drb->Base); - } + if (drb->Base.Format == MESA_FORMAT_RGB565) { + savageInitPointers_565(&drb->Base); + } + else if (drb->Base.Format == MESA_FORMAT_ARGB8888) { + savageInitPointers_8888(&drb->Base); } - else if (drb->Base.InternalFormat == GL_DEPTH_COMPONENT16) { + else if (drb->Base.Format == MESA_FORMAT_Z16) { if (float_depth) { savageInitDepthPointers_z16f(&drb->Base); } @@ -271,7 +269,7 @@ savageSetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis, savageInitDepthPointers_z16(&drb->Base); } } - else if (drb->Base.InternalFormat == GL_DEPTH_COMPONENT24) { + else if (drb->Base.Format == MESA_FORMAT_S8_Z24) { if (float_depth) { savageInitDepthPointers_s8_z24f(&drb->Base); } @@ -279,7 +277,7 @@ savageSetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis, savageInitDepthPointers_s8_z24(&drb->Base); } } - else if (drb->Base.InternalFormat == GL_STENCIL_INDEX8_EXT) { + else if (drb->Base.Format == MESA_FORMAT_S8) { savageInitStencilPointers_s8_z24(&drb->Base); } } diff --git a/src/mesa/drivers/dri/sis/sis_span.c b/src/mesa/drivers/dri/sis/sis_span.c index 9e9a509755..cfbb51007d 100644 --- a/src/mesa/drivers/dri/sis/sis_span.c +++ b/src/mesa/drivers/dri/sis/sis_span.c @@ -176,24 +176,22 @@ sisDDInitSpanFuncs( GLcontext *ctx ) void sisSetSpanFunctions(struct sis_renderbuffer *srb, const GLvisual *vis) { - if (srb->Base.InternalFormat == GL_RGBA) { - if (vis->redBits == 5 && vis->greenBits == 6 && vis->blueBits == 5) { - sisInitPointers_RGB565( &srb->Base ); - } - else { - sisInitPointers_ARGB8888( &srb->Base ); - } + if (srb->Base.Format == MESA_FORMAT_RGB565) { + sisInitPointers_RGB565( &srb->Base ); } - else if (srb->Base.InternalFormat == GL_DEPTH_COMPONENT16) { + else if (srb->Base.Format == MESA_FORMAT_ARGB8888) { + sisInitPointers_ARGB8888( &srb->Base ); + } + else if (srb->Base.Format == MESA_FORMAT_Z16) { sisInitDepthPointers_z16(&srb->Base); } - else if (srb->Base.InternalFormat == GL_DEPTH_COMPONENT24) { + else if (srb->Base.Format == MESA_FORMAT_S8_Z24) { sisInitDepthPointers_z24_s8(&srb->Base); } - else if (srb->Base.InternalFormat == GL_DEPTH_COMPONENT32) { + else if (srb->Base.Format == MESA_FORMAT_Z32) { sisInitDepthPointers_z32(&srb->Base); } - else if (srb->Base.InternalFormat == GL_STENCIL_INDEX8_EXT) { + else if (srb->Base.Format == MESA_FORMAT_S8) { sisInitStencilPointers_z24_s8(&srb->Base); } } diff --git a/src/mesa/drivers/dri/tdfx/tdfx_screen.c b/src/mesa/drivers/dri/tdfx/tdfx_screen.c index 58bd48b294..c29694679d 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_screen.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.c @@ -173,7 +173,7 @@ tdfxCreateBuffer( __DRIscreenPrivate *driScrnPriv, { driRenderbuffer *frontRb - = driNewRenderbuffer(GL_RGBA, NULL, screen->cpp, + = driNewRenderbuffer(MESA_FORMAT_ARGB8888, NULL, screen->cpp, screen->fbOffset, screen->width, driDrawPriv); tdfxSetSpanFunctions(frontRb, mesaVis); _mesa_add_renderbuffer(fb, BUFFER_FRONT_LEFT, &frontRb->Base); @@ -181,7 +181,7 @@ tdfxCreateBuffer( __DRIscreenPrivate *driScrnPriv, if (mesaVis->doubleBufferMode) { driRenderbuffer *backRb - = driNewRenderbuffer(GL_RGBA, NULL, screen->cpp, + = driNewRenderbuffer(MESA_FORMAT_ARGB8888, NULL, screen->cpp, screen->backOffset, screen->width, driDrawPriv); tdfxSetSpanFunctions(backRb, mesaVis); @@ -191,7 +191,7 @@ tdfxCreateBuffer( __DRIscreenPrivate *driScrnPriv, if (mesaVis->depthBits == 16) { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT16, NULL, screen->cpp, + = driNewRenderbuffer(MESA_FORMAT_Z16, NULL, screen->cpp, screen->depthOffset, screen->width, driDrawPriv); tdfxSetSpanFunctions(depthRb, mesaVis); @@ -199,7 +199,7 @@ tdfxCreateBuffer( __DRIscreenPrivate *driScrnPriv, } else if (mesaVis->depthBits == 24) { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT24, NULL, screen->cpp, + = driNewRenderbuffer(MESA_FORMAT_Z24_S8, NULL, screen->cpp, screen->depthOffset, screen->width, driDrawPriv); tdfxSetSpanFunctions(depthRb, mesaVis); @@ -208,7 +208,7 @@ tdfxCreateBuffer( __DRIscreenPrivate *driScrnPriv, if (mesaVis->stencilBits > 0) { driRenderbuffer *stencilRb - = driNewRenderbuffer(GL_STENCIL_INDEX8_EXT, NULL, screen->cpp, + = driNewRenderbuffer(MESA_FORMAT_S8, NULL, screen->cpp, screen->depthOffset, screen->width, driDrawPriv); tdfxSetSpanFunctions(stencilRb, mesaVis); diff --git a/src/mesa/drivers/dri/trident/trident_context.c b/src/mesa/drivers/dri/trident/trident_context.c index b5126b07ea..b693a95ece 100644 --- a/src/mesa/drivers/dri/trident/trident_context.c +++ b/src/mesa/drivers/dri/trident/trident_context.c @@ -215,7 +215,7 @@ tridentCreateBuffer( __DRIscreenPrivate *driScrnPriv, { driRenderbuffer *frontRb - = driNewRenderbuffer(GL_RGBA, NULL, screen->cpp, + = driNewRenderbuffer(MESA_FORMAT_ARGB8888, NULL, screen->cpp, screen->frontOffset, screen->frontPitch, driDrawPriv); /* @@ -226,7 +226,7 @@ tridentCreateBuffer( __DRIscreenPrivate *driScrnPriv, if (mesaVis->doubleBufferMode) { driRenderbuffer *backRb - = driNewRenderbuffer(GL_RGBA, NULL, screen->cpp, + = driNewRenderbuffer(MESA_FORMAT_ARGB8888, NULL, screen->cpp, screen->backOffset, screen->backPitch, driDrawPriv); /* @@ -237,7 +237,7 @@ tridentCreateBuffer( __DRIscreenPrivate *driScrnPriv, if (mesaVis->depthBits == 16) { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT16, NULL, screen->cpp, + = driNewRenderbuffer(MESA_FORMAT_Z16, NULL, screen->cpp, screen->depthOffset, screen->depthPitch, driDrawPriv); /* @@ -247,7 +247,7 @@ tridentCreateBuffer( __DRIscreenPrivate *driScrnPriv, } else if (mesaVis->depthBits == 24) { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT24, NULL, screen->cpp, + = driNewRenderbuffer(MESA_FORMAT_Z24_S8, NULL, screen->cpp, screen->depthOffset, screen->depthPitch, driDrawPriv); /* @@ -259,7 +259,7 @@ tridentCreateBuffer( __DRIscreenPrivate *driScrnPriv, /* no h/w stencil? if (mesaVis->stencilBits > 0 && !swStencil) { driRenderbuffer *stencilRb - = driNewRenderbuffer(GL_STENCIL_INDEX8_EXT); + = driNewRenderbuffer(MESA_FORMAT_S8); tridentSetSpanFunctions(stencilRb, mesaVis); _mesa_add_renderbuffer(fb, BUFFER_STENCIL, &stencilRb->Base); } diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c index 3dbb570571..5b5477d8e0 100644 --- a/src/mesa/drivers/dri/unichrome/via_screen.c +++ b/src/mesa/drivers/dri/unichrome/via_screen.c @@ -248,7 +248,7 @@ viaCreateBuffer(__DRIscreenPrivate *driScrnPriv, /* XXX check/fix the offset/pitch parameters! */ { driRenderbuffer *frontRb - = driNewRenderbuffer(GL_RGBA, NULL, + = driNewRenderbuffer(MESA_FORMAT_ARGB8888, NULL, screen->bytesPerPixel, 0, screen->width, driDrawPriv); viaSetSpanFunctions(frontRb, mesaVis); @@ -257,7 +257,7 @@ viaCreateBuffer(__DRIscreenPrivate *driScrnPriv, if (mesaVis->doubleBufferMode) { driRenderbuffer *backRb - = driNewRenderbuffer(GL_RGBA, NULL, + = driNewRenderbuffer(MESA_FORMAT_ARGB8888, NULL, screen->bytesPerPixel, 0, screen->width, driDrawPriv); viaSetSpanFunctions(backRb, mesaVis); @@ -266,7 +266,7 @@ viaCreateBuffer(__DRIscreenPrivate *driScrnPriv, if (mesaVis->depthBits == 16) { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT16, NULL, + = driNewRenderbuffer(MESA_FORMAT_Z16, NULL, screen->bytesPerPixel, 0, screen->width, driDrawPriv); viaSetSpanFunctions(depthRb, mesaVis); @@ -274,7 +274,7 @@ viaCreateBuffer(__DRIscreenPrivate *driScrnPriv, } else if (mesaVis->depthBits == 24) { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT24, NULL, + = driNewRenderbuffer(MESA_FORMAT_Z24_S8, NULL, screen->bytesPerPixel, 0, screen->width, driDrawPriv); viaSetSpanFunctions(depthRb, mesaVis); @@ -282,7 +282,7 @@ viaCreateBuffer(__DRIscreenPrivate *driScrnPriv, } else if (mesaVis->depthBits == 32) { driRenderbuffer *depthRb - = driNewRenderbuffer(GL_DEPTH_COMPONENT32, NULL, + = driNewRenderbuffer(MESA_FORMAT_Z32, NULL, screen->bytesPerPixel, 0, screen->width, driDrawPriv); viaSetSpanFunctions(depthRb, mesaVis); @@ -291,7 +291,7 @@ viaCreateBuffer(__DRIscreenPrivate *driScrnPriv, if (mesaVis->stencilBits > 0 && !swStencil) { driRenderbuffer *stencilRb - = driNewRenderbuffer(GL_STENCIL_INDEX8_EXT, NULL, + = driNewRenderbuffer(MESA_FORMAT_S8, NULL, screen->bytesPerPixel, 0, screen->width, driDrawPriv); viaSetSpanFunctions(stencilRb, mesaVis); diff --git a/src/mesa/drivers/dri/unichrome/via_span.c b/src/mesa/drivers/dri/unichrome/via_span.c index b908f0fb23..e847164cd0 100644 --- a/src/mesa/drivers/dri/unichrome/via_span.c +++ b/src/mesa/drivers/dri/unichrome/via_span.c @@ -23,6 +23,7 @@ */ #include "main/glheader.h" +#include "main/formats.h" #include "main/macros.h" #include "main/mtypes.h" #include "main/colormac.h" @@ -177,24 +178,22 @@ void viaInitSpanFuncs(GLcontext *ctx) void viaSetSpanFunctions(struct via_renderbuffer *vrb, const GLvisual *vis) { - if (vrb->Base.InternalFormat == GL_RGBA) { - if (vis->redBits == 5 && vis->greenBits == 6 && vis->blueBits == 5) { - viaInitPointers_565(&vrb->Base); - } - else { - viaInitPointers_8888(&vrb->Base); - } + if (vrb->Base.Format == MESA_FORMAT_RGB565) { + viaInitPointers_565(&vrb->Base); } - else if (vrb->Base.InternalFormat == GL_DEPTH_COMPONENT16) { + else if (vrb->Base.Format == MESA_FORMAT_ARGB8888) { + viaInitPointers_8888(&vrb->Base); + } + else if (vrb->Base.Format == MESA_FORMAT_Z16) { viaInitDepthPointers_z16(&vrb->Base); } - else if (vrb->Base.InternalFormat == GL_DEPTH_COMPONENT24) { + else if (vrb->Base.Format == MESA_FORMAT_Z24_S8) { viaInitDepthPointers_z24_s8(&vrb->Base); } - else if (vrb->Base.InternalFormat == GL_DEPTH_COMPONENT32) { + else if (vrb->Base.Format == MESA_FORMAT_Z32) { viaInitDepthPointers_z32(&vrb->Base); } - else if (vrb->Base.InternalFormat == GL_STENCIL_INDEX8_EXT) { + else if (vrb->Base.Format == MESA_FORMAT_S8) { viaInitStencilPointers_z24_s8(&vrb->Base); } } -- cgit v1.2.3 From 17ef1f6074d6107c167f1956a5c60993904c0b72 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Thu, 8 Oct 2009 10:33:57 +0800 Subject: mesa: Enable remap table in core. This enables the remap table in core. driInitExtensions is adapted to use the remap table. All uses of extension_helper.h are replaced by remap_helper.h. The chicken-egg problem of the DRI drivers is also solved. It is now also possible to pass NULL extensions to driInitExtensions. It will cause driInitExtensions to map all known functions. This functionality is used by software drivers and EGL_i915. Signed-off-by: Chia-I Wu --- src/gallium/state_trackers/dri/dri_extensions.c | 10 ++- src/gallium/state_trackers/dri/dri_screen.c | 5 -- src/gallium/state_trackers/egl/egl_context.c | 67 ------------------ src/gallium/state_trackers/egl/egl_tracker.c | 4 +- src/mesa/drivers/dri/common/utils.c | 94 +++++-------------------- src/mesa/drivers/dri/common/utils.h | 32 +-------- src/mesa/drivers/dri/i810/i810context.c | 2 +- src/mesa/drivers/dri/i810/i810screen.c | 4 -- src/mesa/drivers/dri/intel/intel_extensions.c | 3 +- src/mesa/drivers/dri/intel/intel_screen.c | 24 ------- src/mesa/drivers/dri/mach64/mach64_context.c | 2 +- src/mesa/drivers/dri/mach64/mach64_screen.c | 14 ---- src/mesa/drivers/dri/mga/mga_xmesa.c | 18 +---- src/mesa/drivers/dri/r128/r128_context.c | 4 +- src/mesa/drivers/dri/r128/r128_screen.c | 14 ---- src/mesa/drivers/dri/r200/r200_context.c | 16 ++--- src/mesa/drivers/dri/r300/r300_context.c | 8 +-- src/mesa/drivers/dri/r600/r600_context.c | 8 +-- src/mesa/drivers/dri/radeon/radeon_context.c | 6 +- src/mesa/drivers/dri/radeon/radeon_screen.c | 54 -------------- src/mesa/drivers/dri/savage/savage_xmesa.c | 14 +--- src/mesa/drivers/dri/sis/sis_context.c | 6 +- src/mesa/drivers/dri/sis/sis_screen.c | 12 ---- src/mesa/drivers/dri/swrast/swrast.c | 74 +------------------ src/mesa/drivers/dri/tdfx/tdfx_context.c | 6 +- src/mesa/drivers/dri/tdfx/tdfx_screen.c | 16 ----- src/mesa/drivers/dri/unichrome/via_context.c | 4 +- src/mesa/drivers/dri/unichrome/via_screen.c | 14 ---- src/mesa/drivers/x11/xm_api.c | 73 ------------------- src/mesa/main/context.c | 3 + src/mesa/sources.mak | 1 + 31 files changed, 66 insertions(+), 546 deletions(-) (limited to 'src/mesa/drivers/dri/savage/savage_xmesa.c') diff --git a/src/gallium/state_trackers/dri/dri_extensions.c b/src/gallium/state_trackers/dri/dri_extensions.c index 800d462e32..78c4cd8375 100644 --- a/src/gallium/state_trackers/dri/dri_extensions.c +++ b/src/gallium/state_trackers/dri/dri_extensions.c @@ -59,12 +59,13 @@ #define need_GL_NV_vertex_program #define need_GL_VERSION_2_0 #define need_GL_VERSION_2_1 -#include "extension_helper.h" +#include "main/remap_helper.h" +#include "utils.h" /** * Extension strings exported by the driver. */ -const struct dri_extension card_extensions[] = { +static const struct dri_extension card_extensions[] = { {"GL_ARB_fragment_shader", NULL}, {"GL_ARB_map_buffer_range", GL_ARB_map_buffer_range_functions}, {"GL_ARB_multisample", GL_ARB_multisample_functions}, @@ -127,10 +128,7 @@ dri_init_extensions(struct dri_context *ctx) * capabilities of the pipe_screen. This is actually something * that can/should be done inside st_create_context(). */ - if (ctx) - driInitExtensions(ctx->st->ctx, card_extensions, GL_TRUE); - else - driInitExtensions(NULL, card_extensions, GL_FALSE); + driInitExtensions(ctx->st->ctx, card_extensions, GL_TRUE); } /* vim: set sw=3 ts=8 sts=3 expandtab: */ diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c index 884b6d5011..cb864d45d5 100644 --- a/src/gallium/state_trackers/dri/dri_screen.c +++ b/src/gallium/state_trackers/dri/dri_screen.c @@ -226,8 +226,6 @@ dri_init_screen(__DRIscreenPrivate * sPriv) const __DRIconfig **configs; struct dri1_create_screen_arg arg; - dri_init_extensions(NULL); - screen = CALLOC_STRUCT(dri_screen); if (!screen) return NULL; @@ -292,9 +290,6 @@ dri_init_screen2(__DRIscreenPrivate * sPriv) struct dri_screen *screen; struct drm_create_screen_arg arg; - /* Set up dispatch table to cope with all known extensions */ - dri_init_extensions(NULL); - screen = CALLOC_STRUCT(dri_screen); if (!screen) goto fail; diff --git a/src/gallium/state_trackers/egl/egl_context.c b/src/gallium/state_trackers/egl/egl_context.c index e21a4a1095..fee186c601 100644 --- a/src/gallium/state_trackers/egl/egl_context.c +++ b/src/gallium/state_trackers/egl/egl_context.c @@ -16,73 +16,6 @@ #include "GL/internal/glcore.h" -#define need_GL_ARB_multisample -#define need_GL_ARB_point_parameters -#define need_GL_ARB_texture_compression -#define need_GL_ARB_vertex_buffer_object -#define need_GL_ARB_vertex_program -#define need_GL_ARB_window_pos -#define need_GL_EXT_blend_color -#define need_GL_EXT_blend_equation_separate -#define need_GL_EXT_blend_func_separate -#define need_GL_EXT_blend_minmax -#define need_GL_EXT_cull_vertex -#define need_GL_EXT_fog_coord -#define need_GL_EXT_framebuffer_object -#define need_GL_EXT_multi_draw_arrays -#define need_GL_EXT_secondary_color -#define need_GL_NV_vertex_program -#include "extension_helper.h" - -/** - * TODO HACK! FUGLY! - * Copied for intel extentions. - */ -const struct dri_extension card_extensions[] = { - {"GL_ARB_multisample", GL_ARB_multisample_functions}, - {"GL_ARB_multitexture", NULL}, - {"GL_ARB_point_parameters", GL_ARB_point_parameters_functions}, - {"GL_ARB_texture_border_clamp", NULL}, - {"GL_ARB_texture_compression", GL_ARB_texture_compression_functions}, - {"GL_ARB_texture_cube_map", NULL}, - {"GL_ARB_texture_env_add", NULL}, - {"GL_ARB_texture_env_combine", NULL}, - {"GL_ARB_texture_env_dot3", NULL}, - {"GL_ARB_texture_mirrored_repeat", NULL}, - {"GL_ARB_texture_rectangle", NULL}, - {"GL_ARB_vertex_buffer_object", GL_ARB_vertex_buffer_object_functions}, - {"GL_ARB_pixel_buffer_object", NULL}, - {"GL_ARB_vertex_program", GL_ARB_vertex_program_functions}, - {"GL_ARB_window_pos", GL_ARB_window_pos_functions}, - {"GL_EXT_blend_color", GL_EXT_blend_color_functions}, - {"GL_EXT_blend_equation_separate", GL_EXT_blend_equation_separate_functions}, - {"GL_EXT_blend_func_separate", GL_EXT_blend_func_separate_functions}, - {"GL_EXT_blend_minmax", GL_EXT_blend_minmax_functions}, - {"GL_EXT_blend_subtract", NULL}, - {"GL_EXT_cull_vertex", GL_EXT_cull_vertex_functions}, - {"GL_EXT_fog_coord", GL_EXT_fog_coord_functions}, - {"GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions}, - {"GL_EXT_multi_draw_arrays", GL_EXT_multi_draw_arrays_functions}, - {"GL_EXT_packed_depth_stencil", NULL}, - {"GL_EXT_pixel_buffer_object", NULL}, - {"GL_EXT_secondary_color", GL_EXT_secondary_color_functions}, - {"GL_EXT_stencil_wrap", NULL}, - {"GL_EXT_texture_edge_clamp", NULL}, - {"GL_EXT_texture_env_combine", NULL}, - {"GL_EXT_texture_env_dot3", NULL}, - {"GL_EXT_texture_filter_anisotropic", NULL}, - {"GL_EXT_texture_lod_bias", NULL}, - {"GL_3DFX_texture_compression_FXT1", NULL}, - {"GL_APPLE_client_storage", NULL}, - {"GL_MESA_pack_invert", NULL}, - {"GL_MESA_ycbcr_texture", NULL}, - {"GL_NV_blend_square", NULL}, - {"GL_NV_vertex_program", GL_NV_vertex_program_functions}, - {"GL_NV_vertex_program1_1", NULL}, - {"GL_SGIS_generate_mipmap", NULL }, - {NULL, NULL} -}; - _EGLContext * drm_create_context(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, _EGLContext *share_list, const EGLint *attrib_list) { diff --git a/src/gallium/state_trackers/egl/egl_tracker.c b/src/gallium/state_trackers/egl/egl_tracker.c index 5140755001..8d29bf490b 100644 --- a/src/gallium/state_trackers/egl/egl_tracker.c +++ b/src/gallium/state_trackers/egl/egl_tracker.c @@ -16,7 +16,6 @@ /** HACK */ void* driDriverAPI; -extern const struct dri_extension card_extensions[]; /* @@ -168,8 +167,7 @@ drm_initialize(_EGLDriver *drv, _EGLDisplay *disp, EGLint *major, EGLint *minor) goto err_screen; dev->winsys = dev->screen->winsys; - /* TODO HACK */ - driInitExtensions(NULL, card_extensions, GL_FALSE); + driInitExtensions(NULL, NULL, GL_FALSE); drm_update_res(dev); res = dev->res; diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c index 66f277c10b..b272eb74ea 100644 --- a/src/mesa/drivers/dri/common/utils.c +++ b/src/mesa/drivers/dri/common/utils.c @@ -38,9 +38,6 @@ #include "utils.h" -int driDispatchRemapTable[ driDispatchRemapTable_size ]; - - unsigned driParseDebugString( const char * debug, const struct dri_debug_control * control ) @@ -142,7 +139,7 @@ driGetRendererString( char * buffer, const char * hardware_name, #define need_GL_EXT_blend_func_separate #define need_GL_NV_vertex_program -#include "extension_helper.h" +#include "main/remap_helper.h" static const struct dri_extension all_mesa_extensions[] = { { "GL_ARB_draw_buffers", GL_ARB_draw_buffers_functions }, @@ -165,8 +162,12 @@ static const struct dri_extension all_mesa_extensions[] = { /** - * Enable extensions supported by the driver. + * Enable and map extensions supported by the driver. * + * When ctx is NULL, extensions are not enabled, but their functions + * are still mapped. When extensions_to_enable is NULL, all static + * functions known to mesa core are mapped. + * * \bug * ARB_imaging isn't handled properly. In Mesa, enabling ARB_imaging also * enables all the sub-extensions that are folded into it. This means that @@ -181,18 +182,23 @@ void driInitExtensions( GLcontext * ctx, unsigned i; if ( first_time ) { - for ( i = 0 ; i < driDispatchRemapTable_size ; i++ ) { - driDispatchRemapTable[i] = -1; - } - first_time = 0; - driInitExtensions( ctx, all_mesa_extensions, GL_FALSE ); + driInitExtensions( NULL, all_mesa_extensions, GL_FALSE ); } if ( (ctx != NULL) && enable_imaging ) { _mesa_enable_imaging_extensions( ctx ); } + /* The caller is too lazy to list any extension */ + if ( extensions_to_enable == NULL ) { + /* Map the static functions. Together with those mapped by remap + * table, this should cover everything mesa core knows. + */ + _mesa_map_static_functions(); + return; + } + for ( i = 0 ; extensions_to_enable[i].name != NULL ; i++ ) { driInitSingleExtension( ctx, & extensions_to_enable[i] ); } @@ -202,80 +208,18 @@ void driInitExtensions( GLcontext * ctx, /** - * Enable and add dispatch functions for a single extension + * Enable and map functions for a single extension * * \param ctx Context where extension is to be enabled. * \param ext Extension that is to be enabled. * - * \sa driInitExtensions, _mesa_enable_extension, _glapi_add_entrypoint - * - * \todo - * Determine if it would be better to use \c strlen instead of the hardcoded - * for-loops. + * \sa driInitExtensions, _mesa_enable_extension, _mesa_map_function_array */ void driInitSingleExtension( GLcontext * ctx, const struct dri_extension * ext ) { - unsigned i; - - if ( ext->functions != NULL ) { - for ( i = 0 ; ext->functions[i].strings != NULL ; i++ ) { - const char * functions[16]; - const char * parameter_signature; - const char * str = ext->functions[i].strings; - unsigned j; - unsigned offset; - - - /* Separate the parameter signature from the rest of the string. - * If the parameter signature is empty (i.e., the string starts - * with a NUL character), then the function has a void parameter - * list. - */ - parameter_signature = str; - while ( str[0] != '\0' ) { - str++; - } - str++; - - - /* Divide the string into the substrings that name each - * entry-point for the function. - */ - for ( j = 0 ; j < 16 ; j++ ) { - if ( str[0] == '\0' ) { - functions[j] = NULL; - break; - } - - functions[j] = str; - - while ( str[0] != '\0' ) { - str++; - } - str++; - } - - - /* Add each entry-point to the dispatch table. - */ - offset = _glapi_add_dispatch( functions, parameter_signature ); - if (offset == -1) { -#if 0 /* this causes noise with egl */ - fprintf(stderr, "DISPATCH ERROR! _glapi_add_dispatch failed " - "to add %s!\n", functions[0]); -#endif - } - else if (ext->functions[i].remap_index != -1) { - driDispatchRemapTable[ ext->functions[i].remap_index ] = - offset; - } - else if (ext->functions[i].offset != offset) { - fprintf(stderr, "DISPATCH ERROR! %s -> %u != %u\n", - functions[0], offset, ext->functions[i].offset); - } - } + _mesa_map_function_array(ext->functions); } if ( ctx != NULL ) { diff --git a/src/mesa/drivers/dri/common/utils.h b/src/mesa/drivers/dri/common/utils.h index 9e9e5bc224..2aa6de66c1 100644 --- a/src/mesa/drivers/dri/common/utils.h +++ b/src/mesa/drivers/dri/common/utils.h @@ -31,6 +31,7 @@ #include #include #include "main/context.h" +#include "main/remap.h" typedef struct __DRIutilversionRec2 __DRIutilversion2; @@ -39,35 +40,6 @@ struct dri_debug_control { unsigned flag; }; -/** - * Description of the entry-points and parameters for an OpenGL function. - */ -struct dri_extension_function { - /** - * \brief - * Packed string describing the parameter signature and the entry-point - * names. - * - * The parameter signature and the names of the entry-points for this - * function are packed into a single string. The substrings are - * separated by NUL characters. The whole string is terminated by - * two consecutive NUL characters. - */ - const char * strings; - - - /** - * Location in the remap table where the dispatch offset should be - * stored. - */ - int remap_index; - - /** - * Offset of the function in the dispatch table. - */ - int offset; -}; - /** * Description of the API for an extension to OpenGL. */ @@ -83,7 +55,7 @@ struct dri_extension { * is terminated by a structure with a \c NULL * \c dri_extension_function::strings pointer. */ - const struct dri_extension_function * functions; + const struct gl_function_remap * functions; }; /** diff --git a/src/mesa/drivers/dri/i810/i810context.c b/src/mesa/drivers/dri/i810/i810context.c index 6785655686..7311b2e765 100644 --- a/src/mesa/drivers/dri/i810/i810context.c +++ b/src/mesa/drivers/dri/i810/i810context.c @@ -116,7 +116,7 @@ static void i810BufferSize(GLframebuffer *buffer, GLuint *width, GLuint *height) /* Extension strings exported by the i810 driver. */ -const struct dri_extension card_extensions[] = +static const struct dri_extension card_extensions[] = { { "GL_ARB_multitexture", NULL }, { "GL_ARB_texture_env_add", NULL }, diff --git a/src/mesa/drivers/dri/i810/i810screen.c b/src/mesa/drivers/dri/i810/i810screen.c index 6e49f3466c..a9ee61132e 100644 --- a/src/mesa/drivers/dri/i810/i810screen.c +++ b/src/mesa/drivers/dri/i810/i810screen.c @@ -53,8 +53,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "GL/internal/dri_interface.h" -extern const struct dri_extension card_extensions[]; - static const __DRIconfig ** i810FillInModes( __DRIscreenPrivate *psp, unsigned pixel_bits, unsigned depth_bits, @@ -166,8 +164,6 @@ i810InitScreen(__DRIscreen *sPriv) return NULL; } - driInitExtensions( NULL, card_extensions, GL_TRUE ); - if (sPriv->devPrivSize != sizeof(I810DRIRec)) { fprintf(stderr,"\nERROR! sizeof(I810DRIRec) does not match passed size from device driver\n"); return GL_FALSE; diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c index 2eb08a8f05..b6754c9fcb 100644 --- a/src/mesa/drivers/dri/intel/intel_extensions.c +++ b/src/mesa/drivers/dri/intel/intel_extensions.c @@ -28,6 +28,7 @@ #include "intel_chipset.h" #include "intel_context.h" #include "intel_extensions.h" +#include "utils.h" #define need_GL_ARB_copy_buffer @@ -63,7 +64,7 @@ #define need_GL_VERSION_2_0 #define need_GL_VERSION_2_1 -#include "extension_helper.h" +#include "main/remap_helper.h" /** diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index 24f7fbc992..41342ddcae 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -696,18 +696,6 @@ static const __DRIconfig **intelInitScreen(__DRIscreenPrivate *psp) return NULL; } - /* Calling driInitExtensions here, with a NULL context pointer, - * does not actually enable the extensions. It just makes sure - * that all the dispatch offsets for all the extensions that - * *might* be enables are known. This is needed because the - * dispatch offsets need to be known when _mesa_context_create is - * called, but we can't enable the extensions until we have a - * context pointer. - * - * Hello chicken. Hello egg. How are you two today? - */ - intelInitExtensions(NULL, GL_TRUE); - if (!intelInitDriver(psp)) return NULL; @@ -760,18 +748,6 @@ __DRIconfig **intelInitScreen2(__DRIscreenPrivate *psp) int color; __DRIconfig **configs = NULL; - /* Calling driInitExtensions here, with a NULL context pointer, - * does not actually enable the extensions. It just makes sure - * that all the dispatch offsets for all the extensions that - * *might* be enables are known. This is needed because the - * dispatch offsets need to be known when _mesa_context_create is - * called, but we can't enable the extensions until we have a - * context pointer. - * - * Hello chicken. Hello egg. How are you two today? - */ - intelInitExtensions(NULL, GL_TRUE); - /* Allocate the private area */ intelScreen = (intelScreenPrivate *) CALLOC(sizeof(intelScreenPrivate)); if (!intelScreen) { diff --git a/src/mesa/drivers/dri/mach64/mach64_context.c b/src/mesa/drivers/dri/mach64/mach64_context.c index 9c7f513c6f..2bca293b3c 100644 --- a/src/mesa/drivers/dri/mach64/mach64_context.c +++ b/src/mesa/drivers/dri/mach64/mach64_context.c @@ -76,7 +76,7 @@ static const struct dri_debug_control debug_control[] = { NULL, 0 } }; -const struct dri_extension card_extensions[] = +static const struct dri_extension card_extensions[] = { { "GL_ARB_multitexture", NULL }, { "GL_EXT_texture_edge_clamp", NULL }, diff --git a/src/mesa/drivers/dri/mach64/mach64_screen.c b/src/mesa/drivers/dri/mach64/mach64_screen.c index 6440027ca4..43aac899f7 100644 --- a/src/mesa/drivers/dri/mach64/mach64_screen.c +++ b/src/mesa/drivers/dri/mach64/mach64_screen.c @@ -67,8 +67,6 @@ static const GLuint __driNConfigOptions = 3; static const GLuint __driNConfigOptions = 2; #endif -extern const struct dri_extension card_extensions[]; - static const __DRIconfig ** mach64FillInModes( __DRIscreenPrivate *psp, unsigned pixel_bits, unsigned depth_bits, @@ -436,18 +434,6 @@ mach64InitScreen(__DRIscreenPrivate *psp) return NULL; } - /* Calling driInitExtensions here, with a NULL context pointer, - * does not actually enable the extensions. It just makes sure - * that all the dispatch offsets for all the extensions that - * *might* be enables are known. This is needed because the - * dispatch offsets need to be known when _mesa_context_create is - * called, but we can't enable the extensions until we have a - * context pointer. - * - * Hello chicken. Hello egg. How are you two today? - */ - driInitExtensions( NULL, card_extensions, GL_FALSE ); - if (!mach64InitDriver(psp)) return NULL; diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.c b/src/mesa/drivers/dri/mga/mga_xmesa.c index 0dc76fea50..03fd9b6fc1 100644 --- a/src/mesa/drivers/dri/mga/mga_xmesa.c +++ b/src/mesa/drivers/dri/mga/mga_xmesa.c @@ -78,7 +78,7 @@ #endif #define need_GL_APPLE_vertex_array_object #define need_GL_NV_vertex_program -#include "extension_helper.h" +#include "main/remap_helper.h" /* MGA configuration */ @@ -945,22 +945,6 @@ static const __DRIconfig **mgaInitScreen(__DRIscreen *psp) return NULL; - /* Calling driInitExtensions here, with a NULL context pointer, - * does not actually enable the extensions. It just makes sure - * that all the dispatch offsets for all the extensions that - * *might* be enables are known. This is needed because the - * dispatch offsets need to be known when _mesa_context_create is - * called, but we can't enable the extensions until we have a - * context pointer. - * - * Hello chicken. Hello egg. How are you two today? - */ - - driInitExtensions( NULL, card_extensions, GL_FALSE ); - driInitExtensions( NULL, g400_extensions, GL_FALSE ); - driInitExtensions(NULL, ARB_vp_extensions, GL_FALSE); - driInitExtensions( NULL, NV_vp_extensions, GL_FALSE ); - if (!mgaInitDriver(psp)) return NULL; diff --git a/src/mesa/drivers/dri/r128/r128_context.c b/src/mesa/drivers/dri/r128/r128_context.c index f511a67bad..0b250876c5 100644 --- a/src/mesa/drivers/dri/r128/r128_context.c +++ b/src/mesa/drivers/dri/r128/r128_context.c @@ -68,9 +68,9 @@ int R128_DEBUG = 0; #define need_GL_EXT_blend_minmax #define need_GL_EXT_fog_coord #define need_GL_EXT_secondary_color -#include "extension_helper.h" +#include "main/remap_helper.h" -const struct dri_extension card_extensions[] = +static const struct dri_extension card_extensions[] = { { "GL_ARB_multitexture", NULL }, { "GL_ARB_texture_env_add", NULL }, diff --git a/src/mesa/drivers/dri/r128/r128_screen.c b/src/mesa/drivers/dri/r128/r128_screen.c index f5bcc2f290..a68b019776 100644 --- a/src/mesa/drivers/dri/r128/r128_screen.c +++ b/src/mesa/drivers/dri/r128/r128_screen.c @@ -74,8 +74,6 @@ static const GLuint __driNConfigOptions = 4; static const GLuint __driNConfigOptions = 3; #endif -extern const struct dri_extension card_extensions[]; - #if 1 /* Including xf86PciInfo.h introduces a bunch of errors... */ @@ -493,18 +491,6 @@ r128InitScreen(__DRIscreenPrivate *psp) &psp->drm_version, & drm_expected ) ) return NULL; - /* Calling driInitExtensions here, with a NULL context pointer, - * does not actually enable the extensions. It just makes sure - * that all the dispatch offsets for all the extensions that - * *might* be enables are known. This is needed because the - * dispatch offsets need to be known when _mesa_context_create is - * called, but we can't enable the extensions until we have a - * context pointer. - * - * Hello chicken. Hello egg. How are you two today? - */ - driInitExtensions( NULL, card_extensions, GL_FALSE ); - if (!r128InitDriver(psp)) return NULL; diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c index 3ddb5bf7d6..e3ae839235 100644 --- a/src/mesa/drivers/dri/r200/r200_context.c +++ b/src/mesa/drivers/dri/r200/r200_context.c @@ -75,7 +75,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define need_GL_NV_vertex_program #define need_GL_ARB_point_parameters #define need_GL_EXT_framebuffer_object -#include "extension_helper.h" +#include "main/remap_helper.h" #define DRIVER_DATE "20060602" @@ -115,7 +115,7 @@ static const GLubyte *r200GetString( GLcontext *ctx, GLenum name ) /* Extension strings exported by the R200 driver. */ -const struct dri_extension card_extensions[] = +static const struct dri_extension card_extensions[] = { { "GL_ARB_multitexture", NULL }, { "GL_ARB_occlusion_query", GL_ARB_occlusion_query_functions}, @@ -146,31 +146,31 @@ const struct dri_extension card_extensions[] = { NULL, NULL } }; -const struct dri_extension blend_extensions[] = { +static const struct dri_extension blend_extensions[] = { { "GL_EXT_blend_equation_separate", GL_EXT_blend_equation_separate_functions }, { "GL_EXT_blend_func_separate", GL_EXT_blend_func_separate_functions }, { NULL, NULL } }; -const struct dri_extension ARB_vp_extension[] = { +static const struct dri_extension ARB_vp_extension[] = { { "GL_ARB_vertex_program", GL_ARB_vertex_program_functions } }; -const struct dri_extension NV_vp_extension[] = { +static const struct dri_extension NV_vp_extension[] = { { "GL_NV_vertex_program", GL_NV_vertex_program_functions } }; -const struct dri_extension ATI_fs_extension[] = { +static const struct dri_extension ATI_fs_extension[] = { { "GL_ATI_fragment_shader", GL_ATI_fragment_shader_functions } }; -const struct dri_extension point_extensions[] = { +static const struct dri_extension point_extensions[] = { { "GL_ARB_point_sprite", NULL }, { "GL_ARB_point_parameters", GL_ARB_point_parameters_functions }, { NULL, NULL } }; -const struct dri_extension mm_extensions[] = { +static const struct dri_extension mm_extensions[] = { { "GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions }, { NULL, NULL } }; diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c index 2c2b16aa98..6f66e970e4 100644 --- a/src/mesa/drivers/dri/r300/r300_context.c +++ b/src/mesa/drivers/dri/r300/r300_context.c @@ -90,10 +90,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define need_GL_ATI_separate_stencil #define need_GL_NV_vertex_program -#include "extension_helper.h" +#include "main/remap_helper.h" -const struct dri_extension card_extensions[] = { +static const struct dri_extension card_extensions[] = { /* *INDENT-OFF* */ {"GL_ARB_depth_texture", NULL}, {"GL_ARB_fragment_program", NULL}, @@ -145,7 +145,7 @@ const struct dri_extension card_extensions[] = { }; -const struct dri_extension mm_extensions[] = { +static const struct dri_extension mm_extensions[] = { { "GL_EXT_framebuffer_blit", GL_EXT_framebuffer_blit_functions }, { "GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions }, { NULL, NULL } @@ -155,7 +155,7 @@ const struct dri_extension mm_extensions[] = { * The GL 2.0 functions are needed to make display lists work with * functions added by GL_ATI_separate_stencil. */ -const struct dri_extension gl_20_extension[] = { +static const struct dri_extension gl_20_extension[] = { {"GL_VERSION_2_0", GL_VERSION_2_0_functions }, }; diff --git a/src/mesa/drivers/dri/r600/r600_context.c b/src/mesa/drivers/dri/r600/r600_context.c index e6791b46f0..c1bf76deb8 100644 --- a/src/mesa/drivers/dri/r600/r600_context.c +++ b/src/mesa/drivers/dri/r600/r600_context.c @@ -92,9 +92,9 @@ int hw_tcl_on = 1; #define need_GL_ATI_separate_stencil #define need_GL_NV_vertex_program -#include "extension_helper.h" +#include "main/remap_helper.h" -const struct dri_extension card_extensions[] = { +static const struct dri_extension card_extensions[] = { /* *INDENT-OFF* */ {"GL_ARB_depth_texture", NULL}, {"GL_ARB_fragment_program", NULL}, @@ -145,7 +145,7 @@ const struct dri_extension card_extensions[] = { }; -const struct dri_extension mm_extensions[] = { +static const struct dri_extension mm_extensions[] = { { "GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions }, { NULL, NULL } }; @@ -154,7 +154,7 @@ const struct dri_extension mm_extensions[] = { * The GL 2.0 functions are needed to make display lists work with * functions added by GL_ATI_separate_stencil. */ -const struct dri_extension gl_20_extension[] = { +static const struct dri_extension gl_20_extension[] = { {"GL_VERSION_2_0", GL_VERSION_2_0_functions }, }; diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c index 8f4485aee7..5e700be4a5 100644 --- a/src/mesa/drivers/dri/radeon/radeon_context.c +++ b/src/mesa/drivers/dri/radeon/radeon_context.c @@ -69,7 +69,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define need_GL_EXT_fog_coord #define need_GL_EXT_secondary_color #define need_GL_EXT_framebuffer_object -#include "extension_helper.h" +#include "main/remap_helper.h" #define DRIVER_DATE "20061018" @@ -79,7 +79,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /* Extension strings exported by the R100 driver. */ -const struct dri_extension card_extensions[] = +static const struct dri_extension card_extensions[] = { { "GL_ARB_multitexture", NULL }, { "GL_ARB_occlusion_query", GL_ARB_occlusion_query_functions}, @@ -109,7 +109,7 @@ const struct dri_extension card_extensions[] = { NULL, NULL } }; -const struct dri_extension mm_extensions[] = { +static const struct dri_extension mm_extensions[] = { { "GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions }, { NULL, NULL } }; diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c index 573eb6c9c1..2fb2d37cf1 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.c +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c @@ -141,12 +141,6 @@ DRI_CONF_BEGIN DRI_CONF_END; static const GLuint __driNConfigOptions = 17; -extern const struct dri_extension blend_extensions[]; -extern const struct dri_extension ARB_vp_extension[]; -extern const struct dri_extension NV_vp_extension[]; -extern const struct dri_extension ATI_fs_extension[]; -extern const struct dri_extension point_extensions[]; - #elif defined(RADEON_R300) || defined(RADEON_R600) #define DRI_CONF_FP_OPTIMIZATION_SPEED 0 @@ -218,13 +212,8 @@ DRI_CONF_BEGIN DRI_CONF_END; static const GLuint __driNConfigOptions = 17; -extern const struct dri_extension gl_20_extension[]; - #endif -extern const struct dri_extension card_extensions[]; -extern const struct dri_extension mm_extensions[]; - static int getSwapInfo( __DRIdrawablePrivate *dPriv, __DRIswapInfo * sInfo ); static int @@ -1619,27 +1608,6 @@ radeonInitScreen(__DRIscreenPrivate *psp) return NULL; } - /* Calling driInitExtensions here, with a NULL context pointer, - * does not actually enable the extensions. It just makes sure - * that all the dispatch offsets for all the extensions that - * *might* be enables are known. This is needed because the - * dispatch offsets need to be known when _mesa_context_create - * is called, but we can't enable the extensions until we have a - * context pointer. - * - * Hello chicken. Hello egg. How are you two today? - */ - driInitExtensions( NULL, card_extensions, GL_FALSE ); -#if defined(RADEON_R200) - driInitExtensions( NULL, blend_extensions, GL_FALSE ); - driInitSingleExtension( NULL, ARB_vp_extension ); - driInitSingleExtension( NULL, NV_vp_extension ); - driInitSingleExtension( NULL, ATI_fs_extension ); - driInitExtensions( NULL, point_extensions, GL_FALSE ); -#elif (defined(RADEON_R300) || defined(RADEON_R600)) - driInitSingleExtension( NULL, gl_20_extension ); -#endif - if (!radeonInitDriver(psp)) return NULL; @@ -1672,28 +1640,6 @@ __DRIconfig **radeonInitScreen2(__DRIscreenPrivate *psp) int color; __DRIconfig **configs = NULL; - /* Calling driInitExtensions here, with a NULL context pointer, - * does not actually enable the extensions. It just makes sure - * that all the dispatch offsets for all the extensions that - * *might* be enables are known. This is needed because the - * dispatch offsets need to be known when _mesa_context_create - * is called, but we can't enable the extensions until we have a - * context pointer. - * - * Hello chicken. Hello egg. How are you two today? - */ - driInitExtensions( NULL, card_extensions, GL_FALSE ); - driInitExtensions( NULL, mm_extensions, GL_FALSE ); -#if defined(RADEON_R200) - driInitExtensions( NULL, blend_extensions, GL_FALSE ); - driInitSingleExtension( NULL, ARB_vp_extension ); - driInitSingleExtension( NULL, NV_vp_extension ); - driInitSingleExtension( NULL, ATI_fs_extension ); - driInitExtensions( NULL, point_extensions, GL_FALSE ); -#elif (defined(RADEON_R300) || defined(RADEON_R600)) - driInitSingleExtension( NULL, gl_20_extension ); -#endif - if (!radeonInitDriver(psp)) { return NULL; } diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c index 931ceff0a8..0fccf50a03 100644 --- a/src/mesa/drivers/dri/savage/savage_xmesa.c +++ b/src/mesa/drivers/dri/savage/savage_xmesa.c @@ -59,7 +59,7 @@ #include "texmem.h" #define need_GL_EXT_secondary_color -#include "extension_helper.h" +#include "main/remap_helper.h" #include "xmlpool.h" @@ -980,18 +980,6 @@ savageInitScreen(__DRIscreenPrivate *psp) &psp->drm_version, & drm_expected ) ) return NULL; - /* Calling driInitExtensions here, with a NULL context pointer, - * does not actually enable the extensions. It just makes sure - * that all the dispatch offsets for all the extensions that - * *might* be enables are known. This is needed because the - * dispatch offsets need to be known when _mesa_context_create is - * called, but we can't enable the extensions until we have a - * context pointer. - * - * Hello chicken. Hello egg. How are you two today? - */ - driInitExtensions( NULL, card_extensions, GL_FALSE ); - if (!savageInitDriver(psp)) return NULL; diff --git a/src/mesa/drivers/dri/sis/sis_context.c b/src/mesa/drivers/dri/sis/sis_context.c index a070fe3d79..f501e7ad2e 100644 --- a/src/mesa/drivers/dri/sis/sis_context.c +++ b/src/mesa/drivers/dri/sis/sis_context.c @@ -59,7 +59,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define need_GL_EXT_fog_coord #define need_GL_EXT_secondary_color -#include "extension_helper.h" +#include "main/remap_helper.h" #ifndef SIS_DEBUG int SIS_DEBUG = 0; @@ -69,7 +69,7 @@ int GlobalCurrentHwcx = -1; int GlobalHwcxCountBase = 1; int GlobalCmdQueueLen = 0; -struct dri_extension card_extensions[] = +static struct dri_extension card_extensions[] = { { "GL_ARB_multitexture", NULL }, { "GL_ARB_texture_border_clamp", NULL }, @@ -83,7 +83,7 @@ struct dri_extension card_extensions[] = { NULL, NULL } }; -struct dri_extension card_extensions_6326[] = +static struct dri_extension card_extensions_6326[] = { /*{ "GL_ARB_texture_border_clamp", NULL },*/ /*{ "GL_ARB_texture_mirrored_repeat", NULL },*/ diff --git a/src/mesa/drivers/dri/sis/sis_screen.c b/src/mesa/drivers/dri/sis/sis_screen.c index b5f04ae28d..fec9158236 100644 --- a/src/mesa/drivers/dri/sis/sis_screen.c +++ b/src/mesa/drivers/dri/sis/sis_screen.c @@ -298,18 +298,6 @@ sisInitScreen(__DRIscreenPrivate *psp) &psp->drm_version, &drm_expected)) return NULL; - /* Calling driInitExtensions here, with a NULL context pointer, - * does not actually enable the extensions. It just makes sure - * that all the dispatch offsets for all the extensions that - * *might* be enables are known. This is needed because the - * dispatch offsets need to be known when _mesa_context_create is - * called, but we can't enable the extensions until we have a - * context pointer. - * - * Hello chicken. Hello egg. How are you two today? - */ - driInitExtensions( NULL, card_extensions, GL_FALSE ); - psp->private = sisCreateScreen(psp); if (!psp->private) { diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c index f4947daa06..df5221b135 100644 --- a/src/mesa/drivers/dri/swrast/swrast.c +++ b/src/mesa/drivers/dri/swrast/swrast.c @@ -49,78 +49,6 @@ #include "swrast_priv.h" -#define need_GL_VERSION_1_3 -#define need_GL_VERSION_1_4 -#define need_GL_VERSION_1_5 -#define need_GL_VERSION_2_0 -#define need_GL_VERSION_2_1 - -/* sw extensions for imaging */ -#define need_GL_EXT_blend_color -#define need_GL_EXT_blend_minmax -#define need_GL_EXT_convolution -#define need_GL_EXT_histogram -#define need_GL_SGI_color_table - -/* sw extensions not associated with some GL version */ -#define need_GL_ARB_draw_elements_base_vertex -#define need_GL_ARB_shader_objects -#define need_GL_ARB_vertex_array_object -#define need_GL_ARB_vertex_program -#define need_GL_ARB_sync -#define need_GL_APPLE_vertex_array_object -#define need_GL_ATI_fragment_shader -#define need_GL_ATI_separate_stencil -#define need_GL_EXT_depth_bounds_test -#define need_GL_EXT_framebuffer_object -#define need_GL_EXT_framebuffer_blit -#define need_GL_EXT_gpu_program_parameters -#define need_GL_EXT_paletted_texture -#define need_GL_EXT_stencil_two_side -#define need_GL_MESA_resize_buffers -#define need_GL_NV_vertex_program -#define need_GL_NV_fragment_program - -#include "extension_helper.h" - -const struct dri_extension card_extensions[] = -{ - { "GL_VERSION_1_3", GL_VERSION_1_3_functions }, - { "GL_VERSION_1_4", GL_VERSION_1_4_functions }, - { "GL_VERSION_1_5", GL_VERSION_1_5_functions }, - { "GL_VERSION_2_0", GL_VERSION_2_0_functions }, - { "GL_VERSION_2_1", GL_VERSION_2_1_functions }, - - { "GL_EXT_blend_color", GL_EXT_blend_color_functions }, - { "GL_EXT_blend_minmax", GL_EXT_blend_minmax_functions }, - { "GL_EXT_convolution", GL_EXT_convolution_functions }, - { "GL_EXT_histogram", GL_EXT_histogram_functions }, - { "GL_SGI_color_table", GL_SGI_color_table_functions }, - - { "GL_ARB_depth_clamp", NULL }, - { "GL_ARB_draw_elements_base_vertex", GL_ARB_draw_elements_base_vertex_functions }, - { "GL_ARB_shader_objects", GL_ARB_shader_objects_functions }, - { "GL_ARB_vertex_array_object", GL_ARB_vertex_array_object_functions }, - { "GL_ARB_vertex_program", GL_ARB_vertex_program_functions }, - { "GL_ARB_sync", GL_ARB_sync_functions }, - { "GL_APPLE_vertex_array_object", GL_APPLE_vertex_array_object_functions }, - { "GL_ATI_fragment_shader", GL_ATI_fragment_shader_functions }, - { "GL_ATI_separate_stencil", GL_ATI_separate_stencil_functions }, - { "GL_EXT_depth_bounds_test", GL_EXT_depth_bounds_test_functions }, - { "GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions }, - { "GL_EXT_framebuffer_blit", GL_EXT_framebuffer_blit_functions }, - { "GL_EXT_gpu_program_parameters", GL_EXT_gpu_program_parameters_functions }, - { "GL_EXT_paletted_texture", GL_EXT_paletted_texture_functions }, - { "GL_EXT_stencil_two_side", GL_EXT_stencil_two_side_functions }, - { "GL_MESA_resize_buffers", GL_MESA_resize_buffers_functions }, - { "GL_NV_depth_clamp", NULL }, - { "GL_NV_vertex_program", GL_NV_vertex_program_functions }, - { "GL_NV_fragment_program", GL_NV_fragment_program_functions }, - { "GL_NV_fragment_program_option", NULL }, - { NULL, NULL } -}; - - /** * Screen and config-related functions */ @@ -244,7 +172,7 @@ driCreateNewScreen(int scrn, const __DRIextension **extensions, *driver_configs = (const __DRIconfig **) driConcatConfigs(configs24, configs32); - driInitExtensions( NULL, card_extensions, GL_FALSE ); + driInitExtensions( NULL, NULL, GL_FALSE ); return psp; } diff --git a/src/mesa/drivers/dri/tdfx/tdfx_context.c b/src/mesa/drivers/dri/tdfx/tdfx_context.c index 68b5027561..e742d414a5 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_context.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_context.c @@ -68,13 +68,13 @@ #define need_GL_EXT_paletted_texture /* #define need_GL_EXT_secondary_color */ /* #define need_GL_NV_vertex_program */ -#include "extension_helper.h" +#include "main/remap_helper.h" /** * Common extension strings exported by all cards */ -const struct dri_extension card_extensions[] = +static const struct dri_extension card_extensions[] = { { "GL_ARB_occlusion_query", GL_ARB_occlusion_query_functions }, { "GL_ARB_texture_mirrored_repeat", NULL }, @@ -107,7 +107,7 @@ const struct dri_extension card_extensions[] = /** * Extension strings exported only by Naplam (e.g., Voodoo4 & Voodoo5) cards. */ -const struct dri_extension napalm_extensions[] = +static const struct dri_extension napalm_extensions[] = { { "GL_ARB_texture_env_combine", NULL }, { "GL_EXT_blend_equation_separate", GL_EXT_blend_equation_separate_functions }, diff --git a/src/mesa/drivers/dri/tdfx/tdfx_screen.c b/src/mesa/drivers/dri/tdfx/tdfx_screen.c index 58bd48b294..d8a4b401c0 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_screen.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.c @@ -69,9 +69,6 @@ static const __DRIextension *tdfxExtensions[] = { static const GLuint __driNConfigOptions = 1; -extern const struct dri_extension card_extensions[]; -extern const struct dri_extension napalm_extensions[]; - static GLboolean tdfxCreateScreen( __DRIscreenPrivate *sPriv ) { @@ -418,19 +415,6 @@ tdfxInitScreen(__DRIscreen *psp) &psp->drm_version, & drm_expected ) ) return NULL; - /* Calling driInitExtensions here, with a NULL context pointer, - * does not actually enable the extensions. It just makes sure - * that all the dispatch offsets for all the extensions that - * *might* be enables are known. This is needed because the - * dispatch offsets need to be known when _mesa_context_create is - * called, but we can't enable the extensions until we have a - * context pointer. - * - * Hello chicken. Hello egg. How are you two today? - */ - driInitExtensions( NULL, card_extensions, GL_FALSE ); - driInitExtensions( NULL, napalm_extensions, GL_FALSE ); - if (!tdfxInitDriver(psp)) return NULL; diff --git a/src/mesa/drivers/dri/unichrome/via_context.c b/src/mesa/drivers/dri/unichrome/via_context.c index 6eb19ac079..5be1cf32c2 100644 --- a/src/mesa/drivers/dri/unichrome/via_context.c +++ b/src/mesa/drivers/dri/unichrome/via_context.c @@ -65,7 +65,7 @@ #define need_GL_ARB_point_parameters #define need_GL_EXT_fog_coord #define need_GL_EXT_secondary_color -#include "extension_helper.h" +#include "main/remap_helper.h" #define DRIVER_DATE "20060710" @@ -362,7 +362,7 @@ void viaReAllocateBuffers(GLcontext *ctx, GLframebuffer *drawbuffer, /* Extension strings exported by the Unichrome driver. */ -const struct dri_extension card_extensions[] = +static const struct dri_extension card_extensions[] = { { "GL_ARB_multitexture", NULL }, { "GL_ARB_point_parameters", GL_ARB_point_parameters_functions }, diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c index 3dbb570571..7cfc60a015 100644 --- a/src/mesa/drivers/dri/unichrome/via_screen.c +++ b/src/mesa/drivers/dri/unichrome/via_screen.c @@ -62,8 +62,6 @@ DRI_CONF_BEGIN DRI_CONF_END; static const GLuint __driNConfigOptions = 3; -extern const struct dri_extension card_extensions[]; - static drmBufMapPtr via_create_empty_buffers(void) { drmBufMapPtr retval; @@ -393,18 +391,6 @@ viaInitScreen(__DRIscreenPrivate *psp) &psp->drm_version, & drm_expected) ) return NULL; - /* Calling driInitExtensions here, with a NULL context pointer, - * does not actually enable the extensions. It just makes sure - * that all the dispatch offsets for all the extensions that - * *might* be enables are known. This is needed because the - * dispatch offsets need to be known when _mesa_context_create is - * called, but we can't enable the extensions until we have a - * context pointer. - * - * Hello chicken. Hello egg. How are you two today? - */ - driInitExtensions( NULL, card_extensions, GL_FALSE ); - if (!viaInitDriver(psp)) return NULL; diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index 79b058634c..bf767bcedd 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -1303,71 +1303,6 @@ xmesa_convert_from_x_visual_type( int visualType ) /**********************************************************************/ -#ifdef IN_DRI_DRIVER -#define need_GL_VERSION_1_3 -#define need_GL_VERSION_1_4 -#define need_GL_VERSION_1_5 -#define need_GL_VERSION_2_0 - -/* sw extensions for imaging */ -#define need_GL_EXT_blend_color -#define need_GL_EXT_blend_minmax -#define need_GL_EXT_convolution -#define need_GL_EXT_histogram -#define need_GL_SGI_color_table - -/* sw extensions not associated with some GL version */ -#define need_GL_ARB_draw_elements_base_vertex -#define need_GL_ARB_shader_objects -#define need_GL_ARB_sync -#define need_GL_ARB_vertex_program -#define need_GL_APPLE_vertex_array_object -#define need_GL_ATI_fragment_shader -#define need_GL_EXT_depth_bounds_test -#define need_GL_EXT_framebuffer_object -#define need_GL_EXT_framebuffer_blit -#define need_GL_EXT_gpu_program_parameters -#define need_GL_EXT_paletted_texture -#define need_GL_MESA_resize_buffers -#define need_GL_NV_vertex_program -#define need_GL_NV_fragment_program - -#include "extension_helper.h" -#include "utils.h" - -const struct dri_extension card_extensions[] = -{ - { "GL_VERSION_1_3", GL_VERSION_1_3_functions }, - { "GL_VERSION_1_4", GL_VERSION_1_4_functions }, - { "GL_VERSION_1_5", GL_VERSION_1_5_functions }, - { "GL_VERSION_2_0", GL_VERSION_2_0_functions }, - - { "GL_EXT_blend_color", GL_EXT_blend_color_functions }, - { "GL_EXT_blend_minmax", GL_EXT_blend_minmax_functions }, - { "GL_EXT_convolution", GL_EXT_convolution_functions }, - { "GL_EXT_histogram", GL_EXT_histogram_functions }, - { "GL_SGI_color_table", GL_SGI_color_table_functions }, - - { "GL_ARB_depth_clamp", NULL }, - { "GL_ARB_draw_elements_base_vertex", GL_ARB_draw_elements_base_vertex_functions }, - { "GL_ARB_shader_objects", GL_ARB_shader_objects_functions }, - { "GL_ARB_sync", GL_ARB_sync_functions }, - { "GL_ARB_vertex_program", GL_ARB_vertex_program_functions }, - { "GL_APPLE_vertex_array_object", GL_APPLE_vertex_array_object_functions }, - { "GL_ATI_fragment_shader", GL_ATI_fragment_shader_functions }, - { "GL_EXT_depth_bounds_test", GL_EXT_depth_bounds_test_functions }, - { "GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions }, - { "GL_EXT_framebuffer_blit", GL_EXT_framebuffer_blit_functions }, - { "GL_EXT_gpu_program_parameters", GL_EXT_gpu_program_parameters_functions }, - { "GL_EXT_paletted_texture", GL_EXT_paletted_texture_functions }, - { "GL_MESA_resize_buffers", GL_MESA_resize_buffers_functions }, - { "GL_NV_depth_clamp", NULL }, - { "GL_NV_vertex_program", GL_NV_vertex_program_functions }, - { "GL_NV_fragment_program", GL_NV_fragment_program_functions }, - { NULL, NULL } -}; -#endif - /* * Create a new X/Mesa visual. * Input: display - X11 display @@ -1413,14 +1348,6 @@ XMesaVisual XMesaCreateVisual( XMesaDisplay *display, XMesaVisual v; GLint red_bits, green_bits, blue_bits, alpha_bits; -#ifdef IN_DRI_DRIVER - /* driInitExtensions() should be called once per screen to setup extension - * indices. There is no need to call it when the context is created since - * XMesa enables mesa sw extensions on its own. - */ - driInitExtensions( NULL, card_extensions, GL_FALSE ); -#endif - #ifndef XFree86Server /* For debugging only */ if (_mesa_getenv("MESA_XSYNC")) { diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 490b8f0f33..ea820d77b3 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -117,6 +117,7 @@ #include "syncobj.h" #endif #include "rastpos.h" +#include "remap.h" #include "scissor.h" #include "shared.h" #include "simple_list.h" @@ -407,6 +408,8 @@ one_time_init( GLcontext *ctx ) _mesa_get_cpu_features(); + _mesa_init_remap_table(); + _mesa_init_sqrt_table(); for (i = 0; i < 256; i++) { diff --git a/src/mesa/sources.mak b/src/mesa/sources.mak index 7107538cee..0838014e93 100644 --- a/src/mesa/sources.mak +++ b/src/mesa/sources.mak @@ -55,6 +55,7 @@ MAIN_SOURCES = \ main/rastpos.c \ main/rbadaptors.c \ main/readpix.c \ + main/remap.c \ main/renderbuffer.c \ main/scissor.c \ main/shaders.c \ -- cgit v1.2.3 From d61f07318c8678901b948fdaa8ccdf37aa3203e9 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Fri, 1 Jan 2010 17:09:12 -0500 Subject: Remove leftover __DRI{screen,drawable,context}Private references As part of the DRI driver interface rewrite I merged __DRIscreenPrivate and __DRIscreen, and likewise for __DRIdrawablePrivate and __DRIcontextPrivate. I left typedefs in place though, to avoid renaming all the *Private use internal to the driver. That was probably a mistake, and it turns out a one-line find+sed combo can do the mass rename. Better late than never. --- src/egl/drivers/dri/egldri.c | 26 ++++++------ src/gallium/state_trackers/dri/dri_context.c | 14 +++---- src/gallium/state_trackers/dri/dri_context.h | 22 +++++------ src/gallium/state_trackers/dri/dri_drawable.c | 24 +++++------ src/gallium/state_trackers/dri/dri_drawable.h | 18 ++++----- src/gallium/state_trackers/dri/dri_screen.c | 8 ++-- src/gallium/state_trackers/dri/dri_screen.h | 4 +- src/glx/mini/miniglx.c | 12 +++--- src/glx/x11/dri_glx.c | 2 +- src/mesa/drivers/dri/common/dri_util.c | 24 +++++------ src/mesa/drivers/dri/common/dri_util.h | 5 --- src/mesa/drivers/dri/common/drirenderbuffer.c | 4 +- src/mesa/drivers/dri/common/drirenderbuffer.h | 8 ++-- src/mesa/drivers/dri/common/vblank.c | 20 +++++----- src/mesa/drivers/dri/common/vblank.h | 16 ++++---- src/mesa/drivers/dri/fb/fb_dri.c | 36 ++++++++--------- src/mesa/drivers/dri/fb/fb_egl.c | 6 +-- src/mesa/drivers/dri/ffb/ffb_bitmap.c | 2 +- src/mesa/drivers/dri/ffb/ffb_clear.c | 4 +- src/mesa/drivers/dri/ffb/ffb_context.h | 4 +- src/mesa/drivers/dri/ffb/ffb_depth.c | 8 ++-- src/mesa/drivers/dri/ffb/ffb_span.c | 2 +- src/mesa/drivers/dri/ffb/ffb_state.c | 6 +-- src/mesa/drivers/dri/ffb/ffb_stencil.c | 8 ++-- src/mesa/drivers/dri/ffb/ffb_tris.c | 2 +- src/mesa/drivers/dri/ffb/ffb_xmesa.c | 32 +++++++-------- src/mesa/drivers/dri/ffb/ffb_xmesa.h | 2 +- src/mesa/drivers/dri/gamma/gamma_context.c | 4 +- src/mesa/drivers/dri/gamma/gamma_context.h | 12 +++--- src/mesa/drivers/dri/gamma/gamma_lock.c | 4 +- src/mesa/drivers/dri/gamma/gamma_macros.h | 6 +-- src/mesa/drivers/dri/gamma/gamma_screen.c | 4 +- src/mesa/drivers/dri/gamma/gamma_screen.h | 2 +- src/mesa/drivers/dri/gamma/gamma_span.c | 8 ++-- src/mesa/drivers/dri/gamma/gamma_state.c | 4 +- src/mesa/drivers/dri/gamma/gamma_xmesa.c | 28 ++++++------- src/mesa/drivers/dri/i810/i810context.c | 24 +++++------ src/mesa/drivers/dri/i810/i810context.h | 4 +- src/mesa/drivers/dri/i810/i810ioctl.c | 6 +-- src/mesa/drivers/dri/i810/i810ioctl.h | 4 +- src/mesa/drivers/dri/i810/i810screen.c | 10 ++--- src/mesa/drivers/dri/i810/i810screen.h | 16 ++++---- src/mesa/drivers/dri/i810/i810span.c | 4 +- src/mesa/drivers/dri/i810/i810state.c | 2 +- src/mesa/drivers/dri/i915/i830_context.c | 2 +- src/mesa/drivers/dri/i915/i830_context.h | 2 +- src/mesa/drivers/dri/i915/i915_context.c | 2 +- src/mesa/drivers/dri/i915/i915_context.h | 2 +- src/mesa/drivers/dri/i965/brw_context.c | 2 +- src/mesa/drivers/dri/i965/brw_context.h | 2 +- src/mesa/drivers/dri/i965/brw_misc_state.c | 2 +- src/mesa/drivers/dri/intel/intel_blit.c | 2 +- src/mesa/drivers/dri/intel/intel_blit.h | 2 +- src/mesa/drivers/dri/intel/intel_buffers.c | 2 +- src/mesa/drivers/dri/intel/intel_context.c | 22 +++++------ src/mesa/drivers/dri/intel/intel_context.h | 10 ++--- src/mesa/drivers/dri/intel/intel_pixel_read.c | 4 +- src/mesa/drivers/dri/intel/intel_screen.c | 36 ++++++++--------- src/mesa/drivers/dri/intel/intel_screen.h | 14 +++---- src/mesa/drivers/dri/intel/intel_swapbuffers.c | 10 ++--- src/mesa/drivers/dri/intel/intel_swapbuffers.h | 6 +-- src/mesa/drivers/dri/intel/intel_tex_copy.c | 2 +- src/mesa/drivers/dri/mach64/mach64_context.c | 14 +++---- src/mesa/drivers/dri/mach64/mach64_context.h | 18 ++++----- src/mesa/drivers/dri/mach64/mach64_ioctl.c | 4 +- src/mesa/drivers/dri/mach64/mach64_ioctl.h | 2 +- src/mesa/drivers/dri/mach64/mach64_lock.c | 4 +- src/mesa/drivers/dri/mach64/mach64_screen.c | 18 ++++----- src/mesa/drivers/dri/mach64/mach64_screen.h | 2 +- src/mesa/drivers/dri/mach64/mach64_span.c | 8 ++-- src/mesa/drivers/dri/mach64/mach64_state.c | 4 +- src/mesa/drivers/dri/mga/mga_xmesa.c | 32 +++++++-------- src/mesa/drivers/dri/mga/mga_xmesa.h | 2 +- src/mesa/drivers/dri/mga/mgacontext.h | 6 +-- src/mesa/drivers/dri/mga/mgaioctl.c | 6 +-- src/mesa/drivers/dri/mga/mgaioctl.h | 2 +- src/mesa/drivers/dri/mga/mgapixel.c | 4 +- src/mesa/drivers/dri/mga/mgaspan.c | 8 ++-- src/mesa/drivers/dri/mga/mgastate.c | 6 +-- src/mesa/drivers/dri/r128/r128_context.c | 14 +++---- src/mesa/drivers/dri/r128/r128_context.h | 18 ++++----- src/mesa/drivers/dri/r128/r128_ioctl.c | 6 +-- src/mesa/drivers/dri/r128/r128_ioctl.h | 4 +- src/mesa/drivers/dri/r128/r128_lock.c | 4 +- src/mesa/drivers/dri/r128/r128_screen.c | 18 ++++----- src/mesa/drivers/dri/r128/r128_screen.h | 2 +- src/mesa/drivers/dri/r128/r128_span.c | 8 ++-- src/mesa/drivers/dri/r128/r128_state.c | 2 +- src/mesa/drivers/dri/r200/r200_context.c | 6 +-- src/mesa/drivers/dri/r200/r200_context.h | 12 +++--- src/mesa/drivers/dri/r200/r200_ioctl.c | 4 +- src/mesa/drivers/dri/r200/r200_pixel.c | 4 +- src/mesa/drivers/dri/r200/r200_state.c | 4 +- src/mesa/drivers/dri/r300/r300_context.c | 4 +- src/mesa/drivers/dri/r300/r300_context.h | 4 +- src/mesa/drivers/dri/r300/r300_state.c | 6 +-- src/mesa/drivers/dri/r600/r600_context.c | 4 +- src/mesa/drivers/dri/r600/r600_context.h | 2 +- src/mesa/drivers/dri/r600/r700_clear.c | 2 +- src/mesa/drivers/dri/r600/r700_state.c | 4 +- src/mesa/drivers/dri/radeon/radeon_common.c | 24 +++++------ src/mesa/drivers/dri/radeon/radeon_common.h | 8 ++-- .../drivers/dri/radeon/radeon_common_context.c | 14 +++---- .../drivers/dri/radeon/radeon_common_context.h | 22 +++++------ src/mesa/drivers/dri/radeon/radeon_context.c | 4 +- src/mesa/drivers/dri/radeon/radeon_context.h | 2 +- src/mesa/drivers/dri/radeon/radeon_fbo.c | 2 +- src/mesa/drivers/dri/radeon/radeon_ioctl.c | 4 +- src/mesa/drivers/dri/radeon/radeon_lock.c | 6 +-- src/mesa/drivers/dri/radeon/radeon_screen.c | 26 ++++++------ src/mesa/drivers/dri/radeon/radeon_screen.h | 4 +- src/mesa/drivers/dri/radeon/radeon_state.c | 4 +- src/mesa/drivers/dri/savage/savage_init.h | 2 +- src/mesa/drivers/dri/savage/savage_xmesa.c | 46 +++++++++++----------- src/mesa/drivers/dri/savage/savagecontext.h | 6 +-- src/mesa/drivers/dri/savage/savageioctl.c | 4 +- src/mesa/drivers/dri/savage/savageioctl.h | 2 +- src/mesa/drivers/dri/savage/savagespan.c | 4 +- src/mesa/drivers/dri/sis/sis_context.c | 14 +++---- src/mesa/drivers/dri/sis/sis_context.h | 18 ++++----- src/mesa/drivers/dri/sis/sis_lock.c | 4 +- src/mesa/drivers/dri/sis/sis_screen.c | 18 ++++----- src/mesa/drivers/dri/sis/sis_screen.h | 2 +- src/mesa/drivers/dri/sis/sis_span.c | 4 +- src/mesa/drivers/dri/tdfx/tdfx_context.c | 16 ++++---- src/mesa/drivers/dri/tdfx/tdfx_context.h | 20 +++++----- src/mesa/drivers/dri/tdfx/tdfx_lock.c | 8 ++-- src/mesa/drivers/dri/tdfx/tdfx_pixels.c | 4 +- src/mesa/drivers/dri/tdfx/tdfx_render.c | 2 +- src/mesa/drivers/dri/tdfx/tdfx_screen.c | 18 ++++----- src/mesa/drivers/dri/tdfx/tdfx_screen.h | 2 +- src/mesa/drivers/dri/tdfx/tdfx_span.c | 4 +- src/mesa/drivers/dri/tdfx/tdfx_state.c | 2 +- src/mesa/drivers/dri/unichrome/via_context.c | 30 +++++++------- src/mesa/drivers/dri/unichrome/via_context.h | 8 ++-- src/mesa/drivers/dri/unichrome/via_ioctl.c | 14 +++---- src/mesa/drivers/dri/unichrome/via_ioctl.h | 4 +- src/mesa/drivers/dri/unichrome/via_screen.c | 16 ++++---- src/mesa/drivers/dri/unichrome/via_screen.h | 16 ++++---- src/mesa/drivers/dri/unichrome/via_span.c | 4 +- src/mesa/drivers/dri/unichrome/via_state.c | 4 +- 141 files changed, 634 insertions(+), 639 deletions(-) (limited to 'src/mesa/drivers/dri/savage/savage_xmesa.c') diff --git a/src/egl/drivers/dri/egldri.c b/src/egl/drivers/dri/egldri.c index 9e400be624..ca6821dad0 100644 --- a/src/egl/drivers/dri/egldri.c +++ b/src/egl/drivers/dri/egldri.c @@ -675,13 +675,13 @@ __eglCreateContextWithConfig(__DRInativeDisplay* ndpy, int screen, drm_context_t * hHWContext) { __DRIscreen *pDRIScreen; - __DRIscreenPrivate *psp; + __DRIscreen *psp; pDRIScreen = __eglFindDRIScreen(ndpy, screen); if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { return GL_FALSE; } - psp = (__DRIscreenPrivate *) pDRIScreen->private; + psp = (__DRIscreen *) pDRIScreen->private; if (psp->fd) { if (drmCreateContext(psp->fd, hHWContext)) { _eglLog(_EGL_WARNING, "drmCreateContext failed."); @@ -691,14 +691,14 @@ __eglCreateContextWithConfig(__DRInativeDisplay* ndpy, int screen, } #if 0 __DRIscreen *pDRIScreen; - __DRIscreenPrivate *psp; + __DRIscreen *psp; pDRIScreen = __glXFindDRIScreen(dpy, screen); if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { return GL_FALSE; } - psp = (__DRIscreenPrivate *) pDRIScreen->private; + psp = (__DRIscreen *) pDRIScreen->private; if (psp->fd) { if (drmCreateContext(psp->fd, hHWContext)) { @@ -716,13 +716,13 @@ static GLboolean __eglDestroyContext( __DRInativeDisplay * ndpy, int screen, __DRIid context ) { __DRIscreen *pDRIScreen; - __DRIscreenPrivate *psp; + __DRIscreen *psp; pDRIScreen = __eglFindDRIScreen(ndpy, screen); if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { return GL_FALSE; } - psp = (__DRIscreenPrivate *) pDRIScreen->private; + psp = (__DRIscreen *) pDRIScreen->private; if (psp->fd) drmDestroyContext(psp->fd, context); @@ -735,13 +735,13 @@ __eglCreateDrawable(__DRInativeDisplay * ndpy, int screen, __DRIid drawable, drm_drawable_t * hHWDrawable) { __DRIscreen *pDRIScreen; - __DRIscreenPrivate *psp; + __DRIscreen *psp; pDRIScreen = __eglFindDRIScreen(ndpy, screen); if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { return GL_FALSE; } - psp = (__DRIscreenPrivate *) pDRIScreen->private; + psp = (__DRIscreen *) pDRIScreen->private; if (psp->fd) { if (drmCreateDrawable(psp->fd, hHWDrawable)) { _eglLog(_EGL_WARNING, "drmCreateDrawable failed."); @@ -756,13 +756,13 @@ static GLboolean __eglDestroyDrawable( __DRInativeDisplay * ndpy, int screen, __DRIid drawable ) { __DRIscreen *pDRIScreen; - __DRIscreenPrivate *psp; + __DRIscreen *psp; pDRIScreen = __eglFindDRIScreen(ndpy, screen); if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { return GL_FALSE; } - psp = (__DRIscreenPrivate *) pDRIScreen->private; + psp = (__DRIscreen *) pDRIScreen->private; if (psp->fd) drmDestroyDrawable(psp->fd, drawable); @@ -778,7 +778,7 @@ __eglGetDrawableInfo(__DRInativeDisplay * ndpy, int screen, __DRIid drawable, int* numBackClipRects, drm_clip_rect_t ** pBackClipRects ) { __DRIscreen *pDRIScreen; - __DRIscreenPrivate *psp; + __DRIscreen *psp; driSurface *surf = Lookup_driSurface((EGLSurface) drawable); pDRIScreen = __eglFindDRIScreen(ndpy, screen); @@ -786,7 +786,7 @@ __eglGetDrawableInfo(__DRInativeDisplay * ndpy, int screen, __DRIid drawable, if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { return GL_FALSE; } - psp = (__DRIscreenPrivate *) pDRIScreen->private; + psp = (__DRIscreen *) pDRIScreen->private; *X = 0; *Y = 0; *W = surf->Base.Width; @@ -807,7 +807,7 @@ __eglGetDrawableInfo(__DRInativeDisplay * ndpy, int screen, __DRIid drawable, GLXDrawable drawable = (GLXDrawable) draw; drm_clip_rect_t * cliprect; Display* display = (Display*)dpy; - __DRIcontextPrivate *pcp = (__DRIcontextPrivate *)CurrentContext->driContext.private; + __DRIcontext *pcp = (__DRIcontext *)CurrentContext->driContext.private; if (drawable == 0) { return GL_FALSE; } diff --git a/src/gallium/state_trackers/dri/dri_context.c b/src/gallium/state_trackers/dri/dri_context.c index 8819936fca..f2e5f3fb23 100644 --- a/src/gallium/state_trackers/dri/dri_context.c +++ b/src/gallium/state_trackers/dri/dri_context.c @@ -44,9 +44,9 @@ GLboolean dri_create_context(const __GLcontextModes * visual, - __DRIcontextPrivate * cPriv, void *sharedContextPrivate) + __DRIcontext * cPriv, void *sharedContextPrivate) { - __DRIscreenPrivate *sPriv = cPriv->driScreenPriv; + __DRIscreen *sPriv = cPriv->driScreenPriv; struct dri_screen *screen = dri_screen(sPriv); struct dri_context *ctx = NULL; struct st_context *st_share = NULL; @@ -97,7 +97,7 @@ dri_create_context(const __GLcontextModes * visual, } void -dri_destroy_context(__DRIcontextPrivate * cPriv) +dri_destroy_context(__DRIcontext * cPriv) { struct dri_context *ctx = dri_context(cPriv); @@ -116,7 +116,7 @@ dri_destroy_context(__DRIcontextPrivate * cPriv) } GLboolean -dri_unbind_context(__DRIcontextPrivate * cPriv) +dri_unbind_context(__DRIcontext * cPriv) { if (cPriv) { struct dri_context *ctx = dri_context(cPriv); @@ -133,9 +133,9 @@ dri_unbind_context(__DRIcontextPrivate * cPriv) } GLboolean -dri_make_current(__DRIcontextPrivate * cPriv, - __DRIdrawablePrivate * driDrawPriv, - __DRIdrawablePrivate * driReadPriv) +dri_make_current(__DRIcontext * cPriv, + __DRIdrawable * driDrawPriv, + __DRIdrawable * driReadPriv) { if (cPriv) { struct dri_context *ctx = dri_context(cPriv); diff --git a/src/gallium/state_trackers/dri/dri_context.h b/src/gallium/state_trackers/dri/dri_context.h index 4650178734..13f497462f 100644 --- a/src/gallium/state_trackers/dri/dri_context.h +++ b/src/gallium/state_trackers/dri/dri_context.h @@ -44,10 +44,10 @@ struct dri_drawable; struct dri_context { /* dri */ - __DRIscreenPrivate *sPriv; - __DRIcontextPrivate *cPriv; - __DRIdrawablePrivate *dPriv; - __DRIdrawablePrivate *rPriv; + __DRIscreen *sPriv; + __DRIcontext *cPriv; + __DRIdrawable *dPriv; + __DRIdrawable *rPriv; driOptionCache optionCache; @@ -67,7 +67,7 @@ struct dri_context }; static INLINE struct dri_context * -dri_context(__DRIcontextPrivate * driContextPriv) +dri_context(__DRIcontext * driContextPriv) { return (struct dri_context *)driContextPriv->driverPrivate; } @@ -99,18 +99,18 @@ dri_unlock(struct dri_context *ctx) */ extern struct dri1_api_lock_funcs dri1_lf; -void dri_destroy_context(__DRIcontextPrivate * driContextPriv); +void dri_destroy_context(__DRIcontext * driContextPriv); -boolean dri_unbind_context(__DRIcontextPrivate * driContextPriv); +boolean dri_unbind_context(__DRIcontext * driContextPriv); boolean -dri_make_current(__DRIcontextPrivate * driContextPriv, - __DRIdrawablePrivate * driDrawPriv, - __DRIdrawablePrivate * driReadPriv); +dri_make_current(__DRIcontext * driContextPriv, + __DRIdrawable * driDrawPriv, + __DRIdrawable * driReadPriv); boolean dri_create_context(const __GLcontextModes * visual, - __DRIcontextPrivate * driContextPriv, + __DRIcontext * driContextPriv, void *sharedContextPrivate); /*********************************************************************** diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c index 4b12243ddf..1058dd38c2 100644 --- a/src/gallium/state_trackers/dri/dri_drawable.c +++ b/src/gallium/state_trackers/dri/dri_drawable.c @@ -118,7 +118,7 @@ dri2_check_if_pixmap(__DRIbuffer *buffers, int count) * This will be called a drawable is known to have been resized. */ void -dri_get_buffers(__DRIdrawablePrivate * dPriv) +dri_get_buffers(__DRIdrawable * dPriv) { struct dri_drawable *drawable = dri_drawable(dPriv); @@ -299,8 +299,8 @@ dri_flush_frontbuffer(struct pipe_screen *screen, * This is called when we need to set up GL rendering to a new X window. */ boolean -dri_create_buffer(__DRIscreenPrivate * sPriv, - __DRIdrawablePrivate * dPriv, +dri_create_buffer(__DRIscreen * sPriv, + __DRIdrawable * dPriv, const __GLcontextModes * visual, boolean isPixmap) { struct dri_screen *screen = sPriv->private; @@ -416,7 +416,7 @@ dri_swap_fences_push_back(struct dri_drawable *draw, } void -dri_destroy_buffer(__DRIdrawablePrivate * dPriv) +dri_destroy_buffer(__DRIdrawable * dPriv) { struct dri_drawable *drawable = dri_drawable(dPriv); struct pipe_fence_handle *fence; @@ -434,8 +434,8 @@ dri_destroy_buffer(__DRIdrawablePrivate * dPriv) static void dri1_update_drawables_locked(struct dri_context *ctx, - __DRIdrawablePrivate * driDrawPriv, - __DRIdrawablePrivate * driReadPriv) + __DRIdrawable * driDrawPriv, + __DRIdrawable * driReadPriv) { if (ctx->stLostLock) { ctx->stLostLock = FALSE; @@ -458,8 +458,8 @@ dri1_update_drawables_locked(struct dri_context *ctx, static void dri1_propagate_drawable_change(struct dri_context *ctx) { - __DRIdrawablePrivate *dPriv = ctx->dPriv; - __DRIdrawablePrivate *rPriv = ctx->rPriv; + __DRIdrawable *dPriv = ctx->dPriv; + __DRIdrawable *rPriv = ctx->rPriv; boolean flushed = FALSE; if (dPriv && ctx->d_stamp != dPriv->lastStamp) { @@ -532,7 +532,7 @@ static void dri1_swap_copy(struct dri_context *ctx, struct pipe_surface *dst, struct pipe_surface *src, - __DRIdrawablePrivate * dPriv, const struct drm_clip_rect *bbox) + __DRIdrawable * dPriv, const struct drm_clip_rect *bbox) { struct pipe_context *pipe = ctx->pipe; struct drm_clip_rect clip; @@ -563,7 +563,7 @@ dri1_swap_copy(struct dri_context *ctx, static void dri1_copy_to_front(struct dri_context *ctx, struct pipe_surface *surf, - __DRIdrawablePrivate * dPriv, + __DRIdrawable * dPriv, const struct drm_clip_rect *sub_box, struct pipe_fence_handle **fence) { @@ -636,7 +636,7 @@ dri1_flush_frontbuffer(struct pipe_screen *screen, } void -dri_swap_buffers(__DRIdrawablePrivate * dPriv) +dri_swap_buffers(__DRIdrawable * dPriv) { struct dri_context *ctx; struct pipe_surface *back_surf; @@ -668,7 +668,7 @@ dri_swap_buffers(__DRIdrawablePrivate * dPriv) } void -dri_copy_sub_buffer(__DRIdrawablePrivate * dPriv, int x, int y, int w, int h) +dri_copy_sub_buffer(__DRIdrawable * dPriv, int x, int y, int w, int h) { struct pipe_screen *screen = dri_screen(dPriv->driScreenPriv)->pipe_screen; struct drm_clip_rect sub_bbox; diff --git a/src/gallium/state_trackers/dri/dri_drawable.h b/src/gallium/state_trackers/dri/dri_drawable.h index b910930db4..80bb5d7f61 100644 --- a/src/gallium/state_trackers/dri/dri_drawable.h +++ b/src/gallium/state_trackers/dri/dri_drawable.h @@ -41,8 +41,8 @@ struct dri_context; struct dri_drawable { /* dri */ - __DRIdrawablePrivate *dPriv; - __DRIscreenPrivate *sPriv; + __DRIdrawable *dPriv; + __DRIscreen *sPriv; unsigned attachments[8]; unsigned num_attachments; @@ -67,7 +67,7 @@ struct dri_drawable }; static INLINE struct dri_drawable * -dri_drawable(__DRIdrawablePrivate * driDrawPriv) +dri_drawable(__DRIdrawable * driDrawPriv) { return (struct dri_drawable *)driDrawPriv->driverPrivate; } @@ -76,22 +76,22 @@ dri_drawable(__DRIdrawablePrivate * driDrawPriv) * dri_drawable.c */ boolean -dri_create_buffer(__DRIscreenPrivate * sPriv, - __DRIdrawablePrivate * dPriv, +dri_create_buffer(__DRIscreen * sPriv, + __DRIdrawable * dPriv, const __GLcontextModes * visual, boolean isPixmap); void dri_flush_frontbuffer(struct pipe_screen *screen, struct pipe_surface *surf, void *context_private); -void dri_swap_buffers(__DRIdrawablePrivate * dPriv); +void dri_swap_buffers(__DRIdrawable * dPriv); void -dri_copy_sub_buffer(__DRIdrawablePrivate * dPriv, int x, int y, int w, int h); +dri_copy_sub_buffer(__DRIdrawable * dPriv, int x, int y, int w, int h); -void dri_get_buffers(__DRIdrawablePrivate * dPriv); +void dri_get_buffers(__DRIdrawable * dPriv); -void dri_destroy_buffer(__DRIdrawablePrivate * dPriv); +void dri_destroy_buffer(__DRIdrawable * dPriv); void dri2_set_tex_buffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_format, __DRIdrawable *dPriv); diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c index cb864d45d5..ce79d09901 100644 --- a/src/gallium/state_trackers/dri/dri_screen.c +++ b/src/gallium/state_trackers/dri/dri_screen.c @@ -202,7 +202,7 @@ dri_fill_in_modes(struct dri_screen *screen, * Get information about previous buffer swaps. */ static int -dri_get_swap_info(__DRIdrawablePrivate * dPriv, __DRIswapInfo * sInfo) +dri_get_swap_info(__DRIdrawable * dPriv, __DRIswapInfo * sInfo) { if (dPriv == NULL || dPriv->driverPrivate == NULL || sInfo == NULL) return -1; @@ -220,7 +220,7 @@ dri_copy_version(struct dri1_api_version *dst, } static const __DRIconfig ** -dri_init_screen(__DRIscreenPrivate * sPriv) +dri_init_screen(__DRIscreen * sPriv) { struct dri_screen *screen; const __DRIconfig **configs; @@ -285,7 +285,7 @@ dri_init_screen(__DRIscreenPrivate * sPriv) * Returns the __GLcontextModes supported by this driver. */ static const __DRIconfig ** -dri_init_screen2(__DRIscreenPrivate * sPriv) +dri_init_screen2(__DRIscreen * sPriv) { struct dri_screen *screen; struct drm_create_screen_arg arg; @@ -319,7 +319,7 @@ dri_init_screen2(__DRIscreenPrivate * sPriv) } static void -dri_destroy_screen(__DRIscreenPrivate * sPriv) +dri_destroy_screen(__DRIscreen * sPriv) { struct dri_screen *screen = dri_screen(sPriv); diff --git a/src/gallium/state_trackers/dri/dri_screen.h b/src/gallium/state_trackers/dri/dri_screen.h index f6c56d0f0c..03387a0e81 100644 --- a/src/gallium/state_trackers/dri/dri_screen.h +++ b/src/gallium/state_trackers/dri/dri_screen.h @@ -42,7 +42,7 @@ struct dri_screen { /* dri */ - __DRIscreenPrivate *sPriv; + __DRIscreen *sPriv; /** * Configuration cache with default values for all contexts @@ -63,7 +63,7 @@ struct dri_screen /** cast wrapper */ static INLINE struct dri_screen * -dri_screen(__DRIscreenPrivate * sPriv) +dri_screen(__DRIscreen * sPriv) { return (struct dri_screen *)sPriv->private; } diff --git a/src/glx/mini/miniglx.c b/src/glx/mini/miniglx.c index 874b88bc49..e9a10b4ac7 100644 --- a/src/glx/mini/miniglx.c +++ b/src/glx/mini/miniglx.c @@ -2278,14 +2278,14 @@ __glXCreateContextWithConfig(__DRInativeDisplay *dpy, int screen, int fbconfigID, void *contextID, drm_context_t *hHWContext) { __DRIscreen *pDRIScreen; - __DRIscreenPrivate *psp; + __DRIscreen *psp; pDRIScreen = __glXFindDRIScreen(dpy, screen); if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) { return GL_FALSE; } - psp = (__DRIscreenPrivate *) pDRIScreen->private; + psp = (__DRIscreen *) pDRIScreen->private; if (psp->fd) { if (drmCreateContext(psp->fd, hHWContext)) { @@ -2310,9 +2310,9 @@ __glXGetDrawableInfo(__DRInativeDisplay *dpy, int scrn, GLXDrawable drawable = (GLXDrawable) draw; drm_clip_rect_t * cliprect; Display* display = (Display*)dpy; - __DRIscreenPrivate *psp = display->driScreen.private; - __DRIcontextPrivate *pcp = (__DRIcontextPrivate *)CurrentContext->driContext.private; - __DRIdrawablePrivate *pdp = pcp->driDrawablePriv; + __DRIscreen *psp = display->driScreen.private; + __DRIcontext *pcp = (__DRIcontext *)CurrentContext->driContext.private; + __DRIdrawable *pdp = pcp->driDrawablePriv; if (drawable == 0) { return GL_FALSE; } @@ -2357,7 +2357,7 @@ xf86DRI_CreateDrawable(__DRInativeDisplay *dpy, int screen, __DRIid drawable, { Display *display = (Display *)dpy; - __DRIscreenPrivate *psp = display->driScreen.private; + __DRIscreen *psp = display->driScreen.private; int ret; ret = drmCreateDrawable(psp->fd, hHWDrawable); diff --git a/src/glx/x11/dri_glx.c b/src/glx/x11/dri_glx.c index 4f7acb6cc3..4ff99b8eda 100644 --- a/src/glx/x11/dri_glx.c +++ b/src/glx/x11/dri_glx.c @@ -292,7 +292,7 @@ static const __DRIextension *loader_extensions[] = { * \param driDpy DRI display information. * \param createNewScreen Pointer to the client-side driver's * \c __driCreateNewScreen function. - * \returns A pointer to the \c __DRIscreenPrivate structure returned by + * \returns A pointer to the \c __DRIscreen structure returned by * the client-side driver on success, or \c NULL on failure. */ static void * diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index 547f18a009..fd0359fac9 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -97,7 +97,7 @@ driIntersectArea( drm_clip_rect_t rect1, drm_clip_rect_t rect2 ) * * \internal * This function calls __DriverAPIRec::UnbindContext, and then decrements - * __DRIdrawablePrivateRec::refcount which must be non-zero for a successful + * __DRIdrawableRec::refcount which must be non-zero for a successful * return. * * While casting the opaque private pointers associated with the parameters @@ -167,7 +167,7 @@ static int driBindContext(__DRIcontext *pcp, __DRIdrawable *pdp, __DRIdrawable *prp) { - __DRIscreenPrivate *psp = NULL; + __DRIscreen *psp = NULL; /* Bind the drawable to the context */ @@ -220,7 +220,7 @@ static int driBindContext(__DRIcontext *pcp, * * \param pdp pointer to the private drawable information to update. * - * This function basically updates the __DRIdrawablePrivate struct's + * This function basically updates the __DRIdrawable struct's * cliprect information by calling \c __DRIinterfaceMethods::getDrawableInfo. * This is usually called by the DRI_VALIDATE_DRAWABLE_INFO macro which * compares the __DRIdrwablePrivate pStamp and lastStamp values. If @@ -228,10 +228,10 @@ static int driBindContext(__DRIcontext *pcp, * info. */ void -__driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp) +__driUtilUpdateDrawableInfo(__DRIdrawable *pdp) { - __DRIscreenPrivate *psp = pdp->driScreenPriv; - __DRIcontextPrivate *pcp = pdp->driContextPriv; + __DRIscreen *psp = pdp->driScreenPriv; + __DRIcontext *pcp = pdp->driContextPriv; if (!pcp || ((pdp != pcp->driDrawablePriv) && (pdp != pcp->driReadablePriv))) { @@ -309,7 +309,7 @@ static void driReportDamage(__DRIdrawable *pdp, * \param drawablePrivate opaque pointer to the per-drawable private info. * * \internal - * This function calls __DRIdrawablePrivate::swapBuffers. + * This function calls __DRIdrawable::swapBuffers. * * Is called directly from glXSwapBuffers(). */ @@ -497,7 +497,7 @@ static void dri_get_drawable(__DRIdrawable *pdp) static void dri_put_drawable(__DRIdrawable *pdp) { - __DRIscreenPrivate *psp; + __DRIscreen *psp; if (pdp) { pdp->refcount--; @@ -560,7 +560,7 @@ driDestroyContext(__DRIcontext *pcp) * success, or \c NULL on failure. * * \internal - * This function allocates and fills a __DRIcontextPrivateRec structure. It + * This function allocates and fills a __DRIcontextRec structure. It * performs some device independent initialization and passes all the * relevent information to __DriverAPIRec::CreateContext to create the * context. @@ -871,7 +871,7 @@ driQueryFrameTracking(__DRIdrawable *dpriv, __DRIswapInfo sInfo; int status; int64_t ust; - __DRIscreenPrivate *psp = dpriv->driScreenPriv; + __DRIscreen *psp = dpriv->driScreenPriv; status = dpriv->driScreenPriv->DriverAPI.GetSwapInfo( dpriv, & sInfo ); if ( status == 0 ) { @@ -921,14 +921,14 @@ const __DRIframeTrackingExtension driFrameTrackingExtension = { * be possible to cache the sync rate? */ float -driCalculateSwapUsage( __DRIdrawablePrivate *dPriv, int64_t last_swap_ust, +driCalculateSwapUsage( __DRIdrawable *dPriv, int64_t last_swap_ust, int64_t current_ust ) { int32_t n; int32_t d; int interval; float usage = 1.0; - __DRIscreenPrivate *psp = dPriv->driScreenPriv; + __DRIscreen *psp = dPriv->driScreenPriv; if ( (*psp->systemTime->getMSCRate)(dPriv, &n, &d, dPriv->loaderPrivate) ) { interval = (dPriv->swap_interval != 0) ? dPriv->swap_interval : 1; diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h index c95a5c8299..984e5e6909 100644 --- a/src/mesa/drivers/dri/common/dri_util.h +++ b/src/mesa/drivers/dri/common/dri_util.h @@ -59,11 +59,6 @@ typedef struct __DRIswapInfoRec __DRIswapInfo; -/* Typedefs to avoid rewriting the world. */ -typedef struct __DRIscreenRec __DRIscreenPrivate; -typedef struct __DRIdrawableRec __DRIdrawablePrivate; -typedef struct __DRIcontextRec __DRIcontextPrivate; - /** * Extensions. */ diff --git a/src/mesa/drivers/dri/common/drirenderbuffer.c b/src/mesa/drivers/dri/common/drirenderbuffer.c index 4e7e92c82b..3126ea8476 100644 --- a/src/mesa/drivers/dri/common/drirenderbuffer.c +++ b/src/mesa/drivers/dri/common/drirenderbuffer.c @@ -56,7 +56,7 @@ driDeleteRenderbuffer(struct gl_renderbuffer *rb) driRenderbuffer * driNewRenderbuffer(gl_format format, GLvoid *addr, GLint cpp, GLint offset, GLint pitch, - __DRIdrawablePrivate *dPriv) + __DRIdrawable *dPriv) { driRenderbuffer *drb; @@ -196,7 +196,7 @@ driFlipRenderbuffers(struct gl_framebuffer *fb, GLboolean flipped) * gl_framebuffer object. */ void -driUpdateFramebufferSize(GLcontext *ctx, const __DRIdrawablePrivate *dPriv) +driUpdateFramebufferSize(GLcontext *ctx, const __DRIdrawable *dPriv) { struct gl_framebuffer *fb = (struct gl_framebuffer *) dPriv->driverPrivate; if (fb && (dPriv->w != fb->Width || dPriv->h != fb->Height)) { diff --git a/src/mesa/drivers/dri/common/drirenderbuffer.h b/src/mesa/drivers/dri/common/drirenderbuffer.h index 3a5cbcdaac..677511334d 100644 --- a/src/mesa/drivers/dri/common/drirenderbuffer.h +++ b/src/mesa/drivers/dri/common/drirenderbuffer.h @@ -43,10 +43,10 @@ typedef struct { GLint flippedPitch; GLvoid *flippedData; /* mmap'd address of buffer memory, if used */ - /* Pointer to corresponding __DRIdrawablePrivate. This is used to compute + /* Pointer to corresponding __DRIdrawable. This is used to compute * the window's position within the framebuffer. */ - __DRIdrawablePrivate *dPriv; + __DRIdrawable *dPriv; /* XXX this is for radeon/r200 only. We should really create a new * r200Renderbuffer class, derived from this class... not a huge deal. @@ -66,14 +66,14 @@ typedef struct { extern driRenderbuffer * driNewRenderbuffer(gl_format format, GLvoid *addr, GLint cpp, GLint offset, GLint pitch, - __DRIdrawablePrivate *dPriv); + __DRIdrawable *dPriv); extern void driFlipRenderbuffers(struct gl_framebuffer *fb, GLboolean flipped); extern void -driUpdateFramebufferSize(GLcontext *ctx, const __DRIdrawablePrivate *dPriv); +driUpdateFramebufferSize(GLcontext *ctx, const __DRIdrawable *dPriv); #endif /* DRIRENDERBUFFER_H */ diff --git a/src/mesa/drivers/dri/common/vblank.c b/src/mesa/drivers/dri/common/vblank.c index 12aeaa108f..49b22a2dc7 100644 --- a/src/mesa/drivers/dri/common/vblank.c +++ b/src/mesa/drivers/dri/common/vblank.c @@ -34,12 +34,12 @@ #include "vblank.h" #include "xmlpool.h" -static unsigned int msc_to_vblank(__DRIdrawablePrivate * dPriv, int64_t msc) +static unsigned int msc_to_vblank(__DRIdrawable * dPriv, int64_t msc) { return (unsigned int)(msc - dPriv->msc_base + dPriv->vblank_base); } -static int64_t vblank_to_msc(__DRIdrawablePrivate * dPriv, unsigned int vblank) +static int64_t vblank_to_msc(__DRIdrawable * dPriv, unsigned int vblank) { return (int64_t)(vblank - dPriv->vblank_base + dPriv->msc_base); } @@ -64,8 +64,8 @@ static int64_t vblank_to_msc(__DRIdrawablePrivate * dPriv, unsigned int vblank) * \return Zero is returned on success. A negative errno value * is returned on failure. */ -int driDrawableGetMSC32( __DRIscreenPrivate * priv, - __DRIdrawablePrivate * dPriv, +int driDrawableGetMSC32( __DRIscreen * priv, + __DRIdrawable * dPriv, int64_t * count) { drmVBlank vbl; @@ -122,7 +122,7 @@ int driDrawableGetMSC32( __DRIscreenPrivate * priv, * \return Zero on success or \c GLX_BAD_CONTEXT on failure. */ -int driWaitForMSC32( __DRIdrawablePrivate *priv, +int driWaitForMSC32( __DRIdrawable *priv, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t * msc ) { @@ -278,7 +278,7 @@ static int do_wait( drmVBlank * vbl, GLuint * vbl_seq, int fd ) */ static unsigned -driGetDefaultVBlankInterval( const __DRIdrawablePrivate *priv ) +driGetDefaultVBlankInterval( const __DRIdrawable *priv ) { if ( (priv->vblFlags & (VBLANK_FLAG_THROTTLE | VBLANK_FLAG_SYNC)) != 0 ) { return 1; @@ -295,7 +295,7 @@ driGetDefaultVBlankInterval( const __DRIdrawablePrivate *priv ) * direct rendering context. */ -void driDrawableInitVBlank( __DRIdrawablePrivate *priv ) +void driDrawableInitVBlank( __DRIdrawable *priv ) { if ( priv->swap_interval == (unsigned)-1 && !( priv->vblFlags & VBLANK_FLAG_NO_IRQ ) ) { @@ -320,7 +320,7 @@ void driDrawableInitVBlank( __DRIdrawablePrivate *priv ) */ unsigned -driGetVBlankInterval( const __DRIdrawablePrivate *priv ) +driGetVBlankInterval( const __DRIdrawable *priv ) { if ( (priv->vblFlags & VBLANK_FLAG_INTERVAL) != 0 ) { /* this must have been initialized when the drawable was first bound @@ -340,7 +340,7 @@ driGetVBlankInterval( const __DRIdrawablePrivate *priv ) */ void -driGetCurrentVBlank( __DRIdrawablePrivate *priv ) +driGetCurrentVBlank( __DRIdrawable *priv ) { drmVBlank vbl; @@ -366,7 +366,7 @@ driGetCurrentVBlank( __DRIdrawablePrivate *priv ) */ int -driWaitForVBlank( __DRIdrawablePrivate *priv, GLboolean * missed_deadline ) +driWaitForVBlank( __DRIdrawable *priv, GLboolean * missed_deadline ) { drmVBlank vbl; unsigned original_seq; diff --git a/src/mesa/drivers/dri/common/vblank.h b/src/mesa/drivers/dri/common/vblank.h index 8b2c761a11..29d1ad8003 100644 --- a/src/mesa/drivers/dri/common/vblank.h +++ b/src/mesa/drivers/dri/common/vblank.h @@ -44,17 +44,17 @@ #define VBLANK_FLAG_SECONDARY (1U << 8) /* Wait for secondary vblank. */ -extern int driGetMSC32( __DRIscreenPrivate * priv, int64_t * count ); -extern int driDrawableGetMSC32( __DRIscreenPrivate * priv, - __DRIdrawablePrivate * drawablePrivate, +extern int driGetMSC32( __DRIscreen * priv, int64_t * count ); +extern int driDrawableGetMSC32( __DRIscreen * priv, + __DRIdrawable * drawablePrivate, int64_t * count); -extern int driWaitForMSC32( __DRIdrawablePrivate *priv, +extern int driWaitForMSC32( __DRIdrawable *priv, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t * msc ); extern GLuint driGetDefaultVBlankFlags( const driOptionCache *optionCache ); -extern void driDrawableInitVBlank ( __DRIdrawablePrivate *priv ); -extern unsigned driGetVBlankInterval( const __DRIdrawablePrivate *priv ); -extern void driGetCurrentVBlank( __DRIdrawablePrivate *priv ); -extern int driWaitForVBlank( __DRIdrawablePrivate *priv, +extern void driDrawableInitVBlank ( __DRIdrawable *priv ); +extern unsigned driGetVBlankInterval( const __DRIdrawable *priv ); +extern void driGetCurrentVBlank( __DRIdrawable *priv ); +extern int driWaitForVBlank( __DRIdrawable *priv, GLboolean * missed_deadline ); #undef usleep diff --git a/src/mesa/drivers/dri/fb/fb_dri.c b/src/mesa/drivers/dri/fb/fb_dri.c index fd869b2fe7..11058b3853 100644 --- a/src/mesa/drivers/dri/fb/fb_dri.c +++ b/src/mesa/drivers/dri/fb/fb_dri.c @@ -64,9 +64,9 @@ typedef struct { GLcontext *glCtx; /* Mesa context */ struct { - __DRIcontextPrivate *context; - __DRIscreenPrivate *screen; - __DRIdrawablePrivate *drawable; /* drawable bound to this ctx */ + __DRIcontext *context; + __DRIscreen *screen; + __DRIdrawable *drawable; /* drawable bound to this ctx */ } dri; } fbContext, *fbContextPtr; @@ -313,14 +313,14 @@ fbSetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis) /* Initialize the driver specific screen private data. */ static GLboolean -fbInitDriver( __DRIscreenPrivate *sPriv ) +fbInitDriver( __DRIscreen *sPriv ) { sPriv->private = NULL; return GL_TRUE; } static void -fbDestroyScreen( __DRIscreenPrivate *sPriv ) +fbDestroyScreen( __DRIscreen *sPriv ) { } @@ -329,7 +329,7 @@ fbDestroyScreen( __DRIscreenPrivate *sPriv ) */ static GLboolean fbCreateContext( const __GLcontextModes *glVisual, - __DRIcontextPrivate *driContextPriv, + __DRIcontext *driContextPriv, void *sharedContextPrivate) { fbContextPtr fbmesa; @@ -384,7 +384,7 @@ fbCreateContext( const __GLcontextModes *glVisual, static void -fbDestroyContext( __DRIcontextPrivate *driContextPriv ) +fbDestroyContext( __DRIcontext *driContextPriv ) { GET_CURRENT_CONTEXT(ctx); fbContextPtr fbmesa = (fbContextPtr) driContextPriv->driverPrivate; @@ -415,8 +415,8 @@ fbDestroyContext( __DRIcontextPrivate *driContextPriv ) * data. */ static GLboolean -fbCreateBuffer( __DRIscreenPrivate *driScrnPriv, - __DRIdrawablePrivate *driDrawPriv, +fbCreateBuffer( __DRIscreen *driScrnPriv, + __DRIdrawable *driDrawPriv, const __GLcontextModes *mesaVis, GLboolean isPixmap ) { @@ -478,7 +478,7 @@ fbCreateBuffer( __DRIscreenPrivate *driScrnPriv, static void -fbDestroyBuffer(__DRIdrawablePrivate *driDrawPriv) +fbDestroyBuffer(__DRIdrawable *driDrawPriv) { _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL); } @@ -488,7 +488,7 @@ fbDestroyBuffer(__DRIdrawablePrivate *driDrawPriv) /* If the backbuffer is on a videocard, this is extraordinarily slow! */ static void -fbSwapBuffers( __DRIdrawablePrivate *dPriv ) +fbSwapBuffers( __DRIdrawable *dPriv ) { struct gl_framebuffer *mesa_framebuffer = (struct gl_framebuffer *)dPriv->driverPrivate; struct gl_renderbuffer * front_renderbuffer = mesa_framebuffer->Attachment[BUFFER_FRONT_LEFT].Renderbuffer; @@ -532,9 +532,9 @@ fbSwapBuffers( __DRIdrawablePrivate *dPriv ) * buffer `b'. */ static GLboolean -fbMakeCurrent( __DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv ) +fbMakeCurrent( __DRIcontext *driContextPriv, + __DRIdrawable *driDrawPriv, + __DRIdrawable *driReadPriv ) { if ( driContextPriv ) { fbContextPtr newFbCtx = @@ -556,7 +556,7 @@ fbMakeCurrent( __DRIcontextPrivate *driContextPriv, /* Force the context `c' to be unbound from its buffer. */ static GLboolean -fbUnbindContext( __DRIcontextPrivate *driContextPriv ) +fbUnbindContext( __DRIcontext *driContextPriv ) { return GL_TRUE; } @@ -657,7 +657,7 @@ struct DRIDriverRec __driDriver = { }; static __GLcontextModes * -fbFillInModes( __DRIscreenPrivate *psp, +fbFillInModes( __DRIscreen *psp, unsigned pixel_bits, unsigned depth_bits, unsigned stencil_bits, GLboolean have_back_buffer ) { @@ -745,7 +745,7 @@ fbFillInModes( __DRIscreenPrivate *psp, * with the \c __GLcontextModes that the driver can support for windows or * pbuffers. * - * \return A pointer to a \c __DRIscreenPrivate on success, or \c NULL on + * \return A pointer to a \c __DRIscreen on success, or \c NULL on * failure. */ PUBLIC @@ -759,7 +759,7 @@ void * __driCreateNewScreen( __DRInativeDisplay *dpy, int scrn, __DRIscreen *psc int internal_api_version, __GLcontextModes ** driver_modes ) { - __DRIscreenPrivate *psp; + __DRIscreen *psp; static const __DRIversion ddx_expected = { 4, 0, 0 }; static const __DRIversion dri_expected = { 4, 0, 0 }; static const __DRIversion drm_expected = { 1, 5, 0 }; diff --git a/src/mesa/drivers/dri/fb/fb_egl.c b/src/mesa/drivers/dri/fb/fb_egl.c index eb7adf8224..02e44bb8ee 100644 --- a/src/mesa/drivers/dri/fb/fb_egl.c +++ b/src/mesa/drivers/dri/fb/fb_egl.c @@ -84,9 +84,9 @@ typedef struct fb_context _EGLContext Base; /* base class/object */ GLcontext *glCtx; struct { - __DRIcontextPrivate *context; - __DRIscreenPrivate *screen; - __DRIdrawablePrivate *drawable; /* drawable bound to this ctx */ + __DRIcontext *context; + __DRIscreen *screen; + __DRIdrawable *drawable; /* drawable bound to this ctx */ } dri; } fbContext, *fbContextPtr; diff --git a/src/mesa/drivers/dri/ffb/ffb_bitmap.c b/src/mesa/drivers/dri/ffb/ffb_bitmap.c index f89c0412df..611afddfaf 100644 --- a/src/mesa/drivers/dri/ffb/ffb_bitmap.c +++ b/src/mesa/drivers/dri/ffb/ffb_bitmap.c @@ -46,7 +46,7 @@ ffb_bitmap(GLcontext *ctx, GLint px, GLint py, { ffbContextPtr fmesa = FFB_CONTEXT(ctx); ffb_fbcPtr ffb = fmesa->regs; - __DRIdrawablePrivate *dPriv = fmesa->driDrawable; + __DRIdrawable *dPriv = fmesa->driDrawable; unsigned int ppc, pixel; GLint row, col, row_stride; const GLubyte *src; diff --git a/src/mesa/drivers/dri/ffb/ffb_clear.c b/src/mesa/drivers/dri/ffb/ffb_clear.c index 776fb487f8..dfe60f36f2 100644 --- a/src/mesa/drivers/dri/ffb/ffb_clear.c +++ b/src/mesa/drivers/dri/ffb/ffb_clear.c @@ -123,7 +123,7 @@ CreatorComputePageFillFixups(struct ff_fixups *fixups, } static void -ffb_do_clear(GLcontext *ctx, __DRIdrawablePrivate *dPriv) +ffb_do_clear(GLcontext *ctx, __DRIdrawable *dPriv) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); FFBDRIPtr gDRIPriv = (FFBDRIPtr) fmesa->driScreen->pDevPriv; @@ -252,7 +252,7 @@ ffb_do_clear(GLcontext *ctx, __DRIdrawablePrivate *dPriv) void ffbDDClear(GLcontext *ctx, GLbitfield mask) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = fmesa->driDrawable; + __DRIdrawable *dPriv = fmesa->driDrawable; unsigned int stcmask = BUFFER_BIT_STENCIL; #ifdef CLEAR_TRACE diff --git a/src/mesa/drivers/dri/ffb/ffb_context.h b/src/mesa/drivers/dri/ffb/ffb_context.h index 77f87d41c3..4d1d53ff59 100644 --- a/src/mesa/drivers/dri/ffb/ffb_context.h +++ b/src/mesa/drivers/dri/ffb/ffb_context.h @@ -273,8 +273,8 @@ do { if ((STATE_MASK) & ~((FMESA)->state_dirty)) { \ unsigned int setupnewinputs; unsigned int new_gl_state; - __DRIdrawablePrivate *driDrawable; - __DRIscreenPrivate *driScreen; + __DRIdrawable *driDrawable; + __DRIscreen *driScreen; ffbScreenPrivate *ffbScreen; ffb_dri_state_t *ffb_sarea; } ffbContextRec, *ffbContextPtr; diff --git a/src/mesa/drivers/dri/ffb/ffb_depth.c b/src/mesa/drivers/dri/ffb/ffb_depth.c index 71f204d21e..5d509ff696 100644 --- a/src/mesa/drivers/dri/ffb/ffb_depth.c +++ b/src/mesa/drivers/dri/ffb/ffb_depth.c @@ -49,7 +49,7 @@ static void FFBWriteDepthSpan( GLcontext *ctx, #endif if (ctx->Depth.Mask) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = fmesa->driDrawable; + __DRIdrawable *dPriv = fmesa->driDrawable; GLuint *zptr; GLuint i; @@ -110,7 +110,7 @@ static void FFBWriteDepthPixels( GLcontext *ctx, #endif if (ctx->Depth.Mask) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = fmesa->driDrawable; + __DRIdrawable *dPriv = fmesa->driDrawable; char *zbase; GLuint i; @@ -153,7 +153,7 @@ static void FFBReadDepthSpan( GLcontext *ctx, { GLuint *depth = (GLuint *) values; ffbContextPtr fmesa = FFB_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = fmesa->driDrawable; + __DRIdrawable *dPriv = fmesa->driDrawable; GLuint *zptr; GLuint i; @@ -194,7 +194,7 @@ static void FFBReadDepthPixels( GLcontext *ctx, { GLuint *depth = (GLuint *) values; ffbContextPtr fmesa = FFB_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = fmesa->driDrawable; + __DRIdrawable *dPriv = fmesa->driDrawable; char *zbase; GLuint i; diff --git a/src/mesa/drivers/dri/ffb/ffb_span.c b/src/mesa/drivers/dri/ffb/ffb_span.c index 0d3d604095..8ec33a11bc 100644 --- a/src/mesa/drivers/dri/ffb/ffb_span.c +++ b/src/mesa/drivers/dri/ffb/ffb_span.c @@ -45,7 +45,7 @@ UNLOCK_HARDWARE(fmesa); \ #define LOCAL_VARS \ - __DRIdrawablePrivate *dPriv = fmesa->driDrawable; \ + __DRIdrawable *dPriv = fmesa->driDrawable; \ GLuint height = dPriv->h; \ GLuint p; \ char *buf; \ diff --git a/src/mesa/drivers/dri/ffb/ffb_state.c b/src/mesa/drivers/dri/ffb/ffb_state.c index 5eb8f417ff..6f8a46d1fc 100644 --- a/src/mesa/drivers/dri/ffb/ffb_state.c +++ b/src/mesa/drivers/dri/ffb/ffb_state.c @@ -384,7 +384,7 @@ ffbDDStencilOpSeparate(GLcontext *ctx, GLenum face, GLenum fail, static void ffbCalcViewportRegs(GLcontext *ctx) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = fmesa->driDrawable; + __DRIdrawable *dPriv = fmesa->driDrawable; GLuint xmin, xmax, ymin, ymax, zmin, zmax; unsigned int vcmin, vcmax; @@ -430,7 +430,7 @@ void ffbCalcViewport(GLcontext *ctx) ffbContextPtr fmesa = FFB_CONTEXT(ctx); const GLfloat *v = ctx->Viewport._WindowMap.m; GLfloat *m = fmesa->hw_viewport; - __DRIdrawablePrivate *dPriv = fmesa->driDrawable; + __DRIdrawable *dPriv = fmesa->driDrawable; m[MAT_SX] = v[MAT_SX]; m[MAT_TX] = v[MAT_TX] + dPriv->x + SUBPIXEL_X; @@ -762,7 +762,7 @@ static void ffbDDLineStipple(GLcontext *ctx, GLint factor, GLushort pattern) void ffbXformAreaPattern(ffbContextPtr fmesa, const GLubyte *mask) { - __DRIdrawablePrivate *dPriv = fmesa->driDrawable; + __DRIdrawable *dPriv = fmesa->driDrawable; int i, lines, xoff; lines = 0; diff --git a/src/mesa/drivers/dri/ffb/ffb_stencil.c b/src/mesa/drivers/dri/ffb/ffb_stencil.c index 921a83d274..ce8ef43c91 100644 --- a/src/mesa/drivers/dri/ffb/ffb_stencil.c +++ b/src/mesa/drivers/dri/ffb/ffb_stencil.c @@ -48,7 +48,7 @@ static void FFBWriteStencilSpan( GLcontext *ctx, #endif if (ctx->Depth.Mask) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = fmesa->driDrawable; + __DRIdrawable *dPriv = fmesa->driDrawable; GLuint *zptr; GLuint i; @@ -93,7 +93,7 @@ static void FFBWriteStencilPixels( GLcontext *ctx, #endif if (ctx->Depth.Mask) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = fmesa->driDrawable; + __DRIdrawable *dPriv = fmesa->driDrawable; char *zbase; GLuint i; @@ -136,7 +136,7 @@ static void FFBReadStencilSpan( GLcontext *ctx, { GLubyte *stencil = (GLubyte *) values; ffbContextPtr fmesa = FFB_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = fmesa->driDrawable; + __DRIdrawable *dPriv = fmesa->driDrawable; GLuint *zptr; GLuint i; @@ -176,7 +176,7 @@ static void FFBReadStencilPixels( GLcontext *ctx, { GLubyte *stencil = (GLubyte *) values; ffbContextPtr fmesa = FFB_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = fmesa->driDrawable; + __DRIdrawable *dPriv = fmesa->driDrawable; char *zbase; GLuint i; diff --git a/src/mesa/drivers/dri/ffb/ffb_tris.c b/src/mesa/drivers/dri/ffb/ffb_tris.c index e7dd960ba1..8bf5ae498f 100644 --- a/src/mesa/drivers/dri/ffb/ffb_tris.c +++ b/src/mesa/drivers/dri/ffb/ffb_tris.c @@ -351,7 +351,7 @@ static struct { #define LOCAL_VARS(n) \ ffbContextPtr fmesa = FFB_CONTEXT(ctx); \ - __DRIdrawablePrivate *dPriv = fmesa->driDrawable; \ + __DRIdrawable *dPriv = fmesa->driDrawable; \ ffb_color color[n] = { { 0 } }; \ (void) color; (void) dPriv; diff --git a/src/mesa/drivers/dri/ffb/ffb_xmesa.c b/src/mesa/drivers/dri/ffb/ffb_xmesa.c index 09cc26d09e..ea212e9dbd 100644 --- a/src/mesa/drivers/dri/ffb/ffb_xmesa.c +++ b/src/mesa/drivers/dri/ffb/ffb_xmesa.c @@ -62,7 +62,7 @@ #include "drirenderbuffer.h" static GLboolean -ffbInitDriver(__DRIscreenPrivate *sPriv) +ffbInitDriver(__DRIscreen *sPriv) { ffbScreenPrivate *ffbScreen; FFBDRIPtr gDRIPriv = (FFBDRIPtr) sPriv->pDevPriv; @@ -154,7 +154,7 @@ ffbInitDriver(__DRIscreenPrivate *sPriv) static void -ffbDestroyScreen(__DRIscreenPrivate *sPriv) +ffbDestroyScreen(__DRIscreen *sPriv) { ffbScreenPrivate *ffbScreen = sPriv->private; FFBDRIPtr gDRIPriv = (FFBDRIPtr) sPriv->pDevPriv; @@ -183,12 +183,12 @@ static const struct tnl_pipeline_stage *ffb_pipeline[] = { /* Create and initialize the Mesa and driver specific context data */ static GLboolean ffbCreateContext(const __GLcontextModes *mesaVis, - __DRIcontextPrivate *driContextPriv, + __DRIcontext *driContextPriv, void *sharedContextPrivate) { ffbContextPtr fmesa; GLcontext *ctx, *shareCtx; - __DRIscreenPrivate *sPriv; + __DRIscreen *sPriv; ffbScreenPrivate *ffbScreen; char *debug; struct dd_function_table functions; @@ -306,7 +306,7 @@ ffbCreateContext(const __GLcontextModes *mesaVis, } static void -ffbDestroyContext(__DRIcontextPrivate *driContextPriv) +ffbDestroyContext(__DRIcontext *driContextPriv) { ffbContextPtr fmesa = (ffbContextPtr) driContextPriv->driverPrivate; @@ -328,8 +328,8 @@ ffbDestroyContext(__DRIcontextPrivate *driContextPriv) /* Create and initialize the Mesa and driver specific pixmap buffer data */ static GLboolean -ffbCreateBuffer(__DRIscreenPrivate *driScrnPriv, - __DRIdrawablePrivate *driDrawPriv, +ffbCreateBuffer(__DRIscreen *driScrnPriv, + __DRIdrawable *driDrawPriv, const __GLcontextModes *mesaVis, GLboolean isPixmap ) { @@ -392,7 +392,7 @@ ffbCreateBuffer(__DRIscreenPrivate *driScrnPriv, static void -ffbDestroyBuffer(__DRIdrawablePrivate *driDrawPriv) +ffbDestroyBuffer(__DRIdrawable *driDrawPriv) { _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL); } @@ -401,7 +401,7 @@ ffbDestroyBuffer(__DRIdrawablePrivate *driDrawPriv) #define USE_FAST_SWAP static void -ffbSwapBuffers( __DRIdrawablePrivate *dPriv ) +ffbSwapBuffers( __DRIdrawable *dPriv ) { ffbContextPtr fmesa = (ffbContextPtr) dPriv->driContextPriv->driverPrivate; unsigned int fbc, wid, wid_reg_val, dac_db_bit; @@ -532,9 +532,9 @@ static void ffb_init_wid(ffbContextPtr fmesa, unsigned int wid) /* Force the context `c' to be the current context and associate with it buffer `b' */ static GLboolean -ffbMakeCurrent(__DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv) +ffbMakeCurrent(__DRIcontext *driContextPriv, + __DRIdrawable *driDrawPriv, + __DRIdrawable *driReadPriv) { if (driContextPriv) { ffbContextPtr fmesa = (ffbContextPtr) driContextPriv->driverPrivate; @@ -581,15 +581,15 @@ ffbMakeCurrent(__DRIcontextPrivate *driContextPriv, /* Force the context `c' to be unbound from its buffer */ static GLboolean -ffbUnbindContext(__DRIcontextPrivate *driContextPriv) +ffbUnbindContext(__DRIcontext *driContextPriv) { return GL_TRUE; } void ffbXMesaUpdateState(ffbContextPtr fmesa) { - __DRIdrawablePrivate *dPriv = fmesa->driDrawable; - __DRIscreenPrivate *sPriv = fmesa->driScreen; + __DRIdrawable *dPriv = fmesa->driDrawable; + __DRIscreen *sPriv = fmesa->driScreen; int stamp = dPriv->lastStamp; DRI_VALIDATE_DRAWABLE_INFO(sPriv, dPriv); @@ -607,7 +607,7 @@ void ffbXMesaUpdateState(ffbContextPtr fmesa) } static const __DRIconfig ** -ffbFillInModes( __DRIscreenPrivate *psp, +ffbFillInModes( __DRIscreen *psp, unsigned pixel_bits, unsigned depth_bits, unsigned stencil_bits, GLboolean have_back_buffer ) { diff --git a/src/mesa/drivers/dri/ffb/ffb_xmesa.h b/src/mesa/drivers/dri/ffb/ffb_xmesa.h index 255da4c5f8..2b1740d221 100644 --- a/src/mesa/drivers/dri/ffb/ffb_xmesa.h +++ b/src/mesa/drivers/dri/ffb/ffb_xmesa.h @@ -11,7 +11,7 @@ #include "ffb_fifo.h" typedef struct { - __DRIscreenPrivate *sPriv; + __DRIscreen *sPriv; ffb_fbcPtr regs; ffb_dacPtr dac; volatile char *sfb8r; diff --git a/src/mesa/drivers/dri/gamma/gamma_context.c b/src/mesa/drivers/dri/gamma/gamma_context.c index b0ac299daa..bab5b69a8e 100644 --- a/src/mesa/drivers/dri/gamma/gamma_context.c +++ b/src/mesa/drivers/dri/gamma/gamma_context.c @@ -68,11 +68,11 @@ static const struct tnl_pipeline_stage *gamma_pipeline[] = { }; GLboolean gammaCreateContext( const __GLcontextModes *glVisual, - __DRIcontextPrivate *driContextPriv, + __DRIcontext *driContextPriv, void *sharedContextPrivate) { GLcontext *ctx, *shareCtx; - __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + __DRIscreen *sPriv = driContextPriv->driScreenPriv; gammaContextPtr gmesa; gammaScreenPtr gammascrn; GLINTSAREADRIPtr saPriv=(GLINTSAREADRIPtr)(((char*)sPriv->pSAREA)+ diff --git a/src/mesa/drivers/dri/gamma/gamma_context.h b/src/mesa/drivers/dri/gamma/gamma_context.h index a32ccb6007..c386aa3007 100644 --- a/src/mesa/drivers/dri/gamma/gamma_context.h +++ b/src/mesa/drivers/dri/gamma/gamma_context.h @@ -58,10 +58,10 @@ typedef union { #define MAX_TEXTURE_STACK 2 extern void gammaDDUpdateHWState(GLcontext *ctx); -extern gammaScreenPtr gammaCreateScreen(__DRIscreenPrivate *sPriv); -extern void gammaDestroyScreen(__DRIscreenPrivate *sPriv); +extern gammaScreenPtr gammaCreateScreen(__DRIscreen *sPriv); +extern void gammaDestroyScreen(__DRIscreen *sPriv); extern GLboolean gammaCreateContext( const __GLcontextModes *glVisual, - __DRIcontextPrivate *driContextPriv, + __DRIcontext *driContextPriv, void *sharedContextPrivate); #define GAMMA_UPLOAD_ALL 0xffffffff @@ -230,9 +230,9 @@ typedef void (*gamma_point_func)( gammaContextPtr, struct gamma_context { GLcontext *glCtx; /* Mesa context */ - __DRIcontextPrivate *driContext; - __DRIscreenPrivate *driScreen; - __DRIdrawablePrivate *driDrawable; + __DRIcontext *driContext; + __DRIscreen *driScreen; + __DRIdrawable *driDrawable; GLuint new_gl_state; GLuint new_state; diff --git a/src/mesa/drivers/dri/gamma/gamma_lock.c b/src/mesa/drivers/dri/gamma/gamma_lock.c index 8f2d01688c..cd4acef24d 100644 --- a/src/mesa/drivers/dri/gamma/gamma_lock.c +++ b/src/mesa/drivers/dri/gamma/gamma_lock.c @@ -19,8 +19,8 @@ int prevLockLine = 0; */ void gammaGetLock( gammaContextPtr gmesa, GLuint flags ) { - __DRIdrawablePrivate *dPriv = gmesa->driDrawable; - __DRIscreenPrivate *sPriv = gmesa->driScreen; + __DRIdrawable *dPriv = gmesa->driDrawable; + __DRIscreen *sPriv = gmesa->driScreen; drmGetLock( gmesa->driFd, gmesa->hHWContext, flags ); diff --git a/src/mesa/drivers/dri/gamma/gamma_macros.h b/src/mesa/drivers/dri/gamma/gamma_macros.h index c15483b770..d962dcdb56 100644 --- a/src/mesa/drivers/dri/gamma/gamma_macros.h +++ b/src/mesa/drivers/dri/gamma/gamma_macros.h @@ -245,8 +245,8 @@ do { \ #ifdef DO_VALIDATE #define VALIDATE_DRAWABLE_INFO_NO_LOCK(gcp) \ do { \ - /*__DRIscreenPrivate *psp = gcp->driScreen;*/ \ - __DRIdrawablePrivate *pdp = gcp->driDrawable; \ + /*__DRIscreen *psp = gcp->driScreen;*/ \ + __DRIdrawable *pdp = gcp->driDrawable; \ \ if (*(pdp->pStamp) != pdp->lastStamp) { \ int old_index = pdp->index; \ @@ -301,7 +301,7 @@ do { \ #define VALIDATE_DRAWABLE_INFO(gcp) \ do { \ - __DRIscreenPrivate *psp = gcp->driScreen; \ + __DRIscreen *psp = gcp->driScreen; \ if (gcp->driDrawable) { \ DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); \ VALIDATE_DRAWABLE_INFO_NO_LOCK(gcp); \ diff --git a/src/mesa/drivers/dri/gamma/gamma_screen.c b/src/mesa/drivers/dri/gamma/gamma_screen.c index f899ebec96..f72a4a5696 100644 --- a/src/mesa/drivers/dri/gamma/gamma_screen.c +++ b/src/mesa/drivers/dri/gamma/gamma_screen.c @@ -29,7 +29,7 @@ #include "main/imports.h" -gammaScreenPtr gammaCreateScreen( __DRIscreenPrivate *sPriv ) +gammaScreenPtr gammaCreateScreen( __DRIscreen *sPriv ) { gammaScreenPtr gammaScreen; GLINTDRIPtr gDRIPriv = (GLINTDRIPtr)sPriv->pDevPriv; @@ -129,7 +129,7 @@ gammaScreenPtr gammaCreateScreen( __DRIscreenPrivate *sPriv ) /* Destroy the device specific screen private data struct. */ -void gammaDestroyScreen( __DRIscreenPrivate *sPriv ) +void gammaDestroyScreen( __DRIscreen *sPriv ) { gammaScreenPtr gammaScreen = (gammaScreenPtr)sPriv->private; diff --git a/src/mesa/drivers/dri/gamma/gamma_screen.h b/src/mesa/drivers/dri/gamma/gamma_screen.h index 7f0ed6f80e..c716ea89c2 100644 --- a/src/mesa/drivers/dri/gamma/gamma_screen.h +++ b/src/mesa/drivers/dri/gamma/gamma_screen.h @@ -11,7 +11,7 @@ typedef struct { drmBufMapPtr bufs; /* Map of DMA buffers */ - __DRIscreenPrivate *driScreen; /* Back pointer to DRI screen */ + __DRIscreen *driScreen; /* Back pointer to DRI screen */ int cpp; int frontPitch; diff --git a/src/mesa/drivers/dri/gamma/gamma_span.c b/src/mesa/drivers/dri/gamma/gamma_span.c index cdaaac3f3a..3f0b81800c 100644 --- a/src/mesa/drivers/dri/gamma/gamma_span.c +++ b/src/mesa/drivers/dri/gamma/gamma_span.c @@ -10,8 +10,8 @@ #define LOCAL_VARS \ gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); \ gammaScreenPtr gammascrn = gmesa->gammaScreen; \ - __DRIscreenPrivate *sPriv = gmesa->driScreen; \ - __DRIdrawablePrivate *dPriv = gmesa->driDrawable; \ + __DRIscreen *sPriv = gmesa->driScreen; \ + __DRIdrawable *dPriv = gmesa->driDrawable; \ GLuint pitch = sPriv->fbWidth * gammascrn->cpp; \ GLuint height = dPriv->h; \ char *buf = (char *)(sPriv->pFB + \ @@ -24,8 +24,8 @@ /* FIXME! Depth/Stencil read/writes don't work ! */ #define LOCAL_DEPTH_VARS \ gammaScreenPtr gammascrn = gmesa->gammaScreen; \ - __DRIdrawablePrivate *dPriv = gmesa->driDrawable; \ - __DRIscreenPrivate *sPriv = gmesa->driScreen; \ + __DRIdrawable *dPriv = gmesa->driDrawable; \ + __DRIscreen *sPriv = gmesa->driScreen; \ GLuint pitch = gammascrn->depthPitch; \ GLuint height = dPriv->h; \ char *buf = (char *)(sPriv->pFB + \ diff --git a/src/mesa/drivers/dri/gamma/gamma_state.c b/src/mesa/drivers/dri/gamma/gamma_state.c index bdd1c86ab7..47df37466d 100644 --- a/src/mesa/drivers/dri/gamma/gamma_state.c +++ b/src/mesa/drivers/dri/gamma/gamma_state.c @@ -1070,7 +1070,7 @@ static void gammaDDReadBuffer( GLcontext *ctx, GLenum mode ) void gammaUpdateWindow( GLcontext *ctx ) { gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = gmesa->driDrawable; + __DRIdrawable *dPriv = gmesa->driDrawable; GLfloat xoffset = (GLfloat)dPriv->x; GLfloat yoffset = gmesa->driScreen->fbHeight - (GLfloat)dPriv->y - dPriv->h; const GLfloat *v = ctx->Viewport._WindowMap.m; @@ -1109,7 +1109,7 @@ static void gammaDDDepthRange( GLcontext *ctx, GLclampd nearval, void gammaUpdateViewportOffset( GLcontext *ctx ) { gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = gmesa->driDrawable; + __DRIdrawable *dPriv = gmesa->driDrawable; GLfloat xoffset = (GLfloat)dPriv->x; GLfloat yoffset = gmesa->driScreen->fbHeight - (GLfloat)dPriv->y - dPriv->h; const GLfloat *v = ctx->Viewport._WindowMap.m; diff --git a/src/mesa/drivers/dri/gamma/gamma_xmesa.c b/src/mesa/drivers/dri/gamma/gamma_xmesa.c index 7b5b53589c..3492f5cb0f 100644 --- a/src/mesa/drivers/dri/gamma/gamma_xmesa.c +++ b/src/mesa/drivers/dri/gamma/gamma_xmesa.c @@ -36,7 +36,7 @@ #include "vbo/vbo.h" static GLboolean -gammaInitDriver(__DRIscreenPrivate *sPriv) +gammaInitDriver(__DRIscreen *sPriv) { sPriv->private = (void *) gammaCreateScreen( sPriv ); @@ -49,7 +49,7 @@ gammaInitDriver(__DRIscreenPrivate *sPriv) } static void -gammaDestroyContext(__DRIcontextPrivate *driContextPriv) +gammaDestroyContext(__DRIcontext *driContextPriv) { gammaContextPtr gmesa = (gammaContextPtr)driContextPriv->driverPrivate; @@ -72,8 +72,8 @@ gammaDestroyContext(__DRIcontextPrivate *driContextPriv) static GLboolean -gammaCreateBuffer( __DRIscreenPrivate *driScrnPriv, - __DRIdrawablePrivate *driDrawPriv, +gammaCreateBuffer( __DRIscreen *driScrnPriv, + __DRIdrawable *driDrawPriv, const __GLcontextModes *mesaVis, GLboolean isPixmap ) { @@ -94,17 +94,17 @@ gammaCreateBuffer( __DRIscreenPrivate *driScrnPriv, static void -gammaDestroyBuffer(__DRIdrawablePrivate *driDrawPriv) +gammaDestroyBuffer(__DRIdrawable *driDrawPriv) { _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL); } static void -gammaSwapBuffers( __DRIdrawablePrivate *dPriv ) +gammaSwapBuffers( __DRIdrawable *dPriv ) { if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) { gammaContextPtr gmesa; - __DRIscreenPrivate *driScrnPriv; + __DRIscreen *driScrnPriv; GLcontext *ctx; gmesa = (gammaContextPtr) dPriv->driContextPriv->driverPrivate; @@ -127,7 +127,7 @@ gammaSwapBuffers( __DRIdrawablePrivate *dPriv ) int i; int nRect = dPriv->numClipRects; drm_clip_rect_t *pRect = dPriv->pClipRects; - __DRIscreenPrivate *driScrnPriv = gmesa->driScreen; + __DRIscreen *driScrnPriv = gmesa->driScreen; GLINTDRIPtr gDRIPriv = (GLINTDRIPtr)driScrnPriv->pDevPriv; CHECK_DMA_BUFFER(gmesa, 2); @@ -193,9 +193,9 @@ gammaSwapBuffers( __DRIdrawablePrivate *dPriv ) } static GLboolean -gammaMakeCurrent(__DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv) +gammaMakeCurrent(__DRIcontext *driContextPriv, + __DRIdrawable *driDrawPriv, + __DRIdrawable *driReadPriv) { if (driContextPriv) { GET_CURRENT_CONTEXT(ctx); @@ -232,7 +232,7 @@ newGammaCtx->new_state |= GAMMA_NEW_WINDOW; /* FIXME */ static GLboolean -gammaUnbindContext( __DRIcontextPrivate *driContextPriv ) +gammaUnbindContext( __DRIcontext *driContextPriv ) { return GL_TRUE; } @@ -254,12 +254,12 @@ const struct __DriverAPIRec driDriverAPI = { /* * This is the bootstrap function for the driver. * The __driCreateScreen name is the symbol that libGL.so fetches. - * Return: pointer to a __DRIscreenPrivate. + * Return: pointer to a __DRIscreen. */ void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, int numConfigs, __GLXvisualConfig *config) { - __DRIscreenPrivate *psp; + __DRIscreen *psp; psp = __driUtilCreateScreen(dpy, scrn, psc, numConfigs, config, &gammaAPI); return (void *) psp; } diff --git a/src/mesa/drivers/dri/i810/i810context.c b/src/mesa/drivers/dri/i810/i810context.c index 7311b2e765..bd9cfe5c0f 100644 --- a/src/mesa/drivers/dri/i810/i810context.c +++ b/src/mesa/drivers/dri/i810/i810context.c @@ -170,12 +170,12 @@ static const struct dri_debug_control debug_control[] = GLboolean i810CreateContext( const __GLcontextModes *mesaVis, - __DRIcontextPrivate *driContextPriv, + __DRIcontext *driContextPriv, void *sharedContextPrivate ) { GLcontext *ctx, *shareCtx; i810ContextPtr imesa; - __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + __DRIscreen *sPriv = driContextPriv->driScreenPriv; i810ScreenPrivate *i810Screen = (i810ScreenPrivate *)sPriv->private; I810SAREAPtr saPriv = (I810SAREAPtr) (((GLubyte *)sPriv->pSAREA) + i810Screen->sarea_priv_offset); @@ -337,7 +337,7 @@ i810CreateContext( const __GLcontextModes *mesaVis, } void -i810DestroyContext(__DRIcontextPrivate *driContextPriv) +i810DestroyContext(__DRIcontext *driContextPriv) { i810ContextPtr imesa = (i810ContextPtr) driContextPriv->driverPrivate; @@ -378,7 +378,7 @@ i810DestroyContext(__DRIcontextPrivate *driContextPriv) void i810XMesaSetFrontClipRects( i810ContextPtr imesa ) { - __DRIdrawablePrivate *dPriv = imesa->driDrawable; + __DRIdrawable *dPriv = imesa->driDrawable; imesa->numClipRects = dPriv->numClipRects; imesa->pClipRects = dPriv->pClipRects; @@ -392,7 +392,7 @@ void i810XMesaSetFrontClipRects( i810ContextPtr imesa ) void i810XMesaSetBackClipRects( i810ContextPtr imesa ) { - __DRIdrawablePrivate *dPriv = imesa->driDrawable; + __DRIdrawable *dPriv = imesa->driDrawable; if (imesa->sarea->pf_enabled == 0 && dPriv->numBackClipRects == 0) { @@ -430,7 +430,7 @@ static void i810XMesaWindowMoved( i810ContextPtr imesa ) GLboolean -i810UnbindContext(__DRIcontextPrivate *driContextPriv) +i810UnbindContext(__DRIcontext *driContextPriv) { i810ContextPtr imesa = (i810ContextPtr) driContextPriv->driverPrivate; if (imesa) { @@ -444,9 +444,9 @@ i810UnbindContext(__DRIcontextPrivate *driContextPriv) GLboolean -i810MakeCurrent(__DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv) +i810MakeCurrent(__DRIcontext *driContextPriv, + __DRIdrawable *driDrawPriv, + __DRIdrawable *driReadPriv) { if (driContextPriv) { i810ContextPtr imesa = (i810ContextPtr) driContextPriv->driverPrivate; @@ -504,8 +504,8 @@ i810UpdatePageFlipping( i810ContextPtr imesa ) void i810GetLock( i810ContextPtr imesa, GLuint flags ) { - __DRIdrawablePrivate *dPriv = imesa->driDrawable; - __DRIscreenPrivate *sPriv = imesa->driScreen; + __DRIdrawable *dPriv = imesa->driDrawable; + __DRIscreen *sPriv = imesa->driScreen; I810SAREAPtr sarea = imesa->sarea; int me = imesa->hHWContext; unsigned i; @@ -551,7 +551,7 @@ void i810GetLock( i810ContextPtr imesa, GLuint flags ) void -i810SwapBuffers( __DRIdrawablePrivate *dPriv ) +i810SwapBuffers( __DRIdrawable *dPriv ) { if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) { i810ContextPtr imesa; diff --git a/src/mesa/drivers/dri/i810/i810context.h b/src/mesa/drivers/dri/i810/i810context.h index 4b8c71d7c6..19529db020 100644 --- a/src/mesa/drivers/dri/i810/i810context.h +++ b/src/mesa/drivers/dri/i810/i810context.h @@ -170,8 +170,8 @@ struct i810_context_t { drm_hw_lock_t *driHwLock; int driFd; - __DRIdrawablePrivate *driDrawable; - __DRIscreenPrivate *driScreen; + __DRIdrawable *driDrawable; + __DRIscreen *driScreen; i810ScreenPrivate *i810Screen; I810SAREAPtr sarea; }; diff --git a/src/mesa/drivers/dri/i810/i810ioctl.c b/src/mesa/drivers/dri/i810/i810ioctl.c index 3df9c2ac47..623d50c5cb 100644 --- a/src/mesa/drivers/dri/i810/i810ioctl.c +++ b/src/mesa/drivers/dri/i810/i810ioctl.c @@ -50,7 +50,7 @@ static drmBufPtr i810_get_buffer_ioctl( i810ContextPtr imesa ) static void i810Clear( GLcontext *ctx, GLbitfield mask ) { i810ContextPtr imesa = I810_CONTEXT( ctx ); - __DRIdrawablePrivate *dPriv = imesa->driDrawable; + __DRIdrawable *dPriv = imesa->driDrawable; const GLuint colorMask = *((GLuint *) &ctx->Color.ColorMask); drmI810Clear clear; unsigned int i; @@ -149,7 +149,7 @@ static void i810Clear( GLcontext *ctx, GLbitfield mask ) /* * Copy the back buffer to the front buffer. */ -void i810CopyBuffer( const __DRIdrawablePrivate *dPriv ) +void i810CopyBuffer( const __DRIdrawable *dPriv ) { i810ContextPtr imesa; drm_clip_rect_t *pbox; @@ -197,7 +197,7 @@ void i810CopyBuffer( const __DRIdrawablePrivate *dPriv ) /* * XXX implement when full-screen extension is done. */ -void i810PageFlip( const __DRIdrawablePrivate *dPriv ) +void i810PageFlip( const __DRIdrawable *dPriv ) { i810ContextPtr imesa; int tmp, ret; diff --git a/src/mesa/drivers/dri/i810/i810ioctl.h b/src/mesa/drivers/dri/i810/i810ioctl.h index dfd6e21088..926e38ce51 100644 --- a/src/mesa/drivers/dri/i810/i810ioctl.h +++ b/src/mesa/drivers/dri/i810/i810ioctl.h @@ -14,8 +14,8 @@ void i810WaitAge( i810ContextPtr imesa, int age ); void i810DmaFinish( i810ContextPtr imesa ); void i810RegetLockQuiescent( i810ContextPtr imesa ); void i810InitIoctlFuncs( struct dd_function_table *functions ); -void i810CopyBuffer( const __DRIdrawablePrivate *dpriv ); -void i810PageFlip( const __DRIdrawablePrivate *dpriv ); +void i810CopyBuffer( const __DRIdrawable *dpriv ); +void i810PageFlip( const __DRIdrawable *dpriv ); int i810_check_copy(int fd); #define I810_STATECHANGE(imesa, flag) \ diff --git a/src/mesa/drivers/dri/i810/i810screen.c b/src/mesa/drivers/dri/i810/i810screen.c index 2f6b8631ff..09da4700c7 100644 --- a/src/mesa/drivers/dri/i810/i810screen.c +++ b/src/mesa/drivers/dri/i810/i810screen.c @@ -54,7 +54,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "GL/internal/dri_interface.h" static const __DRIconfig ** -i810FillInModes( __DRIscreenPrivate *psp, +i810FillInModes( __DRIscreen *psp, unsigned pixel_bits, unsigned depth_bits, unsigned stencil_bits, GLboolean have_back_buffer ) { @@ -255,7 +255,7 @@ i810InitScreen(__DRIscreen *sPriv) } static void -i810DestroyScreen(__DRIscreenPrivate *sPriv) +i810DestroyScreen(__DRIscreen *sPriv) { i810ScreenPrivate *i810Screen = (i810ScreenPrivate *)sPriv->private; @@ -274,8 +274,8 @@ i810DestroyScreen(__DRIscreenPrivate *sPriv) * Create a buffer which corresponds to the window. */ static GLboolean -i810CreateBuffer( __DRIscreenPrivate *driScrnPriv, - __DRIdrawablePrivate *driDrawPriv, +i810CreateBuffer( __DRIscreen *driScrnPriv, + __DRIdrawable *driDrawPriv, const __GLcontextModes *mesaVis, GLboolean isPixmap ) { @@ -335,7 +335,7 @@ i810CreateBuffer( __DRIscreenPrivate *driScrnPriv, static void -i810DestroyBuffer(__DRIdrawablePrivate *driDrawPriv) +i810DestroyBuffer(__DRIdrawable *driDrawPriv) { _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL); } diff --git a/src/mesa/drivers/dri/i810/i810screen.h b/src/mesa/drivers/dri/i810/i810screen.h index b29937665a..734e2fb002 100644 --- a/src/mesa/drivers/dri/i810/i810screen.h +++ b/src/mesa/drivers/dri/i810/i810screen.h @@ -71,7 +71,7 @@ typedef struct { int textureSize; int logTextureGranularity; - __DRIscreenPrivate *driScrnPriv; + __DRIscreen *driScrnPriv; drmBufMapPtr bufs; unsigned int sarea_priv_offset; } i810ScreenPrivate; @@ -79,21 +79,21 @@ typedef struct { extern GLboolean i810CreateContext( const __GLcontextModes *mesaVis, - __DRIcontextPrivate *driContextPriv, + __DRIcontext *driContextPriv, void *sharedContextPrivate ); extern void -i810DestroyContext(__DRIcontextPrivate *driContextPriv); +i810DestroyContext(__DRIcontext *driContextPriv); extern GLboolean -i810UnbindContext(__DRIcontextPrivate *driContextPriv); +i810UnbindContext(__DRIcontext *driContextPriv); extern GLboolean -i810MakeCurrent(__DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv); +i810MakeCurrent(__DRIcontext *driContextPriv, + __DRIdrawable *driDrawPriv, + __DRIdrawable *driReadPriv); extern void -i810SwapBuffers(__DRIdrawablePrivate *driDrawPriv); +i810SwapBuffers(__DRIdrawable *driDrawPriv); #endif diff --git a/src/mesa/drivers/dri/i810/i810span.c b/src/mesa/drivers/dri/i810/i810span.c index 510723f445..6576f6745e 100644 --- a/src/mesa/drivers/dri/i810/i810span.c +++ b/src/mesa/drivers/dri/i810/i810span.c @@ -15,7 +15,7 @@ #define LOCAL_VARS \ i810ContextPtr imesa = I810_CONTEXT(ctx); \ - __DRIdrawablePrivate *dPriv = imesa->driDrawable; \ + __DRIdrawable *dPriv = imesa->driDrawable; \ driRenderbuffer *drb = (driRenderbuffer *) rb; \ GLuint pitch = drb->pitch; \ GLuint height = dPriv->h; \ @@ -27,7 +27,7 @@ #define LOCAL_DEPTH_VARS \ i810ContextPtr imesa = I810_CONTEXT(ctx); \ - __DRIdrawablePrivate *dPriv = imesa->driDrawable; \ + __DRIdrawable *dPriv = imesa->driDrawable; \ driRenderbuffer *drb = (driRenderbuffer *) rb; \ GLuint pitch = drb->pitch; \ GLuint height = dPriv->h; \ diff --git a/src/mesa/drivers/dri/i810/i810state.c b/src/mesa/drivers/dri/i810/i810state.c index 1e7a6cfe47..642245c61c 100644 --- a/src/mesa/drivers/dri/i810/i810state.c +++ b/src/mesa/drivers/dri/i810/i810state.c @@ -641,7 +641,7 @@ static void i810Enable(GLcontext *ctx, GLenum cap, GLboolean state) void i810EmitDrawingRectangle( i810ContextPtr imesa ) { - __DRIdrawablePrivate *dPriv = imesa->driDrawable; + __DRIdrawable *dPriv = imesa->driDrawable; i810ScreenPrivate *i810Screen = imesa->i810Screen; int x0 = imesa->drawX; int y0 = imesa->drawY; diff --git a/src/mesa/drivers/dri/i915/i830_context.c b/src/mesa/drivers/dri/i915/i830_context.c index 840946f908..4cb6305988 100644 --- a/src/mesa/drivers/dri/i915/i830_context.c +++ b/src/mesa/drivers/dri/i915/i830_context.c @@ -53,7 +53,7 @@ extern const struct tnl_pipeline_stage *intel_pipeline[]; GLboolean i830CreateContext(const __GLcontextModes * mesaVis, - __DRIcontextPrivate * driContextPriv, + __DRIcontext * driContextPriv, void *sharedContextPrivate) { struct dd_function_table functions; diff --git a/src/mesa/drivers/dri/i915/i830_context.h b/src/mesa/drivers/dri/i915/i830_context.h index f73cbbf88b..592ae53976 100644 --- a/src/mesa/drivers/dri/i915/i830_context.h +++ b/src/mesa/drivers/dri/i915/i830_context.h @@ -178,7 +178,7 @@ i830_state_draw_region(struct intel_context *intel, */ extern GLboolean i830CreateContext(const __GLcontextModes * mesaVis, - __DRIcontextPrivate * driContextPriv, + __DRIcontext * driContextPriv, void *sharedContextPrivate); /* i830_tex.c, i830_texstate.c diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c index 0485be2cc1..7c7711da09 100644 --- a/src/mesa/drivers/dri/i915/i915_context.c +++ b/src/mesa/drivers/dri/i915/i915_context.c @@ -100,7 +100,7 @@ extern const struct tnl_pipeline_stage *intel_pipeline[]; GLboolean i915CreateContext(const __GLcontextModes * mesaVis, - __DRIcontextPrivate * driContextPriv, + __DRIcontext * driContextPriv, void *sharedContextPrivate) { struct dd_function_table functions; diff --git a/src/mesa/drivers/dri/i915/i915_context.h b/src/mesa/drivers/dri/i915/i915_context.h index 25418d5f7a..f55b551139 100644 --- a/src/mesa/drivers/dri/i915/i915_context.h +++ b/src/mesa/drivers/dri/i915/i915_context.h @@ -318,7 +318,7 @@ do { \ * i915_context.c */ extern GLboolean i915CreateContext(const __GLcontextModes * mesaVis, - __DRIcontextPrivate * driContextPriv, + __DRIcontext * driContextPriv, void *sharedContextPrivate); diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index d8af2c512b..7bb15956b5 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -77,7 +77,7 @@ static void brwInitDriverFunctions( struct dd_function_table *functions ) } GLboolean brwCreateContext( const __GLcontextModes *mesaVis, - __DRIcontextPrivate *driContextPriv, + __DRIcontext *driContextPriv, void *sharedContextPrivate) { struct dd_function_table functions; diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index ea5503e2fe..0dd3087143 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -679,7 +679,7 @@ void brwInitVtbl( struct brw_context *brw ); * brw_context.c */ GLboolean brwCreateContext( const __GLcontextModes *mesaVis, - __DRIcontextPrivate *driContextPriv, + __DRIcontext *driContextPriv, void *sharedContextPrivate); /*====================================================================== diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c index d437b1e030..2155feec84 100644 --- a/src/mesa/drivers/dri/i965/brw_misc_state.c +++ b/src/mesa/drivers/dri/i965/brw_misc_state.c @@ -330,7 +330,7 @@ const struct brw_tracked_state brw_polygon_stipple = { static void upload_polygon_stipple_offset(struct brw_context *brw) { - __DRIdrawablePrivate *dPriv = brw->intel.driDrawable; + __DRIdrawable *dPriv = brw->intel.driDrawable; struct brw_polygon_stipple_offset bpso; memset(&bpso, 0, sizeof(bpso)); diff --git a/src/mesa/drivers/dri/intel/intel_blit.c b/src/mesa/drivers/dri/intel/intel_blit.c index da9beba030..4b83e1d22d 100644 --- a/src/mesa/drivers/dri/intel/intel_blit.c +++ b/src/mesa/drivers/dri/intel/intel_blit.c @@ -47,7 +47,7 @@ * Used for SwapBuffers(). */ void -intelCopyBuffer(const __DRIdrawablePrivate * dPriv, +intelCopyBuffer(const __DRIdrawable * dPriv, const drm_clip_rect_t * rect) { diff --git a/src/mesa/drivers/dri/intel/intel_blit.h b/src/mesa/drivers/dri/intel/intel_blit.h index 240cb7cd1b..eb66fe0481 100644 --- a/src/mesa/drivers/dri/intel/intel_blit.h +++ b/src/mesa/drivers/dri/intel/intel_blit.h @@ -30,7 +30,7 @@ #include "intel_context.h" -extern void intelCopyBuffer(const __DRIdrawablePrivate * dpriv, +extern void intelCopyBuffer(const __DRIdrawable * dpriv, const drm_clip_rect_t * rect); extern void intelClearWithBlit(GLcontext * ctx, GLbitfield mask); diff --git a/src/mesa/drivers/dri/intel/intel_buffers.c b/src/mesa/drivers/dri/intel/intel_buffers.c index 97d56e4e67..219b3603f7 100644 --- a/src/mesa/drivers/dri/intel/intel_buffers.c +++ b/src/mesa/drivers/dri/intel/intel_buffers.c @@ -102,7 +102,7 @@ intel_get_cliprects(struct intel_context *intel, unsigned int *num_cliprects, int *x_off, int *y_off) { - __DRIdrawablePrivate *dPriv = intel->driDrawable; + __DRIdrawable *dPriv = intel->driDrawable; if (intel->constant_cliprect) { /* FBO or DRI2 rendering, which can just use the fb's size. */ diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index eccba5bd23..5ed09f14ca 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -590,13 +590,13 @@ intelInitDriverFunctions(struct dd_function_table *functions) GLboolean intelInitContext(struct intel_context *intel, const __GLcontextModes * mesaVis, - __DRIcontextPrivate * driContextPriv, + __DRIcontext * driContextPriv, void *sharedContextPrivate, struct dd_function_table *functions) { GLcontext *ctx = &intel->ctx; GLcontext *shareCtx = (GLcontext *) sharedContextPrivate; - __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + __DRIscreen *sPriv = driContextPriv->driScreenPriv; intelScreenPrivate *intelScreen = (intelScreenPrivate *) sPriv->private; int bo_reuse_mode; @@ -801,7 +801,7 @@ intelInitContext(struct intel_context *intel, } void -intelDestroyContext(__DRIcontextPrivate * driContextPriv) +intelDestroyContext(__DRIcontext * driContextPriv) { struct intel_context *intel = (struct intel_context *) driContextPriv->driverPrivate; @@ -857,7 +857,7 @@ intelDestroyContext(__DRIcontextPrivate * driContextPriv) * to avoid many layers of "if" constructs. */ do { - __DRIdrawablePrivate * driDrawPriv = intel->driDrawable; + __DRIdrawable * driDrawPriv = intel->driDrawable; struct intel_framebuffer *intel_fb; struct intel_renderbuffer *irbDepth, *irbStencil; if (!driDrawPriv) { @@ -910,7 +910,7 @@ intelDestroyContext(__DRIcontextPrivate * driContextPriv) } GLboolean -intelUnbindContext(__DRIcontextPrivate * driContextPriv) +intelUnbindContext(__DRIcontext * driContextPriv) { struct intel_context *intel = (struct intel_context *) driContextPriv->driverPrivate; @@ -924,11 +924,11 @@ intelUnbindContext(__DRIcontextPrivate * driContextPriv) } GLboolean -intelMakeCurrent(__DRIcontextPrivate * driContextPriv, - __DRIdrawablePrivate * driDrawPriv, - __DRIdrawablePrivate * driReadPriv) +intelMakeCurrent(__DRIcontext * driContextPriv, + __DRIdrawable * driDrawPriv, + __DRIdrawable * driReadPriv) { - __DRIscreenPrivate *psp = driDrawPriv->driScreenPriv; + __DRIscreen *psp = driDrawPriv->driScreenPriv; struct intel_context *intel; GET_CURRENT_CONTEXT(curCtx); @@ -1031,8 +1031,8 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv, static void intelContendedLock(struct intel_context *intel, GLuint flags) { - __DRIdrawablePrivate *dPriv = intel->driDrawable; - __DRIscreenPrivate *sPriv = intel->driScreen; + __DRIdrawable *dPriv = intel->driDrawable; + __DRIscreen *sPriv = intel->driScreen; volatile drm_i915_sarea_t *sarea = intel->sarea; int me = intel->hHWContext; diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h index 09e8223bc7..6e0b47160a 100644 --- a/src/mesa/drivers/dri/intel/intel_context.h +++ b/src/mesa/drivers/dri/intel/intel_context.h @@ -299,10 +299,10 @@ struct intel_context drmLock *driHwLock; int driFd; - __DRIcontextPrivate *driContext; - __DRIdrawablePrivate *driDrawable; - __DRIdrawablePrivate *driReadDrawable; - __DRIscreenPrivate *driScreen; + __DRIcontext *driContext; + __DRIdrawable *driDrawable; + __DRIdrawable *driReadDrawable; + __DRIscreen *driScreen; intelScreenPrivate *intelScreen; volatile drm_i915_sarea_t *sarea; @@ -439,7 +439,7 @@ extern int INTEL_DEBUG; extern GLboolean intelInitContext(struct intel_context *intel, const __GLcontextModes * mesaVis, - __DRIcontextPrivate * driContextPriv, + __DRIcontext * driContextPriv, void *sharedContextPrivate, struct dd_function_table *functions); diff --git a/src/mesa/drivers/dri/intel/intel_pixel_read.c b/src/mesa/drivers/dri/intel/intel_pixel_read.c index 20424e2e58..3b75b718ff 100644 --- a/src/mesa/drivers/dri/intel/intel_pixel_read.c +++ b/src/mesa/drivers/dri/intel/intel_pixel_read.c @@ -77,7 +77,7 @@ do_texture_readpixels(GLcontext * ctx, struct intel_context *intel = intel_context(ctx); intelScreenPrivate *screen = intel->intelScreen; GLint pitch = pack->RowLength ? pack->RowLength : width; - __DRIdrawablePrivate *dPriv = intel->driDrawable; + __DRIdrawable *dPriv = intel->driDrawable; int textureFormat; GLenum glTextureFormat; int destFormat, depthFormat, destPitch; @@ -233,7 +233,7 @@ do_blit_readpixels(GLcontext * ctx, dri_bo *dst_buffer = intel_bufferobj_buffer(intel, dst, all ? INTEL_WRITE_FULL : INTEL_WRITE_PART); - __DRIdrawablePrivate *dPriv = intel->driReadDrawable; + __DRIdrawable *dPriv = intel->driReadDrawable; int nbox = dPriv->numClipRects; drm_clip_rect_t *box = dPriv->pClipRects; drm_clip_rect_t rect; diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index a3d676741a..d8d89b1ec1 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -109,7 +109,7 @@ static PFNGLXCREATECONTEXTMODES create_context_modes = NULL; * \return GL_TRUE if success, GL_FALSE if error. */ GLboolean -intelMapScreenRegions(__DRIscreenPrivate * sPriv) +intelMapScreenRegions(__DRIscreen * sPriv) { intelScreenPrivate *intelScreen = (intelScreenPrivate *) sPriv->private; @@ -140,7 +140,7 @@ intelUnmapScreenRegions(intelScreenPrivate * intelScreen) static void intelPrintDRIInfo(intelScreenPrivate * intelScreen, - __DRIscreenPrivate * sPriv, I830DRIPtr gDRIPriv) + __DRIscreen * sPriv, I830DRIPtr gDRIPriv) { fprintf(stderr, "*** Front size: 0x%x offset: 0x%x pitch: %d\n", intelScreen->front.size, intelScreen->front.offset, @@ -248,7 +248,7 @@ static const __DRIextension *intelScreenExtensions[] = { }; static GLboolean -intel_get_param(__DRIscreenPrivate *psp, int param, int *value) +intel_get_param(__DRIscreen *psp, int param, int *value) { int ret; struct drm_i915_getparam gp; @@ -265,7 +265,7 @@ intel_get_param(__DRIscreenPrivate *psp, int param, int *value) return GL_TRUE; } -static GLboolean intelInitDriver(__DRIscreenPrivate *sPriv) +static GLboolean intelInitDriver(__DRIscreen *sPriv) { intelScreenPrivate *intelScreen; I830DRIPtr gDRIPriv = (I830DRIPtr) sPriv->pDevPriv; @@ -321,7 +321,7 @@ static GLboolean intelInitDriver(__DRIscreenPrivate *sPriv) static void -intelDestroyScreen(__DRIscreenPrivate * sPriv) +intelDestroyScreen(__DRIscreen * sPriv) { intelScreenPrivate *intelScreen = (intelScreenPrivate *) sPriv->private; @@ -338,8 +338,8 @@ intelDestroyScreen(__DRIscreenPrivate * sPriv) * This is called when we need to set up GL rendering to a new X window. */ static GLboolean -intelCreateBuffer(__DRIscreenPrivate * driScrnPriv, - __DRIdrawablePrivate * driDrawPriv, +intelCreateBuffer(__DRIscreen * driScrnPriv, + __DRIdrawable * driDrawPriv, const __GLcontextModes * mesaVis, GLboolean isPixmap) { if (isPixmap) { @@ -415,7 +415,7 @@ intelCreateBuffer(__DRIscreenPrivate * driScrnPriv, } static void -intelDestroyBuffer(__DRIdrawablePrivate * driDrawPriv) +intelDestroyBuffer(__DRIdrawable * driDrawPriv) { struct intel_framebuffer *intel_fb = driDrawPriv->driverPrivate; struct intel_renderbuffer *depth_rb; @@ -449,7 +449,7 @@ intelDestroyBuffer(__DRIdrawablePrivate * driDrawPriv) * Get information about previous buffer swaps. */ static int -intelGetSwapInfo(__DRIdrawablePrivate * dPriv, __DRIswapInfo * sInfo) +intelGetSwapInfo(__DRIdrawable * dPriv, __DRIswapInfo * sInfo) { struct intel_framebuffer *intel_fb; @@ -476,22 +476,22 @@ intelGetSwapInfo(__DRIdrawablePrivate * dPriv, __DRIswapInfo * sInfo) * functions. */ extern GLboolean i830CreateContext(const __GLcontextModes * mesaVis, - __DRIcontextPrivate * driContextPriv, + __DRIcontext * driContextPriv, void *sharedContextPrivate); extern GLboolean i915CreateContext(const __GLcontextModes * mesaVis, - __DRIcontextPrivate * driContextPriv, + __DRIcontext * driContextPriv, void *sharedContextPrivate); extern GLboolean brwCreateContext(const __GLcontextModes * mesaVis, - __DRIcontextPrivate * driContextPriv, + __DRIcontext * driContextPriv, void *sharedContextPrivate); static GLboolean intelCreateContext(const __GLcontextModes * mesaVis, - __DRIcontextPrivate * driContextPriv, + __DRIcontext * driContextPriv, void *sharedContextPrivate) { - __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + __DRIscreen *sPriv = driContextPriv->driScreenPriv; intelScreenPrivate *intelScreen = (intelScreenPrivate *) sPriv->private; #ifdef I915 @@ -514,7 +514,7 @@ intelCreateContext(const __GLcontextModes * mesaVis, static __DRIconfig ** -intelFillInModes(__DRIscreenPrivate *psp, +intelFillInModes(__DRIscreen *psp, unsigned pixel_bits, unsigned depth_bits, unsigned stencil_bits, GLboolean have_back_buffer) { @@ -606,7 +606,7 @@ intel_init_bufmgr(intelScreenPrivate *intelScreen) { int gem_kernel = 0; struct drm_i915_getparam gp; - __DRIscreenPrivate *spriv = intelScreen->driScrnPriv; + __DRIscreen *spriv = intelScreen->driScrnPriv; int num_fences = 0; intelScreen->no_hw = getenv("INTEL_NO_HW") != NULL; @@ -650,7 +650,7 @@ intel_init_bufmgr(intelScreenPrivate *intelScreen) * * \return the __GLcontextModes supported by this driver */ -static const __DRIconfig **intelInitScreen(__DRIscreenPrivate *psp) +static const __DRIconfig **intelInitScreen(__DRIscreen *psp) { intelScreenPrivate *intelScreen; #ifdef I915 @@ -706,7 +706,7 @@ struct intel_context *intelScreenContext(intelScreenPrivate *intelScreen) * \return the __GLcontextModes supported by this driver */ static const -__DRIconfig **intelInitScreen2(__DRIscreenPrivate *psp) +__DRIconfig **intelInitScreen2(__DRIscreen *psp) { intelScreenPrivate *intelScreen; GLenum fb_format[3]; diff --git a/src/mesa/drivers/dri/intel/intel_screen.h b/src/mesa/drivers/dri/intel/intel_screen.h index 14ca0903b6..e87e306d86 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.h +++ b/src/mesa/drivers/dri/intel/intel_screen.h @@ -66,7 +66,7 @@ typedef struct int logTextureGranularity; - __DRIscreenPrivate *driScrnPriv; + __DRIscreen *driScrnPriv; volatile drm_i915_sarea_t *sarea; @@ -88,18 +88,18 @@ typedef struct -extern GLboolean intelMapScreenRegions(__DRIscreenPrivate * sPriv); +extern GLboolean intelMapScreenRegions(__DRIscreen * sPriv); extern void intelUnmapScreenRegions(intelScreenPrivate * intelScreen); -extern void intelDestroyContext(__DRIcontextPrivate * driContextPriv); +extern void intelDestroyContext(__DRIcontext * driContextPriv); -extern GLboolean intelUnbindContext(__DRIcontextPrivate * driContextPriv); +extern GLboolean intelUnbindContext(__DRIcontext * driContextPriv); extern GLboolean -intelMakeCurrent(__DRIcontextPrivate * driContextPriv, - __DRIdrawablePrivate * driDrawPriv, - __DRIdrawablePrivate * driReadPriv); +intelMakeCurrent(__DRIcontext * driContextPriv, + __DRIdrawable * driDrawPriv, + __DRIdrawable * driReadPriv); extern struct intel_context *intelScreenContext(intelScreenPrivate *intelScreen); diff --git a/src/mesa/drivers/dri/intel/intel_swapbuffers.c b/src/mesa/drivers/dri/intel/intel_swapbuffers.c index 5ae1240718..c975b40d3c 100644 --- a/src/mesa/drivers/dri/intel/intel_swapbuffers.c +++ b/src/mesa/drivers/dri/intel/intel_swapbuffers.c @@ -41,7 +41,7 @@ * When considering multiple crtcs. */ GLuint -intelFixupVblank(struct intel_context *intel, __DRIdrawablePrivate *dPriv) +intelFixupVblank(struct intel_context *intel, __DRIdrawable *dPriv) { if (!intel->intelScreen->driScrnPriv->dri2.enabled && intel->intelScreen->driScrnPriv->ddx_version.minor >= 7) { @@ -85,9 +85,9 @@ intelFixupVblank(struct intel_context *intel, __DRIdrawablePrivate *dPriv) * Called from driSwapBuffers() */ void -intelSwapBuffers(__DRIdrawablePrivate * dPriv) +intelSwapBuffers(__DRIdrawable * dPriv) { - __DRIscreenPrivate *psp = dPriv->driScreenPriv; + __DRIscreen *psp = dPriv->driScreenPriv; if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) { GET_CURRENT_CONTEXT(ctx); @@ -144,7 +144,7 @@ intelSwapBuffers(__DRIdrawablePrivate * dPriv) * Called from driCopySubBuffer() */ void -intelCopySubBuffer(__DRIdrawablePrivate * dPriv, int x, int y, int w, int h) +intelCopySubBuffer(__DRIdrawable * dPriv, int x, int y, int w, int h) { if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) { struct intel_context *intel = @@ -176,7 +176,7 @@ void intelWindowMoved(struct intel_context *intel) { GLcontext *ctx = &intel->ctx; - __DRIdrawablePrivate *dPriv = intel->driDrawable; + __DRIdrawable *dPriv = intel->driDrawable; struct intel_framebuffer *intel_fb = dPriv->driverPrivate; if (!intel->intelScreen->driScrnPriv->dri2.enabled && diff --git a/src/mesa/drivers/dri/intel/intel_swapbuffers.h b/src/mesa/drivers/dri/intel/intel_swapbuffers.h index 75bb6242ff..82b77c6362 100644 --- a/src/mesa/drivers/dri/intel/intel_swapbuffers.h +++ b/src/mesa/drivers/dri/intel/intel_swapbuffers.h @@ -37,13 +37,13 @@ struct intel_framebuffer; extern void -intelSwapBuffers(__DRIdrawablePrivate * dPriv); +intelSwapBuffers(__DRIdrawable * dPriv); extern void -intelCopySubBuffer(__DRIdrawablePrivate * dPriv, int x, int y, int w, int h); +intelCopySubBuffer(__DRIdrawable * dPriv, int x, int y, int w, int h); extern GLuint -intelFixupVblank(struct intel_context *intel, __DRIdrawablePrivate *dPriv); +intelFixupVblank(struct intel_context *intel, __DRIdrawable *dPriv); extern void intelWindowMoved(struct intel_context *intel); diff --git a/src/mesa/drivers/dri/intel/intel_tex_copy.c b/src/mesa/drivers/dri/intel/intel_tex_copy.c index ee953cfbe7..a70738c958 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_copy.c +++ b/src/mesa/drivers/dri/intel/intel_tex_copy.c @@ -138,7 +138,7 @@ do_copy_texsubimage(struct intel_context *intel, if (ctx->ReadBuffer->Name == 0) { /* reading from a window, adjust x, y */ - const __DRIdrawablePrivate *dPriv = intel->driReadDrawable; + const __DRIdrawable *dPriv = intel->driReadDrawable; y = dPriv->y + (dPriv->h - (y + height)); x += dPriv->x; diff --git a/src/mesa/drivers/dri/mach64/mach64_context.c b/src/mesa/drivers/dri/mach64/mach64_context.c index 2bca293b3c..3b4ef7ffd8 100644 --- a/src/mesa/drivers/dri/mach64/mach64_context.c +++ b/src/mesa/drivers/dri/mach64/mach64_context.c @@ -89,11 +89,11 @@ static const struct dri_extension card_extensions[] = /* Create the device specific context. */ GLboolean mach64CreateContext( const __GLcontextModes *glVisual, - __DRIcontextPrivate *driContextPriv, + __DRIcontext *driContextPriv, void *sharedContextPrivate ) { GLcontext *ctx, *shareCtx; - __DRIscreenPrivate *driScreen = driContextPriv->driScreenPriv; + __DRIscreen *driScreen = driContextPriv->driScreenPriv; struct dd_function_table functions; mach64ContextPtr mmesa; mach64ScreenPtr mach64Screen; @@ -260,7 +260,7 @@ GLboolean mach64CreateContext( const __GLcontextModes *glVisual, /* Destroy the device specific context. */ -void mach64DestroyContext( __DRIcontextPrivate *driContextPriv ) +void mach64DestroyContext( __DRIcontext *driContextPriv ) { mach64ContextPtr mmesa = (mach64ContextPtr) driContextPriv->driverPrivate; @@ -307,9 +307,9 @@ void mach64DestroyContext( __DRIcontextPrivate *driContextPriv ) * buffer `b'. */ GLboolean -mach64MakeCurrent( __DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv ) +mach64MakeCurrent( __DRIcontext *driContextPriv, + __DRIdrawable *driDrawPriv, + __DRIdrawable *driReadPriv ) { if ( driContextPriv ) { GET_CURRENT_CONTEXT(ctx); @@ -352,7 +352,7 @@ mach64MakeCurrent( __DRIcontextPrivate *driContextPriv, /* Force the context `c' to be unbound from its buffer. */ GLboolean -mach64UnbindContext( __DRIcontextPrivate *driContextPriv ) +mach64UnbindContext( __DRIcontext *driContextPriv ) { return GL_TRUE; } diff --git a/src/mesa/drivers/dri/mach64/mach64_context.h b/src/mesa/drivers/dri/mach64/mach64_context.h index 854751626d..18fc859d01 100644 --- a/src/mesa/drivers/dri/mach64/mach64_context.h +++ b/src/mesa/drivers/dri/mach64/mach64_context.h @@ -232,9 +232,9 @@ struct mach64_context { /* Mirrors of some DRI state */ - __DRIcontextPrivate *driContext; /* DRI context */ - __DRIscreenPrivate *driScreen; /* DRI screen */ - __DRIdrawablePrivate *driDrawable; /* DRI drawable bound to this ctx */ + __DRIcontext *driContext; /* DRI context */ + __DRIscreen *driScreen; /* DRI screen */ + __DRIdrawable *driDrawable; /* DRI drawable bound to this ctx */ unsigned int lastStamp; /* mirror driDrawable->lastStamp */ @@ -274,16 +274,16 @@ struct mach64_context { extern GLboolean mach64CreateContext( const __GLcontextModes *glVisual, - __DRIcontextPrivate *driContextPriv, + __DRIcontext *driContextPriv, void *sharedContextPrivate ); -extern void mach64DestroyContext( __DRIcontextPrivate * ); +extern void mach64DestroyContext( __DRIcontext * ); -extern GLboolean mach64MakeCurrent( __DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv ); +extern GLboolean mach64MakeCurrent( __DRIcontext *driContextPriv, + __DRIdrawable *driDrawPriv, + __DRIdrawable *driReadPriv ); -extern GLboolean mach64UnbindContext( __DRIcontextPrivate *driContextPriv ); +extern GLboolean mach64UnbindContext( __DRIcontext *driContextPriv ); /* ================================================================ * Byte ordering diff --git a/src/mesa/drivers/dri/mach64/mach64_ioctl.c b/src/mesa/drivers/dri/mach64/mach64_ioctl.c index ef5c0625c3..03587c44fd 100644 --- a/src/mesa/drivers/dri/mach64/mach64_ioctl.c +++ b/src/mesa/drivers/dri/mach64/mach64_ioctl.c @@ -279,7 +279,7 @@ static int mach64WaitForFrameCompletion( mach64ContextPtr mmesa ) /* Copy the back color buffer to the front color buffer. */ -void mach64CopyBuffer( __DRIdrawablePrivate *dPriv ) +void mach64CopyBuffer( __DRIdrawable *dPriv ) { mach64ContextPtr mmesa; GLint nbox, i, ret; @@ -668,7 +668,7 @@ void mach64PerformanceBoxesLocked( mach64ContextPtr mmesa ) static void mach64DDClear( GLcontext *ctx, GLbitfield mask ) { mach64ContextPtr mmesa = MACH64_CONTEXT( ctx ); - __DRIdrawablePrivate *dPriv = mmesa->driDrawable; + __DRIdrawable *dPriv = mmesa->driDrawable; drm_mach64_clear_t clear; GLuint flags = 0; GLint i; diff --git a/src/mesa/drivers/dri/mach64/mach64_ioctl.h b/src/mesa/drivers/dri/mach64/mach64_ioctl.h index 6ef9bc0bca..1ffda1932f 100644 --- a/src/mesa/drivers/dri/mach64/mach64_ioctl.h +++ b/src/mesa/drivers/dri/mach64/mach64_ioctl.h @@ -78,7 +78,7 @@ extern void mach64FireBlitLocked( mach64ContextPtr mmesa, void *buffer, GLint offset, GLint pitch, GLint format, GLint x, GLint y, GLint width, GLint height ); -extern void mach64CopyBuffer( __DRIdrawablePrivate *dPriv ); +extern void mach64CopyBuffer( __DRIdrawable *dPriv ); #if ENABLE_PERF_BOXES extern void mach64PerformanceCounters( mach64ContextPtr mmesa ); extern void mach64PerformanceBoxesLocked( mach64ContextPtr mmesa ); diff --git a/src/mesa/drivers/dri/mach64/mach64_lock.c b/src/mesa/drivers/dri/mach64/mach64_lock.c index d018ba4174..8653c77da5 100644 --- a/src/mesa/drivers/dri/mach64/mach64_lock.c +++ b/src/mesa/drivers/dri/mach64/mach64_lock.c @@ -51,8 +51,8 @@ int prevLockLine = 0; */ void mach64GetLock( mach64ContextPtr mmesa, GLuint flags ) { - __DRIdrawablePrivate *dPriv = mmesa->driDrawable; - __DRIscreenPrivate *sPriv = mmesa->driScreen; + __DRIdrawable *dPriv = mmesa->driDrawable; + __DRIscreen *sPriv = mmesa->driScreen; drm_mach64_sarea_t *sarea = mmesa->sarea; int i; diff --git a/src/mesa/drivers/dri/mach64/mach64_screen.c b/src/mesa/drivers/dri/mach64/mach64_screen.c index 3b19cf5333..63515d278c 100644 --- a/src/mesa/drivers/dri/mach64/mach64_screen.c +++ b/src/mesa/drivers/dri/mach64/mach64_screen.c @@ -68,7 +68,7 @@ static const GLuint __driNConfigOptions = 2; #endif static const __DRIconfig ** -mach64FillInModes( __DRIscreenPrivate *psp, +mach64FillInModes( __DRIscreen *psp, unsigned pixel_bits, unsigned depth_bits, unsigned stencil_bits, GLboolean have_back_buffer ) { @@ -144,7 +144,7 @@ mach64FillInModes( __DRIscreenPrivate *psp, /* Create the device specific screen private data struct. */ static mach64ScreenRec * -mach64CreateScreen( __DRIscreenPrivate *sPriv ) +mach64CreateScreen( __DRIscreen *sPriv ) { mach64ScreenPtr mach64Screen; ATIDRIPtr serverInfo = (ATIDRIPtr)sPriv->pDevPriv; @@ -272,7 +272,7 @@ mach64CreateScreen( __DRIscreenPrivate *sPriv ) /* Destroy the device specific screen private data struct. */ static void -mach64DestroyScreen( __DRIscreenPrivate *driScreen ) +mach64DestroyScreen( __DRIscreen *driScreen ) { mach64ScreenRec *mach64Screen = (mach64ScreenRec *) driScreen->private; @@ -299,8 +299,8 @@ mach64DestroyScreen( __DRIscreenPrivate *driScreen ) * data. */ static GLboolean -mach64CreateBuffer( __DRIscreenPrivate *driScrnPriv, - __DRIdrawablePrivate *driDrawPriv, +mach64CreateBuffer( __DRIscreen *driScrnPriv, + __DRIdrawable *driDrawPriv, const __GLcontextModes *mesaVis, GLboolean isPixmap ) { @@ -370,7 +370,7 @@ mach64CreateBuffer( __DRIscreenPrivate *driScrnPriv, static void -mach64DestroyBuffer(__DRIdrawablePrivate *driDrawPriv) +mach64DestroyBuffer(__DRIdrawable *driDrawPriv) { _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL); } @@ -378,7 +378,7 @@ mach64DestroyBuffer(__DRIdrawablePrivate *driDrawPriv) /* Copy the back color buffer to the front color buffer */ static void -mach64SwapBuffers(__DRIdrawablePrivate *dPriv) +mach64SwapBuffers(__DRIdrawable *dPriv) { if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) { mach64ContextPtr mmesa; @@ -400,7 +400,7 @@ mach64SwapBuffers(__DRIdrawablePrivate *dPriv) /* Initialize the driver specific screen private data. */ static GLboolean -mach64InitDriver( __DRIscreenPrivate *driScreen ) +mach64InitDriver( __DRIscreen *driScreen ) { driScreen->private = (void *) mach64CreateScreen( driScreen ); @@ -420,7 +420,7 @@ mach64InitDriver( __DRIscreenPrivate *driScreen ) * \return the __GLcontextModes supported by this driver */ static const __DRIconfig ** -mach64InitScreen(__DRIscreenPrivate *psp) +mach64InitScreen(__DRIscreen *psp) { static const __DRIversion ddx_expected = { 6, 4, 0 }; static const __DRIversion dri_expected = { 4, 0, 0 }; diff --git a/src/mesa/drivers/dri/mach64/mach64_screen.h b/src/mesa/drivers/dri/mach64/mach64_screen.h index be5e29a3e5..1966809c03 100644 --- a/src/mesa/drivers/dri/mach64/mach64_screen.h +++ b/src/mesa/drivers/dri/mach64/mach64_screen.h @@ -70,7 +70,7 @@ typedef struct { drmBufMapPtr buffers; - __DRIscreenPrivate *driScreen; + __DRIscreen *driScreen; driOptionCache optionCache; diff --git a/src/mesa/drivers/dri/mach64/mach64_span.c b/src/mesa/drivers/dri/mach64/mach64_span.c index 500319e0e3..b4ba2a41c9 100644 --- a/src/mesa/drivers/dri/mach64/mach64_span.c +++ b/src/mesa/drivers/dri/mach64/mach64_span.c @@ -40,8 +40,8 @@ #define LOCAL_VARS \ mach64ContextPtr mmesa = MACH64_CONTEXT(ctx); \ - __DRIscreenPrivate *sPriv = mmesa->driScreen; \ - __DRIdrawablePrivate *dPriv = mmesa->driDrawable; \ + __DRIscreen *sPriv = mmesa->driScreen; \ + __DRIdrawable *dPriv = mmesa->driDrawable; \ driRenderbuffer *drb = (driRenderbuffer *) rb; \ GLuint height = dPriv->h; \ GLushort p; \ @@ -49,8 +49,8 @@ #define LOCAL_DEPTH_VARS \ mach64ContextPtr mmesa = MACH64_CONTEXT(ctx); \ - __DRIdrawablePrivate *dPriv = mmesa->driDrawable; \ - __DRIscreenPrivate *driScreen = mmesa->driScreen; \ + __DRIdrawable *dPriv = mmesa->driDrawable; \ + __DRIscreen *driScreen = mmesa->driScreen; \ driRenderbuffer *drb = (driRenderbuffer *) rb; \ GLuint height = dPriv->h; \ char *buf = (char *)(driScreen->pFB + drb->offset + \ diff --git a/src/mesa/drivers/dri/mach64/mach64_state.c b/src/mesa/drivers/dri/mach64/mach64_state.c index 902905de71..df7cbc8670 100644 --- a/src/mesa/drivers/dri/mach64/mach64_state.c +++ b/src/mesa/drivers/dri/mach64/mach64_state.c @@ -388,7 +388,7 @@ static void mach64UpdateClipping( GLcontext *ctx ) mach64ScreenPtr mach64Screen = mmesa->mach64Screen; if ( mmesa->driDrawable ) { - __DRIdrawablePrivate *drawable = mmesa->driDrawable; + __DRIdrawable *drawable = mmesa->driDrawable; int x1 = 0; int y1 = 0; int x2 = drawable->w - 1; @@ -689,7 +689,7 @@ static void mach64DDLogicOpCode( GLcontext *ctx, GLenum opcode ) void mach64SetCliprects( GLcontext *ctx, GLenum mode ) { mach64ContextPtr mmesa = MACH64_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = mmesa->driDrawable; + __DRIdrawable *dPriv = mmesa->driDrawable; switch ( mode ) { case GL_FRONT_LEFT: diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.c b/src/mesa/drivers/dri/mga/mga_xmesa.c index 2c7f50c498..428afa5895 100644 --- a/src/mesa/drivers/dri/mga/mga_xmesa.c +++ b/src/mesa/drivers/dri/mga/mga_xmesa.c @@ -108,7 +108,7 @@ int MGA_DEBUG = 0; #endif static const __DRIconfig ** -mgaFillInModes( __DRIscreenPrivate *psp, +mgaFillInModes( __DRIscreen *psp, unsigned pixel_bits, unsigned depth_bits, unsigned stencil_bits, GLboolean have_back_buffer ) { @@ -190,7 +190,7 @@ const __DRIextension *mgaScreenExtensions[] = { }; static GLboolean -mgaInitDriver(__DRIscreenPrivate *sPriv) +mgaInitDriver(__DRIscreen *sPriv) { mgaScreenPrivate *mgaScreen; MGADRIPtr serverInfo = (MGADRIPtr)sPriv->pDevPriv; @@ -332,7 +332,7 @@ mgaInitDriver(__DRIscreenPrivate *sPriv) static void -mgaDestroyScreen(__DRIscreenPrivate *sPriv) +mgaDestroyScreen(__DRIscreen *sPriv) { mgaScreenPrivate *mgaScreen = (mgaScreenPrivate *) sPriv->private; @@ -426,14 +426,14 @@ static const struct dri_debug_control debug_control[] = static GLboolean mgaCreateContext( const __GLcontextModes *mesaVis, - __DRIcontextPrivate *driContextPriv, + __DRIcontext *driContextPriv, void *sharedContextPrivate ) { int i; unsigned maxlevels; GLcontext *ctx, *shareCtx; mgaContextPtr mmesa; - __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + __DRIscreen *sPriv = driContextPriv->driScreenPriv; mgaScreenPrivate *mgaScreen = (mgaScreenPrivate *)sPriv->private; drm_mga_sarea_t *saPriv = (drm_mga_sarea_t *)(((char*)sPriv->pSAREA)+ mgaScreen->sarea_priv_offset); @@ -645,7 +645,7 @@ mgaCreateContext( const __GLcontextModes *mesaVis, } static void -mgaDestroyContext(__DRIcontextPrivate *driContextPriv) +mgaDestroyContext(__DRIcontext *driContextPriv) { mgaContextPtr mmesa = (mgaContextPtr) driContextPriv->driverPrivate; @@ -697,8 +697,8 @@ mgaDestroyContext(__DRIcontextPrivate *driContextPriv) static GLboolean -mgaCreateBuffer( __DRIscreenPrivate *driScrnPriv, - __DRIdrawablePrivate *driDrawPriv, +mgaCreateBuffer( __DRIscreen *driScrnPriv, + __DRIdrawable *driDrawPriv, const __GLcontextModes *mesaVis, GLboolean isPixmap ) { @@ -814,13 +814,13 @@ mgaCreateBuffer( __DRIscreenPrivate *driScrnPriv, static void -mgaDestroyBuffer(__DRIdrawablePrivate *driDrawPriv) +mgaDestroyBuffer(__DRIdrawable *driDrawPriv) { _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL); } static void -mgaSwapBuffers(__DRIdrawablePrivate *dPriv) +mgaSwapBuffers(__DRIdrawable *dPriv) { if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) { mgaContextPtr mmesa; @@ -839,7 +839,7 @@ mgaSwapBuffers(__DRIdrawablePrivate *dPriv) } static GLboolean -mgaUnbindContext(__DRIcontextPrivate *driContextPriv) +mgaUnbindContext(__DRIcontext *driContextPriv) { mgaContextPtr mmesa = (mgaContextPtr) driContextPriv->driverPrivate; if (mmesa) @@ -855,9 +855,9 @@ mgaUnbindContext(__DRIcontextPrivate *driContextPriv) * But why are we doing context initialization here??? */ static GLboolean -mgaMakeCurrent(__DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv) +mgaMakeCurrent(__DRIcontext *driContextPriv, + __DRIdrawable *driDrawPriv, + __DRIdrawable *driReadPriv) { if (driContextPriv) { mgaContextPtr mmesa = (mgaContextPtr) driContextPriv->driverPrivate; @@ -892,7 +892,7 @@ mgaMakeCurrent(__DRIcontextPrivate *driContextPriv, void mgaGetLock( mgaContextPtr mmesa, GLuint flags ) { - __DRIdrawablePrivate *dPriv = mmesa->driDrawable; + __DRIdrawable *dPriv = mmesa->driDrawable; drm_mga_sarea_t *sarea = mmesa->sarea; int me = mmesa->hHWContext; int i; @@ -960,7 +960,7 @@ static const __DRIconfig **mgaInitScreen(__DRIscreen *psp) * Get information about previous buffer swaps. */ static int -getSwapInfo( __DRIdrawablePrivate *dPriv, __DRIswapInfo * sInfo ) +getSwapInfo( __DRIdrawable *dPriv, __DRIswapInfo * sInfo ) { mgaContextPtr mmesa; diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.h b/src/mesa/drivers/dri/mga/mga_xmesa.h index 07c22bd596..aee146090c 100644 --- a/src/mesa/drivers/dri/mga/mga_xmesa.h +++ b/src/mesa/drivers/dri/mga/mga_xmesa.h @@ -67,7 +67,7 @@ typedef struct mga_screen_private_s { char *texVirtual[MGA_NR_TEX_HEAPS]; - __DRIscreenPrivate *sPriv; + __DRIscreen *sPriv; drmBufMapPtr bufs; drmRegion mmio; diff --git a/src/mesa/drivers/dri/mga/mgacontext.h b/src/mesa/drivers/dri/mga/mgacontext.h index 30640a29b3..4141565931 100644 --- a/src/mesa/drivers/dri/mga/mgacontext.h +++ b/src/mesa/drivers/dri/mga/mgacontext.h @@ -294,10 +294,10 @@ struct mga_context_t { drm_context_t hHWContext; drm_hw_lock_t *driHwLock; int driFd; - __DRIdrawablePrivate *driDrawable; - __DRIdrawablePrivate *driReadable; + __DRIdrawable *driDrawable; + __DRIdrawable *driReadable; - __DRIscreenPrivate *driScreen; + __DRIscreen *driScreen; struct mga_screen_private_s *mgaScreen; drm_mga_sarea_t *sarea; diff --git a/src/mesa/drivers/dri/mga/mgaioctl.c b/src/mesa/drivers/dri/mga/mgaioctl.c index 4438bad920..8ce5d802ab 100644 --- a/src/mesa/drivers/dri/mga/mgaioctl.c +++ b/src/mesa/drivers/dri/mga/mgaioctl.c @@ -207,7 +207,7 @@ static void mgaClear( GLcontext *ctx, GLbitfield mask ) { mgaContextPtr mmesa = MGA_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = mmesa->driDrawable; + __DRIdrawable *dPriv = mmesa->driDrawable; GLuint flags = 0; GLuint clear_color = mmesa->ClearColor; GLuint clear_depth = 0; @@ -409,7 +409,7 @@ static void mgaWaitForFrameCompletion( mgaContextPtr mmesa ) /* * Copy the back buffer to the front buffer. */ -void mgaCopyBuffer( __DRIdrawablePrivate *dPriv ) +void mgaCopyBuffer( __DRIdrawable *dPriv ) { mgaContextPtr mmesa; drm_clip_rect_t *pbox; @@ -417,7 +417,7 @@ void mgaCopyBuffer( __DRIdrawablePrivate *dPriv ) GLint ret; GLint i; GLboolean missed_target; - __DRIscreenPrivate *psp = dPriv->driScreenPriv; + __DRIscreen *psp = dPriv->driScreenPriv; assert(dPriv); assert(dPriv->driContextPriv); diff --git a/src/mesa/drivers/dri/mga/mgaioctl.h b/src/mesa/drivers/dri/mga/mgaioctl.h index dbc823de80..7a8660d203 100644 --- a/src/mesa/drivers/dri/mga/mgaioctl.h +++ b/src/mesa/drivers/dri/mga/mgaioctl.h @@ -32,7 +32,7 @@ #include "mgacontext.h" #include "mga_xmesa.h" -void mgaCopyBuffer( __DRIdrawablePrivate *dPriv ); +void mgaCopyBuffer( __DRIdrawable *dPriv ); void mgaWaitForVBlank( mgaContextPtr mmesa ); void mgaGetILoadBufferLocked( mgaContextPtr mmesa ); diff --git a/src/mesa/drivers/dri/mga/mgapixel.c b/src/mesa/drivers/dri/mga/mgapixel.c index 05b30ba61e..69415f8a83 100644 --- a/src/mesa/drivers/dri/mga/mgapixel.c +++ b/src/mesa/drivers/dri/mga/mgapixel.c @@ -299,7 +299,7 @@ mgaTryReadPixels( GLcontext *ctx, #if 0 { - __DRIdrawablePrivate *dPriv = mmesa->driDrawable; + __DRIdrawable *dPriv = mmesa->driDrawable; int nbox, retcode, i; UPDATE_LOCK( mmesa, DRM_LOCK_FLUSH | DRM_LOCK_QUIESCENT ); @@ -399,7 +399,7 @@ static void do_draw_pix( GLcontext *ctx, #if 0 mgaContextPtr mmesa = MGA_CONTEXT(ctx); drmMGABlit blit; - __DRIdrawablePrivate *dPriv = mmesa->driDrawable; + __DRIdrawable *dPriv = mmesa->driDrawable; drm_clip_rect_t pbox = dPriv->pClipRects; int nbox = dPriv->numClipRects; int retcode, i; diff --git a/src/mesa/drivers/dri/mga/mgaspan.c b/src/mesa/drivers/dri/mga/mgaspan.c index 2ff1cac8e2..10606c152c 100644 --- a/src/mesa/drivers/dri/mga/mgaspan.c +++ b/src/mesa/drivers/dri/mga/mgaspan.c @@ -36,9 +36,9 @@ #define LOCAL_VARS \ mgaContextPtr mmesa = MGA_CONTEXT(ctx); \ - __DRIscreenPrivate *sPriv = mmesa->driScreen; \ + __DRIscreen *sPriv = mmesa->driScreen; \ driRenderbuffer *drb = (driRenderbuffer *) rb; \ - const __DRIdrawablePrivate *dPriv = drb->dPriv; \ + const __DRIdrawable *dPriv = drb->dPriv; \ GLuint pitch = drb->pitch; \ GLuint height = dPriv->h; \ char *buf = (char *)(sPriv->pFB + \ @@ -52,9 +52,9 @@ #define LOCAL_DEPTH_VARS \ mgaContextPtr mmesa = MGA_CONTEXT(ctx); \ - __DRIscreenPrivate *sPriv = mmesa->driScreen; \ + __DRIscreen *sPriv = mmesa->driScreen; \ driRenderbuffer *drb = (driRenderbuffer *) rb; \ - const __DRIdrawablePrivate *dPriv = drb->dPriv; \ + const __DRIdrawable *dPriv = drb->dPriv; \ GLuint pitch = drb->pitch; \ GLuint height = dPriv->h; \ char *buf = (char *)(sPriv->pFB + \ diff --git a/src/mesa/drivers/dri/mga/mgastate.c b/src/mesa/drivers/dri/mga/mgastate.c index 1e51057534..0253044761 100644 --- a/src/mesa/drivers/dri/mga/mgastate.c +++ b/src/mesa/drivers/dri/mga/mgastate.c @@ -746,7 +746,7 @@ static void mgaDDLogicOp( GLcontext *ctx, GLenum opcode ) static void mga_set_cliprects(mgaContextPtr mmesa) { - __DRIdrawablePrivate *driDrawable = mmesa->driDrawable; + __DRIdrawable *driDrawable = mmesa->driDrawable; if ((mmesa->draw_buffer != MGA_FRONT) || (driDrawable->numBackClipRects == 0)) { @@ -774,8 +774,8 @@ static void mga_set_cliprects(mgaContextPtr mmesa) void mgaUpdateRects( mgaContextPtr mmesa, GLuint buffers ) { - __DRIdrawablePrivate *const driDrawable = mmesa->driDrawable; - __DRIdrawablePrivate *const driReadable = mmesa->driReadable; + __DRIdrawable *const driDrawable = mmesa->driDrawable; + __DRIdrawable *const driReadable = mmesa->driReadable; mmesa->dirty_cliprects = 0; diff --git a/src/mesa/drivers/dri/r128/r128_context.c b/src/mesa/drivers/dri/r128/r128_context.c index 0b250876c5..e389e1c87b 100644 --- a/src/mesa/drivers/dri/r128/r128_context.c +++ b/src/mesa/drivers/dri/r128/r128_context.c @@ -101,11 +101,11 @@ static const struct dri_debug_control debug_control[] = /* Create the device specific context. */ GLboolean r128CreateContext( const __GLcontextModes *glVisual, - __DRIcontextPrivate *driContextPriv, + __DRIcontext *driContextPriv, void *sharedContextPrivate ) { GLcontext *ctx, *shareCtx; - __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + __DRIscreen *sPriv = driContextPriv->driScreenPriv; struct dd_function_table functions; r128ContextPtr rmesa; r128ScreenPtr r128scrn; @@ -274,7 +274,7 @@ GLboolean r128CreateContext( const __GLcontextModes *glVisual, /* Destroy the device specific context. */ -void r128DestroyContext( __DRIcontextPrivate *driContextPriv ) +void r128DestroyContext( __DRIcontext *driContextPriv ) { r128ContextPtr rmesa = (r128ContextPtr) driContextPriv->driverPrivate; @@ -325,9 +325,9 @@ void r128DestroyContext( __DRIcontextPrivate *driContextPriv ) * buffer `b'. */ GLboolean -r128MakeCurrent( __DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv ) +r128MakeCurrent( __DRIcontext *driContextPriv, + __DRIdrawable *driDrawPriv, + __DRIdrawable *driReadPriv ) { if ( driContextPriv ) { GET_CURRENT_CONTEXT(ctx); @@ -364,7 +364,7 @@ r128MakeCurrent( __DRIcontextPrivate *driContextPriv, /* Force the context `c' to be unbound from its buffer. */ GLboolean -r128UnbindContext( __DRIcontextPrivate *driContextPriv ) +r128UnbindContext( __DRIcontext *driContextPriv ) { return GL_TRUE; } diff --git a/src/mesa/drivers/dri/r128/r128_context.h b/src/mesa/drivers/dri/r128/r128_context.h index 0e10209a6a..65f845c115 100644 --- a/src/mesa/drivers/dri/r128/r128_context.h +++ b/src/mesa/drivers/dri/r128/r128_context.h @@ -186,9 +186,9 @@ struct r128_context { /* Mirrors of some DRI state */ - __DRIcontextPrivate *driContext; /* DRI context */ - __DRIscreenPrivate *driScreen; /* DRI screen */ - __DRIdrawablePrivate *driDrawable; /* DRI drawable bound to this ctx */ + __DRIcontext *driContext; /* DRI context */ + __DRIscreen *driScreen; /* DRI screen */ + __DRIdrawable *driDrawable; /* DRI drawable bound to this ctx */ unsigned int lastStamp; /* mirror driDrawable->lastStamp */ @@ -225,16 +225,16 @@ struct r128_context { extern GLboolean r128CreateContext( const __GLcontextModes *glVisual, - __DRIcontextPrivate *driContextPriv, + __DRIcontext *driContextPriv, void *sharedContextPrivate ); -extern void r128DestroyContext( __DRIcontextPrivate * ); +extern void r128DestroyContext( __DRIcontext * ); -extern GLboolean r128MakeCurrent( __DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv ); +extern GLboolean r128MakeCurrent( __DRIcontext *driContextPriv, + __DRIdrawable *driDrawPriv, + __DRIdrawable *driReadPriv ); -extern GLboolean r128UnbindContext( __DRIcontextPrivate *driContextPriv ); +extern GLboolean r128UnbindContext( __DRIcontext *driContextPriv ); /* ================================================================ * Debugging: diff --git a/src/mesa/drivers/dri/r128/r128_ioctl.c b/src/mesa/drivers/dri/r128/r128_ioctl.c index 84ac3d9f79..56758d971c 100644 --- a/src/mesa/drivers/dri/r128/r128_ioctl.c +++ b/src/mesa/drivers/dri/r128/r128_ioctl.c @@ -248,7 +248,7 @@ static int r128WaitForFrameCompletion( r128ContextPtr rmesa ) /* Copy the back color buffer to the front color buffer. */ -void r128CopyBuffer( __DRIdrawablePrivate *dPriv ) +void r128CopyBuffer( __DRIdrawable *dPriv ) { r128ContextPtr rmesa; GLint nbox, i, ret; @@ -327,7 +327,7 @@ void r128CopyBuffer( __DRIdrawablePrivate *dPriv ) #endif } -void r128PageFlip( __DRIdrawablePrivate *dPriv ) +void r128PageFlip( __DRIdrawable *dPriv ) { r128ContextPtr rmesa; GLint ret; @@ -401,7 +401,7 @@ void r128PageFlip( __DRIdrawablePrivate *dPriv ) static void r128Clear( GLcontext *ctx, GLbitfield mask ) { r128ContextPtr rmesa = R128_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = rmesa->driDrawable; + __DRIdrawable *dPriv = rmesa->driDrawable; drm_r128_clear_t clear; GLuint flags = 0; GLint i; diff --git a/src/mesa/drivers/dri/r128/r128_ioctl.h b/src/mesa/drivers/dri/r128/r128_ioctl.h index 4b0c9cdc7f..84ace900ee 100644 --- a/src/mesa/drivers/dri/r128/r128_ioctl.h +++ b/src/mesa/drivers/dri/r128/r128_ioctl.h @@ -85,8 +85,8 @@ extern void r128ReadDepthSpanLocked( r128ContextPtr rmesa, extern void r128ReadDepthPixelsLocked( r128ContextPtr rmesa, GLuint n, const GLint x[], const GLint y[] ); -extern void r128CopyBuffer( __DRIdrawablePrivate *dPriv ); -extern void r128PageFlip( __DRIdrawablePrivate *dPriv ); +extern void r128CopyBuffer( __DRIdrawable *dPriv ); +extern void r128PageFlip( __DRIdrawable *dPriv ); void r128WaitForVBlank( r128ContextPtr rmesa ); extern void r128WaitForIdleLocked( r128ContextPtr rmesa ); diff --git a/src/mesa/drivers/dri/r128/r128_lock.c b/src/mesa/drivers/dri/r128/r128_lock.c index 81488a2742..9bc3515b5a 100644 --- a/src/mesa/drivers/dri/r128/r128_lock.c +++ b/src/mesa/drivers/dri/r128/r128_lock.c @@ -68,8 +68,8 @@ r128UpdatePageFlipping( r128ContextPtr rmesa ) */ void r128GetLock( r128ContextPtr rmesa, GLuint flags ) { - __DRIdrawablePrivate *dPriv = rmesa->driDrawable; - __DRIscreenPrivate *sPriv = rmesa->driScreen; + __DRIdrawable *dPriv = rmesa->driDrawable; + __DRIscreen *sPriv = rmesa->driScreen; drm_r128_sarea_t *sarea = rmesa->sarea; int i; diff --git a/src/mesa/drivers/dri/r128/r128_screen.c b/src/mesa/drivers/dri/r128/r128_screen.c index 9da3b5fb73..fe3fb8747e 100644 --- a/src/mesa/drivers/dri/r128/r128_screen.c +++ b/src/mesa/drivers/dri/r128/r128_screen.c @@ -91,7 +91,7 @@ static const GLuint __driNConfigOptions = 3; /* Create the device specific screen private data struct. */ static r128ScreenPtr -r128CreateScreen( __DRIscreenPrivate *sPriv ) +r128CreateScreen( __DRIscreen *sPriv ) { r128ScreenPtr r128Screen; R128DRIPtr r128DRIPriv = (R128DRIPtr)sPriv->pDevPriv; @@ -236,7 +236,7 @@ r128CreateScreen( __DRIscreenPrivate *sPriv ) /* Destroy the device specific screen private data struct. */ static void -r128DestroyScreen( __DRIscreenPrivate *sPriv ) +r128DestroyScreen( __DRIscreen *sPriv ) { r128ScreenPtr r128Screen = (r128ScreenPtr)sPriv->private; @@ -262,8 +262,8 @@ r128DestroyScreen( __DRIscreenPrivate *sPriv ) * data. */ static GLboolean -r128CreateBuffer( __DRIscreenPrivate *driScrnPriv, - __DRIdrawablePrivate *driDrawPriv, +r128CreateBuffer( __DRIscreen *driScrnPriv, + __DRIdrawable *driDrawPriv, const __GLcontextModes *mesaVis, GLboolean isPixmap ) { @@ -349,7 +349,7 @@ r128CreateBuffer( __DRIscreenPrivate *driScrnPriv, static void -r128DestroyBuffer(__DRIdrawablePrivate *driDrawPriv) +r128DestroyBuffer(__DRIdrawable *driDrawPriv) { _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL); } @@ -357,7 +357,7 @@ r128DestroyBuffer(__DRIdrawablePrivate *driDrawPriv) /* Copy the back color buffer to the front color buffer */ static void -r128SwapBuffers(__DRIdrawablePrivate *dPriv) +r128SwapBuffers(__DRIdrawable *dPriv) { if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) { r128ContextPtr rmesa; @@ -384,7 +384,7 @@ r128SwapBuffers(__DRIdrawablePrivate *dPriv) /* Initialize the driver specific screen private data. */ static GLboolean -r128InitDriver( __DRIscreenPrivate *sPriv ) +r128InitDriver( __DRIscreen *sPriv ) { sPriv->private = (void *) r128CreateScreen( sPriv ); @@ -397,7 +397,7 @@ r128InitDriver( __DRIscreenPrivate *sPriv ) } static const __DRIconfig ** -r128FillInModes( __DRIscreenPrivate *psp, +r128FillInModes( __DRIscreen *psp, unsigned pixel_bits, unsigned depth_bits, unsigned stencil_bits, GLboolean have_back_buffer ) { @@ -478,7 +478,7 @@ r128FillInModes( __DRIscreenPrivate *psp, * \return the __GLcontextModes supported by this driver */ static const __DRIconfig ** -r128InitScreen(__DRIscreenPrivate *psp) +r128InitScreen(__DRIscreen *psp) { static const __DRIversion ddx_expected = { 4, 0, 0 }; static const __DRIversion dri_expected = { 4, 0, 0 }; diff --git a/src/mesa/drivers/dri/r128/r128_screen.h b/src/mesa/drivers/dri/r128/r128_screen.h index e2fa1677c9..8d450adff3 100644 --- a/src/mesa/drivers/dri/r128/r128_screen.h +++ b/src/mesa/drivers/dri/r128/r128_screen.h @@ -71,7 +71,7 @@ typedef struct { drmBufMapPtr buffers; - __DRIscreenPrivate *driScreen; + __DRIscreen *driScreen; unsigned int sarea_priv_offset; /* Configuration cache with default values for all contexts */ diff --git a/src/mesa/drivers/dri/r128/r128_span.c b/src/mesa/drivers/dri/r128/r128_span.c index d238cc3c94..0413e5b4f1 100644 --- a/src/mesa/drivers/dri/r128/r128_span.c +++ b/src/mesa/drivers/dri/r128/r128_span.c @@ -50,8 +50,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define LOCAL_VARS \ r128ContextPtr rmesa = R128_CONTEXT(ctx); \ - __DRIscreenPrivate *sPriv = rmesa->driScreen; \ - __DRIdrawablePrivate *dPriv = rmesa->driDrawable; \ + __DRIscreen *sPriv = rmesa->driScreen; \ + __DRIdrawable *dPriv = rmesa->driDrawable; \ driRenderbuffer *drb = (driRenderbuffer *) rb; \ GLuint height = dPriv->h; \ GLuint p; \ @@ -60,8 +60,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define LOCAL_DEPTH_VARS \ r128ContextPtr rmesa = R128_CONTEXT(ctx); \ r128ScreenPtr r128scrn = rmesa->r128Screen; \ - __DRIscreenPrivate *sPriv = rmesa->driScreen; \ - __DRIdrawablePrivate *dPriv = rmesa->driDrawable; \ + __DRIscreen *sPriv = rmesa->driScreen; \ + __DRIdrawable *dPriv = rmesa->driDrawable; \ GLuint height = dPriv->h; \ (void) r128scrn; (void) sPriv; (void) height diff --git a/src/mesa/drivers/dri/r128/r128_state.c b/src/mesa/drivers/dri/r128/r128_state.c index ac175d59ec..2254a7a4ff 100644 --- a/src/mesa/drivers/dri/r128/r128_state.c +++ b/src/mesa/drivers/dri/r128/r128_state.c @@ -572,7 +572,7 @@ static void r128UpdateClipping( GLcontext *ctx ) r128ContextPtr rmesa = R128_CONTEXT(ctx); if ( rmesa->driDrawable ) { - __DRIdrawablePrivate *drawable = rmesa->driDrawable; + __DRIdrawable *drawable = rmesa->driDrawable; int x1 = 0; int y1 = 0; int x2 = drawable->w - 1; diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c index 5f985d624d..f34e319222 100644 --- a/src/mesa/drivers/dri/r200/r200_context.c +++ b/src/mesa/drivers/dri/r200/r200_context.c @@ -274,10 +274,10 @@ static void r200_init_vtbl(radeonContextPtr radeon) /* Create the device specific rendering context. */ GLboolean r200CreateContext( const __GLcontextModes *glVisual, - __DRIcontextPrivate *driContextPriv, + __DRIcontext *driContextPriv, void *sharedContextPrivate) { - __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + __DRIscreen *sPriv = driContextPriv->driScreenPriv; radeonScreenPtr screen = (radeonScreenPtr)(sPriv->private); struct dd_function_table functions; r200ContextPtr rmesa; @@ -496,7 +496,7 @@ GLboolean r200CreateContext( const __GLcontextModes *glVisual, } -void r200DestroyContext( __DRIcontextPrivate *driContextPriv ) +void r200DestroyContext( __DRIcontext *driContextPriv ) { int i; r200ContextPtr rmesa = (r200ContextPtr)driContextPriv->driverPrivate; diff --git a/src/mesa/drivers/dri/r200/r200_context.h b/src/mesa/drivers/dri/r200/r200_context.h index 246f98c6dc..17e4d8962e 100644 --- a/src/mesa/drivers/dri/r200/r200_context.h +++ b/src/mesa/drivers/dri/r200/r200_context.h @@ -636,14 +636,14 @@ struct r200_context { #define R200_CONTEXT(ctx) ((r200ContextPtr)(ctx->DriverCtx)) -extern void r200DestroyContext( __DRIcontextPrivate *driContextPriv ); +extern void r200DestroyContext( __DRIcontext *driContextPriv ); extern GLboolean r200CreateContext( const __GLcontextModes *glVisual, - __DRIcontextPrivate *driContextPriv, + __DRIcontext *driContextPriv, void *sharedContextPrivate); -extern GLboolean r200MakeCurrent( __DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv ); -extern GLboolean r200UnbindContext( __DRIcontextPrivate *driContextPriv ); +extern GLboolean r200MakeCurrent( __DRIcontext *driContextPriv, + __DRIdrawable *driDrawPriv, + __DRIdrawable *driReadPriv ); +extern GLboolean r200UnbindContext( __DRIcontext *driContextPriv ); /* ================================================================ * Debugging: diff --git a/src/mesa/drivers/dri/r200/r200_ioctl.c b/src/mesa/drivers/dri/r200/r200_ioctl.c index b238adb972..66c5d3655a 100644 --- a/src/mesa/drivers/dri/r200/r200_ioctl.c +++ b/src/mesa/drivers/dri/r200/r200_ioctl.c @@ -61,7 +61,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. static void r200KernelClear(GLcontext *ctx, GLuint flags) { r200ContextPtr rmesa = R200_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon); + __DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon); GLint cx, cy, cw, ch, ret; GLuint i; @@ -185,7 +185,7 @@ static void r200KernelClear(GLcontext *ctx, GLuint flags) static void r200Clear( GLcontext *ctx, GLbitfield mask ) { r200ContextPtr rmesa = R200_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon); + __DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon); GLuint flags = 0; GLuint color_mask = 0; GLuint orig_mask = mask; diff --git a/src/mesa/drivers/dri/r200/r200_pixel.c b/src/mesa/drivers/dri/r200/r200_pixel.c index 94e43c7d66..bfb7e2a2ed 100644 --- a/src/mesa/drivers/dri/r200/r200_pixel.c +++ b/src/mesa/drivers/dri/r200/r200_pixel.c @@ -214,7 +214,7 @@ r200TryReadPixels( GLcontext *ctx, } { - __DRIdrawablePrivate *dPriv = rmesa->radeon.dri.drawable; + __DRIdrawable *dPriv = rmesa->radeon.dri.drawable; driRenderbuffer *drb = (driRenderbuffer *) ctx->ReadBuffer->_ColorReadBuffer; int nbox = dPriv->numClipRects; int src_offset = drb->offset @@ -298,7 +298,7 @@ static void do_draw_pix( GLcontext *ctx, #if 0 r200ContextPtr rmesa = R200_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon); + __DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon); drm_clip_rect_t *box = dPriv->pClipRects; struct gl_renderbuffer *rb = ctx->ReadBuffer->_ColorDrawBuffers[0]; driRenderbuffer *drb = (driRenderbuffer *) rb; diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c index 529cb62264..7fe482fe15 100644 --- a/src/mesa/drivers/dri/r200/r200_state.c +++ b/src/mesa/drivers/dri/r200/r200_state.c @@ -1585,7 +1585,7 @@ static void r200ClearStencil( GLcontext *ctx, GLint s ) void r200UpdateWindow( GLcontext *ctx ) { r200ContextPtr rmesa = R200_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon); + __DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon); GLfloat xoffset = dPriv ? (GLfloat) dPriv->x : 0; GLfloat yoffset = dPriv ? (GLfloat) dPriv->y + dPriv->h : 0; const GLfloat *v = ctx->Viewport._WindowMap.m; @@ -1665,7 +1665,7 @@ static void r200DepthRange( GLcontext *ctx, GLclampd nearval, void r200UpdateViewportOffset( GLcontext *ctx ) { r200ContextPtr rmesa = R200_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon); + __DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon); GLfloat xoffset = (GLfloat)dPriv->x; GLfloat yoffset = (GLfloat)dPriv->y + dPriv->h; const GLfloat *v = ctx->Viewport._WindowMap.m; diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c index 3c6ec2a34a..1f6ccf6ddc 100644 --- a/src/mesa/drivers/dri/r300/r300_context.c +++ b/src/mesa/drivers/dri/r300/r300_context.c @@ -463,10 +463,10 @@ static void r300InitIoctlFuncs(struct dd_function_table *functions) /* Create the device specific rendering context. */ GLboolean r300CreateContext(const __GLcontextModes * glVisual, - __DRIcontextPrivate * driContextPriv, + __DRIcontext * driContextPriv, void *sharedContextPrivate) { - __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + __DRIscreen *sPriv = driContextPriv->driScreenPriv; radeonScreenPtr screen = (radeonScreenPtr) (sPriv->private); struct dd_function_table functions; r300ContextPtr r300; diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h index 54a92a2e44..546cd8ddde 100644 --- a/src/mesa/drivers/dri/r300/r300_context.h +++ b/src/mesa/drivers/dri/r300/r300_context.h @@ -543,9 +543,9 @@ struct r300_context { #define R300_CONTEXT(ctx) ((r300ContextPtr)(ctx->DriverCtx)) -extern void r300DestroyContext(__DRIcontextPrivate * driContextPriv); +extern void r300DestroyContext(__DRIcontext * driContextPriv); extern GLboolean r300CreateContext(const __GLcontextModes * glVisual, - __DRIcontextPrivate * driContextPriv, + __DRIcontext * driContextPriv, void *sharedContextPrivate); extern void r300InitShaderFuncs(struct dd_function_table *functions); diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index f90bfd4f4f..c51285aad9 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -997,7 +997,7 @@ static void r300StencilOpSeparate(GLcontext * ctx, GLenum face, static void r300UpdateWindow(GLcontext * ctx) { r300ContextPtr rmesa = R300_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon); + __DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon); GLfloat xoffset = dPriv ? (GLfloat) dPriv->x : 0; GLfloat yoffset = dPriv ? (GLfloat) dPriv->y + dPriv->h : 0; const GLfloat *v = ctx->Viewport._WindowMap.m; @@ -1050,7 +1050,7 @@ static void r300DepthRange(GLcontext * ctx, GLclampd nearval, GLclampd farval) void r300UpdateViewportOffset(GLcontext * ctx) { r300ContextPtr rmesa = R300_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon); + __DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon); GLfloat xoffset = (GLfloat) dPriv->x; GLfloat yoffset = (GLfloat) dPriv->y + dPriv->h; const GLfloat *v = ctx->Viewport._WindowMap.m; @@ -2040,7 +2040,7 @@ static const GLfloat *get_fragmentprogram_constant(GLcontext *ctx, GLuint index, } case RC_STATE_R300_WINDOW_DIMENSION: { - __DRIdrawablePrivate * drawable = radeon_get_drawable(&rmesa->radeon); + __DRIdrawable * drawable = radeon_get_drawable(&rmesa->radeon); buffer[0] = drawable->w * 0.5f; /* width*0.5 */ buffer[1] = drawable->h * 0.5f; /* height*0.5 */ buffer[2] = 0.5F; /* for moving range [-1 1] -> [0 1] */ diff --git a/src/mesa/drivers/dri/r600/r600_context.c b/src/mesa/drivers/dri/r600/r600_context.c index 45bbc3c071..0d8b5b45ac 100644 --- a/src/mesa/drivers/dri/r600/r600_context.c +++ b/src/mesa/drivers/dri/r600/r600_context.c @@ -345,10 +345,10 @@ static void r600InitGLExtensions(GLcontext *ctx) /* Create the device specific rendering context. */ GLboolean r600CreateContext(const __GLcontextModes * glVisual, - __DRIcontextPrivate * driContextPriv, + __DRIcontext * driContextPriv, void *sharedContextPrivate) { - __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + __DRIscreen *sPriv = driContextPriv->driScreenPriv; radeonScreenPtr screen = (radeonScreenPtr) (sPriv->private); struct dd_function_table functions; context_t *r600; diff --git a/src/mesa/drivers/dri/r600/r600_context.h b/src/mesa/drivers/dri/r600/r600_context.h index 94662ab547..a1b4af715e 100644 --- a/src/mesa/drivers/dri/r600/r600_context.h +++ b/src/mesa/drivers/dri/r600/r600_context.h @@ -154,7 +154,7 @@ struct r600_context { #define GL_CONTEXT(context) ((GLcontext *)(context->radeon.glCtx)) extern GLboolean r600CreateContext(const __GLcontextModes * glVisual, - __DRIcontextPrivate * driContextPriv, + __DRIcontext * driContextPriv, void *sharedContextPrivate); #define R700_CONTEXT_STATES(context) ((R700_CHIP_CONTEXT *)(&context->hw)) diff --git a/src/mesa/drivers/dri/r600/r700_clear.c b/src/mesa/drivers/dri/r600/r700_clear.c index c0ac54a844..98bfdd0937 100644 --- a/src/mesa/drivers/dri/r600/r700_clear.c +++ b/src/mesa/drivers/dri/r600/r700_clear.c @@ -49,7 +49,7 @@ static GLboolean r700ClearFast(context_t *context, GLbitfield mask) void r700Clear(GLcontext * ctx, GLbitfield mask) { context_t *context = R700_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = radeon_get_drawable(&context->radeon); + __DRIdrawable *dPriv = radeon_get_drawable(&context->radeon); const GLuint colorMask = *((GLuint *) & ctx->Color.ColorMask[0]); GLbitfield swrast_mask = 0, tri_mask = 0; int i; diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c index fc6fb29fd6..3c8cb579f9 100644 --- a/src/mesa/drivers/dri/r600/r700_state.c +++ b/src/mesa/drivers/dri/r600/r700_state.c @@ -85,7 +85,7 @@ void r700UpdateViewportOffset(GLcontext * ctx) //------------------ { context_t *context = R700_CONTEXT(ctx); R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw); - __DRIdrawablePrivate *dPriv = radeon_get_drawable(&context->radeon); + __DRIdrawable *dPriv = radeon_get_drawable(&context->radeon); GLfloat xoffset = (GLfloat) dPriv->x; GLfloat yoffset = (GLfloat) dPriv->y + dPriv->h; const GLfloat *v = ctx->Viewport._WindowMap.m; @@ -1071,7 +1071,7 @@ static void r700UpdateWindow(GLcontext * ctx, int id) //-------------------- { context_t *context = R700_CONTEXT(ctx); R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw); - __DRIdrawablePrivate *dPriv = radeon_get_drawable(&context->radeon); + __DRIdrawable *dPriv = radeon_get_drawable(&context->radeon); GLfloat xoffset = dPriv ? (GLfloat) dPriv->x : 0; GLfloat yoffset = dPriv ? (GLfloat) dPriv->y + dPriv->h : 0; const GLfloat *v = ctx->Viewport._WindowMap.m; diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c index c0b3165dda..e0b853bc97 100644 --- a/src/mesa/drivers/dri/radeon/radeon_common.c +++ b/src/mesa/drivers/dri/radeon/radeon_common.c @@ -137,7 +137,7 @@ void radeon_get_cliprects(radeonContextPtr radeon, unsigned int *num_cliprects, int *x_off, int *y_off) { - __DRIdrawablePrivate *dPriv = radeon_get_drawable(radeon); + __DRIdrawable *dPriv = radeon_get_drawable(radeon); struct radeon_framebuffer *rfb = dPriv->driverPrivate; if (radeon->constant_cliprect) { @@ -169,8 +169,8 @@ void radeon_get_cliprects(radeonContextPtr radeon, */ void radeonSetCliprects(radeonContextPtr radeon) { - __DRIdrawablePrivate *const drawable = radeon_get_drawable(radeon); - __DRIdrawablePrivate *const readable = radeon_get_readable(radeon); + __DRIdrawable *const drawable = radeon_get_drawable(radeon); + __DRIdrawable *const readable = radeon_get_readable(radeon); struct radeon_framebuffer *const draw_rfb = drawable->driverPrivate; struct radeon_framebuffer *const read_rfb = readable->driverPrivate; int x_off, y_off; @@ -229,7 +229,7 @@ void radeonUpdateScissor( GLcontext *ctx ) } if (!rmesa->radeonScreen->kernel_mm) { /* Fix scissors for dri 1 */ - __DRIdrawablePrivate *dPriv = radeon_get_drawable(rmesa); + __DRIdrawable *dPriv = radeon_get_drawable(rmesa); x1 += dPriv->x; x2 += dPriv->x + 1; min_x += dPriv->x; @@ -428,7 +428,7 @@ static void radeon_flip_renderbuffers(struct radeon_framebuffer *rfb) /* Copy the back color buffer to the front color buffer. */ -void radeonCopyBuffer( __DRIdrawablePrivate *dPriv, +void radeonCopyBuffer( __DRIdrawable *dPriv, const drm_clip_rect_t *rect) { radeonContextPtr rmesa; @@ -496,7 +496,7 @@ void radeonCopyBuffer( __DRIdrawablePrivate *dPriv, UNLOCK_HARDWARE( rmesa ); } -static int radeonScheduleSwap(__DRIdrawablePrivate *dPriv, GLboolean *missed_target) +static int radeonScheduleSwap(__DRIdrawable *dPriv, GLboolean *missed_target) { radeonContextPtr rmesa; @@ -519,11 +519,11 @@ static int radeonScheduleSwap(__DRIdrawablePrivate *dPriv, GLboolean *missed_tar return 0; } -static GLboolean radeonPageFlip( __DRIdrawablePrivate *dPriv ) +static GLboolean radeonPageFlip( __DRIdrawable *dPriv ) { radeonContextPtr radeon; GLint ret; - __DRIscreenPrivate *psp; + __DRIscreen *psp; struct radeon_renderbuffer *rrb; struct radeon_framebuffer *rfb; @@ -571,10 +571,10 @@ static GLboolean radeonPageFlip( __DRIdrawablePrivate *dPriv ) /** * Swap front and back buffer. */ -void radeonSwapBuffers(__DRIdrawablePrivate * dPriv) +void radeonSwapBuffers(__DRIdrawable * dPriv) { int64_t ust; - __DRIscreenPrivate *psp; + __DRIscreen *psp; if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) { radeonContextPtr radeon; @@ -615,7 +615,7 @@ void radeonSwapBuffers(__DRIdrawablePrivate * dPriv) } } -void radeonCopySubBuffer(__DRIdrawablePrivate * dPriv, +void radeonCopySubBuffer(__DRIdrawable * dPriv, int x, int y, int w, int h ) { if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) { @@ -1130,7 +1130,7 @@ flush_front: if (screen->dri2.loader && (screen->dri2.loader->base.version >= 2) && (screen->dri2.loader->flushFrontBuffer != NULL)) { - __DRIdrawablePrivate * drawable = radeon_get_drawable(radeon); + __DRIdrawable * drawable = radeon_get_drawable(radeon); (*screen->dri2.loader->flushFrontBuffer)(drawable, drawable->loaderPrivate); /* Only clear the dirty bit if front-buffer rendering is no longer diff --git a/src/mesa/drivers/dri/radeon/radeon_common.h b/src/mesa/drivers/dri/radeon/radeon_common.h index faad145cc4..f31f08edf3 100644 --- a/src/mesa/drivers/dri/radeon/radeon_common.h +++ b/src/mesa/drivers/dri/radeon/radeon_common.h @@ -13,10 +13,10 @@ void radeonScissor(GLcontext* ctx, GLint x, GLint y, GLsizei w, GLsizei h); void radeonWaitForIdleLocked(radeonContextPtr radeon); extern uint32_t radeonGetAge(radeonContextPtr radeon); -void radeonCopyBuffer( __DRIdrawablePrivate *dPriv, +void radeonCopyBuffer( __DRIdrawable *dPriv, const drm_clip_rect_t *rect); -void radeonSwapBuffers(__DRIdrawablePrivate * dPriv); -void radeonCopySubBuffer(__DRIdrawablePrivate * dPriv, +void radeonSwapBuffers(__DRIdrawable * dPriv); +void radeonCopySubBuffer(__DRIdrawable * dPriv, int x, int y, int w, int h ); void radeonUpdatePageFlipping(radeonContextPtr rmesa); @@ -42,7 +42,7 @@ void radeon_renderbuffer_set_bo(struct radeon_renderbuffer *rb, struct radeon_bo *bo); struct radeon_renderbuffer * -radeon_create_renderbuffer(gl_format format, __DRIdrawablePrivate *driDrawPriv); +radeon_create_renderbuffer(gl_format format, __DRIdrawable *driDrawPriv); void radeon_check_front_buffer_rendering(GLcontext *ctx); static inline struct radeon_renderbuffer *radeon_renderbuffer(struct gl_renderbuffer *rb) diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c index 5c68bf5df6..b9c29b937e 100644 --- a/src/mesa/drivers/dri/radeon/radeon_common_context.c +++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c @@ -181,10 +181,10 @@ static void radeonInitDriverFuncs(struct dd_function_table *functions) GLboolean radeonInitContext(radeonContextPtr radeon, struct dd_function_table* functions, const __GLcontextModes * glVisual, - __DRIcontextPrivate * driContextPriv, + __DRIcontext * driContextPriv, void *sharedContextPrivate) { - __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + __DRIscreen *sPriv = driContextPriv->driScreenPriv; radeonScreenPtr screen = (radeonScreenPtr) (sPriv->private); GLcontext* ctx; GLcontext* shareCtx; @@ -291,7 +291,7 @@ static void radeon_destroy_atom_list(radeonContextPtr radeon) * Cleanup common context fields. * Called by r200DestroyContext/r300DestroyContext */ -void radeonDestroyContext(__DRIcontextPrivate *driContextPriv ) +void radeonDestroyContext(__DRIcontext *driContextPriv ) { #ifdef RADEON_BO_TRACK FILE *track; @@ -355,7 +355,7 @@ void radeonDestroyContext(__DRIcontextPrivate *driContextPriv ) /* Force the context `c' to be unbound from its buffer. */ -GLboolean radeonUnbindContext(__DRIcontextPrivate * driContextPriv) +GLboolean radeonUnbindContext(__DRIcontext * driContextPriv) { radeonContextPtr radeon = (radeonContextPtr) driContextPriv->driverPrivate; @@ -720,9 +720,9 @@ radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable, /* Force the context `c' to be the current context and associate with it * buffer `b'. */ -GLboolean radeonMakeCurrent(__DRIcontextPrivate * driContextPriv, - __DRIdrawablePrivate * driDrawPriv, - __DRIdrawablePrivate * driReadPriv) +GLboolean radeonMakeCurrent(__DRIcontext * driContextPriv, + __DRIdrawable * driDrawPriv, + __DRIdrawable * driReadPriv) { radeonContextPtr radeon; struct radeon_framebuffer *drfb; diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.h b/src/mesa/drivers/dri/radeon/radeon_common_context.h index 0739496e03..ab79d2dc0f 100644 --- a/src/mesa/drivers/dri/radeon/radeon_common_context.h +++ b/src/mesa/drivers/dri/radeon/radeon_common_context.h @@ -92,7 +92,7 @@ struct radeon_renderbuffer GLuint pf_pending; /**< sequence number of pending flip */ GLuint vbl_pending; /**< vblank sequence number of pending flip */ - __DRIdrawablePrivate *dPriv; + __DRIdrawable *dPriv; }; struct radeon_framebuffer @@ -381,8 +381,8 @@ struct radeon_store { }; struct radeon_dri_mirror { - __DRIcontextPrivate *context; /* DRI context */ - __DRIscreenPrivate *screen; /* DRI screen */ + __DRIcontext *context; /* DRI context */ + __DRIscreen *screen; /* DRI screen */ drm_context_t hwContext; drm_hw_lock_t *hwLock; @@ -523,12 +523,12 @@ struct radeon_context { #define RADEON_CONTEXT(glctx) ((radeonContextPtr)(ctx->DriverCtx)) -static inline __DRIdrawablePrivate* radeon_get_drawable(radeonContextPtr radeon) +static inline __DRIdrawable* radeon_get_drawable(radeonContextPtr radeon) { return radeon->dri.context->driDrawablePriv; } -static inline __DRIdrawablePrivate* radeon_get_readable(radeonContextPtr radeon) +static inline __DRIdrawable* radeon_get_readable(radeonContextPtr radeon) { return radeon->dri.context->driReadablePriv; } @@ -581,16 +581,16 @@ static INLINE uint32_t radeonPackFloat24(float f) GLboolean radeonInitContext(radeonContextPtr radeon, struct dd_function_table* functions, const __GLcontextModes * glVisual, - __DRIcontextPrivate * driContextPriv, + __DRIcontext * driContextPriv, void *sharedContextPrivate); void radeonCleanupContext(radeonContextPtr radeon); -GLboolean radeonUnbindContext(__DRIcontextPrivate * driContextPriv); +GLboolean radeonUnbindContext(__DRIcontext * driContextPriv); void radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable, GLboolean front_only); -GLboolean radeonMakeCurrent(__DRIcontextPrivate * driContextPriv, - __DRIdrawablePrivate * driDrawPriv, - __DRIdrawablePrivate * driReadPriv); -extern void radeonDestroyContext(__DRIcontextPrivate * driContextPriv); +GLboolean radeonMakeCurrent(__DRIcontext * driContextPriv, + __DRIdrawable * driDrawPriv, + __DRIdrawable * driReadPriv); +extern void radeonDestroyContext(__DRIcontext * driContextPriv); #endif diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c index 5e700be4a5..3cd305b0a2 100644 --- a/src/mesa/drivers/dri/radeon/radeon_context.c +++ b/src/mesa/drivers/dri/radeon/radeon_context.c @@ -208,10 +208,10 @@ static void r100_init_vtbl(radeonContextPtr radeon) */ GLboolean r100CreateContext( const __GLcontextModes *glVisual, - __DRIcontextPrivate *driContextPriv, + __DRIcontext *driContextPriv, void *sharedContextPrivate) { - __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + __DRIscreen *sPriv = driContextPriv->driScreenPriv; radeonScreenPtr screen = (radeonScreenPtr)(sPriv->private); struct dd_function_table functions; r100ContextPtr rmesa; diff --git a/src/mesa/drivers/dri/radeon/radeon_context.h b/src/mesa/drivers/dri/radeon/radeon_context.h index 12ab33a009..dfedc38bfd 100644 --- a/src/mesa/drivers/dri/radeon/radeon_context.h +++ b/src/mesa/drivers/dri/radeon/radeon_context.h @@ -451,7 +451,7 @@ struct r100_context { #define RADEON_OLD_PACKETS 1 extern GLboolean r100CreateContext( const __GLcontextModes *glVisual, - __DRIcontextPrivate *driContextPriv, + __DRIcontext *driContextPriv, void *sharedContextPrivate); diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c index a536436d55..7b1f84a715 100644 --- a/src/mesa/drivers/dri/radeon/radeon_fbo.c +++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c @@ -247,7 +247,7 @@ radeon_nop_alloc_storage(GLcontext * ctx, struct gl_renderbuffer *rb, * Not used for user-created renderbuffers. */ struct radeon_renderbuffer * -radeon_create_renderbuffer(gl_format format, __DRIdrawablePrivate *driDrawPriv) +radeon_create_renderbuffer(gl_format format, __DRIdrawable *driDrawPriv) { struct radeon_renderbuffer *rrb; diff --git a/src/mesa/drivers/dri/radeon/radeon_ioctl.c b/src/mesa/drivers/dri/radeon/radeon_ioctl.c index 13fd6f9971..a9d50c5d07 100644 --- a/src/mesa/drivers/dri/radeon/radeon_ioctl.c +++ b/src/mesa/drivers/dri/radeon/radeon_ioctl.c @@ -449,7 +449,7 @@ void radeonEmitAOS( r100ContextPtr rmesa, static void radeonKernelClear(GLcontext *ctx, GLuint flags) { r100ContextPtr rmesa = R100_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon); + __DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon); drm_radeon_sarea_t *sarea = rmesa->radeon.sarea; uint32_t clear; GLint ret, i; @@ -570,7 +570,7 @@ static void radeonKernelClear(GLcontext *ctx, GLuint flags) static void radeonClear( GLcontext *ctx, GLbitfield mask ) { r100ContextPtr rmesa = R100_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon); + __DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon); GLuint flags = 0; GLuint color_mask = 0; GLuint orig_mask = mask; diff --git a/src/mesa/drivers/dri/radeon/radeon_lock.c b/src/mesa/drivers/dri/radeon/radeon_lock.c index 7ad781ba61..9dee691938 100644 --- a/src/mesa/drivers/dri/radeon/radeon_lock.c +++ b/src/mesa/drivers/dri/radeon/radeon_lock.c @@ -58,9 +58,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ void radeonGetLock(radeonContextPtr rmesa, GLuint flags) { - __DRIdrawablePrivate *const drawable = radeon_get_drawable(rmesa); - __DRIdrawablePrivate *const readable = radeon_get_readable(rmesa); - __DRIscreenPrivate *sPriv = rmesa->dri.screen; + __DRIdrawable *const drawable = radeon_get_drawable(rmesa); + __DRIdrawable *const readable = radeon_get_readable(rmesa); + __DRIscreen *sPriv = rmesa->dri.screen; drmGetLock(rmesa->dri.fd, rmesa->dri.hwContext, flags); diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c index be2d8365ef..801d7e147c 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.c +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c @@ -214,10 +214,10 @@ static const GLuint __driNConfigOptions = 17; #endif -static int getSwapInfo( __DRIdrawablePrivate *dPriv, __DRIswapInfo * sInfo ); +static int getSwapInfo( __DRIdrawable *dPriv, __DRIswapInfo * sInfo ); static int -radeonGetParam(__DRIscreenPrivate *sPriv, int param, void *value) +radeonGetParam(__DRIscreen *sPriv, int param, void *value) { int ret; drm_radeon_getparam_t gp = { 0 }; @@ -249,7 +249,7 @@ radeonGetParam(__DRIscreenPrivate *sPriv, int param, void *value) } static const __DRIconfig ** -radeonFillInModes( __DRIscreenPrivate *psp, +radeonFillInModes( __DRIscreen *psp, unsigned pixel_bits, unsigned depth_bits, unsigned stencil_bits, GLboolean have_back_buffer ) { @@ -911,7 +911,7 @@ static int radeon_set_screen_flags(radeonScreenPtr screen, int device_id) /* Create the device specific screen private data struct. */ static radeonScreenPtr -radeonCreateScreen( __DRIscreenPrivate *sPriv ) +radeonCreateScreen( __DRIscreen *sPriv ) { radeonScreenPtr screen; RADEONDRIPtr dri_priv = (RADEONDRIPtr)sPriv->pDevPriv; @@ -1250,7 +1250,7 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv ) } static radeonScreenPtr -radeonCreateScreen2(__DRIscreenPrivate *sPriv) +radeonCreateScreen2(__DRIscreen *sPriv) { radeonScreenPtr screen; int i; @@ -1401,7 +1401,7 @@ radeonCreateScreen2(__DRIscreenPrivate *sPriv) /* Destroy the device specific screen private data struct. */ static void -radeonDestroyScreen( __DRIscreenPrivate *sPriv ) +radeonDestroyScreen( __DRIscreen *sPriv ) { radeonScreenPtr screen = (radeonScreenPtr)sPriv->private; @@ -1435,7 +1435,7 @@ radeonDestroyScreen( __DRIscreenPrivate *sPriv ) /* Initialize the driver specific screen private data. */ static GLboolean -radeonInitDriver( __DRIscreenPrivate *sPriv ) +radeonInitDriver( __DRIscreen *sPriv ) { if (sPriv->dri2.enabled) { sPriv->private = (void *) radeonCreateScreen2( sPriv ); @@ -1459,8 +1459,8 @@ radeonInitDriver( __DRIscreenPrivate *sPriv ) * pbuffers. */ static GLboolean -radeonCreateBuffer( __DRIscreenPrivate *driScrnPriv, - __DRIdrawablePrivate *driDrawPriv, +radeonCreateBuffer( __DRIscreen *driScrnPriv, + __DRIdrawable *driDrawPriv, const __GLcontextModes *mesaVis, GLboolean isPixmap ) { @@ -1559,7 +1559,7 @@ static void radeon_cleanup_renderbuffers(struct radeon_framebuffer *rfb) } void -radeonDestroyBuffer(__DRIdrawablePrivate *driDrawPriv) +radeonDestroyBuffer(__DRIdrawable *driDrawPriv) { struct radeon_framebuffer *rfb; if (!driDrawPriv) @@ -1581,7 +1581,7 @@ radeonDestroyBuffer(__DRIdrawablePrivate *driDrawPriv) * \return the __GLcontextModes supported by this driver */ static const __DRIconfig ** -radeonInitScreen(__DRIscreenPrivate *psp) +radeonInitScreen(__DRIscreen *psp) { #if defined(RADEON_R100) static const char *driver_name = "Radeon"; @@ -1631,7 +1631,7 @@ radeonInitScreen(__DRIscreenPrivate *psp) * \return the __GLcontextModes supported by this driver */ static const -__DRIconfig **radeonInitScreen2(__DRIscreenPrivate *psp) +__DRIconfig **radeonInitScreen2(__DRIscreen *psp) { GLenum fb_format[3]; GLenum fb_type[3]; @@ -1698,7 +1698,7 @@ __DRIconfig **radeonInitScreen2(__DRIscreenPrivate *psp) * Get information about previous buffer swaps. */ static int -getSwapInfo( __DRIdrawablePrivate *dPriv, __DRIswapInfo * sInfo ) +getSwapInfo( __DRIdrawable *dPriv, __DRIswapInfo * sInfo ) { struct radeon_framebuffer *rfb; diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.h b/src/mesa/drivers/dri/radeon/radeon_screen.h index 15744e8828..5e6d432e11 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.h +++ b/src/mesa/drivers/dri/radeon/radeon_screen.h @@ -86,7 +86,7 @@ typedef struct radeon_screen { __volatile__ uint32_t *scratch; - __DRIscreenPrivate *driScreen; + __DRIscreen *driScreen; unsigned int sarea_priv_offset; unsigned int gart_buffer_offset; /* offset in card memory space */ unsigned int gart_texture_offset; /* offset in card memory space */ @@ -123,5 +123,5 @@ typedef struct radeon_screen { #define IS_R600_CLASS(screen) \ ((screen->chip_flags & RADEON_CLASS_MASK) == RADEON_CLASS_R600) -extern void radeonDestroyBuffer(__DRIdrawablePrivate *driDrawPriv); +extern void radeonDestroyBuffer(__DRIdrawable *driDrawPriv); #endif /* __RADEON_SCREEN_H__ */ diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c index 1fcb545204..1c9ec36dae 100644 --- a/src/mesa/drivers/dri/radeon/radeon_state.c +++ b/src/mesa/drivers/dri/radeon/radeon_state.c @@ -1400,7 +1400,7 @@ static void radeonClearStencil( GLcontext *ctx, GLint s ) void radeonUpdateWindow( GLcontext *ctx ) { r100ContextPtr rmesa = R100_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon); + __DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon); GLfloat xoffset = dPriv ? (GLfloat) dPriv->x : 0; GLfloat yoffset = dPriv ? (GLfloat) dPriv->y + dPriv->h : 0; const GLfloat *v = ctx->Viewport._WindowMap.m; @@ -1455,7 +1455,7 @@ static void radeonDepthRange( GLcontext *ctx, GLclampd nearval, void radeonUpdateViewportOffset( GLcontext *ctx ) { r100ContextPtr rmesa = R100_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon); + __DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon); GLfloat xoffset = (GLfloat)dPriv->x; GLfloat yoffset = (GLfloat)dPriv->y + dPriv->h; const GLfloat *v = ctx->Viewport._WindowMap.m; diff --git a/src/mesa/drivers/dri/savage/savage_init.h b/src/mesa/drivers/dri/savage/savage_init.h index abb8440fc4..bfd3077d70 100644 --- a/src/mesa/drivers/dri/savage/savage_init.h +++ b/src/mesa/drivers/dri/savage/savage_init.h @@ -66,7 +66,7 @@ typedef struct { unsigned int logTextureGranularity[SAVAGE_NR_TEX_HEAPS]; drmAddress texVirtual[SAVAGE_NR_TEX_HEAPS]; - __DRIscreenPrivate *driScrnPriv; + __DRIscreen *driScrnPriv; savageRegion aperture; savageRegion agpTextures; diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c index d307b81e8e..564e68eb89 100644 --- a/src/mesa/drivers/dri/savage/savage_xmesa.c +++ b/src/mesa/drivers/dri/savage/savage_xmesa.c @@ -168,7 +168,7 @@ PUBLIC const __DRIextension *savageScreenExtensions[] = { }; static GLboolean -savageInitDriver(__DRIscreenPrivate *sPriv) +savageInitDriver(__DRIscreen *sPriv) { savageScreenPrivate *savageScreen; SAVAGEDRIPtr gDRIPriv = (SAVAGEDRIPtr)sPriv->pDevPriv; @@ -272,7 +272,7 @@ savageInitDriver(__DRIscreenPrivate *sPriv) /* Accessed by dlsym from dri_mesa_init.c */ static void -savageDestroyScreen(__DRIscreenPrivate *sPriv) +savageDestroyScreen(__DRIscreen *sPriv) { savageScreenPrivate *savageScreen = (savageScreenPrivate *)sPriv->private; @@ -288,12 +288,12 @@ savageDestroyScreen(__DRIscreenPrivate *sPriv) static GLboolean savageCreateContext( const __GLcontextModes *mesaVis, - __DRIcontextPrivate *driContextPriv, + __DRIcontext *driContextPriv, void *sharedContextPrivate ) { GLcontext *ctx, *shareCtx; savageContextPtr imesa; - __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + __DRIscreen *sPriv = driContextPriv->driScreenPriv; struct dd_function_table functions; savageScreenPrivate *savageScreen = (savageScreenPrivate *)sPriv->private; drm_savage_sarea_t *saPriv=(drm_savage_sarea_t *)(((char*)sPriv->pSAREA)+ @@ -546,7 +546,7 @@ savageCreateContext( const __GLcontextModes *mesaVis, } static void -savageDestroyContext(__DRIcontextPrivate *driContextPriv) +savageDestroyContext(__DRIcontext *driContextPriv) { savageContextPtr imesa = (savageContextPtr) driContextPriv->driverPrivate; GLuint i; @@ -580,8 +580,8 @@ savageDestroyContext(__DRIcontextPrivate *driContextPriv) static GLboolean -savageCreateBuffer( __DRIscreenPrivate *driScrnPriv, - __DRIdrawablePrivate *driDrawPriv, +savageCreateBuffer( __DRIscreen *driScrnPriv, + __DRIdrawable *driDrawPriv, const __GLcontextModes *mesaVis, GLboolean isPixmap) { @@ -675,13 +675,13 @@ savageCreateBuffer( __DRIscreenPrivate *driScrnPriv, } static void -savageDestroyBuffer(__DRIdrawablePrivate *driDrawPriv) +savageDestroyBuffer(__DRIdrawable *driDrawPriv) { _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL); } #if 0 -void XMesaSwapBuffers(__DRIdrawablePrivate *driDrawPriv) +void XMesaSwapBuffers(__DRIdrawable *driDrawPriv) { /* XXX should do swap according to the buffer, not the context! */ savageContextPtr imesa = savageCtx; @@ -694,7 +694,7 @@ void XMesaSwapBuffers(__DRIdrawablePrivate *driDrawPriv) void savageXMesaSetClipRects(savageContextPtr imesa) { - __DRIdrawablePrivate *dPriv = imesa->driDrawable; + __DRIdrawable *dPriv = imesa->driDrawable; if ((dPriv->numBackClipRects == 0) || (imesa->glCtx->DrawBuffer->_ColorDrawBufferIndexes[0] == BUFFER_FRONT_LEFT)) { @@ -715,8 +715,8 @@ void savageXMesaSetClipRects(savageContextPtr imesa) static void savageXMesaWindowMoved( savageContextPtr imesa ) { - __DRIdrawablePrivate *const drawable = imesa->driDrawable; - __DRIdrawablePrivate *const readable = imesa->driReadable; + __DRIdrawable *const drawable = imesa->driDrawable; + __DRIdrawable *const readable = imesa->driReadable; if (0) fprintf(stderr, "savageXMesaWindowMoved\n\n"); @@ -731,7 +731,7 @@ static void savageXMesaWindowMoved( savageContextPtr imesa ) static GLboolean -savageUnbindContext(__DRIcontextPrivate *driContextPriv) +savageUnbindContext(__DRIcontext *driContextPriv) { savageContextPtr savage = (savageContextPtr) driContextPriv->driverPrivate; if (savage) @@ -742,7 +742,7 @@ savageUnbindContext(__DRIcontextPrivate *driContextPriv) #if 0 static GLboolean -savageOpenFullScreen(__DRIcontextPrivate *driContextPriv) +savageOpenFullScreen(__DRIcontext *driContextPriv) { @@ -761,7 +761,7 @@ savageOpenFullScreen(__DRIcontextPrivate *driContextPriv) } static GLboolean -savageCloseFullScreen(__DRIcontextPrivate *driContextPriv) +savageCloseFullScreen(__DRIcontext *driContextPriv) { if (driContextPriv) { @@ -777,9 +777,9 @@ savageCloseFullScreen(__DRIcontextPrivate *driContextPriv) #endif static GLboolean -savageMakeCurrent(__DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv) +savageMakeCurrent(__DRIcontext *driContextPriv, + __DRIdrawable *driDrawPriv, + __DRIdrawable *driReadPriv) { if (driContextPriv) { savageContextPtr imesa @@ -816,9 +816,9 @@ savageMakeCurrent(__DRIcontextPrivate *driContextPriv, void savageGetLock( savageContextPtr imesa, GLuint flags ) { - __DRIdrawablePrivate *const drawable = imesa->driDrawable; - __DRIdrawablePrivate *const readable = imesa->driReadable; - __DRIscreenPrivate *sPriv = imesa->driScreen; + __DRIdrawable *const drawable = imesa->driDrawable; + __DRIdrawable *const readable = imesa->driReadable; + __DRIscreen *sPriv = imesa->driScreen; drm_savage_sarea_t *sarea = imesa->sarea; int me = imesa->hHWContext; int stamp = drawable->lastStamp; @@ -883,7 +883,7 @@ void savageGetLock( savageContextPtr imesa, GLuint flags ) } static const __DRIconfig ** -savageFillInModes( __DRIscreenPrivate *psp, +savageFillInModes( __DRIscreen *psp, unsigned pixel_bits, unsigned depth_bits, unsigned stencil_bits, GLboolean have_back_buffer ) { @@ -967,7 +967,7 @@ savageFillInModes( __DRIscreenPrivate *psp, * \return the __GLcontextModes supported by this driver */ static const __DRIconfig ** -savageInitScreen(__DRIscreenPrivate *psp) +savageInitScreen(__DRIscreen *psp) { static const __DRIversion ddx_expected = { 2, 0, 0 }; static const __DRIversion dri_expected = { 4, 0, 0 }; diff --git a/src/mesa/drivers/dri/savage/savagecontext.h b/src/mesa/drivers/dri/savage/savagecontext.h index 53a37db1cb..ba1e6e1e1a 100644 --- a/src/mesa/drivers/dri/savage/savagecontext.h +++ b/src/mesa/drivers/dri/savage/savagecontext.h @@ -271,10 +271,10 @@ struct savage_context_t { drm_hw_lock_t *driHwLock; GLuint driFd; - __DRIdrawablePrivate *driDrawable; - __DRIdrawablePrivate *driReadable; + __DRIdrawable *driDrawable; + __DRIdrawable *driReadable; - __DRIscreenPrivate *driScreen; + __DRIscreen *driScreen; savageScreenPrivate *savageScreen; drm_savage_sarea_t *sarea; diff --git a/src/mesa/drivers/dri/savage/savageioctl.c b/src/mesa/drivers/dri/savage/savageioctl.c index 706fc97935..d0b64e801a 100644 --- a/src/mesa/drivers/dri/savage/savageioctl.c +++ b/src/mesa/drivers/dri/savage/savageioctl.c @@ -433,7 +433,7 @@ static void savageDDClear( GLcontext *ctx, GLbitfield mask ) /* * Copy the back buffer to the front buffer. */ -void savageSwapBuffers( __DRIdrawablePrivate *dPriv ) +void savageSwapBuffers( __DRIdrawable *dPriv ) { savageContextPtr imesa; @@ -537,7 +537,7 @@ void savageFlushVertices( savageContextPtr imesa ) void savageFlushCmdBufLocked( savageContextPtr imesa, GLboolean discard ) { - __DRIdrawablePrivate *dPriv = imesa->driDrawable; + __DRIdrawable *dPriv = imesa->driDrawable; if (!imesa->dmaVtxBuf.total) discard = GL_FALSE; diff --git a/src/mesa/drivers/dri/savage/savageioctl.h b/src/mesa/drivers/dri/savage/savageioctl.h index 639605cc51..e7e80816c1 100644 --- a/src/mesa/drivers/dri/savage/savageioctl.h +++ b/src/mesa/drivers/dri/savage/savageioctl.h @@ -39,7 +39,7 @@ void savageFlushCmdBuf( savageContextPtr imesa, GLboolean discard ); void savageDDInitIoctlFuncs( GLcontext *ctx ); -void savageSwapBuffers( __DRIdrawablePrivate *dPriv ); +void savageSwapBuffers( __DRIdrawable *dPriv ); #define WAIT_IDLE_EMPTY(imesa) do { \ if (SAVAGE_DEBUG & DEBUG_VERBOSE_MSG) \ diff --git a/src/mesa/drivers/dri/savage/savagespan.c b/src/mesa/drivers/dri/savage/savagespan.c index 3bb6fbcc63..792e166d9c 100644 --- a/src/mesa/drivers/dri/savage/savagespan.c +++ b/src/mesa/drivers/dri/savage/savagespan.c @@ -34,7 +34,7 @@ #define LOCAL_VARS \ driRenderbuffer *drb = (driRenderbuffer *) rb; \ - __DRIdrawablePrivate *const dPriv = drb->dPriv; \ + __DRIdrawable *const dPriv = drb->dPriv; \ GLuint cpp = drb->cpp; \ GLuint pitch = drb->pitch; \ GLuint height = dPriv->h; \ @@ -44,7 +44,7 @@ #define LOCAL_DEPTH_VARS \ driRenderbuffer *drb = (driRenderbuffer *) rb; \ - __DRIdrawablePrivate *const dPriv = drb->dPriv; \ + __DRIdrawable *const dPriv = drb->dPriv; \ GLuint zpp = drb->cpp; \ GLuint pitch = drb->pitch; \ GLuint height = dPriv->h; \ diff --git a/src/mesa/drivers/dri/sis/sis_context.c b/src/mesa/drivers/dri/sis/sis_context.c index f501e7ad2e..1f88e9ccdd 100644 --- a/src/mesa/drivers/dri/sis/sis_context.c +++ b/src/mesa/drivers/dri/sis/sis_context.c @@ -160,11 +160,11 @@ void sisReAllocateBuffers(GLcontext *ctx, GLframebuffer *drawbuffer, GLboolean sisCreateContext( const __GLcontextModes *glVisual, - __DRIcontextPrivate *driContextPriv, + __DRIcontext *driContextPriv, void *sharedContextPrivate ) { GLcontext *ctx, *shareCtx; - __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + __DRIscreen *sPriv = driContextPriv->driScreenPriv; sisContextPtr smesa; sisScreenPtr sisScreen; int i; @@ -337,7 +337,7 @@ sisCreateContext( const __GLcontextModes *glVisual, } void -sisDestroyContext ( __DRIcontextPrivate *driContextPriv ) +sisDestroyContext ( __DRIcontext *driContextPriv ) { sisContextPtr smesa = (sisContextPtr)driContextPriv->driverPrivate; @@ -365,9 +365,9 @@ sisDestroyContext ( __DRIcontextPrivate *driContextPriv ) } GLboolean -sisMakeCurrent( __DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv ) +sisMakeCurrent( __DRIcontext *driContextPriv, + __DRIdrawable *driDrawPriv, + __DRIdrawable *driReadPriv ) { if ( driContextPriv ) { GET_CURRENT_CONTEXT(ctx); @@ -396,7 +396,7 @@ sisMakeCurrent( __DRIcontextPrivate *driContextPriv, } GLboolean -sisUnbindContext( __DRIcontextPrivate *driContextPriv ) +sisUnbindContext( __DRIcontext *driContextPriv ) { return GL_TRUE; } diff --git a/src/mesa/drivers/dri/sis/sis_context.h b/src/mesa/drivers/dri/sis/sis_context.h index bc53cb5efa..4179ee081a 100644 --- a/src/mesa/drivers/dri/sis/sis_context.h +++ b/src/mesa/drivers/dri/sis/sis_context.h @@ -359,9 +359,9 @@ struct sis_context /* Mirrors of some DRI state */ - __DRIcontextPrivate *driContext; /* DRI context */ - __DRIscreenPrivate *driScreen; /* DRI screen */ - __DRIdrawablePrivate *driDrawable; /* DRI drawable bound to this ctx */ + __DRIcontext *driContext; /* DRI context */ + __DRIscreen *driScreen; /* DRI screen */ + __DRIdrawable *driDrawable; /* DRI drawable bound to this ctx */ unsigned int lastStamp; /* mirror driDrawable->lastStamp */ @@ -439,18 +439,18 @@ enum _sis_verbose { }; extern GLboolean sisCreateContext( const __GLcontextModes *glVisual, - __DRIcontextPrivate *driContextPriv, + __DRIcontext *driContextPriv, void *sharedContextPrivate ); -extern void sisDestroyContext( __DRIcontextPrivate * ); +extern void sisDestroyContext( __DRIcontext * ); void sisReAllocateBuffers(GLcontext *ctx, GLframebuffer *drawbuffer, GLuint width, GLuint height); -extern GLboolean sisMakeCurrent( __DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv ); +extern GLboolean sisMakeCurrent( __DRIcontext *driContextPriv, + __DRIdrawable *driDrawPriv, + __DRIdrawable *driReadPriv ); -extern GLboolean sisUnbindContext( __DRIcontextPrivate *driContextPriv ); +extern GLboolean sisUnbindContext( __DRIcontext *driContextPriv ); void WaitEngIdle (sisContextPtr smesa); void Wait2DEngIdle (sisContextPtr smesa); diff --git a/src/mesa/drivers/dri/sis/sis_lock.c b/src/mesa/drivers/dri/sis/sis_lock.c index 806110cad4..b8ff4e31e2 100644 --- a/src/mesa/drivers/dri/sis/sis_lock.c +++ b/src/mesa/drivers/dri/sis/sis_lock.c @@ -46,8 +46,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. void sisGetLock( sisContextPtr smesa, GLuint flags ) { - __DRIdrawablePrivate *dPriv = smesa->driDrawable; - __DRIscreenPrivate *sPriv = smesa->driScreen; + __DRIdrawable *dPriv = smesa->driDrawable; + __DRIscreen *sPriv = smesa->driScreen; SISSAREAPrivPtr sarea = smesa->sarea; drmGetLock( smesa->driFd, smesa->hHWContext, flags ); diff --git a/src/mesa/drivers/dri/sis/sis_screen.c b/src/mesa/drivers/dri/sis/sis_screen.c index fec9158236..f39a51ab69 100644 --- a/src/mesa/drivers/dri/sis/sis_screen.c +++ b/src/mesa/drivers/dri/sis/sis_screen.c @@ -65,7 +65,7 @@ static const GLuint __driNConfigOptions = 3; extern const struct dri_extension card_extensions[]; static const __DRIconfig ** -sisFillInModes(__DRIscreenPrivate *psp, int bpp) +sisFillInModes(__DRIscreen *psp, int bpp) { __DRIconfig **configs; unsigned depth_buffer_factor; @@ -117,7 +117,7 @@ sisFillInModes(__DRIscreenPrivate *psp, int bpp) /* Create the device specific screen private data struct. */ static sisScreenPtr -sisCreateScreen( __DRIscreenPrivate *sPriv ) +sisCreateScreen( __DRIscreen *sPriv ) { sisScreenPtr sisScreen; SISDRIPtr sisDRIPriv = (SISDRIPtr)sPriv->pDevPriv; @@ -172,7 +172,7 @@ sisCreateScreen( __DRIscreenPrivate *sPriv ) /* Destroy the device specific screen private data struct. */ static void -sisDestroyScreen( __DRIscreenPrivate *sPriv ) +sisDestroyScreen( __DRIscreen *sPriv ) { sisScreenPtr sisScreen = (sisScreenPtr)sPriv->private; @@ -192,8 +192,8 @@ sisDestroyScreen( __DRIscreenPrivate *sPriv ) * data. */ static GLboolean -sisCreateBuffer( __DRIscreenPrivate *driScrnPriv, - __DRIdrawablePrivate *driDrawPriv, +sisCreateBuffer( __DRIscreen *driScrnPriv, + __DRIdrawable *driDrawPriv, const __GLcontextModes *mesaVis, GLboolean isPixmap ) { @@ -219,12 +219,12 @@ sisCreateBuffer( __DRIscreenPrivate *driScrnPriv, static void -sisDestroyBuffer(__DRIdrawablePrivate *driDrawPriv) +sisDestroyBuffer(__DRIdrawable *driDrawPriv) { _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL); } -static void sisCopyBuffer( __DRIdrawablePrivate *dPriv ) +static void sisCopyBuffer( __DRIdrawable *dPriv ) { sisContextPtr smesa = (sisContextPtr)dPriv->driContextPriv->driverPrivate; int i; @@ -259,7 +259,7 @@ static void sisCopyBuffer( __DRIdrawablePrivate *dPriv ) /* Copy the back color buffer to the front color buffer */ static void -sisSwapBuffers(__DRIdrawablePrivate *dPriv) +sisSwapBuffers(__DRIdrawable *dPriv) { if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) { sisContextPtr smesa = (sisContextPtr) dPriv->driContextPriv->driverPrivate; @@ -284,7 +284,7 @@ sisSwapBuffers(__DRIdrawablePrivate *dPriv) * \return the __GLcontextModes supported by this driver */ static const __DRIconfig ** -sisInitScreen(__DRIscreenPrivate *psp) +sisInitScreen(__DRIscreen *psp) { static const __DRIversion ddx_expected = {0, 8, 0}; static const __DRIversion dri_expected = {4, 0, 0}; diff --git a/src/mesa/drivers/dri/sis/sis_screen.h b/src/mesa/drivers/dri/sis/sis_screen.h index 07c29cfa09..8009fecc31 100644 --- a/src/mesa/drivers/dri/sis/sis_screen.h +++ b/src/mesa/drivers/dri/sis/sis_screen.h @@ -50,7 +50,7 @@ typedef struct { int cpp; unsigned int screenX, screenY; - __DRIscreenPrivate *driScreen; + __DRIscreen *driScreen; unsigned int sarea_priv_offset; /* Configuration cache with default values for all contexts */ diff --git a/src/mesa/drivers/dri/sis/sis_span.c b/src/mesa/drivers/dri/sis/sis_span.c index cfbb51007d..008b00160e 100644 --- a/src/mesa/drivers/dri/sis/sis_span.c +++ b/src/mesa/drivers/dri/sis/sis_span.c @@ -42,7 +42,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define LOCAL_VARS \ sisContextPtr smesa = SIS_CONTEXT(ctx); \ - __DRIdrawablePrivate *dPriv = smesa->driDrawable; \ + __DRIdrawable *dPriv = smesa->driDrawable; \ struct sis_renderbuffer *srb = (struct sis_renderbuffer *) rb; \ GLuint pitch = srb->pitch; \ char *buf = srb->map; \ @@ -52,7 +52,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define LOCAL_DEPTH_VARS \ sisContextPtr smesa = SIS_CONTEXT(ctx); \ - __DRIdrawablePrivate *dPriv = smesa->driDrawable; \ + __DRIdrawable *dPriv = smesa->driDrawable; \ struct sis_renderbuffer *srb = (struct sis_renderbuffer *) rb; \ char *buf = srb->map; diff --git a/src/mesa/drivers/dri/tdfx/tdfx_context.c b/src/mesa/drivers/dri/tdfx/tdfx_context.c index e742d414a5..edb1875f76 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_context.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_context.c @@ -165,12 +165,12 @@ static const struct dri_debug_control debug_control[] = }; GLboolean tdfxCreateContext( const __GLcontextModes *mesaVis, - __DRIcontextPrivate *driContextPriv, + __DRIcontext *driContextPriv, void *sharedContextPrivate ) { tdfxContextPtr fxMesa; GLcontext *ctx, *shareCtx; - __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + __DRIscreen *sPriv = driContextPriv->driScreenPriv; tdfxScreenPrivate *fxScreen = (tdfxScreenPrivate *) sPriv->private; TDFXSAREAPriv *saPriv = (TDFXSAREAPriv *) ((char *) sPriv->pSAREA + sizeof(drm_sarea_t)); @@ -441,7 +441,7 @@ static GLboolean tdfxInitVertexFormats( tdfxContextPtr fxMesa ) * Initialize the state in an tdfxContextPtr struct. */ static GLboolean -tdfxInitContext( __DRIdrawablePrivate *driDrawPriv, tdfxContextPtr fxMesa ) +tdfxInitContext( __DRIdrawable *driDrawPriv, tdfxContextPtr fxMesa ) { /* KW: Would be nice to make one of these a member of the other. */ @@ -563,7 +563,7 @@ tdfxInitContext( __DRIdrawablePrivate *driDrawPriv, tdfxContextPtr fxMesa ) void -tdfxDestroyContext( __DRIcontextPrivate *driContextPriv ) +tdfxDestroyContext( __DRIcontext *driContextPriv ) { tdfxContextPtr fxMesa = (tdfxContextPtr) driContextPriv->driverPrivate; @@ -607,7 +607,7 @@ tdfxDestroyContext( __DRIcontextPrivate *driContextPriv ) GLboolean -tdfxUnbindContext( __DRIcontextPrivate *driContextPriv ) +tdfxUnbindContext( __DRIcontext *driContextPriv ) { GET_CURRENT_CONTEXT(ctx); tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); @@ -626,9 +626,9 @@ tdfxUnbindContext( __DRIcontextPrivate *driContextPriv ) GLboolean -tdfxMakeCurrent( __DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv ) +tdfxMakeCurrent( __DRIcontext *driContextPriv, + __DRIdrawable *driDrawPriv, + __DRIdrawable *driReadPriv ) { if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) { fprintf( stderr, "%s( %p )\n", __FUNCTION__, (void *)driContextPriv ); diff --git a/src/mesa/drivers/dri/tdfx/tdfx_context.h b/src/mesa/drivers/dri/tdfx/tdfx_context.h index 3bcb545119..6e25cac301 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_context.h +++ b/src/mesa/drivers/dri/tdfx/tdfx_context.h @@ -892,18 +892,18 @@ struct tdfx_context { char rendererString[100]; /* stuff added for DRI */ - __DRIscreenPrivate *driScreen; - __DRIcontextPrivate *driContext; + __DRIscreen *driScreen; + __DRIcontext *driContext; /** * DRI drawable bound to this context for drawing. */ - __DRIdrawablePrivate *driDrawable; + __DRIdrawable *driDrawable; /** * DRI drawable bound to this context for reading. */ - __DRIdrawablePrivate *driReadable; + __DRIdrawable *driReadable; drm_context_t hHWContext; drm_hw_lock_t *driHwLock; @@ -938,19 +938,19 @@ struct tdfx_context { extern GLboolean tdfxCreateContext( const __GLcontextModes *mesaVis, - __DRIcontextPrivate *driContextPriv, + __DRIcontext *driContextPriv, void *sharedContextPrivate ); extern void -tdfxDestroyContext( __DRIcontextPrivate *driContextPriv ); +tdfxDestroyContext( __DRIcontext *driContextPriv ); extern GLboolean -tdfxUnbindContext( __DRIcontextPrivate *driContextPriv ); +tdfxUnbindContext( __DRIcontext *driContextPriv ); extern GLboolean -tdfxMakeCurrent( __DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv ); +tdfxMakeCurrent( __DRIcontext *driContextPriv, + __DRIdrawable *driDrawPriv, + __DRIdrawable *driReadPriv ); extern GLboolean tdfxInitGlide( tdfxContextPtr tmesa ); diff --git a/src/mesa/drivers/dri/tdfx/tdfx_lock.c b/src/mesa/drivers/dri/tdfx/tdfx_lock.c index 17cdc51ee1..4f84240104 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_lock.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_lock.c @@ -45,10 +45,10 @@ void tdfxGetLock( tdfxContextPtr fxMesa ) { - __DRIcontextPrivate *cPriv = fxMesa->driContext; - __DRIdrawablePrivate *const drawable = cPriv->driDrawablePriv; - __DRIdrawablePrivate *const readable = cPriv->driReadablePriv; - __DRIscreenPrivate *sPriv = drawable->driScreenPriv; + __DRIcontext *cPriv = fxMesa->driContext; + __DRIdrawable *const drawable = cPriv->driDrawablePriv; + __DRIdrawable *const readable = cPriv->driReadablePriv; + __DRIscreen *sPriv = drawable->driScreenPriv; TDFXSAREAPriv *saPriv = (TDFXSAREAPriv *) (((char *) sPriv->pSAREA) + fxMesa->fxScreen->sarea_priv_offset); unsigned int stamp = drawable->lastStamp; diff --git a/src/mesa/drivers/dri/tdfx/tdfx_pixels.c b/src/mesa/drivers/dri/tdfx/tdfx_pixels.c index a3b1775e90..65f0464f8a 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_pixels.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_pixels.c @@ -495,7 +495,7 @@ tdfx_readpixels_R5G6B5(GLcontext * ctx, GLint x, GLint y, { tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); GrLfbInfo_t info; - __DRIdrawablePrivate *const readable = fxMesa->driReadable; + __DRIdrawable *const readable = fxMesa->driReadable; const GLint winX = readable->x; const GLint winY = readable->y + readable->h - 1; const GLint scrX = winX + x; @@ -553,7 +553,7 @@ tdfx_readpixels_R8G8B8A8(GLcontext * ctx, GLint x, GLint y, { tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); GrLfbInfo_t info; - __DRIdrawablePrivate *const readable = fxMesa->driReadable; + __DRIdrawable *const readable = fxMesa->driReadable; const GLint winX = readable->x; const GLint winY = readable->y + readable->h - 1; const GLint scrX = winX + x; diff --git a/src/mesa/drivers/dri/tdfx/tdfx_render.c b/src/mesa/drivers/dri/tdfx/tdfx_render.c index 79d63f72ac..979bcd4514 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_render.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_render.c @@ -556,7 +556,7 @@ static void uploadTextureImages( tdfxContextPtr fxMesa ) */ void tdfxUploadClipping( tdfxContextPtr fxMesa ) { - __DRIdrawablePrivate *dPriv = fxMesa->driDrawable; + __DRIdrawable *dPriv = fxMesa->driDrawable; assert(dPriv); diff --git a/src/mesa/drivers/dri/tdfx/tdfx_screen.c b/src/mesa/drivers/dri/tdfx/tdfx_screen.c index 2eb0024d40..d72d8e0d47 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_screen.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.c @@ -70,7 +70,7 @@ static const __DRIextension *tdfxExtensions[] = { static const GLuint __driNConfigOptions = 1; static GLboolean -tdfxCreateScreen( __DRIscreenPrivate *sPriv ) +tdfxCreateScreen( __DRIscreen *sPriv ) { tdfxScreenPrivate *fxScreen; TDFXDRIPtr fxDRIPriv = (TDFXDRIPtr) sPriv->pDevPriv; @@ -121,7 +121,7 @@ tdfxCreateScreen( __DRIscreenPrivate *sPriv ) static void -tdfxDestroyScreen( __DRIscreenPrivate *sPriv ) +tdfxDestroyScreen( __DRIscreen *sPriv ) { tdfxScreenPrivate *fxScreen = (tdfxScreenPrivate *) sPriv->private; @@ -139,7 +139,7 @@ tdfxDestroyScreen( __DRIscreenPrivate *sPriv ) static GLboolean -tdfxInitDriver( __DRIscreenPrivate *sPriv ) +tdfxInitDriver( __DRIscreen *sPriv ) { if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) { fprintf( stderr, "%s( %p )\n", __FUNCTION__, (void *)sPriv ); @@ -155,8 +155,8 @@ tdfxInitDriver( __DRIscreenPrivate *sPriv ) static GLboolean -tdfxCreateBuffer( __DRIscreenPrivate *driScrnPriv, - __DRIdrawablePrivate *driDrawPriv, +tdfxCreateBuffer( __DRIscreen *driScrnPriv, + __DRIdrawable *driDrawPriv, const __GLcontextModes *mesaVis, GLboolean isPixmap ) { @@ -227,14 +227,14 @@ tdfxCreateBuffer( __DRIscreenPrivate *driScrnPriv, static void -tdfxDestroyBuffer(__DRIdrawablePrivate *driDrawPriv) +tdfxDestroyBuffer(__DRIdrawable *driDrawPriv) { _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL); } static void -tdfxSwapBuffers( __DRIdrawablePrivate *driDrawPriv ) +tdfxSwapBuffers( __DRIdrawable *driDrawPriv ) { GET_CURRENT_CONTEXT(ctx); @@ -253,7 +253,7 @@ tdfxSwapBuffers( __DRIdrawablePrivate *driDrawPriv ) * we have to do a glFinish (per the GLX spec). */ if ( ctx ) { - __DRIdrawablePrivate *curDrawPriv; + __DRIdrawable *curDrawPriv; fxMesa = TDFX_CONTEXT(ctx); curDrawPriv = fxMesa->driContext->driDrawablePriv; @@ -341,7 +341,7 @@ tdfxSwapBuffers( __DRIdrawablePrivate *driDrawPriv ) } static const __DRIconfig ** -tdfxFillInModes(__DRIscreenPrivate *psp, +tdfxFillInModes(__DRIscreen *psp, unsigned pixel_bits, unsigned depth_bits, unsigned stencil_bits, diff --git a/src/mesa/drivers/dri/tdfx/tdfx_screen.h b/src/mesa/drivers/dri/tdfx/tdfx_screen.h index 5a68898b36..6aa42e8667 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_screen.h +++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.h @@ -61,7 +61,7 @@ typedef struct { int textureOffset; int textureSize; - __DRIscreenPrivate *driScrnPriv; + __DRIscreen *driScrnPriv; unsigned int sarea_priv_offset; /* Configuration cache with default values for all contexts */ diff --git a/src/mesa/drivers/dri/tdfx/tdfx_span.c b/src/mesa/drivers/dri/tdfx/tdfx_span.c index 6b38fa5a01..a17bcd952a 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_span.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_span.c @@ -47,7 +47,7 @@ #define LOCAL_VARS \ driRenderbuffer *drb = (driRenderbuffer *) rb; \ - __DRIdrawablePrivate *const dPriv = drb->dPriv; \ + __DRIdrawable *const dPriv = drb->dPriv; \ GLuint pitch = drb->backBuffer ? info.strideInBytes \ : (drb->pitch * drb->cpp); \ const GLuint bottom = dPriv->h - 1; \ @@ -104,7 +104,7 @@ #define HW_READ_CLIPLOOP() \ do { \ - const __DRIdrawablePrivate *dPriv = fxMesa->driDrawable; \ + const __DRIdrawable *dPriv = fxMesa->driDrawable; \ drm_clip_rect_t *rect = dPriv->pClipRects; \ int _nc = dPriv->numClipRects; \ while (_nc--) { \ diff --git a/src/mesa/drivers/dri/tdfx/tdfx_state.c b/src/mesa/drivers/dri/tdfx/tdfx_state.c index cf2712720f..cdb61a0ce0 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_state.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_state.c @@ -621,7 +621,7 @@ static int intersect_rect( drm_clip_rect_t *out, void tdfxUpdateClipping( GLcontext *ctx ) { tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = fxMesa->driDrawable; + __DRIdrawable *dPriv = fxMesa->driDrawable; if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) { fprintf( stderr, "%s()\n", __FUNCTION__ ); diff --git a/src/mesa/drivers/dri/unichrome/via_context.c b/src/mesa/drivers/dri/unichrome/via_context.c index 0524becf3e..d17a160271 100644 --- a/src/mesa/drivers/dri/unichrome/via_context.c +++ b/src/mesa/drivers/dri/unichrome/via_context.c @@ -148,7 +148,7 @@ viaRenderbufferStorage(GLcontext *ctx, struct gl_renderbuffer *rb, static void viaInitRenderbuffer(struct via_renderbuffer *vrb, GLenum format, - __DRIdrawablePrivate *dPriv) + __DRIdrawable *dPriv) { const GLuint name = 0; struct gl_renderbuffer *rb = & vrb->Base; @@ -207,7 +207,7 @@ viaInitRenderbuffer(struct via_renderbuffer *vrb, GLenum format, static GLboolean calculate_buffer_parameters(struct via_context *vmesa, struct gl_framebuffer *fb, - __DRIdrawablePrivate *dPriv) + __DRIdrawable *dPriv) { const unsigned shift = vmesa->viaScreen->bitsPerPixel / 16; const unsigned extra = 32; @@ -460,12 +460,12 @@ FreeBuffer(struct via_context *vmesa) GLboolean viaCreateContext(const __GLcontextModes *visual, - __DRIcontextPrivate *driContextPriv, + __DRIcontext *driContextPriv, void *sharedContextPrivate) { GLcontext *ctx, *shareCtx; struct via_context *vmesa; - __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + __DRIscreen *sPriv = driContextPriv->driScreenPriv; viaScreenPrivate *viaScreen = (viaScreenPrivate *)sPriv->private; drm_via_sarea_t *saPriv = (drm_via_sarea_t *) (((GLubyte *)sPriv->pSAREA) + viaScreen->sareaPrivOffset); @@ -679,7 +679,7 @@ viaCreateContext(const __GLcontextModes *visual, } void -viaDestroyContext(__DRIcontextPrivate *driContextPriv) +viaDestroyContext(__DRIcontext *driContextPriv) { GET_CURRENT_CONTEXT(ctx); struct via_context *vmesa = @@ -729,8 +729,8 @@ viaDestroyContext(__DRIcontextPrivate *driContextPriv) void viaXMesaWindowMoved(struct via_context *vmesa) { - __DRIdrawablePrivate *const drawable = vmesa->driDrawable; - __DRIdrawablePrivate *const readable = vmesa->driReadable; + __DRIdrawable *const drawable = vmesa->driDrawable; + __DRIdrawable *const readable = vmesa->driReadable; struct via_renderbuffer * draw_buffer; struct via_renderbuffer * read_buffer; GLuint bytePerPixel = vmesa->viaScreen->bitsPerPixel >> 3; @@ -813,15 +813,15 @@ void viaXMesaWindowMoved(struct via_context *vmesa) } GLboolean -viaUnbindContext(__DRIcontextPrivate *driContextPriv) +viaUnbindContext(__DRIcontext *driContextPriv) { return GL_TRUE; } GLboolean -viaMakeCurrent(__DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv) +viaMakeCurrent(__DRIcontext *driContextPriv, + __DRIdrawable *driDrawPriv, + __DRIdrawable *driReadPriv) { if (VIA_DEBUG & DEBUG_DRI) { fprintf(stderr, "driContextPriv = %016lx\n", (unsigned long)driContextPriv); @@ -897,8 +897,8 @@ viaMakeCurrent(__DRIcontextPrivate *driContextPriv, void viaGetLock(struct via_context *vmesa, GLuint flags) { - __DRIdrawablePrivate *dPriv = vmesa->driDrawable; - __DRIscreenPrivate *sPriv = vmesa->driScreen; + __DRIdrawable *dPriv = vmesa->driDrawable; + __DRIscreen *sPriv = vmesa->driScreen; drmGetLock(vmesa->driFd, vmesa->hHWContext, flags); @@ -928,9 +928,9 @@ void viaGetLock(struct via_context *vmesa, GLuint flags) void -viaSwapBuffers(__DRIdrawablePrivate *drawablePrivate) +viaSwapBuffers(__DRIdrawable *drawablePrivate) { - __DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *)drawablePrivate; + __DRIdrawable *dPriv = (__DRIdrawable *)drawablePrivate; if (dPriv && dPriv->driContextPriv && diff --git a/src/mesa/drivers/dri/unichrome/via_context.h b/src/mesa/drivers/dri/unichrome/via_context.h index 4cc9e475c2..4e1ab3a6ca 100644 --- a/src/mesa/drivers/dri/unichrome/via_context.h +++ b/src/mesa/drivers/dri/unichrome/via_context.h @@ -105,7 +105,7 @@ struct via_renderbuffer { int drawW; int drawH; - __DRIdrawablePrivate *dPriv; + __DRIdrawable *dPriv; }; @@ -294,14 +294,14 @@ struct via_context { /** * DRI drawable bound to this context for drawing. */ - __DRIdrawablePrivate *driDrawable; + __DRIdrawable *driDrawable; /** * DRI drawable bound to this context for reading. */ - __DRIdrawablePrivate *driReadable; + __DRIdrawable *driReadable; - __DRIscreenPrivate *driScreen; + __DRIscreen *driScreen; viaScreenPrivate *viaScreen; drm_via_sarea_t *sarea; volatile GLuint* regMMIOBase; diff --git a/src/mesa/drivers/dri/unichrome/via_ioctl.c b/src/mesa/drivers/dri/unichrome/via_ioctl.c index 91c94fa377..8d4edfa305 100644 --- a/src/mesa/drivers/dri/unichrome/via_ioctl.c +++ b/src/mesa/drivers/dri/unichrome/via_ioctl.c @@ -205,7 +205,7 @@ static void viaFillBuffer(struct via_context *vmesa, static void viaClear(GLcontext *ctx, GLbitfield mask) { struct via_context *vmesa = VIA_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = vmesa->driDrawable; + __DRIdrawable *dPriv = vmesa->driDrawable; struct via_renderbuffer *const vrb = (struct via_renderbuffer *) dPriv->driverPrivate; int flag = 0; @@ -507,12 +507,12 @@ void viaWaitIdleLocked( struct via_context *vmesa, GLboolean light ) * except that WAIT_IDLE() will spin the CPU polling, while this is * IRQ driven. */ -static void viaWaitIdleVBlank( __DRIdrawablePrivate *dPriv, +static void viaWaitIdleVBlank( __DRIdrawable *dPriv, struct via_context *vmesa, GLuint value ) { GLboolean missed_target; - __DRIscreenPrivate *psp = dPriv->driScreenPriv; + __DRIscreen *psp = dPriv->driScreenPriv; VIA_FLUSH_DMA(vmesa); @@ -591,11 +591,11 @@ void viaResetPageFlippingLocked(struct via_context *vmesa) /* * Copy the back buffer to the front buffer. */ -void viaCopyBuffer(__DRIdrawablePrivate *dPriv) +void viaCopyBuffer(__DRIdrawable *dPriv) { struct via_context *vmesa = (struct via_context *)dPriv->driContextPriv->driverPrivate; - __DRIscreenPrivate *psp = dPriv->driScreenPriv; + __DRIscreen *psp = dPriv->driScreenPriv; if (VIA_DEBUG & DEBUG_IOCTL) fprintf(stderr, @@ -635,12 +635,12 @@ void viaCopyBuffer(__DRIdrawablePrivate *dPriv) } -void viaPageFlip(__DRIdrawablePrivate *dPriv) +void viaPageFlip(__DRIdrawable *dPriv) { struct via_context *vmesa = (struct via_context *)dPriv->driContextPriv->driverPrivate; struct via_renderbuffer buffer_tmp; - __DRIscreenPrivate *psp = dPriv->driScreenPriv; + __DRIscreen *psp = dPriv->driScreenPriv; VIA_FLUSH_DMA(vmesa); if (dPriv->vblFlags == VBLANK_FLAG_SYNC && diff --git a/src/mesa/drivers/dri/unichrome/via_ioctl.h b/src/mesa/drivers/dri/unichrome/via_ioctl.h index 14a833a97d..c6b32cf085 100644 --- a/src/mesa/drivers/dri/unichrome/via_ioctl.h +++ b/src/mesa/drivers/dri/unichrome/via_ioctl.h @@ -33,8 +33,8 @@ void viaFlushDma(struct via_context *vmesa); void viaFlushDmaLocked(struct via_context *vmesa, GLuint flags); void viaInitIoctlFuncs(GLcontext *ctx); -void viaCopyBuffer(__DRIdrawablePrivate *dpriv); -void viaPageFlip(__DRIdrawablePrivate *dpriv); +void viaCopyBuffer(__DRIdrawable *dpriv); +void viaPageFlip(__DRIdrawable *dpriv); void viaCheckDma(struct via_context *vmesa, GLuint bytes); void viaResetPageFlippingLocked(struct via_context *vmesa); void viaWaitIdle(struct via_context *vmesa, GLboolean light); diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c index e0bf58ca9a..82668f2def 100644 --- a/src/mesa/drivers/dri/unichrome/via_screen.c +++ b/src/mesa/drivers/dri/unichrome/via_screen.c @@ -90,7 +90,7 @@ static void via_free_empty_buffers( drmBufMapPtr bufs ) static GLboolean -viaInitDriver(__DRIscreenPrivate *sPriv) +viaInitDriver(__DRIscreen *sPriv) { viaScreenPrivate *viaScreen; VIADRIPtr gDRIPriv = (VIADRIPtr)sPriv->pDevPriv; @@ -184,7 +184,7 @@ viaInitDriver(__DRIscreenPrivate *sPriv) } static void -viaDestroyScreen(__DRIscreenPrivate *sPriv) +viaDestroyScreen(__DRIscreen *sPriv) { viaScreenPrivate *viaScreen = (viaScreenPrivate *)sPriv->private; VIADRIPtr gDRIPriv = (VIADRIPtr)sPriv->pDevPriv; @@ -203,8 +203,8 @@ viaDestroyScreen(__DRIscreenPrivate *sPriv) static GLboolean -viaCreateBuffer(__DRIscreenPrivate *driScrnPriv, - __DRIdrawablePrivate *driDrawPriv, +viaCreateBuffer(__DRIscreen *driScrnPriv, + __DRIdrawable *driDrawPriv, const __GLcontextModes *mesaVis, GLboolean isPixmap) { @@ -314,13 +314,13 @@ viaCreateBuffer(__DRIscreenPrivate *driScrnPriv, static void -viaDestroyBuffer(__DRIdrawablePrivate *driDrawPriv) +viaDestroyBuffer(__DRIdrawable *driDrawPriv) { _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL); } static const __DRIconfig ** -viaFillInModes( __DRIscreenPrivate *psp, +viaFillInModes( __DRIscreen *psp, unsigned pixel_bits, GLboolean have_back_buffer ) { __DRIconfig **configs; @@ -377,7 +377,7 @@ viaFillInModes( __DRIscreenPrivate *psp, * \return the __GLcontextModes supported by this driver */ static const __DRIconfig ** -viaInitScreen(__DRIscreenPrivate *psp) +viaInitScreen(__DRIscreen *psp) { static const __DRIversion ddx_expected = { VIA_DRIDDX_VERSION_MAJOR, VIA_DRIDDX_VERSION_MINOR, @@ -405,7 +405,7 @@ viaInitScreen(__DRIscreenPrivate *psp) * Get information about previous buffer swaps. */ static int -getSwapInfo( __DRIdrawablePrivate *dPriv, __DRIswapInfo * sInfo ) +getSwapInfo( __DRIdrawable *dPriv, __DRIswapInfo * sInfo ) { struct via_context *vmesa; diff --git a/src/mesa/drivers/dri/unichrome/via_screen.h b/src/mesa/drivers/dri/unichrome/via_screen.h index c3ef722ff0..aa662e01c0 100644 --- a/src/mesa/drivers/dri/unichrome/via_screen.h +++ b/src/mesa/drivers/dri/unichrome/via_screen.h @@ -61,7 +61,7 @@ typedef struct { drmAddress agpLinearStart; GLuint agpBase; - __DRIscreenPrivate *driScrnPriv; + __DRIscreen *driScrnPriv; drmBufMapPtr bufs; unsigned int sareaPrivOffset; /*=* John Sheng [2003.12.9] Tuxracer & VQ *=*/ @@ -77,21 +77,21 @@ typedef struct { extern GLboolean viaCreateContext(const __GLcontextModes *mesaVis, - __DRIcontextPrivate *driContextPriv, + __DRIcontext *driContextPriv, void *sharedContextPrivate); extern void -viaDestroyContext(__DRIcontextPrivate *driContextPriv); +viaDestroyContext(__DRIcontext *driContextPriv); extern GLboolean -viaUnbindContext(__DRIcontextPrivate *driContextPriv); +viaUnbindContext(__DRIcontext *driContextPriv); extern GLboolean -viaMakeCurrent(__DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv); +viaMakeCurrent(__DRIcontext *driContextPriv, + __DRIdrawable *driDrawPriv, + __DRIdrawable *driReadPriv); extern void -viaSwapBuffers(__DRIdrawablePrivate *drawablePrivate); +viaSwapBuffers(__DRIdrawable *drawablePrivate); #endif diff --git a/src/mesa/drivers/dri/unichrome/via_span.c b/src/mesa/drivers/dri/unichrome/via_span.c index e847164cd0..fa3cbf7a79 100644 --- a/src/mesa/drivers/dri/unichrome/via_span.c +++ b/src/mesa/drivers/dri/unichrome/via_span.c @@ -43,7 +43,7 @@ #undef LOCAL_VARS #define LOCAL_VARS \ struct via_renderbuffer *vrb = (struct via_renderbuffer *) rb; \ - __DRIdrawablePrivate *dPriv = vrb->dPriv; \ + __DRIdrawable *dPriv = vrb->dPriv; \ GLuint pitch = vrb->pitch; \ GLuint height = dPriv->h; \ GLint p = 0; \ @@ -80,7 +80,7 @@ */ #define LOCAL_DEPTH_VARS \ struct via_renderbuffer *vrb = (struct via_renderbuffer *) rb; \ - __DRIdrawablePrivate *dPriv = vrb->dPriv; \ + __DRIdrawable *dPriv = vrb->dPriv; \ GLuint depth_pitch = vrb->pitch; \ GLuint height = dPriv->h; \ char *buf = (char *)(vrb->map) diff --git a/src/mesa/drivers/dri/unichrome/via_state.c b/src/mesa/drivers/dri/unichrome/via_state.c index a9db6c45f7..5a8d927de1 100644 --- a/src/mesa/drivers/dri/unichrome/via_state.c +++ b/src/mesa/drivers/dri/unichrome/via_state.c @@ -476,7 +476,7 @@ void viaEmitState(struct via_context *vmesa) */ if (ctx->Polygon.StippleFlag) { GLuint *stipple = &ctx->PolygonStipple[0]; - __DRIdrawablePrivate *dPriv = vmesa->driDrawable; + __DRIdrawable *dPriv = vmesa->driDrawable; struct via_renderbuffer *const vrb = (struct via_renderbuffer *) dPriv->driverPrivate; GLint i; @@ -722,7 +722,7 @@ static void viaColorMask(GLcontext *ctx, void viaCalcViewport(GLcontext *ctx) { struct via_context *vmesa = VIA_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = vmesa->driDrawable; + __DRIdrawable *dPriv = vmesa->driDrawable; struct via_renderbuffer *const vrb = (struct via_renderbuffer *) dPriv->driverPrivate; const GLfloat *v = ctx->Viewport._WindowMap.m; -- cgit v1.2.3 From 39a0e4e7de379a182c1544fa24d5cb2a7687ec72 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Fri, 1 Jan 2010 17:56:29 -0500 Subject: Push __driDriverExtensions out of dri_util.c and into the drivers This lets the individual drivers select which extensions to advertise. Specifically, most drivers (tdfx, sis, savage etc) don't support DRI2 but the shared extension list in dri_util.c does list the DRI2 extension. Pushing the list into the drivers, lets us avoid listing the DRI2 extension for drivers that don't support it. --- src/gallium/state_trackers/dri/dri_screen.c | 8 ++++++++ src/mesa/drivers/dri/common/dri_util.c | 10 +--------- src/mesa/drivers/dri/common/dri_util.h | 1 + src/mesa/drivers/dri/fb/fb_dri.c | 7 +++++++ src/mesa/drivers/dri/ffb/ffb_xmesa.c | 7 +++++++ src/mesa/drivers/dri/gamma/gamma_xmesa.c | 7 +++++++ src/mesa/drivers/dri/i810/i810screen.c | 7 +++++++ src/mesa/drivers/dri/intel/intel_screen.c | 8 ++++++++ src/mesa/drivers/dri/mach64/mach64_screen.c | 6 ++++++ src/mesa/drivers/dri/mga/mga_xmesa.c | 7 +++++++ src/mesa/drivers/dri/r128/r128_screen.c | 7 +++++++ src/mesa/drivers/dri/radeon/radeon_screen.c | 7 +++++++ src/mesa/drivers/dri/savage/savage_xmesa.c | 7 +++++++ src/mesa/drivers/dri/sis/sis_screen.c | 7 +++++++ src/mesa/drivers/dri/tdfx/tdfx_screen.c | 7 +++++++ src/mesa/drivers/dri/unichrome/via_screen.c | 7 +++++++ 16 files changed, 101 insertions(+), 9 deletions(-) (limited to 'src/mesa/drivers/dri/savage/savage_xmesa.c') diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c index ce79d09901..bb12baf281 100644 --- a/src/gallium/state_trackers/dri/dri_screen.c +++ b/src/gallium/state_trackers/dri/dri_screen.c @@ -346,4 +346,12 @@ PUBLIC const struct __DriverAPIRec driDriverAPI = { .InitScreen2 = dri_init_screen2, }; +/* This is the table of extensions that the loader will dlsym() for. */ +PUBLIC const __DRIextension *__driDriverExtensions[] = { + &driCoreExtension.base, + &driLegacyExtension.base, + &driDRI2Extension.base, + NULL +}; + /* vim: set sw=3 ts=8 sts=3 expandtab: */ diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index fd0359fac9..0e01d74265 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -841,7 +841,7 @@ const __DRIlegacyExtension driLegacyExtension = { driCreateNewContext, }; -/** Legacy DRI interface */ +/** DRI2 interface */ const __DRIdri2Extension driDRI2Extension = { { __DRI_DRI2, __DRI_DRI2_VERSION }, dri2CreateNewScreen, @@ -849,14 +849,6 @@ const __DRIdri2Extension driDRI2Extension = { dri2CreateNewContext, }; -/* This is the table of extensions that the loader will dlsym() for. */ -PUBLIC const __DRIextension *__driDriverExtensions[] = { - &driCoreExtension.base, - &driLegacyExtension.base, - &driDRI2Extension.base, - NULL -}; - static int driFrameTracking(__DRIdrawable *drawable, GLboolean enable) { diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h index 984e5e6909..35d8b8ff93 100644 --- a/src/mesa/drivers/dri/common/dri_util.h +++ b/src/mesa/drivers/dri/common/dri_util.h @@ -64,6 +64,7 @@ typedef struct __DRIswapInfoRec __DRIswapInfo; */ extern const __DRIlegacyExtension driLegacyExtension; extern const __DRIcoreExtension driCoreExtension; +extern const __DRIdri2Extension driDRI2Extension; extern const __DRIextension driReadDrawableExtension; extern const __DRIcopySubBufferExtension driCopySubBufferExtension; extern const __DRIswapControlExtension driSwapControlExtension; diff --git a/src/mesa/drivers/dri/fb/fb_dri.c b/src/mesa/drivers/dri/fb/fb_dri.c index 11058b3853..f37241dd69 100644 --- a/src/mesa/drivers/dri/fb/fb_dri.c +++ b/src/mesa/drivers/dri/fb/fb_dri.c @@ -785,3 +785,10 @@ void * __driCreateNewScreen( __DRInativeDisplay *dpy, int scrn, __DRIscreen *psc return (void *) psp; } + +/* This is the table of extensions that the loader will dlsym() for. */ +PUBLIC const __DRIextension *__driDriverExtensions[] = { + &driCoreExtension.base, + &driLegacyExtension.base, + NULL +}; diff --git a/src/mesa/drivers/dri/ffb/ffb_xmesa.c b/src/mesa/drivers/dri/ffb/ffb_xmesa.c index ea212e9dbd..88285f454e 100644 --- a/src/mesa/drivers/dri/ffb/ffb_xmesa.c +++ b/src/mesa/drivers/dri/ffb/ffb_xmesa.c @@ -722,3 +722,10 @@ const struct __DriverAPIRec driDriverAPI = { .WaitForSBC = NULL, .SwapBuffersMSC = NULL }; + +/* This is the table of extensions that the loader will dlsym() for. */ +PUBLIC const __DRIextension *__driDriverExtensions[] = { + &driCoreExtension.base, + &driLegacyExtension.base, + NULL +}; diff --git a/src/mesa/drivers/dri/gamma/gamma_xmesa.c b/src/mesa/drivers/dri/gamma/gamma_xmesa.c index 3492f5cb0f..e49ab5bae3 100644 --- a/src/mesa/drivers/dri/gamma/gamma_xmesa.c +++ b/src/mesa/drivers/dri/gamma/gamma_xmesa.c @@ -263,3 +263,10 @@ void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, psp = __driUtilCreateScreen(dpy, scrn, psc, numConfigs, config, &gammaAPI); return (void *) psp; } + +/* This is the table of extensions that the loader will dlsym() for. */ +PUBLIC const __DRIextension *__driDriverExtensions[] = { + &driCoreExtension.base, + &driLegacyExtension.base, + NULL +}; diff --git a/src/mesa/drivers/dri/i810/i810screen.c b/src/mesa/drivers/dri/i810/i810screen.c index 09da4700c7..2a30782afd 100644 --- a/src/mesa/drivers/dri/i810/i810screen.c +++ b/src/mesa/drivers/dri/i810/i810screen.c @@ -356,3 +356,10 @@ const struct __DriverAPIRec driDriverAPI = { .WaitForSBC = NULL, .SwapBuffersMSC = NULL }; + +/* This is the table of extensions that the loader will dlsym() for. */ +PUBLIC const __DRIextension *__driDriverExtensions[] = { + &driCoreExtension.base, + &driLegacyExtension.base, + NULL +}; diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index d8d89b1ec1..2acc0dbfdd 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -831,3 +831,11 @@ const struct __DriverAPIRec driDriverAPI = { .InitScreen2 = intelInitScreen2, }; + +/* This is the table of extensions that the loader will dlsym() for. */ +PUBLIC const __DRIextension *__driDriverExtensions[] = { + &driCoreExtension.base, + &driLegacyExtension.base, + &driDRI2Extension.base, + NULL +}; diff --git a/src/mesa/drivers/dri/mach64/mach64_screen.c b/src/mesa/drivers/dri/mach64/mach64_screen.c index 63515d278c..1ed3b0b70e 100644 --- a/src/mesa/drivers/dri/mach64/mach64_screen.c +++ b/src/mesa/drivers/dri/mach64/mach64_screen.c @@ -457,3 +457,9 @@ const struct __DriverAPIRec driDriverAPI = { .SwapBuffersMSC = NULL }; +/* This is the table of extensions that the loader will dlsym() for. */ +PUBLIC const __DRIextension *__driDriverExtensions[] = { + &driCoreExtension.base, + &driLegacyExtension.base, + NULL +}; diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.c b/src/mesa/drivers/dri/mga/mga_xmesa.c index 428afa5895..f835cb8bd6 100644 --- a/src/mesa/drivers/dri/mga/mga_xmesa.c +++ b/src/mesa/drivers/dri/mga/mga_xmesa.c @@ -998,3 +998,10 @@ const struct __DriverAPIRec driDriverAPI = { .WaitForSBC = NULL, .SwapBuffersMSC = NULL }; + +/* This is the table of extensions that the loader will dlsym() for. */ +PUBLIC const __DRIextension *__driDriverExtensions[] = { + &driCoreExtension.base, + &driLegacyExtension.base, + NULL +}; diff --git a/src/mesa/drivers/dri/r128/r128_screen.c b/src/mesa/drivers/dri/r128/r128_screen.c index fe3fb8747e..80b265811e 100644 --- a/src/mesa/drivers/dri/r128/r128_screen.c +++ b/src/mesa/drivers/dri/r128/r128_screen.c @@ -517,3 +517,10 @@ const struct __DriverAPIRec driDriverAPI = { .WaitForSBC = NULL, .SwapBuffersMSC = NULL }; + +/* This is the table of extensions that the loader will dlsym() for. */ +PUBLIC const __DRIextension *__driDriverExtensions[] = { + &driCoreExtension.base, + &driLegacyExtension.base, + NULL +}; diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c index 801d7e147c..3080a0fcd0 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.c +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c @@ -1751,3 +1751,10 @@ const struct __DriverAPIRec driDriverAPI = { .InitScreen2 = radeonInitScreen2, }; +/* This is the table of extensions that the loader will dlsym() for. */ +PUBLIC const __DRIextension *__driDriverExtensions[] = { + &driCoreExtension.base, + &driLegacyExtension.base, + &driDRI2Extension.base, + NULL +}; diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c index 564e68eb89..8e879ca41c 100644 --- a/src/mesa/drivers/dri/savage/savage_xmesa.c +++ b/src/mesa/drivers/dri/savage/savage_xmesa.c @@ -1001,3 +1001,10 @@ const struct __DriverAPIRec driDriverAPI = { savageMakeCurrent, savageUnbindContext }; + +/* This is the table of extensions that the loader will dlsym() for. */ +PUBLIC const __DRIextension *__driDriverExtensions[] = { + &driCoreExtension.base, + &driLegacyExtension.base, + NULL +}; diff --git a/src/mesa/drivers/dri/sis/sis_screen.c b/src/mesa/drivers/dri/sis/sis_screen.c index f39a51ab69..d38b93ec9b 100644 --- a/src/mesa/drivers/dri/sis/sis_screen.c +++ b/src/mesa/drivers/dri/sis/sis_screen.c @@ -325,3 +325,10 @@ const struct __DriverAPIRec driDriverAPI = { .SwapBuffersMSC = NULL }; + +/* This is the table of extensions that the loader will dlsym() for. */ +PUBLIC const __DRIextension *__driDriverExtensions[] = { + &driCoreExtension.base, + &driLegacyExtension.base, + NULL +}; diff --git a/src/mesa/drivers/dri/tdfx/tdfx_screen.c b/src/mesa/drivers/dri/tdfx/tdfx_screen.c index d72d8e0d47..4422b5dec4 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_screen.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.c @@ -440,3 +440,10 @@ const struct __DriverAPIRec driDriverAPI = { .WaitForSBC = NULL, .SwapBuffersMSC = NULL }; + +/* This is the table of extensions that the loader will dlsym() for. */ +PUBLIC const __DRIextension *__driDriverExtensions[] = { + &driCoreExtension.base, + &driLegacyExtension.base, + NULL +}; diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c index 82668f2def..2cfb98317d 100644 --- a/src/mesa/drivers/dri/unichrome/via_screen.c +++ b/src/mesa/drivers/dri/unichrome/via_screen.c @@ -443,3 +443,10 @@ const struct __DriverAPIRec driDriverAPI = { .WaitForSBC = NULL, .SwapBuffersMSC = NULL }; + +/* This is the table of extensions that the loader will dlsym() for. */ +PUBLIC const __DRIextension *__driDriverExtensions[] = { + &driCoreExtension.base, + &driLegacyExtension.base, + NULL +}; -- cgit v1.2.3