summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/Makefile2
-rw-r--r--src/mesa/SConscript2
-rw-r--r--src/mesa/drivers/beos/GLView.cpp176
-rw-r--r--src/mesa/drivers/common/driverfuncs.c2
-rw-r--r--src/mesa/drivers/common/driverfuncs.h2
-rw-r--r--src/mesa/drivers/common/meta.c90
-rw-r--r--src/mesa/drivers/common/meta.h36
-rw-r--r--src/mesa/drivers/dri/common/depthtmp.h12
-rw-r--r--src/mesa/drivers/dri/common/dri_metaops.c16
-rw-r--r--src/mesa/drivers/dri/common/dri_metaops.h4
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c7
-rw-r--r--src/mesa/drivers/dri/common/dri_util.h5
-rw-r--r--src/mesa/drivers/dri/common/drirenderbuffer.c4
-rw-r--r--src/mesa/drivers/dri/common/drirenderbuffer.h2
-rw-r--r--src/mesa/drivers/dri/common/drisw_util.h5
-rw-r--r--src/mesa/drivers/dri/common/spantmp.h14
-rw-r--r--src/mesa/drivers/dri/common/spantmp2.h20
-rw-r--r--src/mesa/drivers/dri/common/stenciltmp.h12
-rw-r--r--src/mesa/drivers/dri/common/texmem.c4
-rw-r--r--src/mesa/drivers/dri/common/texmem.h4
-rw-r--r--src/mesa/drivers/dri/common/utils.c23
-rw-r--r--src/mesa/drivers/dri/common/utils.h8
-rw-r--r--src/mesa/drivers/dri/common/xmlpool/Makefile2
-rw-r--r--src/mesa/drivers/dri/i810/i810context.c18
-rw-r--r--src/mesa/drivers/dri/i810/i810context.h4
-rw-r--r--src/mesa/drivers/dri/i810/i810ioctl.c6
-rw-r--r--src/mesa/drivers/dri/i810/i810render.c2
-rw-r--r--src/mesa/drivers/dri/i810/i810screen.c6
-rw-r--r--src/mesa/drivers/dri/i810/i810screen.h2
-rw-r--r--src/mesa/drivers/dri/i810/i810span.c8
-rw-r--r--src/mesa/drivers/dri/i810/i810span.h8
-rw-r--r--src/mesa/drivers/dri/i810/i810state.c54
-rw-r--r--src/mesa/drivers/dri/i810/i810state.h6
-rw-r--r--src/mesa/drivers/dri/i810/i810tex.c22
-rw-r--r--src/mesa/drivers/dri/i810/i810tex.h2
-rw-r--r--src/mesa/drivers/dri/i810/i810texstate.c14
-rw-r--r--src/mesa/drivers/dri/i810/i810tris.c30
-rw-r--r--src/mesa/drivers/dri/i810/i810tris.h4
-rw-r--r--src/mesa/drivers/dri/i810/i810vb.c16
-rw-r--r--src/mesa/drivers/dri/i810/i810vb.h14
-rw-r--r--src/mesa/drivers/dri/i915/i830_context.c4
-rw-r--r--src/mesa/drivers/dri/i915/i830_context.h6
-rw-r--r--src/mesa/drivers/dri/i915/i830_state.c54
-rw-r--r--src/mesa/drivers/dri/i915/i830_texblend.c2
-rw-r--r--src/mesa/drivers/dri/i915/i830_texstate.c2
-rw-r--r--src/mesa/drivers/dri/i915/i830_vtbl.c5
-rw-r--r--src/mesa/drivers/dri/i915/i915_context.c6
-rw-r--r--src/mesa/drivers/dri/i915/i915_context.h12
-rw-r--r--src/mesa/drivers/dri/i915/i915_fragprog.c14
-rw-r--r--src/mesa/drivers/dri/i915/i915_program.c2
-rw-r--r--src/mesa/drivers/dri/i915/i915_program.h2
-rw-r--r--src/mesa/drivers/dri/i915/i915_state.c64
-rw-r--r--src/mesa/drivers/dri/i915/i915_texstate.c2
-rw-r--r--src/mesa/drivers/dri/i915/i915_vtbl.c3
-rw-r--r--src/mesa/drivers/dri/i915/intel_render.c2
-rw-r--r--src/mesa/drivers/dri/i915/intel_tris.c34
-rw-r--r--src/mesa/drivers/dri/i915/intel_tris.h4
-rw-r--r--src/mesa/drivers/dri/i965/Makefile1
-rw-r--r--src/mesa/drivers/dri/i965/brw_cc.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip_state.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h52
-rw-r--r--src/mesa/drivers/dri/i965/brw_curbe.c10
-rw-r--r--src/mesa/drivers/dri/i965/brw_defines.h1
-rw-r--r--src/mesa/drivers/dri/i965/brw_disasm.c13
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw.c19
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw.h6
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw_upload.c17
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu.h44
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu_emit.c402
-rw-r--r--src/mesa/drivers/dri/i965/brw_fallback.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_fallback.h8
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp1852
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.h462
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp3
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp419
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs.h1
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs_emit.c54
-rw-r--r--src/mesa/drivers/dri/i965/brw_misc_state.c12
-rw-r--r--src/mesa/drivers/dri/i965/brw_program.c24
-rw-r--r--src/mesa/drivers/dri/i965/brw_queryobj.c12
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf_state.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_state.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_upload.c3
-rw-r--r--src/mesa/drivers/dri/i965/brw_tex.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.c5
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_constval.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_emit.c26
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_state.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_surface_state.c6
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.c29
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.h12
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_emit.c14
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_fp.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_glsl.c42
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_pass0.c1
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_sampler_state.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_state.c63
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c29
-rw-r--r--src/mesa/drivers/dri/i965/gen6_cc.c6
-rw-r--r--src/mesa/drivers/dri/i965/gen6_clip_state.c4
-rw-r--r--src/mesa/drivers/dri/i965/gen6_depthstencil.c2
-rw-r--r--src/mesa/drivers/dri/i965/gen6_gs_state.c2
-rw-r--r--src/mesa/drivers/dri/i965/gen6_sampler_state.c2
-rw-r--r--src/mesa/drivers/dri/i965/gen6_scissor_state.c16
-rw-r--r--src/mesa/drivers/dri/i965/gen6_sf_state.c4
-rw-r--r--src/mesa/drivers/dri/i965/gen6_urb.c6
-rw-r--r--src/mesa/drivers/dri/i965/gen6_viewport_state.c4
-rw-r--r--src/mesa/drivers/dri/i965/gen6_vs_state.c6
-rw-r--r--src/mesa/drivers/dri/i965/gen6_wm_state.c24
-rw-r--r--src/mesa/drivers/dri/intel/intel_blit.c2
-rw-r--r--src/mesa/drivers/dri/intel/intel_blit.h2
-rw-r--r--src/mesa/drivers/dri/intel/intel_buffer_objects.c68
-rw-r--r--src/mesa/drivers/dri/intel/intel_buffers.c6
-rw-r--r--src/mesa/drivers/dri/intel/intel_buffers.h4
-rw-r--r--src/mesa/drivers/dri/intel/intel_clear.c2
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c24
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.h14
-rw-r--r--src/mesa/drivers/dri/intel/intel_extensions.c23
-rw-r--r--src/mesa/drivers/dri/intel/intel_extensions.h4
-rw-r--r--src/mesa/drivers/dri/intel/intel_extensions_es2.c2
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.c30
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel.c2
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel.h10
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_bitmap.c6
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_copy.c6
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_draw.c2
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_read.c4
-rw-r--r--src/mesa/drivers/dri/intel/intel_screen.c12
-rw-r--r--src/mesa/drivers/dri/intel/intel_span.c10
-rw-r--r--src/mesa/drivers/dri/intel/intel_span.h10
-rw-r--r--src/mesa/drivers/dri/intel/intel_state.c2
-rw-r--r--src/mesa/drivers/dri/intel/intel_syncobj.c12
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex.c10
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex.h2
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_copy.c12
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_format.c2
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_image.c20
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_subimage.c10
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_context.c8
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_context.h4
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_dd.c8
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_ioctl.c2
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_native_vb.c8
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_native_vbtmp.h8
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_screen.c10
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_span.c8
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_span.h4
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_state.c66
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_state.h10
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_tex.c20
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_tex.h2
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_texstate.c6
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_tris.c42
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_tris.h4
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_vb.c16
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_vb.h18
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_vbtmp.h12
-rw-r--r--src/mesa/drivers/dri/mga/mga_texcombine.c2
-rw-r--r--src/mesa/drivers/dri/mga/mga_texstate.c16
-rw-r--r--src/mesa/drivers/dri/mga/mga_xmesa.c18
-rw-r--r--src/mesa/drivers/dri/mga/mgacontext.h2
-rw-r--r--src/mesa/drivers/dri/mga/mgadd.c2
-rw-r--r--src/mesa/drivers/dri/mga/mgaioctl.c6
-rw-r--r--src/mesa/drivers/dri/mga/mgapixel.c28
-rw-r--r--src/mesa/drivers/dri/mga/mgapixel.h2
-rw-r--r--src/mesa/drivers/dri/mga/mgarender.c4
-rw-r--r--src/mesa/drivers/dri/mga/mgaspan.c8
-rw-r--r--src/mesa/drivers/dri/mga/mgaspan.h4
-rw-r--r--src/mesa/drivers/dri/mga/mgastate.c68
-rw-r--r--src/mesa/drivers/dri/mga/mgastate.h8
-rw-r--r--src/mesa/drivers/dri/mga/mgatex.c16
-rw-r--r--src/mesa/drivers/dri/mga/mgatex.h4
-rw-r--r--src/mesa/drivers/dri/mga/mgatris.c26
-rw-r--r--src/mesa/drivers/dri/mga/mgatris.h8
-rw-r--r--src/mesa/drivers/dri/mga/mgavb.c16
-rw-r--r--src/mesa/drivers/dri/mga/mgavb.h16
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_bo_state.c8
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_bo_state.h8
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c16
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_context.c41
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_context.h14
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_driver.c8
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_driver.h16
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_fbo.c18
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_fbo.h2
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_render.h4
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_render_t.c24
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_screen.c2
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_span.c10
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_state.c80
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_state.h10
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_surface.c18
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_surface.h2
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_swtnl_t.c30
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_texture.c52
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_texture.h4
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_util.h4
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c28
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_context.c18
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_context.h2
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_driver.h28
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_render.c26
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_state_fb.c4
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_state_frag.c4
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_state_raster.c8
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_state_tex.c2
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_surface.c14
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_context.c146
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_driver.h102
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_render.c26
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_fb.c24
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_frag.c10
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_polygon.c16
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_raster.c24
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_tex.c6
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_tnl.c31
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_context.c12
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_driver.h46
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_render.c26
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_state_fb.c4
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_state_frag.c4
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_state_polygon.c2
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_state_raster.c2
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_state_tex.c8
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_state_tnl.c22
-rw-r--r--src/mesa/drivers/dri/r128/r128_context.c8
-rw-r--r--src/mesa/drivers/dri/r128/r128_context.h4
-rw-r--r--src/mesa/drivers/dri/r128/r128_dd.c8
-rw-r--r--src/mesa/drivers/dri/r128/r128_ioctl.c2
-rw-r--r--src/mesa/drivers/dri/r128/r128_screen.c10
-rw-r--r--src/mesa/drivers/dri/r128/r128_span.c8
-rw-r--r--src/mesa/drivers/dri/r128/r128_span.h4
-rw-r--r--src/mesa/drivers/dri/r128/r128_state.c76
-rw-r--r--src/mesa/drivers/dri/r128/r128_state.h6
-rw-r--r--src/mesa/drivers/dri/r128/r128_tex.c20
-rw-r--r--src/mesa/drivers/dri/r128/r128_tex.h2
-rw-r--r--src/mesa/drivers/dri/r128/r128_texstate.c12
-rw-r--r--src/mesa/drivers/dri/r128/r128_tris.c28
-rw-r--r--src/mesa/drivers/dri/r128/r128_tris.h6
-rw-r--r--src/mesa/drivers/dri/r200/r200_blit.c2
-rw-r--r--src/mesa/drivers/dri/r200/r200_blit.h2
-rw-r--r--src/mesa/drivers/dri/r200/r200_cmdbuf.c2
-rw-r--r--src/mesa/drivers/dri/r200/r200_context.c6
-rw-r--r--src/mesa/drivers/dri/r200/r200_context.h2
-rw-r--r--src/mesa/drivers/dri/r200/r200_fragshader.c8
-rw-r--r--src/mesa/drivers/dri/r200/r200_ioctl.c4
-rw-r--r--src/mesa/drivers/dri/r200/r200_ioctl.h2
-rw-r--r--src/mesa/drivers/dri/r200/r200_maos.h2
-rw-r--r--src/mesa/drivers/dri/r200/r200_maos_arrays.c4
-rw-r--r--src/mesa/drivers/dri/r200/r200_state.c104
-rw-r--r--src/mesa/drivers/dri/r200/r200_state.h18
-rw-r--r--src/mesa/drivers/dri/r200/r200_state_init.c52
-rw-r--r--src/mesa/drivers/dri/r200/r200_swtcl.c35
-rw-r--r--src/mesa/drivers/dri/r200/r200_swtcl.h22
-rw-r--r--src/mesa/drivers/dri/r200/r200_tcl.c22
-rw-r--r--src/mesa/drivers/dri/r200/r200_tcl.h10
-rw-r--r--src/mesa/drivers/dri/r200/r200_tex.c10
-rw-r--r--src/mesa/drivers/dri/r200/r200_tex.h6
-rw-r--r--src/mesa/drivers/dri/r200/r200_texstate.c14
-rw-r--r--src/mesa/drivers/dri/r200/r200_vertprog.c16
-rw-r--r--src/mesa/drivers/dri/r200/r200_vertprog.h2
-rw-r--r--src/mesa/drivers/dri/r300/compiler/Makefile1
-rwxr-xr-xsrc/mesa/drivers/dri/r300/compiler/SConscript1
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c4
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c2
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_compiler.c66
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_compiler.h5
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.c61
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.h16
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c252
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_dataflow.h28
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_optimize.c457
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c219
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c28
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h15
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_remove_constants.c2
-rw-r--r--src/mesa/drivers/dri/r300/r300_blit.c2
-rw-r--r--src/mesa/drivers/dri/r300/r300_blit.h2
-rw-r--r--src/mesa/drivers/dri/r300/r300_cmdbuf.c36
-rw-r--r--src/mesa/drivers/dri/r300/r300_cmdbuf.h2
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.c10
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.h10
-rw-r--r--src/mesa/drivers/dri/r300/r300_draw.c24
-rw-r--r--src/mesa/drivers/dri/r300/r300_emit.c8
-rw-r--r--src/mesa/drivers/dri/r300/r300_emit.h8
-rw-r--r--src/mesa/drivers/dri/r300/r300_fragprog_common.c4
-rw-r--r--src/mesa/drivers/dri/r300/r300_fragprog_common.h2
-rw-r--r--src/mesa/drivers/dri/r300/r300_render.c4
-rw-r--r--src/mesa/drivers/dri/r300/r300_render.h4
-rw-r--r--src/mesa/drivers/dri/r300/r300_shader.c12
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c107
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.h6
-rw-r--r--src/mesa/drivers/dri/r300/r300_swtcl.c24
-rw-r--r--src/mesa/drivers/dri/r300/r300_swtcl.h16
-rw-r--r--src/mesa/drivers/dri/r300/r300_tex.c6
-rw-r--r--src/mesa/drivers/dri/r300/r300_tex.h2
-rw-r--r--src/mesa/drivers/dri/r300/r300_texstate.c4
-rw-r--r--src/mesa/drivers/dri/r300/r300_vertprog.c8
-rw-r--r--src/mesa/drivers/dri/r300/r300_vertprog.h2
-rw-r--r--src/mesa/drivers/dri/r300/radeon_context.h2
-rw-r--r--src/mesa/drivers/dri/r600/evergreen_blit.c4
-rw-r--r--src/mesa/drivers/dri/r600/evergreen_blit.h2
-rw-r--r--src/mesa/drivers/dri/r600/evergreen_chip.c38
-rw-r--r--src/mesa/drivers/dri/r600/evergreen_context.c2
-rw-r--r--src/mesa/drivers/dri/r600/evergreen_fragprog.c16
-rw-r--r--src/mesa/drivers/dri/r600/evergreen_fragprog.h16
-rw-r--r--src/mesa/drivers/dri/r600/evergreen_ioctl.c2
-rw-r--r--src/mesa/drivers/dri/r600/evergreen_ioctl.h2
-rw-r--r--src/mesa/drivers/dri/r600/evergreen_oglprog.c10
-rw-r--r--src/mesa/drivers/dri/r600/evergreen_render.c30
-rw-r--r--src/mesa/drivers/dri/r600/evergreen_state.c94
-rw-r--r--src/mesa/drivers/dri/r600/evergreen_state.h12
-rw-r--r--src/mesa/drivers/dri/r600/evergreen_tex.c14
-rw-r--r--src/mesa/drivers/dri/r600/evergreen_tex.h4
-rw-r--r--src/mesa/drivers/dri/r600/evergreen_vertprog.c20
-rw-r--r--src/mesa/drivers/dri/r600/evergreen_vertprog.h18
-rw-r--r--src/mesa/drivers/dri/r600/r600_blit.c4
-rw-r--r--src/mesa/drivers/dri/r600/r600_blit.h2
-rw-r--r--src/mesa/drivers/dri/r600/r600_context.c10
-rw-r--r--src/mesa/drivers/dri/r600/r600_context.h8
-rw-r--r--src/mesa/drivers/dri/r600/r600_emit.c8
-rw-r--r--src/mesa/drivers/dri/r600/r600_emit.h8
-rw-r--r--src/mesa/drivers/dri/r600/r600_tex.c6
-rw-r--r--src/mesa/drivers/dri/r600/r600_tex.h2
-rw-r--r--src/mesa/drivers/dri/r600/r600_texstate.c10
-rw-r--r--src/mesa/drivers/dri/r600/r700_chip.c82
-rw-r--r--src/mesa/drivers/dri/r600/r700_clear.c2
-rw-r--r--src/mesa/drivers/dri/r600/r700_clear.h2
-rw-r--r--src/mesa/drivers/dri/r600/r700_fragprog.c14
-rw-r--r--src/mesa/drivers/dri/r600/r700_fragprog.h14
-rw-r--r--src/mesa/drivers/dri/r600/r700_oglprog.c10
-rw-r--r--src/mesa/drivers/dri/r600/r700_render.c26
-rw-r--r--src/mesa/drivers/dri/r600/r700_shader.c2
-rw-r--r--src/mesa/drivers/dri/r600/r700_shader.h2
-rw-r--r--src/mesa/drivers/dri/r600/r700_state.c104
-rw-r--r--src/mesa/drivers/dri/r600/r700_state.h10
-rw-r--r--src/mesa/drivers/dri/r600/r700_vertprog.c18
-rw-r--r--src/mesa/drivers/dri/r600/r700_vertprog.h16
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_blit.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_blit.h2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_buffer_objects.c14
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common.c28
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common.h24
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common_context.c16
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common_context.h22
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_context.c6
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_context.h2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_dma.c6
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_dma.h6
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_fbo.c28
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_ioctl.c8
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_ioctl.h8
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_maos.h2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_maos_arrays.c6
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_maos_vbtmp.h2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_maos_verts.c4
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_pixel_read.c4
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_queryobj.c20
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_queryobj.h8
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_screen.c10
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_span.c8
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_span.h2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state.c98
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state.h14
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state_init.c26
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_swtcl.c32
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_swtcl.h18
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tcl.c22
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tcl.h10
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tex.c10
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tex.h2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tex_copy.c6
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tex_getimage.c6
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texstate.c10
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texture.c44
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texture.h40
-rw-r--r--src/mesa/drivers/dri/savage/savage_xmesa.c16
-rw-r--r--src/mesa/drivers/dri/savage/savagecontext.h4
-rw-r--r--src/mesa/drivers/dri/savage/savagedd.c6
-rw-r--r--src/mesa/drivers/dri/savage/savagedd.h2
-rw-r--r--src/mesa/drivers/dri/savage/savageioctl.c10
-rw-r--r--src/mesa/drivers/dri/savage/savageioctl.h2
-rw-r--r--src/mesa/drivers/dri/savage/savagerender.c8
-rw-r--r--src/mesa/drivers/dri/savage/savagespan.c12
-rw-r--r--src/mesa/drivers/dri/savage/savagespan.h4
-rw-r--r--src/mesa/drivers/dri/savage/savagestate.c82
-rw-r--r--src/mesa/drivers/dri/savage/savagestate.h10
-rw-r--r--src/mesa/drivers/dri/savage/savagetex.c36
-rw-r--r--src/mesa/drivers/dri/savage/savagetex.h2
-rw-r--r--src/mesa/drivers/dri/savage/savagetris.c38
-rw-r--r--src/mesa/drivers/dri/savage/savagetris.h4
-rw-r--r--src/mesa/drivers/dri/sis/sis6326_clear.c18
-rw-r--r--src/mesa/drivers/dri/sis/sis6326_state.c48
-rw-r--r--src/mesa/drivers/dri/sis/sis_clear.c20
-rw-r--r--src/mesa/drivers/dri/sis/sis_context.c10
-rw-r--r--src/mesa/drivers/dri/sis/sis_context.h6
-rw-r--r--src/mesa/drivers/dri/sis/sis_dd.c10
-rw-r--r--src/mesa/drivers/dri/sis/sis_fog.c2
-rw-r--r--src/mesa/drivers/dri/sis/sis_screen.c8
-rw-r--r--src/mesa/drivers/dri/sis/sis_span.c8
-rw-r--r--src/mesa/drivers/dri/sis/sis_span.h8
-rw-r--r--src/mesa/drivers/dri/sis/sis_state.c46
-rw-r--r--src/mesa/drivers/dri/sis/sis_state.h34
-rw-r--r--src/mesa/drivers/dri/sis/sis_stencil.c8
-rw-r--r--src/mesa/drivers/dri/sis/sis_stencil.h2
-rw-r--r--src/mesa/drivers/dri/sis/sis_tex.c22
-rw-r--r--src/mesa/drivers/dri/sis/sis_tex.h2
-rw-r--r--src/mesa/drivers/dri/sis/sis_texstate.c12
-rw-r--r--src/mesa/drivers/dri/sis/sis_tris.c28
-rw-r--r--src/mesa/drivers/dri/sis/sis_tris.h4
-rw-r--r--src/mesa/drivers/dri/swrast/swrast.c46
-rw-r--r--src/mesa/drivers/dri/swrast/swrast_priv.h8
-rw-r--r--src/mesa/drivers/dri/swrast/swrast_spantemp.h22
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_context.c16
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_context.h8
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_dd.c12
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_dd.h2
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_pixels.c10
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_pixels.h10
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_render.c8
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_screen.c10
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_span.c28
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_span.h4
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_state.c78
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_state.h14
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_tex.c40
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_tex.h18
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_texman.c5
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_texman.h2
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_texstate.c20
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_texstate.h4
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_tris.c62
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_tris.h2
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_vb.c20
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_vb.h12
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_vbtmp.h6
-rw-r--r--src/mesa/drivers/dri/unichrome/via_context.c18
-rw-r--r--src/mesa/drivers/dri/unichrome/via_context.h6
-rw-r--r--src/mesa/drivers/dri/unichrome/via_ioctl.c10
-rw-r--r--src/mesa/drivers/dri/unichrome/via_ioctl.h2
-rw-r--r--src/mesa/drivers/dri/unichrome/via_render.c2
-rw-r--r--src/mesa/drivers/dri/unichrome/via_screen.c6
-rw-r--r--src/mesa/drivers/dri/unichrome/via_screen.h2
-rw-r--r--src/mesa/drivers/dri/unichrome/via_span.c8
-rw-r--r--src/mesa/drivers/dri/unichrome/via_span.h8
-rw-r--r--src/mesa/drivers/dri/unichrome/via_state.c50
-rw-r--r--src/mesa/drivers/dri/unichrome/via_state.h8
-rw-r--r--src/mesa/drivers/dri/unichrome/via_tex.c24
-rw-r--r--src/mesa/drivers/dri/unichrome/via_tex.h2
-rw-r--r--src/mesa/drivers/dri/unichrome/via_tris.c34
-rw-r--r--src/mesa/drivers/dri/unichrome/via_tris.h6
-rw-r--r--src/mesa/drivers/fbdev/glfbdev.c30
-rw-r--r--src/mesa/drivers/osmesa/Makefile2
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c32
-rw-r--r--src/mesa/drivers/windows/gdi/wmesa.c92
-rw-r--r--src/mesa/drivers/windows/gdi/wmesadef.h4
-rw-r--r--src/mesa/drivers/windows/gldirect/dglcontext.c4
-rw-r--r--src/mesa/drivers/windows/gldirect/dglcontext.h12
-rw-r--r--src/mesa/drivers/windows/gldirect/dglwgl.c6
-rw-r--r--src/mesa/drivers/windows/gldirect/dglwgl.h2
-rw-r--r--src/mesa/drivers/windows/gldirect/dx7/gld_driver_dx7.c62
-rw-r--r--src/mesa/drivers/windows/gldirect/dx7/gld_dx7.h94
-rw-r--r--src/mesa/drivers/windows/gldirect/dx7/gld_ext_dx7.c4
-rw-r--r--src/mesa/drivers/windows/gldirect/dx7/gld_pipeline_dx7.c2
-rw-r--r--src/mesa/drivers/windows/gldirect/dx7/gld_primitive_dx7.c54
-rw-r--r--src/mesa/drivers/windows/gldirect/dx7/gld_texture_dx7.c42
-rw-r--r--src/mesa/drivers/windows/gldirect/dx7/gld_vb_d3d_render_dx7.c4
-rw-r--r--src/mesa/drivers/windows/gldirect/dx7/gld_vb_mesa_render_dx7.c8
-rw-r--r--src/mesa/drivers/windows/gldirect/dx7/gld_wgl_dx7.c6
-rw-r--r--src/mesa/drivers/windows/gldirect/dx8/gld_driver_dx8.c62
-rw-r--r--src/mesa/drivers/windows/gldirect/dx8/gld_dx8.h96
-rw-r--r--src/mesa/drivers/windows/gldirect/dx8/gld_ext_dx8.c4
-rw-r--r--src/mesa/drivers/windows/gldirect/dx8/gld_pipeline_dx8.c2
-rw-r--r--src/mesa/drivers/windows/gldirect/dx8/gld_primitive_dx8.c54
-rw-r--r--src/mesa/drivers/windows/gldirect/dx8/gld_texture_dx8.c42
-rw-r--r--src/mesa/drivers/windows/gldirect/dx8/gld_vb_d3d_render_dx8.c4
-rw-r--r--src/mesa/drivers/windows/gldirect/dx8/gld_vb_mesa_render_dx8.c8
-rw-r--r--src/mesa/drivers/windows/gldirect/dx8/gld_wgl_dx8.c6
-rw-r--r--src/mesa/drivers/windows/gldirect/dx9/gld_driver_dx9.c64
-rw-r--r--src/mesa/drivers/windows/gldirect/dx9/gld_dx9.h96
-rw-r--r--src/mesa/drivers/windows/gldirect/dx9/gld_ext_dx9.c4
-rw-r--r--src/mesa/drivers/windows/gldirect/dx9/gld_pipeline_dx9.c2
-rw-r--r--src/mesa/drivers/windows/gldirect/dx9/gld_primitive_dx9.c54
-rw-r--r--src/mesa/drivers/windows/gldirect/dx9/gld_texture_dx9.c42
-rw-r--r--src/mesa/drivers/windows/gldirect/dx9/gld_vb_d3d_render_dx9.c6
-rw-r--r--src/mesa/drivers/windows/gldirect/dx9/gld_vb_mesa_render_dx9.c8
-rw-r--r--src/mesa/drivers/windows/gldirect/dx9/gld_wgl_dx9.c6
-rw-r--r--src/mesa/drivers/windows/gldirect/gld_driver.c2
-rw-r--r--src/mesa/drivers/windows/gldirect/gld_driver.h2
-rw-r--r--src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c62
-rw-r--r--src/mesa/drivers/x11/Makefile2
-rw-r--r--src/mesa/drivers/x11/fakeglx.c1
-rw-r--r--src/mesa/drivers/x11/xm_api.c34
-rw-r--r--src/mesa/drivers/x11/xm_buffer.c6
-rw-r--r--src/mesa/drivers/x11/xm_dd.c60
-rw-r--r--src/mesa/drivers/x11/xm_line.c10
-rw-r--r--src/mesa/drivers/x11/xm_span.c20
-rw-r--r--src/mesa/drivers/x11/xm_tri.c4
-rw-r--r--src/mesa/drivers/x11/xmesaP.h36
-rw-r--r--src/mesa/drivers/x11/xmesa_x.h2
-rw-r--r--src/mesa/main/accum.c2
-rw-r--r--src/mesa/main/accum.h2
-rw-r--r--src/mesa/main/api_arrayelt.c12
-rw-r--r--src/mesa/main/api_arrayelt.h16
-rw-r--r--src/mesa/main/api_exec.c10
-rw-r--r--src/mesa/main/api_noop.c12
-rw-r--r--src/mesa/main/api_validate.c16
-rw-r--r--src/mesa/main/api_validate.h12
-rw-r--r--src/mesa/main/arrayobj.c24
-rw-r--r--src/mesa/main/arrayobj.h10
-rw-r--r--src/mesa/main/atifragshader.c4
-rw-r--r--src/mesa/main/atifragshader.h8
-rw-r--r--src/mesa/main/attrib.c10
-rw-r--r--src/mesa/main/attrib.h4
-rw-r--r--src/mesa/main/blend.c6
-rw-r--r--src/mesa/main/blend.h2
-rw-r--r--src/mesa/main/bufferobj.c70
-rw-r--r--src/mesa/main/bufferobj.h22
-rw-r--r--src/mesa/main/buffers.c6
-rw-r--r--src/mesa/main/buffers.h4
-rw-r--r--src/mesa/main/clear.c66
-rw-r--r--src/mesa/main/clear.h7
-rw-r--r--src/mesa/main/colortab.c3
-rw-r--r--src/mesa/main/condrender.c2
-rw-r--r--src/mesa/main/condrender.h2
-rw-r--r--src/mesa/main/context.c275
-rw-r--r--src/mesa/main/context.h74
-rw-r--r--src/mesa/main/dd.h333
-rw-r--r--src/mesa/main/debug.c4
-rw-r--r--src/mesa/main/debug.h4
-rw-r--r--src/mesa/main/depth.c2
-rw-r--r--src/mesa/main/depth.h2
-rw-r--r--src/mesa/main/depthstencil.c38
-rw-r--r--src/mesa/main/depthstencil.h10
-rw-r--r--src/mesa/main/dlist.c239
-rw-r--r--src/mesa/main/dlist.h20
-rw-r--r--src/mesa/main/drawpix.c70
-rw-r--r--src/mesa/main/drawtex.c2
-rw-r--r--src/mesa/main/enable.c36
-rw-r--r--src/mesa/main/enable.h4
-rw-r--r--src/mesa/main/enums.c7063
-rw-r--r--src/mesa/main/eval.c8
-rw-r--r--src/mesa/main/eval.h6
-rw-r--r--src/mesa/main/extensions.c47
-rw-r--r--src/mesa/main/extensions.h28
-rw-r--r--src/mesa/main/fbobject.c95
-rw-r--r--src/mesa/main/fbobject.h20
-rw-r--r--src/mesa/main/feedback.c22
-rw-r--r--src/mesa/main/feedback.h14
-rw-r--r--src/mesa/main/ffvertex_prog.c6
-rw-r--r--src/mesa/main/ffvertex_prog.h2
-rw-r--r--src/mesa/main/fog.c2
-rw-r--r--src/mesa/main/fog.h2
-rw-r--r--src/mesa/main/formats.c15
-rw-r--r--src/mesa/main/formats.h3
-rw-r--r--src/mesa/main/framebuffer.c59
-rw-r--r--src/mesa/main/framebuffer.h26
-rw-r--r--src/mesa/main/get.c61
-rw-r--r--src/mesa/main/getstring.c4
-rw-r--r--src/mesa/main/glheader.h22
-rw-r--r--src/mesa/main/hash.c4
-rw-r--r--src/mesa/main/hint.c2
-rw-r--r--src/mesa/main/hint.h2
-rw-r--r--src/mesa/main/image.c4421
-rw-r--r--src/mesa/main/image.h170
-rw-r--r--src/mesa/main/imports.c10
-rw-r--r--src/mesa/main/imports.h10
-rw-r--r--src/mesa/main/light.c28
-rw-r--r--src/mesa/main/light.h22
-rw-r--r--src/mesa/main/lines.c6
-rw-r--r--src/mesa/main/lines.h2
-rw-r--r--src/mesa/main/matrix.c40
-rw-r--r--src/mesa/main/matrix.h8
-rw-r--r--src/mesa/main/mfeatures.h1
-rw-r--r--src/mesa/main/mipmap.c4
-rw-r--r--src/mesa/main/mipmap.h2
-rw-r--r--src/mesa/main/mtypes.h224
-rw-r--r--src/mesa/main/multisample.c2
-rw-r--r--src/mesa/main/multisample.h2
-rw-r--r--src/mesa/main/nvprogram.c4
-rw-r--r--src/mesa/main/nvprogram.h4
-rw-r--r--src/mesa/main/pack.c4339
-rw-r--r--src/mesa/main/pack.h140
-rw-r--r--src/mesa/main/pixel.c12
-rw-r--r--src/mesa/main/pixel.h6
-rw-r--r--src/mesa/main/pixelstore.c2
-rw-r--r--src/mesa/main/pixelstore.h2
-rw-r--r--src/mesa/main/pixeltransfer.c566
-rw-r--r--src/mesa/main/pixeltransfer.h90
-rw-r--r--src/mesa/main/points.c6
-rw-r--r--src/mesa/main/points.h2
-rw-r--r--src/mesa/main/polygon.c7
-rw-r--r--src/mesa/main/polygon.h4
-rw-r--r--src/mesa/main/queryobj.c20
-rw-r--r--src/mesa/main/queryobj.h8
-rw-r--r--src/mesa/main/rastpos.c4
-rw-r--r--src/mesa/main/rastpos.h2
-rw-r--r--src/mesa/main/readpix.c27
-rw-r--r--src/mesa/main/readpix.h2
-rw-r--r--src/mesa/main/remap_helper.h3438
-rw-r--r--src/mesa/main/renderbuffer.c132
-rw-r--r--src/mesa/main/renderbuffer.h22
-rw-r--r--src/mesa/main/scissor.c6
-rw-r--r--src/mesa/main/scissor.h4
-rw-r--r--src/mesa/main/shaderapi.c315
-rw-r--r--src/mesa/main/shaderapi.h11
-rw-r--r--src/mesa/main/shaderobj.c36
-rw-r--r--src/mesa/main/shaderobj.h49
-rw-r--r--src/mesa/main/shared.c20
-rw-r--r--src/mesa/main/shared.h4
-rw-r--r--src/mesa/main/state.c48
-rw-r--r--src/mesa/main/state.h8
-rw-r--r--src/mesa/main/stencil.c16
-rw-r--r--src/mesa/main/stencil.h4
-rw-r--r--src/mesa/main/syncobj.c18
-rw-r--r--src/mesa/main/syncobj.h16
-rw-r--r--src/mesa/main/texcompress.c4
-rw-r--r--src/mesa/main/texcompress.h4
-rw-r--r--src/mesa/main/texcompress_s3tc.c2
-rw-r--r--src/mesa/main/texcompress_s3tc.h4
-rw-r--r--src/mesa/main/texenv.c14
-rw-r--r--src/mesa/main/texenvprogram.c23
-rw-r--r--src/mesa/main/texenvprogram.h2
-rw-r--r--src/mesa/main/texformat.c2
-rw-r--r--src/mesa/main/texformat.h2
-rw-r--r--src/mesa/main/texgetimage.c25
-rw-r--r--src/mesa/main/texgetimage.h4
-rw-r--r--src/mesa/main/teximage.c184
-rw-r--r--src/mesa/main/teximage.h32
-rw-r--r--src/mesa/main/texobj.c24
-rw-r--r--src/mesa/main/texobj.h18
-rw-r--r--src/mesa/main/texparam.c10
-rw-r--r--src/mesa/main/texrender.c22
-rw-r--r--src/mesa/main/texrender.h4
-rw-r--r--src/mesa/main/texstate.c55
-rw-r--r--src/mesa/main/texstate.h14
-rw-r--r--src/mesa/main/texstore.c313
-rw-r--r--src/mesa/main/texstore.h34
-rw-r--r--src/mesa/main/transformfeedback.c36
-rw-r--r--src/mesa/main/transformfeedback.h12
-rw-r--r--src/mesa/main/uniforms.c84
-rw-r--r--src/mesa/main/uniforms.h6
-rw-r--r--src/mesa/main/varray.c21
-rw-r--r--src/mesa/main/varray.h8
-rw-r--r--src/mesa/main/version.c8
-rw-r--r--src/mesa/main/version.h2
-rw-r--r--src/mesa/main/viewport.c6
-rw-r--r--src/mesa/main/viewport.h6
-rw-r--r--src/mesa/main/vtxfmt.c78
-rw-r--r--src/mesa/main/vtxfmt.h22
-rw-r--r--src/mesa/main/vtxfmt_tmp.h603
-rw-r--r--src/mesa/program/arbprogparse.c4
-rw-r--r--src/mesa/program/arbprogparse.h4
-rw-r--r--src/mesa/program/ir_to_mesa.cpp92
-rw-r--r--src/mesa/program/ir_to_mesa.h8
-rw-r--r--src/mesa/program/nvfragparse.c4
-rw-r--r--src/mesa/program/nvfragparse.h2
-rw-r--r--src/mesa/program/nvvertparse.c4
-rw-r--r--src/mesa/program/nvvertparse.h2
-rw-r--r--src/mesa/program/prog_cache.c6
-rw-r--r--src/mesa/program/prog_cache.h4
-rw-r--r--src/mesa/program/prog_execute.c6
-rw-r--r--src/mesa/program/prog_execute.h8
-rw-r--r--src/mesa/program/prog_optimize.c4
-rw-r--r--src/mesa/program/prog_optimize.h2
-rw-r--r--src/mesa/program/prog_print.c4
-rw-r--r--src/mesa/program/prog_print.h2
-rw-r--r--src/mesa/program/prog_statevars.c6
-rw-r--r--src/mesa/program/prog_statevars.h4
-rw-r--r--src/mesa/program/program.c32
-rw-r--r--src/mesa/program/program.h40
-rw-r--r--src/mesa/program/program_parse.tab.c2
-rw-r--r--src/mesa/program/program_parse.y2
-rw-r--r--src/mesa/program/program_parser.h9
-rw-r--r--src/mesa/program/programopt.c12
-rw-r--r--src/mesa/program/programopt.h8
-rw-r--r--src/mesa/program/register_allocate.c64
-rw-r--r--src/mesa/program/register_allocate.h2
-rw-r--r--src/mesa/sources.mak2
-rw-r--r--src/mesa/state_tracker/st_atom.c2
-rw-r--r--src/mesa/state_tracker/st_atom.h2
-rw-r--r--src/mesa/state_tracker/st_atom_blend.c4
-rw-r--r--src/mesa/state_tracker/st_atom_depth.c2
-rw-r--r--src/mesa/state_tracker/st_atom_pixeltransfer.c10
-rw-r--r--src/mesa/state_tracker/st_atom_rasterizer.c7
-rw-r--r--src/mesa/state_tracker/st_atom_viewport.c2
-rw-r--r--src/mesa/state_tracker/st_cb_accum.c8
-rw-r--r--src/mesa/state_tracker/st_cb_accum.h4
-rw-r--r--src/mesa/state_tracker/st_cb_bitmap.c10
-rw-r--r--src/mesa/state_tracker/st_cb_blit.c2
-rw-r--r--src/mesa/state_tracker/st_cb_bufferobjects.c20
-rw-r--r--src/mesa/state_tracker/st_cb_clear.c12
-rw-r--r--src/mesa/state_tracker/st_cb_condrender.c4
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c332
-rw-r--r--src/mesa/state_tracker/st_cb_drawtex.c2
-rw-r--r--src/mesa/state_tracker/st_cb_eglimage.c6
-rw-r--r--src/mesa/state_tracker/st_cb_fbo.c26
-rw-r--r--src/mesa/state_tracker/st_cb_feedback.c10
-rw-r--r--src/mesa/state_tracker/st_cb_flush.c8
-rw-r--r--src/mesa/state_tracker/st_cb_program.c12
-rw-r--r--src/mesa/state_tracker/st_cb_program.h2
-rw-r--r--src/mesa/state_tracker/st_cb_queryobj.c13
-rw-r--r--src/mesa/state_tracker/st_cb_rasterpos.c10
-rw-r--r--src/mesa/state_tracker/st_cb_readpixels.c9
-rw-r--r--src/mesa/state_tracker/st_cb_readpixels.h4
-rw-r--r--src/mesa/state_tracker/st_cb_strings.c2
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c62
-rw-r--r--src/mesa/state_tracker/st_cb_texture.h2
-rw-r--r--src/mesa/state_tracker/st_cb_viewport.c8
-rw-r--r--src/mesa/state_tracker/st_cb_xformfb.c14
-rw-r--r--src/mesa/state_tracker/st_context.c12
-rw-r--r--src/mesa/state_tracker/st_context.h14
-rw-r--r--src/mesa/state_tracker/st_draw.c37
-rw-r--r--src/mesa/state_tracker/st_draw.h4
-rw-r--r--src/mesa/state_tracker/st_draw_feedback.c4
-rw-r--r--src/mesa/state_tracker/st_extensions.c10
-rw-r--r--src/mesa/state_tracker/st_format.c157
-rw-r--r--src/mesa/state_tracker/st_format.h6
-rw-r--r--src/mesa/state_tracker/st_gen_mipmap.c6
-rw-r--r--src/mesa/state_tracker/st_gen_mipmap.h2
-rw-r--r--src/mesa/state_tracker/st_manager.c24
-rw-r--r--src/mesa/state_tracker/st_manager.h2
-rw-r--r--src/mesa/state_tracker/st_mesa_to_tgsi.c9
-rw-r--r--src/mesa/state_tracker/st_mesa_to_tgsi.h2
-rw-r--r--src/mesa/state_tracker/st_program.c53
-rw-r--r--src/mesa/state_tracker/st_program.h2
-rw-r--r--src/mesa/state_tracker/st_texture.h14
-rw-r--r--src/mesa/swrast/NOTES12
-rw-r--r--src/mesa/swrast/s_aaline.c6
-rw-r--r--src/mesa/swrast/s_aaline.h2
-rw-r--r--src/mesa/swrast/s_aalinetemp.h4
-rw-r--r--src/mesa/swrast/s_aatriangle.c6
-rw-r--r--src/mesa/swrast/s_aatriangle.h2
-rw-r--r--src/mesa/swrast/s_aatritemp.h2
-rw-r--r--src/mesa/swrast/s_accum.c16
-rw-r--r--src/mesa/swrast/s_accum.h2
-rw-r--r--src/mesa/swrast/s_alpha.c2
-rw-r--r--src/mesa/swrast/s_alpha.h2
-rw-r--r--src/mesa/swrast/s_atifragshader.c10
-rw-r--r--src/mesa/swrast/s_atifragshader.h2
-rw-r--r--src/mesa/swrast/s_bitmap.c4
-rw-r--r--src/mesa/swrast/s_blend.c26
-rw-r--r--src/mesa/swrast/s_blend.h4
-rw-r--r--src/mesa/swrast/s_blit.c8
-rw-r--r--src/mesa/swrast/s_clear.c8
-rw-r--r--src/mesa/swrast/s_context.c72
-rw-r--r--src/mesa/swrast/s_context.h34
-rw-r--r--src/mesa/swrast/s_copypix.c16
-rw-r--r--src/mesa/swrast/s_depth.c24
-rw-r--r--src/mesa/swrast/s_depth.h12
-rw-r--r--src/mesa/swrast/s_drawpix.c18
-rw-r--r--src/mesa/swrast/s_feedback.c14
-rw-r--r--src/mesa/swrast/s_feedback.h12
-rw-r--r--src/mesa/swrast/s_fog.c4
-rw-r--r--src/mesa/swrast/s_fog.h4
-rw-r--r--src/mesa/swrast/s_fragprog.c12
-rw-r--r--src/mesa/swrast/s_fragprog.h2
-rw-r--r--src/mesa/swrast/s_lines.c8
-rw-r--r--src/mesa/swrast/s_lines.h4
-rw-r--r--src/mesa/swrast/s_linetemp.h2
-rw-r--r--src/mesa/swrast/s_logic.c8
-rw-r--r--src/mesa/swrast/s_logic.h2
-rw-r--r--src/mesa/swrast/s_masking.c2
-rw-r--r--src/mesa/swrast/s_masking.h2
-rw-r--r--src/mesa/swrast/s_points.c14
-rw-r--r--src/mesa/swrast/s_points.h4
-rw-r--r--src/mesa/swrast/s_readpix.c17
-rw-r--r--src/mesa/swrast/s_span.c32
-rw-r--r--src/mesa/swrast/s_span.h16
-rw-r--r--src/mesa/swrast/s_spantemp.h14
-rw-r--r--src/mesa/swrast/s_stencil.c20
-rw-r--r--src/mesa/swrast/s_stencil.h8
-rw-r--r--src/mesa/swrast/s_texcombine.c6
-rw-r--r--src/mesa/swrast/s_texcombine.h2
-rw-r--r--src/mesa/swrast/s_texfilter.c124
-rw-r--r--src/mesa/swrast/s_texfilter.h2
-rw-r--r--src/mesa/swrast/s_triangle.c12
-rw-r--r--src/mesa/swrast/s_triangle.h6
-rw-r--r--src/mesa/swrast/s_tritemp.h2
-rw-r--r--src/mesa/swrast/s_zoom.c14
-rw-r--r--src/mesa/swrast/s_zoom.h10
-rw-r--r--src/mesa/swrast/swrast.h54
-rw-r--r--src/mesa/swrast_setup/NOTES12
-rw-r--r--src/mesa/swrast_setup/ss_context.c18
-rw-r--r--src/mesa/swrast_setup/ss_triangle.c16
-rw-r--r--src/mesa/swrast_setup/ss_triangle.h4
-rw-r--r--src/mesa/swrast_setup/ss_tritmp.h4
-rw-r--r--src/mesa/swrast_setup/ss_vb.h4
-rw-r--r--src/mesa/swrast_setup/swrast_setup.h10
-rw-r--r--src/mesa/tnl/NOTES18
-rw-r--r--src/mesa/tnl/t_context.c14
-rw-r--r--src/mesa/tnl/t_context.h46
-rw-r--r--src/mesa/tnl/t_draw.c20
-rw-r--r--src/mesa/tnl/t_pipeline.c10
-rw-r--r--src/mesa/tnl/t_pipeline.h10
-rw-r--r--src/mesa/tnl/t_rasterpos.c8
-rw-r--r--src/mesa/tnl/t_vb_cliptmp.h6
-rw-r--r--src/mesa/tnl/t_vb_fog.c6
-rw-r--r--src/mesa/tnl/t_vb_light.c12
-rw-r--r--src/mesa/tnl/t_vb_lighttmp.h8
-rw-r--r--src/mesa/tnl/t_vb_normals.c6
-rw-r--r--src/mesa/tnl/t_vb_points.c4
-rw-r--r--src/mesa/tnl/t_vb_program.c20
-rw-r--r--src/mesa/tnl/t_vb_render.c8
-rw-r--r--src/mesa/tnl/t_vb_rendertmp.h24
-rw-r--r--src/mesa/tnl/t_vb_texgen.c16
-rw-r--r--src/mesa/tnl/t_vb_texmat.c4
-rw-r--r--src/mesa/tnl/t_vb_vertex.c10
-rw-r--r--src/mesa/tnl/t_vertex.c40
-rw-r--r--src/mesa/tnl/t_vertex.h42
-rw-r--r--src/mesa/tnl/t_vertex_generic.c14
-rw-r--r--src/mesa/tnl/t_vertex_sse.c8
-rw-r--r--src/mesa/tnl/t_vp_build.c2
-rw-r--r--src/mesa/tnl/t_vp_build.h2
-rw-r--r--src/mesa/tnl/tnl.h24
-rw-r--r--src/mesa/tnl_dd/imm/t_dd_imm_primtmp.h112
-rw-r--r--src/mesa/tnl_dd/imm/t_dd_imm_vb.c8
-rw-r--r--src/mesa/tnl_dd/imm/t_dd_imm_vbtmp.h6
-rw-r--r--src/mesa/tnl_dd/t_dd.c6
-rw-r--r--src/mesa/tnl_dd/t_dd_dmatmp.h48
-rw-r--r--src/mesa/tnl_dd/t_dd_dmatmp2.h46
-rw-r--r--src/mesa/tnl_dd/t_dd_rendertmp.h24
-rw-r--r--src/mesa/tnl_dd/t_dd_triemit.h2
-rw-r--r--src/mesa/tnl_dd/t_dd_tritmp.h10
-rw-r--r--src/mesa/tnl_dd/t_dd_unfilled.h4
-rw-r--r--src/mesa/tnl_dd/t_dd_vb.c16
-rw-r--r--src/mesa/tnl_dd/t_dd_vbtmp.h10
-rw-r--r--src/mesa/vbo/vbo.h19
-rw-r--r--src/mesa/vbo/vbo_context.c14
-rw-r--r--src/mesa/vbo/vbo_context.h4
-rw-r--r--src/mesa/vbo/vbo_exec.c6
-rw-r--r--src/mesa/vbo/vbo_exec.h14
-rw-r--r--src/mesa/vbo/vbo_exec_api.c57
-rw-r--r--src/mesa/vbo/vbo_exec_array.c258
-rw-r--r--src/mesa/vbo/vbo_exec_draw.c8
-rw-r--r--src/mesa/vbo/vbo_exec_eval.c2
-rw-r--r--src/mesa/vbo/vbo_rebase.c14
-rw-r--r--src/mesa/vbo/vbo_save.c8
-rw-r--r--src/mesa/vbo/vbo_save.h28
-rw-r--r--src/mesa/vbo/vbo_save_api.c67
-rw-r--r--src/mesa/vbo/vbo_save_draw.c8
-rw-r--r--src/mesa/vbo/vbo_save_loopback.c16
-rw-r--r--src/mesa/vbo/vbo_split.c2
-rw-r--r--src/mesa/vbo/vbo_split.h4
-rw-r--r--src/mesa/vbo/vbo_split_copy.c10
-rw-r--r--src/mesa/vbo/vbo_split_inplace.c4
-rw-r--r--src/mesa/x86/gen_matypes.c26
-rw-r--r--src/mesa/x86/mmx.h10
-rw-r--r--src/mesa/x86/mmx_blendtmp.h2
855 files changed, 22082 insertions, 18422 deletions
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index c41c38cba66..7a6936e2107 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -34,7 +34,7 @@ ES1_CPPFLAGS := -DFEATURE_ES1=1 $(DEFINES)
ES2_CPPFLAGS := -DFEATURE_ES2=1 $(DEFINES)
# append include dirs
-MESA_CPPFLAGS += $(INCLUDE_DIRS)
+MESA_CPPFLAGS += $(INCLUDE_DIRS) $(TALLOC_CFLAGS)
ES1_CPPFLAGS += -I$(TOP)/src/mapi/es1api $(INCLUDE_DIRS)
ES2_CPPFLAGS += -I$(TOP)/src/mapi/es2api $(INCLUDE_DIRS)
diff --git a/src/mesa/SConscript b/src/mesa/SConscript
index c89e635aab0..e54737aed18 100644
--- a/src/mesa/SConscript
+++ b/src/mesa/SConscript
@@ -79,8 +79,10 @@ if env['platform'] != 'winddk':
'main/mm.c',
'main/multisample.c',
'main/nvprogram.c',
+ 'main/pack.c',
'main/pixel.c',
'main/pixelstore.c',
+ 'main/pixeltransfer.c',
'main/points.c',
'main/polygon.c',
'main/querymatrix.c',
diff --git a/src/mesa/drivers/beos/GLView.cpp b/src/mesa/drivers/beos/GLView.cpp
index a029f6b200c..ee3415b3d1a 100644
--- a/src/mesa/drivers/beos/GLView.cpp
+++ b/src/mesa/drivers/beos/GLView.cpp
@@ -105,7 +105,7 @@ public:
MesaDriver();
~MesaDriver();
- void Init(BGLView * bglview, GLcontext * c, GLvisual * v, GLframebuffer * b);
+ void Init(BGLView * bglview, struct gl_context * c, struct gl_config * v, struct gl_framebuffer * b);
void LockGL();
void UnlockGL();
@@ -120,9 +120,9 @@ private:
MesaDriver(const MesaDriver &rhs); // copy constructor illegal
MesaDriver &operator=(const MesaDriver &rhs); // assignment oper. illegal
- GLcontext * m_glcontext;
- GLvisual * m_glvisual;
- GLframebuffer * m_glframebuffer;
+ struct gl_context * m_glcontext;
+ struct gl_config * m_glvisual;
+ struct gl_framebuffer * m_glframebuffer;
BGLView * m_bglview;
BBitmap * m_bitmap;
@@ -134,119 +134,119 @@ private:
GLuint m_height;
// Mesa Device Driver callback functions
- static void UpdateState(GLcontext *ctx, GLuint new_state);
- static void ClearIndex(GLcontext *ctx, GLuint index);
- static void ClearColor(GLcontext *ctx, const GLfloat color[4]);
- static void Clear(GLcontext *ctx, GLbitfield mask,
+ static void UpdateState(struct gl_context *ctx, GLuint new_state);
+ static void ClearIndex(struct gl_context *ctx, GLuint index);
+ static void ClearColor(struct gl_context *ctx, const GLfloat color[4]);
+ static void Clear(struct gl_context *ctx, GLbitfield mask,
GLboolean all, GLint x, GLint y,
GLint width, GLint height);
- static void ClearFront(GLcontext *ctx, GLboolean all, GLint x, GLint y,
+ static void ClearFront(struct gl_context *ctx, GLboolean all, GLint x, GLint y,
GLint width, GLint height);
- static void ClearBack(GLcontext *ctx, GLboolean all, GLint x, GLint y,
+ static void ClearBack(struct gl_context *ctx, GLboolean all, GLint x, GLint y,
GLint width, GLint height);
- static void Index(GLcontext *ctx, GLuint index);
- static void Color(GLcontext *ctx, GLubyte r, GLubyte g,
+ static void Index(struct gl_context *ctx, GLuint index);
+ static void Color(struct gl_context *ctx, GLubyte r, GLubyte g,
GLubyte b, GLubyte a);
- static void SetBuffer(GLcontext *ctx, GLframebuffer *colorBuffer,
+ static void SetBuffer(struct gl_context *ctx, struct gl_framebuffer *colorBuffer,
GLenum mode);
- static void GetBufferSize(GLframebuffer * framebuffer, GLuint *width,
+ static void GetBufferSize(struct gl_framebuffer * framebuffer, GLuint *width,
GLuint *height);
- static void Error(GLcontext *ctx);
- static const GLubyte * GetString(GLcontext *ctx, GLenum name);
- static void Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
+ static void Error(struct gl_context *ctx);
+ static const GLubyte * GetString(struct gl_context *ctx, GLenum name);
+ static void Viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
// Front-buffer functions
- static void WriteRGBASpanFront(const GLcontext *ctx, GLuint n,
+ static void WriteRGBASpanFront(const struct gl_context *ctx, GLuint n,
GLint x, GLint y,
CONST GLubyte rgba[][4],
const GLubyte mask[]);
- static void WriteRGBSpanFront(const GLcontext *ctx, GLuint n,
+ static void WriteRGBSpanFront(const struct gl_context *ctx, GLuint n,
GLint x, GLint y,
CONST GLubyte rgba[][3],
const GLubyte mask[]);
- static void WriteMonoRGBASpanFront(const GLcontext *ctx, GLuint n,
+ static void WriteMonoRGBASpanFront(const struct gl_context *ctx, GLuint n,
GLint x, GLint y,
const GLchan color[4],
const GLubyte mask[]);
- static void WriteRGBAPixelsFront(const GLcontext *ctx, GLuint n,
+ static void WriteRGBAPixelsFront(const struct gl_context *ctx, GLuint n,
const GLint x[], const GLint y[],
CONST GLubyte rgba[][4],
const GLubyte mask[]);
- static void WriteMonoRGBAPixelsFront(const GLcontext *ctx, GLuint n,
+ static void WriteMonoRGBAPixelsFront(const struct gl_context *ctx, GLuint n,
const GLint x[], const GLint y[],
const GLchan color[4],
const GLubyte mask[]);
- static void WriteCI32SpanFront(const GLcontext *ctx, GLuint n,
+ static void WriteCI32SpanFront(const struct gl_context *ctx, GLuint n,
GLint x, GLint y,
const GLuint index[], const GLubyte mask[]);
- static void WriteCI8SpanFront(const GLcontext *ctx, GLuint n,
+ static void WriteCI8SpanFront(const struct gl_context *ctx, GLuint n,
GLint x, GLint y,
const GLubyte index[], const GLubyte mask[]);
- static void WriteMonoCISpanFront(const GLcontext *ctx, GLuint n,
+ static void WriteMonoCISpanFront(const struct gl_context *ctx, GLuint n,
GLint x, GLint y,
GLuint colorIndex, const GLubyte mask[]);
- static void WriteCI32PixelsFront(const GLcontext *ctx,
+ static void WriteCI32PixelsFront(const struct gl_context *ctx,
GLuint n, const GLint x[], const GLint y[],
const GLuint index[], const GLubyte mask[]);
- static void WriteMonoCIPixelsFront(const GLcontext *ctx, GLuint n,
+ static void WriteMonoCIPixelsFront(const struct gl_context *ctx, GLuint n,
const GLint x[], const GLint y[],
GLuint colorIndex, const GLubyte mask[]);
- static void ReadCI32SpanFront(const GLcontext *ctx,
+ static void ReadCI32SpanFront(const struct gl_context *ctx,
GLuint n, GLint x, GLint y, GLuint index[]);
- static void ReadRGBASpanFront(const GLcontext *ctx, GLuint n,
+ static void ReadRGBASpanFront(const struct gl_context *ctx, GLuint n,
GLint x, GLint y,
GLubyte rgba[][4]);
- static void ReadCI32PixelsFront(const GLcontext *ctx,
+ static void ReadCI32PixelsFront(const struct gl_context *ctx,
GLuint n, const GLint x[], const GLint y[],
GLuint indx[], const GLubyte mask[]);
- static void ReadRGBAPixelsFront(const GLcontext *ctx,
+ static void ReadRGBAPixelsFront(const struct gl_context *ctx,
GLuint n, const GLint x[], const GLint y[],
GLubyte rgba[][4], const GLubyte mask[]);
// Back buffer functions
- static void WriteRGBASpanBack(const GLcontext *ctx, GLuint n,
+ static void WriteRGBASpanBack(const struct gl_context *ctx, GLuint n,
GLint x, GLint y,
CONST GLubyte rgba[][4],
const GLubyte mask[]);
- static void WriteRGBSpanBack(const GLcontext *ctx, GLuint n,
+ static void WriteRGBSpanBack(const struct gl_context *ctx, GLuint n,
GLint x, GLint y,
CONST GLubyte rgba[][3],
const GLubyte mask[]);
- static void WriteMonoRGBASpanBack(const GLcontext *ctx, GLuint n,
+ static void WriteMonoRGBASpanBack(const struct gl_context *ctx, GLuint n,
GLint x, GLint y,
const GLchan color[4],
const GLubyte mask[]);
- static void WriteRGBAPixelsBack(const GLcontext *ctx, GLuint n,
+ static void WriteRGBAPixelsBack(const struct gl_context *ctx, GLuint n,
const GLint x[], const GLint y[],
CONST GLubyte rgba[][4],
const GLubyte mask[]);
- static void WriteMonoRGBAPixelsBack(const GLcontext *ctx, GLuint n,
+ static void WriteMonoRGBAPixelsBack(const struct gl_context *ctx, GLuint n,
const GLint x[], const GLint y[],
const GLchan color[4],
const GLubyte mask[]);
- static void WriteCI32SpanBack(const GLcontext *ctx, GLuint n,
+ static void WriteCI32SpanBack(const struct gl_context *ctx, GLuint n,
GLint x, GLint y,
const GLuint index[], const GLubyte mask[]);
- static void WriteCI8SpanBack(const GLcontext *ctx, GLuint n, GLint x, GLint y,
+ static void WriteCI8SpanBack(const struct gl_context *ctx, GLuint n, GLint x, GLint y,
const GLubyte index[], const GLubyte mask[]);
- static void WriteMonoCISpanBack(const GLcontext *ctx, GLuint n,
+ static void WriteMonoCISpanBack(const struct gl_context *ctx, GLuint n,
GLint x, GLint y, GLuint colorIndex,
const GLubyte mask[]);
- static void WriteCI32PixelsBack(const GLcontext *ctx,
+ static void WriteCI32PixelsBack(const struct gl_context *ctx,
GLuint n, const GLint x[], const GLint y[],
const GLuint index[], const GLubyte mask[]);
- static void WriteMonoCIPixelsBack(const GLcontext *ctx,
+ static void WriteMonoCIPixelsBack(const struct gl_context *ctx,
GLuint n, const GLint x[], const GLint y[],
GLuint colorIndex, const GLubyte mask[]);
- static void ReadCI32SpanBack(const GLcontext *ctx,
+ static void ReadCI32SpanBack(const struct gl_context *ctx,
GLuint n, GLint x, GLint y, GLuint index[]);
- static void ReadRGBASpanBack(const GLcontext *ctx, GLuint n,
+ static void ReadRGBASpanBack(const struct gl_context *ctx, GLuint n,
GLint x, GLint y,
GLubyte rgba[][4]);
- static void ReadCI32PixelsBack(const GLcontext *ctx,
+ static void ReadCI32PixelsBack(const struct gl_context *ctx,
GLuint n, const GLint x[], const GLint y[],
GLuint indx[], const GLubyte mask[]);
- static void ReadRGBAPixelsBack(const GLcontext *ctx,
+ static void ReadRGBAPixelsBack(const struct gl_context *ctx,
GLuint n, const GLint x[], const GLint y[],
GLubyte rgba[][4], const GLubyte mask[]);
@@ -297,7 +297,7 @@ BGLView::BGLView(BRect rect, char *name,
MesaDriver * md = new MesaDriver();
// examine option flags and create gl_context struct
- GLvisual * visual = _mesa_create_visual( dblFlag,
+ struct gl_config * visual = _mesa_create_visual( dblFlag,
stereoFlag,
red, green, blue, alpha,
depth,
@@ -319,7 +319,7 @@ BGLView::BGLView(BRect rect, char *name,
functions.Viewport = md->Viewport;
// create core context
- GLcontext *ctx = _mesa_create_context(visual, NULL, &functions, md);
+ struct gl_context *ctx = _mesa_create_context(visual, NULL, &functions, md);
if (! ctx) {
_mesa_destroy_visual(visual);
delete md;
@@ -332,7 +332,7 @@ BGLView::BGLView(BRect rect, char *name,
// create core framebuffer
- GLframebuffer * buffer = _mesa_create_framebuffer(visual,
+ struct gl_framebuffer * buffer = _mesa_create_framebuffer(visual,
depth > 0 ? GL_TRUE : GL_FALSE,
stencil > 0 ? GL_TRUE: GL_FALSE,
accum > 0 ? GL_TRUE : GL_FALSE,
@@ -668,7 +668,7 @@ MesaDriver::~MesaDriver()
}
-void MesaDriver::Init(BGLView * bglview, GLcontext * ctx, GLvisual * visual, GLframebuffer * framebuffer)
+void MesaDriver::Init(BGLView * bglview, struct gl_context * ctx, struct gl_config * visual, struct gl_framebuffer * framebuffer)
{
m_bglview = bglview;
m_glcontext = ctx;
@@ -815,14 +815,14 @@ void MesaDriver::Draw(BRect updateRect) const
}
-void MesaDriver::Error(GLcontext *ctx)
+void MesaDriver::Error(struct gl_context *ctx)
{
MesaDriver *md = (MesaDriver *) ctx->DriverCtx;
if (md && md->m_bglview)
md->m_bglview->ErrorCallback((unsigned long) ctx->ErrorValue);
}
-void MesaDriver::UpdateState( GLcontext *ctx, GLuint new_state )
+void MesaDriver::UpdateState( struct gl_context *ctx, GLuint new_state )
{
struct swrast_device_driver * swdd = _swrast_GetDeviceDriverReference( ctx );
@@ -868,14 +868,14 @@ void MesaDriver::UpdateState( GLcontext *ctx, GLuint new_state )
}
-void MesaDriver::ClearIndex(GLcontext *ctx, GLuint index)
+void MesaDriver::ClearIndex(struct gl_context *ctx, GLuint index)
{
MesaDriver *md = (MesaDriver *) ctx->DriverCtx;
md->m_clear_index = index;
}
-void MesaDriver::ClearColor(GLcontext *ctx, const GLfloat color[4])
+void MesaDriver::ClearColor(struct gl_context *ctx, const GLfloat color[4])
{
MesaDriver *md = (MesaDriver *) ctx->DriverCtx;
CLAMPED_FLOAT_TO_CHAN(md->m_clear_color[BE_RCOMP], color[0]);
@@ -886,7 +886,7 @@ void MesaDriver::ClearColor(GLcontext *ctx, const GLfloat color[4])
}
-void MesaDriver::Clear(GLcontext *ctx, GLbitfield mask,
+void MesaDriver::Clear(struct gl_context *ctx, GLbitfield mask,
GLboolean all, GLint x, GLint y,
GLint width, GLint height)
{
@@ -903,7 +903,7 @@ void MesaDriver::Clear(GLcontext *ctx, GLbitfield mask,
}
-void MesaDriver::ClearFront(GLcontext *ctx,
+void MesaDriver::ClearFront(struct gl_context *ctx,
GLboolean all, GLint x, GLint y,
GLint width, GLint height)
{
@@ -947,7 +947,7 @@ void MesaDriver::ClearFront(GLcontext *ctx,
}
-void MesaDriver::ClearBack(GLcontext *ctx,
+void MesaDriver::ClearBack(struct gl_context *ctx,
GLboolean all, GLint x, GLint y,
GLint width, GLint height)
{
@@ -984,7 +984,7 @@ void MesaDriver::ClearBack(GLcontext *ctx,
}
-void MesaDriver::SetBuffer(GLcontext *ctx, GLframebuffer *buffer,
+void MesaDriver::SetBuffer(struct gl_context *ctx, struct gl_framebuffer *buffer,
GLenum mode)
{
/* TODO */
@@ -993,7 +993,7 @@ void MesaDriver::SetBuffer(GLcontext *ctx, GLframebuffer *buffer,
(void) mode;
}
-void MesaDriver::GetBufferSize(GLframebuffer * framebuffer, GLuint *width,
+void MesaDriver::GetBufferSize(struct gl_framebuffer * framebuffer, GLuint *width,
GLuint *height)
{
GET_CURRENT_CONTEXT(ctx);
@@ -1028,14 +1028,14 @@ void MesaDriver::GetBufferSize(GLframebuffer * framebuffer, GLuint *width,
}
-void MesaDriver::Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
+void MesaDriver::Viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
{
/* poll for window size change and realloc software Z/stencil/etc if needed */
_mesa_ResizeBuffersMESA();
}
-const GLubyte *MesaDriver::GetString(GLcontext *ctx, GLenum name)
+const GLubyte *MesaDriver::GetString(struct gl_context *ctx, GLenum name)
{
switch (name) {
case GL_RENDERER:
@@ -1057,7 +1057,7 @@ inline void Plot(BGLView *bglview, int x, int y)
}
-void MesaDriver::WriteRGBASpanFront(const GLcontext *ctx, GLuint n,
+void MesaDriver::WriteRGBASpanFront(const struct gl_context *ctx, GLuint n,
GLint x, GLint y,
CONST GLubyte rgba[][4],
const GLubyte mask[])
@@ -1082,7 +1082,7 @@ void MesaDriver::WriteRGBASpanFront(const GLcontext *ctx, GLuint n,
}
}
-void MesaDriver::WriteRGBSpanFront(const GLcontext *ctx, GLuint n,
+void MesaDriver::WriteRGBSpanFront(const struct gl_context *ctx, GLuint n,
GLint x, GLint y,
CONST GLubyte rgba[][3],
const GLubyte mask[])
@@ -1107,7 +1107,7 @@ void MesaDriver::WriteRGBSpanFront(const GLcontext *ctx, GLuint n,
}
}
-void MesaDriver::WriteMonoRGBASpanFront(const GLcontext *ctx, GLuint n,
+void MesaDriver::WriteMonoRGBASpanFront(const struct gl_context *ctx, GLuint n,
GLint x, GLint y,
const GLchan color[4],
const GLubyte mask[])
@@ -1131,7 +1131,7 @@ void MesaDriver::WriteMonoRGBASpanFront(const GLcontext *ctx, GLuint n,
}
}
-void MesaDriver::WriteRGBAPixelsFront(const GLcontext *ctx,
+void MesaDriver::WriteRGBAPixelsFront(const struct gl_context *ctx,
GLuint n, const GLint x[], const GLint y[],
CONST GLubyte rgba[][4],
const GLubyte mask[] )
@@ -1156,7 +1156,7 @@ void MesaDriver::WriteRGBAPixelsFront(const GLcontext *ctx,
}
-void MesaDriver::WriteMonoRGBAPixelsFront(const GLcontext *ctx, GLuint n,
+void MesaDriver::WriteMonoRGBAPixelsFront(const struct gl_context *ctx, GLuint n,
const GLint x[], const GLint y[],
const GLchan color[4],
const GLubyte mask[])
@@ -1181,21 +1181,21 @@ void MesaDriver::WriteMonoRGBAPixelsFront(const GLcontext *ctx, GLuint n,
}
-void MesaDriver::WriteCI32SpanFront( const GLcontext *ctx, GLuint n, GLint x, GLint y,
+void MesaDriver::WriteCI32SpanFront( const struct gl_context *ctx, GLuint n, GLint x, GLint y,
const GLuint index[], const GLubyte mask[] )
{
printf("WriteCI32SpanFront() not implemented yet!\n");
// TODO
}
-void MesaDriver::WriteCI8SpanFront( const GLcontext *ctx, GLuint n, GLint x, GLint y,
+void MesaDriver::WriteCI8SpanFront( const struct gl_context *ctx, GLuint n, GLint x, GLint y,
const GLubyte index[], const GLubyte mask[] )
{
printf("WriteCI8SpanFront() not implemented yet!\n");
// TODO
}
-void MesaDriver::WriteMonoCISpanFront( const GLcontext *ctx, GLuint n,
+void MesaDriver::WriteMonoCISpanFront( const struct gl_context *ctx, GLuint n,
GLint x, GLint y,
GLuint colorIndex, const GLubyte mask[] )
{
@@ -1204,7 +1204,7 @@ void MesaDriver::WriteMonoCISpanFront( const GLcontext *ctx, GLuint n,
}
-void MesaDriver::WriteCI32PixelsFront( const GLcontext *ctx, GLuint n,
+void MesaDriver::WriteCI32PixelsFront( const struct gl_context *ctx, GLuint n,
const GLint x[], const GLint y[],
const GLuint index[], const GLubyte mask[] )
{
@@ -1212,7 +1212,7 @@ void MesaDriver::WriteCI32PixelsFront( const GLcontext *ctx, GLuint n,
// TODO
}
-void MesaDriver::WriteMonoCIPixelsFront( const GLcontext *ctx, GLuint n,
+void MesaDriver::WriteMonoCIPixelsFront( const struct gl_context *ctx, GLuint n,
const GLint x[], const GLint y[],
GLuint colorIndex, const GLubyte mask[] )
{
@@ -1221,7 +1221,7 @@ void MesaDriver::WriteMonoCIPixelsFront( const GLcontext *ctx, GLuint n,
}
-void MesaDriver::ReadCI32SpanFront( const GLcontext *ctx,
+void MesaDriver::ReadCI32SpanFront( const struct gl_context *ctx,
GLuint n, GLint x, GLint y, GLuint index[] )
{
printf("ReadCI32SpanFront() not implemented yet!\n");
@@ -1229,7 +1229,7 @@ void MesaDriver::ReadCI32SpanFront( const GLcontext *ctx,
}
-void MesaDriver::ReadRGBASpanFront( const GLcontext *ctx, GLuint n,
+void MesaDriver::ReadRGBASpanFront( const struct gl_context *ctx, GLuint n,
GLint x, GLint y, GLubyte rgba[][4] )
{
printf("ReadRGBASpanFront() not implemented yet!\n");
@@ -1237,7 +1237,7 @@ void MesaDriver::ReadRGBASpanFront( const GLcontext *ctx, GLuint n,
}
-void MesaDriver::ReadCI32PixelsFront( const GLcontext *ctx,
+void MesaDriver::ReadCI32PixelsFront( const struct gl_context *ctx,
GLuint n, const GLint x[], const GLint y[],
GLuint indx[], const GLubyte mask[] )
{
@@ -1246,7 +1246,7 @@ void MesaDriver::ReadCI32PixelsFront( const GLcontext *ctx,
}
-void MesaDriver::ReadRGBAPixelsFront( const GLcontext *ctx,
+void MesaDriver::ReadRGBAPixelsFront( const struct gl_context *ctx,
GLuint n, const GLint x[], const GLint y[],
GLubyte rgba[][4], const GLubyte mask[] )
{
@@ -1257,7 +1257,7 @@ void MesaDriver::ReadRGBAPixelsFront( const GLcontext *ctx,
-void MesaDriver::WriteRGBASpanBack(const GLcontext *ctx, GLuint n,
+void MesaDriver::WriteRGBASpanBack(const struct gl_context *ctx, GLuint n,
GLint x, GLint y,
CONST GLubyte rgba[][4],
const GLubyte mask[])
@@ -1287,7 +1287,7 @@ void MesaDriver::WriteRGBASpanBack(const GLcontext *ctx, GLuint n,
}
-void MesaDriver::WriteRGBSpanBack(const GLcontext *ctx, GLuint n,
+void MesaDriver::WriteRGBSpanBack(const struct gl_context *ctx, GLuint n,
GLint x, GLint y,
CONST GLubyte rgb[][3],
const GLubyte mask[])
@@ -1319,7 +1319,7 @@ void MesaDriver::WriteRGBSpanBack(const GLcontext *ctx, GLuint n,
-void MesaDriver::WriteMonoRGBASpanBack(const GLcontext *ctx, GLuint n,
+void MesaDriver::WriteMonoRGBASpanBack(const struct gl_context *ctx, GLuint n,
GLint x, GLint y,
const GLchan color[4], const GLubyte mask[])
{
@@ -1347,7 +1347,7 @@ void MesaDriver::WriteMonoRGBASpanBack(const GLcontext *ctx, GLuint n,
}
-void MesaDriver::WriteRGBAPixelsBack(const GLcontext *ctx,
+void MesaDriver::WriteRGBAPixelsBack(const struct gl_context *ctx,
GLuint n, const GLint x[], const GLint y[],
CONST GLubyte rgba[][4],
const GLubyte mask[] )
@@ -1394,7 +1394,7 @@ void MesaDriver::WriteRGBAPixelsBack(const GLcontext *ctx,
}
-void MesaDriver::WriteMonoRGBAPixelsBack(const GLcontext *ctx, GLuint n,
+void MesaDriver::WriteMonoRGBAPixelsBack(const struct gl_context *ctx, GLuint n,
const GLint x[], const GLint y[],
const GLchan color[4],
const GLubyte mask[])
@@ -1437,7 +1437,7 @@ void MesaDriver::WriteMonoRGBAPixelsBack(const GLcontext *ctx, GLuint n,
}
-void MesaDriver::WriteCI32SpanBack( const GLcontext *ctx, GLuint n,
+void MesaDriver::WriteCI32SpanBack( const struct gl_context *ctx, GLuint n,
GLint x, GLint y,
const GLuint index[], const GLubyte mask[] )
{
@@ -1445,7 +1445,7 @@ void MesaDriver::WriteCI32SpanBack( const GLcontext *ctx, GLuint n,
// TODO
}
-void MesaDriver::WriteCI8SpanBack( const GLcontext *ctx, GLuint n,
+void MesaDriver::WriteCI8SpanBack( const struct gl_context *ctx, GLuint n,
GLint x, GLint y,
const GLubyte index[], const GLubyte mask[] )
{
@@ -1453,7 +1453,7 @@ void MesaDriver::WriteCI8SpanBack( const GLcontext *ctx, GLuint n,
// TODO
}
-void MesaDriver::WriteMonoCISpanBack( const GLcontext *ctx, GLuint n,
+void MesaDriver::WriteMonoCISpanBack( const struct gl_context *ctx, GLuint n,
GLint x, GLint y,
GLuint colorIndex, const GLubyte mask[] )
{
@@ -1462,7 +1462,7 @@ void MesaDriver::WriteMonoCISpanBack( const GLcontext *ctx, GLuint n,
}
-void MesaDriver::WriteCI32PixelsBack( const GLcontext *ctx, GLuint n,
+void MesaDriver::WriteCI32PixelsBack( const struct gl_context *ctx, GLuint n,
const GLint x[], const GLint y[],
const GLuint index[], const GLubyte mask[] )
{
@@ -1470,7 +1470,7 @@ void MesaDriver::WriteCI32PixelsBack( const GLcontext *ctx, GLuint n,
// TODO
}
-void MesaDriver::WriteMonoCIPixelsBack( const GLcontext *ctx, GLuint n,
+void MesaDriver::WriteMonoCIPixelsBack( const struct gl_context *ctx, GLuint n,
const GLint x[], const GLint y[],
GLuint colorIndex, const GLubyte mask[] )
{
@@ -1479,7 +1479,7 @@ void MesaDriver::WriteMonoCIPixelsBack( const GLcontext *ctx, GLuint n,
}
-void MesaDriver::ReadCI32SpanBack( const GLcontext *ctx,
+void MesaDriver::ReadCI32SpanBack( const struct gl_context *ctx,
GLuint n, GLint x, GLint y, GLuint index[] )
{
printf("ReadCI32SpanBack() not implemented yet!\n");
@@ -1487,7 +1487,7 @@ void MesaDriver::ReadCI32SpanBack( const GLcontext *ctx,
}
-void MesaDriver::ReadRGBASpanBack( const GLcontext *ctx, GLuint n,
+void MesaDriver::ReadRGBASpanBack( const struct gl_context *ctx, GLuint n,
GLint x, GLint y, GLubyte rgba[][4] )
{
MesaDriver *md = (MesaDriver *) ctx->DriverCtx;
@@ -1507,7 +1507,7 @@ void MesaDriver::ReadRGBASpanBack( const GLcontext *ctx, GLuint n,
}
-void MesaDriver::ReadCI32PixelsBack( const GLcontext *ctx,
+void MesaDriver::ReadCI32PixelsBack( const struct gl_context *ctx,
GLuint n, const GLint x[], const GLint y[],
GLuint indx[], const GLubyte mask[] )
{
@@ -1516,7 +1516,7 @@ void MesaDriver::ReadCI32PixelsBack( const GLcontext *ctx,
}
-void MesaDriver::ReadRGBAPixelsBack( const GLcontext *ctx,
+void MesaDriver::ReadRGBAPixelsBack( const struct gl_context *ctx,
GLuint n, const GLint x[], const GLint y[],
GLubyte rgba[][4], const GLubyte mask[] )
{
diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index aee73b53bb3..fc67bee98c6 100644
--- a/src/mesa/drivers/common/driverfuncs.c
+++ b/src/mesa/drivers/common/driverfuncs.c
@@ -224,7 +224,7 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
* Only the Intel drivers use this so far.
*/
void
-_mesa_init_driver_state(GLcontext *ctx)
+_mesa_init_driver_state(struct gl_context *ctx)
{
ctx->Driver.AlphaFunc(ctx, ctx->Color.AlphaFunc, ctx->Color.AlphaRef);
diff --git a/src/mesa/drivers/common/driverfuncs.h b/src/mesa/drivers/common/driverfuncs.h
index 4c90ed12f60..212f3074247 100644
--- a/src/mesa/drivers/common/driverfuncs.h
+++ b/src/mesa/drivers/common/driverfuncs.h
@@ -31,7 +31,7 @@ _mesa_init_driver_functions(struct dd_function_table *driver);
extern void
-_mesa_init_driver_state(GLcontext *ctx);
+_mesa_init_driver_state(struct gl_context *ctx);
#endif
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 16ca42f7b5e..1bfd76a665d 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -143,7 +143,10 @@ struct save_state
struct gl_vertex_program *VertexProgram;
GLboolean FragmentProgramEnabled;
struct gl_fragment_program *FragmentProgram;
- GLuint Shader;
+ GLuint VertexShader;
+ GLuint GeometryShader;
+ GLuint FragmentShader;
+ GLuint ActiveShader;
/** META_STENCIL_TEST */
struct gl_stencil_attrib Stencil;
@@ -284,7 +287,7 @@ struct gl_meta_state
* To be called once during context creation.
*/
void
-_mesa_meta_init(GLcontext *ctx)
+_mesa_meta_init(struct gl_context *ctx)
{
ASSERT(!ctx->Meta);
@@ -297,7 +300,7 @@ _mesa_meta_init(GLcontext *ctx)
* To be called once during context destruction.
*/
void
-_mesa_meta_free(GLcontext *ctx)
+_mesa_meta_free(struct gl_context *ctx)
{
/* Note: Any textures, VBOs, etc, that we allocate should get
* freed by the normal context destruction code. But this would be
@@ -316,7 +319,7 @@ _mesa_meta_free(GLcontext *ctx)
* to save and reset to their defaults
*/
static void
-_mesa_meta_begin(GLcontext *ctx, GLbitfield state)
+_mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
{
struct save_state *save = &ctx->Meta->Save;
@@ -433,8 +436,15 @@ _mesa_meta_begin(GLcontext *ctx, GLbitfield state)
}
if (ctx->Extensions.ARB_shader_objects) {
- save->Shader = ctx->Shader.CurrentProgram ?
- ctx->Shader.CurrentProgram->Name : 0;
+ save->VertexShader = ctx->Shader.CurrentVertexProgram ?
+ ctx->Shader.CurrentVertexProgram->Name : 0;
+ save->GeometryShader = ctx->Shader.CurrentGeometryProgram ?
+ ctx->Shader.CurrentGeometryProgram->Name : 0;
+ save->FragmentShader = ctx->Shader.CurrentFragmentProgram ?
+ ctx->Shader.CurrentFragmentProgram->Name : 0;
+ save->ActiveShader = ctx->Shader.ActiveProgram ?
+ ctx->Shader.ActiveProgram->Name : 0;
+
_mesa_UseProgramObjectARB(0);
}
}
@@ -557,7 +567,7 @@ _mesa_meta_begin(GLcontext *ctx, GLbitfield state)
* Leave meta state. This is like a light-weight version of glPopAttrib().
*/
static void
-_mesa_meta_end(GLcontext *ctx)
+_mesa_meta_end(struct gl_context *ctx)
{
struct save_state *save = &ctx->Meta->Save;
const GLbitfield state = save->SavedState;
@@ -664,9 +674,17 @@ _mesa_meta_end(GLcontext *ctx)
_mesa_reference_fragprog(ctx, &save->FragmentProgram, NULL);
}
- if (ctx->Extensions.ARB_shader_objects) {
- _mesa_UseProgramObjectARB(save->Shader);
- }
+ if (ctx->Extensions.ARB_vertex_shader)
+ _mesa_UseShaderProgramEXT(GL_VERTEX_SHADER, save->VertexShader);
+
+ if (ctx->Extensions.ARB_geometry_shader4)
+ _mesa_UseShaderProgramEXT(GL_GEOMETRY_SHADER_ARB,
+ save->GeometryShader);
+
+ if (ctx->Extensions.ARB_fragment_shader)
+ _mesa_UseShaderProgramEXT(GL_FRAGMENT_SHADER, save->FragmentShader);
+
+ _mesa_ActiveProgramEXT(save->ActiveShader);
}
if (state & META_STENCIL_TEST) {
@@ -824,7 +842,7 @@ invert_z(GLfloat normZ)
* Choose tex target, compute max tex size, etc.
*/
static void
-init_temp_texture(GLcontext *ctx, struct temp_texture *tex)
+init_temp_texture(struct gl_context *ctx, struct temp_texture *tex)
{
/* prefer texture rectangle */
if (ctx->Extensions.NV_texture_rectangle) {
@@ -850,7 +868,7 @@ init_temp_texture(GLcontext *ctx, struct temp_texture *tex)
* This does some one-time init if needed.
*/
static struct temp_texture *
-get_temp_texture(GLcontext *ctx)
+get_temp_texture(struct gl_context *ctx)
{
struct temp_texture *tex = &ctx->Meta->TempTex;
@@ -868,7 +886,7 @@ get_temp_texture(GLcontext *ctx)
* allocation/deallocation.
*/
static struct temp_texture *
-get_bitmap_temp_texture(GLcontext *ctx)
+get_bitmap_temp_texture(struct gl_context *ctx)
{
struct temp_texture *tex = &ctx->Meta->Bitmap.Tex;
@@ -984,7 +1002,7 @@ setup_copypix_texture(struct temp_texture *tex,
* Setup/load texture for glDrawPixels.
*/
static void
-setup_drawpix_texture(GLcontext *ctx,
+setup_drawpix_texture(struct gl_context *ctx,
struct temp_texture *tex,
GLboolean newTex,
GLenum texIntFormat,
@@ -1035,7 +1053,7 @@ setup_drawpix_texture(GLcontext *ctx,
* One-time init for drawing depth pixels.
*/
static void
-init_blit_depth_pixels(GLcontext *ctx)
+init_blit_depth_pixels(struct gl_context *ctx)
{
static const char *program =
"!!ARBfp1.0\n"
@@ -1072,7 +1090,7 @@ init_blit_depth_pixels(GLcontext *ctx)
* normal path.
*/
static GLbitfield
-blitframebuffer_texture(GLcontext *ctx,
+blitframebuffer_texture(struct gl_context *ctx,
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
GLbitfield mask, GLenum filter)
@@ -1201,7 +1219,7 @@ blitframebuffer_texture(GLcontext *ctx,
* of texture mapping and polygon rendering.
*/
void
-_mesa_meta_BlitFramebuffer(GLcontext *ctx,
+_mesa_meta_BlitFramebuffer(struct gl_context *ctx,
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
GLbitfield mask, GLenum filter)
@@ -1362,7 +1380,7 @@ _mesa_meta_BlitFramebuffer(GLcontext *ctx,
* Meta implementation of ctx->Driver.Clear() in terms of polygon rendering.
*/
void
-_mesa_meta_Clear(GLcontext *ctx, GLbitfield buffers)
+_mesa_meta_Clear(struct gl_context *ctx, GLbitfield buffers)
{
struct clear_state *clear = &ctx->Meta->Clear;
struct vertex {
@@ -1480,7 +1498,7 @@ _mesa_meta_Clear(GLcontext *ctx, GLbitfield buffers)
* of texture mapping and polygon rendering.
*/
void
-_mesa_meta_CopyPixels(GLcontext *ctx, GLint srcX, GLint srcY,
+_mesa_meta_CopyPixels(struct gl_context *ctx, GLint srcX, GLint srcY,
GLsizei width, GLsizei height,
GLint dstX, GLint dstY, GLenum type)
{
@@ -1594,7 +1612,7 @@ _mesa_meta_CopyPixels(GLcontext *ctx, GLint srcX, GLint srcY,
* into tiles which fit into the max texture size.
*/
static void
-tiled_draw_pixels(GLcontext *ctx,
+tiled_draw_pixels(struct gl_context *ctx,
GLint tileSize,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
@@ -1630,7 +1648,7 @@ tiled_draw_pixels(GLcontext *ctx,
* One-time init for drawing stencil pixels.
*/
static void
-init_draw_stencil_pixels(GLcontext *ctx)
+init_draw_stencil_pixels(struct gl_context *ctx)
{
/* This program is run eight times, once for each stencil bit.
* The stencil values to draw are found in an 8-bit alpha texture.
@@ -1694,7 +1712,7 @@ init_draw_stencil_pixels(GLcontext *ctx)
* One-time init for drawing depth pixels.
*/
static void
-init_draw_depth_pixels(GLcontext *ctx)
+init_draw_depth_pixels(struct gl_context *ctx)
{
static const char *program =
"!!ARBfp1.0\n"
@@ -1729,7 +1747,7 @@ init_draw_depth_pixels(GLcontext *ctx)
* of texture mapping and polygon rendering.
*/
void
-_mesa_meta_DrawPixels(GLcontext *ctx,
+_mesa_meta_DrawPixels(struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *unpack,
@@ -1962,7 +1980,7 @@ _mesa_meta_DrawPixels(GLcontext *ctx,
* improve performance a lot.
*/
void
-_mesa_meta_Bitmap(GLcontext *ctx,
+_mesa_meta_Bitmap(struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack,
const GLubyte *bitmap1)
@@ -2111,7 +2129,7 @@ _mesa_meta_Bitmap(GLcontext *ctx,
* \return GL_TRUE if a fallback is needed, GL_FALSE otherwise
*/
GLboolean
-_mesa_meta_check_generate_mipmap_fallback(GLcontext *ctx, GLenum target,
+_mesa_meta_check_generate_mipmap_fallback(struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj)
{
const GLuint fboSave = ctx->DrawBuffer->Name;
@@ -2177,7 +2195,7 @@ _mesa_meta_check_generate_mipmap_fallback(GLcontext *ctx, GLenum target,
* Note: texture borders and 3D texture support not yet complete.
*/
void
-_mesa_meta_GenerateMipmap(GLcontext *ctx, GLenum target,
+_mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj)
{
struct gen_mipmap_state *mipmap = &ctx->Meta->Mipmap;
@@ -2494,7 +2512,7 @@ _mesa_meta_GenerateMipmap(GLcontext *ctx, GLenum target,
* ReadPixels() and passed to Tex[Sub]Image().
*/
static GLenum
-get_temp_image_type(GLcontext *ctx, GLenum baseFormat)
+get_temp_image_type(struct gl_context *ctx, GLenum baseFormat)
{
switch (baseFormat) {
case GL_RGBA:
@@ -2525,7 +2543,7 @@ get_temp_image_type(GLcontext *ctx, GLenum baseFormat)
* Have to be careful with locking and meta state for pixel transfer.
*/
static void
-copy_tex_image(GLcontext *ctx, GLuint dims, GLenum target, GLint level,
+copy_tex_image(struct gl_context *ctx, GLuint dims, GLenum target, GLint level,
GLenum internalFormat, GLint x, GLint y,
GLsizei width, GLsizei height, GLint border)
{
@@ -2603,7 +2621,7 @@ copy_tex_image(GLcontext *ctx, GLuint dims, GLenum target, GLint level,
void
-_mesa_meta_CopyTexImage1D(GLcontext *ctx, GLenum target, GLint level,
+_mesa_meta_CopyTexImage1D(struct gl_context *ctx, GLenum target, GLint level,
GLenum internalFormat, GLint x, GLint y,
GLsizei width, GLint border)
{
@@ -2613,7 +2631,7 @@ _mesa_meta_CopyTexImage1D(GLcontext *ctx, GLenum target, GLint level,
void
-_mesa_meta_CopyTexImage2D(GLcontext *ctx, GLenum target, GLint level,
+_mesa_meta_CopyTexImage2D(struct gl_context *ctx, GLenum target, GLint level,
GLenum internalFormat, GLint x, GLint y,
GLsizei width, GLsizei height, GLint border)
{
@@ -2628,7 +2646,7 @@ _mesa_meta_CopyTexImage2D(GLcontext *ctx, GLenum target, GLint level,
* Have to be careful with locking and meta state for pixel transfer.
*/
static void
-copy_tex_sub_image(GLcontext *ctx, GLuint dims, GLenum target, GLint level,
+copy_tex_sub_image(struct gl_context *ctx, GLuint dims, GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLint x, GLint y,
GLsizei width, GLsizei height)
@@ -2699,7 +2717,7 @@ copy_tex_sub_image(GLcontext *ctx, GLuint dims, GLenum target, GLint level,
void
-_mesa_meta_CopyTexSubImage1D(GLcontext *ctx, GLenum target, GLint level,
+_mesa_meta_CopyTexSubImage1D(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset,
GLint x, GLint y, GLsizei width)
{
@@ -2709,7 +2727,7 @@ _mesa_meta_CopyTexSubImage1D(GLcontext *ctx, GLenum target, GLint level,
void
-_mesa_meta_CopyTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
+_mesa_meta_CopyTexSubImage2D(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLint x, GLint y,
GLsizei width, GLsizei height)
@@ -2720,7 +2738,7 @@ _mesa_meta_CopyTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
void
-_mesa_meta_CopyTexSubImage3D(GLcontext *ctx, GLenum target, GLint level,
+_mesa_meta_CopyTexSubImage3D(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLint x, GLint y,
GLsizei width, GLsizei height)
@@ -2731,7 +2749,7 @@ _mesa_meta_CopyTexSubImage3D(GLcontext *ctx, GLenum target, GLint level,
void
-_mesa_meta_CopyColorTable(GLcontext *ctx,
+_mesa_meta_CopyColorTable(struct gl_context *ctx,
GLenum target, GLenum internalformat,
GLint x, GLint y, GLsizei width)
{
@@ -2759,7 +2777,7 @@ _mesa_meta_CopyColorTable(GLcontext *ctx,
void
-_mesa_meta_CopyColorSubTable(GLcontext *ctx,GLenum target, GLsizei start,
+_mesa_meta_CopyColorSubTable(struct gl_context *ctx,GLenum target, GLsizei start,
GLint x, GLint y, GLsizei width)
{
GLfloat *buf;
diff --git a/src/mesa/drivers/common/meta.h b/src/mesa/drivers/common/meta.h
index 6225b941893..b0797d3d91a 100644
--- a/src/mesa/drivers/common/meta.h
+++ b/src/mesa/drivers/common/meta.h
@@ -28,89 +28,89 @@
extern void
-_mesa_meta_init(GLcontext *ctx);
+_mesa_meta_init(struct gl_context *ctx);
extern void
-_mesa_meta_free(GLcontext *ctx);
+_mesa_meta_free(struct gl_context *ctx);
extern void
-_mesa_meta_BlitFramebuffer(GLcontext *ctx,
+_mesa_meta_BlitFramebuffer(struct gl_context *ctx,
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
GLbitfield mask, GLenum filter);
extern void
-_mesa_meta_Clear(GLcontext *ctx, GLbitfield buffers);
+_mesa_meta_Clear(struct gl_context *ctx, GLbitfield buffers);
extern void
-_mesa_meta_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
+_mesa_meta_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
GLsizei width, GLsizei height,
GLint dstx, GLint dsty, GLenum type);
extern void
-_mesa_meta_DrawPixels(GLcontext *ctx,
+_mesa_meta_DrawPixels(struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *unpack,
const GLvoid *pixels);
extern void
-_mesa_meta_Bitmap(GLcontext *ctx,
+_mesa_meta_Bitmap(struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack,
const GLubyte *bitmap);
extern GLboolean
-_mesa_meta_check_generate_mipmap_fallback(GLcontext *ctx, GLenum target,
+_mesa_meta_check_generate_mipmap_fallback(struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj);
extern void
-_mesa_meta_GenerateMipmap(GLcontext *ctx, GLenum target,
+_mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj);
extern void
-_mesa_meta_CopyTexImage1D(GLcontext *ctx, GLenum target, GLint level,
+_mesa_meta_CopyTexImage1D(struct gl_context *ctx, GLenum target, GLint level,
GLenum internalFormat, GLint x, GLint y,
GLsizei width, GLint border);
extern void
-_mesa_meta_CopyTexImage2D(GLcontext *ctx, GLenum target, GLint level,
+_mesa_meta_CopyTexImage2D(struct gl_context *ctx, GLenum target, GLint level,
GLenum internalFormat, GLint x, GLint y,
GLsizei width, GLsizei height, GLint border);
extern void
-_mesa_meta_CopyTexSubImage1D(GLcontext *ctx, GLenum target, GLint level,
+_mesa_meta_CopyTexSubImage1D(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset,
GLint x, GLint y, GLsizei width);
extern void
-_mesa_meta_CopyTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
+_mesa_meta_CopyTexSubImage2D(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLint x, GLint y,
GLsizei width, GLsizei height);
extern void
-_mesa_meta_CopyTexSubImage3D(GLcontext *ctx, GLenum target, GLint level,
+_mesa_meta_CopyTexSubImage3D(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLint x, GLint y,
GLsizei width, GLsizei height);
extern void
-_mesa_meta_CopyColorTable(GLcontext *ctx,
+_mesa_meta_CopyColorTable(struct gl_context *ctx,
GLenum target, GLenum internalformat,
GLint x, GLint y, GLsizei width);
extern void
-_mesa_meta_CopyColorSubTable(GLcontext *ctx,GLenum target, GLsizei start,
+_mesa_meta_CopyColorSubTable(struct gl_context *ctx,GLenum target, GLsizei start,
GLint x, GLint y, GLsizei width);
extern void
-_mesa_meta_CopyConvolutionFilter1D(GLcontext *ctx, GLenum target,
+_mesa_meta_CopyConvolutionFilter1D(struct gl_context *ctx, GLenum target,
GLenum internalFormat,
GLint x, GLint y, GLsizei width);
extern void
-_mesa_meta_CopyConvolutionFilter2D(GLcontext *ctx, GLenum target,
+_mesa_meta_CopyConvolutionFilter2D(struct gl_context *ctx, GLenum target,
GLenum internalFormat, GLint x, GLint y,
GLsizei width, GLsizei height);
diff --git a/src/mesa/drivers/dri/common/depthtmp.h b/src/mesa/drivers/dri/common/depthtmp.h
index fd2dab3b422..81bec9c5ffc 100644
--- a/src/mesa/drivers/dri/common/depthtmp.h
+++ b/src/mesa/drivers/dri/common/depthtmp.h
@@ -21,7 +21,7 @@
#define HAVE_HW_DEPTH_PIXELS 0
#endif
-static void TAG(WriteDepthSpan)( GLcontext *ctx,
+static void TAG(WriteDepthSpan)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const void *values,
@@ -72,7 +72,7 @@ static void TAG(WriteDepthSpan)( GLcontext *ctx,
#if HAVE_HW_DEPTH_SPANS
/* implement MonoWriteDepthSpan() in terms of WriteDepthSpan() */
static void
-TAG(WriteMonoDepthSpan)( GLcontext *ctx, struct gl_renderbuffer *rb,
+TAG(WriteMonoDepthSpan)( struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const void *value, const GLubyte mask[] )
{
@@ -84,7 +84,7 @@ TAG(WriteMonoDepthSpan)( GLcontext *ctx, struct gl_renderbuffer *rb,
TAG(WriteDepthSpan)(ctx, rb, n, x, y, depths, mask);
}
#else
-static void TAG(WriteMonoDepthSpan)( GLcontext *ctx,
+static void TAG(WriteMonoDepthSpan)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const void *value,
@@ -124,7 +124,7 @@ static void TAG(WriteMonoDepthSpan)( GLcontext *ctx,
#endif
-static void TAG(WriteDepthPixels)( GLcontext *ctx,
+static void TAG(WriteDepthPixels)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n,
const GLint x[],
@@ -173,7 +173,7 @@ static void TAG(WriteDepthPixels)( GLcontext *ctx,
/* Read depth spans and pixels
*/
-static void TAG(ReadDepthSpan)( GLcontext *ctx,
+static void TAG(ReadDepthSpan)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
void *values )
@@ -207,7 +207,7 @@ static void TAG(ReadDepthSpan)( GLcontext *ctx,
HW_READ_UNLOCK();
}
-static void TAG(ReadDepthPixels)( GLcontext *ctx,
+static void TAG(ReadDepthPixels)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n,
const GLint x[], const GLint y[],
diff --git a/src/mesa/drivers/dri/common/dri_metaops.c b/src/mesa/drivers/dri/common/dri_metaops.c
index a2f404b616f..e0bc3b88ecd 100644
--- a/src/mesa/drivers/dri/common/dri_metaops.c
+++ b/src/mesa/drivers/dri/common/dri_metaops.c
@@ -41,7 +41,7 @@
void
meta_set_passthrough_transform(struct dri_metaops *meta)
{
- GLcontext *ctx = meta->ctx;
+ struct gl_context *ctx = meta->ctx;
meta->saved_vp_x = ctx->Viewport.X;
meta->saved_vp_y = ctx->Viewport.Y;
@@ -87,7 +87,7 @@ meta_restore_transform(struct dri_metaops *meta)
void
meta_set_passthrough_vertex_program(struct dri_metaops *meta)
{
- GLcontext *ctx = meta->ctx;
+ struct gl_context *ctx = meta->ctx;
static const char *vp =
"!!ARBvp1.0\n"
"TEMP vertexClip;\n"
@@ -133,7 +133,7 @@ meta_set_passthrough_vertex_program(struct dri_metaops *meta)
void
meta_restore_vertex_program(struct dri_metaops *meta)
{
- GLcontext *ctx = meta->ctx;
+ struct gl_context *ctx = meta->ctx;
FLUSH_VERTICES(ctx, _NEW_PROGRAM);
_mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current,
@@ -155,7 +155,7 @@ meta_set_fragment_program(struct dri_metaops *meta,
struct gl_fragment_program **prog,
const char *prog_string)
{
- GLcontext *ctx = meta->ctx;
+ struct gl_context *ctx = meta->ctx;
assert(meta->saved_fp == NULL);
_mesa_reference_fragprog(ctx, &meta->saved_fp,
@@ -187,7 +187,7 @@ meta_set_fragment_program(struct dri_metaops *meta,
void
meta_restore_fragment_program(struct dri_metaops *meta)
{
- GLcontext *ctx = meta->ctx;
+ struct gl_context *ctx = meta->ctx;
FLUSH_VERTICES(ctx, _NEW_PROGRAM);
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current,
@@ -208,7 +208,7 @@ static const float default_texcoords[4][2] = { { 0.0, 0.0 },
void
meta_set_default_texrect(struct dri_metaops *meta)
{
- GLcontext *ctx = meta->ctx;
+ struct gl_context *ctx = meta->ctx;
struct gl_client_array *old_texcoord_array;
meta->saved_active_texture = ctx->Texture.CurrentUnit;
@@ -249,7 +249,7 @@ meta_set_default_texrect(struct dri_metaops *meta)
void
meta_restore_texcoords(struct dri_metaops *meta)
{
- GLcontext *ctx = meta->ctx;
+ struct gl_context *ctx = meta->ctx;
/* Restore the old TexCoordPointer */
if (meta->saved_texcoord_vbo) {
@@ -280,7 +280,7 @@ meta_restore_texcoords(struct dri_metaops *meta)
}
-void meta_init_metaops(GLcontext *ctx, struct dri_metaops *meta)
+void meta_init_metaops(struct gl_context *ctx, struct dri_metaops *meta)
{
meta->ctx = ctx;
}
diff --git a/src/mesa/drivers/dri/common/dri_metaops.h b/src/mesa/drivers/dri/common/dri_metaops.h
index 2487145326b..aa7d4baa6e9 100644
--- a/src/mesa/drivers/dri/common/dri_metaops.h
+++ b/src/mesa/drivers/dri/common/dri_metaops.h
@@ -31,7 +31,7 @@
struct dri_metaops {
- GLcontext *ctx;
+ struct gl_context *ctx;
GLboolean internal_viewport_call;
struct gl_fragment_program *bitmap_fp;
struct gl_vertex_program *passthrough_vp;
@@ -75,7 +75,7 @@ void meta_set_default_texrect(struct dri_metaops *meta);
void meta_restore_texcoords(struct dri_metaops *meta);
-void meta_init_metaops(GLcontext *ctx, struct dri_metaops *meta);
+void meta_init_metaops(struct gl_context *ctx, struct dri_metaops *meta);
void meta_destroy_metaops(struct dri_metaops *meta);
#endif
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index d46f622d573..a5b71bd40ad 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -444,8 +444,7 @@ driCreateNewDrawable(__DRIscreen *psp, const __DRIconfig *config,
pdp->driScreenPriv = psp;
- if (!(*psp->DriverAPI.CreateBuffer)(psp, pdp, &config->modes,
- renderType == GLX_PIXMAP_BIT)) {
+ if (!(*psp->DriverAPI.CreateBuffer)(psp, pdp, &config->modes, 0)) {
free(pdp);
return NULL;
}
@@ -635,7 +634,7 @@ dri2CreateNewContextForAPI(__DRIscreen *screen, int api,
__DRIcontext *shared, void *data)
{
__DRIcontext *context;
- const __GLcontextModes *modes = (config != NULL) ? &config->modes : NULL;
+ const struct gl_config *modes = (config != NULL) ? &config->modes : NULL;
void *shareCtx = (shared != NULL) ? shared->driverPrivate : NULL;
gl_api mesa_api;
@@ -755,7 +754,7 @@ setupLoaderExtensions(__DRIscreen *psp,
* This is the bootstrap function for the driver. libGL supplies all of the
* requisite information about the system, and the driver initializes itself.
* This routine also fills in the linked list pointed to by \c driver_modes
- * with the \c __GLcontextModes that the driver can support for windows or
+ * with the \c struct gl_config that the driver can support for windows or
* pbuffers.
*
* For legacy DRI.
diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h
index 785beacd817..ffffb99b301 100644
--- a/src/mesa/drivers/dri/common/dri_util.h
+++ b/src/mesa/drivers/dri/common/dri_util.h
@@ -54,7 +54,6 @@
#include "xmlconfig.h"
#include "main/glheader.h"
#include "main/mtypes.h"
-#include "GL/internal/glcore.h"
#include "GL/internal/dri_interface.h"
#define GLX_BAD_CONTEXT 5
@@ -149,7 +148,7 @@ struct __DriverAPIRec {
* Context creation callback
*/
GLboolean (*CreateContext)(gl_api api,
- const __GLcontextModes *glVis,
+ const struct gl_config *glVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate);
@@ -163,7 +162,7 @@ struct __DriverAPIRec {
*/
GLboolean (*CreateBuffer)(__DRIscreen *driScrnPriv,
__DRIdrawable *driDrawPriv,
- const __GLcontextModes *glVis,
+ const struct gl_config *glVis,
GLboolean pixmapBuffer);
/**
diff --git a/src/mesa/drivers/dri/common/drirenderbuffer.c b/src/mesa/drivers/dri/common/drirenderbuffer.c
index c9ce6e3cb64..7ac1ab169ef 100644
--- a/src/mesa/drivers/dri/common/drirenderbuffer.c
+++ b/src/mesa/drivers/dri/common/drirenderbuffer.c
@@ -16,7 +16,7 @@
* be used.
*/
static GLboolean
-driRenderbufferStorage(GLcontext *ctx, struct gl_renderbuffer *rb,
+driRenderbufferStorage(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLenum internalFormat, GLuint width, GLuint height)
{
rb->Width = width;
@@ -187,7 +187,7 @@ driFlipRenderbuffers(struct gl_framebuffer *fb, GLboolean flipped)
* gl_framebuffer object.
*/
void
-driUpdateFramebufferSize(GLcontext *ctx, const __DRIdrawable *dPriv)
+driUpdateFramebufferSize(struct gl_context *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 677511334d3..0cae7309df7 100644
--- a/src/mesa/drivers/dri/common/drirenderbuffer.h
+++ b/src/mesa/drivers/dri/common/drirenderbuffer.h
@@ -73,7 +73,7 @@ driFlipRenderbuffers(struct gl_framebuffer *fb, GLboolean flipped);
extern void
-driUpdateFramebufferSize(GLcontext *ctx, const __DRIdrawable *dPriv);
+driUpdateFramebufferSize(struct gl_context *ctx, const __DRIdrawable *dPriv);
#endif /* DRIRENDERBUFFER_H */
diff --git a/src/mesa/drivers/dri/common/drisw_util.h b/src/mesa/drivers/dri/common/drisw_util.h
index 9c3d01c99c0..d43f5235aa6 100644
--- a/src/mesa/drivers/dri/common/drisw_util.h
+++ b/src/mesa/drivers/dri/common/drisw_util.h
@@ -39,7 +39,6 @@
#include "main/mtypes.h"
#include <GL/gl.h>
-#include <GL/internal/glcore.h>
#include <GL/internal/dri_interface.h>
typedef struct _drmLock drmLock;
@@ -60,7 +59,7 @@ struct __DriverAPIRec {
void (*DestroyScreen)(__DRIscreen *driScrnPriv);
GLboolean (*CreateContext)(gl_api glapi,
- const __GLcontextModes *glVis,
+ const struct gl_config *glVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate);
@@ -68,7 +67,7 @@ struct __DriverAPIRec {
GLboolean (*CreateBuffer)(__DRIscreen *driScrnPriv,
__DRIdrawable *driDrawPriv,
- const __GLcontextModes *glVis,
+ const struct gl_config *glVis,
GLboolean pixmapBuffer);
void (*DestroyBuffer)(__DRIdrawable *driDrawPriv);
diff --git a/src/mesa/drivers/dri/common/spantmp.h b/src/mesa/drivers/dri/common/spantmp.h
index cdc4f422ceb..f0af5b1c58c 100644
--- a/src/mesa/drivers/dri/common/spantmp.h
+++ b/src/mesa/drivers/dri/common/spantmp.h
@@ -42,7 +42,7 @@
#endif
-static void TAG(WriteRGBASpan)( GLcontext *ctx,
+static void TAG(WriteRGBASpan)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const void *values, const GLubyte mask[] )
@@ -85,7 +85,7 @@ static void TAG(WriteRGBASpan)( GLcontext *ctx,
HW_WRITE_UNLOCK();
}
-static void TAG(WriteRGBSpan)( GLcontext *ctx,
+static void TAG(WriteRGBSpan)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const void *values, const GLubyte mask[] )
@@ -124,7 +124,7 @@ static void TAG(WriteRGBSpan)( GLcontext *ctx,
HW_WRITE_UNLOCK();
}
-static void TAG(WriteRGBAPixels)( GLcontext *ctx,
+static void TAG(WriteRGBAPixels)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, const GLint x[], const GLint y[],
const void *values, const GLubyte mask[] )
@@ -170,7 +170,7 @@ static void TAG(WriteRGBAPixels)( GLcontext *ctx,
}
-static void TAG(WriteMonoRGBASpan)( GLcontext *ctx,
+static void TAG(WriteMonoRGBASpan)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const void *value,
@@ -210,7 +210,7 @@ static void TAG(WriteMonoRGBASpan)( GLcontext *ctx,
}
-static void TAG(WriteMonoRGBAPixels)( GLcontext *ctx,
+static void TAG(WriteMonoRGBAPixels)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n,
const GLint x[], const GLint y[],
@@ -252,7 +252,7 @@ static void TAG(WriteMonoRGBAPixels)( GLcontext *ctx,
}
-static void TAG(ReadRGBASpan)( GLcontext *ctx,
+static void TAG(ReadRGBASpan)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
void *values)
@@ -280,7 +280,7 @@ static void TAG(ReadRGBASpan)( GLcontext *ctx,
}
-static void TAG(ReadRGBAPixels)( GLcontext *ctx,
+static void TAG(ReadRGBAPixels)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, const GLint x[], const GLint y[],
void *values )
diff --git a/src/mesa/drivers/dri/common/spantmp2.h b/src/mesa/drivers/dri/common/spantmp2.h
index 1dab7336b9b..abd79562f98 100644
--- a/src/mesa/drivers/dri/common/spantmp2.h
+++ b/src/mesa/drivers/dri/common/spantmp2.h
@@ -460,7 +460,7 @@
#include "x86/common_x86_asm.h"
#endif
-static void TAG(WriteRGBASpan)( GLcontext *ctx,
+static void TAG(WriteRGBASpan)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const void *values, const GLubyte mask[] )
@@ -503,7 +503,7 @@ static void TAG(WriteRGBASpan)( GLcontext *ctx,
HW_WRITE_UNLOCK();
}
-static void TAG(WriteRGBSpan)( GLcontext *ctx,
+static void TAG(WriteRGBSpan)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const void *values, const GLubyte mask[] )
@@ -542,7 +542,7 @@ static void TAG(WriteRGBSpan)( GLcontext *ctx,
HW_WRITE_UNLOCK();
}
-static void TAG(WriteRGBAPixels)( GLcontext *ctx,
+static void TAG(WriteRGBAPixels)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, const GLint x[], const GLint y[],
const void *values, const GLubyte mask[] )
@@ -588,7 +588,7 @@ static void TAG(WriteRGBAPixels)( GLcontext *ctx,
}
-static void TAG(WriteMonoRGBASpan)( GLcontext *ctx,
+static void TAG(WriteMonoRGBASpan)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const void *value, const GLubyte mask[] )
@@ -627,7 +627,7 @@ static void TAG(WriteMonoRGBASpan)( GLcontext *ctx,
}
-static void TAG(WriteMonoRGBAPixels)( GLcontext *ctx,
+static void TAG(WriteMonoRGBAPixels)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n,
const GLint x[], const GLint y[],
@@ -669,7 +669,7 @@ static void TAG(WriteMonoRGBAPixels)( GLcontext *ctx,
}
-static void TAG(ReadRGBASpan)( GLcontext *ctx,
+static void TAG(ReadRGBASpan)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y, void *values)
{
@@ -702,7 +702,7 @@ static void TAG(ReadRGBASpan)( GLcontext *ctx,
(SPANTMP_PIXEL_TYPE == GL_UNSIGNED_INT_8_8_8_8_REV)) || \
((SPANTMP_PIXEL_FMT == GL_RGB) && \
(SPANTMP_PIXEL_TYPE == GL_UNSIGNED_SHORT_5_6_5)))
-static void TAG2(ReadRGBASpan,_MMX)( GLcontext *ctx,
+static void TAG2(ReadRGBASpan,_MMX)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y, void *values)
{
@@ -752,7 +752,7 @@ static void TAG2(ReadRGBASpan,_MMX)( GLcontext *ctx,
defined(USE_SSE_ASM) && \
(SPANTMP_PIXEL_FMT == GL_BGRA) && \
(SPANTMP_PIXEL_TYPE == GL_UNSIGNED_INT_8_8_8_8_REV)
-static void TAG2(ReadRGBASpan,_SSE2)( GLcontext *ctx,
+static void TAG2(ReadRGBASpan,_SSE2)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
void *values)
@@ -787,7 +787,7 @@ static void TAG2(ReadRGBASpan,_SSE2)( GLcontext *ctx,
defined(USE_SSE_ASM) && \
(SPANTMP_PIXEL_FMT == GL_BGRA) && \
(SPANTMP_PIXEL_TYPE == GL_UNSIGNED_INT_8_8_8_8_REV)
-static void TAG2(ReadRGBASpan,_SSE)( GLcontext *ctx,
+static void TAG2(ReadRGBASpan,_SSE)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
void *values)
@@ -829,7 +829,7 @@ static void TAG2(ReadRGBASpan,_SSE)( GLcontext *ctx,
#endif
-static void TAG(ReadRGBAPixels)( GLcontext *ctx,
+static void TAG(ReadRGBAPixels)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, const GLint x[], const GLint y[],
void *values )
diff --git a/src/mesa/drivers/dri/common/stenciltmp.h b/src/mesa/drivers/dri/common/stenciltmp.h
index 2b10b9ecfe7..fef09720895 100644
--- a/src/mesa/drivers/dri/common/stenciltmp.h
+++ b/src/mesa/drivers/dri/common/stenciltmp.h
@@ -13,7 +13,7 @@
#define HAVE_HW_STENCIL_PIXELS 0
#endif
-static void TAG(WriteStencilSpan)( GLcontext *ctx,
+static void TAG(WriteStencilSpan)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const void *values, const GLubyte mask[] )
@@ -64,7 +64,7 @@ static void TAG(WriteStencilSpan)( GLcontext *ctx,
#if HAVE_HW_STENCIL_SPANS
/* implement MonoWriteDepthSpan() in terms of WriteDepthSpan() */
static void
-TAG(WriteMonoStencilSpan)( GLcontext *ctx, struct gl_renderbuffer *rb,
+TAG(WriteMonoStencilSpan)( struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const void *value, const GLubyte mask[] )
{
@@ -76,7 +76,7 @@ TAG(WriteMonoStencilSpan)( GLcontext *ctx, struct gl_renderbuffer *rb,
TAG(WriteStencilSpan)(ctx, rb, n, x, y, stens, mask);
}
#else /* HAVE_HW_STENCIL_SPANS */
-static void TAG(WriteMonoStencilSpan)( GLcontext *ctx,
+static void TAG(WriteMonoStencilSpan)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const void *value,
@@ -118,7 +118,7 @@ static void TAG(WriteMonoStencilSpan)( GLcontext *ctx,
#endif /* !HAVE_HW_STENCIL_SPANS */
-static void TAG(WriteStencilPixels)( GLcontext *ctx,
+static void TAG(WriteStencilPixels)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n,
const GLint x[], const GLint y[],
@@ -157,7 +157,7 @@ static void TAG(WriteStencilPixels)( GLcontext *ctx,
/* Read stencil spans and pixels
*/
-static void TAG(ReadStencilSpan)( GLcontext *ctx,
+static void TAG(ReadStencilSpan)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
void *values)
@@ -190,7 +190,7 @@ static void TAG(ReadStencilSpan)( GLcontext *ctx,
HW_READ_UNLOCK();
}
-static void TAG(ReadStencilPixels)( GLcontext *ctx,
+static void TAG(ReadStencilPixels)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, const GLint x[], const GLint y[],
void *values )
diff --git a/src/mesa/drivers/dri/common/texmem.c b/src/mesa/drivers/dri/common/texmem.c
index 895139b55b8..8eec07d5bcc 100644
--- a/src/mesa/drivers/dri/common/texmem.c
+++ b/src/mesa/drivers/dri/common/texmem.c
@@ -89,7 +89,7 @@ driLog2( GLuint n )
*/
GLboolean
-driIsTextureResident( GLcontext * ctx,
+driIsTextureResident( struct gl_context * ctx,
struct gl_texture_object * texObj )
{
driTextureObject * t;
@@ -1047,7 +1047,7 @@ driCalculateMaxTextureLevels( driTexHeap * const * heaps,
* \param targets Bit-mask of value texture targets
*/
-void driInitTextureObjects( GLcontext *ctx, driTextureObject * swapped,
+void driInitTextureObjects( struct gl_context *ctx, driTextureObject * swapped,
GLuint targets )
{
struct gl_texture_object *texObj;
diff --git a/src/mesa/drivers/dri/common/texmem.h b/src/mesa/drivers/dri/common/texmem.h
index 725ba2e1196..6dd07b8a1da 100644
--- a/src/mesa/drivers/dri/common/texmem.h
+++ b/src/mesa/drivers/dri/common/texmem.h
@@ -277,7 +277,7 @@ void driDestroyTextureObject( driTextureObject * t );
int driAllocateTexture( driTexHeap * const * heap_array, unsigned nr_heaps,
driTextureObject * t );
-GLboolean driIsTextureResident( GLcontext * ctx,
+GLboolean driIsTextureResident( struct gl_context * ctx,
struct gl_texture_object * texObj );
driTexHeap * driCreateTextureHeap( unsigned heap_id, void * context,
@@ -309,7 +309,7 @@ driSetTextureSwapCounterLocation( driTexHeap * heap, unsigned * counter );
#define DRI_TEXMGR_DO_TEXTURE_CUBE 0x0008
#define DRI_TEXMGR_DO_TEXTURE_RECT 0x0010
-void driInitTextureObjects( GLcontext *ctx, driTextureObject * swapped,
+void driInitTextureObjects( struct gl_context *ctx, driTextureObject * swapped,
GLuint targets );
GLboolean driValidateTextureHeaps( driTexHeap * const * texture_heaps,
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index 0685d2f0e61..c195c4fd8f5 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -198,7 +198,7 @@ static const struct dri_extension all_mesa_extensions[] = {
* we need to add entry-points (via \c driInitSingleExtension) for those
* new functions here.
*/
-void driInitExtensions( GLcontext * ctx,
+void driInitExtensions( struct gl_context * ctx,
const struct dri_extension * extensions_to_enable,
GLboolean enable_imaging )
{
@@ -239,7 +239,7 @@ void driInitExtensions( GLcontext * ctx,
*
* \sa driInitExtensions, _mesa_enable_extension, _mesa_map_function_array
*/
-void driInitSingleExtension( GLcontext * ctx,
+void driInitSingleExtension( struct gl_context * ctx,
const struct dri_extension * ext )
{
if ( ext->functions != NULL ) {
@@ -337,7 +337,7 @@ driCheckDriDdxDrmVersions2(const char * driver_name,
drmActual, drmExpected);
}
-GLboolean driClipRectToFramebuffer( const GLframebuffer *buffer,
+GLboolean driClipRectToFramebuffer( const struct gl_framebuffer *buffer,
GLint *x, GLint *y,
GLsizei *width, GLsizei *height )
{
@@ -371,14 +371,14 @@ GLboolean driClipRectToFramebuffer( const GLframebuffer *buffer,
}
/**
- * Creates a set of \c __GLcontextModes that a driver will expose.
+ * Creates a set of \c struct gl_config that a driver will expose.
*
- * A set of \c __GLcontextModes will be created based on the supplied
+ * A set of \c struct gl_config will be created based on the supplied
* parameters. The number of modes processed will be 2 *
* \c num_depth_stencil_bits * \c num_db_modes.
*
* For the most part, data is just copied from \c depth_bits, \c stencil_bits,
- * \c db_modes, and \c visType into each \c __GLcontextModes element.
+ * \c db_modes, and \c visType into each \c struct gl_config element.
* However, the meanings of \c fb_format and \c fb_type require further
* explanation. The \c fb_format specifies which color components are in
* each pixel and what the default order is. For example, \c GL_RGB specifies
@@ -391,7 +391,7 @@ GLboolean driClipRectToFramebuffer( const GLframebuffer *buffer,
*
* One sublte issue is the combination of \c GL_RGB or \c GL_BGR and either
* of the \c GL_UNSIGNED_INT_8_8_8_8 modes. The resulting mask values in the
- * \c __GLcontextModes structure is \b identical to the \c GL_RGBA or
+ * \c struct gl_config structure is \b identical to the \c GL_RGBA or
* \c GL_BGRA case, except the \c alphaMask is zero. This means that, as
* far as this routine is concerned, \c GL_RGB with \c GL_UNSIGNED_INT_8_8_8_8
* still uses 32-bits.
@@ -399,7 +399,7 @@ GLboolean driClipRectToFramebuffer( const GLframebuffer *buffer,
* If in doubt, look at the tables used in the function.
*
* \param ptr_to_modes Pointer to a pointer to a linked list of
- * \c __GLcontextModes. Upon completion, a pointer to
+ * \c struct gl_config. Upon completion, a pointer to
* the next element to be process will be stored here.
* If the function fails and returns \c GL_FALSE, this
* value will be unmodified, but some elements in the
@@ -505,7 +505,7 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type,
const uint32_t * masks;
int index;
__DRIconfig **configs, **c;
- __GLcontextModes *modes;
+ struct gl_config *modes;
unsigned i, j, k, h;
unsigned num_modes;
unsigned num_accum_bits = (enable_accum) ? 2 : 1;
@@ -620,9 +620,6 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type,
modes->transparentBlue = GLX_DONT_CARE;
modes->transparentAlpha = GLX_DONT_CARE;
modes->transparentIndex = GLX_DONT_CARE;
- modes->visualType = GLX_DONT_CARE;
- modes->renderType = GLX_RGBA_BIT;
- modes->drawableType = GLX_WINDOW_BIT;
modes->rgbMode = GL_TRUE;
if ( db_modes[i] == GLX_NONE ) {
@@ -688,7 +685,7 @@ __DRIconfig **driConcatConfigs(__DRIconfig **a,
}
#define __ATTRIB(attrib, field) \
- { attrib, offsetof(__GLcontextModes, field) }
+ { attrib, offsetof(struct gl_config, field) }
static const struct { unsigned int attrib, offset; } attribMap[] = {
__ATTRIB(__DRI_ATTRIB_BUFFER_SIZE, rgbBits),
diff --git a/src/mesa/drivers/dri/common/utils.h b/src/mesa/drivers/dri/common/utils.h
index de6070c3987..6349fb4b95c 100644
--- a/src/mesa/drivers/dri/common/utils.h
+++ b/src/mesa/drivers/dri/common/utils.h
@@ -78,10 +78,10 @@ extern unsigned driParseDebugString( const char * debug,
extern unsigned driGetRendererString( char * buffer,
const char * hardware_name, const char * driver_date, GLuint agp_mode );
-extern void driInitExtensions( GLcontext * ctx,
+extern void driInitExtensions( struct gl_context * ctx,
const struct dri_extension * card_extensions, GLboolean enable_imaging );
-extern void driInitSingleExtension( GLcontext * ctx,
+extern void driInitSingleExtension( struct gl_context * ctx,
const struct dri_extension * ext );
extern GLboolean driCheckDriDdxDrmVersions2(const char * driver_name,
@@ -94,12 +94,12 @@ extern GLboolean driCheckDriDdxDrmVersions3(const char * driver_name,
const __DRIversion * ddxActual, const __DRIutilversion2 * ddxExpected,
const __DRIversion * drmActual, const __DRIversion * drmExpected);
-extern GLboolean driClipRectToFramebuffer( const GLframebuffer *buffer,
+extern GLboolean driClipRectToFramebuffer( const struct gl_framebuffer *buffer,
GLint *x, GLint *y,
GLsizei *width, GLsizei *height );
struct __DRIconfigRec {
- __GLcontextModes modes;
+ struct gl_config modes;
};
extern __DRIconfig **
diff --git a/src/mesa/drivers/dri/common/xmlpool/Makefile b/src/mesa/drivers/dri/common/xmlpool/Makefile
index 62ec919ea68..b71629e9f16 100644
--- a/src/mesa/drivers/dri/common/xmlpool/Makefile
+++ b/src/mesa/drivers/dri/common/xmlpool/Makefile
@@ -62,7 +62,7 @@ clean:
# Default target options.h
options.h: t_options.h mo
- python gen_xmlpool.py $(LANGS) > options.h
+ $(PYTHON2) $(PYTHON_FLAGS) gen_xmlpool.py $(LANGS) > options.h
# Update .mo files from the corresponding .po files.
mo:
diff --git a/src/mesa/drivers/dri/i810/i810context.c b/src/mesa/drivers/dri/i810/i810context.c
index 8f52c20c2de..dc58e91e8c1 100644
--- a/src/mesa/drivers/dri/i810/i810context.c
+++ b/src/mesa/drivers/dri/i810/i810context.c
@@ -69,7 +69,7 @@ const GLuint __driNConfigOptions = 0;
#define DRIVER_DATE "20050821"
-static const GLubyte *i810GetString( GLcontext *ctx, GLenum name )
+static const GLubyte *i810GetString( struct gl_context *ctx, GLenum name )
{
static char buffer[128];
@@ -96,7 +96,7 @@ static const GLubyte *i810GetString( GLcontext *ctx, GLenum name )
}
}
-static void i810BufferSize(GLframebuffer *buffer, GLuint *width, GLuint *height)
+static void i810BufferSize(struct gl_framebuffer *buffer, GLuint *width, GLuint *height)
{
GET_CURRENT_CONTEXT(ctx);
i810ContextPtr imesa = I810_CONTEXT(ctx);
@@ -166,11 +166,11 @@ static const struct dri_debug_control debug_control[] =
GLboolean
i810CreateContext( gl_api api,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate )
{
- GLcontext *ctx, *shareCtx;
+ struct gl_context *ctx, *shareCtx;
i810ContextPtr imesa;
__DRIscreen *sPriv = driContextPriv->driScreenPriv;
i810ScreenPrivate *i810Screen = (i810ScreenPrivate *)sPriv->private;
@@ -268,7 +268,7 @@ i810CreateContext( gl_api api,
ctx->Const.PointSizeGranularity = 1.0;
/* reinitialize the context point state.
- * It depend on constants in __GLcontextRec::Const
+ * It depend on constants in __struct gl_contextRec::Const
*/
_mesa_init_point(ctx);
@@ -453,8 +453,8 @@ i810MakeCurrent(__DRIcontext *driContextPriv,
imesa->driDrawable = driDrawPriv;
_mesa_make_current(imesa->glCtx,
- (GLframebuffer *) driDrawPriv->driverPrivate,
- (GLframebuffer *) driReadPriv->driverPrivate);
+ (struct gl_framebuffer *) driDrawPriv->driverPrivate,
+ (struct gl_framebuffer *) driReadPriv->driverPrivate);
/* Are these necessary?
*/
@@ -470,7 +470,7 @@ i810MakeCurrent(__DRIcontext *driContextPriv,
static void
i810UpdatePageFlipping( i810ContextPtr imesa )
{
- GLcontext *ctx = imesa->glCtx;
+ struct gl_context *ctx = imesa->glCtx;
int front = 0;
/* Determine current color drawing buffer */
@@ -552,7 +552,7 @@ i810SwapBuffers( __DRIdrawable *dPriv )
{
if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) {
i810ContextPtr imesa;
- GLcontext *ctx;
+ struct gl_context *ctx;
imesa = (i810ContextPtr) dPriv->driContextPriv->driverPrivate;
ctx = imesa->glCtx;
if (ctx->Visual.doubleBufferMode) {
diff --git a/src/mesa/drivers/dri/i810/i810context.h b/src/mesa/drivers/dri/i810/i810context.h
index 19529db0200..93c7eda7b38 100644
--- a/src/mesa/drivers/dri/i810/i810context.h
+++ b/src/mesa/drivers/dri/i810/i810context.h
@@ -79,7 +79,7 @@ typedef void (*i810_point_func)( i810ContextPtr, i810Vertex * );
struct i810_context_t {
GLint refcount;
- GLcontext *glCtx;
+ struct gl_context *glCtx;
/* Texture object bookkeeping
*/
@@ -146,7 +146,7 @@ struct i810_context_t {
/* DRI stuff
*/
GLuint needClip;
- GLframebuffer *glBuffer;
+ struct gl_framebuffer *glBuffer;
GLboolean doPageFlip;
/* These refer to the current draw (front vs. back) buffer:
diff --git a/src/mesa/drivers/dri/i810/i810ioctl.c b/src/mesa/drivers/dri/i810/i810ioctl.c
index c631543d933..4b004d54c65 100644
--- a/src/mesa/drivers/dri/i810/i810ioctl.c
+++ b/src/mesa/drivers/dri/i810/i810ioctl.c
@@ -47,7 +47,7 @@ static drmBufPtr i810_get_buffer_ioctl( i810ContextPtr imesa )
#define DEPTH_SCALE ((1<<16)-1)
-static void i810Clear( GLcontext *ctx, GLbitfield mask )
+static void i810Clear( struct gl_context *ctx, GLbitfield mask )
{
i810ContextPtr imesa = I810_CONTEXT( ctx );
__DRIdrawable *dPriv = imesa->driDrawable;
@@ -499,13 +499,13 @@ int i810_check_copy(int fd)
return(drmCommandNone(fd, DRM_I810_DOCOPY));
}
-static void i810Flush( GLcontext *ctx )
+static void i810Flush( struct gl_context *ctx )
{
i810ContextPtr imesa = I810_CONTEXT( ctx );
I810_FIREVERTICES( imesa );
}
-static void i810Finish( GLcontext *ctx )
+static void i810Finish( struct gl_context *ctx )
{
i810ContextPtr imesa = I810_CONTEXT( ctx );
i810DmaFinish( imesa );
diff --git a/src/mesa/drivers/dri/i810/i810render.c b/src/mesa/drivers/dri/i810/i810render.c
index 205f0cebc1c..45f0954bbe2 100644
--- a/src/mesa/drivers/dri/i810/i810render.c
+++ b/src/mesa/drivers/dri/i810/i810render.c
@@ -124,7 +124,7 @@ static const GLenum reduced_prim[GL_POLYGON+1] = {
/**********************************************************************/
-static GLboolean i810_run_render( GLcontext *ctx,
+static GLboolean i810_run_render( struct gl_context *ctx,
struct tnl_pipeline_stage *stage )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/i810/i810screen.c b/src/mesa/drivers/dri/i810/i810screen.c
index 56708c97cbb..fc56b61b4e6 100644
--- a/src/mesa/drivers/dri/i810/i810screen.c
+++ b/src/mesa/drivers/dri/i810/i810screen.c
@@ -55,7 +55,7 @@ i810FillInModes( __DRIscreen *psp,
unsigned stencil_bits, GLboolean have_back_buffer )
{
__DRIconfig **configs;
- __GLcontextModes * m;
+ struct gl_config * m;
unsigned depth_buffer_factor;
unsigned back_buffer_factor;
unsigned i;
@@ -272,7 +272,7 @@ i810DestroyScreen(__DRIscreen *sPriv)
static GLboolean
i810CreateBuffer( __DRIscreen *driScrnPriv,
__DRIdrawable *driDrawPriv,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
GLboolean isPixmap )
{
i810ScreenPrivate *screen = (i810ScreenPrivate *) driScrnPriv->private;
@@ -333,7 +333,7 @@ i810CreateBuffer( __DRIscreen *driScrnPriv,
static void
i810DestroyBuffer(__DRIdrawable *driDrawPriv)
{
- _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
+ _mesa_reference_framebuffer((struct gl_framebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
}
const struct __DriverAPIRec driDriverAPI = {
diff --git a/src/mesa/drivers/dri/i810/i810screen.h b/src/mesa/drivers/dri/i810/i810screen.h
index fe6db7e6e1c..25c1072ce06 100644
--- a/src/mesa/drivers/dri/i810/i810screen.h
+++ b/src/mesa/drivers/dri/i810/i810screen.h
@@ -79,7 +79,7 @@ typedef struct {
extern GLboolean
i810CreateContext( gl_api api,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate );
diff --git a/src/mesa/drivers/dri/i810/i810span.c b/src/mesa/drivers/dri/i810/i810span.c
index 6576f6745ea..dddab8bb51e 100644
--- a/src/mesa/drivers/dri/i810/i810span.c
+++ b/src/mesa/drivers/dri/i810/i810span.c
@@ -81,7 +81,7 @@ do { \
/* Move locking out to get reasonable span performance.
*/
-void i810SpanRenderStart( GLcontext *ctx )
+void i810SpanRenderStart( struct gl_context *ctx )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
I810_FIREVERTICES(imesa);
@@ -89,14 +89,14 @@ void i810SpanRenderStart( GLcontext *ctx )
i810RegetLockQuiescent( imesa );
}
-void i810SpanRenderFinish( GLcontext *ctx )
+void i810SpanRenderFinish( struct gl_context *ctx )
{
i810ContextPtr imesa = I810_CONTEXT( ctx );
_swrast_flush( ctx );
UNLOCK_HARDWARE( imesa );
}
-void i810InitSpanFuncs( GLcontext *ctx )
+void i810InitSpanFuncs( struct gl_context *ctx )
{
struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference(ctx);
swdd->SpanRenderStart = i810SpanRenderStart;
@@ -109,7 +109,7 @@ void i810InitSpanFuncs( GLcontext *ctx )
* Plug in the Get/Put routines for the given driRenderbuffer.
*/
void
-i810SetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis)
+i810SetSpanFunctions(driRenderbuffer *drb, const struct gl_config *vis)
{
if (drb->Base.InternalFormat == GL_RGBA) {
/* always 565 RGB */
diff --git a/src/mesa/drivers/dri/i810/i810span.h b/src/mesa/drivers/dri/i810/i810span.h
index 9aed253bd54..184a37a103b 100644
--- a/src/mesa/drivers/dri/i810/i810span.h
+++ b/src/mesa/drivers/dri/i810/i810span.h
@@ -3,12 +3,12 @@
#include "drirenderbuffer.h"
-extern void i810InitSpanFuncs( GLcontext *ctx );
+extern void i810InitSpanFuncs( struct gl_context *ctx );
-extern void i810SpanRenderFinish( GLcontext *ctx );
-extern void i810SpanRenderStart( GLcontext *ctx );
+extern void i810SpanRenderFinish( struct gl_context *ctx );
+extern void i810SpanRenderStart( struct gl_context *ctx );
extern void
-i810SetSpanFunctions(driRenderbuffer *rb, const GLvisual *vis);
+i810SetSpanFunctions(driRenderbuffer *rb, const struct gl_config *vis);
#endif
diff --git a/src/mesa/drivers/dri/i810/i810state.c b/src/mesa/drivers/dri/i810/i810state.c
index 0c68e120b02..7c3fbb1424d 100644
--- a/src/mesa/drivers/dri/i810/i810state.c
+++ b/src/mesa/drivers/dri/i810/i810state.c
@@ -43,7 +43,7 @@ static INLINE GLuint i810PackColor(GLuint format,
}
-static void i810AlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref)
+static void i810AlphaFunc(struct gl_context *ctx, GLenum func, GLfloat ref)
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
GLuint a = (ZA_UPDATE_ALPHAFUNC|ZA_UPDATE_ALPHAREF);
@@ -70,7 +70,7 @@ static void i810AlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref)
imesa->Setup[I810_CTXREG_ZA] |= a;
}
-static void i810BlendEquationSeparate(GLcontext *ctx,
+static void i810BlendEquationSeparate(struct gl_context *ctx,
GLenum modeRGB, GLenum modeA)
{
assert( modeRGB == modeA );
@@ -87,7 +87,7 @@ static void i810BlendEquationSeparate(GLcontext *ctx,
ctx->Color.LogicOp != GL_COPY));
}
-static void i810BlendFuncSeparate( GLcontext *ctx, GLenum sfactorRGB,
+static void i810BlendFuncSeparate( struct gl_context *ctx, GLenum sfactorRGB,
GLenum dfactorRGB, GLenum sfactorA,
GLenum dfactorA )
{
@@ -156,7 +156,7 @@ static void i810BlendFuncSeparate( GLcontext *ctx, GLenum sfactorRGB,
-static void i810DepthFunc(GLcontext *ctx, GLenum func)
+static void i810DepthFunc(struct gl_context *ctx, GLenum func)
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
int zmode;
@@ -178,7 +178,7 @@ static void i810DepthFunc(GLcontext *ctx, GLenum func)
imesa->Setup[I810_CTXREG_LCS] |= zmode;
}
-static void i810DepthMask(GLcontext *ctx, GLboolean flag)
+static void i810DepthMask(struct gl_context *ctx, GLboolean flag)
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
I810_STATECHANGE(imesa, I810_UPLOAD_CTX);
@@ -196,7 +196,7 @@ static void i810DepthMask(GLcontext *ctx, GLboolean flag)
* The i810 supports a 4x4 stipple natively, GL wants 32x32.
* Fortunately stipple is usually a repeating pattern.
*/
-static void i810PolygonStipple( GLcontext *ctx, const GLubyte *mask )
+static void i810PolygonStipple( struct gl_context *ctx, const GLubyte *mask )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
const GLubyte *m = mask;
@@ -250,7 +250,7 @@ static void i810PolygonStipple( GLcontext *ctx, const GLubyte *mask )
*/
-static void i810Scissor( GLcontext *ctx, GLint x, GLint y,
+static void i810Scissor( struct gl_context *ctx, GLint x, GLint y,
GLsizei w, GLsizei h )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
@@ -267,7 +267,7 @@ static void i810Scissor( GLcontext *ctx, GLint x, GLint y,
}
-static void i810LogicOp( GLcontext *ctx, GLenum opcode )
+static void i810LogicOp( struct gl_context *ctx, GLenum opcode )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
FALLBACK( imesa, I810_FALLBACK_LOGICOP,
@@ -276,14 +276,14 @@ static void i810LogicOp( GLcontext *ctx, GLenum opcode )
/* Fallback to swrast for select and feedback.
*/
-static void i810RenderMode( GLcontext *ctx, GLenum mode )
+static void i810RenderMode( struct gl_context *ctx, GLenum mode )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
FALLBACK( imesa, I810_FALLBACK_RENDERMODE, (mode != GL_RENDER) );
}
-void i810DrawBuffer(GLcontext *ctx, GLenum mode )
+void i810DrawBuffer(struct gl_context *ctx, GLenum mode )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
int front = 0;
@@ -328,13 +328,13 @@ void i810DrawBuffer(GLcontext *ctx, GLenum mode )
}
-static void i810ReadBuffer(GLcontext *ctx, GLenum mode )
+static void i810ReadBuffer(struct gl_context *ctx, GLenum mode )
{
/* XXX anything? */
}
-static void i810ClearColor(GLcontext *ctx, const GLfloat color[4] )
+static void i810ClearColor(struct gl_context *ctx, const GLfloat color[4] )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
GLubyte c[4];
@@ -351,7 +351,7 @@ static void i810ClearColor(GLcontext *ctx, const GLfloat color[4] )
* Culling - the i810 isn't quite as clean here as the rest of
* its interfaces, but it's not bad.
*/
-static void i810CullFaceFrontFace(GLcontext *ctx, GLenum unused)
+static void i810CullFaceFrontFace(struct gl_context *ctx, GLenum unused)
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
GLuint mode = LCS_CULL_BOTH;
@@ -375,7 +375,7 @@ static void i810CullFaceFrontFace(GLcontext *ctx, GLenum unused)
}
-static void i810LineWidth( GLcontext *ctx, GLfloat widthf )
+static void i810LineWidth( struct gl_context *ctx, GLfloat widthf )
{
i810ContextPtr imesa = I810_CONTEXT( ctx );
/* AA, non-AA limits are same */
@@ -394,7 +394,7 @@ static void i810LineWidth( GLcontext *ctx, GLfloat widthf )
}
}
-static void i810PointSize( GLcontext *ctx, GLfloat sz )
+static void i810PointSize( struct gl_context *ctx, GLfloat sz )
{
i810ContextPtr imesa = I810_CONTEXT( ctx );
/* AA, non-AA limits are same */
@@ -417,7 +417,7 @@ static void i810PointSize( GLcontext *ctx, GLfloat sz )
* Color masks
*/
-static void i810ColorMask(GLcontext *ctx,
+static void i810ColorMask(struct gl_context *ctx,
GLboolean r, GLboolean g,
GLboolean b, GLboolean a )
{
@@ -444,7 +444,7 @@ static void i810ColorMask(GLcontext *ctx,
/* Seperate specular not fully implemented on the i810.
*/
-static void i810LightModelfv(GLcontext *ctx, GLenum pname,
+static void i810LightModelfv(struct gl_context *ctx, GLenum pname,
const GLfloat *param)
{
if (pname == GL_LIGHT_MODEL_COLOR_CONTROL)
@@ -458,7 +458,7 @@ static void i810LightModelfv(GLcontext *ctx, GLenum pname,
/* But the 815 has it...
*/
-static void i810LightModelfv_i815(GLcontext *ctx, GLenum pname,
+static void i810LightModelfv_i815(struct gl_context *ctx, GLenum pname,
const GLfloat *param)
{
if (pname == GL_LIGHT_MODEL_COLOR_CONTROL)
@@ -475,7 +475,7 @@ static void i810LightModelfv_i815(GLcontext *ctx, GLenum pname,
/* In Mesa 3.5 we can reliably do native flatshading.
*/
-static void i810ShadeModel(GLcontext *ctx, GLenum mode)
+static void i810ShadeModel(struct gl_context *ctx, GLenum mode)
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
I810_STATECHANGE(imesa, I810_UPLOAD_CTX);
@@ -490,7 +490,7 @@ static void i810ShadeModel(GLcontext *ctx, GLenum mode)
/* =============================================================
* Fog
*/
-static void i810Fogfv(GLcontext *ctx, GLenum pname, const GLfloat *param)
+static void i810Fogfv(struct gl_context *ctx, GLenum pname, const GLfloat *param)
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
@@ -508,7 +508,7 @@ static void i810Fogfv(GLcontext *ctx, GLenum pname, const GLfloat *param)
/* =============================================================
*/
-static void i810Enable(GLcontext *ctx, GLenum cap, GLboolean state)
+static void i810Enable(struct gl_context *ctx, GLenum cap, GLboolean state)
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
@@ -672,7 +672,7 @@ void i810EmitDrawingRectangle( i810ContextPtr imesa )
-static void i810CalcViewport( GLcontext *ctx )
+static void i810CalcViewport( struct gl_context *ctx )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
const GLfloat *v = ctx->Viewport._WindowMap.m;
@@ -689,14 +689,14 @@ static void i810CalcViewport( GLcontext *ctx )
m[MAT_TZ] = v[MAT_TZ] * (1.0 / 0xffff);
}
-static void i810Viewport( GLcontext *ctx,
+static void i810Viewport( struct gl_context *ctx,
GLint x, GLint y,
GLsizei width, GLsizei height )
{
i810CalcViewport( ctx );
}
-static void i810DepthRange( GLcontext *ctx,
+static void i810DepthRange( struct gl_context *ctx,
GLclampd nearval, GLclampd farval )
{
i810CalcViewport( ctx );
@@ -718,7 +718,7 @@ void i810PrintDirty( const char *msg, GLuint state )
-void i810InitState( GLcontext *ctx )
+void i810InitState( struct gl_context *ctx )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
i810ScreenPrivate *i810Screen = imesa->i810Screen;
@@ -953,7 +953,7 @@ void i810InitState( GLcontext *ctx )
}
-static void i810InvalidateState( GLcontext *ctx, GLuint new_state )
+static void i810InvalidateState( struct gl_context *ctx, GLuint new_state )
{
_swrast_InvalidateState( ctx, new_state );
_swsetup_InvalidateState( ctx, new_state );
@@ -963,7 +963,7 @@ static void i810InvalidateState( GLcontext *ctx, GLuint new_state )
}
-void i810InitStateFuncs(GLcontext *ctx)
+void i810InitStateFuncs(struct gl_context *ctx)
{
/* Callbacks for internal Mesa events.
*/
diff --git a/src/mesa/drivers/dri/i810/i810state.h b/src/mesa/drivers/dri/i810/i810state.h
index 118b075491b..96af1237651 100644
--- a/src/mesa/drivers/dri/i810/i810state.h
+++ b/src/mesa/drivers/dri/i810/i810state.h
@@ -3,10 +3,10 @@
#include "i810context.h"
-extern void i810InitState( GLcontext *ctx );
-extern void i810InitStateFuncs( GLcontext *ctx );
+extern void i810InitState( struct gl_context *ctx );
+extern void i810InitStateFuncs( struct gl_context *ctx );
extern void i810PrintDirty( const char *msg, GLuint state );
-extern void i810DrawBuffer(GLcontext *ctx, GLenum mode );
+extern void i810DrawBuffer(struct gl_context *ctx, GLenum mode );
extern void i810Fallback( i810ContextPtr imesa, GLuint bit, GLboolean mode );
#define FALLBACK( imesa, bit, mode ) i810Fallback( imesa, bit, mode )
diff --git a/src/mesa/drivers/dri/i810/i810tex.c b/src/mesa/drivers/dri/i810/i810tex.c
index 5c5c80d16d3..49364aeb225 100644
--- a/src/mesa/drivers/dri/i810/i810tex.c
+++ b/src/mesa/drivers/dri/i810/i810tex.c
@@ -166,7 +166,7 @@ i810SetTexBorderColor( i810TextureObjectPtr t, const GLfloat color[4] )
static i810TextureObjectPtr
-i810AllocTexObj( GLcontext *ctx, struct gl_texture_object *texObj )
+i810AllocTexObj( struct gl_context *ctx, struct gl_texture_object *texObj )
{
i810TextureObjectPtr t;
i810ContextPtr imesa = I810_CONTEXT(ctx);
@@ -214,7 +214,7 @@ i810AllocTexObj( GLcontext *ctx, struct gl_texture_object *texObj )
}
-static void i810TexParameter( GLcontext *ctx, GLenum target,
+static void i810TexParameter( struct gl_context *ctx, GLenum target,
struct gl_texture_object *tObj,
GLenum pname, const GLfloat *params )
{
@@ -285,7 +285,7 @@ static void i810TexParameter( GLcontext *ctx, GLenum target,
* Determine whether or not \c param can be used instead of
* \c texUnit->EnvColor in the \c GL_TEXTURE_ENV_COLOR case.
*/
-static void i810TexEnv( GLcontext *ctx, GLenum target,
+static void i810TexEnv( struct gl_context *ctx, GLenum target,
GLenum pname, const GLfloat *param )
{
i810ContextPtr imesa = I810_CONTEXT( ctx );
@@ -333,7 +333,7 @@ static void i810TexEnv( GLcontext *ctx, GLenum target,
#if 0
-static void i810TexImage1D( GLcontext *ctx, GLenum target, GLint level,
+static void i810TexImage1D( struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint border,
GLenum format, GLenum type,
@@ -348,7 +348,7 @@ static void i810TexImage1D( GLcontext *ctx, GLenum target, GLint level,
}
}
-static void i810TexSubImage1D( GLcontext *ctx,
+static void i810TexSubImage1D( struct gl_context *ctx,
GLenum target,
GLint level,
GLint xoffset,
@@ -363,7 +363,7 @@ static void i810TexSubImage1D( GLcontext *ctx,
#endif
-static void i810TexImage2D( GLcontext *ctx, GLenum target, GLint level,
+static void i810TexImage2D( struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -388,7 +388,7 @@ static void i810TexImage2D( GLcontext *ctx, GLenum target, GLint level,
pixels, packing, texObj, texImage );
}
-static void i810TexSubImage2D( GLcontext *ctx,
+static void i810TexSubImage2D( struct gl_context *ctx,
GLenum target,
GLint level,
GLint xoffset, GLint yoffset,
@@ -410,14 +410,14 @@ static void i810TexSubImage2D( GLcontext *ctx,
}
-static void i810BindTexture( GLcontext *ctx, GLenum target,
+static void i810BindTexture( struct gl_context *ctx, GLenum target,
struct gl_texture_object *tObj )
{
assert( (target != GL_TEXTURE_2D) || (tObj->DriverData != NULL) );
}
-static void i810DeleteTexture( GLcontext *ctx, struct gl_texture_object *tObj )
+static void i810DeleteTexture( struct gl_context *ctx, struct gl_texture_object *tObj )
{
driTextureObject * t = (driTextureObject *) tObj->DriverData;
if (t) {
@@ -437,7 +437,7 @@ static void i810DeleteTexture( GLcontext *ctx, struct gl_texture_object *tObj )
* makes this routine pretty simple.
*/
static gl_format
-i810ChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
+i810ChooseTextureFormat( struct gl_context *ctx, GLint internalFormat,
GLenum format, GLenum type )
{
switch ( internalFormat ) {
@@ -524,7 +524,7 @@ i810ChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
* texture object from the core mesa gl_texture_object. Not done at this time.
*/
static struct gl_texture_object *
-i810NewTextureObject( GLcontext *ctx, GLuint name, GLenum target )
+i810NewTextureObject( struct gl_context *ctx, GLuint name, GLenum target )
{
struct gl_texture_object *obj;
obj = _mesa_new_texture_object(ctx, name, target);
diff --git a/src/mesa/drivers/dri/i810/i810tex.h b/src/mesa/drivers/dri/i810/i810tex.h
index 28958dcb4b2..b396848b79f 100644
--- a/src/mesa/drivers/dri/i810/i810tex.h
+++ b/src/mesa/drivers/dri/i810/i810tex.h
@@ -68,7 +68,7 @@ struct i810_texture_object_t {
};
-void i810UpdateTextureState( GLcontext *ctx );
+void i810UpdateTextureState( struct gl_context *ctx );
void i810InitTextureFuncs( struct dd_function_table *functions );
void i810DestroyTexObj( i810ContextPtr imesa, i810TextureObjectPtr t );
diff --git a/src/mesa/drivers/dri/i810/i810texstate.c b/src/mesa/drivers/dri/i810/i810texstate.c
index bff28c11c89..5b505e71a48 100644
--- a/src/mesa/drivers/dri/i810/i810texstate.c
+++ b/src/mesa/drivers/dri/i810/i810texstate.c
@@ -191,7 +191,7 @@ static const unsigned operand_modifiers[] = {
* a reasonable place to make note of it.
*/
static GLboolean
-i810UpdateTexEnvCombine( GLcontext *ctx, GLuint unit,
+i810UpdateTexEnvCombine( struct gl_context *ctx, GLuint unit,
int * color_stage, int * alpha_stage )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
@@ -533,7 +533,7 @@ i810UpdateTexEnvCombine( GLcontext *ctx, GLuint unit,
return GL_TRUE;
}
-static GLboolean enable_tex_common( GLcontext *ctx, GLuint unit )
+static GLboolean enable_tex_common( struct gl_context *ctx, GLuint unit )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
@@ -570,7 +570,7 @@ static GLboolean enable_tex_common( GLcontext *ctx, GLuint unit )
return GL_TRUE;
}
-static GLboolean enable_tex_rect( GLcontext *ctx, GLuint unit )
+static GLboolean enable_tex_rect( struct gl_context *ctx, GLuint unit )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
@@ -590,7 +590,7 @@ static GLboolean enable_tex_rect( GLcontext *ctx, GLuint unit )
return GL_TRUE;
}
-static GLboolean enable_tex_2d( GLcontext *ctx, GLuint unit )
+static GLboolean enable_tex_2d( struct gl_context *ctx, GLuint unit )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
@@ -610,7 +610,7 @@ static GLboolean enable_tex_2d( GLcontext *ctx, GLuint unit )
return GL_TRUE;
}
-static void disable_tex( GLcontext *ctx, GLuint unit )
+static void disable_tex( struct gl_context *ctx, GLuint unit )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
@@ -627,7 +627,7 @@ static void disable_tex( GLcontext *ctx, GLuint unit )
* 1D textures should be supported! Just use a 2D texture with the second
* texture coordinate value fixed at 0.0.
*/
-static void i810UpdateTexUnit( GLcontext *ctx, GLuint unit,
+static void i810UpdateTexUnit( struct gl_context *ctx, GLuint unit,
int * next_color_stage, int * next_alpha_stage )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
@@ -664,7 +664,7 @@ static void i810UpdateTexUnit( GLcontext *ctx, GLuint unit,
}
-void i810UpdateTextureState( GLcontext *ctx )
+void i810UpdateTextureState( struct gl_context *ctx )
{
static const unsigned color_pass[3] = {
GFX_OP_MAP_COLOR_STAGES | MC_STAGE_0 | MC_UPDATE_DEST | MC_DEST_CURRENT
diff --git a/src/mesa/drivers/dri/i810/i810tris.c b/src/mesa/drivers/dri/i810/i810tris.c
index 1492f711c93..ec22a3deb36 100644
--- a/src/mesa/drivers/dri/i810/i810tris.c
+++ b/src/mesa/drivers/dri/i810/i810tris.c
@@ -49,7 +49,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "i810vb.h"
#include "i810ioctl.h"
-static void i810RenderPrimitive( GLcontext *ctx, GLenum prim );
+static void i810RenderPrimitive( struct gl_context *ctx, GLenum prim );
/***********************************************************************
* Emit primitives as inline vertices *
@@ -407,7 +407,7 @@ i810_fallback_tri( i810ContextPtr imesa,
i810Vertex *v1,
i810Vertex *v2 )
{
- GLcontext *ctx = imesa->glCtx;
+ struct gl_context *ctx = imesa->glCtx;
SWvertex v[3];
i810_translate_vertex( ctx, v0, &v[0] );
i810_translate_vertex( ctx, v1, &v[1] );
@@ -421,7 +421,7 @@ i810_fallback_line( i810ContextPtr imesa,
i810Vertex *v0,
i810Vertex *v1 )
{
- GLcontext *ctx = imesa->glCtx;
+ struct gl_context *ctx = imesa->glCtx;
SWvertex v[2];
i810_translate_vertex( ctx, v0, &v[0] );
i810_translate_vertex( ctx, v1, &v[1] );
@@ -433,7 +433,7 @@ static void
i810_fallback_point( i810ContextPtr imesa,
i810Vertex *v0 )
{
- GLcontext *ctx = imesa->glCtx;
+ struct gl_context *ctx = imesa->glCtx;
SWvertex v[1];
i810_translate_vertex( ctx, v0, &v[0] );
_swrast_Point( ctx, &v[0] );
@@ -478,7 +478,7 @@ i810_fallback_point( i810ContextPtr imesa,
-static void i810RenderClippedPoly( GLcontext *ctx, const GLuint *elts,
+static void i810RenderClippedPoly( struct gl_context *ctx, const GLuint *elts,
GLuint n )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
@@ -502,13 +502,13 @@ static void i810RenderClippedPoly( GLcontext *ctx, const GLuint *elts,
tnl->Driver.Render.PrimitiveNotify( ctx, prim );
}
-static void i810RenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj )
+static void i810RenderClippedLine( struct gl_context *ctx, GLuint ii, GLuint jj )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
tnl->Driver.Render.Line( ctx, ii, jj );
}
-static void i810FastRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
+static void i810FastRenderClippedPoly( struct gl_context *ctx, const GLuint *elts,
GLuint n )
{
i810ContextPtr imesa = I810_CONTEXT( ctx );
@@ -549,7 +549,7 @@ static void i810FastRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
DD_TRI_STIPPLE)
#define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET|DD_TRI_UNFILLED)
-static void i810ChooseRenderState(GLcontext *ctx)
+static void i810ChooseRenderState(struct gl_context *ctx)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
i810ContextPtr imesa = I810_CONTEXT(ctx);
@@ -640,7 +640,7 @@ static const GLenum reduced_prim[GL_POLYGON+1] = {
* which renders strips as strips, the equivalent calculations are
* performed in i810render.c.
*/
-static void i810RenderPrimitive( GLcontext *ctx, GLenum prim )
+static void i810RenderPrimitive( struct gl_context *ctx, GLenum prim )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
GLuint rprim = reduced_prim[prim];
@@ -656,7 +656,7 @@ static void i810RenderPrimitive( GLcontext *ctx, GLenum prim )
}
}
-static void i810RunPipeline( GLcontext *ctx )
+static void i810RunPipeline( struct gl_context *ctx )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
@@ -678,7 +678,7 @@ static void i810RunPipeline( GLcontext *ctx )
_tnl_run_pipeline( ctx );
}
-static void i810RenderStart( GLcontext *ctx )
+static void i810RenderStart( struct gl_context *ctx )
{
/* Check for projective textureing. Make sure all texcoord
* pointers point to something. (fix in mesa?)
@@ -686,7 +686,7 @@ static void i810RenderStart( GLcontext *ctx )
i810CheckTexSizes( ctx );
}
-static void i810RenderFinish( GLcontext *ctx )
+static void i810RenderFinish( struct gl_context *ctx )
{
if (I810_CONTEXT(ctx)->RenderIndex & I810_FALLBACK_BIT)
_swrast_flush( ctx );
@@ -698,7 +698,7 @@ static void i810RenderFinish( GLcontext *ctx )
/* System to flush dma and emit state changes based on the rasterized
* primitive.
*/
-void i810RasterPrimitive( GLcontext *ctx,
+void i810RasterPrimitive( struct gl_context *ctx,
GLenum rprim,
GLuint hwprim )
{
@@ -815,7 +815,7 @@ static char *getFallbackString(GLuint bit)
void i810Fallback( i810ContextPtr imesa, GLuint bit, GLboolean mode )
{
- GLcontext *ctx = imesa->glCtx;
+ struct gl_context *ctx = imesa->glCtx;
TNLcontext *tnl = TNL_CONTEXT(ctx);
GLuint oldfallback = imesa->Fallback;
@@ -853,7 +853,7 @@ void i810Fallback( i810ContextPtr imesa, GLuint bit, GLboolean mode )
/**********************************************************************/
-void i810InitTriFuncs( GLcontext *ctx )
+void i810InitTriFuncs( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
static int firsttime = 1;
diff --git a/src/mesa/drivers/dri/i810/i810tris.h b/src/mesa/drivers/dri/i810/i810tris.h
index ab026be0a51..07a0ebf69f3 100644
--- a/src/mesa/drivers/dri/i810/i810tris.h
+++ b/src/mesa/drivers/dri/i810/i810tris.h
@@ -29,7 +29,7 @@
#include "main/mtypes.h"
extern void i810PrintRenderState( const char *msg, GLuint state );
-extern void i810InitTriFuncs( GLcontext *ctx );
-extern void i810RasterPrimitive( GLcontext *ctx, GLenum rprim, GLuint hwprim );
+extern void i810InitTriFuncs( struct gl_context *ctx );
+extern void i810RasterPrimitive( struct gl_context *ctx, GLenum rprim, GLuint hwprim );
#endif
diff --git a/src/mesa/drivers/dri/i810/i810vb.c b/src/mesa/drivers/dri/i810/i810vb.c
index 70301a2d2ec..333e07c0eaa 100644
--- a/src/mesa/drivers/dri/i810/i810vb.c
+++ b/src/mesa/drivers/dri/i810/i810vb.c
@@ -51,10 +51,10 @@
#define I810_MAX_SETUP 0x80
static struct {
- void (*emit)( GLcontext *, GLuint, GLuint, void *, GLuint );
+ void (*emit)( struct gl_context *, GLuint, GLuint, void *, GLuint );
tnl_interp_func interp;
tnl_copy_pv_func copy_pv;
- GLboolean (*check_tex_sizes)( GLcontext *ctx );
+ GLboolean (*check_tex_sizes)( struct gl_context *ctx );
GLuint vertex_size;
GLuint vertex_format;
} setup_tab[I810_MAX_SETUP];
@@ -335,7 +335,7 @@ static void i810PrintSetupFlags(const char *msg, GLuint flags )
-void i810CheckTexSizes( GLcontext *ctx )
+void i810CheckTexSizes( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
i810ContextPtr imesa = I810_CONTEXT( ctx );
@@ -357,7 +357,7 @@ void i810CheckTexSizes( GLcontext *ctx )
}
}
-void i810BuildVertices( GLcontext *ctx,
+void i810BuildVertices( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint newinputs )
@@ -405,7 +405,7 @@ void i810BuildVertices( GLcontext *ctx,
}
}
-void i810ChooseVertexState( GLcontext *ctx )
+void i810ChooseVertexState( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
i810ContextPtr imesa = I810_CONTEXT( ctx );
@@ -446,7 +446,7 @@ void i810ChooseVertexState( GLcontext *ctx )
-void *i810_emit_contiguous_verts( GLcontext *ctx,
+void *i810_emit_contiguous_verts( struct gl_context *ctx,
GLuint start,
GLuint count,
void *dest )
@@ -459,7 +459,7 @@ void *i810_emit_contiguous_verts( GLcontext *ctx,
-void i810InitVB( GLcontext *ctx )
+void i810InitVB( struct gl_context *ctx )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
GLuint size = TNL_CONTEXT(ctx)->vb.Size;
@@ -476,7 +476,7 @@ void i810InitVB( GLcontext *ctx )
}
-void i810FreeVB( GLcontext *ctx )
+void i810FreeVB( struct gl_context *ctx )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
if (imesa->verts) {
diff --git a/src/mesa/drivers/dri/i810/i810vb.h b/src/mesa/drivers/dri/i810/i810vb.h
index 1f704e45695..e321518507e 100644
--- a/src/mesa/drivers/dri/i810/i810vb.h
+++ b/src/mesa/drivers/dri/i810/i810vb.h
@@ -36,24 +36,24 @@
_NEW_FOG)
-extern void i810ChooseVertexState( GLcontext *ctx );
-extern void i810CheckTexSizes( GLcontext *ctx );
-extern void i810BuildVertices( GLcontext *ctx,
+extern void i810ChooseVertexState( struct gl_context *ctx );
+extern void i810CheckTexSizes( struct gl_context *ctx );
+extern void i810BuildVertices( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint newinputs );
-extern void *i810_emit_contiguous_verts( GLcontext *ctx,
+extern void *i810_emit_contiguous_verts( struct gl_context *ctx,
GLuint start,
GLuint count,
void *dest );
-extern void i810_translate_vertex( GLcontext *ctx,
+extern void i810_translate_vertex( struct gl_context *ctx,
const i810Vertex *src,
SWvertex *dst );
-extern void i810InitVB( GLcontext *ctx );
-extern void i810FreeVB( GLcontext *ctx );
+extern void i810InitVB( struct gl_context *ctx );
+extern void i810FreeVB( struct gl_context *ctx );
#endif
diff --git a/src/mesa/drivers/dri/i915/i830_context.c b/src/mesa/drivers/dri/i915/i830_context.c
index 8ddce6d82a5..abfb32be3ae 100644
--- a/src/mesa/drivers/dri/i915/i830_context.c
+++ b/src/mesa/drivers/dri/i915/i830_context.c
@@ -48,14 +48,14 @@ i830InitDriverFunctions(struct dd_function_table *functions)
extern const struct tnl_pipeline_stage *intel_pipeline[];
GLboolean
-i830CreateContext(const __GLcontextModes * mesaVis,
+i830CreateContext(const struct gl_config * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate)
{
struct dd_function_table functions;
struct i830_context *i830 = CALLOC_STRUCT(i830_context);
struct intel_context *intel = &i830->intel;
- GLcontext *ctx = &intel->ctx;
+ struct gl_context *ctx = &intel->ctx;
if (!i830)
return GL_FALSE;
diff --git a/src/mesa/drivers/dri/i915/i830_context.h b/src/mesa/drivers/dri/i915/i830_context.h
index 2100ffe6d99..4d568fc0f1e 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,
/* i830_context.c
*/
extern GLboolean
-i830CreateContext(const __GLcontextModes * mesaVis,
+i830CreateContext(const struct gl_config * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate);
@@ -205,14 +205,14 @@ extern void i830InitStateFuncs(struct dd_function_table *functions);
extern void i830EmitState(struct i830_context *i830);
extern void i830InitState(struct i830_context *i830);
-extern void i830_update_provoking_vertex(GLcontext *ctx);
+extern void i830_update_provoking_vertex(struct gl_context *ctx);
/*======================================================================
* Inline conversion functions. These are better-typed than the
* macros used previously:
*/
static INLINE struct i830_context *
-i830_context(GLcontext * ctx)
+i830_context(struct gl_context * ctx)
{
return (struct i830_context *) ctx;
}
diff --git a/src/mesa/drivers/dri/i915/i830_state.c b/src/mesa/drivers/dri/i915/i830_state.c
index 38e524e183c..147192adc7a 100644
--- a/src/mesa/drivers/dri/i915/i830_state.c
+++ b/src/mesa/drivers/dri/i915/i830_state.c
@@ -47,7 +47,7 @@
#define FILE_DEBUG_FLAG DEBUG_STATE
static void
-i830StencilFuncSeparate(GLcontext * ctx, GLenum face, GLenum func, GLint ref,
+i830StencilFuncSeparate(struct gl_context * ctx, GLenum face, GLenum func, GLint ref,
GLuint mask)
{
struct i830_context *i830 = i830_context(ctx);
@@ -72,7 +72,7 @@ i830StencilFuncSeparate(GLcontext * ctx, GLenum face, GLenum func, GLint ref,
}
static void
-i830StencilMaskSeparate(GLcontext * ctx, GLenum face, GLuint mask)
+i830StencilMaskSeparate(struct gl_context * ctx, GLenum face, GLuint mask)
{
struct i830_context *i830 = i830_context(ctx);
@@ -87,7 +87,7 @@ i830StencilMaskSeparate(GLcontext * ctx, GLenum face, GLuint mask)
}
static void
-i830StencilOpSeparate(GLcontext * ctx, GLenum face, GLenum fail, GLenum zfail,
+i830StencilOpSeparate(struct gl_context * ctx, GLenum face, GLenum fail, GLenum zfail,
GLenum zpass)
{
struct i830_context *i830 = i830_context(ctx);
@@ -199,7 +199,7 @@ i830StencilOpSeparate(GLcontext * ctx, GLenum face, GLenum fail, GLenum zfail,
}
static void
-i830AlphaFunc(GLcontext * ctx, GLenum func, GLfloat ref)
+i830AlphaFunc(struct gl_context * ctx, GLenum func, GLfloat ref)
{
struct i830_context *i830 = i830_context(ctx);
int test = intel_translate_compare_func(func);
@@ -228,7 +228,7 @@ i830AlphaFunc(GLcontext * ctx, GLenum func, GLfloat ref)
* I'm not sure which is correct.
*/
static void
-i830EvalLogicOpBlendState(GLcontext * ctx)
+i830EvalLogicOpBlendState(struct gl_context * ctx)
{
struct i830_context *i830 = i830_context(ctx);
@@ -255,7 +255,7 @@ i830EvalLogicOpBlendState(GLcontext * ctx)
}
static void
-i830BlendColor(GLcontext * ctx, const GLfloat color[4])
+i830BlendColor(struct gl_context * ctx, const GLfloat color[4])
{
struct i830_context *i830 = i830_context(ctx);
GLubyte r, g, b, a;
@@ -279,7 +279,7 @@ i830BlendColor(GLcontext * ctx, const GLfloat color[4])
* change the interpretation of the blend function.
*/
static void
-i830_set_blend_state(GLcontext * ctx)
+i830_set_blend_state(struct gl_context * ctx)
{
struct i830_context *i830 = i830_context(ctx);
int funcA;
@@ -385,7 +385,7 @@ i830_set_blend_state(GLcontext * ctx)
static void
-i830BlendEquationSeparate(GLcontext * ctx, GLenum modeRGB, GLenum modeA)
+i830BlendEquationSeparate(struct gl_context * ctx, GLenum modeRGB, GLenum modeA)
{
DBG("%s -> %s, %s\n", __FUNCTION__,
_mesa_lookup_enum_by_nr(modeRGB),
@@ -398,7 +398,7 @@ i830BlendEquationSeparate(GLcontext * ctx, GLenum modeRGB, GLenum modeA)
static void
-i830BlendFuncSeparate(GLcontext * ctx, GLenum sfactorRGB,
+i830BlendFuncSeparate(struct gl_context * ctx, GLenum sfactorRGB,
GLenum dfactorRGB, GLenum sfactorA, GLenum dfactorA)
{
DBG("%s -> RGB(%s, %s) A(%s, %s)\n", __FUNCTION__,
@@ -417,7 +417,7 @@ i830BlendFuncSeparate(GLcontext * ctx, GLenum sfactorRGB,
static void
-i830DepthFunc(GLcontext * ctx, GLenum func)
+i830DepthFunc(struct gl_context * ctx, GLenum func)
{
struct i830_context *i830 = i830_context(ctx);
int test = intel_translate_compare_func(func);
@@ -431,7 +431,7 @@ i830DepthFunc(GLcontext * ctx, GLenum func)
}
static void
-i830DepthMask(GLcontext * ctx, GLboolean flag)
+i830DepthMask(struct gl_context * ctx, GLboolean flag)
{
struct i830_context *i830 = i830_context(ctx);
@@ -449,7 +449,7 @@ i830DepthMask(GLcontext * ctx, GLboolean flag)
/** Called from ctx->Driver.Viewport() */
static void
-i830Viewport(GLcontext * ctx,
+i830Viewport(struct gl_context * ctx,
GLint x, GLint y, GLsizei width, GLsizei height)
{
intelCalcViewport(ctx);
@@ -458,7 +458,7 @@ i830Viewport(GLcontext * ctx,
/** Called from ctx->Driver.DepthRange() */
static void
-i830DepthRange(GLcontext * ctx, GLclampd nearval, GLclampd farval)
+i830DepthRange(struct gl_context * ctx, GLclampd nearval, GLclampd farval)
{
intelCalcViewport(ctx);
}
@@ -470,7 +470,7 @@ i830DepthRange(GLcontext * ctx, GLclampd nearval, GLclampd farval)
* Fortunately stipple is usually a repeating pattern.
*/
static void
-i830PolygonStipple(GLcontext * ctx, const GLubyte * mask)
+i830PolygonStipple(struct gl_context * ctx, const GLubyte * mask)
{
struct i830_context *i830 = i830_context(ctx);
const GLubyte *m = mask;
@@ -526,7 +526,7 @@ i830PolygonStipple(GLcontext * ctx, const GLubyte * mask)
* Hardware clipping
*/
static void
-i830Scissor(GLcontext * ctx, GLint x, GLint y, GLsizei w, GLsizei h)
+i830Scissor(struct gl_context * ctx, GLint x, GLint y, GLsizei w, GLsizei h)
{
struct i830_context *i830 = i830_context(ctx);
int x1, y1, x2, y2;
@@ -566,7 +566,7 @@ i830Scissor(GLcontext * ctx, GLint x, GLint y, GLsizei w, GLsizei h)
}
static void
-i830LogicOp(GLcontext * ctx, GLenum opcode)
+i830LogicOp(struct gl_context * ctx, GLenum opcode)
{
struct i830_context *i830 = i830_context(ctx);
int tmp = intel_translate_logic_op(opcode);
@@ -581,7 +581,7 @@ i830LogicOp(GLcontext * ctx, GLenum opcode)
static void
-i830CullFaceFrontFace(GLcontext * ctx, GLenum unused)
+i830CullFaceFrontFace(struct gl_context * ctx, GLenum unused)
{
struct i830_context *i830 = i830_context(ctx);
GLuint mode;
@@ -609,7 +609,7 @@ i830CullFaceFrontFace(GLcontext * ctx, GLenum unused)
}
static void
-i830LineWidth(GLcontext * ctx, GLfloat widthf)
+i830LineWidth(struct gl_context * ctx, GLfloat widthf)
{
struct i830_context *i830 = i830_context(ctx);
int width;
@@ -630,7 +630,7 @@ i830LineWidth(GLcontext * ctx, GLfloat widthf)
}
static void
-i830PointSize(GLcontext * ctx, GLfloat size)
+i830PointSize(struct gl_context * ctx, GLfloat size)
{
struct i830_context *i830 = i830_context(ctx);
GLint point_size = (int) size;
@@ -650,7 +650,7 @@ i830PointSize(GLcontext * ctx, GLfloat size)
*/
static void
-i830ColorMask(GLcontext * ctx,
+i830ColorMask(struct gl_context * ctx,
GLboolean r, GLboolean g, GLboolean b, GLboolean a)
{
struct i830_context *i830 = i830_context(ctx);
@@ -672,7 +672,7 @@ i830ColorMask(GLcontext * ctx,
}
static void
-update_specular(GLcontext * ctx)
+update_specular(struct gl_context * ctx)
{
struct i830_context *i830 = i830_context(ctx);
@@ -686,7 +686,7 @@ update_specular(GLcontext * ctx)
}
static void
-i830LightModelfv(GLcontext * ctx, GLenum pname, const GLfloat * param)
+i830LightModelfv(struct gl_context * ctx, GLenum pname, const GLfloat * param)
{
DBG("%s\n", __FUNCTION__);
@@ -698,7 +698,7 @@ i830LightModelfv(GLcontext * ctx, GLenum pname, const GLfloat * param)
/* In Mesa 3.5 we can reliably do native flatshading.
*/
static void
-i830ShadeModel(GLcontext * ctx, GLenum mode)
+i830ShadeModel(struct gl_context * ctx, GLenum mode)
{
struct i830_context *i830 = i830_context(ctx);
I830_STATECHANGE(i830, I830_UPLOAD_CTX);
@@ -727,7 +727,7 @@ i830ShadeModel(GLcontext * ctx, GLenum mode)
* Fog
*/
static void
-i830Fogfv(GLcontext * ctx, GLenum pname, const GLfloat * param)
+i830Fogfv(struct gl_context * ctx, GLenum pname, const GLfloat * param)
{
struct i830_context *i830 = i830_context(ctx);
@@ -748,7 +748,7 @@ i830Fogfv(GLcontext * ctx, GLenum pname, const GLfloat * param)
*/
static void
-i830Enable(GLcontext * ctx, GLenum cap, GLboolean state)
+i830Enable(struct gl_context * ctx, GLenum cap, GLboolean state)
{
struct i830_context *i830 = i830_context(ctx);
@@ -1067,7 +1067,7 @@ i830_init_packets(struct i830_context *i830)
}
void
-i830_update_provoking_vertex(GLcontext * ctx)
+i830_update_provoking_vertex(struct gl_context * ctx)
{
struct i830_context *i830 = i830_context(ctx);
@@ -1119,7 +1119,7 @@ i830InitStateFuncs(struct dd_function_table *functions)
void
i830InitState(struct i830_context *i830)
{
- GLcontext *ctx = &i830->intel.ctx;
+ struct gl_context *ctx = &i830->intel.ctx;
i830_init_packets(i830);
diff --git a/src/mesa/drivers/dri/i915/i830_texblend.c b/src/mesa/drivers/dri/i915/i830_texblend.c
index 3f64be8c962..fec86c56fdc 100644
--- a/src/mesa/drivers/dri/i915/i830_texblend.c
+++ b/src/mesa/drivers/dri/i915/i830_texblend.c
@@ -440,7 +440,7 @@ emit_passthrough(struct i830_context *i830)
void
i830EmitTextureBlend(struct i830_context *i830)
{
- GLcontext *ctx = &i830->intel.ctx;
+ struct gl_context *ctx = &i830->intel.ctx;
GLuint unit, last_stage = 0, blendunit = 0;
I830_ACTIVESTATE(i830, I830_UPLOAD_TEXBLEND_ALL, GL_FALSE);
diff --git a/src/mesa/drivers/dri/i915/i830_texstate.c b/src/mesa/drivers/dri/i915/i830_texstate.c
index ace44430d97..b3bb8837cca 100644
--- a/src/mesa/drivers/dri/i915/i830_texstate.c
+++ b/src/mesa/drivers/dri/i915/i830_texstate.c
@@ -113,7 +113,7 @@ translate_wrap_mode(GLenum wrap)
static GLboolean
i830_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
{
- GLcontext *ctx = &intel->ctx;
+ struct gl_context *ctx = &intel->ctx;
struct i830_context *i830 = i830_context(ctx);
struct gl_texture_unit *tUnit = &ctx->Texture.Unit[unit];
struct gl_texture_object *tObj = tUnit->_Current;
diff --git a/src/mesa/drivers/dri/i915/i830_vtbl.c b/src/mesa/drivers/dri/i915/i830_vtbl.c
index 0775d7fe943..f7fdb78d059 100644
--- a/src/mesa/drivers/dri/i915/i830_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i830_vtbl.c
@@ -69,7 +69,7 @@ i830_render_prevalidate(struct intel_context *intel)
static void
i830_render_start(struct intel_context *intel)
{
- GLcontext *ctx = &intel->ctx;
+ struct gl_context *ctx = &intel->ctx;
struct i830_context *i830 = i830_context(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
@@ -591,7 +591,7 @@ i830_set_draw_region(struct intel_context *intel,
GLuint num_regions)
{
struct i830_context *i830 = i830_context(&intel->ctx);
- GLcontext *ctx = &intel->ctx;
+ struct gl_context *ctx = &intel->ctx;
struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0];
struct intel_renderbuffer *irb = intel_renderbuffer(rb);
GLuint value;
@@ -703,6 +703,7 @@ i830_assert_not_dirty( struct intel_context *intel )
{
struct i830_context *i830 = i830_context(&intel->ctx);
assert(!get_dirty(&i830->state));
+ (void) i830;
}
static void
diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c
index 412714ada8e..f943f81dd05 100644
--- a/src/mesa/drivers/dri/i915/i915_context.c
+++ b/src/mesa/drivers/dri/i915/i915_context.c
@@ -49,7 +49,7 @@
/* Override intel default.
*/
static void
-i915InvalidateState(GLcontext * ctx, GLuint new_state)
+i915InvalidateState(struct gl_context * ctx, GLuint new_state)
{
_swrast_InvalidateState(ctx, new_state);
_swsetup_InvalidateState(ctx, new_state);
@@ -94,7 +94,7 @@ extern const struct tnl_pipeline_stage *intel_pipeline[];
GLboolean
i915CreateContext(int api,
- const __GLcontextModes * mesaVis,
+ const struct gl_config * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate)
{
@@ -102,7 +102,7 @@ i915CreateContext(int api,
struct i915_context *i915 =
(struct i915_context *) CALLOC_STRUCT(i915_context);
struct intel_context *intel = &i915->intel;
- GLcontext *ctx = &intel->ctx;
+ struct gl_context *ctx = &intel->ctx;
if (!i915)
return GL_FALSE;
diff --git a/src/mesa/drivers/dri/i915/i915_context.h b/src/mesa/drivers/dri/i915/i915_context.h
index 33dad9a1953..2c80ded075b 100644
--- a/src/mesa/drivers/dri/i915/i915_context.h
+++ b/src/mesa/drivers/dri/i915/i915_context.h
@@ -158,7 +158,7 @@ struct i915_fragment_program
/* TODO: split between the stored representation of a program and
* the state used to build that representation.
*/
- GLcontext *ctx;
+ struct gl_context *ctx;
/* declarations contains the packet header. */
GLuint declarations[I915_MAX_DECL_INSN * 3 + 1];
@@ -320,7 +320,7 @@ do { \
* i915_context.c
*/
extern GLboolean i915CreateContext(int api,
- const __GLcontextModes * mesaVis,
+ const struct gl_config * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate);
@@ -337,9 +337,9 @@ extern void i915_print_ureg(const char *msg, GLuint ureg);
*/
extern void i915InitStateFunctions(struct dd_function_table *functions);
extern void i915InitState(struct i915_context *i915);
-extern void i915_update_fog(GLcontext * ctx);
-extern void i915_update_stencil(GLcontext * ctx);
-extern void i915_update_provoking_vertex(GLcontext *ctx);
+extern void i915_update_fog(struct gl_context * ctx);
+extern void i915_update_stencil(struct gl_context * ctx);
+extern void i915_update_provoking_vertex(struct gl_context *ctx);
/*======================================================================
@@ -359,7 +359,7 @@ extern void i915InitFragProgFuncs(struct dd_function_table *functions);
* macros used previously:
*/
static INLINE struct i915_context *
-i915_context(GLcontext * ctx)
+i915_context(struct gl_context * ctx)
{
return (struct i915_context *) ctx;
}
diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c
index 31988f3d813..c00ee415b6b 100644
--- a/src/mesa/drivers/dri/i915/i915_fragprog.c
+++ b/src/mesa/drivers/dri/i915/i915_fragprog.c
@@ -1186,7 +1186,7 @@ track_params(struct i915_fragment_program *p)
static void
-i915BindProgram(GLcontext * ctx, GLenum target, struct gl_program *prog)
+i915BindProgram(struct gl_context * ctx, GLenum target, struct gl_program *prog)
{
if (target == GL_FRAGMENT_PROGRAM_ARB) {
struct i915_context *i915 = I915_CONTEXT(ctx);
@@ -1209,7 +1209,7 @@ i915BindProgram(GLcontext * ctx, GLenum target, struct gl_program *prog)
}
static struct gl_program *
-i915NewProgram(GLcontext * ctx, GLenum target, GLuint id)
+i915NewProgram(struct gl_context * ctx, GLenum target, GLuint id)
{
switch (target) {
case GL_VERTEX_PROGRAM_ARB:
@@ -1237,7 +1237,7 @@ i915NewProgram(GLcontext * ctx, GLenum target, GLuint id)
}
static void
-i915DeleteProgram(GLcontext * ctx, struct gl_program *prog)
+i915DeleteProgram(struct gl_context * ctx, struct gl_program *prog)
{
if (prog->Target == GL_FRAGMENT_PROGRAM_ARB) {
struct i915_context *i915 = I915_CONTEXT(ctx);
@@ -1252,7 +1252,7 @@ i915DeleteProgram(GLcontext * ctx, struct gl_program *prog)
static GLboolean
-i915IsProgramNative(GLcontext * ctx, GLenum target, struct gl_program *prog)
+i915IsProgramNative(struct gl_context * ctx, GLenum target, struct gl_program *prog)
{
if (target == GL_FRAGMENT_PROGRAM_ARB) {
struct i915_fragment_program *p = (struct i915_fragment_program *) prog;
@@ -1267,7 +1267,7 @@ i915IsProgramNative(GLcontext * ctx, GLenum target, struct gl_program *prog)
}
static GLboolean
-i915ProgramStringNotify(GLcontext * ctx,
+i915ProgramStringNotify(struct gl_context * ctx,
GLenum target, struct gl_program *prog)
{
if (target == GL_FRAGMENT_PROGRAM_ARB) {
@@ -1291,7 +1291,7 @@ i915ProgramStringNotify(GLcontext * ctx,
}
void
-i915_update_program(GLcontext *ctx)
+i915_update_program(struct gl_context *ctx)
{
struct intel_context *intel = intel_context(ctx);
struct i915_context *i915 = i915_context(&intel->ctx);
@@ -1316,7 +1316,7 @@ i915_update_program(GLcontext *ctx)
void
i915ValidateFragmentProgram(struct i915_context *i915)
{
- GLcontext *ctx = &i915->intel.ctx;
+ struct gl_context *ctx = &i915->intel.ctx;
struct intel_context *intel = intel_context(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
diff --git a/src/mesa/drivers/dri/i915/i915_program.c b/src/mesa/drivers/dri/i915/i915_program.c
index 670c7137850..ca1949b223e 100644
--- a/src/mesa/drivers/dri/i915/i915_program.c
+++ b/src/mesa/drivers/dri/i915/i915_program.c
@@ -457,7 +457,7 @@ i915_program_error(struct i915_fragment_program *p, const char *fmt, ...)
void
i915_init_program(struct i915_context *i915, struct i915_fragment_program *p)
{
- GLcontext *ctx = &i915->intel.ctx;
+ struct gl_context *ctx = &i915->intel.ctx;
p->translated = 0;
p->params_uptodate = 0;
diff --git a/src/mesa/drivers/dri/i915/i915_program.h b/src/mesa/drivers/dri/i915/i915_program.h
index 0d17d048653..20a1354a411 100644
--- a/src/mesa/drivers/dri/i915/i915_program.h
+++ b/src/mesa/drivers/dri/i915/i915_program.h
@@ -155,6 +155,6 @@ extern void i915_upload_program(struct i915_context *i915,
extern void i915_fini_program(struct i915_fragment_program *p);
-extern void i915_update_program(GLcontext *ctx);
+extern void i915_update_program(struct gl_context *ctx);
#endif
diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c
index 26d387f383a..9508fbaf942 100644
--- a/src/mesa/drivers/dri/i915/i915_state.c
+++ b/src/mesa/drivers/dri/i915/i915_state.c
@@ -49,7 +49,7 @@
#define FILE_DEBUG_FLAG DEBUG_STATE
void
-i915_update_stencil(GLcontext * ctx)
+i915_update_stencil(struct gl_context * ctx)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
GLuint front_ref, front_writemask, front_mask;
@@ -147,24 +147,24 @@ i915_update_stencil(GLcontext * ctx)
}
static void
-i915StencilFuncSeparate(GLcontext * ctx, GLenum face, GLenum func, GLint ref,
+i915StencilFuncSeparate(struct gl_context * ctx, GLenum face, GLenum func, GLint ref,
GLuint mask)
{
}
static void
-i915StencilMaskSeparate(GLcontext * ctx, GLenum face, GLuint mask)
+i915StencilMaskSeparate(struct gl_context * ctx, GLenum face, GLuint mask)
{
}
static void
-i915StencilOpSeparate(GLcontext * ctx, GLenum face, GLenum fail, GLenum zfail,
+i915StencilOpSeparate(struct gl_context * ctx, GLenum face, GLenum fail, GLenum zfail,
GLenum zpass)
{
}
static void
-i915AlphaFunc(GLcontext * ctx, GLenum func, GLfloat ref)
+i915AlphaFunc(struct gl_context * ctx, GLenum func, GLfloat ref)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
int test = intel_translate_compare_func(func);
@@ -187,7 +187,7 @@ i915AlphaFunc(GLcontext * ctx, GLenum func, GLfloat ref)
* calls to glEnable.
*/
static void
-i915EvalLogicOpBlendState(GLcontext * ctx)
+i915EvalLogicOpBlendState(struct gl_context * ctx)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
@@ -210,7 +210,7 @@ i915EvalLogicOpBlendState(GLcontext * ctx)
}
static void
-i915BlendColor(GLcontext * ctx, const GLfloat color[4])
+i915BlendColor(struct gl_context * ctx, const GLfloat color[4])
{
struct i915_context *i915 = I915_CONTEXT(ctx);
GLubyte r, g, b, a;
@@ -255,7 +255,7 @@ translate_blend_equation(GLenum mode)
}
static void
-i915UpdateBlendState(GLcontext * ctx)
+i915UpdateBlendState(struct gl_context * ctx)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
GLuint iab = (i915->state.Ctx[I915_CTXREG_IAB] &
@@ -306,7 +306,7 @@ i915UpdateBlendState(GLcontext * ctx)
static void
-i915BlendFuncSeparate(GLcontext * ctx, GLenum srcRGB,
+i915BlendFuncSeparate(struct gl_context * ctx, GLenum srcRGB,
GLenum dstRGB, GLenum srcA, GLenum dstA)
{
i915UpdateBlendState(ctx);
@@ -314,14 +314,14 @@ i915BlendFuncSeparate(GLcontext * ctx, GLenum srcRGB,
static void
-i915BlendEquationSeparate(GLcontext * ctx, GLenum eqRGB, GLenum eqA)
+i915BlendEquationSeparate(struct gl_context * ctx, GLenum eqRGB, GLenum eqA)
{
i915UpdateBlendState(ctx);
}
static void
-i915DepthFunc(GLcontext * ctx, GLenum func)
+i915DepthFunc(struct gl_context * ctx, GLenum func)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
int test = intel_translate_compare_func(func);
@@ -334,7 +334,7 @@ i915DepthFunc(GLcontext * ctx, GLenum func)
}
static void
-i915DepthMask(GLcontext * ctx, GLboolean flag)
+i915DepthMask(struct gl_context * ctx, GLboolean flag)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
@@ -357,7 +357,7 @@ i915DepthMask(GLcontext * ctx, GLboolean flag)
* - window pos/size or FBO size
*/
void
-intelCalcViewport(GLcontext * ctx)
+intelCalcViewport(struct gl_context * ctx)
{
struct intel_context *intel = intel_context(ctx);
const GLfloat *v = ctx->Viewport._WindowMap.m;
@@ -390,7 +390,7 @@ intelCalcViewport(GLcontext * ctx)
/** Called from ctx->Driver.Viewport() */
static void
-i915Viewport(GLcontext * ctx,
+i915Viewport(struct gl_context * ctx,
GLint x, GLint y, GLsizei width, GLsizei height)
{
intelCalcViewport(ctx);
@@ -399,7 +399,7 @@ i915Viewport(GLcontext * ctx,
/** Called from ctx->Driver.DepthRange() */
static void
-i915DepthRange(GLcontext * ctx, GLclampd nearval, GLclampd farval)
+i915DepthRange(struct gl_context * ctx, GLclampd nearval, GLclampd farval)
{
intelCalcViewport(ctx);
}
@@ -412,7 +412,7 @@ i915DepthRange(GLcontext * ctx, GLclampd nearval, GLclampd farval)
* Fortunately stipple is usually a repeating pattern.
*/
static void
-i915PolygonStipple(GLcontext * ctx, const GLubyte * mask)
+i915PolygonStipple(struct gl_context * ctx, const GLubyte * mask)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
const GLubyte *m;
@@ -474,7 +474,7 @@ i915PolygonStipple(GLcontext * ctx, const GLubyte * mask)
* Hardware clipping
*/
static void
-i915Scissor(GLcontext * ctx, GLint x, GLint y, GLsizei w, GLsizei h)
+i915Scissor(struct gl_context * ctx, GLint x, GLint y, GLsizei w, GLsizei h)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
int x1, y1, x2, y2;
@@ -514,7 +514,7 @@ i915Scissor(GLcontext * ctx, GLint x, GLint y, GLsizei w, GLsizei h)
}
static void
-i915LogicOp(GLcontext * ctx, GLenum opcode)
+i915LogicOp(struct gl_context * ctx, GLenum opcode)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
int tmp = intel_translate_logic_op(opcode);
@@ -529,7 +529,7 @@ i915LogicOp(GLcontext * ctx, GLenum opcode)
static void
-i915CullFaceFrontFace(GLcontext * ctx, GLenum unused)
+i915CullFaceFrontFace(struct gl_context * ctx, GLenum unused)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
GLuint mode;
@@ -560,7 +560,7 @@ i915CullFaceFrontFace(GLcontext * ctx, GLenum unused)
}
static void
-i915LineWidth(GLcontext * ctx, GLfloat widthf)
+i915LineWidth(struct gl_context * ctx, GLfloat widthf)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
int lis4 = i915->state.Ctx[I915_CTXREG_LIS4] & ~S4_LINE_WIDTH_MASK;
@@ -579,7 +579,7 @@ i915LineWidth(GLcontext * ctx, GLfloat widthf)
}
static void
-i915PointSize(GLcontext * ctx, GLfloat size)
+i915PointSize(struct gl_context * ctx, GLfloat size)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
int lis4 = i915->state.Ctx[I915_CTXREG_LIS4] & ~S4_POINT_WIDTH_MASK;
@@ -598,7 +598,7 @@ i915PointSize(GLcontext * ctx, GLfloat size)
static void
-i915PointParameterfv(GLcontext * ctx, GLenum pname, const GLfloat *params)
+i915PointParameterfv(struct gl_context * ctx, GLenum pname, const GLfloat *params)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
@@ -620,7 +620,7 @@ i915PointParameterfv(GLcontext * ctx, GLenum pname, const GLfloat *params)
*/
static void
-i915ColorMask(GLcontext * ctx,
+i915ColorMask(struct gl_context * ctx,
GLboolean r, GLboolean g, GLboolean b, GLboolean a)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
@@ -645,7 +645,7 @@ i915ColorMask(GLcontext * ctx,
}
static void
-update_specular(GLcontext * ctx)
+update_specular(struct gl_context * ctx)
{
/* A hack to trigger the rebuild of the fragment program.
*/
@@ -653,7 +653,7 @@ update_specular(GLcontext * ctx)
}
static void
-i915LightModelfv(GLcontext * ctx, GLenum pname, const GLfloat * param)
+i915LightModelfv(struct gl_context * ctx, GLenum pname, const GLfloat * param)
{
DBG("%s\n", __FUNCTION__);
@@ -663,7 +663,7 @@ i915LightModelfv(GLcontext * ctx, GLenum pname, const GLfloat * param)
}
static void
-i915ShadeModel(GLcontext * ctx, GLenum mode)
+i915ShadeModel(struct gl_context * ctx, GLenum mode)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
I915_STATECHANGE(i915, I915_UPLOAD_CTX);
@@ -684,7 +684,7 @@ i915ShadeModel(GLcontext * ctx, GLenum mode)
* Fog
*/
void
-i915_update_fog(GLcontext * ctx)
+i915_update_fog(struct gl_context * ctx)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
GLenum mode;
@@ -780,7 +780,7 @@ i915_update_fog(GLcontext * ctx)
}
static void
-i915Fogfv(GLcontext * ctx, GLenum pname, const GLfloat * param)
+i915Fogfv(struct gl_context * ctx, GLenum pname, const GLfloat * param)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
@@ -820,7 +820,7 @@ i915Fogfv(GLcontext * ctx, GLenum pname, const GLfloat * param)
}
static void
-i915Hint(GLcontext * ctx, GLenum target, GLenum state)
+i915Hint(struct gl_context * ctx, GLenum target, GLenum state)
{
switch (target) {
case GL_FOG_HINT:
@@ -834,7 +834,7 @@ i915Hint(GLcontext * ctx, GLenum target, GLenum state)
*/
static void
-i915Enable(GLcontext * ctx, GLenum cap, GLboolean state)
+i915Enable(struct gl_context * ctx, GLenum cap, GLboolean state)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
@@ -1093,7 +1093,7 @@ i915_init_packets(struct i915_context *i915)
}
void
-i915_update_provoking_vertex(GLcontext * ctx)
+i915_update_provoking_vertex(struct gl_context * ctx)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
@@ -1150,7 +1150,7 @@ i915InitStateFunctions(struct dd_function_table *functions)
void
i915InitState(struct i915_context *i915)
{
- GLcontext *ctx = &i915->intel.ctx;
+ struct gl_context *ctx = &i915->intel.ctx;
i915_init_packets(i915);
diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c
index e0e7f3bc3da..c724a214967 100644
--- a/src/mesa/drivers/dri/i915/i915_texstate.c
+++ b/src/mesa/drivers/dri/i915/i915_texstate.c
@@ -130,7 +130,7 @@ translate_wrap_mode(GLenum wrap)
static GLboolean
i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
{
- GLcontext *ctx = &intel->ctx;
+ struct gl_context *ctx = &intel->ctx;
struct i915_context *i915 = i915_context(ctx);
struct gl_texture_unit *tUnit = &ctx->Texture.Unit[unit];
struct gl_texture_object *tObj = tUnit->_Current;
diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c
index d7828a296ad..59dfe085632 100644
--- a/src/mesa/drivers/dri/i915/i915_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i915_vtbl.c
@@ -530,7 +530,7 @@ i915_set_draw_region(struct intel_context *intel,
GLuint num_regions)
{
struct i915_context *i915 = i915_context(&intel->ctx);
- GLcontext *ctx = &intel->ctx;
+ struct gl_context *ctx = &intel->ctx;
struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0];
struct intel_renderbuffer *irb = intel_renderbuffer(rb);
GLuint value;
@@ -669,6 +669,7 @@ i915_assert_not_dirty( struct intel_context *intel )
struct i915_context *i915 = i915_context(&intel->ctx);
GLuint dirty = get_dirty(&i915->state);
assert(!dirty);
+ (void) dirty;
}
void
diff --git a/src/mesa/drivers/dri/i915/intel_render.c b/src/mesa/drivers/dri/i915/intel_render.c
index dc6bc9a71c0..0d8ab4b507e 100644
--- a/src/mesa/drivers/dri/i915/intel_render.c
+++ b/src/mesa/drivers/dri/i915/intel_render.c
@@ -216,7 +216,7 @@ choose_render(struct intel_context *intel, struct vertex_buffer *VB)
static GLboolean
-intel_run_render(GLcontext * ctx, struct tnl_pipeline_stage *stage)
+intel_run_render(struct gl_context * ctx, struct tnl_pipeline_stage *stage)
{
struct intel_context *intel = intel_context(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index ede111b87a2..b9a8aeb12f2 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.c
+++ b/src/mesa/drivers/dri/i915/intel_tris.c
@@ -55,8 +55,8 @@
#include "i830_context.h"
#include "i830_reg.h"
-static void intelRenderPrimitive(GLcontext * ctx, GLenum prim);
-static void intelRasterPrimitive(GLcontext * ctx, GLenum rprim,
+static void intelRenderPrimitive(struct gl_context * ctx, GLenum prim);
+static void intelRasterPrimitive(struct gl_context * ctx, GLenum rprim,
GLuint hwprim);
static void
@@ -427,7 +427,7 @@ intel_draw_point(struct intel_context *intel, intelVertexPtr v0)
static void
intel_atten_point(struct intel_context *intel, intelVertexPtr v0)
{
- GLcontext *ctx = &intel->ctx;
+ struct gl_context *ctx = &intel->ctx;
GLfloat psz[4], col[4], restore_psz, restore_alpha;
_tnl_get_attr(ctx, v0, _TNL_ATTRIB_POINTSIZE, psz);
@@ -784,7 +784,7 @@ static void
intel_fallback_tri(struct intel_context *intel,
intelVertex * v0, intelVertex * v1, intelVertex * v2)
{
- GLcontext *ctx = &intel->ctx;
+ struct gl_context *ctx = &intel->ctx;
SWvertex v[3];
if (0)
@@ -805,7 +805,7 @@ static void
intel_fallback_line(struct intel_context *intel,
intelVertex * v0, intelVertex * v1)
{
- GLcontext *ctx = &intel->ctx;
+ struct gl_context *ctx = &intel->ctx;
SWvertex v[2];
if (0)
@@ -824,7 +824,7 @@ static void
intel_fallback_point(struct intel_context *intel,
intelVertex * v0)
{
- GLcontext *ctx = &intel->ctx;
+ struct gl_context *ctx = &intel->ctx;
SWvertex v[1];
if (0)
@@ -877,7 +877,7 @@ intel_fallback_point(struct intel_context *intel,
static void
-intelRenderClippedPoly(GLcontext * ctx, const GLuint * elts, GLuint n)
+intelRenderClippedPoly(struct gl_context * ctx, const GLuint * elts, GLuint n)
{
struct intel_context *intel = intel_context(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -901,7 +901,7 @@ intelRenderClippedPoly(GLcontext * ctx, const GLuint * elts, GLuint n)
}
static void
-intelRenderClippedLine(GLcontext * ctx, GLuint ii, GLuint jj)
+intelRenderClippedLine(struct gl_context * ctx, GLuint ii, GLuint jj)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -909,7 +909,7 @@ intelRenderClippedLine(GLcontext * ctx, GLuint ii, GLuint jj)
}
static void
-intelFastRenderClippedPoly(GLcontext * ctx, const GLuint * elts, GLuint n)
+intelFastRenderClippedPoly(struct gl_context * ctx, const GLuint * elts, GLuint n)
{
struct intel_context *intel = intel_context(ctx);
const GLuint vertsize = intel->vertex_size;
@@ -936,7 +936,7 @@ intelFastRenderClippedPoly(GLcontext * ctx, const GLuint * elts, GLuint n)
#define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE | DD_TRI_OFFSET | DD_TRI_UNFILLED)
void
-intelChooseRenderState(GLcontext * ctx)
+intelChooseRenderState(struct gl_context * ctx)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct intel_context *intel = intel_context(ctx);
@@ -1049,7 +1049,7 @@ static const GLenum reduced_prim[GL_POLYGON + 1] = {
static void
-intelRunPipeline(GLcontext * ctx)
+intelRunPipeline(struct gl_context * ctx)
{
struct intel_context *intel = intel_context(ctx);
@@ -1079,7 +1079,7 @@ intelRunPipeline(GLcontext * ctx)
}
static void
-intelRenderStart(GLcontext * ctx)
+intelRenderStart(struct gl_context * ctx)
{
struct intel_context *intel = intel_context(ctx);
@@ -1089,7 +1089,7 @@ intelRenderStart(GLcontext * ctx)
}
static void
-intelRenderFinish(GLcontext * ctx)
+intelRenderFinish(struct gl_context * ctx)
{
struct intel_context *intel = intel_context(ctx);
@@ -1106,7 +1106,7 @@ intelRenderFinish(GLcontext * ctx)
* primitive.
*/
static void
-intelRasterPrimitive(GLcontext * ctx, GLenum rprim, GLuint hwprim)
+intelRasterPrimitive(struct gl_context * ctx, GLenum rprim, GLuint hwprim)
{
struct intel_context *intel = intel_context(ctx);
@@ -1129,7 +1129,7 @@ intelRasterPrimitive(GLcontext * ctx, GLenum rprim, GLuint hwprim)
/*
*/
static void
-intelRenderPrimitive(GLcontext * ctx, GLenum prim)
+intelRenderPrimitive(struct gl_context * ctx, GLenum prim)
{
struct intel_context *intel = intel_context(ctx);
@@ -1201,7 +1201,7 @@ getFallbackString(GLuint bit)
void
intelFallback(struct intel_context *intel, GLbitfield bit, GLboolean mode)
{
- GLcontext *ctx = &intel->ctx;
+ struct gl_context *ctx = &intel->ctx;
TNLcontext *tnl = TNL_CONTEXT(ctx);
const GLbitfield oldfallback = intel->Fallback;
@@ -1253,7 +1253,7 @@ union fi
void
-intelInitTriFuncs(GLcontext * ctx)
+intelInitTriFuncs(struct gl_context * ctx)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
static int firsttime = 1;
diff --git a/src/mesa/drivers/dri/i915/intel_tris.h b/src/mesa/drivers/dri/i915/intel_tris.h
index 55b60a47f91..ad84de828be 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.h
+++ b/src/mesa/drivers/dri/i915/intel_tris.h
@@ -42,9 +42,9 @@
_NEW_PROGRAM | \
_NEW_POLYGONSTIPPLE)
-extern void intelInitTriFuncs(GLcontext * ctx);
+extern void intelInitTriFuncs(struct gl_context * ctx);
-extern void intelChooseRenderState(GLcontext * ctx);
+extern void intelChooseRenderState(struct gl_context * ctx);
void intel_set_prim(struct intel_context *intel, uint32_t prim);
GLuint *intel_get_prim_space(struct intel_context *intel, unsigned int count);
diff --git a/src/mesa/drivers/dri/i965/Makefile b/src/mesa/drivers/dri/i965/Makefile
index 917d39061d2..e3ca863fe51 100644
--- a/src/mesa/drivers/dri/i965/Makefile
+++ b/src/mesa/drivers/dri/i965/Makefile
@@ -108,6 +108,7 @@ CXX_SOURCES = \
brw_cubemap_normalize.cpp \
brw_fs.cpp \
brw_fs_channel_expressions.cpp \
+ brw_fs_reg_allocate.cpp \
brw_fs_vector_splitting.cpp
ASM_SOURCES =
diff --git a/src/mesa/drivers/dri/i965/brw_cc.c b/src/mesa/drivers/dri/i965/brw_cc.c
index 8430ee0cfa0..00418760da3 100644
--- a/src/mesa/drivers/dri/i965/brw_cc.c
+++ b/src/mesa/drivers/dri/i965/brw_cc.c
@@ -39,7 +39,7 @@
void
brw_update_cc_vp(struct brw_context *brw)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
struct brw_cc_viewport ccv;
memset(&ccv, 0, sizeof(ccv));
@@ -91,7 +91,7 @@ static void prepare_cc_unit(struct brw_context *brw)
static void upload_cc_unit(struct brw_context *brw)
{
struct intel_context *intel = &brw->intel;
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
struct brw_cc_unit_state cc;
void *map;
diff --git a/src/mesa/drivers/dri/i965/brw_clip.c b/src/mesa/drivers/dri/i965/brw_clip.c
index a1e9dae9154..15e60bf3ce3 100644
--- a/src/mesa/drivers/dri/i965/brw_clip.c
+++ b/src/mesa/drivers/dri/i965/brw_clip.c
@@ -159,7 +159,7 @@ static void compile_clip_prog( struct brw_context *brw,
static void upload_clip_prog(struct brw_context *brw)
{
struct intel_context *intel = &brw->intel;
- GLcontext *ctx = &intel->ctx;
+ struct gl_context *ctx = &intel->ctx;
struct brw_clip_prog_key key;
memset(&key, 0, sizeof(key));
diff --git a/src/mesa/drivers/dri/i965/brw_clip_state.c b/src/mesa/drivers/dri/i965/brw_clip_state.c
index 856d8f0c6c0..885167da908 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_state.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_state.c
@@ -49,7 +49,7 @@ struct brw_clip_unit_key {
static void
clip_unit_populate_key(struct brw_context *brw, struct brw_clip_unit_key *key)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
memset(key, 0, sizeof(*key));
/* CACHE_NEW_CLIP_PROG */
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index fa82dfda8f1..3c4ae8a7a4f 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -57,14 +57,14 @@ static void brwInitDriverFunctions( struct dd_function_table *functions )
}
GLboolean brwCreateContext( int api,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate)
{
struct dd_function_table functions;
struct brw_context *brw = (struct brw_context *) CALLOC_STRUCT(brw_context);
struct intel_context *intel = &brw->intel;
- GLcontext *ctx = &intel->ctx;
+ struct gl_context *ctx = &intel->ctx;
unsigned i;
if (!brw) {
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 71e6d8ef895..335339515a2 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -173,8 +173,6 @@ struct brw_fragment_program {
GLuint id; /**< serial no. to identify frag progs, never re-used */
GLboolean isGLSL; /**< really, any IF/LOOP/CONT/BREAK instructions */
- GLboolean use_const_buffer;
-
/** for debugging, which texture units are referenced */
GLbitfield tex_units_used;
};
@@ -190,6 +188,13 @@ struct brw_shader_program {
struct gl_shader_program base;
};
+enum param_conversion {
+ PARAM_NO_CONVERT,
+ PARAM_CONVERT_F2I,
+ PARAM_CONVERT_F2U,
+ PARAM_CONVERT_F2B,
+};
+
/* Data about a particular attempt to compile a program. Note that
* there can be many of these, each in a different GL state
* corresponding to a different brw_wm_prog_key struct, with different
@@ -204,12 +209,16 @@ struct brw_wm_prog_data {
GLuint total_scratch;
GLuint nr_params; /**< number of float params/constants */
+ GLuint nr_pull_params;
GLboolean error;
/* Pointer to tracked values (only valid once
* _mesa_load_state_parameters has been called at runtime).
*/
- const GLfloat *param[BRW_MAX_CURBE];
+ const float *param[MAX_UNIFORMS * 4]; /* should be: BRW_MAX_CURBE */
+ enum param_conversion param_convert[MAX_UNIFORMS * 4];
+ const float *pull_param[MAX_UNIFORMS * 4];
+ enum param_conversion pull_param_convert[MAX_UNIFORMS * 4];
};
struct brw_sf_prog_data {
@@ -719,7 +728,7 @@ void brwInitVtbl( struct brw_context *brw );
* brw_context.c
*/
GLboolean brwCreateContext( int api,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate);
@@ -763,15 +772,15 @@ void brw_upload_cs_urb_state(struct brw_context *brw);
int brw_disasm (FILE *file, struct brw_instruction *inst, int gen);
/* brw_state.c */
-void brw_enable(GLcontext * ctx, GLenum cap, GLboolean state);
-void brw_depth_range(GLcontext *ctx, GLclampd nearval, GLclampd farval);
+void brw_enable(struct gl_context * ctx, GLenum cap, GLboolean state);
+void brw_depth_range(struct gl_context *ctx, GLclampd nearval, GLclampd farval);
/*======================================================================
* Inline conversion functions. These are better-typed than the
* macros used previously:
*/
static INLINE struct brw_context *
-brw_context( GLcontext *ctx )
+brw_context( struct gl_context *ctx )
{
return (struct brw_context *)ctx;
}
@@ -800,6 +809,35 @@ brw_fragment_program_const(const struct gl_fragment_program *p)
return (const struct brw_fragment_program *) p;
}
+static inline
+float convert_param(enum param_conversion conversion, float param)
+{
+ union {
+ float f;
+ uint32_t u;
+ int32_t i;
+ } fi;
+
+ switch (conversion) {
+ case PARAM_NO_CONVERT:
+ return param;
+ case PARAM_CONVERT_F2I:
+ fi.i = param;
+ return fi.f;
+ case PARAM_CONVERT_F2U:
+ fi.u = param;
+ return fi.f;
+ case PARAM_CONVERT_F2B:
+ if (param != 0.0)
+ fi.i = 1;
+ else
+ fi.i = 0;
+ return fi.f;
+ default:
+ return param;
+ }
+}
+
GLboolean brw_do_cubemap_normalize(struct exec_list *instructions);
#endif
diff --git a/src/mesa/drivers/dri/i965/brw_curbe.c b/src/mesa/drivers/dri/i965/brw_curbe.c
index 8196d8ca625..7b823eb201b 100644
--- a/src/mesa/drivers/dri/i965/brw_curbe.c
+++ b/src/mesa/drivers/dri/i965/brw_curbe.c
@@ -55,7 +55,7 @@
*/
static void calculate_curbe_offsets( struct brw_context *brw )
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
/* CACHE_NEW_WM_PROG */
const GLuint nr_fp_regs = (brw->wm.prog_data->nr_params + 15) / 16;
@@ -179,7 +179,7 @@ static GLfloat fixed_plane[6][4] = {
*/
static void prepare_constant_buffer(struct brw_context *brw)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
const struct brw_vertex_program *vp =
brw_vertex_program_const(brw->vertex_program);
const GLuint sz = brw->curbe.total_size;
@@ -199,8 +199,10 @@ static void prepare_constant_buffer(struct brw_context *brw)
GLuint offset = brw->curbe.wm_start * 16;
/* copy float constants */
- for (i = 0; i < brw->wm.prog_data->nr_params; i++)
- buf[offset + i] = *brw->wm.prog_data->param[i];
+ for (i = 0; i < brw->wm.prog_data->nr_params; i++) {
+ buf[offset + i] = convert_param(brw->wm.prog_data->param_convert[i],
+ *brw->wm.prog_data->param[i]);
+ }
}
diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h
index 9633c95ff50..6c3db61035a 100644
--- a/src/mesa/drivers/dri/i965/brw_defines.h
+++ b/src/mesa/drivers/dri/i965/brw_defines.h
@@ -551,6 +551,7 @@
#define BRW_OPCODE_POP 47
#define BRW_OPCODE_WAIT 48
#define BRW_OPCODE_SEND 49
+#define BRW_OPCODE_SENDC 50
#define BRW_OPCODE_MATH 56
#define BRW_OPCODE_ADD 64
#define BRW_OPCODE_MUL 65
diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c b/src/mesa/drivers/dri/i965/brw_disasm.c
index 12b8f2e4678..962c04128b8 100644
--- a/src/mesa/drivers/dri/i965/brw_disasm.c
+++ b/src/mesa/drivers/dri/i965/brw_disasm.c
@@ -72,6 +72,7 @@ struct {
[BRW_OPCODE_CMPN] = { .name = "cmpn", .nsrc = 2, .ndst = 1 },
[BRW_OPCODE_SEND] = { .name = "send", .nsrc = 1, .ndst = 1 },
+ [BRW_OPCODE_SENDC] = { .name = "sendc", .nsrc = 1, .ndst = 1 },
[BRW_OPCODE_NOP] = { .name = "nop", .nsrc = 0, .ndst = 0 },
[BRW_OPCODE_JMPI] = { .name = "jmpi", .nsrc = 1, .ndst = 0 },
[BRW_OPCODE_IF] = { .name = "if", .nsrc = 2, .ndst = 0 },
@@ -460,6 +461,9 @@ static int reg (FILE *file, GLuint _reg_file, GLuint _reg_nr)
case BRW_ARF_ACCUMULATOR:
format (file, "acc%d", _reg_nr & 0x0f);
break;
+ case BRW_ARF_FLAG:
+ format (file, "f%d", _reg_nr & 0x0f);
+ break;
case BRW_ARF_MASK:
format (file, "mask%d", _reg_nr & 0x0f);
break;
@@ -876,7 +880,8 @@ int brw_disasm (FILE *file, struct brw_instruction *inst, int gen)
string (file, " ");
err |= control (file, "function", math_function,
inst->header.destreg__conditionalmod, NULL);
- } else if (inst->header.opcode != BRW_OPCODE_SEND)
+ } else if (inst->header.opcode != BRW_OPCODE_SEND &&
+ inst->header.opcode != BRW_OPCODE_SENDC)
err |= control (file, "conditional modifier", conditional_modifier,
inst->header.destreg__conditionalmod, NULL);
@@ -907,7 +912,8 @@ int brw_disasm (FILE *file, struct brw_instruction *inst, int gen)
err |= src1 (file, inst);
}
- if (inst->header.opcode == BRW_OPCODE_SEND) {
+ if (inst->header.opcode == BRW_OPCODE_SEND ||
+ inst->header.opcode == BRW_OPCODE_SENDC) {
int target;
if (gen >= 6)
@@ -1070,7 +1076,8 @@ int brw_disasm (FILE *file, struct brw_instruction *inst, int gen)
err |= control (file, "thread control", thread_ctrl, inst->header.thread_control, &space);
if (gen >= 6)
err |= control (file, "acc write control", accwr, inst->header.acc_wr_control, &space);
- if (inst->header.opcode == BRW_OPCODE_SEND)
+ if (inst->header.opcode == BRW_OPCODE_SEND ||
+ inst->header.opcode == BRW_OPCODE_SENDC)
err |= control (file, "end of thread", end_of_thread,
inst->bits3.generic.end_of_thread, &space);
if (space)
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index 6a4dda2a40f..04bc8cb2db0 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -80,7 +80,7 @@ static const GLenum reduced_prim[GL_POLYGON+1] = {
static GLuint brw_set_prim(struct brw_context *brw,
const struct _mesa_prim *prim)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
GLenum mode = prim->mode;
if (INTEL_DEBUG & DEBUG_PRIMS)
@@ -201,16 +201,9 @@ static GLboolean check_fallbacks( struct brw_context *brw,
const struct _mesa_prim *prim,
GLuint nr_prims )
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
GLuint i;
- /* XXX FIXME */
- if (brw->intel.gen >= 6) {
- for (i = 0; i < nr_prims; i++)
- if (prim[i].mode == GL_LINE_LOOP)
- return GL_TRUE;
- }
-
/* If we don't require strict OpenGL conformance, never
* use fallbacks. If we're forcing fallbacks, always
* use fallfacks.
@@ -300,7 +293,7 @@ static GLboolean check_fallbacks( struct brw_context *brw,
/* May fail if out of video memory for texture or vbo upload, or on
* fallback conditions.
*/
-static GLboolean brw_try_draw_prims( GLcontext *ctx,
+static GLboolean brw_try_draw_prims( struct gl_context *ctx,
const struct gl_client_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
@@ -423,7 +416,7 @@ static GLboolean brw_try_draw_prims( GLcontext *ctx,
return retval;
}
-void brw_draw_prims( GLcontext *ctx,
+void brw_draw_prims( struct gl_context *ctx,
const struct gl_client_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
@@ -441,7 +434,7 @@ void brw_draw_prims( GLcontext *ctx,
/* Decide if we want to rebase. If so we end up recursing once
* only into this function.
*/
- if (min_index != 0) {
+ if (min_index != 0 && !vbo_any_varyings_in_vbos(arrays)) {
vbo_rebase_prims(ctx, arrays,
prim, nr_prims,
ib, min_index, max_index,
@@ -467,7 +460,7 @@ void brw_draw_prims( GLcontext *ctx,
void brw_draw_init( struct brw_context *brw )
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
struct vbo_context *vbo = vbo_context(ctx);
/* Register our drawing function:
diff --git a/src/mesa/drivers/dri/i965/brw_draw.h b/src/mesa/drivers/dri/i965/brw_draw.h
index 2a14db217fc..1fe417296f6 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.h
+++ b/src/mesa/drivers/dri/i965/brw_draw.h
@@ -28,13 +28,13 @@
#ifndef BRW_DRAW_H
#define BRW_DRAW_H
-#include "main/mtypes.h" /* for GLcontext... */
+#include "main/mtypes.h" /* for struct gl_context... */
#include "vbo/vbo.h"
struct brw_context;
-void brw_draw_prims( GLcontext *ctx,
+void brw_draw_prims( struct gl_context *ctx,
const struct gl_client_array *arrays[],
const struct _mesa_prim *prims,
GLuint nr_prims,
@@ -48,7 +48,7 @@ void brw_draw_destroy( struct brw_context *brw );
/* brw_draw_current.c
*/
-void brw_init_current_values(GLcontext *ctx,
+void brw_init_current_values(struct gl_context *ctx,
struct gl_client_array *arrays);
#endif
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index 249e874ab1a..c4654360d46 100644
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
@@ -313,7 +313,7 @@ copy_array_to_vbo_array( struct brw_context *brw,
static void brw_prepare_vertices(struct brw_context *brw)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
struct intel_context *intel = intel_context(ctx);
GLbitfield vs_inputs = brw->vs.prog_data->inputs_read;
GLuint i;
@@ -383,7 +383,7 @@ static void brw_prepare_vertices(struct brw_context *brw)
*/
assert(input->offset < input->bo->size);
} else {
- input->count = input->glarray->StrideB ? max_index + 1 - min_index : 1;
+ input->count = input->glarray->StrideB ? max_index + 1 : 1;
if (input->bo != NULL) {
/* Already-uploaded vertex data is present from a previous
* prepare_vertices, but we had to re-validate state due to
@@ -414,15 +414,6 @@ static void brw_prepare_vertices(struct brw_context *brw)
}
upload[nr_uploads++] = input;
-
- /* We rebase drawing to start at element zero only when
- * varyings are not in vbos, which means we can end up
- * uploading non-varying arrays (stride != 0) when min_index
- * is zero. This doesn't matter as the amount to upload is
- * the same for these arrays whether the draw call is rebased
- * or not - we just have to upload the one element.
- */
- assert(min_index == 0 || input->glarray->StrideB == 0);
}
}
@@ -460,7 +451,7 @@ static void brw_prepare_vertices(struct brw_context *brw)
static void brw_emit_vertices(struct brw_context *brw)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
struct intel_context *intel = intel_context(ctx);
GLuint i;
@@ -592,7 +583,7 @@ const struct brw_tracked_state brw_vertices = {
static void brw_prepare_indices(struct brw_context *brw)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
struct intel_context *intel = &brw->intel;
const struct _mesa_index_buffer *index_buffer = brw->ib.ib;
GLuint ib_size;
diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h
index c0deb238c2c..b4538e6e8a7 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.h
+++ b/src/mesa/drivers/dri/i965/brw_eu.h
@@ -789,6 +789,10 @@ struct brw_instruction *brw_##OP(struct brw_compile *p, \
struct brw_reg src0, \
struct brw_reg src1);
+#define ROUND(OP) \
+void brw_##OP(struct brw_compile *p, struct brw_reg dest, struct brw_reg src0);
+
+
ALU1(MOV)
ALU2(SEL)
ALU1(NOT)
@@ -805,7 +809,6 @@ ALU2(ADD)
ALU2(MUL)
ALU1(FRC)
ALU1(RNDD)
-ALU1(RNDZ)
ALU2(MAC)
ALU2(MACH)
ALU1(LZD)
@@ -816,9 +819,12 @@ ALU2(DP2)
ALU2(LINE)
ALU2(PLN)
+ROUND(RNDZ)
+ROUND(RNDE)
+
#undef ALU1
#undef ALU2
-
+#undef ROUND
/* Helpers for SEND instruction:
@@ -891,15 +897,27 @@ void brw_math2(struct brw_compile *p,
struct brw_reg src0,
struct brw_reg src1);
-void brw_dp_READ_16( struct brw_compile *p,
- struct brw_reg dest,
- GLuint scratch_offset );
+void brw_oword_block_read(struct brw_compile *p,
+ struct brw_reg dest,
+ struct brw_reg mrf,
+ uint32_t offset,
+ uint32_t bind_table_index);
-void brw_dp_READ_4( struct brw_compile *p,
- struct brw_reg dest,
- GLboolean relAddr,
- GLuint location,
- GLuint bind_table_index );
+void brw_oword_block_read_scratch(struct brw_compile *p,
+ struct brw_reg dest,
+ struct brw_reg mrf,
+ int num_regs,
+ GLuint offset);
+
+void brw_oword_block_write_scratch(struct brw_compile *p,
+ struct brw_reg mrf,
+ int num_regs,
+ GLuint offset);
+
+void brw_dword_scattered_read(struct brw_compile *p,
+ struct brw_reg dest,
+ struct brw_reg mrf,
+ uint32_t bind_table_index);
void brw_dp_READ_4_vs( struct brw_compile *p,
struct brw_reg dest,
@@ -912,15 +930,13 @@ void brw_dp_READ_4_vs_relative(struct brw_compile *p,
GLuint offset,
GLuint bind_table_index);
-void brw_dp_WRITE_16( struct brw_compile *p,
- struct brw_reg src,
- GLuint scratch_offset );
-
/* If/else/endif. Works by manipulating the execution flags on each
* channel.
*/
struct brw_instruction *brw_IF(struct brw_compile *p,
GLuint execute_size);
+struct brw_instruction *brw_IF_gen6(struct brw_compile *p, uint32_t conditional,
+ struct brw_reg src0, struct brw_reg src1);
struct brw_instruction *brw_ELSE(struct brw_compile *p,
struct brw_instruction *if_insn);
diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c
index 419b40ba84b..9cb99a2b999 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
@@ -496,20 +496,34 @@ static void brw_set_dp_write_message( struct brw_context *brw,
}
}
-static void brw_set_dp_read_message( struct brw_context *brw,
- struct brw_instruction *insn,
- GLuint binding_table_index,
- GLuint msg_control,
- GLuint msg_type,
- GLuint target_cache,
- GLuint msg_length,
- GLuint response_length,
- GLuint end_of_thread )
+static void
+brw_set_dp_read_message(struct brw_context *brw,
+ struct brw_instruction *insn,
+ GLuint binding_table_index,
+ GLuint msg_control,
+ GLuint msg_type,
+ GLuint target_cache,
+ GLuint msg_length,
+ GLuint response_length)
{
struct intel_context *intel = &brw->intel;
brw_set_src1(insn, brw_imm_d(0));
- if (intel->gen == 5) {
+ if (intel->gen >= 6) {
+ insn->bits3.dp_render_cache.binding_table_index = binding_table_index;
+ insn->bits3.dp_render_cache.msg_control = msg_control;
+ insn->bits3.dp_render_cache.pixel_scoreboard_clear = 0;
+ insn->bits3.dp_render_cache.msg_type = msg_type;
+ insn->bits3.dp_render_cache.send_commit_msg = 0;
+ insn->bits3.dp_render_cache.header_present = 1;
+ insn->bits3.dp_render_cache.response_length = response_length;
+ insn->bits3.dp_render_cache.msg_length = msg_length;
+ insn->bits3.dp_render_cache.end_of_thread = 0;
+ insn->header.destreg__conditionalmod = BRW_MESSAGE_TARGET_DATAPORT_READ;
+ /* XXX really need below? */
+ insn->bits2.send_gen5.sfid = BRW_MESSAGE_TARGET_DATAPORT_READ;
+ insn->bits2.send_gen5.end_of_thread = 0;
+ } else if (intel->gen == 5) {
insn->bits3.dp_read_gen5.binding_table_index = binding_table_index;
insn->bits3.dp_read_gen5.msg_control = msg_control;
insn->bits3.dp_read_gen5.msg_type = msg_type;
@@ -518,9 +532,9 @@ static void brw_set_dp_read_message( struct brw_context *brw,
insn->bits3.dp_read_gen5.response_length = response_length;
insn->bits3.dp_read_gen5.msg_length = msg_length;
insn->bits3.dp_read_gen5.pad1 = 0;
- insn->bits3.dp_read_gen5.end_of_thread = end_of_thread;
+ insn->bits3.dp_read_gen5.end_of_thread = 0;
insn->bits2.send_gen5.sfid = BRW_MESSAGE_TARGET_DATAPORT_READ;
- insn->bits2.send_gen5.end_of_thread = end_of_thread;
+ insn->bits2.send_gen5.end_of_thread = 0;
} else {
insn->bits3.dp_read.binding_table_index = binding_table_index; /*0:7*/
insn->bits3.dp_read.msg_control = msg_control; /*8:11*/
@@ -530,7 +544,7 @@ static void brw_set_dp_read_message( struct brw_context *brw,
insn->bits3.dp_read.msg_length = msg_length; /*20:23*/
insn->bits3.dp_read.msg_target = BRW_MESSAGE_TARGET_DATAPORT_READ; /*24:27*/
insn->bits3.dp_read.pad1 = 0; /*28:30*/
- insn->bits3.dp_read.end_of_thread = end_of_thread; /*31*/
+ insn->bits3.dp_read.end_of_thread = 0; /*31*/
}
}
@@ -654,6 +668,26 @@ struct brw_instruction *brw_##OP(struct brw_compile *p, \
return brw_alu2(p, BRW_OPCODE_##OP, dest, src0, src1); \
}
+/* Rounding operations (other than RNDD) require two instructions - the first
+ * stores a rounded value (possibly the wrong way) in the dest register, but
+ * also sets a per-channel "increment bit" in the flag register. A predicated
+ * add of 1.0 fixes dest to contain the desired result.
+ */
+#define ROUND(OP) \
+void brw_##OP(struct brw_compile *p, \
+ struct brw_reg dest, \
+ struct brw_reg src) \
+{ \
+ struct brw_instruction *rnd, *add; \
+ rnd = next_insn(p, BRW_OPCODE_##OP); \
+ brw_set_dest(rnd, dest); \
+ brw_set_src0(rnd, src); \
+ rnd->header.destreg__conditionalmod = 0x7; /* turn on round-increments */ \
+ \
+ add = brw_ADD(p, dest, dest, brw_imm_f(1.0f)); \
+ add->header.predicate_control = BRW_PREDICATE_NORMAL; \
+}
+
ALU1(MOV)
ALU2(SEL)
@@ -668,7 +702,6 @@ ALU2(RSL)
ALU2(ASR)
ALU1(FRC)
ALU1(RNDD)
-ALU1(RNDZ)
ALU2(MAC)
ALU2(MACH)
ALU1(LZD)
@@ -679,6 +712,11 @@ ALU2(DP2)
ALU2(LINE)
ALU2(PLN)
+
+ROUND(RNDZ)
+ROUND(RNDE)
+
+
struct brw_instruction *brw_ADD(struct brw_compile *p,
struct brw_reg dest,
struct brw_reg src0,
@@ -807,8 +845,9 @@ struct brw_instruction *brw_IF(struct brw_compile *p, GLuint execute_size)
brw_set_src1(insn, brw_imm_d(0x0));
} else {
brw_set_dest(insn, brw_imm_w(0));
- brw_set_src0(insn, brw_null_reg());
- brw_set_src1(insn, brw_null_reg());
+ insn->bits1.branch_gen6.jump_count = 0;
+ brw_set_src0(insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D));
+ brw_set_src1(insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D));
}
insn->header.execution_size = execute_size;
@@ -823,6 +862,29 @@ struct brw_instruction *brw_IF(struct brw_compile *p, GLuint execute_size)
return insn;
}
+struct brw_instruction *
+brw_IF_gen6(struct brw_compile *p, uint32_t conditional,
+ struct brw_reg src0, struct brw_reg src1)
+{
+ struct brw_instruction *insn;
+
+ insn = next_insn(p, BRW_OPCODE_IF);
+
+ brw_set_dest(insn, brw_imm_w(0));
+ insn->header.execution_size = BRW_EXECUTE_8;
+ insn->bits1.branch_gen6.jump_count = 0;
+ brw_set_src0(insn, src0);
+ brw_set_src1(insn, src1);
+
+ assert(insn->header.compression_control == BRW_COMPRESSION_NONE);
+ assert(insn->header.predicate_control == BRW_PREDICATE_NONE);
+ insn->header.destreg__conditionalmod = conditional;
+
+ if (!p->single_program_flow)
+ insn->header.thread_control = BRW_THREAD_SWITCH;
+
+ return insn;
+}
struct brw_instruction *brw_ELSE(struct brw_compile *p,
struct brw_instruction *if_insn)
@@ -848,8 +910,9 @@ struct brw_instruction *brw_ELSE(struct brw_compile *p,
brw_set_src1(insn, brw_imm_d(0x0));
} else {
brw_set_dest(insn, brw_imm_w(0));
- brw_set_src0(insn, brw_null_reg());
- brw_set_src1(insn, brw_null_reg());
+ insn->bits1.branch_gen6.jump_count = 0;
+ brw_set_src0(insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D));
+ brw_set_src1(insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D));
}
insn->header.compression_control = BRW_COMPRESSION_NONE;
@@ -907,8 +970,8 @@ void brw_ENDIF(struct brw_compile *p,
brw_set_src1(insn, brw_imm_d(0x0));
} else {
brw_set_dest(insn, retype(brw_vec4_grf(0,0), BRW_REGISTER_TYPE_W));
- brw_set_src0(insn, brw_null_reg());
- brw_set_src1(insn, brw_null_reg());
+ brw_set_src0(insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D));
+ brw_set_src1(insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D));
}
insn->header.compression_control = BRW_COMPRESSION_NONE;
@@ -916,7 +979,10 @@ void brw_ENDIF(struct brw_compile *p,
insn->header.mask_control = BRW_MASK_ENABLE;
insn->header.thread_control = BRW_THREAD_SWITCH;
- assert(patch_insn->bits3.if_else.jump_count == 0);
+ if (intel->gen < 6)
+ assert(patch_insn->bits3.if_else.jump_count == 0);
+ else
+ assert(patch_insn->bits1.branch_gen6.jump_count == 0);
/* Patch the if or else instructions to point at this or the next
* instruction respectively.
@@ -1147,6 +1213,17 @@ void brw_math( struct brw_compile *p,
if (intel->gen >= 6) {
struct brw_instruction *insn = next_insn(p, BRW_OPCODE_MATH);
+ assert(dest.file == BRW_GENERAL_REGISTER_FILE);
+ assert(src.file == BRW_GENERAL_REGISTER_FILE);
+
+ assert(dest.hstride == BRW_HORIZONTAL_STRIDE_1);
+ assert(src.hstride == BRW_HORIZONTAL_STRIDE_1);
+
+ if (function != BRW_MATH_FUNCTION_INT_DIV_QUOTIENT &&
+ function != BRW_MATH_FUNCTION_INT_DIV_QUOTIENT_AND_REMAINDER) {
+ assert(src.type == BRW_REGISTER_TYPE_F);
+ }
+
/* Math is the same ISA format as other opcodes, except that CondModifier
* becomes FC[3:0] and ThreadCtrl becomes FC[5:4].
*/
@@ -1190,6 +1267,22 @@ void brw_math2(struct brw_compile *p,
struct brw_instruction *insn = next_insn(p, BRW_OPCODE_MATH);
assert(intel->gen >= 6);
+ (void) intel;
+
+
+ assert(dest.file == BRW_GENERAL_REGISTER_FILE);
+ assert(src0.file == BRW_GENERAL_REGISTER_FILE);
+ assert(src1.file == BRW_GENERAL_REGISTER_FILE);
+
+ assert(dest.hstride == BRW_HORIZONTAL_STRIDE_1);
+ assert(src0.hstride == BRW_HORIZONTAL_STRIDE_1);
+ assert(src1.hstride == BRW_HORIZONTAL_STRIDE_1);
+
+ if (function != BRW_MATH_FUNCTION_INT_DIV_QUOTIENT &&
+ function != BRW_MATH_FUNCTION_INT_DIV_QUOTIENT_AND_REMAINDER) {
+ assert(src0.type == BRW_REGISTER_TYPE_F);
+ assert(src1.type == BRW_REGISTER_TYPE_F);
+ }
/* Math is the same ISA format as other opcodes, except that CondModifier
* becomes FC[3:0] and ThreadCtrl becomes FC[5:4].
@@ -1274,38 +1367,66 @@ void brw_math_16( struct brw_compile *p,
/**
- * Write block of 16 dwords/floats to the data port Render Cache scratch buffer.
- * Scratch offset should be a multiple of 64.
- * Used for register spilling.
+ * Write a block of OWORDs (half a GRF each) from the scratch buffer,
+ * using a constant offset per channel.
+ *
+ * The offset must be aligned to oword size (16 bytes). Used for
+ * register spilling.
*/
-void brw_dp_WRITE_16( struct brw_compile *p,
- struct brw_reg src,
- GLuint scratch_offset )
+void brw_oword_block_write_scratch(struct brw_compile *p,
+ struct brw_reg mrf,
+ int num_regs,
+ GLuint offset)
{
struct intel_context *intel = &p->brw->intel;
- GLuint msg_reg_nr = 1;
+ uint32_t msg_control;
+ int mlen;
+
+ mrf = retype(mrf, BRW_REGISTER_TYPE_UD);
+
+ if (num_regs == 1) {
+ msg_control = BRW_DATAPORT_OWORD_BLOCK_2_OWORDS;
+ mlen = 2;
+ } else {
+ msg_control = BRW_DATAPORT_OWORD_BLOCK_4_OWORDS;
+ mlen = 3;
+ }
+
+ /* Set up the message header. This is g0, with g0.2 filled with
+ * the offset. We don't want to leave our offset around in g0 or
+ * it'll screw up texture samples, so set it up inside the message
+ * reg.
+ */
{
brw_push_insn_state(p);
brw_set_mask_control(p, BRW_MASK_DISABLE);
brw_set_compression_control(p, BRW_COMPRESSION_NONE);
+ brw_MOV(p, mrf, retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UD));
+
/* set message header global offset field (reg 0, element 2) */
brw_MOV(p,
- retype(brw_vec1_grf(0, 2), BRW_REGISTER_TYPE_D),
- brw_imm_d(scratch_offset));
+ retype(brw_vec1_reg(BRW_MESSAGE_REGISTER_FILE,
+ mrf.nr,
+ 2), BRW_REGISTER_TYPE_UD),
+ brw_imm_ud(offset));
brw_pop_insn_state(p);
}
{
- GLuint msg_length = 3;
struct brw_reg dest;
struct brw_instruction *insn = next_insn(p, BRW_OPCODE_SEND);
int send_commit_msg;
+ struct brw_reg src_header = retype(brw_vec8_grf(0, 0),
+ BRW_REGISTER_TYPE_UW);
- insn->header.predicate_control = 0; /* XXX */
- insn->header.compression_control = BRW_COMPRESSION_NONE;
- insn->header.destreg__conditionalmod = msg_reg_nr;
+ if (insn->header.compression_control != BRW_COMPRESSION_NONE) {
+ insn->header.compression_control = BRW_COMPRESSION_NONE;
+ src_header = vec16(src_header);
+ }
+ assert(insn->header.predicate_control == BRW_PREDICATE_NONE);
+ insn->header.destreg__conditionalmod = mrf.nr;
/* Until gen6, writes followed by reads from the same location
* are not guaranteed to be ordered unless write_commit is set.
@@ -1321,19 +1442,19 @@ void brw_dp_WRITE_16( struct brw_compile *p,
dest = retype(vec16(brw_null_reg()), BRW_REGISTER_TYPE_UW);
send_commit_msg = 0;
} else {
- dest = brw_uw16_grf(0, 0);
+ dest = src_header;
send_commit_msg = 1;
}
brw_set_dest(insn, dest);
- brw_set_src0(insn, src);
+ brw_set_src0(insn, brw_null_reg());
brw_set_dp_write_message(p->brw,
insn,
255, /* binding table index (255=stateless) */
- BRW_DATAPORT_OWORD_BLOCK_4_OWORDS, /* msg_control */
+ msg_control,
BRW_DATAPORT_WRITE_MESSAGE_OWORD_BLOCK_WRITE, /* msg_type */
- msg_length,
+ mlen,
GL_TRUE, /* header_present */
0, /* pixel scoreboard */
send_commit_msg, /* response_length */
@@ -1344,108 +1465,169 @@ void brw_dp_WRITE_16( struct brw_compile *p,
/**
- * Read block of 16 dwords/floats from the data port Render Cache scratch buffer.
- * Scratch offset should be a multiple of 64.
- * Used for register spilling.
+ * Read a block of owords (half a GRF each) from the scratch buffer
+ * using a constant index per channel.
+ *
+ * Offset must be aligned to oword size (16 bytes). Used for register
+ * spilling.
*/
-void brw_dp_READ_16( struct brw_compile *p,
- struct brw_reg dest,
- GLuint scratch_offset )
+void
+brw_oword_block_read_scratch(struct brw_compile *p,
+ struct brw_reg dest,
+ struct brw_reg mrf,
+ int num_regs,
+ GLuint offset)
{
- GLuint msg_reg_nr = 1;
+ uint32_t msg_control;
+ int rlen;
+
+ mrf = retype(mrf, BRW_REGISTER_TYPE_UD);
+ dest = retype(dest, BRW_REGISTER_TYPE_UW);
+
+ if (num_regs == 1) {
+ msg_control = BRW_DATAPORT_OWORD_BLOCK_2_OWORDS;
+ rlen = 1;
+ } else {
+ msg_control = BRW_DATAPORT_OWORD_BLOCK_4_OWORDS;
+ rlen = 2;
+ }
+
{
brw_push_insn_state(p);
brw_set_compression_control(p, BRW_COMPRESSION_NONE);
brw_set_mask_control(p, BRW_MASK_DISABLE);
+ brw_MOV(p, mrf, retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UD));
+
/* set message header global offset field (reg 0, element 2) */
brw_MOV(p,
- retype(brw_vec1_grf(0, 2), BRW_REGISTER_TYPE_D),
- brw_imm_d(scratch_offset));
+ retype(brw_vec1_reg(BRW_MESSAGE_REGISTER_FILE,
+ mrf.nr,
+ 2), BRW_REGISTER_TYPE_UD),
+ brw_imm_ud(offset));
brw_pop_insn_state(p);
}
{
struct brw_instruction *insn = next_insn(p, BRW_OPCODE_SEND);
-
- insn->header.predicate_control = 0; /* XXX */
- insn->header.compression_control = BRW_COMPRESSION_NONE;
- insn->header.destreg__conditionalmod = msg_reg_nr;
-
+
+ assert(insn->header.predicate_control == 0);
+ insn->header.compression_control = BRW_COMPRESSION_NONE;
+ insn->header.destreg__conditionalmod = mrf.nr;
+
brw_set_dest(insn, dest); /* UW? */
- brw_set_src0(insn, retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UW));
+ brw_set_src0(insn, brw_null_reg());
brw_set_dp_read_message(p->brw,
insn,
255, /* binding table index (255=stateless) */
- BRW_DATAPORT_OWORD_BLOCK_4_OWORDS,
+ msg_control,
BRW_DATAPORT_READ_MESSAGE_OWORD_BLOCK_READ, /* msg_type */
1, /* target cache (render/scratch) */
1, /* msg_length */
- 2, /* response_length */
- 0); /* eot */
+ rlen);
}
}
-
/**
* Read a float[4] vector from the data port Data Cache (const buffer).
* Location (in buffer) should be a multiple of 16.
* Used for fetching shader constants.
- * If relAddr is true, we'll do an indirect fetch using the address register.
*/
-void brw_dp_READ_4( struct brw_compile *p,
- struct brw_reg dest,
- GLboolean relAddr,
- GLuint location,
- GLuint bind_table_index )
+void brw_oword_block_read(struct brw_compile *p,
+ struct brw_reg dest,
+ struct brw_reg mrf,
+ uint32_t offset,
+ uint32_t bind_table_index)
{
- /* XXX: relAddr not implemented */
- GLuint msg_reg_nr = 1;
- {
- struct brw_reg b;
- brw_push_insn_state(p);
- brw_set_predicate_control(p, BRW_PREDICATE_NONE);
- brw_set_compression_control(p, BRW_COMPRESSION_NONE);
- brw_set_mask_control(p, BRW_MASK_DISABLE);
+ struct intel_context *intel = &p->brw->intel;
- /* Setup MRF[1] with location/offset into const buffer */
- b = brw_message_reg(msg_reg_nr);
- b = retype(b, BRW_REGISTER_TYPE_UD);
- /* XXX I think we're setting all the dwords of MRF[1] to 'location'.
- * when the docs say only dword[2] should be set. Hmmm. But it works.
- */
- brw_MOV(p, b, brw_imm_ud(location));
- brw_pop_insn_state(p);
- }
+ /* On newer hardware, offset is in units of owords. */
+ if (intel->gen >= 6)
+ offset /= 16;
- {
- struct brw_instruction *insn = next_insn(p, BRW_OPCODE_SEND);
-
- insn->header.predicate_control = BRW_PREDICATE_NONE;
- insn->header.compression_control = BRW_COMPRESSION_NONE;
- insn->header.destreg__conditionalmod = msg_reg_nr;
- insn->header.mask_control = BRW_MASK_DISABLE;
-
- /* cast dest to a uword[8] vector */
- dest = retype(vec8(dest), BRW_REGISTER_TYPE_UW);
+ mrf = retype(mrf, BRW_REGISTER_TYPE_UD);
- brw_set_dest(insn, dest);
- brw_set_src0(insn, brw_null_reg());
+ brw_push_insn_state(p);
+ brw_set_predicate_control(p, BRW_PREDICATE_NONE);
+ brw_set_compression_control(p, BRW_COMPRESSION_NONE);
+ brw_set_mask_control(p, BRW_MASK_DISABLE);
- brw_set_dp_read_message(p->brw,
- insn,
- bind_table_index,
- 0, /* msg_control (0 means 1 Oword) */
- BRW_DATAPORT_READ_MESSAGE_OWORD_BLOCK_READ, /* msg_type */
- 0, /* source cache = data cache */
- 1, /* msg_length */
- 1, /* response_length (1 Oword) */
- 0); /* eot */
+ brw_MOV(p, mrf, retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UD));
+
+ /* set message header global offset field (reg 0, element 2) */
+ brw_MOV(p,
+ retype(brw_vec1_reg(BRW_MESSAGE_REGISTER_FILE,
+ mrf.nr,
+ 2), BRW_REGISTER_TYPE_UD),
+ brw_imm_ud(offset));
+
+ struct brw_instruction *insn = next_insn(p, BRW_OPCODE_SEND);
+ insn->header.destreg__conditionalmod = mrf.nr;
+
+ /* cast dest to a uword[8] vector */
+ dest = retype(vec8(dest), BRW_REGISTER_TYPE_UW);
+
+ brw_set_dest(insn, dest);
+ if (intel->gen >= 6) {
+ brw_set_src0(insn, mrf);
+ } else {
+ brw_set_src0(insn, brw_null_reg());
}
+
+ brw_set_dp_read_message(p->brw,
+ insn,
+ bind_table_index,
+ BRW_DATAPORT_OWORD_BLOCK_1_OWORDLOW,
+ BRW_DATAPORT_READ_MESSAGE_OWORD_BLOCK_READ,
+ 0, /* source cache = data cache */
+ 1, /* msg_length */
+ 1); /* response_length (1 reg, 2 owords!) */
+
+ brw_pop_insn_state(p);
}
+/**
+ * Read a set of dwords from the data port Data Cache (const buffer).
+ *
+ * Location (in buffer) appears as UD offsets in the register after
+ * the provided mrf header reg.
+ */
+void brw_dword_scattered_read(struct brw_compile *p,
+ struct brw_reg dest,
+ struct brw_reg mrf,
+ uint32_t bind_table_index)
+{
+ mrf = retype(mrf, BRW_REGISTER_TYPE_UD);
+
+ brw_push_insn_state(p);
+ brw_set_predicate_control(p, BRW_PREDICATE_NONE);
+ brw_set_compression_control(p, BRW_COMPRESSION_NONE);
+ brw_set_mask_control(p, BRW_MASK_DISABLE);
+ brw_MOV(p, mrf, retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UD));
+ brw_pop_insn_state(p);
+
+ struct brw_instruction *insn = next_insn(p, BRW_OPCODE_SEND);
+ insn->header.destreg__conditionalmod = mrf.nr;
+
+ /* cast dest to a uword[8] vector */
+ dest = retype(vec8(dest), BRW_REGISTER_TYPE_UW);
+
+ brw_set_dest(insn, dest);
+ brw_set_src0(insn, brw_null_reg());
+
+ brw_set_dp_read_message(p->brw,
+ insn,
+ bind_table_index,
+ BRW_DATAPORT_DWORD_SCATTERED_BLOCK_8DWORDS,
+ BRW_DATAPORT_READ_MESSAGE_DWORD_SCATTERED_READ,
+ 0, /* source cache = data cache */
+ 2, /* msg_length */
+ 1); /* response_length */
+}
+
+
/**
* Read float[4] constant(s) from VS constant buffer.
@@ -1499,8 +1681,7 @@ void brw_dp_READ_4_vs(struct brw_compile *p,
BRW_DATAPORT_READ_MESSAGE_OWORD_BLOCK_READ, /* msg_type */
0, /* source cache = data cache */
1, /* msg_length */
- 1, /* response_length (1 Oword) */
- 0); /* eot */
+ 1); /* response_length (1 Oword) */
}
/**
@@ -1553,8 +1734,7 @@ void brw_dp_READ_4_vs_relative(struct brw_compile *p,
msg_type,
0, /* source cache = data cache */
2, /* msg_length */
- 1, /* response_length */
- 0); /* eot */
+ 1); /* response_length */
}
@@ -1574,8 +1754,13 @@ void brw_fb_WRITE(struct brw_compile *p,
GLuint msg_control, msg_type;
GLboolean header_present = GL_TRUE;
- insn = next_insn(p, BRW_OPCODE_SEND);
- insn->header.predicate_control = 0; /* XXX */
+ if (intel->gen >= 6 && binding_table_index == 0) {
+ insn = next_insn(p, BRW_OPCODE_SENDC);
+ } else {
+ insn = next_insn(p, BRW_OPCODE_SEND);
+ }
+ /* The execution mask is ignored for render target writes. */
+ insn->header.predicate_control = 0;
insn->header.compression_control = BRW_COMPRESSION_NONE;
if (intel->gen >= 6) {
@@ -1821,7 +2006,8 @@ void brw_ff_sync(struct brw_compile *p,
if (intel->gen >= 6) {
brw_push_insn_state(p);
brw_set_mask_control( p, BRW_MASK_DISABLE );
- brw_MOV(p, brw_message_reg(msg_reg_nr), src0);
+ brw_MOV(p, retype(brw_message_reg(msg_reg_nr), BRW_REGISTER_TYPE_UD),
+ retype(src0, BRW_REGISTER_TYPE_UD));
brw_pop_insn_state(p);
src0 = brw_message_reg(msg_reg_nr);
}
diff --git a/src/mesa/drivers/dri/i965/brw_fallback.c b/src/mesa/drivers/dri/i965/brw_fallback.c
index ba401c215cb..6796fb208dc 100644
--- a/src/mesa/drivers/dri/i965/brw_fallback.c
+++ b/src/mesa/drivers/dri/i965/brw_fallback.c
@@ -43,7 +43,7 @@
static GLboolean do_check_fallback(struct brw_context *brw)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
GLuint i;
if (brw->intel.no_rast) {
diff --git a/src/mesa/drivers/dri/i965/brw_fallback.h b/src/mesa/drivers/dri/i965/brw_fallback.h
index 50dcdacd17a..13b18b52e65 100644
--- a/src/mesa/drivers/dri/i965/brw_fallback.h
+++ b/src/mesa/drivers/dri/i965/brw_fallback.h
@@ -28,15 +28,15 @@
#ifndef BRW_FALLBACK_H
#define BRW_FALLBACK_H
-#include "main/mtypes.h" /* for GLcontext... */
+#include "main/mtypes.h" /* for struct gl_context... */
struct brw_context;
struct vbo_prim;
-void brw_fallback( GLcontext *ctx );
-void brw_unfallback( GLcontext *ctx );
+void brw_fallback( struct gl_context *ctx );
+void brw_unfallback( struct gl_context *ctx );
-void brw_loopback_vertex_list( GLcontext *ctx,
+void brw_loopback_vertex_list( struct gl_context *ctx,
const GLfloat *buffer,
const GLubyte *attrsz,
const struct vbo_prim *prim,
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 11a5a4aceff..2ed59d3f5d4 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -43,44 +43,15 @@ extern "C" {
#include "brw_wm.h"
#include "talloc.h"
}
+#include "brw_fs.h"
#include "../glsl/glsl_types.h"
#include "../glsl/ir_optimization.h"
#include "../glsl/ir_print_visitor.h"
-enum register_file {
- ARF = BRW_ARCHITECTURE_REGISTER_FILE,
- GRF = BRW_GENERAL_REGISTER_FILE,
- MRF = BRW_MESSAGE_REGISTER_FILE,
- IMM = BRW_IMMEDIATE_VALUE,
- FIXED_HW_REG, /* a struct brw_reg */
- UNIFORM, /* prog_data->params[hw_reg] */
- BAD_FILE
-};
-
-enum fs_opcodes {
- FS_OPCODE_FB_WRITE = 256,
- FS_OPCODE_RCP,
- FS_OPCODE_RSQ,
- FS_OPCODE_SQRT,
- FS_OPCODE_EXP2,
- FS_OPCODE_LOG2,
- FS_OPCODE_POW,
- FS_OPCODE_SIN,
- FS_OPCODE_COS,
- FS_OPCODE_DDX,
- FS_OPCODE_DDY,
- FS_OPCODE_LINTERP,
- FS_OPCODE_TEX,
- FS_OPCODE_TXB,
- FS_OPCODE_TXL,
- FS_OPCODE_DISCARD,
-};
-
-static int using_new_fs = -1;
static struct brw_reg brw_reg_from_fs_reg(class fs_reg *reg);
struct gl_shader *
-brw_new_shader(GLcontext *ctx, GLuint name, GLuint type)
+brw_new_shader(struct gl_context *ctx, GLuint name, GLuint type)
{
struct brw_shader *shader;
@@ -95,7 +66,7 @@ brw_new_shader(GLcontext *ctx, GLuint name, GLuint type)
}
struct gl_shader_program *
-brw_new_shader_program(GLcontext *ctx, GLuint name)
+brw_new_shader_program(struct gl_context *ctx, GLuint name)
{
struct brw_shader_program *prog;
prog = talloc_zero(NULL, struct brw_shader_program);
@@ -107,7 +78,7 @@ brw_new_shader_program(GLcontext *ctx, GLuint name)
}
GLboolean
-brw_compile_shader(GLcontext *ctx, struct gl_shader *shader)
+brw_compile_shader(struct gl_context *ctx, struct gl_shader *shader)
{
if (!_mesa_ir_compile_shader(ctx, shader))
return GL_FALSE;
@@ -116,64 +87,60 @@ brw_compile_shader(GLcontext *ctx, struct gl_shader *shader)
}
GLboolean
-brw_link_shader(GLcontext *ctx, struct gl_shader_program *prog)
+brw_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
{
struct intel_context *intel = intel_context(ctx);
- if (using_new_fs == -1)
- using_new_fs = getenv("INTEL_NEW_FS") != NULL;
-
- for (unsigned i = 0; i < prog->_NumLinkedShaders; i++) {
- struct brw_shader *shader = (struct brw_shader *)prog->_LinkedShaders[i];
-
- if (using_new_fs && shader->base.Type == GL_FRAGMENT_SHADER) {
- void *mem_ctx = talloc_new(NULL);
- bool progress;
-
- if (shader->ir)
- talloc_free(shader->ir);
- shader->ir = new(shader) exec_list;
- clone_ir_list(mem_ctx, shader->ir, shader->base.ir);
-
- do_mat_op_to_vec(shader->ir);
- do_mod_to_fract(shader->ir);
- do_div_to_mul_rcp(shader->ir);
- do_sub_to_add_neg(shader->ir);
- do_explog_to_explog2(shader->ir);
- do_lower_texture_projection(shader->ir);
- brw_do_cubemap_normalize(shader->ir);
-
- do {
- progress = false;
-
- brw_do_channel_expressions(shader->ir);
- brw_do_vector_splitting(shader->ir);
-
- progress = do_lower_jumps(shader->ir, true, true,
- true, /* main return */
- false, /* continue */
- false /* loops */
- ) || progress;
-
- progress = do_common_optimization(shader->ir, true, 32) || progress;
-
- progress = lower_noise(shader->ir) || progress;
- progress =
- lower_variable_index_to_cond_assign(shader->ir,
- GL_TRUE, /* input */
- GL_TRUE, /* output */
- GL_TRUE, /* temp */
- GL_TRUE /* uniform */
- ) || progress;
- if (intel->gen == 6) {
- progress = do_if_to_cond_assign(shader->ir) || progress;
- }
- } while (progress);
- validate_ir_tree(shader->ir);
+ struct brw_shader *shader =
+ (struct brw_shader *)prog->_LinkedShaders[MESA_SHADER_FRAGMENT];
+ if (shader != NULL) {
+ void *mem_ctx = talloc_new(NULL);
+ bool progress;
- reparent_ir(shader->ir, shader->ir);
- talloc_free(mem_ctx);
- }
+ if (shader->ir)
+ talloc_free(shader->ir);
+ shader->ir = new(shader) exec_list;
+ clone_ir_list(mem_ctx, shader->ir, shader->base.ir);
+
+ do_mat_op_to_vec(shader->ir);
+ do_mod_to_fract(shader->ir);
+ do_div_to_mul_rcp(shader->ir);
+ do_sub_to_add_neg(shader->ir);
+ do_explog_to_explog2(shader->ir);
+ do_lower_texture_projection(shader->ir);
+ brw_do_cubemap_normalize(shader->ir);
+
+ do {
+ progress = false;
+
+ brw_do_channel_expressions(shader->ir);
+ brw_do_vector_splitting(shader->ir);
+
+ progress = do_lower_jumps(shader->ir, true, true,
+ true, /* main return */
+ false, /* continue */
+ false /* loops */
+ ) || progress;
+
+ progress = do_common_optimization(shader->ir, true, 32) || progress;
+
+ progress = lower_noise(shader->ir) || progress;
+ progress =
+ lower_variable_index_to_cond_assign(shader->ir,
+ GL_TRUE, /* input */
+ GL_TRUE, /* output */
+ GL_TRUE, /* temp */
+ GL_TRUE /* uniform */
+ ) || progress;
+ if (intel->gen == 6) {
+ progress = do_if_to_cond_assign(shader->ir) || progress;
+ }
+ } while (progress);
+
+ validate_ir_tree(shader->ir);
+
+ reparent_ir(shader->ir, shader->ir);
+ talloc_free(mem_ctx);
}
if (!_mesa_ir_link_shader(ctx, prog))
@@ -212,334 +179,6 @@ type_size(const struct glsl_type *type)
}
}
-class fs_reg {
-public:
- /* Callers of this talloc-based new need not call delete. It's
- * easier to just talloc_free 'ctx' (or any of its ancestors). */
- static void* operator new(size_t size, void *ctx)
- {
- void *node;
-
- node = talloc_size(ctx, size);
- assert(node != NULL);
-
- return node;
- }
-
- void init()
- {
- this->reg = 0;
- this->reg_offset = 0;
- this->negate = 0;
- this->abs = 0;
- this->hw_reg = -1;
- }
-
- /** Generic unset register constructor. */
- fs_reg()
- {
- init();
- this->file = BAD_FILE;
- }
-
- /** Immediate value constructor. */
- fs_reg(float f)
- {
- init();
- this->file = IMM;
- this->type = BRW_REGISTER_TYPE_F;
- this->imm.f = f;
- }
-
- /** Immediate value constructor. */
- fs_reg(int32_t i)
- {
- init();
- this->file = IMM;
- this->type = BRW_REGISTER_TYPE_D;
- this->imm.i = i;
- }
-
- /** Immediate value constructor. */
- fs_reg(uint32_t u)
- {
- init();
- this->file = IMM;
- this->type = BRW_REGISTER_TYPE_UD;
- this->imm.u = u;
- }
-
- /** Fixed brw_reg Immediate value constructor. */
- fs_reg(struct brw_reg fixed_hw_reg)
- {
- init();
- this->file = FIXED_HW_REG;
- this->fixed_hw_reg = fixed_hw_reg;
- this->type = fixed_hw_reg.type;
- }
-
- fs_reg(enum register_file file, int hw_reg);
- fs_reg(class fs_visitor *v, const struct glsl_type *type);
-
- /** Register file: ARF, GRF, MRF, IMM. */
- enum register_file file;
- /** virtual register number. 0 = fixed hw reg */
- int reg;
- /** Offset within the virtual register. */
- int reg_offset;
- /** HW register number. Generally unset until register allocation. */
- int hw_reg;
- /** Register type. BRW_REGISTER_TYPE_* */
- int type;
- bool negate;
- bool abs;
- struct brw_reg fixed_hw_reg;
-
- /** Value for file == BRW_IMMMEDIATE_FILE */
- union {
- int32_t i;
- uint32_t u;
- float f;
- } imm;
-};
-
-static const fs_reg reg_undef;
-static const fs_reg reg_null(ARF, BRW_ARF_NULL);
-
-class fs_inst : public exec_node {
-public:
- /* Callers of this talloc-based new need not call delete. It's
- * easier to just talloc_free 'ctx' (or any of its ancestors). */
- static void* operator new(size_t size, void *ctx)
- {
- void *node;
-
- node = talloc_zero_size(ctx, size);
- assert(node != NULL);
-
- return node;
- }
-
- void init()
- {
- this->opcode = BRW_OPCODE_NOP;
- this->saturate = false;
- this->conditional_mod = BRW_CONDITIONAL_NONE;
- this->predicated = false;
- this->sampler = 0;
- this->target = 0;
- this->eot = false;
- this->header_present = false;
- this->shadow_compare = false;
- }
-
- fs_inst()
- {
- init();
- }
-
- fs_inst(int opcode)
- {
- init();
- this->opcode = opcode;
- }
-
- fs_inst(int opcode, fs_reg dst, fs_reg src0)
- {
- init();
- this->opcode = opcode;
- this->dst = dst;
- this->src[0] = src0;
- }
-
- fs_inst(int opcode, fs_reg dst, fs_reg src0, fs_reg src1)
- {
- init();
- this->opcode = opcode;
- this->dst = dst;
- this->src[0] = src0;
- this->src[1] = src1;
- }
-
- fs_inst(int opcode, fs_reg dst, fs_reg src0, fs_reg src1, fs_reg src2)
- {
- init();
- this->opcode = opcode;
- this->dst = dst;
- this->src[0] = src0;
- this->src[1] = src1;
- this->src[2] = src2;
- }
-
- int opcode; /* BRW_OPCODE_* or FS_OPCODE_* */
- fs_reg dst;
- fs_reg src[3];
- bool saturate;
- bool predicated;
- int conditional_mod; /**< BRW_CONDITIONAL_* */
-
- int mlen; /**< SEND message length */
- int sampler;
- int target; /**< MRT target. */
- bool eot;
- bool header_present;
- bool shadow_compare;
-
- /** @{
- * Annotation for the generated IR. One of the two can be set.
- */
- ir_instruction *ir;
- const char *annotation;
- /** @} */
-};
-
-class fs_visitor : public ir_visitor
-{
-public:
-
- fs_visitor(struct brw_wm_compile *c, struct brw_shader *shader)
- {
- this->c = c;
- this->p = &c->func;
- this->brw = p->brw;
- this->fp = brw->fragment_program;
- this->intel = &brw->intel;
- this->ctx = &intel->ctx;
- this->mem_ctx = talloc_new(NULL);
- this->shader = shader;
- this->fail = false;
- this->variable_ht = hash_table_ctor(0,
- hash_table_pointer_hash,
- hash_table_pointer_compare);
-
- this->frag_color = NULL;
- this->frag_data = NULL;
- this->frag_depth = NULL;
- this->first_non_payload_grf = 0;
-
- this->current_annotation = NULL;
- this->annotation_string = NULL;
- this->annotation_ir = NULL;
- this->base_ir = NULL;
-
- this->virtual_grf_sizes = NULL;
- this->virtual_grf_next = 1;
- this->virtual_grf_array_size = 0;
- this->virtual_grf_def = NULL;
- this->virtual_grf_use = NULL;
-
- this->kill_emitted = false;
- }
-
- ~fs_visitor()
- {
- talloc_free(this->mem_ctx);
- hash_table_dtor(this->variable_ht);
- }
-
- fs_reg *variable_storage(ir_variable *var);
- int virtual_grf_alloc(int size);
-
- void visit(ir_variable *ir);
- void visit(ir_assignment *ir);
- void visit(ir_dereference_variable *ir);
- void visit(ir_dereference_record *ir);
- void visit(ir_dereference_array *ir);
- void visit(ir_expression *ir);
- void visit(ir_texture *ir);
- void visit(ir_if *ir);
- void visit(ir_constant *ir);
- void visit(ir_swizzle *ir);
- void visit(ir_return *ir);
- void visit(ir_loop *ir);
- void visit(ir_loop_jump *ir);
- void visit(ir_discard *ir);
- void visit(ir_call *ir);
- void visit(ir_function *ir);
- void visit(ir_function_signature *ir);
-
- fs_inst *emit(fs_inst inst);
- void assign_curb_setup();
- void calculate_urb_setup();
- void assign_urb_setup();
- void assign_regs();
- void assign_regs_trivial();
- void calculate_live_intervals();
- bool propagate_constants();
- bool register_coalesce();
- bool dead_code_eliminate();
- bool virtual_grf_interferes(int a, int b);
- void generate_code();
- void generate_fb_write(fs_inst *inst);
- void generate_linterp(fs_inst *inst, struct brw_reg dst,
- struct brw_reg *src);
- void generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src);
- void generate_math(fs_inst *inst, struct brw_reg dst, struct brw_reg *src);
- void generate_discard(fs_inst *inst, struct brw_reg temp);
- void generate_ddx(fs_inst *inst, struct brw_reg dst, struct brw_reg src);
- void generate_ddy(fs_inst *inst, struct brw_reg dst, struct brw_reg src);
-
- void emit_dummy_fs();
- fs_reg *emit_fragcoord_interpolation(ir_variable *ir);
- fs_reg *emit_frontfacing_interpolation(ir_variable *ir);
- fs_reg *emit_general_interpolation(ir_variable *ir);
- void emit_interpolation_setup_gen4();
- void emit_interpolation_setup_gen6();
- fs_inst *emit_texture_gen4(ir_texture *ir, fs_reg dst, fs_reg coordinate);
- fs_inst *emit_texture_gen5(ir_texture *ir, fs_reg dst, fs_reg coordinate);
- void emit_fb_writes();
- void emit_assignment_writes(fs_reg &l, fs_reg &r,
- const glsl_type *type, bool predicated);
-
- struct brw_reg interp_reg(int location, int channel);
- int setup_uniform_values(int loc, const glsl_type *type);
- void setup_builtin_uniform_values(ir_variable *ir);
-
- struct brw_context *brw;
- const struct gl_fragment_program *fp;
- struct intel_context *intel;
- GLcontext *ctx;
- struct brw_wm_compile *c;
- struct brw_compile *p;
- struct brw_shader *shader;
- void *mem_ctx;
- exec_list instructions;
-
- int *virtual_grf_sizes;
- int virtual_grf_next;
- int virtual_grf_array_size;
- int *virtual_grf_def;
- int *virtual_grf_use;
-
- struct hash_table *variable_ht;
- ir_variable *frag_color, *frag_data, *frag_depth;
- int first_non_payload_grf;
- int urb_setup[FRAG_ATTRIB_MAX];
- bool kill_emitted;
-
- /** @{ debug annotation info */
- const char *current_annotation;
- ir_instruction *base_ir;
- const char **annotation_string;
- ir_instruction **annotation_ir;
- /** @} */
-
- bool fail;
-
- /* Result of last visit() method. */
- fs_reg result;
-
- fs_reg pixel_x;
- fs_reg pixel_y;
- fs_reg wpos_w;
- fs_reg pixel_w;
- fs_reg delta_x;
- fs_reg delta_y;
-
- int grf_used;
-
-};
-
int
fs_visitor::virtual_grf_alloc(int size)
{
@@ -567,6 +206,15 @@ fs_reg::fs_reg(enum register_file file, int hw_reg)
this->type = BRW_REGISTER_TYPE_F;
}
+/** Fixed HW reg constructor. */
+fs_reg::fs_reg(enum register_file file, int hw_reg, uint32_t type)
+{
+ init();
+ this->file = file;
+ this->hw_reg = hw_reg;
+ this->type = type;
+}
+
int
brw_type_for_base_type(const struct glsl_type *type)
{
@@ -580,6 +228,7 @@ brw_type_for_base_type(const struct glsl_type *type)
return BRW_REGISTER_TYPE_UD;
case GLSL_TYPE_ARRAY:
case GLSL_TYPE_STRUCT:
+ case GLSL_TYPE_SAMPLER:
/* These should be overridden with the type of the member when
* dereferenced into. BRW_REGISTER_TYPE_UD seems like a likely
* way to trip up if we don't.
@@ -638,7 +287,26 @@ fs_visitor::setup_uniform_values(int loc, const glsl_type *type)
case GLSL_TYPE_BOOL:
vec_values = fp->Base.Parameters->ParameterValues[loc];
for (unsigned int i = 0; i < type->vector_elements; i++) {
- c->prog_data.param[c->prog_data.nr_params++] = &vec_values[i];
+ unsigned int param = c->prog_data.nr_params++;
+
+ assert(param < ARRAY_SIZE(c->prog_data.param));
+
+ switch (type->base_type) {
+ case GLSL_TYPE_FLOAT:
+ c->prog_data.param_convert[param] = PARAM_NO_CONVERT;
+ break;
+ case GLSL_TYPE_UINT:
+ c->prog_data.param_convert[param] = PARAM_CONVERT_F2U;
+ break;
+ case GLSL_TYPE_INT:
+ c->prog_data.param_convert[param] = PARAM_CONVERT_F2I;
+ break;
+ case GLSL_TYPE_BOOL:
+ c->prog_data.param_convert[param] = PARAM_CONVERT_F2B;
+ break;
+ }
+
+ c->prog_data.param[param] = &vec_values[i];
}
return 1;
@@ -722,6 +390,8 @@ fs_visitor::setup_builtin_uniform_values(ir_variable *ir)
break;
last_swiz = swiz;
+ c->prog_data.param_convert[c->prog_data.nr_params] =
+ PARAM_NO_CONVERT;
c->prog_data.param[c->prog_data.nr_params++] = &vec_values[swiz];
}
}
@@ -851,7 +521,6 @@ fs_visitor::emit_frontfacing_interpolation(ir_variable *ir)
*reg,
fs_reg(1)));
} else {
- fs_reg *reg = new(this->mem_ctx) fs_reg(this, ir->type);
struct brw_reg r1_6ud = retype(brw_vec1_grf(1, 6), BRW_REGISTER_TYPE_UD);
/* bit 31 is "primitive is back face", so checking < (1 << 31) gives
* us front face
@@ -867,6 +536,77 @@ fs_visitor::emit_frontfacing_interpolation(ir_variable *ir)
return reg;
}
+fs_inst *
+fs_visitor::emit_math(fs_opcodes opcode, fs_reg dst, fs_reg src)
+{
+ switch (opcode) {
+ case FS_OPCODE_RCP:
+ case FS_OPCODE_RSQ:
+ case FS_OPCODE_SQRT:
+ case FS_OPCODE_EXP2:
+ case FS_OPCODE_LOG2:
+ case FS_OPCODE_SIN:
+ case FS_OPCODE_COS:
+ break;
+ default:
+ assert(!"not reached: bad math opcode");
+ return NULL;
+ }
+
+ /* Can't do hstride == 0 args to gen6 math, so expand it out. We
+ * might be able to do better by doing execsize = 1 math and then
+ * expanding that result out, but we would need to be careful with
+ * masking.
+ */
+ if (intel->gen >= 6 && src.file == UNIFORM) {
+ fs_reg expanded = fs_reg(this, glsl_type::float_type);
+ emit(fs_inst(BRW_OPCODE_MOV, expanded, src));
+ src = expanded;
+ }
+
+ fs_inst *inst = emit(fs_inst(opcode, dst, src));
+
+ if (intel->gen < 6) {
+ inst->base_mrf = 2;
+ inst->mlen = 1;
+ }
+
+ return inst;
+}
+
+fs_inst *
+fs_visitor::emit_math(fs_opcodes opcode, fs_reg dst, fs_reg src0, fs_reg src1)
+{
+ int base_mrf = 2;
+ fs_inst *inst;
+
+ assert(opcode == FS_OPCODE_POW);
+
+ if (intel->gen >= 6) {
+ /* Can't do hstride == 0 args to gen6 math, so expand it out. */
+ if (src0.file == UNIFORM) {
+ fs_reg expanded = fs_reg(this, glsl_type::float_type);
+ emit(fs_inst(BRW_OPCODE_MOV, expanded, src0));
+ src0 = expanded;
+ }
+
+ if (src1.file == UNIFORM) {
+ fs_reg expanded = fs_reg(this, glsl_type::float_type);
+ emit(fs_inst(BRW_OPCODE_MOV, expanded, src1));
+ src1 = expanded;
+ }
+
+ inst = emit(fs_inst(opcode, dst, src0, src1));
+ } else {
+ emit(fs_inst(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + 1), src1));
+ inst = emit(fs_inst(opcode, dst, src0, reg_null_f));
+
+ inst->base_mrf = base_mrf;
+ inst->mlen = 2;
+ }
+ return inst;
+}
+
void
fs_visitor::visit(ir_variable *ir)
{
@@ -906,6 +646,7 @@ fs_visitor::visit(ir_variable *ir)
}
reg = new(this->mem_ctx) fs_reg(UNIFORM, param_index);
+ reg->type = brw_type_for_base_type(ir->type);
}
if (!reg)
@@ -965,7 +706,6 @@ fs_visitor::visit(ir_expression *ir)
{
unsigned int operand;
fs_reg op[2], temp;
- fs_reg result;
fs_inst *inst;
for (operand = 0; operand < ir->get_num_operands(); operand++) {
@@ -994,7 +734,10 @@ fs_visitor::visit(ir_expression *ir)
switch (ir->operation) {
case ir_unop_logic_not:
- emit(fs_inst(BRW_OPCODE_ADD, this->result, op[0], fs_reg(-1)));
+ /* Note that BRW_OPCODE_NOT is not appropriate here, since it is
+ * ones complement of the whole register, not just bit 0.
+ */
+ emit(fs_inst(BRW_OPCODE_XOR, this->result, op[0], fs_reg(1)));
break;
case ir_unop_neg:
op[0].negate = !op[0].negate;
@@ -1009,36 +752,36 @@ fs_visitor::visit(ir_expression *ir)
emit(fs_inst(BRW_OPCODE_MOV, this->result, fs_reg(0.0f)));
- inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null, op[0], fs_reg(0.0f)));
+ inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null_f, op[0], fs_reg(0.0f)));
inst->conditional_mod = BRW_CONDITIONAL_G;
inst = emit(fs_inst(BRW_OPCODE_MOV, this->result, fs_reg(1.0f)));
inst->predicated = true;
- inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null, op[0], fs_reg(0.0f)));
+ inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null_f, op[0], fs_reg(0.0f)));
inst->conditional_mod = BRW_CONDITIONAL_L;
inst = emit(fs_inst(BRW_OPCODE_MOV, this->result, fs_reg(-1.0f)));
inst->predicated = true;
break;
case ir_unop_rcp:
- emit(fs_inst(FS_OPCODE_RCP, this->result, op[0]));
+ emit_math(FS_OPCODE_RCP, this->result, op[0]);
break;
case ir_unop_exp2:
- emit(fs_inst(FS_OPCODE_EXP2, this->result, op[0]));
+ emit_math(FS_OPCODE_EXP2, this->result, op[0]);
break;
case ir_unop_log2:
- emit(fs_inst(FS_OPCODE_LOG2, this->result, op[0]));
+ emit_math(FS_OPCODE_LOG2, this->result, op[0]);
break;
case ir_unop_exp:
case ir_unop_log:
assert(!"not reached: should be handled by ir_explog_to_explog2");
break;
case ir_unop_sin:
- emit(fs_inst(FS_OPCODE_SIN, this->result, op[0]));
+ emit_math(FS_OPCODE_SIN, this->result, op[0]);
break;
case ir_unop_cos:
- emit(fs_inst(FS_OPCODE_COS, this->result, op[0]));
+ emit_math(FS_OPCODE_COS, this->result, op[0]);
break;
case ir_unop_dFdx:
@@ -1121,18 +864,16 @@ fs_visitor::visit(ir_expression *ir)
break;
case ir_unop_sqrt:
- emit(fs_inst(FS_OPCODE_SQRT, this->result, op[0]));
+ emit_math(FS_OPCODE_SQRT, this->result, op[0]);
break;
case ir_unop_rsq:
- emit(fs_inst(FS_OPCODE_RSQ, this->result, op[0]));
+ emit_math(FS_OPCODE_RSQ, this->result, op[0]);
break;
case ir_unop_i2f:
case ir_unop_b2f:
case ir_unop_b2i:
- emit(fs_inst(BRW_OPCODE_MOV, this->result, op[0]));
- break;
case ir_unop_f2i:
emit(fs_inst(BRW_OPCODE_MOV, this->result, op[0]));
break;
@@ -1140,12 +881,15 @@ fs_visitor::visit(ir_expression *ir)
case ir_unop_i2b:
inst = emit(fs_inst(BRW_OPCODE_CMP, this->result, op[0], fs_reg(0.0f)));
inst->conditional_mod = BRW_CONDITIONAL_NZ;
+ inst = emit(fs_inst(BRW_OPCODE_AND, this->result,
+ this->result, fs_reg(1)));
+ break;
case ir_unop_trunc:
- emit(fs_inst(BRW_OPCODE_RNDD, this->result, op[0]));
+ emit(fs_inst(BRW_OPCODE_RNDZ, this->result, op[0]));
break;
case ir_unop_ceil:
- op[0].negate = ~op[0].negate;
+ op[0].negate = !op[0].negate;
inst = emit(fs_inst(BRW_OPCODE_RNDD, this->result, op[0]));
this->result.negate = true;
break;
@@ -1155,6 +899,9 @@ fs_visitor::visit(ir_expression *ir)
case ir_unop_fract:
inst = emit(fs_inst(BRW_OPCODE_FRC, this->result, op[0]));
break;
+ case ir_unop_round_even:
+ emit(fs_inst(BRW_OPCODE_RNDE, this->result, op[0]));
+ break;
case ir_binop_min:
inst = emit(fs_inst(BRW_OPCODE_CMP, this->result, op[0], op[1]));
@@ -1172,16 +919,25 @@ fs_visitor::visit(ir_expression *ir)
break;
case ir_binop_pow:
- inst = emit(fs_inst(FS_OPCODE_POW, this->result, op[0], op[1]));
+ emit_math(FS_OPCODE_POW, this->result, op[0], op[1]);
break;
case ir_unop_bit_not:
- case ir_unop_u2f:
- case ir_binop_lshift:
- case ir_binop_rshift:
+ inst = emit(fs_inst(BRW_OPCODE_NOT, this->result, op[0]));
+ break;
case ir_binop_bit_and:
+ inst = emit(fs_inst(BRW_OPCODE_AND, this->result, op[0], op[1]));
+ break;
case ir_binop_bit_xor:
+ inst = emit(fs_inst(BRW_OPCODE_XOR, this->result, op[0], op[1]));
+ break;
case ir_binop_bit_or:
+ inst = emit(fs_inst(BRW_OPCODE_OR, this->result, op[0], op[1]));
+ break;
+
+ case ir_unop_u2f:
+ case ir_binop_lshift:
+ case ir_binop_rshift:
assert(!"GLSL 1.30 features unsupported");
break;
}
@@ -1211,6 +967,7 @@ fs_visitor::emit_assignment_writes(fs_reg &l, fs_reg &r,
for (unsigned int i = 0; i < type->length; i++) {
emit_assignment_writes(l, r, type->fields.array, predicated);
}
+ break;
case GLSL_TYPE_STRUCT:
for (unsigned int i = 0; i < type->length; i++) {
@@ -1245,10 +1002,7 @@ fs_visitor::visit(ir_assignment *ir)
assert(r.file != BAD_FILE);
if (ir->condition) {
- /* Get the condition bool into the predicate. */
- ir->condition->accept(this);
- inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null, this->result, fs_reg(0)));
- inst->conditional_mod = BRW_CONDITIONAL_NZ;
+ emit_bool_to_cond_code(ir->condition);
}
if (ir->lhs->type->is_scalar() ||
@@ -1271,18 +1025,21 @@ fs_inst *
fs_visitor::emit_texture_gen4(ir_texture *ir, fs_reg dst, fs_reg coordinate)
{
int mlen;
- int base_mrf = 2;
+ int base_mrf = 1;
bool simd16 = false;
fs_reg orig_dst;
+ /* g0 header. */
+ mlen = 1;
+
if (ir->shadow_comparitor) {
- for (mlen = 0; mlen < ir->coordinate->type->vector_elements; mlen++) {
- emit(fs_inst(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen),
+ for (int i = 0; i < ir->coordinate->type->vector_elements; i++) {
+ emit(fs_inst(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen + i),
coordinate));
coordinate.reg_offset++;
}
/* gen4's SIMD8 sampler always has the slots for u,v,r present. */
- mlen = 3;
+ mlen += 3;
if (ir->op == ir_tex) {
/* There's no plain shadow compare message, so we use shadow
@@ -1308,31 +1065,27 @@ fs_visitor::emit_texture_gen4(ir_texture *ir, fs_reg dst, fs_reg coordinate)
emit(fs_inst(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen), this->result));
mlen++;
} else if (ir->op == ir_tex) {
- for (mlen = 0; mlen < ir->coordinate->type->vector_elements; mlen++) {
- emit(fs_inst(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen),
+ for (int i = 0; i < ir->coordinate->type->vector_elements; i++) {
+ emit(fs_inst(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen + i),
coordinate));
coordinate.reg_offset++;
}
/* gen4's SIMD8 sampler always has the slots for u,v,r present. */
- mlen = 3;
+ mlen += 3;
} else {
/* Oh joy. gen4 doesn't have SIMD8 non-shadow-compare bias/lod
* instructions. We'll need to do SIMD16 here.
*/
assert(ir->op == ir_txb || ir->op == ir_txl);
- for (mlen = 0; mlen < ir->coordinate->type->vector_elements * 2;) {
- emit(fs_inst(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen),
+ for (int i = 0; i < ir->coordinate->type->vector_elements; i++) {
+ emit(fs_inst(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen + i * 2),
coordinate));
coordinate.reg_offset++;
- mlen++;
-
- /* The unused upper half. */
- mlen++;
}
/* lod/bias appears after u/v/r. */
- mlen = 6;
+ mlen += 6;
if (ir->op == ir_txb) {
ir->lod_info.bias->accept(this);
@@ -1363,19 +1116,20 @@ fs_visitor::emit_texture_gen4(ir_texture *ir, fs_reg dst, fs_reg coordinate)
fs_inst *inst = NULL;
switch (ir->op) {
case ir_tex:
- inst = emit(fs_inst(FS_OPCODE_TEX, dst, fs_reg(MRF, base_mrf)));
+ inst = emit(fs_inst(FS_OPCODE_TEX, dst));
break;
case ir_txb:
- inst = emit(fs_inst(FS_OPCODE_TXB, dst, fs_reg(MRF, base_mrf)));
+ inst = emit(fs_inst(FS_OPCODE_TXB, dst));
break;
case ir_txl:
- inst = emit(fs_inst(FS_OPCODE_TXL, dst, fs_reg(MRF, base_mrf)));
+ inst = emit(fs_inst(FS_OPCODE_TXL, dst));
break;
case ir_txd:
case ir_txf:
assert(!"GLSL 1.30 features unsupported");
break;
}
+ inst->base_mrf = base_mrf;
inst->mlen = mlen;
if (simd16) {
@@ -1400,16 +1154,18 @@ fs_visitor::emit_texture_gen5(ir_texture *ir, fs_reg dst, fs_reg coordinate)
* We don't fill in the unnecessary slots regardless, which may
* look surprising in the disassembly.
*/
- int mlen;
- int base_mrf = 2;
+ int mlen = 1; /* g0 header always present. */
+ int base_mrf = 1;
- for (mlen = 0; mlen < ir->coordinate->type->vector_elements; mlen++) {
- emit(fs_inst(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen), coordinate));
+ for (int i = 0; i < ir->coordinate->type->vector_elements; i++) {
+ emit(fs_inst(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen + i),
+ coordinate));
coordinate.reg_offset++;
}
+ mlen += ir->coordinate->type->vector_elements;
if (ir->shadow_comparitor) {
- mlen = MAX2(mlen, 4);
+ mlen = MAX2(mlen, 5);
ir->shadow_comparitor->accept(this);
emit(fs_inst(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen), this->result));
@@ -1419,29 +1175,30 @@ fs_visitor::emit_texture_gen5(ir_texture *ir, fs_reg dst, fs_reg coordinate)
fs_inst *inst = NULL;
switch (ir->op) {
case ir_tex:
- inst = emit(fs_inst(FS_OPCODE_TEX, dst, fs_reg(MRF, base_mrf)));
+ inst = emit(fs_inst(FS_OPCODE_TEX, dst));
break;
case ir_txb:
ir->lod_info.bias->accept(this);
- mlen = MAX2(mlen, 4);
+ mlen = MAX2(mlen, 5);
emit(fs_inst(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen), this->result));
mlen++;
- inst = emit(fs_inst(FS_OPCODE_TXB, dst, fs_reg(MRF, base_mrf)));
+ inst = emit(fs_inst(FS_OPCODE_TXB, dst));
break;
case ir_txl:
ir->lod_info.lod->accept(this);
- mlen = MAX2(mlen, 4);
+ mlen = MAX2(mlen, 5);
emit(fs_inst(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen), this->result));
mlen++;
- inst = emit(fs_inst(FS_OPCODE_TXL, dst, fs_reg(MRF, base_mrf)));
+ inst = emit(fs_inst(FS_OPCODE_TXL, dst));
break;
case ir_txd:
case ir_txf:
assert(!"GLSL 1.30 features unsupported");
break;
}
+ inst->base_mrf = base_mrf;
inst->mlen = mlen;
return inst;
@@ -1450,6 +1207,7 @@ fs_visitor::emit_texture_gen5(ir_texture *ir, fs_reg dst, fs_reg coordinate)
void
fs_visitor::visit(ir_texture *ir)
{
+ int sampler;
fs_inst *inst = NULL;
ir->coordinate->accept(this);
@@ -1458,6 +1216,49 @@ fs_visitor::visit(ir_texture *ir)
/* Should be lowered by do_lower_texture_projection */
assert(!ir->projector);
+ sampler = _mesa_get_sampler_uniform_value(ir->sampler,
+ ctx->Shader.CurrentFragmentProgram,
+ &brw->fragment_program->Base);
+ sampler = c->fp->program.Base.SamplerUnits[sampler];
+
+ /* The 965 requires the EU to do the normalization of GL rectangle
+ * texture coordinates. We use the program parameter state
+ * tracking to get the scaling factor.
+ */
+ if (ir->sampler->type->sampler_dimensionality == GLSL_SAMPLER_DIM_RECT) {
+ struct gl_program_parameter_list *params = c->fp->program.Base.Parameters;
+ int tokens[STATE_LENGTH] = {
+ STATE_INTERNAL,
+ STATE_TEXRECT_SCALE,
+ sampler,
+ 0,
+ 0
+ };
+
+ c->prog_data.param_convert[c->prog_data.nr_params] =
+ PARAM_NO_CONVERT;
+ c->prog_data.param_convert[c->prog_data.nr_params + 1] =
+ PARAM_NO_CONVERT;
+
+ fs_reg scale_x = fs_reg(UNIFORM, c->prog_data.nr_params);
+ fs_reg scale_y = fs_reg(UNIFORM, c->prog_data.nr_params + 1);
+ GLuint index = _mesa_add_state_reference(params,
+ (gl_state_index *)tokens);
+ float *vec_values = this->fp->Base.Parameters->ParameterValues[index];
+
+ c->prog_data.param[c->prog_data.nr_params++] = &vec_values[0];
+ c->prog_data.param[c->prog_data.nr_params++] = &vec_values[1];
+
+ fs_reg dst = fs_reg(this, ir->coordinate->type);
+ fs_reg src = coordinate;
+ coordinate = dst;
+
+ emit(fs_inst(BRW_OPCODE_MUL, dst, src, scale_x));
+ dst.reg_offset++;
+ src.reg_offset++;
+ emit(fs_inst(BRW_OPCODE_MUL, dst, src, scale_y));
+ }
+
/* Writemasking doesn't eliminate channels on SIMD8 texture
* samples, so don't worry about them.
*/
@@ -1469,11 +1270,7 @@ fs_visitor::visit(ir_texture *ir)
inst = emit_texture_gen5(ir, dst, coordinate);
}
- inst->sampler =
- _mesa_get_sampler_uniform_value(ir->sampler,
- ctx->Shader.CurrentProgram,
- &brw->fragment_program->Base);
- inst->sampler = c->fp->program.Base.SamplerUnits[inst->sampler];
+ inst->sampler = sampler;
this->result = dst;
@@ -1548,7 +1345,8 @@ fs_visitor::visit(ir_discard *ir)
assert(ir->condition == NULL); /* FINISHME */
- emit(fs_inst(FS_OPCODE_DISCARD, temp, temp));
+ emit(fs_inst(FS_OPCODE_DISCARD_NOT, temp, reg_null_d));
+ emit(fs_inst(FS_OPCODE_DISCARD_AND, reg_null_d, temp));
kill_emitted = true;
}
@@ -1580,6 +1378,206 @@ fs_visitor::visit(ir_constant *ir)
}
void
+fs_visitor::emit_bool_to_cond_code(ir_rvalue *ir)
+{
+ ir_expression *expr = ir->as_expression();
+
+ if (expr) {
+ fs_reg op[2];
+ fs_inst *inst;
+
+ for (unsigned int i = 0; i < expr->get_num_operands(); i++) {
+ assert(expr->operands[i]->type->is_scalar());
+
+ expr->operands[i]->accept(this);
+ op[i] = this->result;
+ }
+
+ switch (expr->operation) {
+ case ir_unop_logic_not:
+ inst = emit(fs_inst(BRW_OPCODE_AND, reg_null_d, op[0], fs_reg(1)));
+ inst->conditional_mod = BRW_CONDITIONAL_Z;
+ break;
+
+ case ir_binop_logic_xor:
+ inst = emit(fs_inst(BRW_OPCODE_XOR, reg_null_d, op[0], op[1]));
+ inst->conditional_mod = BRW_CONDITIONAL_NZ;
+ break;
+
+ case ir_binop_logic_or:
+ inst = emit(fs_inst(BRW_OPCODE_OR, reg_null_d, op[0], op[1]));
+ inst->conditional_mod = BRW_CONDITIONAL_NZ;
+ break;
+
+ case ir_binop_logic_and:
+ inst = emit(fs_inst(BRW_OPCODE_AND, reg_null_d, op[0], op[1]));
+ inst->conditional_mod = BRW_CONDITIONAL_NZ;
+ break;
+
+ case ir_unop_f2b:
+ if (intel->gen >= 6) {
+ inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null_d,
+ op[0], fs_reg(0.0f)));
+ } else {
+ inst = emit(fs_inst(BRW_OPCODE_MOV, reg_null_d, op[0]));
+ }
+ inst->conditional_mod = BRW_CONDITIONAL_NZ;
+ break;
+
+ case ir_unop_i2b:
+ if (intel->gen >= 6) {
+ inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null_d, op[0], fs_reg(0)));
+ } else {
+ inst = emit(fs_inst(BRW_OPCODE_MOV, reg_null_d, op[0]));
+ }
+ inst->conditional_mod = BRW_CONDITIONAL_NZ;
+ break;
+
+ case ir_binop_greater:
+ inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null_d, op[0], op[1]));
+ inst->conditional_mod = BRW_CONDITIONAL_G;
+ break;
+ case ir_binop_gequal:
+ inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null_d, op[0], op[1]));
+ inst->conditional_mod = BRW_CONDITIONAL_GE;
+ break;
+ case ir_binop_less:
+ inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null_d, op[0], op[1]));
+ inst->conditional_mod = BRW_CONDITIONAL_L;
+ break;
+ case ir_binop_lequal:
+ inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null_d, op[0], op[1]));
+ inst->conditional_mod = BRW_CONDITIONAL_LE;
+ break;
+ case ir_binop_equal:
+ case ir_binop_all_equal:
+ inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null_d, op[0], op[1]));
+ inst->conditional_mod = BRW_CONDITIONAL_Z;
+ break;
+ case ir_binop_nequal:
+ case ir_binop_any_nequal:
+ inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null_d, op[0], op[1]));
+ inst->conditional_mod = BRW_CONDITIONAL_NZ;
+ break;
+ default:
+ assert(!"not reached");
+ this->fail = true;
+ break;
+ }
+ return;
+ }
+
+ ir->accept(this);
+
+ if (intel->gen >= 6) {
+ fs_inst *inst = emit(fs_inst(BRW_OPCODE_AND, reg_null_d,
+ this->result, fs_reg(1)));
+ inst->conditional_mod = BRW_CONDITIONAL_NZ;
+ } else {
+ fs_inst *inst = emit(fs_inst(BRW_OPCODE_MOV, reg_null_d, this->result));
+ inst->conditional_mod = BRW_CONDITIONAL_NZ;
+ }
+}
+
+/**
+ * Emit a gen6 IF statement with the comparison folded into the IF
+ * instruction.
+ */
+void
+fs_visitor::emit_if_gen6(ir_if *ir)
+{
+ ir_expression *expr = ir->condition->as_expression();
+
+ if (expr) {
+ fs_reg op[2];
+ fs_inst *inst;
+ fs_reg temp;
+
+ for (unsigned int i = 0; i < expr->get_num_operands(); i++) {
+ assert(expr->operands[i]->type->is_scalar());
+
+ expr->operands[i]->accept(this);
+ op[i] = this->result;
+ }
+
+ switch (expr->operation) {
+ case ir_unop_logic_not:
+ inst = emit(fs_inst(BRW_OPCODE_IF, temp, op[0], fs_reg(1)));
+ inst->conditional_mod = BRW_CONDITIONAL_Z;
+ return;
+
+ case ir_binop_logic_xor:
+ inst = emit(fs_inst(BRW_OPCODE_IF, reg_null_d, op[0], op[1]));
+ inst->conditional_mod = BRW_CONDITIONAL_NZ;
+ return;
+
+ case ir_binop_logic_or:
+ temp = fs_reg(this, glsl_type::bool_type);
+ emit(fs_inst(BRW_OPCODE_OR, temp, op[0], op[1]));
+ inst = emit(fs_inst(BRW_OPCODE_IF, reg_null_d, temp, fs_reg(0)));
+ inst->conditional_mod = BRW_CONDITIONAL_NZ;
+ return;
+
+ case ir_binop_logic_and:
+ temp = fs_reg(this, glsl_type::bool_type);
+ emit(fs_inst(BRW_OPCODE_AND, temp, op[0], op[1]));
+ inst = emit(fs_inst(BRW_OPCODE_IF, reg_null_d, temp, fs_reg(0)));
+ inst->conditional_mod = BRW_CONDITIONAL_NZ;
+ return;
+
+ case ir_unop_f2b:
+ inst = emit(fs_inst(BRW_OPCODE_IF, reg_null_f, op[0], fs_reg(0)));
+ inst->conditional_mod = BRW_CONDITIONAL_NZ;
+ return;
+
+ case ir_unop_i2b:
+ inst = emit(fs_inst(BRW_OPCODE_IF, reg_null_d, op[0], fs_reg(0)));
+ inst->conditional_mod = BRW_CONDITIONAL_NZ;
+ return;
+
+ case ir_binop_greater:
+ inst = emit(fs_inst(BRW_OPCODE_IF, reg_null_d, op[0], op[1]));
+ inst->conditional_mod = BRW_CONDITIONAL_G;
+ return;
+ case ir_binop_gequal:
+ inst = emit(fs_inst(BRW_OPCODE_IF, reg_null_d, op[0], op[1]));
+ inst->conditional_mod = BRW_CONDITIONAL_GE;
+ return;
+ case ir_binop_less:
+ inst = emit(fs_inst(BRW_OPCODE_IF, reg_null_d, op[0], op[1]));
+ inst->conditional_mod = BRW_CONDITIONAL_L;
+ return;
+ case ir_binop_lequal:
+ inst = emit(fs_inst(BRW_OPCODE_IF, reg_null_d, op[0], op[1]));
+ inst->conditional_mod = BRW_CONDITIONAL_LE;
+ return;
+ case ir_binop_equal:
+ case ir_binop_all_equal:
+ inst = emit(fs_inst(BRW_OPCODE_IF, reg_null_d, op[0], op[1]));
+ inst->conditional_mod = BRW_CONDITIONAL_Z;
+ return;
+ case ir_binop_nequal:
+ case ir_binop_any_nequal:
+ inst = emit(fs_inst(BRW_OPCODE_IF, reg_null_d, op[0], op[1]));
+ inst->conditional_mod = BRW_CONDITIONAL_NZ;
+ return;
+ default:
+ assert(!"not reached");
+ inst = emit(fs_inst(BRW_OPCODE_IF, reg_null_d, op[0], fs_reg(0)));
+ inst->conditional_mod = BRW_CONDITIONAL_NZ;
+ this->fail = true;
+ return;
+ }
+ return;
+ }
+
+ ir->condition->accept(this);
+
+ fs_inst *inst = emit(fs_inst(BRW_OPCODE_IF, reg_null_d, this->result, fs_reg(0)));
+ inst->conditional_mod = BRW_CONDITIONAL_NZ;
+}
+
+void
fs_visitor::visit(ir_if *ir)
{
fs_inst *inst;
@@ -1589,13 +1587,14 @@ fs_visitor::visit(ir_if *ir)
*/
this->base_ir = ir->condition;
- /* Generate the condition into the condition code. */
- ir->condition->accept(this);
- inst = emit(fs_inst(BRW_OPCODE_MOV, fs_reg(brw_null_reg()), this->result));
- inst->conditional_mod = BRW_CONDITIONAL_NZ;
+ if (intel->gen >= 6) {
+ emit_if_gen6(ir);
+ } else {
+ emit_bool_to_cond_code(ir->condition);
- inst = emit(fs_inst(BRW_OPCODE_IF));
- inst->predicated = true;
+ inst = emit(fs_inst(BRW_OPCODE_IF));
+ inst->predicated = true;
+ }
foreach_iter(exec_list_iterator, iter, ir->then_instructions) {
ir_instruction *ir = (ir_instruction *)iter.get();
@@ -1642,7 +1641,7 @@ fs_visitor::visit(ir_loop *ir)
this->base_ir = ir->to;
ir->to->accept(this);
- fs_inst *inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null,
+ fs_inst *inst = emit(fs_inst(BRW_OPCODE_CMP, reg_null_d,
counter, this->result));
switch (ir->cmp) {
case ir_binop_equal:
@@ -1780,6 +1779,7 @@ fs_visitor::emit_dummy_fs()
write = emit(fs_inst(FS_OPCODE_FB_WRITE,
fs_reg(0),
fs_reg(0)));
+ write->base_mrf = 0;
}
/* The register location here is relative to the start of the URB
@@ -1844,7 +1844,7 @@ fs_visitor::emit_interpolation_setup_gen4()
interp_reg(FRAG_ATTRIB_WPOS, 3)));
/* Compute the pixel 1/W value from wpos.w. */
this->pixel_w = fs_reg(this, glsl_type::float_type);
- emit(fs_inst(FS_OPCODE_RCP, this->pixel_w, wpos_w));
+ emit_math(FS_OPCODE_RCP, this->pixel_w, wpos_w);
this->current_annotation = NULL;
}
@@ -1856,23 +1856,32 @@ fs_visitor::emit_interpolation_setup_gen6()
/* If the pixel centers end up used, the setup is the same as for gen4. */
this->current_annotation = "compute pixel centers";
- this->pixel_x = fs_reg(this, glsl_type::uint_type);
- this->pixel_y = fs_reg(this, glsl_type::uint_type);
- this->pixel_x.type = BRW_REGISTER_TYPE_UW;
- this->pixel_y.type = BRW_REGISTER_TYPE_UW;
+ fs_reg int_pixel_x = fs_reg(this, glsl_type::uint_type);
+ fs_reg int_pixel_y = fs_reg(this, glsl_type::uint_type);
+ int_pixel_x.type = BRW_REGISTER_TYPE_UW;
+ int_pixel_y.type = BRW_REGISTER_TYPE_UW;
emit(fs_inst(BRW_OPCODE_ADD,
- this->pixel_x,
+ int_pixel_x,
fs_reg(stride(suboffset(g1_uw, 4), 2, 4, 0)),
fs_reg(brw_imm_v(0x10101010))));
emit(fs_inst(BRW_OPCODE_ADD,
- this->pixel_y,
+ int_pixel_y,
fs_reg(stride(suboffset(g1_uw, 5), 2, 4, 0)),
fs_reg(brw_imm_v(0x11001100))));
+ /* As of gen6, we can no longer mix float and int sources. We have
+ * to turn the integer pixel centers into floats for their actual
+ * use.
+ */
+ this->pixel_x = fs_reg(this, glsl_type::float_type);
+ this->pixel_y = fs_reg(this, glsl_type::float_type);
+ emit(fs_inst(BRW_OPCODE_MOV, this->pixel_x, int_pixel_x));
+ emit(fs_inst(BRW_OPCODE_MOV, this->pixel_y, int_pixel_y));
+
this->current_annotation = "compute 1/pos.w";
this->wpos_w = fs_reg(brw_vec8_grf(c->key.source_w_reg, 0));
this->pixel_w = fs_reg(this, glsl_type::float_type);
- emit(fs_inst(FS_OPCODE_RCP, this->pixel_w, wpos_w));
+ emit_math(FS_OPCODE_RCP, this->pixel_w, wpos_w);
this->delta_x = fs_reg(brw_vec8_grf(2, 0));
this->delta_y = fs_reg(brw_vec8_grf(3, 0));
@@ -1951,6 +1960,7 @@ fs_visitor::emit_fb_writes()
fs_inst *inst = emit(fs_inst(FS_OPCODE_FB_WRITE,
reg_undef, reg_undef));
inst->target = target;
+ inst->base_mrf = 0;
inst->mlen = nr;
if (target == c->key.nr_color_regions - 1)
inst->eot = true;
@@ -1960,6 +1970,7 @@ fs_visitor::emit_fb_writes()
if (c->key.nr_color_regions == 0) {
fs_inst *inst = emit(fs_inst(FS_OPCODE_FB_WRITE,
reg_undef, reg_undef));
+ inst->base_mrf = 0;
inst->mlen = nr;
inst->eot = true;
inst->header_present = header_present;
@@ -1984,15 +1995,29 @@ fs_visitor::generate_fb_write(fs_inst *inst)
if (inst->header_present) {
if (intel->gen >= 6) {
brw_MOV(p,
- brw_message_reg(0),
+ brw_message_reg(inst->base_mrf),
brw_vec8_grf(0, 0));
+
+ if (inst->target > 0) {
+ /* Set the render target index for choosing BLEND_STATE. */
+ brw_MOV(p, retype(brw_vec1_reg(BRW_MESSAGE_REGISTER_FILE, 0, 2),
+ BRW_REGISTER_TYPE_UD),
+ brw_imm_ud(inst->target));
+ }
+
+ /* Clear viewport index, render target array index. */
+ brw_AND(p, retype(brw_vec1_reg(BRW_MESSAGE_REGISTER_FILE, 0, 0),
+ BRW_REGISTER_TYPE_UD),
+ retype(brw_vec1_grf(0, 0), BRW_REGISTER_TYPE_UD),
+ brw_imm_ud(0xf7ff));
+
implied_header = brw_null_reg();
} else {
implied_header = retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UW);
}
brw_MOV(p,
- brw_message_reg(1),
+ brw_message_reg(inst->base_mrf + 1),
brw_vec8_grf(1, 0));
} else {
implied_header = brw_null_reg();
@@ -2003,7 +2028,7 @@ fs_visitor::generate_fb_write(fs_inst *inst)
brw_fb_WRITE(p,
8, /* dispatch_width */
retype(vec8(brw_null_reg()), BRW_REGISTER_TYPE_UW),
- 0, /* base MRF */
+ inst->base_mrf,
implied_header,
inst->target,
inst->mlen,
@@ -2066,21 +2091,35 @@ fs_visitor::generate_math(fs_inst *inst,
break;
}
- if (inst->opcode == FS_OPCODE_POW) {
- brw_MOV(p, brw_message_reg(3), src[1]);
- }
+ if (intel->gen >= 6) {
+ assert(inst->mlen == 0);
+
+ if (inst->opcode == FS_OPCODE_POW) {
+ brw_math2(p, dst, op, src[0], src[1]);
+ } else {
+ brw_math(p, dst,
+ op,
+ inst->saturate ? BRW_MATH_SATURATE_SATURATE :
+ BRW_MATH_SATURATE_NONE,
+ 0, src[0],
+ BRW_MATH_DATA_VECTOR,
+ BRW_MATH_PRECISION_FULL);
+ }
+ } else {
+ assert(inst->mlen >= 1);
- brw_math(p, dst,
- op,
- inst->saturate ? BRW_MATH_SATURATE_SATURATE :
- BRW_MATH_SATURATE_NONE,
- 2, src[0],
- BRW_MATH_DATA_VECTOR,
- BRW_MATH_PRECISION_FULL);
+ brw_math(p, dst,
+ op,
+ inst->saturate ? BRW_MATH_SATURATE_SATURATE :
+ BRW_MATH_SATURATE_NONE,
+ inst->base_mrf, src[0],
+ BRW_MATH_DATA_VECTOR,
+ BRW_MATH_PRECISION_FULL);
+ }
}
void
-fs_visitor::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src)
+fs_visitor::generate_tex(fs_inst *inst, struct brw_reg dst)
{
int msg_type = -1;
int rlen = 4;
@@ -2111,17 +2150,17 @@ fs_visitor::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src)
*/
msg_type = BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE;
if (inst->shadow_compare) {
- assert(inst->mlen == 5);
+ assert(inst->mlen == 6);
} else {
- assert(inst->mlen <= 6);
+ assert(inst->mlen <= 4);
}
break;
case FS_OPCODE_TXB:
if (inst->shadow_compare) {
- assert(inst->mlen == 5);
+ assert(inst->mlen == 6);
msg_type = BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE;
} else {
- assert(inst->mlen == 8);
+ assert(inst->mlen == 9);
msg_type = BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_BIAS;
simd_mode = BRW_SAMPLER_SIMD_MODE_SIMD16;
}
@@ -2135,19 +2174,16 @@ fs_visitor::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src)
dst = vec16(dst);
}
- /* g0 header. */
- src.nr--;
-
brw_SAMPLE(p,
retype(dst, BRW_REGISTER_TYPE_UW),
- src.nr,
+ inst->base_mrf,
retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UW),
SURF_INDEX_TEXTURE(inst->sampler),
inst->sampler,
WRITEMASK_XYZW,
msg_type,
rlen,
- inst->mlen + 1,
+ inst->mlen,
0,
1,
simd_mode);
@@ -2217,16 +2253,128 @@ fs_visitor::generate_ddy(fs_inst *inst, struct brw_reg dst, struct brw_reg src)
}
void
-fs_visitor::generate_discard(fs_inst *inst, struct brw_reg temp)
+fs_visitor::generate_discard_not(fs_inst *inst, struct brw_reg mask)
{
- struct brw_reg g0 = retype(brw_vec1_grf(0, 0), BRW_REGISTER_TYPE_UW);
- temp = brw_uw1_reg(temp.file, temp.nr, 0);
+ if (intel->gen >= 6) {
+ /* Gen6 no longer has the mask reg for us to just read the
+ * active channels from. However, cmp updates just the channels
+ * of the flag reg that are enabled, so we can get at the
+ * channel enables that way. In this step, make a reg of ones
+ * we'll compare to.
+ */
+ brw_MOV(p, mask, brw_imm_ud(1));
+ } else {
+ brw_push_insn_state(p);
+ brw_set_mask_control(p, BRW_MASK_DISABLE);
+ brw_NOT(p, mask, brw_mask_reg(1)); /* IMASK */
+ brw_pop_insn_state(p);
+ }
+}
- brw_push_insn_state(p);
- brw_set_mask_control(p, BRW_MASK_DISABLE);
- brw_NOT(p, temp, brw_mask_reg(1)); /* IMASK */
- brw_AND(p, g0, temp, g0);
- brw_pop_insn_state(p);
+void
+fs_visitor::generate_discard_and(fs_inst *inst, struct brw_reg mask)
+{
+ if (intel->gen >= 6) {
+ struct brw_reg f0 = brw_flag_reg();
+ struct brw_reg g1 = retype(brw_vec1_grf(1, 7), BRW_REGISTER_TYPE_UW);
+
+ brw_push_insn_state(p);
+ brw_set_mask_control(p, BRW_MASK_DISABLE);
+ brw_MOV(p, f0, brw_imm_uw(0xffff)); /* inactive channels undiscarded */
+ brw_pop_insn_state(p);
+
+ brw_CMP(p, retype(brw_null_reg(), BRW_REGISTER_TYPE_UD),
+ BRW_CONDITIONAL_Z, mask, brw_imm_ud(0)); /* active channels fail test */
+ /* Undo CMP's whacking of predication*/
+ brw_set_predicate_control(p, BRW_PREDICATE_NONE);
+
+ brw_push_insn_state(p);
+ brw_set_mask_control(p, BRW_MASK_DISABLE);
+ brw_AND(p, g1, f0, g1);
+ brw_pop_insn_state(p);
+ } else {
+ struct brw_reg g0 = retype(brw_vec1_grf(0, 0), BRW_REGISTER_TYPE_UW);
+
+ mask = brw_uw1_reg(mask.file, mask.nr, 0);
+
+ brw_push_insn_state(p);
+ brw_set_mask_control(p, BRW_MASK_DISABLE);
+ brw_AND(p, g0, mask, g0);
+ brw_pop_insn_state(p);
+ }
+}
+
+void
+fs_visitor::generate_spill(fs_inst *inst, struct brw_reg src)
+{
+ assert(inst->mlen != 0);
+
+ brw_MOV(p,
+ retype(brw_message_reg(inst->base_mrf + 1), BRW_REGISTER_TYPE_UD),
+ retype(src, BRW_REGISTER_TYPE_UD));
+ brw_oword_block_write_scratch(p, brw_message_reg(inst->base_mrf), 1,
+ inst->offset);
+}
+
+void
+fs_visitor::generate_unspill(fs_inst *inst, struct brw_reg dst)
+{
+ assert(inst->mlen != 0);
+
+ /* Clear any post destination dependencies that would be ignored by
+ * the block read. See the B-Spec for pre-gen5 send instruction.
+ *
+ * This could use a better solution, since texture sampling and
+ * math reads could potentially run into it as well -- anywhere
+ * that we have a SEND with a destination that is a register that
+ * was written but not read within the last N instructions (what's
+ * N? unsure). This is rare because of dead code elimination, but
+ * not impossible.
+ */
+ if (intel->gen == 4 && !intel->is_g4x)
+ brw_MOV(p, brw_null_reg(), dst);
+
+ brw_oword_block_read_scratch(p, dst, brw_message_reg(inst->base_mrf), 1,
+ inst->offset);
+
+ if (intel->gen == 4 && !intel->is_g4x) {
+ /* gen4 errata: destination from a send can't be used as a
+ * destination until it's been read. Just read it so we don't
+ * have to worry.
+ */
+ brw_MOV(p, brw_null_reg(), dst);
+ }
+}
+
+
+void
+fs_visitor::generate_pull_constant_load(fs_inst *inst, struct brw_reg dst)
+{
+ assert(inst->mlen != 0);
+
+ /* Clear any post destination dependencies that would be ignored by
+ * the block read. See the B-Spec for pre-gen5 send instruction.
+ *
+ * This could use a better solution, since texture sampling and
+ * math reads could potentially run into it as well -- anywhere
+ * that we have a SEND with a destination that is a register that
+ * was written but not read within the last N instructions (what's
+ * N? unsure). This is rare because of dead code elimination, but
+ * not impossible.
+ */
+ if (intel->gen == 4 && !intel->is_g4x)
+ brw_MOV(p, brw_null_reg(), dst);
+
+ brw_oword_block_read(p, dst, brw_message_reg(inst->base_mrf),
+ inst->offset, SURF_INDEX_FRAG_CONST_BUFFER);
+
+ if (intel->gen == 4 && !intel->is_g4x) {
+ /* gen4 errata: destination from a send can't be used as a
+ * destination until it's been read. Just read it so we don't
+ * have to worry.
+ */
+ brw_MOV(p, brw_null_reg(), dst);
+ }
}
void
@@ -2247,7 +2395,7 @@ fs_visitor::assign_curb_setup()
constant_nr % 8);
inst->src[i].file = FIXED_HW_REG;
- inst->src[i].fixed_hw_reg = brw_reg;
+ inst->src[i].fixed_hw_reg = retype(brw_reg, inst->src[i].type);
}
}
}
@@ -2313,218 +2461,152 @@ fs_visitor::assign_urb_setup()
this->first_non_payload_grf = urb_start + c->prog_data.urb_read_length;
}
-static void
-assign_reg(int *reg_hw_locations, fs_reg *reg)
-{
- if (reg->file == GRF && reg->reg != 0) {
- reg->hw_reg = reg_hw_locations[reg->reg] + reg->reg_offset;
- reg->reg = 0;
- }
-}
-
-void
-fs_visitor::assign_regs_trivial()
-{
- int last_grf = 0;
- int hw_reg_mapping[this->virtual_grf_next];
- int i;
-
- hw_reg_mapping[0] = 0;
- hw_reg_mapping[1] = this->first_non_payload_grf;
- for (i = 2; i < this->virtual_grf_next; i++) {
- hw_reg_mapping[i] = (hw_reg_mapping[i - 1] +
- this->virtual_grf_sizes[i - 1]);
- }
- last_grf = hw_reg_mapping[i - 1] + this->virtual_grf_sizes[i - 1];
-
- foreach_iter(exec_list_iterator, iter, this->instructions) {
- fs_inst *inst = (fs_inst *)iter.get();
-
- assign_reg(hw_reg_mapping, &inst->dst);
- assign_reg(hw_reg_mapping, &inst->src[0]);
- assign_reg(hw_reg_mapping, &inst->src[1]);
- }
-
- this->grf_used = last_grf + 1;
-}
-
+/**
+ * Split large virtual GRFs into separate components if we can.
+ *
+ * This is mostly duplicated with what brw_fs_vector_splitting does,
+ * but that's really conservative because it's afraid of doing
+ * splitting that doesn't result in real progress after the rest of
+ * the optimization phases, which would cause infinite looping in
+ * optimization. We can do it once here, safely. This also has the
+ * opportunity to split interpolated values, or maybe even uniforms,
+ * which we don't have at the IR level.
+ *
+ * We want to split, because virtual GRFs are what we register
+ * allocate and spill (due to contiguousness requirements for some
+ * instructions), and they're what we naturally generate in the
+ * codegen process, but most virtual GRFs don't actually need to be
+ * contiguous sets of GRFs. If we split, we'll end up with reduced
+ * live intervals and better dead code elimination and coalescing.
+ */
void
-fs_visitor::assign_regs()
+fs_visitor::split_virtual_grfs()
{
- int last_grf = 0;
- int hw_reg_mapping[this->virtual_grf_next + 1];
- int base_reg_count = BRW_MAX_GRF - this->first_non_payload_grf;
- int class_sizes[base_reg_count];
- int class_count = 0;
- int aligned_pair_class = -1;
-
- /* Set up the register classes.
- *
- * The base registers store a scalar value. For texture samples,
- * we get virtual GRFs composed of 4 contiguous hw register. For
- * structures and arrays, we store them as contiguous larger things
- * than that, though we should be able to do better most of the
- * time.
- */
- class_sizes[class_count++] = 1;
- if (brw->has_pln && intel->gen < 6) {
- /* Always set up the (unaligned) pairs for gen5, so we can find
- * them for making the aligned pair class.
- */
- class_sizes[class_count++] = 2;
- }
- for (int r = 1; r < this->virtual_grf_next; r++) {
- int i;
-
- for (i = 0; i < class_count; i++) {
- if (class_sizes[i] == this->virtual_grf_sizes[r])
- break;
- }
- if (i == class_count) {
- if (this->virtual_grf_sizes[r] >= base_reg_count) {
- fprintf(stderr, "Object too large to register allocate.\n");
- this->fail = true;
- }
+ int num_vars = this->virtual_grf_next;
+ bool split_grf[num_vars];
+ int new_virtual_grf[num_vars];
- class_sizes[class_count++] = this->virtual_grf_sizes[r];
- }
+ /* Try to split anything > 0 sized. */
+ for (int i = 0; i < num_vars; i++) {
+ if (this->virtual_grf_sizes[i] != 1)
+ split_grf[i] = true;
+ else
+ split_grf[i] = false;
}
- int ra_reg_count = 0;
- int class_base_reg[class_count];
- int class_reg_count[class_count];
- int classes[class_count + 1];
-
- for (int i = 0; i < class_count; i++) {
- class_base_reg[i] = ra_reg_count;
- class_reg_count[i] = base_reg_count - (class_sizes[i] - 1);
- ra_reg_count += class_reg_count[i];
+ if (brw->has_pln) {
+ /* PLN opcodes rely on the delta_xy being contiguous. */
+ split_grf[this->delta_x.reg] = false;
}
- struct ra_regs *regs = ra_alloc_reg_set(ra_reg_count);
- for (int i = 0; i < class_count; i++) {
- classes[i] = ra_alloc_reg_class(regs);
-
- for (int i_r = 0; i_r < class_reg_count[i]; i_r++) {
- ra_class_add_reg(regs, classes[i], class_base_reg[i] + i_r);
- }
-
- /* Add conflicts between our contiguous registers aliasing
- * base regs and other register classes' contiguous registers
- * that alias base regs, or the base regs themselves for classes[0].
- */
- for (int c = 0; c <= i; c++) {
- for (int i_r = 0; i_r < class_reg_count[i]; i_r++) {
- for (int c_r = MAX2(0, i_r - (class_sizes[c] - 1));
- c_r < MIN2(class_reg_count[c], i_r + class_sizes[i]);
- c_r++) {
-
- if (0) {
- printf("%d/%d conflicts %d/%d\n",
- class_sizes[i], this->first_non_payload_grf + i_r,
- class_sizes[c], this->first_non_payload_grf + c_r);
- }
+ foreach_iter(exec_list_iterator, iter, this->instructions) {
+ fs_inst *inst = (fs_inst *)iter.get();
- ra_add_reg_conflict(regs,
- class_base_reg[i] + i_r,
- class_base_reg[c] + c_r);
- }
- }
+ /* Texturing produces 4 contiguous registers, so no splitting. */
+ if ((inst->opcode == FS_OPCODE_TEX ||
+ inst->opcode == FS_OPCODE_TXB ||
+ inst->opcode == FS_OPCODE_TXL) &&
+ inst->dst.file == GRF) {
+ split_grf[inst->dst.reg] = false;
}
}
- /* Add a special class for aligned pairs, which we'll put delta_x/y
- * in on gen5 so that we can do PLN.
+ /* Allocate new space for split regs. Note that the virtual
+ * numbers will be contiguous.
*/
- if (brw->has_pln && intel->gen < 6) {
- int reg_count = (base_reg_count - 1) / 2;
- int unaligned_pair_class = 1;
- assert(class_sizes[unaligned_pair_class] == 2);
-
- aligned_pair_class = class_count;
- classes[aligned_pair_class] = ra_alloc_reg_class(regs);
- class_base_reg[aligned_pair_class] = 0;
- class_reg_count[aligned_pair_class] = 0;
- int start = (this->first_non_payload_grf & 1) ? 1 : 0;
-
- for (int i = 0; i < reg_count; i++) {
- ra_class_add_reg(regs, classes[aligned_pair_class],
- class_base_reg[unaligned_pair_class] + i * 2 + start);
+ for (int i = 0; i < num_vars; i++) {
+ if (split_grf[i]) {
+ new_virtual_grf[i] = virtual_grf_alloc(1);
+ for (int j = 2; j < this->virtual_grf_sizes[i]; j++) {
+ int reg = virtual_grf_alloc(1);
+ assert(reg == new_virtual_grf[i] + j - 1);
+ }
+ this->virtual_grf_sizes[i] = 1;
}
- class_count++;
}
- ra_set_finalize(regs);
+ foreach_iter(exec_list_iterator, iter, this->instructions) {
+ fs_inst *inst = (fs_inst *)iter.get();
- struct ra_graph *g = ra_alloc_interference_graph(regs,
- this->virtual_grf_next);
- /* Node 0 is just a placeholder to keep virtual_grf[] mapping 1:1
- * with nodes.
- */
- ra_set_node_class(g, 0, classes[0]);
-
- for (int i = 1; i < this->virtual_grf_next; i++) {
- for (int c = 0; c < class_count; c++) {
- if (class_sizes[c] == this->virtual_grf_sizes[i]) {
- if (aligned_pair_class >= 0 &&
- this->delta_x.reg == i) {
- ra_set_node_class(g, i, classes[aligned_pair_class]);
- } else {
- ra_set_node_class(g, i, classes[c]);
- }
- break;
- }
+ if (inst->dst.file == GRF &&
+ split_grf[inst->dst.reg] &&
+ inst->dst.reg_offset != 0) {
+ inst->dst.reg = (new_virtual_grf[inst->dst.reg] +
+ inst->dst.reg_offset - 1);
+ inst->dst.reg_offset = 0;
}
-
- for (int j = 1; j < i; j++) {
- if (virtual_grf_interferes(i, j)) {
- ra_add_node_interference(g, i, j);
+ for (int i = 0; i < 3; i++) {
+ if (inst->src[i].file == GRF &&
+ split_grf[inst->src[i].reg] &&
+ inst->src[i].reg_offset != 0) {
+ inst->src[i].reg = (new_virtual_grf[inst->src[i].reg] +
+ inst->src[i].reg_offset - 1);
+ inst->src[i].reg_offset = 0;
}
}
}
+}
- /* FINISHME: Handle spilling */
- if (!ra_allocate_no_spills(g)) {
- fprintf(stderr, "Failed to allocate registers.\n");
- this->fail = true;
+/**
+ * Choose accesses from the UNIFORM file to demote to using the pull
+ * constant buffer.
+ *
+ * We allow a fragment shader to have more than the specified minimum
+ * maximum number of fragment shader uniform components (64). If
+ * there are too many of these, they'd fill up all of register space.
+ * So, this will push some of them out to the pull constant buffer and
+ * update the program to load them.
+ */
+void
+fs_visitor::setup_pull_constants()
+{
+ /* Only allow 16 registers (128 uniform components) as push constants. */
+ unsigned int max_uniform_components = 16 * 8;
+ if (c->prog_data.nr_params <= max_uniform_components)
return;
- }
- /* Get the chosen virtual registers for each node, and map virtual
- * regs in the register classes back down to real hardware reg
- * numbers.
+ /* Just demote the end of the list. We could probably do better
+ * here, demoting things that are rarely used in the program first.
*/
- hw_reg_mapping[0] = 0; /* unused */
- for (int i = 1; i < this->virtual_grf_next; i++) {
- int reg = ra_get_node_reg(g, i);
- int hw_reg = -1;
-
- for (int c = 0; c < class_count; c++) {
- if (reg >= class_base_reg[c] &&
- reg < class_base_reg[c] + class_reg_count[c]) {
- hw_reg = reg - class_base_reg[c];
- break;
- }
- }
-
- assert(hw_reg != -1);
- hw_reg_mapping[i] = this->first_non_payload_grf + hw_reg;
- last_grf = MAX2(last_grf,
- hw_reg_mapping[i] + this->virtual_grf_sizes[i] - 1);
- }
+ int pull_uniform_base = max_uniform_components;
+ int pull_uniform_count = c->prog_data.nr_params - pull_uniform_base;
foreach_iter(exec_list_iterator, iter, this->instructions) {
fs_inst *inst = (fs_inst *)iter.get();
- assign_reg(hw_reg_mapping, &inst->dst);
- assign_reg(hw_reg_mapping, &inst->src[0]);
- assign_reg(hw_reg_mapping, &inst->src[1]);
- }
+ for (int i = 0; i < 3; i++) {
+ if (inst->src[i].file != UNIFORM)
+ continue;
+
+ int uniform_nr = inst->src[i].hw_reg + inst->src[i].reg_offset;
+ if (uniform_nr < pull_uniform_base)
+ continue;
- this->grf_used = last_grf + 1;
+ fs_reg dst = fs_reg(this, glsl_type::float_type);
+ fs_inst *pull = new(mem_ctx) fs_inst(FS_OPCODE_PULL_CONSTANT_LOAD,
+ dst);
+ pull->offset = ((uniform_nr - pull_uniform_base) * 4) & ~15;
+ pull->ir = inst->ir;
+ pull->annotation = inst->annotation;
+ pull->base_mrf = 14;
+ pull->mlen = 1;
+
+ inst->insert_before(pull);
+
+ inst->src[i].file = GRF;
+ inst->src[i].reg = dst.reg;
+ inst->src[i].reg_offset = 0;
+ inst->src[i].smear = (uniform_nr - pull_uniform_base) & 3;
+ }
+ }
- talloc_free(g);
- talloc_free(regs);
+ for (int i = 0; i < pull_uniform_count; i++) {
+ c->prog_data.pull_param[i] = c->prog_data.param[pull_uniform_base + i];
+ c->prog_data.pull_param_convert[i] =
+ c->prog_data.param_convert[pull_uniform_base + i];
+ }
+ c->prog_data.nr_params -= pull_uniform_count;
+ c->prog_data.nr_pull_params = pull_uniform_count;
}
void
@@ -2535,6 +2617,7 @@ fs_visitor::calculate_live_intervals()
int *use = talloc_array(mem_ctx, int, num_vars);
int loop_depth = 0;
int loop_start = 0;
+ int bb_header_ip = 0;
for (int i = 0; i < num_vars; i++) {
def[i] = 1 << 30;
@@ -2552,12 +2635,8 @@ fs_visitor::calculate_live_intervals()
loop_depth--;
if (loop_depth == 0) {
- /* FINISHME:
- *
- * Patches up any vars marked for use within the loop as
- * live until the end. This is conservative, as there
- * will often be variables defined and used inside the
- * loop but dead at the end of the loop body.
+ /* Patches up the use of vars marked for being live across
+ * the whole loop.
*/
for (int i = 0; i < num_vars; i++) {
if (use[i] == loop_start) {
@@ -2566,22 +2645,53 @@ fs_visitor::calculate_live_intervals()
}
}
} else {
- int eip = ip;
-
- if (loop_depth)
- eip = loop_start;
-
for (unsigned int i = 0; i < 3; i++) {
if (inst->src[i].file == GRF && inst->src[i].reg != 0) {
- use[inst->src[i].reg] = MAX2(use[inst->src[i].reg], eip);
+ int reg = inst->src[i].reg;
+
+ if (!loop_depth || (this->virtual_grf_sizes[reg] == 1 &&
+ def[reg] >= bb_header_ip)) {
+ use[reg] = ip;
+ } else {
+ def[reg] = MIN2(loop_start, def[reg]);
+ use[reg] = loop_start;
+
+ /* Nobody else is going to go smash our start to
+ * later in the loop now, because def[reg] now
+ * points before the bb header.
+ */
+ }
}
}
if (inst->dst.file == GRF && inst->dst.reg != 0) {
- def[inst->dst.reg] = MIN2(def[inst->dst.reg], eip);
+ int reg = inst->dst.reg;
+
+ if (!loop_depth || (this->virtual_grf_sizes[reg] == 1 &&
+ !inst->predicated)) {
+ def[reg] = MIN2(def[reg], ip);
+ } else {
+ def[reg] = MIN2(def[reg], loop_start);
+ }
}
}
ip++;
+
+ /* Set the basic block header IP. This is used for determining
+ * if a complete def of single-register virtual GRF in a loop
+ * dominates a use in the same basic block. It's a quick way to
+ * reduce the live interval range of most register used in a
+ * loop.
+ */
+ if (inst->opcode == BRW_OPCODE_IF ||
+ inst->opcode == BRW_OPCODE_ELSE ||
+ inst->opcode == BRW_OPCODE_ENDIF ||
+ inst->opcode == BRW_OPCODE_DO ||
+ inst->opcode == BRW_OPCODE_WHILE ||
+ inst->opcode == BRW_OPCODE_BREAK ||
+ inst->opcode == BRW_OPCODE_CONTINUE) {
+ bb_header_ip = ip;
+ }
}
talloc_free(this->virtual_grf_def);
@@ -2695,10 +2805,7 @@ fs_visitor::dead_code_eliminate()
bool dead[num_vars];
for (int i = 0; i < num_vars; i++) {
- /* This would be ">=", but FS_OPCODE_DISCARD has a src == dst where
- * it writes dst then reads it as src.
- */
- dead[i] = this->virtual_grf_def[i] > this->virtual_grf_use[i];
+ dead[i] = this->virtual_grf_def[i] >= this->virtual_grf_use[i];
if (dead[i]) {
/* Mark off its interval so it won't interfere with anything. */
@@ -2771,6 +2878,10 @@ fs_visitor::register_coalesce()
continue;
}
+ /* Update live interval so we don't have to recalculate. */
+ this->virtual_grf_use[inst->src[0].reg] = MAX2(virtual_grf_use[inst->src[0].reg],
+ virtual_grf_use[inst->dst.reg]);
+
/* Rewrite the later usage to point at the source of the move to
* be removed.
*/
@@ -2786,6 +2897,7 @@ fs_visitor::register_coalesce()
scan_inst->src[i].reg_offset = inst->src[0].reg_offset;
scan_inst->src[i].abs |= inst->src[0].abs;
scan_inst->src[i].negate ^= inst->src[0].negate;
+ scan_inst->src[i].smear = inst->src[0].smear;
}
}
}
@@ -2797,6 +2909,144 @@ fs_visitor::register_coalesce()
return progress;
}
+
+bool
+fs_visitor::compute_to_mrf()
+{
+ bool progress = false;
+ int next_ip = 0;
+
+ foreach_iter(exec_list_iterator, iter, this->instructions) {
+ fs_inst *inst = (fs_inst *)iter.get();
+
+ int ip = next_ip;
+ next_ip++;
+
+ if (inst->opcode != BRW_OPCODE_MOV ||
+ inst->predicated ||
+ inst->dst.file != MRF || inst->src[0].file != GRF ||
+ inst->dst.type != inst->src[0].type ||
+ inst->src[0].abs || inst->src[0].negate || inst->src[0].smear != -1)
+ continue;
+
+ /* Can't compute-to-MRF this GRF if someone else was going to
+ * read it later.
+ */
+ if (this->virtual_grf_use[inst->src[0].reg] > ip)
+ continue;
+
+ /* Found a move of a GRF to a MRF. Let's see if we can go
+ * rewrite the thing that made this GRF to write into the MRF.
+ */
+ bool found = false;
+ fs_inst *scan_inst;
+ for (scan_inst = (fs_inst *)inst->prev;
+ scan_inst->prev != NULL;
+ scan_inst = (fs_inst *)scan_inst->prev) {
+ /* We don't handle flow control here. Most computation of
+ * values that end up in MRFs are shortly before the MRF
+ * write anyway.
+ */
+ if (scan_inst->opcode == BRW_OPCODE_DO ||
+ scan_inst->opcode == BRW_OPCODE_WHILE ||
+ scan_inst->opcode == BRW_OPCODE_ENDIF) {
+ break;
+ }
+
+ /* You can't read from an MRF, so if someone else reads our
+ * MRF's source GRF that we wanted to rewrite, that stops us.
+ */
+ bool interfered = false;
+ for (int i = 0; i < 3; i++) {
+ if (scan_inst->src[i].file == GRF &&
+ scan_inst->src[i].reg == inst->src[0].reg &&
+ scan_inst->src[i].reg_offset == inst->src[0].reg_offset) {
+ interfered = true;
+ }
+ }
+ if (interfered)
+ break;
+
+ if (scan_inst->dst.file == MRF &&
+ scan_inst->dst.hw_reg == inst->dst.hw_reg) {
+ /* Somebody else wrote our MRF here, so we can't can't
+ * compute-to-MRF before that.
+ */
+ break;
+ }
+
+ if (scan_inst->mlen > 0) {
+ /* Found a SEND instruction, which will do some amount of
+ * implied write that may overwrite our MRF that we were
+ * hoping to compute-to-MRF somewhere above it. Nothing
+ * we have implied-writes more than 2 MRFs from base_mrf,
+ * though.
+ */
+ int implied_write_len = MIN2(scan_inst->mlen, 2);
+ if (inst->dst.hw_reg >= scan_inst->base_mrf &&
+ inst->dst.hw_reg < scan_inst->base_mrf + implied_write_len) {
+ break;
+ }
+ }
+
+ if (scan_inst->dst.file == GRF &&
+ scan_inst->dst.reg == inst->src[0].reg) {
+ /* Found the last thing to write our reg we want to turn
+ * into a compute-to-MRF.
+ */
+
+ if (scan_inst->opcode == FS_OPCODE_TEX) {
+ /* texturing writes several continuous regs, so we can't
+ * compute-to-mrf that.
+ */
+ break;
+ }
+
+ /* If it's predicated, it (probably) didn't populate all
+ * the channels.
+ */
+ if (scan_inst->predicated)
+ break;
+
+ /* SEND instructions can't have MRF as a destination. */
+ if (scan_inst->mlen)
+ break;
+
+ if (intel->gen >= 6) {
+ /* gen6 math instructions must have the destination be
+ * GRF, so no compute-to-MRF for them.
+ */
+ if (scan_inst->opcode == FS_OPCODE_RCP ||
+ scan_inst->opcode == FS_OPCODE_RSQ ||
+ scan_inst->opcode == FS_OPCODE_SQRT ||
+ scan_inst->opcode == FS_OPCODE_EXP2 ||
+ scan_inst->opcode == FS_OPCODE_LOG2 ||
+ scan_inst->opcode == FS_OPCODE_SIN ||
+ scan_inst->opcode == FS_OPCODE_COS ||
+ scan_inst->opcode == FS_OPCODE_POW) {
+ break;
+ }
+ }
+
+ if (scan_inst->dst.reg_offset == inst->src[0].reg_offset) {
+ /* Found the creator of our MRF's source value. */
+ found = true;
+ break;
+ }
+ }
+ }
+ if (found) {
+ scan_inst->dst.file = MRF;
+ scan_inst->dst.hw_reg = inst->dst.hw_reg;
+ scan_inst->saturate |= inst->saturate;
+ inst->remove();
+ progress = true;
+ }
+ }
+
+ return progress;
+}
+
bool
fs_visitor::virtual_grf_interferes(int a, int b)
{
@@ -2813,7 +3063,7 @@ fs_visitor::virtual_grf_interferes(int a, int b)
this->virtual_grf_def[b] < this->virtual_grf_use[a]);
}
- return start <= end;
+ return start < end;
}
static struct brw_reg brw_reg_from_fs_reg(fs_reg *reg)
@@ -2824,8 +3074,13 @@ static struct brw_reg brw_reg_from_fs_reg(fs_reg *reg)
case GRF:
case ARF:
case MRF:
- brw_reg = brw_vec8_reg(reg->file,
- reg->hw_reg, 0);
+ if (reg->smear == -1) {
+ brw_reg = brw_vec8_reg(reg->file,
+ reg->hw_reg, 0);
+ } else {
+ brw_reg = brw_vec1_reg(reg->file,
+ reg->hw_reg, reg->smear);
+ }
brw_reg = retype(brw_reg, reg->type);
break;
case IMM:
@@ -2867,11 +3122,17 @@ static struct brw_reg brw_reg_from_fs_reg(fs_reg *reg)
void
fs_visitor::generate_code()
{
- unsigned int annotation_len = 0;
int last_native_inst = 0;
struct brw_instruction *if_stack[16], *loop_stack[16];
int if_stack_depth = 0, loop_stack_depth = 0;
int if_depth_in_loop[16];
+ const char *last_annotation_string = NULL;
+ ir_instruction *last_annotation_ir = NULL;
+
+ if (INTEL_DEBUG & DEBUG_WM) {
+ printf("Native code for fragment shader %d:\n",
+ ctx->Shader.CurrentFragmentProgram->Name);
+ }
if_depth_in_loop[loop_stack_depth] = 0;
@@ -2880,6 +3141,22 @@ fs_visitor::generate_code()
fs_inst *inst = (fs_inst *)iter.get();
struct brw_reg src[3], dst;
+ if (INTEL_DEBUG & DEBUG_WM) {
+ if (last_annotation_ir != inst->ir) {
+ last_annotation_ir = inst->ir;
+ if (last_annotation_ir) {
+ printf(" ");
+ last_annotation_ir->print();
+ printf("\n");
+ }
+ }
+ if (last_annotation_string != inst->annotation) {
+ last_annotation_string = inst->annotation;
+ if (last_annotation_string)
+ printf(" %s\n", last_annotation_string);
+ }
+ }
+
for (unsigned int i = 0; i < 3; i++) {
src[i] = brw_reg_from_fs_reg(&inst->src[i]);
}
@@ -2905,6 +3182,9 @@ fs_visitor::generate_code()
case BRW_OPCODE_RNDD:
brw_RNDD(p, dst, src[0]);
break;
+ case BRW_OPCODE_RNDE:
+ brw_RNDE(p, dst, src[0]);
+ break;
case BRW_OPCODE_RNDZ:
brw_RNDZ(p, dst, src[0]);
break;
@@ -2940,10 +3220,16 @@ fs_visitor::generate_code()
case BRW_OPCODE_IF:
assert(if_stack_depth < 16);
- if_stack[if_stack_depth] = brw_IF(p, BRW_EXECUTE_8);
+ if (inst->src[0].file != BAD_FILE) {
+ assert(intel->gen >= 6);
+ if_stack[if_stack_depth] = brw_IF_gen6(p, inst->conditional_mod, src[0], src[1]);
+ } else {
+ if_stack[if_stack_depth] = brw_IF(p, BRW_EXECUTE_8);
+ }
if_depth_in_loop[loop_stack_depth]++;
if_stack_depth++;
break;
+
case BRW_OPCODE_ELSE:
if_stack[if_stack_depth - 1] =
brw_ELSE(p, if_stack[if_stack_depth - 1]);
@@ -3009,10 +3295,13 @@ fs_visitor::generate_code()
case FS_OPCODE_TEX:
case FS_OPCODE_TXB:
case FS_OPCODE_TXL:
- generate_tex(inst, dst, src[0]);
+ generate_tex(inst, dst);
break;
- case FS_OPCODE_DISCARD:
- generate_discard(inst, dst /* src0 == dst */);
+ case FS_OPCODE_DISCARD_NOT:
+ generate_discard_not(inst, dst);
+ break;
+ case FS_OPCODE_DISCARD_AND:
+ generate_discard_and(inst, src[0]);
break;
case FS_OPCODE_DDX:
generate_ddx(inst, dst, src[0]);
@@ -3020,6 +3309,19 @@ fs_visitor::generate_code()
case FS_OPCODE_DDY:
generate_ddy(inst, dst, src[0]);
break;
+
+ case FS_OPCODE_SPILL:
+ generate_spill(inst, src[0]);
+ break;
+
+ case FS_OPCODE_UNSPILL:
+ generate_unspill(inst, dst);
+ break;
+
+ case FS_OPCODE_PULL_CONSTANT_LOAD:
+ generate_pull_constant_load(inst, dst);
+ break;
+
case FS_OPCODE_FB_WRITE:
generate_fb_write(inst);
break;
@@ -3033,25 +3335,20 @@ fs_visitor::generate_code()
this->fail = true;
}
- if (annotation_len < p->nr_insn) {
- annotation_len *= 2;
- if (annotation_len < 16)
- annotation_len = 16;
-
- this->annotation_string = talloc_realloc(this->mem_ctx,
- annotation_string,
- const char *,
- annotation_len);
- this->annotation_ir = talloc_realloc(this->mem_ctx,
- annotation_ir,
- ir_instruction *,
- annotation_len);
+ if (INTEL_DEBUG & DEBUG_WM) {
+ for (unsigned int i = last_native_inst; i < p->nr_insn; i++) {
+ if (0) {
+ printf("0x%08x 0x%08x 0x%08x 0x%08x ",
+ ((uint32_t *)&p->store[i])[3],
+ ((uint32_t *)&p->store[i])[2],
+ ((uint32_t *)&p->store[i])[1],
+ ((uint32_t *)&p->store[i])[0]);
+ }
+ brw_disasm(stdout, &p->store[i], intel->gen);
+ printf("\n");
+ }
}
- for (unsigned int i = last_native_inst; i < p->nr_insn; i++) {
- this->annotation_string[i] = inst->annotation;
- this->annotation_ir[i] = inst->ir;
- }
last_native_inst = p->nr_insn;
}
}
@@ -3059,24 +3356,15 @@ fs_visitor::generate_code()
GLboolean
brw_wm_fs_emit(struct brw_context *brw, struct brw_wm_compile *c)
{
- struct brw_compile *p = &c->func;
struct intel_context *intel = &brw->intel;
- GLcontext *ctx = &intel->ctx;
- struct brw_shader *shader = NULL;
- struct gl_shader_program *prog = ctx->Shader.CurrentProgram;
+ struct gl_context *ctx = &intel->ctx;
+ struct gl_shader_program *prog = ctx->Shader.CurrentFragmentProgram;
if (!prog)
return GL_FALSE;
- if (!using_new_fs)
- return GL_FALSE;
-
- for (unsigned int i = 0; i < prog->_NumLinkedShaders; i++) {
- if (prog->_LinkedShaders[i]->Type == GL_FRAGMENT_SHADER) {
- shader = (struct brw_shader *)prog->_LinkedShaders[i];
- break;
- }
- }
+ struct brw_shader *shader =
+ (brw_shader *) prog->_LinkedShaders[MESA_SHADER_FRAGMENT];
if (!shader)
return GL_FALSE;
@@ -3117,23 +3405,42 @@ brw_wm_fs_emit(struct brw_context *brw, struct brw_wm_compile *c)
}
v.emit_fb_writes();
+
+ v.split_virtual_grfs();
+ v.setup_pull_constants();
+
v.assign_curb_setup();
v.assign_urb_setup();
bool progress;
do {
progress = false;
-
v.calculate_live_intervals();
progress = v.propagate_constants() || progress;
progress = v.register_coalesce() || progress;
+ progress = v.compute_to_mrf() || progress;
progress = v.dead_code_eliminate() || progress;
} while (progress);
+ if (0) {
+ /* Debug of register spilling: Go spill everything. */
+ int virtual_grf_count = v.virtual_grf_next;
+ for (int i = 1; i < virtual_grf_count; i++) {
+ v.spill_reg(i);
+ }
+ v.calculate_live_intervals();
+ }
+
if (0)
v.assign_regs_trivial();
- else
- v.assign_regs();
+ else {
+ while (!v.assign_regs()) {
+ if (v.fail)
+ break;
+
+ v.calculate_live_intervals();
+ }
+ }
}
if (!v.fail)
@@ -3144,32 +3451,7 @@ brw_wm_fs_emit(struct brw_context *brw, struct brw_wm_compile *c)
if (v.fail)
return GL_FALSE;
- if (INTEL_DEBUG & DEBUG_WM) {
- const char *last_annotation_string = NULL;
- ir_instruction *last_annotation_ir = NULL;
-
- printf("Native code for fragment shader %d:\n", prog->Name);
- for (unsigned int i = 0; i < p->nr_insn; i++) {
- if (last_annotation_ir != v.annotation_ir[i]) {
- last_annotation_ir = v.annotation_ir[i];
- if (last_annotation_ir) {
- printf(" ");
- last_annotation_ir->print();
- printf("\n");
- }
- }
- if (last_annotation_string != v.annotation_string[i]) {
- last_annotation_string = v.annotation_string[i];
- if (last_annotation_string)
- printf(" %s\n", last_annotation_string);
- }
- brw_disasm(stdout, &p->store[i], intel->gen);
- }
- printf("\n");
- }
-
c->prog_data.total_grf = v.grf_used;
- c->prog_data.total_scratch = 0;
return GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
new file mode 100644
index 00000000000..9b7fcde8580
--- /dev/null
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -0,0 +1,462 @@
+/*
+ * Copyright © 2010 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ * Authors:
+ * Eric Anholt <[email protected]>
+ *
+ */
+
+extern "C" {
+
+#include <sys/types.h>
+
+#include "main/macros.h"
+#include "main/shaderobj.h"
+#include "main/uniforms.h"
+#include "program/prog_parameter.h"
+#include "program/prog_print.h"
+#include "program/prog_optimize.h"
+#include "program/register_allocate.h"
+#include "program/sampler.h"
+#include "program/hash_table.h"
+#include "brw_context.h"
+#include "brw_eu.h"
+#include "brw_wm.h"
+#include "talloc.h"
+}
+#include "../glsl/glsl_types.h"
+#include "../glsl/ir.h"
+
+enum register_file {
+ ARF = BRW_ARCHITECTURE_REGISTER_FILE,
+ GRF = BRW_GENERAL_REGISTER_FILE,
+ MRF = BRW_MESSAGE_REGISTER_FILE,
+ IMM = BRW_IMMEDIATE_VALUE,
+ FIXED_HW_REG, /* a struct brw_reg */
+ UNIFORM, /* prog_data->params[hw_reg] */
+ BAD_FILE
+};
+
+enum fs_opcodes {
+ FS_OPCODE_FB_WRITE = 256,
+ FS_OPCODE_RCP,
+ FS_OPCODE_RSQ,
+ FS_OPCODE_SQRT,
+ FS_OPCODE_EXP2,
+ FS_OPCODE_LOG2,
+ FS_OPCODE_POW,
+ FS_OPCODE_SIN,
+ FS_OPCODE_COS,
+ FS_OPCODE_DDX,
+ FS_OPCODE_DDY,
+ FS_OPCODE_LINTERP,
+ FS_OPCODE_TEX,
+ FS_OPCODE_TXB,
+ FS_OPCODE_TXL,
+ FS_OPCODE_DISCARD_NOT,
+ FS_OPCODE_DISCARD_AND,
+ FS_OPCODE_SPILL,
+ FS_OPCODE_UNSPILL,
+ FS_OPCODE_PULL_CONSTANT_LOAD,
+};
+
+
+class fs_reg {
+public:
+ /* Callers of this talloc-based new need not call delete. It's
+ * easier to just talloc_free 'ctx' (or any of its ancestors). */
+ static void* operator new(size_t size, void *ctx)
+ {
+ void *node;
+
+ node = talloc_size(ctx, size);
+ assert(node != NULL);
+
+ return node;
+ }
+
+ void init()
+ {
+ this->reg = 0;
+ this->reg_offset = 0;
+ this->negate = 0;
+ this->abs = 0;
+ this->hw_reg = -1;
+ this->smear = -1;
+ }
+
+ /** Generic unset register constructor. */
+ fs_reg()
+ {
+ init();
+ this->file = BAD_FILE;
+ }
+
+ /** Immediate value constructor. */
+ fs_reg(float f)
+ {
+ init();
+ this->file = IMM;
+ this->type = BRW_REGISTER_TYPE_F;
+ this->imm.f = f;
+ }
+
+ /** Immediate value constructor. */
+ fs_reg(int32_t i)
+ {
+ init();
+ this->file = IMM;
+ this->type = BRW_REGISTER_TYPE_D;
+ this->imm.i = i;
+ }
+
+ /** Immediate value constructor. */
+ fs_reg(uint32_t u)
+ {
+ init();
+ this->file = IMM;
+ this->type = BRW_REGISTER_TYPE_UD;
+ this->imm.u = u;
+ }
+
+ /** Fixed brw_reg Immediate value constructor. */
+ fs_reg(struct brw_reg fixed_hw_reg)
+ {
+ init();
+ this->file = FIXED_HW_REG;
+ this->fixed_hw_reg = fixed_hw_reg;
+ this->type = fixed_hw_reg.type;
+ }
+
+ fs_reg(enum register_file file, int hw_reg);
+ fs_reg(enum register_file file, int hw_reg, uint32_t type);
+ fs_reg(class fs_visitor *v, const struct glsl_type *type);
+
+ /** Register file: ARF, GRF, MRF, IMM. */
+ enum register_file file;
+ /** virtual register number. 0 = fixed hw reg */
+ int reg;
+ /** Offset within the virtual register. */
+ int reg_offset;
+ /** HW register number. Generally unset until register allocation. */
+ int hw_reg;
+ /** Register type. BRW_REGISTER_TYPE_* */
+ int type;
+ bool negate;
+ bool abs;
+ struct brw_reg fixed_hw_reg;
+ int smear; /* -1, or a channel of the reg to smear to all channels. */
+
+ /** Value for file == BRW_IMMMEDIATE_FILE */
+ union {
+ int32_t i;
+ uint32_t u;
+ float f;
+ } imm;
+};
+
+class fs_inst : public exec_node {
+public:
+ /* Callers of this talloc-based new need not call delete. It's
+ * easier to just talloc_free 'ctx' (or any of its ancestors). */
+ static void* operator new(size_t size, void *ctx)
+ {
+ void *node;
+
+ node = talloc_zero_size(ctx, size);
+ assert(node != NULL);
+
+ return node;
+ }
+
+ void init()
+ {
+ this->opcode = BRW_OPCODE_NOP;
+ this->saturate = false;
+ this->conditional_mod = BRW_CONDITIONAL_NONE;
+ this->predicated = false;
+ this->sampler = 0;
+ this->target = 0;
+ this->eot = false;
+ this->header_present = false;
+ this->shadow_compare = false;
+ this->mlen = 0;
+ this->base_mrf = 0;
+ this->offset = 0;
+ }
+
+ fs_inst()
+ {
+ init();
+ }
+
+ fs_inst(int opcode)
+ {
+ init();
+ this->opcode = opcode;
+ }
+
+ fs_inst(int opcode, fs_reg dst)
+ {
+ init();
+ this->opcode = opcode;
+ this->dst = dst;
+
+ if (dst.file == GRF)
+ assert(dst.reg_offset >= 0);
+ }
+
+ fs_inst(int opcode, fs_reg dst, fs_reg src0)
+ {
+ init();
+ this->opcode = opcode;
+ this->dst = dst;
+ this->src[0] = src0;
+
+ if (dst.file == GRF)
+ assert(dst.reg_offset >= 0);
+ if (src[0].file == GRF)
+ assert(src[0].reg_offset >= 0);
+ }
+
+ fs_inst(int opcode, fs_reg dst, fs_reg src0, fs_reg src1)
+ {
+ init();
+ this->opcode = opcode;
+ this->dst = dst;
+ this->src[0] = src0;
+ this->src[1] = src1;
+
+ if (dst.file == GRF)
+ assert(dst.reg_offset >= 0);
+ if (src[0].file == GRF)
+ assert(src[0].reg_offset >= 0);
+ if (src[1].file == GRF)
+ assert(src[1].reg_offset >= 0);
+ }
+
+ fs_inst(int opcode, fs_reg dst, fs_reg src0, fs_reg src1, fs_reg src2)
+ {
+ init();
+ this->opcode = opcode;
+ this->dst = dst;
+ this->src[0] = src0;
+ this->src[1] = src1;
+ this->src[2] = src2;
+
+ if (dst.file == GRF)
+ assert(dst.reg_offset >= 0);
+ if (src[0].file == GRF)
+ assert(src[0].reg_offset >= 0);
+ if (src[1].file == GRF)
+ assert(src[1].reg_offset >= 0);
+ if (src[2].file == GRF)
+ assert(src[2].reg_offset >= 0);
+ }
+
+ int opcode; /* BRW_OPCODE_* or FS_OPCODE_* */
+ fs_reg dst;
+ fs_reg src[3];
+ bool saturate;
+ bool predicated;
+ int conditional_mod; /**< BRW_CONDITIONAL_* */
+
+ int mlen; /**< SEND message length */
+ int base_mrf; /**< First MRF in the SEND message, if mlen is nonzero. */
+ int sampler;
+ int target; /**< MRT target. */
+ bool eot;
+ bool header_present;
+ bool shadow_compare;
+ uint32_t offset; /* spill/unspill offset */
+
+ /** @{
+ * Annotation for the generated IR. One of the two can be set.
+ */
+ ir_instruction *ir;
+ const char *annotation;
+ /** @} */
+};
+
+class fs_visitor : public ir_visitor
+{
+public:
+
+ fs_visitor(struct brw_wm_compile *c, struct brw_shader *shader)
+ {
+ this->c = c;
+ this->p = &c->func;
+ this->brw = p->brw;
+ this->fp = brw->fragment_program;
+ this->intel = &brw->intel;
+ this->ctx = &intel->ctx;
+ this->mem_ctx = talloc_new(NULL);
+ this->shader = shader;
+ this->fail = false;
+ this->variable_ht = hash_table_ctor(0,
+ hash_table_pointer_hash,
+ hash_table_pointer_compare);
+
+ this->frag_color = NULL;
+ this->frag_data = NULL;
+ this->frag_depth = NULL;
+ this->first_non_payload_grf = 0;
+
+ this->current_annotation = NULL;
+ this->base_ir = NULL;
+
+ this->virtual_grf_sizes = NULL;
+ this->virtual_grf_next = 1;
+ this->virtual_grf_array_size = 0;
+ this->virtual_grf_def = NULL;
+ this->virtual_grf_use = NULL;
+
+ this->kill_emitted = false;
+ }
+
+ ~fs_visitor()
+ {
+ talloc_free(this->mem_ctx);
+ hash_table_dtor(this->variable_ht);
+ }
+
+ fs_reg *variable_storage(ir_variable *var);
+ int virtual_grf_alloc(int size);
+
+ void visit(ir_variable *ir);
+ void visit(ir_assignment *ir);
+ void visit(ir_dereference_variable *ir);
+ void visit(ir_dereference_record *ir);
+ void visit(ir_dereference_array *ir);
+ void visit(ir_expression *ir);
+ void visit(ir_texture *ir);
+ void visit(ir_if *ir);
+ void visit(ir_constant *ir);
+ void visit(ir_swizzle *ir);
+ void visit(ir_return *ir);
+ void visit(ir_loop *ir);
+ void visit(ir_loop_jump *ir);
+ void visit(ir_discard *ir);
+ void visit(ir_call *ir);
+ void visit(ir_function *ir);
+ void visit(ir_function_signature *ir);
+
+ fs_inst *emit(fs_inst inst);
+ void assign_curb_setup();
+ void calculate_urb_setup();
+ void assign_urb_setup();
+ bool assign_regs();
+ void assign_regs_trivial();
+ int choose_spill_reg(struct ra_graph *g);
+ void spill_reg(int spill_reg);
+ void split_virtual_grfs();
+ void setup_pull_constants();
+ void calculate_live_intervals();
+ bool propagate_constants();
+ bool register_coalesce();
+ bool compute_to_mrf();
+ bool dead_code_eliminate();
+ bool virtual_grf_interferes(int a, int b);
+ void generate_code();
+ void generate_fb_write(fs_inst *inst);
+ void generate_linterp(fs_inst *inst, struct brw_reg dst,
+ struct brw_reg *src);
+ void generate_tex(fs_inst *inst, struct brw_reg dst);
+ void generate_math(fs_inst *inst, struct brw_reg dst, struct brw_reg *src);
+ void generate_discard_not(fs_inst *inst, struct brw_reg temp);
+ void generate_discard_and(fs_inst *inst, struct brw_reg temp);
+ void generate_ddx(fs_inst *inst, struct brw_reg dst, struct brw_reg src);
+ void generate_ddy(fs_inst *inst, struct brw_reg dst, struct brw_reg src);
+ void generate_spill(fs_inst *inst, struct brw_reg src);
+ void generate_unspill(fs_inst *inst, struct brw_reg dst);
+ void generate_pull_constant_load(fs_inst *inst, struct brw_reg dst);
+
+ void emit_dummy_fs();
+ fs_reg *emit_fragcoord_interpolation(ir_variable *ir);
+ fs_reg *emit_frontfacing_interpolation(ir_variable *ir);
+ fs_reg *emit_general_interpolation(ir_variable *ir);
+ void emit_interpolation_setup_gen4();
+ void emit_interpolation_setup_gen6();
+ fs_inst *emit_texture_gen4(ir_texture *ir, fs_reg dst, fs_reg coordinate);
+ fs_inst *emit_texture_gen5(ir_texture *ir, fs_reg dst, fs_reg coordinate);
+ fs_inst *emit_math(fs_opcodes op, fs_reg dst, fs_reg src0);
+ fs_inst *emit_math(fs_opcodes op, fs_reg dst, fs_reg src0, fs_reg src1);
+ void emit_bool_to_cond_code(ir_rvalue *condition);
+ void emit_if_gen6(ir_if *ir);
+ void emit_unspill(fs_inst *inst, fs_reg reg, uint32_t spill_offset);
+
+ void emit_fb_writes();
+ void emit_assignment_writes(fs_reg &l, fs_reg &r,
+ const glsl_type *type, bool predicated);
+
+ struct brw_reg interp_reg(int location, int channel);
+ int setup_uniform_values(int loc, const glsl_type *type);
+ void setup_builtin_uniform_values(ir_variable *ir);
+
+ struct brw_context *brw;
+ const struct gl_fragment_program *fp;
+ struct intel_context *intel;
+ struct gl_context *ctx;
+ struct brw_wm_compile *c;
+ struct brw_compile *p;
+ struct brw_shader *shader;
+ void *mem_ctx;
+ exec_list instructions;
+
+ int *virtual_grf_sizes;
+ int virtual_grf_next;
+ int virtual_grf_array_size;
+ int *virtual_grf_def;
+ int *virtual_grf_use;
+
+ struct hash_table *variable_ht;
+ ir_variable *frag_color, *frag_data, *frag_depth;
+ int first_non_payload_grf;
+ int urb_setup[FRAG_ATTRIB_MAX];
+ bool kill_emitted;
+
+ /** @{ debug annotation info */
+ const char *current_annotation;
+ ir_instruction *base_ir;
+ /** @} */
+
+ bool fail;
+
+ /* Result of last visit() method. */
+ fs_reg result;
+
+ fs_reg pixel_x;
+ fs_reg pixel_y;
+ fs_reg wpos_w;
+ fs_reg pixel_w;
+ fs_reg delta_x;
+ fs_reg delta_y;
+
+ int grf_used;
+};
+
+static const fs_reg reg_undef;
+static const fs_reg reg_null_f(ARF, BRW_ARF_NULL, BRW_REGISTER_TYPE_F);
+static const fs_reg reg_null_d(ARF, BRW_ARF_NULL, BRW_REGISTER_TYPE_D);
+
+GLboolean brw_do_channel_expressions(struct exec_list *instructions);
+GLboolean brw_do_vector_splitting(struct exec_list *instructions);
diff --git a/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp b/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
index 9fbf7b7c6b8..2a6da4058b8 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
@@ -83,7 +83,6 @@ channel_expressions_predicate(ir_instruction *ir)
return false;
}
-extern "C" {
GLboolean
brw_do_channel_expressions(exec_list *instructions)
{
@@ -99,7 +98,6 @@ brw_do_channel_expressions(exec_list *instructions)
return v.progress;
}
-}
ir_rvalue *
ir_channel_expressions_visitor::get_element(ir_variable *var, unsigned int elem)
@@ -204,6 +202,7 @@ ir_channel_expressions_visitor::visit_leave(ir_assignment *ir)
case ir_unop_ceil:
case ir_unop_floor:
case ir_unop_fract:
+ case ir_unop_round_even:
case ir_unop_sin:
case ir_unop_cos:
case ir_unop_dFdx:
diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
new file mode 100644
index 00000000000..bbb210cd449
--- /dev/null
+++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
@@ -0,0 +1,419 @@
+/*
+ * Copyright © 2010 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ * Authors:
+ * Eric Anholt <[email protected]>
+ *
+ */
+
+extern "C" {
+
+#include <sys/types.h>
+
+#include "main/macros.h"
+#include "main/shaderobj.h"
+#include "main/uniforms.h"
+#include "program/prog_parameter.h"
+#include "program/prog_print.h"
+#include "program/prog_optimize.h"
+#include "program/register_allocate.h"
+#include "program/sampler.h"
+#include "program/hash_table.h"
+#include "brw_context.h"
+#include "brw_eu.h"
+#include "brw_wm.h"
+#include "talloc.h"
+}
+#include "brw_fs.h"
+#include "../glsl/glsl_types.h"
+#include "../glsl/ir_optimization.h"
+#include "../glsl/ir_print_visitor.h"
+
+static void
+assign_reg(int *reg_hw_locations, fs_reg *reg)
+{
+ if (reg->file == GRF && reg->reg != 0) {
+ assert(reg->reg_offset >= 0);
+ reg->hw_reg = reg_hw_locations[reg->reg] + reg->reg_offset;
+ reg->reg = 0;
+ }
+}
+
+void
+fs_visitor::assign_regs_trivial()
+{
+ int last_grf = 0;
+ int hw_reg_mapping[this->virtual_grf_next];
+ int i;
+
+ hw_reg_mapping[0] = 0;
+ hw_reg_mapping[1] = this->first_non_payload_grf;
+ for (i = 2; i < this->virtual_grf_next; i++) {
+ hw_reg_mapping[i] = (hw_reg_mapping[i - 1] +
+ this->virtual_grf_sizes[i - 1]);
+ }
+ last_grf = hw_reg_mapping[i - 1] + this->virtual_grf_sizes[i - 1];
+
+ foreach_iter(exec_list_iterator, iter, this->instructions) {
+ fs_inst *inst = (fs_inst *)iter.get();
+
+ assign_reg(hw_reg_mapping, &inst->dst);
+ assign_reg(hw_reg_mapping, &inst->src[0]);
+ assign_reg(hw_reg_mapping, &inst->src[1]);
+ }
+
+ this->grf_used = last_grf + 1;
+}
+
+bool
+fs_visitor::assign_regs()
+{
+ int last_grf = 0;
+ int hw_reg_mapping[this->virtual_grf_next + 1];
+ int base_reg_count = BRW_MAX_GRF - this->first_non_payload_grf;
+ int class_sizes[base_reg_count];
+ int class_count = 0;
+ int aligned_pair_class = -1;
+
+ /* Set up the register classes.
+ *
+ * The base registers store a scalar value. For texture samples,
+ * we get virtual GRFs composed of 4 contiguous hw register. For
+ * structures and arrays, we store them as contiguous larger things
+ * than that, though we should be able to do better most of the
+ * time.
+ */
+ class_sizes[class_count++] = 1;
+ if (brw->has_pln && intel->gen < 6) {
+ /* Always set up the (unaligned) pairs for gen5, so we can find
+ * them for making the aligned pair class.
+ */
+ class_sizes[class_count++] = 2;
+ }
+ for (int r = 1; r < this->virtual_grf_next; r++) {
+ int i;
+
+ for (i = 0; i < class_count; i++) {
+ if (class_sizes[i] == this->virtual_grf_sizes[r])
+ break;
+ }
+ if (i == class_count) {
+ if (this->virtual_grf_sizes[r] >= base_reg_count) {
+ fprintf(stderr, "Object too large to register allocate.\n");
+ this->fail = true;
+ }
+
+ class_sizes[class_count++] = this->virtual_grf_sizes[r];
+ }
+ }
+
+ int ra_reg_count = 0;
+ int class_base_reg[class_count];
+ int class_reg_count[class_count];
+ int classes[class_count + 1];
+
+ for (int i = 0; i < class_count; i++) {
+ class_base_reg[i] = ra_reg_count;
+ class_reg_count[i] = base_reg_count - (class_sizes[i] - 1);
+ ra_reg_count += class_reg_count[i];
+ }
+
+ struct ra_regs *regs = ra_alloc_reg_set(ra_reg_count);
+ for (int i = 0; i < class_count; i++) {
+ classes[i] = ra_alloc_reg_class(regs);
+
+ for (int i_r = 0; i_r < class_reg_count[i]; i_r++) {
+ ra_class_add_reg(regs, classes[i], class_base_reg[i] + i_r);
+ }
+
+ /* Add conflicts between our contiguous registers aliasing
+ * base regs and other register classes' contiguous registers
+ * that alias base regs, or the base regs themselves for classes[0].
+ */
+ for (int c = 0; c <= i; c++) {
+ for (int i_r = 0; i_r < class_reg_count[i]; i_r++) {
+ for (int c_r = MAX2(0, i_r - (class_sizes[c] - 1));
+ c_r < MIN2(class_reg_count[c], i_r + class_sizes[i]);
+ c_r++) {
+
+ if (0) {
+ printf("%d/%d conflicts %d/%d\n",
+ class_sizes[i], this->first_non_payload_grf + i_r,
+ class_sizes[c], this->first_non_payload_grf + c_r);
+ }
+
+ ra_add_reg_conflict(regs,
+ class_base_reg[i] + i_r,
+ class_base_reg[c] + c_r);
+ }
+ }
+ }
+ }
+
+ /* Add a special class for aligned pairs, which we'll put delta_x/y
+ * in on gen5 so that we can do PLN.
+ */
+ if (brw->has_pln && intel->gen < 6) {
+ int reg_count = (base_reg_count - 1) / 2;
+ int unaligned_pair_class = 1;
+ assert(class_sizes[unaligned_pair_class] == 2);
+
+ aligned_pair_class = class_count;
+ classes[aligned_pair_class] = ra_alloc_reg_class(regs);
+ class_sizes[aligned_pair_class] = 2;
+ class_base_reg[aligned_pair_class] = 0;
+ class_reg_count[aligned_pair_class] = 0;
+ int start = (this->first_non_payload_grf & 1) ? 1 : 0;
+
+ for (int i = 0; i < reg_count; i++) {
+ ra_class_add_reg(regs, classes[aligned_pair_class],
+ class_base_reg[unaligned_pair_class] + i * 2 + start);
+ }
+ class_count++;
+ }
+
+ ra_set_finalize(regs);
+
+ struct ra_graph *g = ra_alloc_interference_graph(regs,
+ this->virtual_grf_next);
+ /* Node 0 is just a placeholder to keep virtual_grf[] mapping 1:1
+ * with nodes.
+ */
+ ra_set_node_class(g, 0, classes[0]);
+
+ for (int i = 1; i < this->virtual_grf_next; i++) {
+ for (int c = 0; c < class_count; c++) {
+ if (class_sizes[c] == this->virtual_grf_sizes[i]) {
+ if (aligned_pair_class >= 0 &&
+ this->delta_x.reg == i) {
+ ra_set_node_class(g, i, classes[aligned_pair_class]);
+ } else {
+ ra_set_node_class(g, i, classes[c]);
+ }
+ break;
+ }
+ }
+
+ for (int j = 1; j < i; j++) {
+ if (virtual_grf_interferes(i, j)) {
+ ra_add_node_interference(g, i, j);
+ }
+ }
+ }
+
+ if (!ra_allocate_no_spills(g)) {
+ /* Failed to allocate registers. Spill a reg, and the caller will
+ * loop back into here to try again.
+ */
+ int reg = choose_spill_reg(g);
+ if (reg == -1 || intel->gen >= 6) {
+ this->fail = true;
+ } else {
+ spill_reg(reg);
+ }
+
+
+ talloc_free(g);
+ talloc_free(regs);
+
+ return false;
+ }
+
+ /* Get the chosen virtual registers for each node, and map virtual
+ * regs in the register classes back down to real hardware reg
+ * numbers.
+ */
+ hw_reg_mapping[0] = 0; /* unused */
+ for (int i = 1; i < this->virtual_grf_next; i++) {
+ int reg = ra_get_node_reg(g, i);
+ int hw_reg = -1;
+
+ for (int c = 0; c < class_count; c++) {
+ if (reg >= class_base_reg[c] &&
+ reg < class_base_reg[c] + class_reg_count[c]) {
+ hw_reg = reg - class_base_reg[c];
+ break;
+ }
+ }
+
+ assert(hw_reg >= 0);
+ hw_reg_mapping[i] = this->first_non_payload_grf + hw_reg;
+ last_grf = MAX2(last_grf,
+ hw_reg_mapping[i] + this->virtual_grf_sizes[i] - 1);
+ }
+
+ foreach_iter(exec_list_iterator, iter, this->instructions) {
+ fs_inst *inst = (fs_inst *)iter.get();
+
+ assign_reg(hw_reg_mapping, &inst->dst);
+ assign_reg(hw_reg_mapping, &inst->src[0]);
+ assign_reg(hw_reg_mapping, &inst->src[1]);
+ }
+
+ this->grf_used = last_grf + 1;
+
+ talloc_free(g);
+ talloc_free(regs);
+
+ return true;
+}
+
+void
+fs_visitor::emit_unspill(fs_inst *inst, fs_reg dst, uint32_t spill_offset)
+{
+ int size = virtual_grf_sizes[dst.reg];
+ dst.reg_offset = 0;
+
+ for (int chan = 0; chan < size; chan++) {
+ fs_inst *unspill_inst = new(mem_ctx) fs_inst(FS_OPCODE_UNSPILL,
+ dst);
+ dst.reg_offset++;
+ unspill_inst->offset = spill_offset + chan * REG_SIZE;
+ unspill_inst->ir = inst->ir;
+ unspill_inst->annotation = inst->annotation;
+
+ /* Choose a MRF that won't conflict with an MRF that's live across the
+ * spill. Nothing else will make it up to MRF 14/15.
+ */
+ unspill_inst->base_mrf = 14;
+ unspill_inst->mlen = 1; /* header contains offset */
+ inst->insert_before(unspill_inst);
+ }
+}
+
+int
+fs_visitor::choose_spill_reg(struct ra_graph *g)
+{
+ float loop_scale = 1.0;
+ float spill_costs[this->virtual_grf_next];
+ bool no_spill[this->virtual_grf_next];
+
+ for (int i = 0; i < this->virtual_grf_next; i++) {
+ spill_costs[i] = 0.0;
+ no_spill[i] = false;
+ }
+
+ /* Calculate costs for spilling nodes. Call it a cost of 1 per
+ * spill/unspill we'll have to do, and guess that the insides of
+ * loops run 10 times.
+ */
+ foreach_iter(exec_list_iterator, iter, this->instructions) {
+ fs_inst *inst = (fs_inst *)iter.get();
+
+ for (unsigned int i = 0; i < 3; i++) {
+ if (inst->src[i].file == GRF) {
+ int size = virtual_grf_sizes[inst->src[i].reg];
+ spill_costs[inst->src[i].reg] += size * loop_scale;
+ }
+ }
+
+ if (inst->dst.file == GRF) {
+ int size = virtual_grf_sizes[inst->dst.reg];
+ spill_costs[inst->dst.reg] += size * loop_scale;
+ }
+
+ switch (inst->opcode) {
+
+ case BRW_OPCODE_DO:
+ loop_scale *= 10;
+ break;
+
+ case BRW_OPCODE_WHILE:
+ loop_scale /= 10;
+ break;
+
+ case FS_OPCODE_SPILL:
+ if (inst->src[0].file == GRF)
+ no_spill[inst->src[0].reg] = true;
+ break;
+
+ case FS_OPCODE_UNSPILL:
+ if (inst->dst.file == GRF)
+ no_spill[inst->dst.reg] = true;
+ break;
+ }
+ }
+
+ for (int i = 0; i < this->virtual_grf_next; i++) {
+ if (!no_spill[i])
+ ra_set_node_spill_cost(g, i, spill_costs[i]);
+ }
+
+ return ra_get_best_spill_node(g);
+}
+
+void
+fs_visitor::spill_reg(int spill_reg)
+{
+ int size = virtual_grf_sizes[spill_reg];
+ unsigned int spill_offset = c->last_scratch;
+ assert(ALIGN(spill_offset, 16) == spill_offset); /* oword read/write req. */
+ c->last_scratch += size * REG_SIZE;
+
+ /* Generate spill/unspill instructions for the objects being
+ * spilled. Right now, we spill or unspill the whole thing to a
+ * virtual grf of the same size. For most instructions, though, we
+ * could just spill/unspill the GRF being accessed.
+ */
+ foreach_iter(exec_list_iterator, iter, this->instructions) {
+ fs_inst *inst = (fs_inst *)iter.get();
+
+ for (unsigned int i = 0; i < 3; i++) {
+ if (inst->src[i].file == GRF &&
+ inst->src[i].reg == spill_reg) {
+ inst->src[i].reg = virtual_grf_alloc(size);
+ emit_unspill(inst, inst->src[i], spill_offset);
+ }
+ }
+
+ if (inst->dst.file == GRF &&
+ inst->dst.reg == spill_reg) {
+ inst->dst.reg = virtual_grf_alloc(size);
+
+ /* Since we spill/unspill the whole thing even if we access
+ * just a component, we may need to unspill before the
+ * instruction we're spilling for.
+ */
+ if (size != 1 || inst->predicated) {
+ emit_unspill(inst, inst->dst, spill_offset);
+ }
+
+ fs_reg spill_src = inst->dst;
+ spill_src.reg_offset = 0;
+ spill_src.abs = false;
+ spill_src.negate = false;
+ spill_src.smear = -1;
+
+ for (int chan = 0; chan < size; chan++) {
+ fs_inst *spill_inst = new(mem_ctx) fs_inst(FS_OPCODE_SPILL,
+ reg_null_f, spill_src);
+ spill_src.reg_offset++;
+ spill_inst->offset = spill_offset + chan * REG_SIZE;
+ spill_inst->ir = inst->ir;
+ spill_inst->annotation = inst->annotation;
+ spill_inst->base_mrf = 14;
+ spill_inst->mlen = 2; /* header, value */
+ inst->insert_after(spill_inst);
+ }
+ }
+ }
+}
diff --git a/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp b/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp
index 38195f6910d..2be6b08b5c7 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp
@@ -333,7 +333,6 @@ ir_vector_splitting_visitor::visit_leave(ir_assignment *ir)
return visit_continue;
}
-extern "C" {
bool
brw_do_vector_splitting(exec_list *instructions)
{
@@ -391,4 +390,3 @@ brw_do_vector_splitting(exec_list *instructions)
return true;
}
-}
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c
index 8952c9e3463..cfcc8ea4d6a 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_gs.c
@@ -96,8 +96,6 @@ static void compile_gs_prog( struct brw_context *brw,
brw_gs_quad_strip( &c, key );
break;
case GL_LINE_LOOP:
- /* XXX fix GS hang issue */
- assert(intel->gen < 6);
brw_gs_lines( &c );
break;
case GL_LINES:
@@ -167,7 +165,7 @@ static const GLenum gs_prim[GL_POLYGON+1] = {
static void populate_key( struct brw_context *brw,
struct brw_gs_prog_key *key )
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
memset(key, 0, sizeof(*key));
/* CACHE_NEW_VS_PROG */
diff --git a/src/mesa/drivers/dri/i965/brw_gs.h b/src/mesa/drivers/dri/i965/brw_gs.h
index 813b8d447ae..7e3531086f9 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.h
+++ b/src/mesa/drivers/dri/i965/brw_gs.h
@@ -56,6 +56,7 @@ struct brw_gs_compile {
struct {
struct brw_reg R0;
struct brw_reg vertex[MAX_GS_VERTS];
+ struct brw_reg temp;
} reg;
/* 3 different ways of expressing vertex size:
diff --git a/src/mesa/drivers/dri/i965/brw_gs_emit.c b/src/mesa/drivers/dri/i965/brw_gs_emit.c
index a01d5576f8c..e1f751fdaa4 100644
--- a/src/mesa/drivers/dri/i965/brw_gs_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_gs_emit.c
@@ -58,6 +58,8 @@ static void brw_gs_alloc_regs( struct brw_gs_compile *c,
i += c->nr_regs;
}
+ c->reg.temp = brw_vec8_grf(i, 0);
+
c->prog_data.urb_read_length = c->nr_regs;
c->prog_data.total_grf = i;
}
@@ -69,12 +71,22 @@ static void brw_gs_emit_vue(struct brw_gs_compile *c,
GLuint header)
{
struct brw_compile *p = &c->func;
+ struct intel_context *intel = &c->func.brw->intel;
GLboolean allocate = !last;
+ struct brw_reg temp;
+
+ if (intel->gen < 6)
+ temp = c->reg.R0;
+ else {
+ temp = c->reg.temp;
+ brw_MOV(p, retype(temp, BRW_REGISTER_TYPE_UD),
+ retype(c->reg.R0, BRW_REGISTER_TYPE_UD));
+ }
/* Overwrite PrimType and PrimStart in the message header, for
* each vertex in turn:
*/
- brw_MOV(p, get_element_ud(c->reg.R0, 2), brw_imm_ud(header));
+ brw_MOV(p, get_element_ud(temp, 2), brw_imm_ud(header));
/* Copy the vertex from vertn into m1..mN+1:
*/
@@ -87,9 +99,9 @@ static void brw_gs_emit_vue(struct brw_gs_compile *c,
* allocated each time.
*/
brw_urb_WRITE(p,
- allocate ? c->reg.R0 : retype(brw_null_reg(), BRW_REGISTER_TYPE_UD),
+ allocate ? temp : retype(brw_null_reg(), BRW_REGISTER_TYPE_UD),
0,
- c->reg.R0,
+ temp,
allocate,
1, /* used */
c->nr_regs + 1, /* msg length */
@@ -98,19 +110,39 @@ static void brw_gs_emit_vue(struct brw_gs_compile *c,
1, /* writes_complete */
0, /* urb offset */
BRW_URB_SWIZZLE_NONE);
+
+ if (intel->gen >= 6 && allocate)
+ brw_MOV(p, get_element_ud(c->reg.R0, 0), get_element_ud(temp, 0));
}
static void brw_gs_ff_sync(struct brw_gs_compile *c, int num_prim)
{
struct brw_compile *p = &c->func;
- brw_MOV(p, get_element_ud(c->reg.R0, 1), brw_imm_ud(num_prim));
- brw_ff_sync(p,
- c->reg.R0,
- 0,
- c->reg.R0,
- 1, /* allocate */
- 1, /* response length */
- 0 /* eot */);
+ struct intel_context *intel = &c->func.brw->intel;
+
+ if (intel->gen < 6) {
+ brw_MOV(p, get_element_ud(c->reg.R0, 1), brw_imm_ud(num_prim));
+ brw_ff_sync(p,
+ c->reg.R0,
+ 0,
+ c->reg.R0,
+ 1, /* allocate */
+ 1, /* response length */
+ 0 /* eot */);
+ } else {
+ brw_MOV(p, retype(c->reg.temp, BRW_REGISTER_TYPE_UD),
+ retype(c->reg.R0, BRW_REGISTER_TYPE_UD));
+ brw_MOV(p, get_element_ud(c->reg.temp, 1), brw_imm_ud(num_prim));
+ brw_ff_sync(p,
+ c->reg.temp,
+ 0,
+ c->reg.temp,
+ 1, /* allocate */
+ 1, /* response length */
+ 0 /* eot */);
+ brw_MOV(p, get_element_ud(c->reg.R0, 0),
+ get_element_ud(c->reg.temp, 0));
+ }
}
diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c
index 6eeaba77720..24041e57b00 100644
--- a/src/mesa/drivers/dri/i965/brw_misc_state.c
+++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
@@ -48,7 +48,7 @@
static void upload_blend_constant_color(struct brw_context *brw)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
struct brw_blend_constant_color bcc;
memset(&bcc, 0, sizeof(bcc));
@@ -76,7 +76,7 @@ const struct brw_tracked_state brw_blend_constant_color = {
static void upload_drawing_rect(struct brw_context *brw)
{
struct intel_context *intel = &brw->intel;
- GLcontext *ctx = &intel->ctx;
+ struct gl_context *ctx = &intel->ctx;
BEGIN_BATCH(4);
OUT_BATCH(_3DSTATE_DRAWRECT_INFO_I965);
@@ -335,7 +335,7 @@ const struct brw_tracked_state brw_depthbuffer = {
static void upload_polygon_stipple(struct brw_context *brw)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
struct brw_polygon_stipple bps;
GLuint i;
@@ -378,7 +378,7 @@ const struct brw_tracked_state brw_polygon_stipple = {
static void upload_polygon_stipple_offset(struct brw_context *brw)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
struct brw_polygon_stipple_offset bpso;
memset(&bpso, 0, sizeof(bpso));
@@ -449,7 +449,7 @@ const struct brw_tracked_state brw_aa_line_parameters = {
static void upload_line_stipple(struct brw_context *brw)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
struct brw_line_stipple bls;
GLfloat tmp;
GLint tmpi;
@@ -515,8 +515,6 @@ static void upload_invarient_state( struct brw_context *brw )
if (intel->gen >= 6) {
int i;
- intel_batchbuffer_emit_mi_flush(intel->batch);
-
BEGIN_BATCH(3);
OUT_BATCH(CMD_3D_MULTISAMPLE << 16 | (3 - 2));
OUT_BATCH(MS_PIXEL_LOCATION_CENTER |
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index 3e52be5d4b7..1367d814696 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -41,7 +41,7 @@
#include "brw_context.h"
#include "brw_wm.h"
-static void brwBindProgram( GLcontext *ctx,
+static void brwBindProgram( struct gl_context *ctx,
GLenum target,
struct gl_program *prog )
{
@@ -57,7 +57,7 @@ static void brwBindProgram( GLcontext *ctx,
}
}
-static struct gl_program *brwNewProgram( GLcontext *ctx,
+static struct gl_program *brwNewProgram( struct gl_context *ctx,
GLenum target,
GLuint id )
{
@@ -93,14 +93,14 @@ static struct gl_program *brwNewProgram( GLcontext *ctx,
}
}
-static void brwDeleteProgram( GLcontext *ctx,
+static void brwDeleteProgram( struct gl_context *ctx,
struct gl_program *prog )
{
_mesa_delete_program( ctx, prog );
}
-static GLboolean brwIsProgramNative( GLcontext *ctx,
+static GLboolean brwIsProgramNative( struct gl_context *ctx,
GLenum target,
struct gl_program *prog )
{
@@ -108,7 +108,7 @@ static GLboolean brwIsProgramNative( GLcontext *ctx,
}
static void
-shader_error(GLcontext *ctx, struct gl_program *prog, const char *msg)
+shader_error(struct gl_context *ctx, struct gl_program *prog, const char *msg)
{
struct gl_shader_program *shader;
@@ -120,7 +120,7 @@ shader_error(GLcontext *ctx, struct gl_program *prog, const char *msg)
}
}
-static GLboolean brwProgramStringNotify( GLcontext *ctx,
+static GLboolean brwProgramStringNotify( struct gl_context *ctx,
GLenum target,
struct gl_program *prog )
{
@@ -148,15 +148,9 @@ static GLboolean brwProgramStringNotify( GLcontext *ctx,
* using the new FS backend.
*/
shader_program = _mesa_lookup_shader_program(ctx, prog->Id);
- if (shader_program) {
- for (i = 0; i < shader_program->_NumLinkedShaders; i++) {
- struct brw_shader *shader;
-
- shader = (struct brw_shader *)shader_program->_LinkedShaders[i];
- if (shader->base.Type == GL_FRAGMENT_SHADER && shader->ir) {
- return GL_TRUE;
- }
- }
+ if (shader_program
+ && shader_program->_LinkedShaders[MESA_SHADER_FRAGMENT]) {
+ return GL_TRUE;
}
}
else if (target == GL_VERTEX_PROGRAM_ARB) {
diff --git a/src/mesa/drivers/dri/i965/brw_queryobj.c b/src/mesa/drivers/dri/i965/brw_queryobj.c
index 1b183735d75..f28f28663ea 100644
--- a/src/mesa/drivers/dri/i965/brw_queryobj.c
+++ b/src/mesa/drivers/dri/i965/brw_queryobj.c
@@ -72,7 +72,7 @@ brw_queryobj_get_results(struct brw_query_object *query)
}
static struct gl_query_object *
-brw_new_query_object(GLcontext *ctx, GLuint id)
+brw_new_query_object(struct gl_context *ctx, GLuint id)
{
struct brw_query_object *query;
@@ -87,7 +87,7 @@ brw_new_query_object(GLcontext *ctx, GLuint id)
}
static void
-brw_delete_query(GLcontext *ctx, struct gl_query_object *q)
+brw_delete_query(struct gl_context *ctx, struct gl_query_object *q)
{
struct brw_query_object *query = (struct brw_query_object *)q;
@@ -96,7 +96,7 @@ brw_delete_query(GLcontext *ctx, struct gl_query_object *q)
}
static void
-brw_begin_query(GLcontext *ctx, struct gl_query_object *q)
+brw_begin_query(struct gl_context *ctx, struct gl_query_object *q)
{
struct brw_context *brw = brw_context(ctx);
struct intel_context *intel = intel_context(ctx);
@@ -146,7 +146,7 @@ brw_begin_query(GLcontext *ctx, struct gl_query_object *q)
* Begin the ARB_occlusion_query query on a query object.
*/
static void
-brw_end_query(GLcontext *ctx, struct gl_query_object *q)
+brw_end_query(struct gl_context *ctx, struct gl_query_object *q)
{
struct brw_context *brw = brw_context(ctx);
struct intel_context *intel = intel_context(ctx);
@@ -197,7 +197,7 @@ brw_end_query(GLcontext *ctx, struct gl_query_object *q)
}
}
-static void brw_wait_query(GLcontext *ctx, struct gl_query_object *q)
+static void brw_wait_query(struct gl_context *ctx, struct gl_query_object *q)
{
struct brw_query_object *query = (struct brw_query_object *)q;
@@ -205,7 +205,7 @@ static void brw_wait_query(GLcontext *ctx, struct gl_query_object *q)
query->Base.Ready = GL_TRUE;
}
-static void brw_check_query(GLcontext *ctx, struct gl_query_object *q)
+static void brw_check_query(struct gl_context *ctx, struct gl_query_object *q)
{
struct brw_query_object *query = (struct brw_query_object *)q;
diff --git a/src/mesa/drivers/dri/i965/brw_sf.c b/src/mesa/drivers/dri/i965/brw_sf.c
index 7d005d278fb..7dbd70daaea 100644
--- a/src/mesa/drivers/dri/i965/brw_sf.c
+++ b/src/mesa/drivers/dri/i965/brw_sf.c
@@ -132,7 +132,7 @@ static void compile_sf_prog( struct brw_context *brw,
*/
static void upload_sf_prog(struct brw_context *brw)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
struct brw_sf_prog_key key;
memset(&key, 0, sizeof(key));
diff --git a/src/mesa/drivers/dri/i965/brw_sf_state.c b/src/mesa/drivers/dri/i965/brw_sf_state.c
index 914f275cc67..6ad9e1b48a4 100644
--- a/src/mesa/drivers/dri/i965/brw_sf_state.c
+++ b/src/mesa/drivers/dri/i965/brw_sf_state.c
@@ -38,7 +38,7 @@
static void upload_sf_vp(struct brw_context *brw)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
const GLfloat depth_scale = 1.0F / ctx->DrawBuffer->_DepthMaxF;
struct brw_sf_viewport sfv;
GLfloat y_scale, y_bias;
@@ -139,7 +139,7 @@ struct brw_sf_unit_key {
static void
sf_unit_populate_key(struct brw_context *brw, struct brw_sf_unit_key *key)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
memset(key, 0, sizeof(*key));
/* CACHE_NEW_SF_PROG */
diff --git a/src/mesa/drivers/dri/i965/brw_state.c b/src/mesa/drivers/dri/i965/brw_state.c
index 1e77e427d38..13b231d5cf5 100644
--- a/src/mesa/drivers/dri/i965/brw_state.c
+++ b/src/mesa/drivers/dri/i965/brw_state.c
@@ -28,7 +28,7 @@
#include "brw_context.h"
void
-brw_enable(GLcontext *ctx, GLenum cap, GLboolean state)
+brw_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
{
struct brw_context *brw = brw_context(ctx);
@@ -40,7 +40,7 @@ brw_enable(GLcontext *ctx, GLenum cap, GLboolean state)
}
void
-brw_depth_range(GLcontext *ctx, GLclampd nearval, GLclampd farval)
+brw_depth_range(struct gl_context *ctx, GLclampd nearval, GLclampd farval)
{
struct brw_context *brw = brw_context(ctx);
diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c
index 1aadd5ca61d..f3b6a90f61a 100644
--- a/src/mesa/drivers/dri/i965/brw_state_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_state_upload.c
@@ -128,6 +128,7 @@ const struct brw_tracked_state *gen6_atoms[] =
&gen6_cc_state_pointers,
&brw_vs_constants, /* Before vs_surfaces and constant_buffer */
+ &brw_wm_constants, /* Before wm_surfaces and constant_buffer */
&gen6_wm_constants, /* Before wm_surfaces and constant_buffer */
&brw_vs_surfaces, /* must do before unit */
@@ -336,7 +337,7 @@ brw_print_dirty_count(struct dirty_bit_map *bit_map, int32_t bits)
*/
void brw_validate_state( struct brw_context *brw )
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
struct intel_context *intel = &brw->intel;
struct brw_state_flags *state = &brw->state.dirty;
GLuint i;
diff --git a/src/mesa/drivers/dri/i965/brw_tex.c b/src/mesa/drivers/dri/i965/brw_tex.c
index e911b105b23..39dfd34f4c9 100644
--- a/src/mesa/drivers/dri/i965/brw_tex.c
+++ b/src/mesa/drivers/dri/i965/brw_tex.c
@@ -45,7 +45,7 @@
*/
void brw_validate_textures( struct brw_context *brw )
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
struct intel_context *intel = &brw->intel;
int i;
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index 9f90e1e5e5c..4a41c7a5176 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -43,7 +43,7 @@ static void do_vs_prog( struct brw_context *brw,
struct brw_vertex_program *vp,
struct brw_vs_prog_key *key )
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
GLuint program_size;
const GLuint *program;
struct brw_vs_compile c;
@@ -96,6 +96,7 @@ static void do_vs_prog( struct brw_context *brw,
sizeof(c.prog_data));
assert(ctx->Const.VertexProgram.MaxNativeParameters ==
ARRAY_SIZE(c.constant_map));
+ (void) ctx;
aux_size = sizeof(c.prog_data);
if (c.vp->use_const_buffer)
@@ -114,7 +115,7 @@ static void do_vs_prog( struct brw_context *brw,
static void brw_upload_vs_prog(struct brw_context *brw)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
struct brw_vs_prog_key key;
struct brw_vertex_program *vp =
(struct brw_vertex_program *)brw->vertex_program;
diff --git a/src/mesa/drivers/dri/i965/brw_vs_constval.c b/src/mesa/drivers/dri/i965/brw_vs_constval.c
index 249a800bf4b..47cc0a7da7a 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_constval.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_constval.c
@@ -190,7 +190,7 @@ static GLuint get_input_size(struct brw_context *brw,
*/
static void calc_wm_input_sizes( struct brw_context *brw )
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
/* BRW_NEW_VERTEX_PROGRAM */
const struct brw_vertex_program *vp =
brw_vertex_program_const(brw->vertex_program);
diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c
index 8ac979dceaa..ce334799965 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c
@@ -593,11 +593,15 @@ static void emit_math1( struct brw_vs_compile *c,
struct brw_compile *p = &c->func;
struct intel_context *intel = &p->brw->intel;
struct brw_reg tmp = dst;
- GLboolean need_tmp = (intel->gen < 6 &&
- (dst.dw1.bits.writemask != 0xf ||
- dst.file != BRW_GENERAL_REGISTER_FILE));
+ GLboolean need_tmp = GL_FALSE;
- if (need_tmp)
+ if (dst.file != BRW_GENERAL_REGISTER_FILE)
+ need_tmp = GL_TRUE;
+
+ if (intel->gen < 6 && dst.dw1.bits.writemask != 0xf)
+ need_tmp = GL_TRUE;
+
+ if (need_tmp)
tmp = get_tmp(c);
brw_math(p,
@@ -626,9 +630,13 @@ static void emit_math2( struct brw_vs_compile *c,
struct brw_compile *p = &c->func;
struct intel_context *intel = &p->brw->intel;
struct brw_reg tmp = dst;
- GLboolean need_tmp = (intel->gen < 6 &&
- (dst.dw1.bits.writemask != 0xf ||
- dst.file != BRW_GENERAL_REGISTER_FILE));
+ GLboolean need_tmp = GL_FALSE;
+
+ if (dst.file != BRW_GENERAL_REGISTER_FILE)
+ need_tmp = GL_TRUE;
+
+ if (intel->gen < 6 && dst.dw1.bits.writemask != 0xf)
+ need_tmp = GL_TRUE;
if (need_tmp)
tmp = get_tmp(c);
@@ -922,6 +930,8 @@ get_constant(struct brw_vs_compile *c,
assert(argIndex < 3);
+ assert(c->func.brw->intel.gen < 6); /* FINISHME */
+
if (c->current_const[argIndex].index != src->Index) {
/* Keep track of the last constant loaded in this slot, for reuse. */
c->current_const[argIndex].index = src->Index;
@@ -958,6 +968,8 @@ get_reladdr_constant(struct brw_vs_compile *c,
assert(argIndex < 3);
+ assert(c->func.brw->intel.gen < 6); /* FINISHME */
+
/* Can't reuse a reladdr constant load. */
c->current_const[argIndex].index = -1;
diff --git a/src/mesa/drivers/dri/i965/brw_vs_state.c b/src/mesa/drivers/dri/i965/brw_vs_state.c
index 9b2dd5b3d1c..ebae94269f9 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_state.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_state.c
@@ -51,7 +51,7 @@ struct brw_vs_unit_key {
static void
vs_unit_populate_key(struct brw_context *brw, struct brw_vs_unit_key *key)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
memset(key, 0, sizeof(*key));
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 0250a68d292..eabac511602 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c
@@ -45,7 +45,7 @@
static void
prepare_vs_constants(struct brw_context *brw)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
struct intel_context *intel = &brw->intel;
struct brw_vertex_program *vp =
(struct brw_vertex_program *) brw->vertex_program;
@@ -101,7 +101,7 @@ const struct brw_tracked_state brw_vs_constants = {
* Sets brw->vs.surf_bo[surf] and brw->vp->const_buffer.
*/
static void
-brw_update_vs_constant_surface( GLcontext *ctx,
+brw_update_vs_constant_surface( struct gl_context *ctx,
GLuint surf)
{
struct brw_context *brw = brw_context(ctx);
@@ -151,7 +151,7 @@ prepare_vs_surfaces(struct brw_context *brw)
*/
static void upload_vs_surfaces(struct brw_context *brw)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
uint32_t *bind;
int i;
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index 2ea5967df12..7f3ba5f0581 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -114,14 +114,6 @@ brw_wm_non_glsl_emit(struct brw_context *brw, struct brw_wm_compile *c)
/* how many general-purpose registers are used */
c->prog_data.total_grf = c->max_wm_grf;
- /* Scratch space is used for register spilling */
- if (c->last_scratch) {
- c->prog_data.total_scratch = c->last_scratch + 0x40;
- }
- else {
- c->prog_data.total_scratch = 0;
- }
-
/* Emit GEN4 code.
*/
brw_wm_emit(c);
@@ -193,6 +185,19 @@ static void do_wm_prog( struct brw_context *brw,
}
}
+ /* Scratch space is used for register spilling */
+ if (c->last_scratch) {
+ /* Per-thread scratch space is power-of-two sized. */
+ for (c->prog_data.total_scratch = 1024;
+ c->prog_data.total_scratch <= c->last_scratch;
+ c->prog_data.total_scratch *= 2) {
+ /* empty */
+ }
+ }
+ else {
+ c->prog_data.total_scratch = 0;
+ }
+
if (INTEL_DEBUG & DEBUG_WM)
fprintf(stderr, "\n");
@@ -216,7 +221,7 @@ static void brw_wm_populate_key( struct brw_context *brw,
struct brw_wm_prog_key *key )
{
struct intel_context *intel = &brw->intel;
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
/* BRW_NEW_FRAGMENT_PROGRAM */
const struct brw_fragment_program *fp =
(struct brw_fragment_program *)brw->fragment_program;
@@ -318,6 +323,12 @@ static void brw_wm_populate_key( struct brw_context *brw,
/* R31: MSAA position offsets. */
/* R32-: bary for 32-pixel. */
/* R58-59: interp W for 32-pixel. */
+
+ if (fp->program.Base.OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_DEPTH)) {
+ key->source_depth_to_render_target = GL_TRUE;
+ key->computes_depth = GL_TRUE;
+ }
+
} else {
brw_wm_lookup_iz(intel,
line_aa,
diff --git a/src/mesa/drivers/dri/i965/brw_wm.h b/src/mesa/drivers/dri/i965/brw_wm.h
index ae6a1d56f7e..99bd15c187f 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.h
+++ b/src/mesa/drivers/dri/i965/brw_wm.h
@@ -33,6 +33,7 @@
#ifndef BRW_WM_H
#define BRW_WM_H
+#include <stdbool.h>
#include "program/prog_instruction.h"
#include "brw_context.h"
@@ -467,13 +468,12 @@ void emit_xpd(struct brw_compile *p,
const struct brw_reg *arg0,
const struct brw_reg *arg1);
-GLboolean brw_compile_shader(GLcontext *ctx,
+GLboolean brw_compile_shader(struct gl_context *ctx,
struct gl_shader *shader);
-GLboolean brw_link_shader(GLcontext *ctx, struct gl_shader_program *prog);
-struct gl_shader *brw_new_shader(GLcontext *ctx, GLuint name, GLuint type);
-struct gl_shader_program *brw_new_shader_program(GLcontext *ctx, GLuint name);
+GLboolean brw_link_shader(struct gl_context *ctx, struct gl_shader_program *prog);
+struct gl_shader *brw_new_shader(struct gl_context *ctx, GLuint name, GLuint type);
+struct gl_shader_program *brw_new_shader_program(struct gl_context *ctx, GLuint name);
-GLboolean brw_do_channel_expressions(struct exec_list *instructions);
-GLboolean brw_do_vector_splitting(struct exec_list *instructions);
+bool brw_color_buffer_write_enabled(struct brw_context *brw);
#endif
diff --git a/src/mesa/drivers/dri/i965/brw_wm_emit.c b/src/mesa/drivers/dri/i965/brw_wm_emit.c
index f52372ee46f..d06c49fd5be 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_emit.c
@@ -1576,9 +1576,7 @@ static void emit_spill( struct brw_wm_compile *c,
mov (1) r0.2<1>:d 0x00000080:d { Align1 NoMask }
send (16) null.0<1>:uw m1 r0.0<8;8,1>:uw 0x053003ff:ud { Align1 }
*/
- brw_dp_WRITE_16(p,
- retype(vec16(brw_vec8_grf(0, 0)), BRW_REGISTER_TYPE_UW),
- slot);
+ brw_oword_block_write_scratch(p, brw_message_reg(1), 2, slot);
}
@@ -1603,9 +1601,7 @@ static void emit_unspill( struct brw_wm_compile *c,
send (16) r110.0<1>:uw m1 r0.0<8;8,1>:uw 0x041243ff:ud { Align1 }
*/
- brw_dp_READ_16(p,
- retype(vec16(reg), BRW_REGISTER_TYPE_UW),
- slot);
+ brw_oword_block_read(p, vec16(reg), brw_message_reg(1), 2, slot);
}
@@ -1772,7 +1768,11 @@ void brw_wm_emit( struct brw_wm_compile *c )
break;
case OPCODE_TRUNC:
- emit_alu1(p, brw_RNDZ, dst, dst_flags, args[0]);
+ for (i = 0; i < 4; i++) {
+ if (dst_flags & (1<<i)) {
+ brw_RNDZ(p, dst[i], args[0][i]);
+ }
+ }
break;
case OPCODE_LRP:
diff --git a/src/mesa/drivers/dri/i965/brw_wm_fp.c b/src/mesa/drivers/dri/i965/brw_wm_fp.c
index af1fda86513..15a238cda62 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_fp.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_fp.c
@@ -89,6 +89,8 @@ static struct prog_src_register src_reg(GLuint file, GLuint idx)
reg.Negate = NEGATE_NONE;
reg.Abs = 0;
reg.HasIndex2 = 0;
+ reg.RelAddr2 = 0;
+ reg.Index2 = 0;
return reg;
}
diff --git a/src/mesa/drivers/dri/i965/brw_wm_glsl.c b/src/mesa/drivers/dri/i965/brw_wm_glsl.c
index 55aceea9b5c..d325f85ce00 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_glsl.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_glsl.c
@@ -307,21 +307,20 @@ static void prealloc_reg(struct brw_wm_compile *c)
/* use a real constant buffer, or just use a section of the GRF? */
/* XXX this heuristic may need adjustment... */
- if ((nr_params + nr_temps) * 4 + reg_index > 80)
- c->fp->use_const_buffer = GL_TRUE;
- else
- c->fp->use_const_buffer = GL_FALSE;
- /*printf("WM use_const_buffer = %d\n", c->fp->use_const_buffer);*/
+ if ((nr_params + nr_temps) * 4 + reg_index > 80) {
+ for (i = 0; i < nr_params; i++) {
+ float *pv = c->fp->program.Base.Parameters->ParameterValues[i];
+ for (j = 0; j < 4; j++) {
+ c->prog_data.pull_param[c->prog_data.nr_pull_params] = &pv[j];
+ c->prog_data.nr_pull_params++;
+ }
+ }
- if (c->fp->use_const_buffer) {
- /* We'll use a real constant buffer and fetch constants from
- * it with a dataport read message.
- */
+ c->prog_data.nr_params = 0;
+ }
+ /*printf("WM use_const_buffer = %d\n", c->fp->use_const_buffer);*/
- /* number of float constants in CURBE */
- c->prog_data.nr_params = 0;
- }
- else {
+ if (!c->prog_data.nr_pull_params) {
const struct gl_program_parameter_list *plist =
c->fp->program.Base.Parameters;
int index = 0;
@@ -463,7 +462,7 @@ static void prealloc_reg(struct brw_wm_compile *c)
* They'll be found in these registers.
* XXX alloc these on demand!
*/
- if (c->fp->use_const_buffer) {
+ if (c->prog_data.nr_pull_params) {
for (i = 0; i < 3; i++) {
c->current_const[i].index = -1;
c->current_const[i].reg = brw_vec8_grf(alloc_grf(c), 0);
@@ -501,12 +500,11 @@ static void fetch_constants(struct brw_wm_compile *c,
#endif
/* need to fetch the constant now */
- brw_dp_READ_4(p,
- c->current_const[i].reg, /* writeback dest */
- src->RelAddr, /* relative indexing? */
- 16 * src->Index, /* byte offset */
- SURF_INDEX_FRAG_CONST_BUFFER/* binding table index */
- );
+ brw_oword_block_read(p,
+ c->current_const[i].reg,
+ brw_message_reg(1),
+ 16 * src->Index,
+ SURF_INDEX_FRAG_CONST_BUFFER);
}
}
}
@@ -606,7 +604,7 @@ static struct brw_reg get_src_reg(struct brw_wm_compile *c,
}
}
- if (c->fp->use_const_buffer &&
+ if (c->prog_data.nr_pull_params &&
(src->File == PROGRAM_STATE_VAR ||
src->File == PROGRAM_CONSTANT ||
src->File == PROGRAM_UNIFORM)) {
@@ -729,7 +727,7 @@ static void brw_wm_emit_glsl(struct brw_context *brw, struct brw_wm_compile *c)
#endif
/* fetch any constants that this instruction needs */
- if (c->fp->use_const_buffer)
+ if (c->prog_data.nr_pull_params)
fetch_constants(c, inst);
if (inst->Opcode != OPCODE_ARL) {
diff --git a/src/mesa/drivers/dri/i965/brw_wm_pass0.c b/src/mesa/drivers/dri/i965/brw_wm_pass0.c
index 8fc960b4456..d6aa9f957a2 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_pass0.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_pass0.c
@@ -113,6 +113,7 @@ static const struct brw_wm_ref *get_param_ref( struct brw_wm_compile *c,
struct brw_wm_ref *ref = get_ref(c);
c->prog_data.param[i] = param_ptr;
+ c->prog_data.param_convert[i] = PARAM_NO_CONVERT;
c->nr_creg = (i+16)/16;
/* Push the offsets into hw_reg. These will be added to the
diff --git a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
index f9c48140fb6..fea96d35381 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
@@ -233,7 +233,7 @@ static void
brw_wm_sampler_populate_key(struct brw_context *brw,
struct wm_sampler_key *key)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
int unit;
char *last_entry_end = ((char*)&key->sampler_count) +
sizeof(key->sampler_count);
@@ -301,7 +301,7 @@ brw_wm_sampler_populate_key(struct brw_context *brw,
*/
static void upload_wm_samplers( struct brw_context *brw )
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
struct wm_sampler_key key;
int i, sampler_key_size;
diff --git a/src/mesa/drivers/dri/i965/brw_wm_state.c b/src/mesa/drivers/dri/i965/brw_wm_state.c
index 6699d0a73e6..9a27b937103 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_state.c
@@ -52,13 +52,40 @@ struct brw_wm_unit_key {
unsigned int nr_surfaces, sampler_count;
GLboolean uses_depth, computes_depth, uses_kill, is_glsl;
GLboolean polygon_stipple, stats_wm, line_stipple, offset_enable;
+ GLboolean color_write_enable;
GLfloat offset_units, offset_factor;
};
+bool
+brw_color_buffer_write_enabled(struct brw_context *brw)
+{
+ struct gl_context *ctx = &brw->intel.ctx;
+ const struct gl_fragment_program *fp = brw->fragment_program;
+ int i;
+
+ /* _NEW_BUFFERS */
+ for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) {
+ struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[i];
+
+ /* _NEW_COLOR */
+ if (rb &&
+ (fp->Base.OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_COLOR) ||
+ fp->Base.OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_DATA0 + i)) &&
+ (ctx->Color.ColorMask[i][0] ||
+ ctx->Color.ColorMask[i][1] ||
+ ctx->Color.ColorMask[i][2] ||
+ ctx->Color.ColorMask[i][3])) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
static void
wm_unit_populate_key(struct brw_context *brw, struct brw_wm_unit_key *key)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
const struct gl_fragment_program *fp = brw->fragment_program;
const struct brw_fragment_program *bfp = (struct brw_fragment_program *) fp;
struct intel_context *intel = &brw->intel;
@@ -70,7 +97,7 @@ wm_unit_populate_key(struct brw_context *brw, struct brw_wm_unit_key *key)
key->urb_entry_read_length = brw->wm.prog_data->urb_read_length;
key->curb_entry_read_length = brw->wm.prog_data->curb_read_length;
key->dispatch_grf_start_reg = brw->wm.prog_data->first_curbe_grf;
- key->total_scratch = ALIGN(brw->wm.prog_data->total_scratch, 1024);
+ key->total_scratch = brw->wm.prog_data->total_scratch;
/* BRW_NEW_URB_FENCE */
key->urb_size = brw->urb.vsize;
@@ -100,6 +127,9 @@ wm_unit_populate_key(struct brw_context *brw, struct brw_wm_unit_key *key)
if (brw->state.depth_region == NULL)
key->computes_depth = 0;
+ /* _NEW_BUFFERS | _NEW_COLOR */
+ key->color_write_enable = brw_color_buffer_write_enabled(brw);
+
/* _NEW_COLOR */
key->uses_kill = fp->UsesKill || ctx->Color.AlphaEnabled;
key->is_glsl = bfp->isGLSL;
@@ -107,17 +137,12 @@ wm_unit_populate_key(struct brw_context *brw, struct brw_wm_unit_key *key)
/* If using the fragment shader backend, the program is always
* 8-wide.
*/
- if (ctx->Shader.CurrentProgram) {
- int i;
-
- for (i = 0; i < ctx->Shader.CurrentProgram->_NumLinkedShaders; i++) {
- struct brw_shader *shader =
- (struct brw_shader *)ctx->Shader.CurrentProgram->_LinkedShaders[i];;
+ if (ctx->Shader.CurrentFragmentProgram) {
+ struct brw_shader *shader = (struct brw_shader *)
+ ctx->Shader.CurrentFragmentProgram->_LinkedShaders[MESA_SHADER_FRAGMENT];
- if (shader->base.Type == GL_FRAGMENT_SHADER &&
- shader->ir != NULL) {
- key->is_glsl = GL_TRUE;
- }
+ if (shader != NULL && shader->ir != NULL) {
+ key->is_glsl = GL_TRUE;
}
}
@@ -159,7 +184,7 @@ wm_unit_create_from_key(struct brw_context *brw, struct brw_wm_unit_key *key,
if (key->total_scratch != 0) {
wm.thread2.scratch_space_base_pointer =
brw->wm.scratch_bo->offset >> 10; /* reloc */
- wm.thread2.per_thread_scratch_space = key->total_scratch / 1024 - 1;
+ wm.thread2.per_thread_scratch_space = ffs(key->total_scratch) - 11;
} else {
wm.thread2.scratch_space_base_pointer = 0;
wm.thread2.per_thread_scratch_space = 0;
@@ -193,7 +218,13 @@ wm_unit_create_from_key(struct brw_context *brw, struct brw_wm_unit_key *key,
wm.wm5.enable_16_pix = 1;
wm.wm5.max_threads = brw->wm_max_threads - 1;
- wm.wm5.thread_dispatch_enable = 1; /* AKA: color_write */
+
+ if (key->color_write_enable ||
+ key->uses_kill ||
+ key->computes_depth) {
+ wm.wm5.thread_dispatch_enable = 1;
+ }
+
wm.wm5.legacy_line_rast = 0;
wm.wm5.legacy_global_depth_bias = 0;
wm.wm5.early_depth_test = 1; /* never need to disable */
@@ -262,7 +293,6 @@ static void upload_wm_unit( struct brw_context *brw )
* bother reducing the allocation later, since we use scratch so
* rarely.
*/
- assert(key.total_scratch <= 12 * 1024);
if (key.total_scratch) {
GLuint total = key.total_scratch * brw->wm_max_threads;
@@ -298,7 +328,8 @@ const struct brw_tracked_state brw_wm_unit = {
_NEW_POLYGONSTIPPLE |
_NEW_LINE |
_NEW_COLOR |
- _NEW_DEPTH),
+ _NEW_DEPTH |
+ _NEW_BUFFERS),
.brw = (BRW_NEW_FRAGMENT_PROGRAM |
BRW_NEW_CURBE_OFFSETS |
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 37104f1f238..76fc94df1f6 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -209,7 +209,7 @@ brw_set_surface_tiling(struct brw_surface_state *surf, uint32_t tiling)
}
static void
-brw_update_texture_surface( GLcontext *ctx, GLuint unit )
+brw_update_texture_surface( struct gl_context *ctx, GLuint unit )
{
struct brw_context *brw = brw_context(ctx);
struct gl_texture_object *tObj = ctx->Texture.Unit[unit]._Current;
@@ -315,17 +315,18 @@ brw_create_constant_surface(struct brw_context *brw,
static void
prepare_wm_constants(struct brw_context *brw)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
struct intel_context *intel = &brw->intel;
struct brw_fragment_program *fp =
(struct brw_fragment_program *) brw->fragment_program;
- const struct gl_program_parameter_list *params = fp->program.Base.Parameters;
- const int size = params->NumParameters * 4 * sizeof(GLfloat);
+ const int size = brw->wm.prog_data->nr_pull_params * sizeof(float);
+ float *constants;
+ unsigned int i;
_mesa_load_state_parameters(ctx, fp->program.Base.Parameters);
/* BRW_NEW_FRAGMENT_PROGRAM */
- if (!fp->use_const_buffer) {
+ if (brw->wm.prog_data->nr_pull_params == 0) {
if (brw->wm.const_bo) {
drm_intel_bo_unreference(brw->wm.const_bo);
brw->wm.const_bo = NULL;
@@ -335,11 +336,19 @@ prepare_wm_constants(struct brw_context *brw)
}
drm_intel_bo_unreference(brw->wm.const_bo);
- brw->wm.const_bo = drm_intel_bo_alloc(intel->bufmgr, "vp_const_buffer",
+ brw->wm.const_bo = drm_intel_bo_alloc(intel->bufmgr, "WM const bo",
size, 64);
/* _NEW_PROGRAM_CONSTANTS */
- drm_intel_bo_subdata(brw->wm.const_bo, 0, size, params->ParameterValues);
+ drm_intel_gem_bo_map_gtt(brw->wm.const_bo);
+ constants = brw->wm.const_bo->virtual;
+ for (i = 0; i < brw->wm.prog_data->nr_pull_params; i++) {
+ constants[i] = convert_param(brw->wm.prog_data->pull_param_convert[i],
+ *brw->wm.prog_data->pull_param[i]);
+ }
+ drm_intel_gem_bo_unmap_gtt(brw->wm.const_bo);
+
+ brw->state.dirty.brw |= BRW_NEW_WM_CONSTBUF;
}
const struct brw_tracked_state brw_wm_constants = {
@@ -407,7 +416,7 @@ brw_update_renderbuffer_surface(struct brw_context *brw,
unsigned int unit)
{
struct intel_context *intel = &brw->intel;
- GLcontext *ctx = &intel->ctx;
+ struct gl_context *ctx = &intel->ctx;
drm_intel_bo *region_bo = NULL;
struct intel_renderbuffer *irb = intel_renderbuffer(rb);
struct intel_region *region = irb ? irb->region : NULL;
@@ -572,7 +581,7 @@ brw_update_renderbuffer_surface(struct brw_context *brw,
static void
prepare_wm_surfaces(struct brw_context *brw)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
int i;
int nr_surfaces = 0;
@@ -619,7 +628,7 @@ prepare_wm_surfaces(struct brw_context *brw)
static void
upload_wm_surfaces(struct brw_context *brw)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
GLuint i;
/* _NEW_BUFFERS | _NEW_COLOR */
diff --git a/src/mesa/drivers/dri/i965/gen6_cc.c b/src/mesa/drivers/dri/i965/gen6_cc.c
index 26f1070a164..0d6e923f734 100644
--- a/src/mesa/drivers/dri/i965/gen6_cc.c
+++ b/src/mesa/drivers/dri/i965/gen6_cc.c
@@ -49,7 +49,7 @@ static void
blend_state_populate_key(struct brw_context *brw,
struct gen6_blend_state_key *key)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
memset(key, 0, sizeof(*key));
@@ -181,7 +181,7 @@ static void
color_calc_state_populate_key(struct brw_context *brw,
struct gen6_color_calc_state_key *key)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
memset(key, 0, sizeof(*key));
@@ -271,8 +271,6 @@ static void upload_cc_state_pointers(struct brw_context *brw)
OUT_RELOC(brw->cc.depth_stencil_state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 1);
OUT_RELOC(brw->cc.state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 1);
ADVANCE_BATCH();
-
- intel_batchbuffer_emit_mi_flush(intel->batch);
}
diff --git a/src/mesa/drivers/dri/i965/gen6_clip_state.c b/src/mesa/drivers/dri/i965/gen6_clip_state.c
index e8bca83e3a0..cd2ac9d92fe 100644
--- a/src/mesa/drivers/dri/i965/gen6_clip_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_clip_state.c
@@ -34,7 +34,7 @@ static void
upload_clip_state(struct brw_context *brw)
{
struct intel_context *intel = &brw->intel;
- GLcontext *ctx = &intel->ctx;
+ struct gl_context *ctx = &intel->ctx;
uint32_t depth_clamp = 0;
uint32_t provoking;
@@ -61,8 +61,6 @@ upload_clip_state(struct brw_context *brw)
provoking);
OUT_BATCH(GEN6_CLIP_FORCE_ZERO_RTAINDEX);
ADVANCE_BATCH();
-
- intel_batchbuffer_emit_mi_flush(intel->batch);
}
const struct brw_tracked_state gen6_clip_state = {
diff --git a/src/mesa/drivers/dri/i965/gen6_depthstencil.c b/src/mesa/drivers/dri/i965/gen6_depthstencil.c
index d9eca9af354..96e6eade6b7 100644
--- a/src/mesa/drivers/dri/i965/gen6_depthstencil.c
+++ b/src/mesa/drivers/dri/i965/gen6_depthstencil.c
@@ -41,7 +41,7 @@ static void
depth_stencil_state_populate_key(struct brw_context *brw,
struct brw_depth_stencil_state_key *key)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
const unsigned back = ctx->Stencil._BackFace;
memset(key, 0, sizeof(*key));
diff --git a/src/mesa/drivers/dri/i965/gen6_gs_state.c b/src/mesa/drivers/dri/i965/gen6_gs_state.c
index cefc93ba48b..6127b9197a1 100644
--- a/src/mesa/drivers/dri/i965/gen6_gs_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_gs_state.c
@@ -44,8 +44,6 @@ upload_gs_state(struct brw_context *brw)
OUT_BATCH(0);
ADVANCE_BATCH();
- intel_batchbuffer_emit_mi_flush(intel->batch);
-
if (brw->gs.prog_bo) {
BEGIN_BATCH(7);
OUT_BATCH(CMD_3D_GS_STATE << 16 | (7 - 2));
diff --git a/src/mesa/drivers/dri/i965/gen6_sampler_state.c b/src/mesa/drivers/dri/i965/gen6_sampler_state.c
index ab8e7516d23..fc5d391c3cf 100644
--- a/src/mesa/drivers/dri/i965/gen6_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_sampler_state.c
@@ -49,8 +49,6 @@ upload_sampler_state_pointers(struct brw_context *brw)
OUT_BATCH(0);
ADVANCE_BATCH();
-
- intel_batchbuffer_emit_mi_flush(intel->batch);
}
diff --git a/src/mesa/drivers/dri/i965/gen6_scissor_state.c b/src/mesa/drivers/dri/i965/gen6_scissor_state.c
index 3d483c710ce..b57126c7938 100644
--- a/src/mesa/drivers/dri/i965/gen6_scissor_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_scissor_state.c
@@ -33,7 +33,7 @@
static void
prepare_scissor_state(struct brw_context *brw)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
const GLboolean render_to_fbo = (ctx->DrawBuffer->Name != 0);
struct gen6_scissor_rect scissor;
@@ -46,7 +46,19 @@ prepare_scissor_state(struct brw_context *brw)
* Note that the hardware's coordinates are inclusive, while Mesa's min is
* inclusive but max is exclusive.
*/
- if (render_to_fbo) {
+ if (ctx->DrawBuffer->_Xmin == ctx->DrawBuffer->_Xmax ||
+ ctx->DrawBuffer->_Ymin == ctx->DrawBuffer->_Ymax) {
+ /* If the scissor was out of bounds and got clamped to 0
+ * width/height at the bounds, the subtraction of 1 from
+ * maximums could produce a negative number and thus not clip
+ * anything. Instead, just provide a min > max scissor inside
+ * the bounds, which produces the expected no rendering.
+ */
+ scissor.xmin = 1;
+ scissor.xmax = 0;
+ scissor.ymin = 1;
+ scissor.ymax = 0;
+ } else if (render_to_fbo) {
/* texmemory: Y=0=bottom */
scissor.xmin = ctx->DrawBuffer->_Xmin;
scissor.xmax = ctx->DrawBuffer->_Xmax - 1;
diff --git a/src/mesa/drivers/dri/i965/gen6_sf_state.c b/src/mesa/drivers/dri/i965/gen6_sf_state.c
index ba7f965c116..55a70bea62f 100644
--- a/src/mesa/drivers/dri/i965/gen6_sf_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_sf_state.c
@@ -64,7 +64,7 @@ static void
upload_sf_state(struct brw_context *brw)
{
struct intel_context *intel = &brw->intel;
- GLcontext *ctx = &intel->ctx;
+ struct gl_context *ctx = &intel->ctx;
/* CACHE_NEW_VS_PROG */
uint32_t num_inputs = brw_count_bits(brw->vs.prog_data->outputs_written);
uint32_t num_outputs = brw_count_bits(brw->fragment_program->Base.InputsRead);
@@ -187,8 +187,6 @@ upload_sf_state(struct brw_context *brw)
OUT_BATCH(0); /* wrapshortest enables 0-7 */
OUT_BATCH(0); /* wrapshortest enables 8-15 */
ADVANCE_BATCH();
-
- intel_batchbuffer_emit_mi_flush(intel->batch);
}
const struct brw_tracked_state gen6_sf_state = {
diff --git a/src/mesa/drivers/dri/i965/gen6_urb.c b/src/mesa/drivers/dri/i965/gen6_urb.c
index 5445e4035a9..a34123478fb 100644
--- a/src/mesa/drivers/dri/i965/gen6_urb.c
+++ b/src/mesa/drivers/dri/i965/gen6_urb.c
@@ -40,7 +40,7 @@ prepare_urb( struct brw_context *brw )
else
brw->urb.nr_gs_entries = 0;
/* CACHE_NEW_VS_PROG */
- brw->urb.vs_size = MIN2(brw->vs.prog_data->urb_entry_size, 1);
+ brw->urb.vs_size = MAX2(brw->vs.prog_data->urb_entry_size, 1);
/* Check that the number of URB rows (8 floats each) allocated is less
* than the URB space.
@@ -59,8 +59,6 @@ upload_urb(struct brw_context *brw)
/* GS requirement */
assert(!brw->gs.prog_bo || brw->urb.vs_size < 5);
- intel_batchbuffer_emit_mi_flush(intel->batch);
-
BEGIN_BATCH(3);
OUT_BATCH(CMD_URB << 16 | (3 - 2));
OUT_BATCH(((brw->urb.vs_size - 1) << GEN6_URB_VS_SIZE_SHIFT) |
@@ -68,8 +66,6 @@ upload_urb(struct brw_context *brw)
OUT_BATCH(((brw->urb.vs_size - 1) << GEN6_URB_GS_SIZE_SHIFT) |
((brw->urb.nr_gs_entries) << GEN6_URB_GS_ENTRIES_SHIFT));
ADVANCE_BATCH();
-
- intel_batchbuffer_emit_mi_flush(intel->batch);
}
const struct brw_tracked_state gen6_urb = {
diff --git a/src/mesa/drivers/dri/i965/gen6_viewport_state.c b/src/mesa/drivers/dri/i965/gen6_viewport_state.c
index 84bea323f8a..d691bbebc83 100644
--- a/src/mesa/drivers/dri/i965/gen6_viewport_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_viewport_state.c
@@ -65,7 +65,7 @@ const struct brw_tracked_state gen6_clip_vp = {
static void
prepare_sf_vp(struct brw_context *brw)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
const GLfloat depth_scale = 1.0F / ctx->DrawBuffer->_DepthMaxF;
struct brw_sf_viewport sfv;
GLfloat y_scale, y_bias;
@@ -125,8 +125,6 @@ static void upload_viewport_state_pointers(struct brw_context *brw)
OUT_RELOC(brw->sf.vp_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
OUT_RELOC(brw->cc.vp_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
ADVANCE_BATCH();
-
- intel_batchbuffer_emit_mi_flush(intel->batch);
}
const struct brw_tracked_state gen6_viewport_state = {
diff --git a/src/mesa/drivers/dri/i965/gen6_vs_state.c b/src/mesa/drivers/dri/i965/gen6_vs_state.c
index 50047a33a87..304eaddf409 100644
--- a/src/mesa/drivers/dri/i965/gen6_vs_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_vs_state.c
@@ -37,7 +37,7 @@ static void
upload_vs_state(struct brw_context *brw)
{
struct intel_context *intel = &brw->intel;
- GLcontext *ctx = &intel->ctx;
+ struct gl_context *ctx = &intel->ctx;
const struct brw_vertex_program *vp =
brw_vertex_program_const(brw->vertex_program);
unsigned int nr_params = vp->program.Base.Parameters->NumParameters;
@@ -88,8 +88,6 @@ upload_vs_state(struct brw_context *brw)
drm_intel_bo_unreference(constant_bo);
}
- intel_batchbuffer_emit_mi_flush(intel->batch);
-
BEGIN_BATCH(6);
OUT_BATCH(CMD_3D_VS_STATE << 16 | (6 - 2));
OUT_RELOC(brw->vs.prog_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
@@ -103,8 +101,6 @@ upload_vs_state(struct brw_context *brw)
GEN6_VS_STATISTICS_ENABLE |
GEN6_VS_ENABLE);
ADVANCE_BATCH();
-
- intel_batchbuffer_emit_mi_flush(intel->batch);
}
const struct brw_tracked_state gen6_vs_state = {
diff --git a/src/mesa/drivers/dri/i965/gen6_wm_state.c b/src/mesa/drivers/dri/i965/gen6_wm_state.c
index 4a9df48ea4c..36d4ab93ba9 100644
--- a/src/mesa/drivers/dri/i965/gen6_wm_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_wm_state.c
@@ -29,6 +29,7 @@
#include "brw_state.h"
#include "brw_defines.h"
#include "brw_util.h"
+#include "brw_wm.h"
#include "program/prog_parameter.h"
#include "program/prog_statevars.h"
#include "intel_batchbuffer.h"
@@ -37,7 +38,7 @@ static void
prepare_wm_constants(struct brw_context *brw)
{
struct intel_context *intel = &brw->intel;
- GLcontext *ctx = &intel->ctx;
+ struct gl_context *ctx = &intel->ctx;
const struct brw_fragment_program *fp =
brw_fragment_program_const(brw->fragment_program);
@@ -62,7 +63,8 @@ prepare_wm_constants(struct brw_context *brw)
drm_intel_gem_bo_map_gtt(brw->wm.push_const_bo);
constants = brw->wm.push_const_bo->virtual;
for (i = 0; i < brw->wm.prog_data->nr_params; i++) {
- constants[i] = *brw->wm.prog_data->param[i];
+ constants[i] = convert_param(brw->wm.prog_data->param_convert[i],
+ *brw->wm.prog_data->param[i]);
}
drm_intel_gem_bo_unmap_gtt(brw->wm.push_const_bo);
}
@@ -81,12 +83,12 @@ static void
upload_wm_state(struct brw_context *brw)
{
struct intel_context *intel = &brw->intel;
- GLcontext *ctx = &intel->ctx;
+ struct gl_context *ctx = &intel->ctx;
const struct brw_fragment_program *fp =
brw_fragment_program_const(brw->fragment_program);
uint32_t dw2, dw4, dw5, dw6;
- if (fp->use_const_buffer || brw->wm.prog_data->nr_params == 0) {
+ if (brw->wm.prog_data->nr_params == 0) {
/* Disable the push constant buffers. */
BEGIN_BATCH(5);
OUT_BATCH(CMD_3D_CONSTANT_PS_STATE << 16 | (5 - 2));
@@ -109,14 +111,12 @@ upload_wm_state(struct brw_context *brw)
ADVANCE_BATCH();
}
- intel_batchbuffer_emit_mi_flush(intel->batch);
-
dw2 = dw4 = dw5 = dw6 = 0;
dw4 |= GEN6_WM_STATISTICS_ENABLE;
dw5 |= GEN6_WM_LINE_AA_WIDTH_1_0;
dw5 |= GEN6_WM_LINE_END_CAP_AA_WIDTH_0_5;
- /* BRW_NEW_NR_SURFACES */
+ /* BRW_NEW_NR_WM_SURFACES */
dw2 |= brw->wm.nr_surfaces << GEN6_WM_BINDING_TABLE_ENTRY_COUNT_SHIFT;
/* CACHE_NEW_SAMPLER */
@@ -125,7 +125,6 @@ upload_wm_state(struct brw_context *brw)
GEN6_WM_DISPATCH_START_GRF_SHIFT_0);
dw5 |= (40 - 1) << GEN6_WM_MAX_THREADS_SHIFT;
- dw5 |= GEN6_WM_DISPATCH_ENABLE;
/* BRW_NEW_FRAGMENT_PROGRAM */
if (fp->isGLSL)
@@ -151,6 +150,11 @@ upload_wm_state(struct brw_context *brw)
if (fp->program.UsesKill || ctx->Color.AlphaEnabled)
dw5 |= GEN6_WM_KILL_ENABLE;
+ if (brw_color_buffer_write_enabled(brw) ||
+ dw5 & (GEN6_WM_KILL_ENABLE | GEN6_WM_COMPUTED_DEPTH)) {
+ dw5 |= GEN6_WM_DISPATCH_ENABLE;
+ }
+
dw6 |= GEN6_WM_PERSPECTIVE_PIXEL_BARYCENTRIC;
dw6 |= brw_count_bits(brw->fragment_program->Base.InputsRead) <<
@@ -167,13 +171,11 @@ upload_wm_state(struct brw_context *brw)
OUT_BATCH(0); /* kernel 1 pointer */
OUT_BATCH(0); /* kernel 2 pointer */
ADVANCE_BATCH();
-
- intel_batchbuffer_emit_mi_flush(intel->batch);
}
const struct brw_tracked_state gen6_wm_state = {
.dirty = {
- .mesa = (_NEW_LINE | _NEW_POLYGONSTIPPLE | _NEW_COLOR |
+ .mesa = (_NEW_LINE | _NEW_POLYGONSTIPPLE | _NEW_COLOR | _NEW_BUFFERS |
_NEW_PROGRAM_CONSTANTS),
.brw = (BRW_NEW_CURBE_OFFSETS |
BRW_NEW_FRAGMENT_PROGRAM |
diff --git a/src/mesa/drivers/dri/intel/intel_blit.c b/src/mesa/drivers/dri/intel/intel_blit.c
index 2c85ad3c36f..a74e21720fb 100644
--- a/src/mesa/drivers/dri/intel/intel_blit.c
+++ b/src/mesa/drivers/dri/intel/intel_blit.c
@@ -210,7 +210,7 @@ intelEmitCopyBlit(struct intel_context *intel,
* \param mask bitmask of BUFFER_BIT_* values indicating buffers to clear
*/
void
-intelClearWithBlit(GLcontext *ctx, GLbitfield mask)
+intelClearWithBlit(struct gl_context *ctx, GLbitfield mask)
{
struct intel_context *intel = intel_context(ctx);
struct gl_framebuffer *fb = ctx->DrawBuffer;
diff --git a/src/mesa/drivers/dri/intel/intel_blit.h b/src/mesa/drivers/dri/intel/intel_blit.h
index 70d277df3cd..01631465735 100644
--- a/src/mesa/drivers/dri/intel/intel_blit.h
+++ b/src/mesa/drivers/dri/intel/intel_blit.h
@@ -33,7 +33,7 @@
extern void intelCopyBuffer(const __DRIdrawable * dpriv,
const drm_clip_rect_t * rect);
-extern void intelClearWithBlit(GLcontext * ctx, GLbitfield mask);
+extern void intelClearWithBlit(struct gl_context * ctx, GLbitfield mask);
GLboolean
intelEmitCopyBlit(struct intel_context *intel,
diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
index 117d4daf3ba..87da60a771e 100644
--- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
@@ -40,7 +40,7 @@
#include "intel_regions.h"
static GLboolean
-intel_bufferobj_unmap(GLcontext * ctx,
+intel_bufferobj_unmap(struct gl_context * ctx,
GLenum target, struct gl_buffer_object *obj);
/** Allocates a new drm_intel_bo to store the data for the buffer object. */
@@ -59,7 +59,7 @@ intel_bufferobj_alloc_buffer(struct intel_context *intel,
* internal structure where somehow shared.
*/
static struct gl_buffer_object *
-intel_bufferobj_alloc(GLcontext * ctx, GLuint name, GLenum target)
+intel_bufferobj_alloc(struct gl_context * ctx, GLuint name, GLenum target)
{
struct intel_buffer_object *obj = CALLOC_STRUCT(intel_buffer_object);
@@ -101,7 +101,7 @@ intel_bufferobj_cow(struct intel_context *intel,
* Called via glDeleteBuffersARB().
*/
static void
-intel_bufferobj_free(GLcontext * ctx, struct gl_buffer_object *obj)
+intel_bufferobj_free(struct gl_context * ctx, struct gl_buffer_object *obj)
{
struct intel_context *intel = intel_context(ctx);
struct intel_buffer_object *intel_obj = intel_buffer_object(obj);
@@ -136,7 +136,7 @@ intel_bufferobj_free(GLcontext * ctx, struct gl_buffer_object *obj)
* \return GL_TRUE for success, GL_FALSE if out of memory
*/
static GLboolean
-intel_bufferobj_data(GLcontext * ctx,
+intel_bufferobj_data(struct gl_context * ctx,
GLenum target,
GLsizeiptrARB size,
const GLvoid * data,
@@ -193,7 +193,7 @@ intel_bufferobj_data(GLcontext * ctx,
* Called via glBufferSubDataARB().
*/
static void
-intel_bufferobj_subdata(GLcontext * ctx,
+intel_bufferobj_subdata(struct gl_context * ctx,
GLenum target,
GLintptrARB offset,
GLsizeiptrARB size,
@@ -214,21 +214,28 @@ intel_bufferobj_subdata(GLcontext * ctx,
memcpy((char *)intel_obj->sys_buffer + offset, data, size);
else {
/* Flush any existing batchbuffer that might reference this data. */
- if (drm_intel_bo_busy(intel_obj->buffer) ||
- drm_intel_bo_references(intel->batch->buf, intel_obj->buffer)) {
- drm_intel_bo *temp_bo;
+ if (intel->gen < 6) {
+ if (drm_intel_bo_busy(intel_obj->buffer) ||
+ drm_intel_bo_references(intel->batch->buf, intel_obj->buffer)) {
+ drm_intel_bo *temp_bo;
- temp_bo = drm_intel_bo_alloc(intel->bufmgr, "subdata temp", size, 64);
+ temp_bo = drm_intel_bo_alloc(intel->bufmgr, "subdata temp", size, 64);
- drm_intel_bo_subdata(temp_bo, 0, size, data);
+ drm_intel_bo_subdata(temp_bo, 0, size, data);
- intel_emit_linear_blit(intel,
- intel_obj->buffer, offset,
- temp_bo, 0,
- size);
+ intel_emit_linear_blit(intel,
+ intel_obj->buffer, offset,
+ temp_bo, 0,
+ size);
- drm_intel_bo_unreference(temp_bo);
+ drm_intel_bo_unreference(temp_bo);
+ } else {
+ drm_intel_bo_subdata(intel_obj->buffer, offset, size, data);
+ }
} else {
+ if (drm_intel_bo_references(intel->batch->buf, intel_obj->buffer)) {
+ intel_batchbuffer_flush(intel->batch);
+ }
drm_intel_bo_subdata(intel_obj->buffer, offset, size, data);
}
}
@@ -239,7 +246,7 @@ intel_bufferobj_subdata(GLcontext * ctx,
* Called via glGetBufferSubDataARB().
*/
static void
-intel_bufferobj_get_subdata(GLcontext * ctx,
+intel_bufferobj_get_subdata(struct gl_context * ctx,
GLenum target,
GLintptrARB offset,
GLsizeiptrARB size,
@@ -260,7 +267,7 @@ intel_bufferobj_get_subdata(GLcontext * ctx,
* Called via glMapBufferARB().
*/
static void *
-intel_bufferobj_map(GLcontext * ctx,
+intel_bufferobj_map(struct gl_context * ctx,
GLenum target,
GLenum access, struct gl_buffer_object *obj)
{
@@ -322,7 +329,7 @@ intel_bufferobj_map(GLcontext * ctx,
* and blit it into the real BO at unmap time.
*/
static void *
-intel_bufferobj_map_range(GLcontext * ctx,
+intel_bufferobj_map_range(struct gl_context * ctx,
GLenum target, GLintptr offset, GLsizeiptr length,
GLbitfield access, struct gl_buffer_object *obj)
{
@@ -415,7 +422,7 @@ intel_bufferobj_map_range(GLcontext * ctx,
* would defeat the point.
*/
static void
-intel_bufferobj_flush_mapped_range(GLcontext *ctx, GLenum target,
+intel_bufferobj_flush_mapped_range(struct gl_context *ctx, GLenum target,
GLintptr offset, GLsizeiptr length,
struct gl_buffer_object *obj)
{
@@ -449,7 +456,7 @@ intel_bufferobj_flush_mapped_range(GLcontext *ctx, GLenum target,
* Called via glUnmapBuffer().
*/
static GLboolean
-intel_bufferobj_unmap(GLcontext * ctx,
+intel_bufferobj_unmap(struct gl_context * ctx,
GLenum target, struct gl_buffer_object *obj)
{
struct intel_context *intel = intel_context(ctx);
@@ -537,7 +544,7 @@ intel_bufferobj_buffer(struct intel_context *intel,
}
static void
-intel_bufferobj_copy_subdata(GLcontext *ctx,
+intel_bufferobj_copy_subdata(struct gl_context *ctx,
struct gl_buffer_object *src,
struct gl_buffer_object *dst,
GLintptr read_offset, GLintptr write_offset,
@@ -552,7 +559,7 @@ intel_bufferobj_copy_subdata(GLcontext *ctx,
return;
/* If we're in system memory, just map and memcpy. */
- if (intel_src->sys_buffer || intel_dst->sys_buffer) {
+ if (intel_src->sys_buffer || intel_dst->sys_buffer || intel->gen >= 6) {
/* The same buffer may be used, but note that regions copied may
* not overlap.
*/
@@ -575,6 +582,7 @@ intel_bufferobj_copy_subdata(GLcontext *ctx,
intel_bufferobj_unmap(ctx, GL_COPY_READ_BUFFER, src);
intel_bufferobj_unmap(ctx, GL_COPY_WRITE_BUFFER, dst);
}
+ return;
}
/* Otherwise, we have real BOs, so blit them. */
@@ -596,7 +604,7 @@ intel_bufferobj_copy_subdata(GLcontext *ctx,
#if FEATURE_APPLE_object_purgeable
static GLenum
-intel_buffer_purgeable(GLcontext * ctx,
+intel_buffer_purgeable(struct gl_context * ctx,
drm_intel_bo *buffer,
GLenum option)
{
@@ -609,7 +617,7 @@ intel_buffer_purgeable(GLcontext * ctx,
}
static GLenum
-intel_buffer_object_purgeable(GLcontext * ctx,
+intel_buffer_object_purgeable(struct gl_context * ctx,
struct gl_buffer_object *obj,
GLenum option)
{
@@ -636,7 +644,7 @@ intel_buffer_object_purgeable(GLcontext * ctx,
}
static GLenum
-intel_texture_object_purgeable(GLcontext * ctx,
+intel_texture_object_purgeable(struct gl_context * ctx,
struct gl_texture_object *obj,
GLenum option)
{
@@ -650,7 +658,7 @@ intel_texture_object_purgeable(GLcontext * ctx,
}
static GLenum
-intel_render_object_purgeable(GLcontext * ctx,
+intel_render_object_purgeable(struct gl_context * ctx,
struct gl_renderbuffer *obj,
GLenum option)
{
@@ -664,7 +672,7 @@ intel_render_object_purgeable(GLcontext * ctx,
}
static GLenum
-intel_buffer_unpurgeable(GLcontext * ctx,
+intel_buffer_unpurgeable(struct gl_context * ctx,
drm_intel_bo *buffer,
GLenum option)
{
@@ -678,7 +686,7 @@ intel_buffer_unpurgeable(GLcontext * ctx,
}
static GLenum
-intel_buffer_object_unpurgeable(GLcontext * ctx,
+intel_buffer_object_unpurgeable(struct gl_context * ctx,
struct gl_buffer_object *obj,
GLenum option)
{
@@ -686,7 +694,7 @@ intel_buffer_object_unpurgeable(GLcontext * ctx,
}
static GLenum
-intel_texture_object_unpurgeable(GLcontext * ctx,
+intel_texture_object_unpurgeable(struct gl_context * ctx,
struct gl_texture_object *obj,
GLenum option)
{
@@ -700,7 +708,7 @@ intel_texture_object_unpurgeable(GLcontext * ctx,
}
static GLenum
-intel_render_object_unpurgeable(GLcontext * ctx,
+intel_render_object_unpurgeable(struct gl_context * ctx,
struct gl_renderbuffer *obj,
GLenum option)
{
diff --git a/src/mesa/drivers/dri/intel/intel_buffers.c b/src/mesa/drivers/dri/intel/intel_buffers.c
index 1bff344a456..ee551ef60d4 100644
--- a/src/mesa/drivers/dri/intel/intel_buffers.c
+++ b/src/mesa/drivers/dri/intel/intel_buffers.c
@@ -88,7 +88,7 @@ intel_check_front_buffer_rendering(struct intel_context *intel)
* color buffers.
*/
void
-intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb)
+intel_draw_buffer(struct gl_context * ctx, struct gl_framebuffer *fb)
{
struct intel_context *intel = intel_context(ctx);
struct intel_region *colorRegions[MAX_DRAW_BUFFERS], *depthRegion = NULL;
@@ -262,7 +262,7 @@ intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb)
static void
-intelDrawBuffer(GLcontext * ctx, GLenum mode)
+intelDrawBuffer(struct gl_context * ctx, GLenum mode)
{
if ((ctx->DrawBuffer != NULL) && (ctx->DrawBuffer->Name == 0)) {
struct intel_context *const intel = intel_context(ctx);
@@ -285,7 +285,7 @@ intelDrawBuffer(GLcontext * ctx, GLenum mode)
static void
-intelReadBuffer(GLcontext * ctx, GLenum mode)
+intelReadBuffer(struct gl_context * ctx, GLenum mode)
{
if ((ctx->DrawBuffer != NULL) && (ctx->DrawBuffer->Name == 0)) {
struct intel_context *const intel = intel_context(ctx);
diff --git a/src/mesa/drivers/dri/intel/intel_buffers.h b/src/mesa/drivers/dri/intel/intel_buffers.h
index abb86aade60..2d4613b2954 100644
--- a/src/mesa/drivers/dri/intel/intel_buffers.h
+++ b/src/mesa/drivers/dri/intel/intel_buffers.h
@@ -41,7 +41,7 @@ extern struct intel_region *intel_drawbuf_region(struct intel_context *intel);
extern void intel_check_front_buffer_rendering(struct intel_context *intel);
-extern void intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb);
+extern void intel_draw_buffer(struct gl_context * ctx, struct gl_framebuffer *fb);
extern void intelInitBufferFuncs(struct dd_function_table *functions);
@@ -50,7 +50,7 @@ void intel_get_cliprects(struct intel_context *intel,
unsigned int *num_cliprects,
int *x_off, int *y_off);
#ifdef I915
-void intelCalcViewport(GLcontext * ctx);
+void intelCalcViewport(struct gl_context * ctx);
#endif
#endif /* INTEL_BUFFERS_H */
diff --git a/src/mesa/drivers/dri/intel/intel_clear.c b/src/mesa/drivers/dri/intel/intel_clear.c
index 3c221188660..d7814635b72 100644
--- a/src/mesa/drivers/dri/intel/intel_clear.c
+++ b/src/mesa/drivers/dri/intel/intel_clear.c
@@ -62,7 +62,7 @@ static const char *buffer_names[] = {
* Called by ctx->Driver.Clear.
*/
static void
-intelClear(GLcontext *ctx, GLbitfield mask)
+intelClear(struct gl_context *ctx, GLbitfield mask)
{
struct intel_context *intel = intel_context(ctx);
const GLuint colorMask = *((GLuint *) & ctx->Color.ColorMask[0]);
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 039ac6d4c12..7ace50bde97 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -67,7 +67,7 @@ int INTEL_DEBUG = (0);
static const GLubyte *
-intelGetString(GLcontext * ctx, GLenum name)
+intelGetString(struct gl_context * ctx, GLenum name)
{
const struct intel_context *const intel = intel_context(ctx);
const char *chipset;
@@ -190,7 +190,7 @@ intelGetString(GLcontext * ctx, GLenum name)
}
static void
-intel_flush_front(GLcontext *ctx)
+intel_flush_front(struct gl_context *ctx)
{
struct intel_context *intel = intel_context(ctx);
__DRIcontext *driContext = intel->driContext;
@@ -478,7 +478,7 @@ intel_prepare_render(struct intel_context *intel)
}
static void
-intel_viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
+intel_viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
{
struct intel_context *intel = intel_context(ctx);
__DRIcontext *driContext = intel->driContext;
@@ -527,7 +527,7 @@ static const struct dri_debug_control debug_control[] = {
static void
-intelInvalidateState(GLcontext * ctx, GLuint new_state)
+intelInvalidateState(struct gl_context * ctx, GLuint new_state)
{
struct intel_context *intel = intel_context(ctx);
@@ -544,7 +544,7 @@ intelInvalidateState(GLcontext * ctx, GLuint new_state)
}
void
-intel_flush(GLcontext *ctx)
+intel_flush(struct gl_context *ctx)
{
struct intel_context *intel = intel_context(ctx);
@@ -559,7 +559,7 @@ intel_flush(GLcontext *ctx)
}
static void
-intel_glFlush(GLcontext *ctx)
+intel_glFlush(struct gl_context *ctx)
{
struct intel_context *intel = intel_context(ctx);
@@ -569,7 +569,7 @@ intel_glFlush(GLcontext *ctx)
}
void
-intelFinish(GLcontext * ctx)
+intelFinish(struct gl_context * ctx)
{
struct gl_framebuffer *fb = ctx->DrawBuffer;
int i;
@@ -616,17 +616,17 @@ intelInitDriverFunctions(struct dd_function_table *functions)
GLboolean
intelInitContext(struct intel_context *intel,
int api,
- const __GLcontextModes * mesaVis,
+ const struct gl_config * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate,
struct dd_function_table *functions)
{
- GLcontext *ctx = &intel->ctx;
- GLcontext *shareCtx = (GLcontext *) sharedContextPrivate;
+ struct gl_context *ctx = &intel->ctx;
+ struct gl_context *shareCtx = (struct gl_context *) sharedContextPrivate;
__DRIscreen *sPriv = driContextPriv->driScreenPriv;
struct intel_screen *intelScreen = sPriv->private;
int bo_reuse_mode;
- __GLcontextModes visual;
+ struct gl_config visual;
/* we can't do anything without a connection to the device */
if (intelScreen->bufmgr == NULL)
@@ -737,7 +737,7 @@ intelInitContext(struct intel_context *intel,
ctx->Const.MaxSamples = 1.0;
/* reinitialize the context point state.
- * It depend on constants in __GLcontextRec::Const
+ * It depend on constants in __struct gl_contextRec::Const
*/
_mesa_init_point(ctx);
diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h
index 28d53284fdf..46d10d74ba3 100644
--- a/src/mesa/drivers/dri/intel/intel_context.h
+++ b/src/mesa/drivers/dri/intel/intel_context.h
@@ -106,11 +106,11 @@ struct intel_sync_object {
};
/**
- * intel_context is derived from Mesa's context class: GLcontext.
+ * intel_context is derived from Mesa's context class: struct gl_context.
*/
struct intel_context
{
- GLcontext ctx; /**< base class, must be first field */
+ struct gl_context ctx; /**< base class, must be first field */
struct
{
@@ -256,7 +256,7 @@ struct intel_context
__DRIcontext *driContext;
struct intel_screen *intelScreen;
- void (*saved_viewport)(GLcontext * ctx,
+ void (*saved_viewport)(struct gl_context * ctx,
GLint x, GLint y, GLsizei width, GLsizei height);
/**
@@ -383,13 +383,13 @@ extern int INTEL_DEBUG;
extern GLboolean intelInitContext(struct intel_context *intel,
int api,
- const __GLcontextModes * mesaVis,
+ const struct gl_config * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate,
struct dd_function_table *functions);
-extern void intelFinish(GLcontext * ctx);
-extern void intel_flush(GLcontext * ctx);
+extern void intelFinish(struct gl_context * ctx);
+extern void intel_flush(struct gl_context * ctx);
extern void intelInitDriverFunctions(struct dd_function_table *functions);
@@ -476,7 +476,7 @@ void i915_set_buf_info_for_region(uint32_t *state, struct intel_region *region,
* These are better-typed than the macros used previously:
*/
static INLINE struct intel_context *
-intel_context(GLcontext * ctx)
+intel_context(struct gl_context * ctx)
{
return (struct intel_context *) ctx;
}
diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c
index 1a32026eb5a..556a4195bdd 100644
--- a/src/mesa/drivers/dri/intel/intel_extensions.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions.c
@@ -55,6 +55,7 @@
#define need_GL_EXT_point_parameters
#define need_GL_EXT_provoking_vertex
#define need_GL_EXT_secondary_color
+#define need_GL_EXT_separate_shader_objects
#define need_GL_EXT_stencil_two_side
#define need_GL_EXT_timer_query
#define need_GL_APPLE_vertex_array_object
@@ -114,6 +115,7 @@ static const struct dri_extension card_extensions[] = {
{ "GL_EXT_packed_depth_stencil", NULL },
{ "GL_EXT_provoking_vertex", GL_EXT_provoking_vertex_functions },
{ "GL_EXT_secondary_color", GL_EXT_secondary_color_functions },
+ { "GL_EXT_separate_shader_objects", GL_EXT_separate_shader_objects_functions },
{ "GL_EXT_stencil_wrap", NULL },
{ "GL_EXT_texture_edge_clamp", NULL },
{ "GL_EXT_texture_env_combine", NULL },
@@ -197,18 +199,35 @@ static const struct dri_extension fragment_shader_extensions[] = {
};
/**
+ * \brief Get GLSL version from the environment.
+ *
+ * If the environment variable INTEL_GLSL_VERSION is set, convert its value
+ * to an integer and return it. Otherwise, return the default version, 120.
+ */
+static GLuint
+get_glsl_version()
+{
+ const char * s = getenv("INTEL_GLSL_VERSION");
+ if (s == NULL)
+ return 120;
+ else
+ return (GLuint) atoi(s);
+}
+
+/**
* Initializes potential list of extensions if ctx == NULL, or actually enables
* extensions for a context.
*/
void
-intelInitExtensions(GLcontext *ctx)
+intelInitExtensions(struct gl_context *ctx)
{
struct intel_context *intel = intel_context(ctx);
driInitExtensions(ctx, card_extensions, GL_FALSE);
_mesa_map_function_array(GL_VERSION_2_1_functions);
- ctx->Const.GLSLVersion = 120;
+
+ ctx->Const.GLSLVersion = get_glsl_version();
if (intel->gen >= 5)
driInitExtensions(ctx, ironlake_extensions, GL_FALSE);
diff --git a/src/mesa/drivers/dri/intel/intel_extensions.h b/src/mesa/drivers/dri/intel/intel_extensions.h
index 236442a4d66..fb2a846d39f 100644
--- a/src/mesa/drivers/dri/intel/intel_extensions.h
+++ b/src/mesa/drivers/dri/intel/intel_extensions.h
@@ -30,10 +30,10 @@
extern void
-intelInitExtensions(GLcontext *ctx);
+intelInitExtensions(struct gl_context *ctx);
extern void
-intelInitExtensionsES2(GLcontext *ctx);
+intelInitExtensionsES2(struct gl_context *ctx);
#endif
diff --git a/src/mesa/drivers/dri/intel/intel_extensions_es2.c b/src/mesa/drivers/dri/intel/intel_extensions_es2.c
index ed5db20e38a..71c86339c72 100644
--- a/src/mesa/drivers/dri/intel/intel_extensions_es2.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions_es2.c
@@ -83,7 +83,7 @@ static const char *es2_extensions[] = {
* extensions for a context.
*/
void
-intelInitExtensionsES2(GLcontext *ctx)
+intelInitExtensionsES2(struct gl_context *ctx)
{
int i;
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index a70c83b39da..862a13d2ea5 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -50,7 +50,7 @@
* Create a new framebuffer object.
*/
static struct gl_framebuffer *
-intel_new_framebuffer(GLcontext * ctx, GLuint name)
+intel_new_framebuffer(struct gl_context * ctx, GLuint name)
{
/* Only drawable state in intel_framebuffer at this time, just use Mesa's
* class
@@ -81,7 +81,7 @@ intel_delete_renderbuffer(struct gl_renderbuffer *rb)
* Return a pointer to a specific pixel in a renderbuffer.
*/
static void *
-intel_get_pointer(GLcontext * ctx, struct gl_renderbuffer *rb,
+intel_get_pointer(struct gl_context * ctx, struct gl_renderbuffer *rb,
GLint x, GLint y)
{
/* By returning NULL we force all software rendering to go through
@@ -96,7 +96,7 @@ intel_get_pointer(GLcontext * ctx, struct gl_renderbuffer *rb,
* storage for a user-created renderbuffer.
*/
static GLboolean
-intel_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
+intel_alloc_renderbuffer_storage(struct gl_context * ctx, struct gl_renderbuffer *rb,
GLenum internalFormat,
GLuint width, GLuint height)
{
@@ -216,7 +216,7 @@ intel_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
#if FEATURE_OES_EGL_image
static void
-intel_image_target_renderbuffer_storage(GLcontext *ctx,
+intel_image_target_renderbuffer_storage(struct gl_context *ctx,
struct gl_renderbuffer *rb,
void *image_handle)
{
@@ -252,7 +252,7 @@ intel_image_target_renderbuffer_storage(GLcontext *ctx,
* Not used for user-created renderbuffers!
*/
static GLboolean
-intel_alloc_window_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
+intel_alloc_window_storage(struct gl_context * ctx, struct gl_renderbuffer *rb,
GLenum internalFormat, GLuint width, GLuint height)
{
ASSERT(rb->Name == 0);
@@ -265,7 +265,7 @@ intel_alloc_window_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
static void
-intel_resize_buffers(GLcontext *ctx, struct gl_framebuffer *fb,
+intel_resize_buffers(struct gl_context *ctx, struct gl_framebuffer *fb,
GLuint width, GLuint height)
{
int i;
@@ -293,7 +293,7 @@ intel_resize_buffers(GLcontext *ctx, struct gl_framebuffer *fb,
/** Dummy function for gl_renderbuffer::AllocStorage() */
static GLboolean
-intel_nop_alloc_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
+intel_nop_alloc_storage(struct gl_context * ctx, struct gl_renderbuffer *rb,
GLenum internalFormat, GLuint width, GLuint height)
{
_mesa_problem(ctx, "intel_op_alloc_storage should never be called.");
@@ -396,7 +396,7 @@ intel_create_renderbuffer(gl_format format)
* Typically called via glBindRenderbufferEXT().
*/
static struct gl_renderbuffer *
-intel_new_renderbuffer(GLcontext * ctx, GLuint name)
+intel_new_renderbuffer(struct gl_context * ctx, GLuint name)
{
/*struct intel_context *intel = intel_context(ctx); */
struct intel_renderbuffer *irb;
@@ -424,7 +424,7 @@ intel_new_renderbuffer(GLcontext * ctx, GLuint name)
* Called via glBindFramebufferEXT().
*/
static void
-intel_bind_framebuffer(GLcontext * ctx, GLenum target,
+intel_bind_framebuffer(struct gl_context * ctx, GLenum target,
struct gl_framebuffer *fb, struct gl_framebuffer *fbread)
{
if (target == GL_FRAMEBUFFER_EXT || target == GL_DRAW_FRAMEBUFFER_EXT) {
@@ -440,7 +440,7 @@ intel_bind_framebuffer(GLcontext * ctx, GLenum target,
* Called via glFramebufferRenderbufferEXT().
*/
static void
-intel_framebuffer_renderbuffer(GLcontext * ctx,
+intel_framebuffer_renderbuffer(struct gl_context * ctx,
struct gl_framebuffer *fb,
GLenum attachment, struct gl_renderbuffer *rb)
{
@@ -454,7 +454,7 @@ intel_framebuffer_renderbuffer(GLcontext * ctx,
static GLboolean
-intel_update_wrapper(GLcontext *ctx, struct intel_renderbuffer *irb,
+intel_update_wrapper(struct gl_context *ctx, struct intel_renderbuffer *irb,
struct gl_texture_image *texImage)
{
if (texImage->TexFormat == MESA_FORMAT_ARGB8888) {
@@ -535,7 +535,7 @@ intel_update_wrapper(GLcontext *ctx, struct intel_renderbuffer *irb,
* This will have the region info needed for hardware rendering.
*/
static struct intel_renderbuffer *
-intel_wrap_texture(GLcontext * ctx, struct gl_texture_image *texImage)
+intel_wrap_texture(struct gl_context * ctx, struct gl_texture_image *texImage)
{
const GLuint name = ~0; /* not significant, but distinct for debugging */
struct intel_renderbuffer *irb;
@@ -566,7 +566,7 @@ intel_wrap_texture(GLcontext * ctx, struct gl_texture_image *texImage)
* before intel_finish_render_texture() is ever called.
*/
static void
-intel_render_texture(GLcontext * ctx,
+intel_render_texture(struct gl_context * ctx,
struct gl_framebuffer *fb,
struct gl_renderbuffer_attachment *att)
{
@@ -642,7 +642,7 @@ intel_render_texture(GLcontext * ctx,
* Called by Mesa when rendering to a texture is done.
*/
static void
-intel_finish_render_texture(GLcontext * ctx,
+intel_finish_render_texture(struct gl_context * ctx,
struct gl_renderbuffer_attachment *att)
{
struct intel_context *intel = intel_context(ctx);
@@ -669,7 +669,7 @@ intel_finish_render_texture(GLcontext * ctx,
* Do additional "completeness" testing of a framebuffer object.
*/
static void
-intel_validate_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb)
+intel_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
{
const struct intel_renderbuffer *depthRb =
intel_get_renderbuffer(fb, BUFFER_DEPTH);
diff --git a/src/mesa/drivers/dri/intel/intel_pixel.c b/src/mesa/drivers/dri/intel/intel_pixel.c
index cb088e40329..60583ef4c0d 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel.c
@@ -55,7 +55,7 @@ effective_func(GLenum func, GLboolean src_alpha_is_one)
* glDraw/CopyPixels.
*/
GLboolean
-intel_check_blit_fragment_ops(GLcontext * ctx, GLboolean src_alpha_is_one)
+intel_check_blit_fragment_ops(struct gl_context * ctx, GLboolean src_alpha_is_one)
{
if (ctx->NewState)
_mesa_update_state(ctx);
diff --git a/src/mesa/drivers/dri/intel/intel_pixel.h b/src/mesa/drivers/dri/intel/intel_pixel.h
index 743b6497c52..aef0e609da6 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel.h
+++ b/src/mesa/drivers/dri/intel/intel_pixel.h
@@ -31,21 +31,21 @@
#include "main/mtypes.h"
void intelInitPixelFuncs(struct dd_function_table *functions);
-GLboolean intel_check_blit_fragment_ops(GLcontext * ctx,
+GLboolean intel_check_blit_fragment_ops(struct gl_context * ctx,
GLboolean src_alpha_is_one);
GLboolean intel_check_blit_format(struct intel_region *region,
GLenum format, GLenum type);
-void intelReadPixels(GLcontext * ctx,
+void intelReadPixels(struct gl_context * ctx,
GLint x, GLint y,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *pack,
GLvoid * pixels);
-void intelDrawPixels(GLcontext * ctx,
+void intelDrawPixels(struct gl_context * ctx,
GLint x, GLint y,
GLsizei width, GLsizei height,
GLenum format,
@@ -53,12 +53,12 @@ void intelDrawPixels(GLcontext * ctx,
const struct gl_pixelstore_attrib *unpack,
const GLvoid * pixels);
-void intelCopyPixels(GLcontext * ctx,
+void intelCopyPixels(struct gl_context * ctx,
GLint srcx, GLint srcy,
GLsizei width, GLsizei height,
GLint destx, GLint desty, GLenum type);
-void intelBitmap(GLcontext * ctx,
+void intelBitmap(struct gl_context * ctx,
GLint x, GLint y,
GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack,
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
index 23410f063c4..63fb4b37b18 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
@@ -58,7 +58,7 @@
* PBO bitmaps. I think they are probably pretty rare though - I
* wonder if Xgl uses them?
*/
-static const GLubyte *map_pbo( GLcontext *ctx,
+static const GLubyte *map_pbo( struct gl_context *ctx,
GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack,
const GLubyte *bitmap )
@@ -167,7 +167,7 @@ y_flip(struct gl_framebuffer *fb, int y, int height)
* Render a bitmap.
*/
static GLboolean
-do_blit_bitmap( GLcontext *ctx,
+do_blit_bitmap( struct gl_context *ctx,
GLint dstx, GLint dsty,
GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack,
@@ -320,7 +320,7 @@ out:
* - Chop bitmap up into 32x32 squares and render w/polygon stipple.
*/
void
-intelBitmap(GLcontext * ctx,
+intelBitmap(struct gl_context * ctx,
GLint x, GLint y,
GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack,
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_copy.c b/src/mesa/drivers/dri/intel/intel_pixel_copy.c
index 2008a4c2bec..c6b36ed4291 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_copy.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_copy.c
@@ -76,7 +76,7 @@ copypix_src_region(struct intel_context *intel, GLenum type)
* we allow Scissor.
*/
static GLboolean
-intel_check_copypixel_blit_fragment_ops(GLcontext * ctx)
+intel_check_copypixel_blit_fragment_ops(struct gl_context * ctx)
{
if (ctx->NewState)
_mesa_update_state(ctx);
@@ -102,7 +102,7 @@ intel_check_copypixel_blit_fragment_ops(GLcontext * ctx)
* CopyPixels with the blitter. Don't support zooming, pixel transfer, etc.
*/
static GLboolean
-do_blit_copypixels(GLcontext * ctx,
+do_blit_copypixels(struct gl_context * ctx,
GLint srcx, GLint srcy,
GLsizei width, GLsizei height,
GLint dstx, GLint dsty, GLenum type)
@@ -198,7 +198,7 @@ out:
void
-intelCopyPixels(GLcontext * ctx,
+intelCopyPixels(struct gl_context * ctx,
GLint srcx, GLint srcy,
GLsizei width, GLsizei height,
GLint destx, GLint desty, GLenum type)
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_draw.c b/src/mesa/drivers/dri/intel/intel_pixel_draw.c
index 470c4b9326b..2ec7ed8e269 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_draw.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_draw.c
@@ -39,7 +39,7 @@
#include "intel_pixel.h"
void
-intelDrawPixels(GLcontext * ctx,
+intelDrawPixels(struct gl_context * ctx,
GLint x, GLint y,
GLsizei width, GLsizei height,
GLenum format,
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_read.c b/src/mesa/drivers/dri/intel/intel_pixel_read.c
index 21d2a7a93e2..b249f9a5a0b 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_read.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_read.c
@@ -65,7 +65,7 @@
*/
static GLboolean
-do_blit_readpixels(GLcontext * ctx,
+do_blit_readpixels(struct gl_context * ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *pack, GLvoid * pixels)
@@ -165,7 +165,7 @@ do_blit_readpixels(GLcontext * ctx,
}
void
-intelReadPixels(GLcontext * ctx,
+intelReadPixels(struct gl_context * ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *pack, GLvoid * pixels)
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index d200dc1f4ac..061f0d278d6 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -339,7 +339,7 @@ intelDestroyScreen(__DRIscreen * sPriv)
static GLboolean
intelCreateBuffer(__DRIscreen * driScrnPriv,
__DRIdrawable * driDrawPriv,
- const __GLcontextModes * mesaVis, GLboolean isPixmap)
+ const struct gl_config * mesaVis, GLboolean isPixmap)
{
struct intel_renderbuffer *rb;
@@ -415,22 +415,22 @@ intelDestroyBuffer(__DRIdrawable * driDrawPriv)
* init-designated function to register chipids and createcontext
* functions.
*/
-extern GLboolean i830CreateContext(const __GLcontextModes * mesaVis,
+extern GLboolean i830CreateContext(const struct gl_config * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate);
extern GLboolean i915CreateContext(int api,
- const __GLcontextModes * mesaVis,
+ const struct gl_config * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate);
extern GLboolean brwCreateContext(int api,
- const __GLcontextModes * mesaVis,
+ const struct gl_config * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate);
static GLboolean
intelCreateContext(gl_api api,
- const __GLcontextModes * mesaVis,
+ const struct gl_config * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate)
{
@@ -488,7 +488,7 @@ intel_init_bufmgr(struct intel_screen *intelScreen)
* This is the driver specific part of the createNewScreen entry point.
* Called when using DRI2.
*
- * \return the __GLcontextModes supported by this driver
+ * \return the struct gl_config supported by this driver
*/
static const
__DRIconfig **intelInitScreen2(__DRIscreen *psp)
diff --git a/src/mesa/drivers/dri/intel/intel_span.c b/src/mesa/drivers/dri/intel/intel_span.c
index c8d55c92a0b..104cadf0f9e 100644
--- a/src/mesa/drivers/dri/intel/intel_span.c
+++ b/src/mesa/drivers/dri/intel/intel_span.c
@@ -246,7 +246,7 @@ intel_map_unmap_framebuffer(struct intel_context *intel,
* Old note: Moved locking out to get reasonable span performance.
*/
void
-intelSpanRenderStart(GLcontext * ctx)
+intelSpanRenderStart(struct gl_context * ctx)
{
struct intel_context *intel = intel_context(ctx);
GLuint i;
@@ -273,7 +273,7 @@ intelSpanRenderStart(GLcontext * ctx)
* the above function.
*/
void
-intelSpanRenderFinish(GLcontext * ctx)
+intelSpanRenderFinish(struct gl_context * ctx)
{
struct intel_context *intel = intel_context(ctx);
GLuint i;
@@ -294,7 +294,7 @@ intelSpanRenderFinish(GLcontext * ctx)
void
-intelInitSpanFuncs(GLcontext * ctx)
+intelInitSpanFuncs(struct gl_context * ctx)
{
struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference(ctx);
swdd->SpanRenderStart = intelSpanRenderStart;
@@ -302,7 +302,7 @@ intelInitSpanFuncs(GLcontext * ctx)
}
void
-intel_map_vertex_shader_textures(GLcontext *ctx)
+intel_map_vertex_shader_textures(struct gl_context *ctx)
{
struct intel_context *intel = intel_context(ctx);
int i;
@@ -321,7 +321,7 @@ intel_map_vertex_shader_textures(GLcontext *ctx)
}
void
-intel_unmap_vertex_shader_textures(GLcontext *ctx)
+intel_unmap_vertex_shader_textures(struct gl_context *ctx)
{
struct intel_context *intel = intel_context(ctx);
int i;
diff --git a/src/mesa/drivers/dri/intel/intel_span.h b/src/mesa/drivers/dri/intel/intel_span.h
index bffe109aa5b..aa8d08e843a 100644
--- a/src/mesa/drivers/dri/intel/intel_span.h
+++ b/src/mesa/drivers/dri/intel/intel_span.h
@@ -28,15 +28,15 @@
#ifndef _INTEL_SPAN_H
#define _INTEL_SPAN_H
-extern void intelInitSpanFuncs(GLcontext * ctx);
+extern void intelInitSpanFuncs(struct gl_context * ctx);
-extern void intelSpanRenderFinish(GLcontext * ctx);
-extern void intelSpanRenderStart(GLcontext * ctx);
+extern void intelSpanRenderFinish(struct gl_context * ctx);
+extern void intelSpanRenderStart(struct gl_context * ctx);
void intel_renderbuffer_map(struct intel_context *intel,
struct gl_renderbuffer *rb);
void intel_renderbuffer_unmap(struct intel_context *intel,
struct gl_renderbuffer *rb);
-void intel_map_vertex_shader_textures(GLcontext *ctx);
-void intel_unmap_vertex_shader_textures(GLcontext *ctx);
+void intel_map_vertex_shader_textures(struct gl_context *ctx);
+void intel_unmap_vertex_shader_textures(struct gl_context *ctx);
#endif
diff --git a/src/mesa/drivers/dri/intel/intel_state.c b/src/mesa/drivers/dri/intel/intel_state.c
index c5ef909dbf1..80598b7ef64 100644
--- a/src/mesa/drivers/dri/intel/intel_state.c
+++ b/src/mesa/drivers/dri/intel/intel_state.c
@@ -197,7 +197,7 @@ intel_translate_logic_op(GLenum opcode)
/* Fallback to swrast for select and feedback.
*/
static void
-intelRenderMode(GLcontext *ctx, GLenum mode)
+intelRenderMode(struct gl_context *ctx, GLenum mode)
{
struct intel_context *intel = intel_context(ctx);
FALLBACK(intel, INTEL_FALLBACK_RENDERMODE, (mode != GL_RENDER));
diff --git a/src/mesa/drivers/dri/intel/intel_syncobj.c b/src/mesa/drivers/dri/intel/intel_syncobj.c
index c2d86432ff9..bbfac74b605 100644
--- a/src/mesa/drivers/dri/intel/intel_syncobj.c
+++ b/src/mesa/drivers/dri/intel/intel_syncobj.c
@@ -46,7 +46,7 @@
#include "intel_reg.h"
static struct gl_sync_object *
-intel_new_sync_object(GLcontext *ctx, GLuint id)
+intel_new_sync_object(struct gl_context *ctx, GLuint id)
{
struct intel_sync_object *sync;
@@ -56,7 +56,7 @@ intel_new_sync_object(GLcontext *ctx, GLuint id)
}
static void
-intel_delete_sync_object(GLcontext *ctx, struct gl_sync_object *s)
+intel_delete_sync_object(struct gl_context *ctx, struct gl_sync_object *s)
{
struct intel_sync_object *sync = (struct intel_sync_object *)s;
@@ -65,7 +65,7 @@ intel_delete_sync_object(GLcontext *ctx, struct gl_sync_object *s)
}
static void
-intel_fence_sync(GLcontext *ctx, struct gl_sync_object *s,
+intel_fence_sync(struct gl_context *ctx, struct gl_sync_object *s,
GLenum condition, GLbitfield flags)
{
struct intel_context *intel = intel_context(ctx);
@@ -87,7 +87,7 @@ intel_fence_sync(GLcontext *ctx, struct gl_sync_object *s,
* The fix would be a new kernel function to do the GTT transition with a
* timeout.
*/
-static void intel_client_wait_sync(GLcontext *ctx, struct gl_sync_object *s,
+static void intel_client_wait_sync(struct gl_context *ctx, struct gl_sync_object *s,
GLbitfield flags, GLuint64 timeout)
{
struct intel_sync_object *sync = (struct intel_sync_object *)s;
@@ -105,12 +105,12 @@ static void intel_client_wait_sync(GLcontext *ctx, struct gl_sync_object *s,
* any batchbuffers coming after this waitsync will naturally not occur until
* the previous one is done.
*/
-static void intel_server_wait_sync(GLcontext *ctx, struct gl_sync_object *s,
+static void intel_server_wait_sync(struct gl_context *ctx, struct gl_sync_object *s,
GLbitfield flags, GLuint64 timeout)
{
}
-static void intel_check_sync(GLcontext *ctx, struct gl_sync_object *s)
+static void intel_check_sync(struct gl_context *ctx, struct gl_sync_object *s)
{
struct intel_sync_object *sync = (struct intel_sync_object *)s;
diff --git a/src/mesa/drivers/dri/intel/intel_tex.c b/src/mesa/drivers/dri/intel/intel_tex.c
index e2bff0878a5..3d9a2549db0 100644
--- a/src/mesa/drivers/dri/intel/intel_tex.c
+++ b/src/mesa/drivers/dri/intel/intel_tex.c
@@ -10,7 +10,7 @@
#define FILE_DEBUG_FLAG DEBUG_TEXTURE
static struct gl_texture_image *
-intelNewTextureImage(GLcontext * ctx)
+intelNewTextureImage(struct gl_context * ctx)
{
DBG("%s\n", __FUNCTION__);
(void) ctx;
@@ -19,7 +19,7 @@ intelNewTextureImage(GLcontext * ctx)
static struct gl_texture_object *
-intelNewTextureObject(GLcontext * ctx, GLuint name, GLenum target)
+intelNewTextureObject(struct gl_context * ctx, GLuint name, GLenum target)
{
struct intel_texture_object *obj = CALLOC_STRUCT(intel_texture_object);
@@ -30,7 +30,7 @@ intelNewTextureObject(GLcontext * ctx, GLuint name, GLenum target)
}
static void
-intelDeleteTextureObject(GLcontext *ctx,
+intelDeleteTextureObject(struct gl_context *ctx,
struct gl_texture_object *texObj)
{
struct intel_context *intel = intel_context(ctx);
@@ -44,7 +44,7 @@ intelDeleteTextureObject(GLcontext *ctx,
static void
-intelFreeTextureImageData(GLcontext * ctx, struct gl_texture_image *texImage)
+intelFreeTextureImageData(struct gl_context * ctx, struct gl_texture_image *texImage)
{
struct intel_context *intel = intel_context(ctx);
struct intel_texture_image *intelImage = intel_texture_image(texImage);
@@ -150,7 +150,7 @@ timed_memcpy(void *dest, const void *src, size_t n)
* map/unmap the base level texture image.
*/
static void
-intelGenerateMipmap(GLcontext *ctx, GLenum target,
+intelGenerateMipmap(struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj)
{
if (_mesa_meta_check_generate_mipmap_fallback(ctx, target, texObj)) {
diff --git a/src/mesa/drivers/dri/intel/intel_tex.h b/src/mesa/drivers/dri/intel/intel_tex.h
index cd77dd5b8e4..7906554e453 100644
--- a/src/mesa/drivers/dri/intel/intel_tex.h
+++ b/src/mesa/drivers/dri/intel/intel_tex.h
@@ -40,7 +40,7 @@ void intelInitTextureSubImageFuncs(struct dd_function_table *functions);
void intelInitTextureCopyImageFuncs(struct dd_function_table *functions);
-gl_format intelChooseTextureFormat(GLcontext *ctx, GLint internalFormat,
+gl_format intelChooseTextureFormat(struct gl_context *ctx, GLint internalFormat,
GLenum format, GLenum type);
void intelSetTexBuffer(__DRIcontext *pDRICtx,
diff --git a/src/mesa/drivers/dri/intel/intel_tex_copy.c b/src/mesa/drivers/dri/intel/intel_tex_copy.c
index 6efb2ddc553..2d046fd52d9 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_copy.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_copy.c
@@ -72,6 +72,7 @@ get_teximage_source(struct intel_context *intel, GLenum internalFormat)
if (irb && irb->region && irb->region->cpp == 4)
return irb->region;
return NULL;
+ case 4:
case GL_RGBA:
case GL_RGBA8:
irb = intel_renderbuffer(intel->ctx.ReadBuffer->_ColorReadBuffer);
@@ -82,6 +83,7 @@ get_teximage_source(struct intel_context *intel, GLenum internalFormat)
if (irb->Base._BaseFormat == GL_RGB)
return NULL;
return irb->region;
+ case 3:
case GL_RGB:
case GL_RGB8:
return intel_readbuf_region(intel);
@@ -99,7 +101,7 @@ do_copy_texsubimage(struct intel_context *intel,
GLint dstx, GLint dsty,
GLint x, GLint y, GLsizei width, GLsizei height)
{
- GLcontext *ctx = &intel->ctx;
+ struct gl_context *ctx = &intel->ctx;
const struct intel_region *src = get_teximage_source(intel, internalFormat);
if (!intelImage->mt || !src || !src->buffer) {
@@ -170,7 +172,7 @@ do_copy_texsubimage(struct intel_context *intel,
static void
-intelCopyTexImage1D(GLcontext * ctx, GLenum target, GLint level,
+intelCopyTexImage1D(struct gl_context * ctx, GLenum target, GLint level,
GLenum internalFormat,
GLint x, GLint y, GLsizei width, GLint border)
{
@@ -218,7 +220,7 @@ intelCopyTexImage1D(GLcontext * ctx, GLenum target, GLint level,
static void
-intelCopyTexImage2D(GLcontext * ctx, GLenum target, GLint level,
+intelCopyTexImage2D(struct gl_context * ctx, GLenum target, GLint level,
GLenum internalFormat,
GLint x, GLint y, GLsizei width, GLsizei height,
GLint border)
@@ -267,7 +269,7 @@ intelCopyTexImage2D(GLcontext * ctx, GLenum target, GLint level,
static void
-intelCopyTexSubImage1D(GLcontext * ctx, GLenum target, GLint level,
+intelCopyTexSubImage1D(struct gl_context * ctx, GLenum target, GLint level,
GLint xoffset, GLint x, GLint y, GLsizei width)
{
struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
@@ -293,7 +295,7 @@ intelCopyTexSubImage1D(GLcontext * ctx, GLenum target, GLint level,
static void
-intelCopyTexSubImage2D(GLcontext * ctx, GLenum target, GLint level,
+intelCopyTexSubImage2D(struct gl_context * ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLint x, GLint y, GLsizei width, GLsizei height)
{
diff --git a/src/mesa/drivers/dri/intel/intel_tex_format.c b/src/mesa/drivers/dri/intel/intel_tex_format.c
index 97b26efcb7c..9d73a2fb375 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_format.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_format.c
@@ -15,7 +15,7 @@
* immediately after sampling...
*/
gl_format
-intelChooseTextureFormat(GLcontext * ctx, GLint internalFormat,
+intelChooseTextureFormat(struct gl_context * ctx, GLint internalFormat,
GLenum format, GLenum type)
{
struct intel_context *intel = intel_context(ctx);
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index 187e537aacb..35f3d7d3829 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -300,7 +300,7 @@ try_pbo_zcopy(struct intel_context *intel,
static void
-intelTexImage(GLcontext * ctx,
+intelTexImage(struct gl_context * ctx,
GLint dims,
GLenum target, GLint level,
GLint internalFormat,
@@ -539,7 +539,7 @@ intelTexImage(GLcontext * ctx,
static void
-intelTexImage3D(GLcontext * ctx,
+intelTexImage3D(struct gl_context * ctx,
GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint depth,
@@ -556,7 +556,7 @@ intelTexImage3D(GLcontext * ctx,
static void
-intelTexImage2D(GLcontext * ctx,
+intelTexImage2D(struct gl_context * ctx,
GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint border,
@@ -572,7 +572,7 @@ intelTexImage2D(GLcontext * ctx,
static void
-intelTexImage1D(GLcontext * ctx,
+intelTexImage1D(struct gl_context * ctx,
GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint border,
@@ -588,7 +588,7 @@ intelTexImage1D(GLcontext * ctx,
static void
-intelCompressedTexImage2D( GLcontext *ctx, GLenum target, GLint level,
+intelCompressedTexImage2D( struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint border,
GLsizei imageSize, const GLvoid *data,
@@ -606,7 +606,7 @@ intelCompressedTexImage2D( GLcontext *ctx, GLenum target, GLint level,
* then unmap it.
*/
static void
-intel_get_tex_image(GLcontext * ctx, GLenum target, GLint level,
+intel_get_tex_image(struct gl_context * ctx, GLenum target, GLint level,
GLenum format, GLenum type, GLvoid * pixels,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage, GLboolean compressed)
@@ -666,7 +666,7 @@ intel_get_tex_image(GLcontext * ctx, GLenum target, GLint level,
static void
-intelGetTexImage(GLcontext * ctx, GLenum target, GLint level,
+intelGetTexImage(struct gl_context * ctx, GLenum target, GLint level,
GLenum format, GLenum type, GLvoid * pixels,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage)
@@ -677,7 +677,7 @@ intelGetTexImage(GLcontext * ctx, GLenum target, GLint level,
static void
-intelGetCompressedTexImage(GLcontext *ctx, GLenum target, GLint level,
+intelGetCompressedTexImage(struct gl_context *ctx, GLenum target, GLint level,
GLvoid *pixels,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage)
@@ -693,7 +693,7 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
{
struct gl_framebuffer *fb = dPriv->driverPrivate;
struct intel_context *intel = pDRICtx->driverPrivate;
- GLcontext *ctx = &intel->ctx;
+ struct gl_context *ctx = &intel->ctx;
struct intel_texture_object *intelObj;
struct intel_texture_image *intelImage;
struct intel_mipmap_tree *mt;
@@ -774,7 +774,7 @@ intelSetTexBuffer(__DRIcontext *pDRICtx, GLint target, __DRIdrawable *dPriv)
#if FEATURE_OES_EGL_image
static void
-intel_image_target_texture_2d(GLcontext *ctx, GLenum target,
+intel_image_target_texture_2d(struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage,
GLeglImageOES image_handle)
diff --git a/src/mesa/drivers/dri/intel/intel_tex_subimage.c b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
index b7ce50a8207..c9b992a21b9 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
@@ -40,7 +40,7 @@
#define FILE_DEBUG_FLAG DEBUG_TEXTURE
static void
-intelTexSubimage(GLcontext * ctx,
+intelTexSubimage(struct gl_context * ctx,
GLint dims,
GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
@@ -189,7 +189,7 @@ intelTexSubimage(GLcontext * ctx,
static void
-intelTexSubImage3D(GLcontext * ctx,
+intelTexSubImage3D(struct gl_context * ctx,
GLenum target,
GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
@@ -209,7 +209,7 @@ intelTexSubImage3D(GLcontext * ctx,
static void
-intelTexSubImage2D(GLcontext * ctx,
+intelTexSubImage2D(struct gl_context * ctx,
GLenum target,
GLint level,
GLint xoffset, GLint yoffset,
@@ -229,7 +229,7 @@ intelTexSubImage2D(GLcontext * ctx,
static void
-intelTexSubImage1D(GLcontext * ctx,
+intelTexSubImage1D(struct gl_context * ctx,
GLenum target,
GLint level,
GLint xoffset,
@@ -248,7 +248,7 @@ intelTexSubImage1D(GLcontext * ctx,
}
static void
-intelCompressedTexSubImage2D(GLcontext * ctx,
+intelCompressedTexSubImage2D(struct gl_context * ctx,
GLenum target,
GLint level,
GLint xoffset, GLint yoffset,
diff --git a/src/mesa/drivers/dri/mach64/mach64_context.c b/src/mesa/drivers/dri/mach64/mach64_context.c
index a20a1c9655b..7c989df5ec0 100644
--- a/src/mesa/drivers/dri/mach64/mach64_context.c
+++ b/src/mesa/drivers/dri/mach64/mach64_context.c
@@ -86,11 +86,11 @@ static const struct dri_extension card_extensions[] =
/* Create the device specific context.
*/
GLboolean mach64CreateContext( gl_api api,
- const __GLcontextModes *glVisual,
+ const struct gl_config *glVisual,
__DRIcontext *driContextPriv,
void *sharedContextPrivate )
{
- GLcontext *ctx, *shareCtx;
+ struct gl_context *ctx, *shareCtx;
__DRIscreen *driScreen = driContextPriv->driScreenPriv;
struct dd_function_table functions;
mach64ContextPtr mmesa;
@@ -334,8 +334,8 @@ mach64MakeCurrent( __DRIcontext *driContextPriv,
}
_mesa_make_current( newMach64Ctx->glCtx,
- (GLframebuffer *) driDrawPriv->driverPrivate,
- (GLframebuffer *) driReadPriv->driverPrivate );
+ (struct gl_framebuffer *) driDrawPriv->driverPrivate,
+ (struct gl_framebuffer *) driReadPriv->driverPrivate );
newMach64Ctx->new_state |= MACH64_NEW_CLIP;
diff --git a/src/mesa/drivers/dri/mach64/mach64_context.h b/src/mesa/drivers/dri/mach64/mach64_context.h
index 893fc8daee9..11e8f53b283 100644
--- a/src/mesa/drivers/dri/mach64/mach64_context.h
+++ b/src/mesa/drivers/dri/mach64/mach64_context.h
@@ -161,7 +161,7 @@ struct mach64_texture_object {
typedef struct mach64_texture_object mach64TexObj, *mach64TexObjPtr;
struct mach64_context {
- GLcontext *glCtx;
+ struct gl_context *glCtx;
/* Driver and hardware state management
*/
@@ -274,7 +274,7 @@ struct mach64_context {
extern GLboolean mach64CreateContext( gl_api api,
- const __GLcontextModes *glVisual,
+ const struct gl_config *glVisual,
__DRIcontext *driContextPriv,
void *sharedContextPrivate );
diff --git a/src/mesa/drivers/dri/mach64/mach64_dd.c b/src/mesa/drivers/dri/mach64/mach64_dd.c
index ca713e2de5e..9cb2c107597 100644
--- a/src/mesa/drivers/dri/mach64/mach64_dd.c
+++ b/src/mesa/drivers/dri/mach64/mach64_dd.c
@@ -41,7 +41,7 @@
/* Return the current color buffer size.
*/
-static void mach64DDGetBufferSize( GLframebuffer *buffer,
+static void mach64DDGetBufferSize( struct gl_framebuffer *buffer,
GLuint *width, GLuint *height )
{
GET_CURRENT_CONTEXT(ctx);
@@ -55,7 +55,7 @@ static void mach64DDGetBufferSize( GLframebuffer *buffer,
/* Return various strings for glGetString().
*/
-static const GLubyte *mach64DDGetString( GLcontext *ctx, GLenum name )
+static const GLubyte *mach64DDGetString( struct gl_context *ctx, GLenum name )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
static char buffer[128];
@@ -84,7 +84,7 @@ static const GLubyte *mach64DDGetString( GLcontext *ctx, GLenum name )
* hardware. All commands that are normally sent to the ring are
* already considered `flushed'.
*/
-static void mach64DDFlush( GLcontext *ctx )
+static void mach64DDFlush( struct gl_context *ctx )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
@@ -107,7 +107,7 @@ static void mach64DDFlush( GLcontext *ctx )
/* Make sure all commands have been sent to the hardware and have
* completed processing.
*/
-static void mach64DDFinish( GLcontext *ctx )
+static void mach64DDFinish( struct gl_context *ctx )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/mach64/mach64_ioctl.c b/src/mesa/drivers/dri/mach64/mach64_ioctl.c
index 03587c44fda..0146e0d0515 100644
--- a/src/mesa/drivers/dri/mach64/mach64_ioctl.c
+++ b/src/mesa/drivers/dri/mach64/mach64_ioctl.c
@@ -665,7 +665,7 @@ void mach64PerformanceBoxesLocked( mach64ContextPtr mmesa )
* Buffer clear
*/
-static void mach64DDClear( GLcontext *ctx, GLbitfield mask )
+static void mach64DDClear( struct gl_context *ctx, GLbitfield mask )
{
mach64ContextPtr mmesa = MACH64_CONTEXT( ctx );
__DRIdrawable *dPriv = mmesa->driDrawable;
diff --git a/src/mesa/drivers/dri/mach64/mach64_native_vb.c b/src/mesa/drivers/dri/mach64/mach64_native_vb.c
index 816682ec5f1..d8426ddee1c 100644
--- a/src/mesa/drivers/dri/mach64/mach64_native_vb.c
+++ b/src/mesa/drivers/dri/mach64/mach64_native_vb.c
@@ -35,7 +35,7 @@
#define LOCALVARS
#endif
-void TAG(translate_vertex)(GLcontext *ctx,
+void TAG(translate_vertex)(struct gl_context *ctx,
const VERTEX *src,
SWvertex *dst)
{
@@ -108,7 +108,7 @@ void TAG(translate_vertex)(GLcontext *ctx,
-void TAG(print_vertex)( GLcontext *ctx, const VERTEX *v )
+void TAG(print_vertex)( struct gl_context *ctx, const VERTEX *v )
{
LOCALVARS
GLuint format = GET_VERTEX_FORMAT();
@@ -199,7 +199,7 @@ void TAG(print_vertex)( GLcontext *ctx, const VERTEX *v )
#define GET_COLOR(ptr, idx) ((ptr)->data[idx])
-INTERP_QUALIFIER void TAG(interp_extras)( GLcontext *ctx,
+INTERP_QUALIFIER void TAG(interp_extras)( struct gl_context *ctx,
GLfloat t,
GLuint dst, GLuint out, GLuint in,
GLboolean force_boundary )
@@ -230,7 +230,7 @@ INTERP_QUALIFIER void TAG(interp_extras)( GLcontext *ctx,
INTERP_VERTEX(ctx, t, dst, out, in, force_boundary);
}
-INTERP_QUALIFIER void TAG(copy_pv_extras)( GLcontext *ctx,
+INTERP_QUALIFIER void TAG(copy_pv_extras)( struct gl_context *ctx,
GLuint dst, GLuint src )
{
LOCALVARS
diff --git a/src/mesa/drivers/dri/mach64/mach64_native_vbtmp.h b/src/mesa/drivers/dri/mach64/mach64_native_vbtmp.h
index 6e5fa3520e1..8345f5cdbcc 100644
--- a/src/mesa/drivers/dri/mach64/mach64_native_vbtmp.h
+++ b/src/mesa/drivers/dri/mach64/mach64_native_vbtmp.h
@@ -52,7 +52,7 @@
#define LOCALVARS
#endif
-static void TAG(emit)( GLcontext *ctx,
+static void TAG(emit)( struct gl_context *ctx,
GLuint start, GLuint end,
void *dest,
GLuint stride )
@@ -312,7 +312,7 @@ static void TAG(emit)( GLcontext *ctx,
#if DO_XYZW && DO_RGBA
-static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
+static GLboolean TAG(check_tex_sizes)( struct gl_context *ctx )
{
LOCALVARS
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
@@ -344,7 +344,7 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
}
-static void TAG(interp)( GLcontext *ctx,
+static void TAG(interp)( struct gl_context *ctx,
GLfloat t,
GLuint edst, GLuint eout, GLuint ein,
GLboolean force_boundary )
@@ -511,7 +511,7 @@ static void TAG(interp)( GLcontext *ctx,
#endif /* DO_RGBA && DO_XYZW */
-static void TAG(copy_pv)( GLcontext *ctx, GLuint edst, GLuint esrc )
+static void TAG(copy_pv)( struct gl_context *ctx, GLuint edst, GLuint esrc )
{
#if DO_SPEC || DO_FOG || DO_RGBA
LOCALVARS
diff --git a/src/mesa/drivers/dri/mach64/mach64_screen.c b/src/mesa/drivers/dri/mach64/mach64_screen.c
index 239e8bc8fd0..956bccbcd6c 100644
--- a/src/mesa/drivers/dri/mach64/mach64_screen.c
+++ b/src/mesa/drivers/dri/mach64/mach64_screen.c
@@ -71,7 +71,7 @@ mach64FillInModes( __DRIscreen *psp,
unsigned stencil_bits, GLboolean have_back_buffer )
{
__DRIconfig **configs;
- __GLcontextModes * m;
+ struct gl_config * m;
GLenum fb_format;
GLenum fb_type;
unsigned depth_buffer_factor;
@@ -298,7 +298,7 @@ mach64DestroyScreen( __DRIscreen *driScreen )
static GLboolean
mach64CreateBuffer( __DRIscreen *driScrnPriv,
__DRIdrawable *driDrawPriv,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
GLboolean isPixmap )
{
mach64ScreenPtr screen = (mach64ScreenPtr) driScrnPriv->private;
@@ -369,7 +369,7 @@ mach64CreateBuffer( __DRIscreen *driScrnPriv,
static void
mach64DestroyBuffer(__DRIdrawable *driDrawPriv)
{
- _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
+ _mesa_reference_framebuffer((struct gl_framebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
}
@@ -379,7 +379,7 @@ mach64SwapBuffers(__DRIdrawable *dPriv)
{
if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) {
mach64ContextPtr mmesa;
- GLcontext *ctx;
+ struct gl_context *ctx;
mmesa = (mach64ContextPtr) dPriv->driContextPriv->driverPrivate;
ctx = mmesa->glCtx;
if (ctx->Visual.doubleBufferMode) {
@@ -414,7 +414,7 @@ mach64InitDriver( __DRIscreen *driScreen )
*
* \todo maybe fold this into intelInitDriver
*
- * \return the __GLcontextModes supported by this driver
+ * \return the struct gl_config supported by this driver
*/
static const __DRIconfig **
mach64InitScreen(__DRIscreen *psp)
diff --git a/src/mesa/drivers/dri/mach64/mach64_span.c b/src/mesa/drivers/dri/mach64/mach64_span.c
index 0c52c0c88cb..4b853c2af34 100644
--- a/src/mesa/drivers/dri/mach64/mach64_span.c
+++ b/src/mesa/drivers/dri/mach64/mach64_span.c
@@ -128,21 +128,21 @@
#include "depthtmp.h"
-static void mach64SpanRenderStart( GLcontext *ctx )
+static void mach64SpanRenderStart( struct gl_context *ctx )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
LOCK_HARDWARE( mmesa );
FINISH_DMA_LOCKED( mmesa );
}
-static void mach64SpanRenderFinish( GLcontext *ctx )
+static void mach64SpanRenderFinish( struct gl_context *ctx )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
_swrast_flush( ctx );
UNLOCK_HARDWARE( mmesa );
}
-void mach64DDInitSpanFuncs( GLcontext *ctx )
+void mach64DDInitSpanFuncs( struct gl_context *ctx )
{
struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference(ctx);
swdd->SpanRenderStart = mach64SpanRenderStart;
@@ -154,7 +154,7 @@ void mach64DDInitSpanFuncs( GLcontext *ctx )
* Plug in the Get/Put routines for the given driRenderbuffer.
*/
void
-mach64SetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis)
+mach64SetSpanFunctions(driRenderbuffer *drb, const struct gl_config *vis)
{
if (drb->Base.Format == MESA_FORMAT_RGB565) {
mach64InitPointers_RGB565(&drb->Base);
diff --git a/src/mesa/drivers/dri/mach64/mach64_span.h b/src/mesa/drivers/dri/mach64/mach64_span.h
index 65141d05c3d..2742e93c8e2 100644
--- a/src/mesa/drivers/dri/mach64/mach64_span.h
+++ b/src/mesa/drivers/dri/mach64/mach64_span.h
@@ -33,9 +33,9 @@
#include "drirenderbuffer.h"
-extern void mach64DDInitSpanFuncs( GLcontext *ctx );
+extern void mach64DDInitSpanFuncs( struct gl_context *ctx );
extern void
-mach64SetSpanFunctions(driRenderbuffer *rb, const GLvisual *vis);
+mach64SetSpanFunctions(driRenderbuffer *rb, const struct gl_config *vis);
#endif
diff --git a/src/mesa/drivers/dri/mach64/mach64_state.c b/src/mesa/drivers/dri/mach64/mach64_state.c
index 69a5aea02ce..8e795955c2c 100644
--- a/src/mesa/drivers/dri/mach64/mach64_state.c
+++ b/src/mesa/drivers/dri/mach64/mach64_state.c
@@ -48,7 +48,7 @@
* Alpha blending
*/
-static void mach64UpdateAlphaMode( GLcontext *ctx )
+static void mach64UpdateAlphaMode( struct gl_context *ctx )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
GLuint a = mmesa->setup.alpha_tst_cntl;
@@ -185,7 +185,7 @@ static void mach64UpdateAlphaMode( GLcontext *ctx )
}
}
-static void mach64DDAlphaFunc( GLcontext *ctx, GLenum func, GLfloat ref )
+static void mach64DDAlphaFunc( struct gl_context *ctx, GLenum func, GLfloat ref )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
@@ -193,7 +193,7 @@ static void mach64DDAlphaFunc( GLcontext *ctx, GLenum func, GLfloat ref )
mmesa->new_state |= MACH64_NEW_ALPHA;
}
-static void mach64DDBlendEquationSeparate( GLcontext *ctx,
+static void mach64DDBlendEquationSeparate( struct gl_context *ctx,
GLenum modeRGB, GLenum modeA )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
@@ -214,7 +214,7 @@ static void mach64DDBlendEquationSeparate( GLcontext *ctx,
mmesa->new_state |= MACH64_NEW_ALPHA;
}
-static void mach64DDBlendFuncSeparate( GLcontext *ctx,
+static void mach64DDBlendFuncSeparate( struct gl_context *ctx,
GLenum sfactorRGB, GLenum dfactorRGB,
GLenum sfactorA, GLenum dfactorA )
{
@@ -229,7 +229,7 @@ static void mach64DDBlendFuncSeparate( GLcontext *ctx,
* Depth testing
*/
-static void mach64UpdateZMode( GLcontext *ctx )
+static void mach64UpdateZMode( struct gl_context *ctx )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
GLuint z = mmesa->setup.z_cntl;
@@ -285,7 +285,7 @@ static void mach64UpdateZMode( GLcontext *ctx )
}
}
-static void mach64DDDepthFunc( GLcontext *ctx, GLenum func )
+static void mach64DDDepthFunc( struct gl_context *ctx, GLenum func )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
@@ -293,7 +293,7 @@ static void mach64DDDepthFunc( GLcontext *ctx, GLenum func )
mmesa->new_state |= MACH64_NEW_DEPTH;
}
-static void mach64DDDepthMask( GLcontext *ctx, GLboolean flag )
+static void mach64DDDepthMask( struct gl_context *ctx, GLboolean flag )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
@@ -301,7 +301,7 @@ static void mach64DDDepthMask( GLcontext *ctx, GLboolean flag )
mmesa->new_state |= MACH64_NEW_DEPTH;
}
-static void mach64DDClearDepth( GLcontext *ctx, GLclampd d )
+static void mach64DDClearDepth( struct gl_context *ctx, GLclampd d )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
@@ -315,7 +315,7 @@ static void mach64DDClearDepth( GLcontext *ctx, GLclampd d )
* Fog
*/
-static void mach64UpdateFogAttrib( GLcontext *ctx )
+static void mach64UpdateFogAttrib( struct gl_context *ctx )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
@@ -366,7 +366,7 @@ static void mach64UpdateFogAttrib( GLcontext *ctx )
}
-static void mach64DDFogfv( GLcontext *ctx, GLenum pname, const GLfloat *param )
+static void mach64DDFogfv( struct gl_context *ctx, GLenum pname, const GLfloat *param )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
@@ -379,7 +379,7 @@ static void mach64DDFogfv( GLcontext *ctx, GLenum pname, const GLfloat *param )
* Clipping
*/
-static void mach64UpdateClipping( GLcontext *ctx )
+static void mach64UpdateClipping( struct gl_context *ctx )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
mach64ScreenPtr mach64Screen = mmesa->mach64Screen;
@@ -452,7 +452,7 @@ static void mach64UpdateClipping( GLcontext *ctx )
}
}
-static void mach64DDScissor( GLcontext *ctx,
+static void mach64DDScissor( struct gl_context *ctx,
GLint x, GLint y, GLsizei w, GLsizei h )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
@@ -466,7 +466,7 @@ static void mach64DDScissor( GLcontext *ctx,
* Culling
*/
-static void mach64UpdateCull( GLcontext *ctx )
+static void mach64UpdateCull( struct gl_context *ctx )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
GLfloat backface_sign = 1;
@@ -495,7 +495,7 @@ static void mach64UpdateCull( GLcontext *ctx )
}
-static void mach64DDCullFace( GLcontext *ctx, GLenum mode )
+static void mach64DDCullFace( struct gl_context *ctx, GLenum mode )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
@@ -503,7 +503,7 @@ static void mach64DDCullFace( GLcontext *ctx, GLenum mode )
mmesa->new_state |= MACH64_NEW_CULL;
}
-static void mach64DDFrontFace( GLcontext *ctx, GLenum mode )
+static void mach64DDFrontFace( struct gl_context *ctx, GLenum mode )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
@@ -516,7 +516,7 @@ static void mach64DDFrontFace( GLcontext *ctx, GLenum mode )
* Masks
*/
-static void mach64UpdateMasks( GLcontext *ctx )
+static void mach64UpdateMasks( struct gl_context *ctx )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
GLuint mask = 0xffffffff;
@@ -536,7 +536,7 @@ static void mach64UpdateMasks( GLcontext *ctx )
}
}
-static void mach64DDColorMask( GLcontext *ctx,
+static void mach64DDColorMask( struct gl_context *ctx,
GLboolean r, GLboolean g,
GLboolean b, GLboolean a )
{
@@ -555,7 +555,7 @@ static void mach64DDColorMask( GLcontext *ctx,
* sense to break them out of the core texture state update routines.
*/
-static void mach64UpdateSpecularLighting( GLcontext *ctx )
+static void mach64UpdateSpecularLighting( struct gl_context *ctx )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
GLuint a = mmesa->setup.alpha_tst_cntl;
@@ -578,7 +578,7 @@ static void mach64UpdateSpecularLighting( GLcontext *ctx )
}
}
-static void mach64DDLightModelfv( GLcontext *ctx, GLenum pname,
+static void mach64DDLightModelfv( struct gl_context *ctx, GLenum pname,
const GLfloat *param )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
@@ -589,7 +589,7 @@ static void mach64DDLightModelfv( GLcontext *ctx, GLenum pname,
}
}
-static void mach64DDShadeModel( GLcontext *ctx, GLenum mode )
+static void mach64DDShadeModel( struct gl_context *ctx, GLenum mode )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
GLuint s = mmesa->setup.setup_cntl;
@@ -621,7 +621,7 @@ static void mach64DDShadeModel( GLcontext *ctx, GLenum mode )
*/
-void mach64CalcViewport( GLcontext *ctx )
+void mach64CalcViewport( struct gl_context *ctx )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
const GLfloat *v = ctx->Viewport._WindowMap.m;
@@ -639,14 +639,14 @@ void mach64CalcViewport( GLcontext *ctx )
mmesa->SetupNewInputs = ~0;
}
-static void mach64Viewport( GLcontext *ctx,
+static void mach64Viewport( struct gl_context *ctx,
GLint x, GLint y,
GLsizei width, GLsizei height )
{
mach64CalcViewport( ctx );
}
-static void mach64DepthRange( GLcontext *ctx,
+static void mach64DepthRange( struct gl_context *ctx,
GLclampd nearval, GLclampd farval )
{
mach64CalcViewport( ctx );
@@ -657,7 +657,7 @@ static void mach64DepthRange( GLcontext *ctx,
* Miscellaneous
*/
-static void mach64DDClearColor( GLcontext *ctx,
+static void mach64DDClearColor( struct gl_context *ctx,
const GLfloat color[4] )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
@@ -672,7 +672,7 @@ static void mach64DDClearColor( GLcontext *ctx,
c[0], c[1], c[2], c[3] );
}
-static void mach64DDLogicOpCode( GLcontext *ctx, GLenum opcode )
+static void mach64DDLogicOpCode( struct gl_context *ctx, GLenum opcode )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
@@ -683,7 +683,7 @@ static void mach64DDLogicOpCode( GLcontext *ctx, GLenum opcode )
}
}
-void mach64SetCliprects( GLcontext *ctx, GLenum mode )
+void mach64SetCliprects( struct gl_context *ctx, GLenum mode )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
__DRIdrawable *dPriv = mmesa->driDrawable;
@@ -717,7 +717,7 @@ void mach64SetCliprects( GLcontext *ctx, GLenum mode )
mmesa->dirty |= MACH64_UPLOAD_CLIPRECTS;
}
-static void mach64DDDrawBuffer( GLcontext *ctx, GLenum mode )
+static void mach64DDDrawBuffer( struct gl_context *ctx, GLenum mode )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
@@ -755,7 +755,7 @@ static void mach64DDDrawBuffer( GLcontext *ctx, GLenum mode )
mmesa->dirty |= MACH64_UPLOAD_DST_OFF_PITCH;
}
-static void mach64DDReadBuffer( GLcontext *ctx, GLenum mode )
+static void mach64DDReadBuffer( struct gl_context *ctx, GLenum mode )
{
/* nothing, until we implement h/w glRead/CopyPixels or CopyTexImage */
}
@@ -764,7 +764,7 @@ static void mach64DDReadBuffer( GLcontext *ctx, GLenum mode )
* State enable/disable
*/
-static void mach64DDEnable( GLcontext *ctx, GLenum cap, GLboolean state )
+static void mach64DDEnable( struct gl_context *ctx, GLenum cap, GLboolean state )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
@@ -867,7 +867,7 @@ static void mach64DDEnable( GLcontext *ctx, GLenum cap, GLboolean state )
* Render mode
*/
-static void mach64DDRenderMode( GLcontext *ctx, GLenum mode )
+static void mach64DDRenderMode( struct gl_context *ctx, GLenum mode )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
FALLBACK( mmesa, MACH64_FALLBACK_RENDER_MODE, (mode != GL_RENDER) );
@@ -971,7 +971,7 @@ static void mach64DDPrintState( const char *msg, GLuint flags )
}
/* Update the hardware state */
-void mach64DDUpdateHWState( GLcontext *ctx )
+void mach64DDUpdateHWState( struct gl_context *ctx )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
int new_state = mmesa->new_state;
@@ -1018,7 +1018,7 @@ void mach64DDUpdateHWState( GLcontext *ctx )
}
-static void mach64DDInvalidateState( GLcontext *ctx, GLuint new_state )
+static void mach64DDInvalidateState( struct gl_context *ctx, GLuint new_state )
{
_swrast_InvalidateState( ctx, new_state );
_swsetup_InvalidateState( ctx, new_state );
@@ -1152,7 +1152,7 @@ void mach64DDInitState( mach64ContextPtr mmesa )
/* Initialize the driver's state functions.
*/
-void mach64DDInitStateFuncs( GLcontext *ctx )
+void mach64DDInitStateFuncs( struct gl_context *ctx )
{
ctx->Driver.UpdateState = mach64DDInvalidateState;
diff --git a/src/mesa/drivers/dri/mach64/mach64_state.h b/src/mesa/drivers/dri/mach64/mach64_state.h
index 23081cb2fe9..41c4d01d1df 100644
--- a/src/mesa/drivers/dri/mach64/mach64_state.h
+++ b/src/mesa/drivers/dri/mach64/mach64_state.h
@@ -34,13 +34,13 @@
#include "mach64_context.h"
extern void mach64DDInitState( mach64ContextPtr mmesa );
-extern void mach64DDInitStateFuncs( GLcontext *ctx );
+extern void mach64DDInitStateFuncs( struct gl_context *ctx );
-extern void mach64SetCliprects( GLcontext *ctx, GLenum mode );
-extern void mach64CalcViewport( GLcontext *ctx );
+extern void mach64SetCliprects( struct gl_context *ctx, GLenum mode );
+extern void mach64CalcViewport( struct gl_context *ctx );
-extern void mach64DDUpdateState( GLcontext *ctx );
-extern void mach64DDUpdateHWState( GLcontext *ctx );
+extern void mach64DDUpdateState( struct gl_context *ctx );
+extern void mach64DDUpdateHWState( struct gl_context *ctx );
extern void mach64EmitHwStateLocked( mach64ContextPtr mmesa );
diff --git a/src/mesa/drivers/dri/mach64/mach64_tex.c b/src/mesa/drivers/dri/mach64/mach64_tex.c
index 09367be5b42..68d273a3e75 100644
--- a/src/mesa/drivers/dri/mach64/mach64_tex.c
+++ b/src/mesa/drivers/dri/mach64/mach64_tex.c
@@ -133,7 +133,7 @@ mach64AllocTexObj( struct gl_texture_object *texObj )
/* Called by the _mesa_store_teximage[123]d() functions. */
static gl_format
-mach64ChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
+mach64ChooseTextureFormat( struct gl_context *ctx, GLint internalFormat,
GLenum format, GLenum type )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
@@ -241,7 +241,7 @@ mach64ChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
}
}
-static void mach64TexImage1D( GLcontext *ctx, GLenum target, GLint level,
+static void mach64TexImage1D( struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -271,7 +271,7 @@ static void mach64TexImage1D( GLcontext *ctx, GLenum target, GLint level,
mmesa->new_state |= MACH64_NEW_TEXTURE;
}
-static void mach64TexSubImage1D( GLcontext *ctx,
+static void mach64TexSubImage1D( struct gl_context *ctx,
GLenum target,
GLint level,
GLint xoffset,
@@ -304,7 +304,7 @@ static void mach64TexSubImage1D( GLcontext *ctx,
mmesa->new_state |= MACH64_NEW_TEXTURE;
}
-static void mach64TexImage2D( GLcontext *ctx, GLenum target, GLint level,
+static void mach64TexImage2D( struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -334,7 +334,7 @@ static void mach64TexImage2D( GLcontext *ctx, GLenum target, GLint level,
mmesa->new_state |= MACH64_NEW_TEXTURE;
}
-static void mach64TexSubImage2D( GLcontext *ctx,
+static void mach64TexSubImage2D( struct gl_context *ctx,
GLenum target,
GLint level,
GLint xoffset, GLint yoffset,
@@ -371,7 +371,7 @@ static void mach64TexSubImage2D( GLcontext *ctx,
* Device Driver API texture functions
*/
-static void mach64DDTexEnv( GLcontext *ctx, GLenum target,
+static void mach64DDTexEnv( struct gl_context *ctx, GLenum target,
GLenum pname, const GLfloat *param )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
@@ -425,7 +425,7 @@ static void mach64DDTexEnv( GLcontext *ctx, GLenum target,
}
}
-static void mach64DDTexParameter( GLcontext *ctx, GLenum target,
+static void mach64DDTexParameter( struct gl_context *ctx, GLenum target,
struct gl_texture_object *tObj,
GLenum pname, const GLfloat *params )
{
@@ -489,7 +489,7 @@ static void mach64DDTexParameter( GLcontext *ctx, GLenum target,
mmesa->new_state |= MACH64_NEW_TEXTURE;
}
-static void mach64DDBindTexture( GLcontext *ctx, GLenum target,
+static void mach64DDBindTexture( struct gl_context *ctx, GLenum target,
struct gl_texture_object *tObj )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
@@ -510,7 +510,7 @@ static void mach64DDBindTexture( GLcontext *ctx, GLenum target,
mmesa->new_state |= MACH64_NEW_TEXTURE;
}
-static void mach64DDDeleteTexture( GLcontext *ctx,
+static void mach64DDDeleteTexture( struct gl_context *ctx,
struct gl_texture_object *tObj )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
@@ -537,7 +537,7 @@ static void mach64DDDeleteTexture( GLcontext *ctx,
* texture object from the core mesa gl_texture_object. Not done at this time.
*/
static struct gl_texture_object *
-mach64NewTextureObject( GLcontext *ctx, GLuint name, GLenum target )
+mach64NewTextureObject( struct gl_context *ctx, GLuint name, GLenum target )
{
struct gl_texture_object *obj;
obj = _mesa_new_texture_object(ctx, name, target);
diff --git a/src/mesa/drivers/dri/mach64/mach64_tex.h b/src/mesa/drivers/dri/mach64/mach64_tex.h
index 8e0b23ed15b..03699828538 100644
--- a/src/mesa/drivers/dri/mach64/mach64_tex.h
+++ b/src/mesa/drivers/dri/mach64/mach64_tex.h
@@ -32,7 +32,7 @@
#ifndef __MACH64_TEX_H__
#define __MACH64_TEX_H__
-extern void mach64UpdateTextureState( GLcontext *ctx );
+extern void mach64UpdateTextureState( struct gl_context *ctx );
extern void mach64UploadTexImages( mach64ContextPtr mach64ctx,
mach64TexObjPtr t );
diff --git a/src/mesa/drivers/dri/mach64/mach64_texstate.c b/src/mesa/drivers/dri/mach64/mach64_texstate.c
index adf774ec194..70365c8461f 100644
--- a/src/mesa/drivers/dri/mach64/mach64_texstate.c
+++ b/src/mesa/drivers/dri/mach64/mach64_texstate.c
@@ -108,7 +108,7 @@ static void mach64SetTexImages( mach64ContextPtr mmesa,
t->maxLog2 = baseImage->MaxLog2;
}
-static void mach64UpdateTextureEnv( GLcontext *ctx, int unit )
+static void mach64UpdateTextureEnv( struct gl_context *ctx, int unit )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
GLint source = mmesa->tmu_source[unit];
@@ -284,7 +284,7 @@ static void mach64UpdateTextureEnv( GLcontext *ctx, int unit )
}
-static void mach64UpdateTextureUnit( GLcontext *ctx, int unit )
+static void mach64UpdateTextureUnit( struct gl_context *ctx, int unit )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
int source = mmesa->tmu_source[unit];
@@ -427,7 +427,7 @@ static void mach64UpdateTextureUnit( GLcontext *ctx, int unit )
/* Update the hardware texture state */
-void mach64UpdateTextureState( GLcontext *ctx )
+void mach64UpdateTextureState( struct gl_context *ctx )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/mach64/mach64_tris.c b/src/mesa/drivers/dri/mach64/mach64_tris.c
index a81d21afffa..024ee2f4353 100644
--- a/src/mesa/drivers/dri/mach64/mach64_tris.c
+++ b/src/mesa/drivers/dri/mach64/mach64_tris.c
@@ -59,8 +59,8 @@ static const GLuint hw_prim[GL_POLYGON+1] = {
MACH64_PRIM_POLYGON,
};
-static void mach64RasterPrimitive( GLcontext *ctx, GLuint hwprim );
-static void mach64RenderPrimitive( GLcontext *ctx, GLenum prim );
+static void mach64RasterPrimitive( struct gl_context *ctx, GLuint hwprim );
+static void mach64RenderPrimitive( struct gl_context *ctx, GLenum prim );
/* FIXME: Remove this when native template is finished. */
@@ -120,7 +120,7 @@ static INLINE void mach64_draw_quad( mach64ContextPtr mmesa,
mach64VertexPtr v3 )
{
#if MACH64_NATIVE_VTXFMT
- GLcontext *ctx = mmesa->glCtx;
+ struct gl_context *ctx = mmesa->glCtx;
const GLuint vertsize = mmesa->vertex_size;
GLint a;
GLfloat ooa;
@@ -425,7 +425,7 @@ static INLINE void mach64_draw_triangle( mach64ContextPtr mmesa,
mach64VertexPtr v2 )
{
#if MACH64_NATIVE_VTXFMT
- GLcontext *ctx = mmesa->glCtx;
+ struct gl_context *ctx = mmesa->glCtx;
GLuint vertsize = mmesa->vertex_size;
GLint a;
GLfloat ooa;
@@ -671,7 +671,7 @@ static INLINE void mach64_draw_line( mach64ContextPtr mmesa,
mach64VertexPtr v1 )
{
#if MACH64_NATIVE_VTXFMT
- GLcontext *ctx = mmesa->glCtx;
+ struct gl_context *ctx = mmesa->glCtx;
const GLuint vertsize = mmesa->vertex_size;
/* 2 fractional bits for hardware: */
const int width = (int) (2.0 * CLAMP(mmesa->glCtx->Line.Width,
@@ -959,7 +959,7 @@ static INLINE void mach64_draw_point( mach64ContextPtr mmesa,
mach64VertexPtr v0 )
{
#if MACH64_NATIVE_VTXFMT
- GLcontext *ctx = mmesa->glCtx;
+ struct gl_context *ctx = mmesa->glCtx;
const GLuint vertsize = mmesa->vertex_size;
/* 2 fractional bits for hardware: */
GLint sz = (GLint) (2.0 * CLAMP(mmesa->glCtx->Point.Size,
@@ -1473,7 +1473,7 @@ mach64_fallback_tri( mach64ContextPtr mmesa,
mach64Vertex *v1,
mach64Vertex *v2 )
{
- GLcontext *ctx = mmesa->glCtx;
+ struct gl_context *ctx = mmesa->glCtx;
SWvertex v[3];
mach64_translate_vertex( ctx, v0, &v[0] );
mach64_translate_vertex( ctx, v1, &v[1] );
@@ -1487,7 +1487,7 @@ mach64_fallback_line( mach64ContextPtr mmesa,
mach64Vertex *v0,
mach64Vertex *v1 )
{
- GLcontext *ctx = mmesa->glCtx;
+ struct gl_context *ctx = mmesa->glCtx;
SWvertex v[2];
mach64_translate_vertex( ctx, v0, &v[0] );
mach64_translate_vertex( ctx, v1, &v[1] );
@@ -1499,7 +1499,7 @@ static void
mach64_fallback_point( mach64ContextPtr mmesa,
mach64Vertex *v0 )
{
- GLcontext *ctx = mmesa->glCtx;
+ struct gl_context *ctx = mmesa->glCtx;
SWvertex v[1];
mach64_translate_vertex( ctx, v0, &v[0] );
_swrast_Point( ctx, &v[0] );
@@ -1549,7 +1549,7 @@ mach64_fallback_point( mach64ContextPtr mmesa,
/* Render clipped primitives */
/**********************************************************************/
-static void mach64RenderClippedPoly( GLcontext *ctx, const GLuint *elts,
+static void mach64RenderClippedPoly( struct gl_context *ctx, const GLuint *elts,
GLuint n )
{
mach64ContextPtr mmesa = MACH64_CONTEXT( ctx );
@@ -1573,14 +1573,14 @@ static void mach64RenderClippedPoly( GLcontext *ctx, const GLuint *elts,
}
-static void mach64RenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj )
+static void mach64RenderClippedLine( struct gl_context *ctx, GLuint ii, GLuint jj )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
tnl->Driver.Render.Line( ctx, ii, jj );
}
#if MACH64_NATIVE_VTXFMT
-static void mach64FastRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
+static void mach64FastRenderClippedPoly( struct gl_context *ctx, const GLuint *elts,
GLuint n )
{
mach64ContextPtr mmesa = MACH64_CONTEXT( ctx );
@@ -1675,7 +1675,7 @@ static void mach64FastRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
assert( vb == vbchk );
}
#else
-static void mach64FastRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
+static void mach64FastRenderClippedPoly( struct gl_context *ctx, const GLuint *elts,
GLuint n )
{
mach64ContextPtr mmesa = MACH64_CONTEXT( ctx );
@@ -1715,7 +1715,7 @@ static void mach64FastRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
#define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET|DD_TRI_UNFILLED)
-static void mach64ChooseRenderState(GLcontext *ctx)
+static void mach64ChooseRenderState(struct gl_context *ctx)
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
GLuint flags = ctx->_TriangleCaps;
@@ -1769,7 +1769,7 @@ static void mach64ChooseRenderState(GLcontext *ctx)
/* Validate state at pipeline start */
/**********************************************************************/
-static void mach64RunPipeline( GLcontext *ctx )
+static void mach64RunPipeline( struct gl_context *ctx )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
@@ -1798,7 +1798,7 @@ static void mach64RunPipeline( GLcontext *ctx )
* and lines, points and bitmaps.
*/
-static void mach64RasterPrimitive( GLcontext *ctx, GLuint hwprim )
+static void mach64RasterPrimitive( struct gl_context *ctx, GLuint hwprim )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
@@ -1811,7 +1811,7 @@ static void mach64RasterPrimitive( GLcontext *ctx, GLuint hwprim )
}
}
-static void mach64RenderPrimitive( GLcontext *ctx, GLenum prim )
+static void mach64RenderPrimitive( struct gl_context *ctx, GLenum prim )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
GLuint hw = hw_prim[prim];
@@ -1825,7 +1825,7 @@ static void mach64RenderPrimitive( GLcontext *ctx, GLenum prim )
}
-static void mach64RenderStart( GLcontext *ctx )
+static void mach64RenderStart( struct gl_context *ctx )
{
/* Check for projective texturing. Make sure all texcoord
* pointers point to something. (fix in mesa?)
@@ -1833,7 +1833,7 @@ static void mach64RenderStart( GLcontext *ctx )
mach64CheckTexSizes( ctx );
}
-static void mach64RenderFinish( GLcontext *ctx )
+static void mach64RenderFinish( struct gl_context *ctx )
{
if (MACH64_CONTEXT(ctx)->RenderIndex & MACH64_FALLBACK_BIT)
_swrast_flush( ctx );
@@ -1868,7 +1868,7 @@ static const char *getFallbackString(GLuint bit)
return fallbackStrings[i];
}
-void mach64Fallback( GLcontext *ctx, GLuint bit, GLboolean mode )
+void mach64Fallback( struct gl_context *ctx, GLuint bit, GLboolean mode )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
@@ -1908,7 +1908,7 @@ void mach64Fallback( GLcontext *ctx, GLuint bit, GLboolean mode )
/* Initialization. */
/**********************************************************************/
-void mach64InitTriFuncs( GLcontext *ctx )
+void mach64InitTriFuncs( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
static int firsttime = 1;
diff --git a/src/mesa/drivers/dri/mach64/mach64_tris.h b/src/mesa/drivers/dri/mach64/mach64_tris.h
index 042df42f5bd..84f613c4abd 100644
--- a/src/mesa/drivers/dri/mach64/mach64_tris.h
+++ b/src/mesa/drivers/dri/mach64/mach64_tris.h
@@ -33,10 +33,10 @@
#include "main/mtypes.h"
-extern void mach64InitTriFuncs( GLcontext *ctx );
+extern void mach64InitTriFuncs( struct gl_context *ctx );
-extern void mach64Fallback( GLcontext *ctx, GLuint bit, GLboolean mode );
+extern void mach64Fallback( struct gl_context *ctx, GLuint bit, GLboolean mode );
#define FALLBACK( mmesa, bit, mode ) mach64Fallback( mmesa->glCtx, bit, mode )
diff --git a/src/mesa/drivers/dri/mach64/mach64_vb.c b/src/mesa/drivers/dri/mach64/mach64_vb.c
index 046aff28a8c..d0c04d3d034 100644
--- a/src/mesa/drivers/dri/mach64/mach64_vb.c
+++ b/src/mesa/drivers/dri/mach64/mach64_vb.c
@@ -54,10 +54,10 @@
#define MACH64_MAX_SETUP 0x80
static struct {
- void (*emit)( GLcontext *, GLuint, GLuint, void *, GLuint );
+ void (*emit)( struct gl_context *, GLuint, GLuint, void *, GLuint );
tnl_interp_func interp;
tnl_copy_pv_func copy_pv;
- GLboolean (*check_tex_sizes)( GLcontext *ctx );
+ GLboolean (*check_tex_sizes)( struct gl_context *ctx );
GLuint vertex_size;
GLuint vertex_format;
} setup_tab[MACH64_MAX_SETUP];
@@ -491,7 +491,7 @@ void mach64PrintSetupFlags( char *msg, GLuint flags )
-void mach64CheckTexSizes( GLcontext *ctx )
+void mach64CheckTexSizes( struct gl_context *ctx )
{
mach64ContextPtr mmesa = MACH64_CONTEXT( ctx );
@@ -511,7 +511,7 @@ void mach64CheckTexSizes( GLcontext *ctx )
}
}
-void mach64BuildVertices( GLcontext *ctx,
+void mach64BuildVertices( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint newinputs )
@@ -557,7 +557,7 @@ void mach64BuildVertices( GLcontext *ctx,
}
}
-void mach64ChooseVertexState( GLcontext *ctx )
+void mach64ChooseVertexState( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
mach64ContextPtr mmesa = MACH64_CONTEXT( ctx );
@@ -602,7 +602,7 @@ void mach64ChooseVertexState( GLcontext *ctx )
#if 0
-void mach64_emit_contiguous_verts( GLcontext *ctx,
+void mach64_emit_contiguous_verts( struct gl_context *ctx,
GLuint start,
GLuint count )
{
@@ -614,7 +614,7 @@ void mach64_emit_contiguous_verts( GLcontext *ctx,
#endif
-void mach64InitVB( GLcontext *ctx )
+void mach64InitVB( struct gl_context *ctx )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
GLuint size = TNL_CONTEXT(ctx)->vb.Size;
@@ -631,7 +631,7 @@ void mach64InitVB( GLcontext *ctx )
}
-void mach64FreeVB( GLcontext *ctx )
+void mach64FreeVB( struct gl_context *ctx )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
if (mmesa->verts) {
diff --git a/src/mesa/drivers/dri/mach64/mach64_vb.h b/src/mesa/drivers/dri/mach64/mach64_vb.h
index e0b366916b1..8d9cd5b492c 100644
--- a/src/mesa/drivers/dri/mach64/mach64_vb.h
+++ b/src/mesa/drivers/dri/mach64/mach64_vb.h
@@ -46,32 +46,32 @@
_NEW_FOG)
-extern void mach64CheckTexSizes( GLcontext *ctx );
-extern void mach64ChooseVertexState( GLcontext *ctx );
+extern void mach64CheckTexSizes( struct gl_context *ctx );
+extern void mach64ChooseVertexState( struct gl_context *ctx );
-extern void mach64BuildVertices( GLcontext *ctx, GLuint start, GLuint count,
+extern void mach64BuildVertices( struct gl_context *ctx, GLuint start, GLuint count,
GLuint newinputs );
extern void mach64PrintSetupFlags(char *msg, GLuint flags );
-extern void mach64InitVB( GLcontext *ctx );
-extern void mach64FreeVB( GLcontext *ctx );
+extern void mach64InitVB( struct gl_context *ctx );
+extern void mach64FreeVB( struct gl_context *ctx );
#if 0
-extern void mach64_emit_contiguous_verts( GLcontext *ctx,
+extern void mach64_emit_contiguous_verts( struct gl_context *ctx,
GLuint start,
GLuint count );
-extern void mach64_emit_indexed_verts( GLcontext *ctx,
+extern void mach64_emit_indexed_verts( struct gl_context *ctx,
GLuint start,
GLuint count );
#endif
-extern void mach64_translate_vertex( GLcontext *ctx,
+extern void mach64_translate_vertex( struct gl_context *ctx,
const mach64Vertex *src,
SWvertex *dst );
-extern void mach64_print_vertex( GLcontext *ctx, const mach64Vertex *v );
+extern void mach64_print_vertex( struct gl_context *ctx, const mach64Vertex *v );
#endif /* __MACH64_VB_H__ */
diff --git a/src/mesa/drivers/dri/mach64/mach64_vbtmp.h b/src/mesa/drivers/dri/mach64/mach64_vbtmp.h
index 60bfab8f6dc..a126dcae40f 100644
--- a/src/mesa/drivers/dri/mach64/mach64_vbtmp.h
+++ b/src/mesa/drivers/dri/mach64/mach64_vbtmp.h
@@ -118,7 +118,7 @@
#if (HAVE_HW_DIVIDE || DO_SPEC || DO_TEX0 || DO_FOG || !HAVE_TINY_VERTICES)
-static void TAG(emit)( GLcontext *ctx,
+static void TAG(emit)( struct gl_context *ctx,
GLuint start, GLuint end,
void *dest,
GLuint stride )
@@ -366,7 +366,7 @@ static void TAG(emit)( GLcontext *ctx,
#error "cannot use tiny vertices with hw perspective divide"
#endif
-static void TAG(emit)( GLcontext *ctx, GLuint start, GLuint end,
+static void TAG(emit)( struct gl_context *ctx, GLuint start, GLuint end,
void *dest, GLuint stride )
{
LOCALVARS
@@ -422,7 +422,7 @@ static void TAG(emit)( GLcontext *ctx, GLuint start, GLuint end,
}
}
#else
-static void TAG(emit)( GLcontext *ctx, GLuint start, GLuint end,
+static void TAG(emit)( struct gl_context *ctx, GLuint start, GLuint end,
void *dest, GLuint stride )
{
LOCALVARS
@@ -466,7 +466,7 @@ static void TAG(emit)( GLcontext *ctx, GLuint start, GLuint end,
#if (HAVE_PTEX_VERTICES)
-static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
+static GLboolean TAG(check_tex_sizes)( struct gl_context *ctx )
{
LOCALVARS
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
@@ -494,7 +494,7 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
return GL_TRUE;
}
#else
-static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
+static GLboolean TAG(check_tex_sizes)( struct gl_context *ctx )
{
LOCALVARS
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
@@ -535,7 +535,7 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
#endif /* ptex */
-static void TAG(interp)( GLcontext *ctx,
+static void TAG(interp)( struct gl_context *ctx,
GLfloat t,
GLuint edst, GLuint eout, GLuint ein,
GLboolean force_boundary )
diff --git a/src/mesa/drivers/dri/mga/mga_texcombine.c b/src/mesa/drivers/dri/mga/mga_texcombine.c
index 24083d9651b..1488a89bb65 100644
--- a/src/mesa/drivers/dri/mga/mga_texcombine.c
+++ b/src/mesa/drivers/dri/mga/mga_texcombine.c
@@ -41,7 +41,7 @@
#define MGA_ARG2 1
#define MGA_ALPHA 2
-GLboolean mgaUpdateTextureEnvCombine( GLcontext *ctx, int unit )
+GLboolean mgaUpdateTextureEnvCombine( struct gl_context *ctx, int unit )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
const int source = mmesa->tmu_source[unit];
diff --git a/src/mesa/drivers/dri/mga/mga_texstate.c b/src/mesa/drivers/dri/mga/mga_texstate.c
index 54eda62a96a..33ad8b42560 100644
--- a/src/mesa/drivers/dri/mga/mga_texstate.c
+++ b/src/mesa/drivers/dri/mga/mga_texstate.c
@@ -196,7 +196,7 @@ mgaSetTexImages( mgaContextPtr mmesa,
* Texture unit state management
*/
-static void mgaUpdateTextureEnvG200( GLcontext *ctx, GLuint unit )
+static void mgaUpdateTextureEnvG200( struct gl_context *ctx, GLuint unit )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
struct gl_texture_object *tObj = ctx->Texture.Unit[0]._Current;
@@ -526,7 +526,7 @@ static const GLuint g400_alpha_combine[][MGA_MAX_COMBFUNC] =
},
};
-static GLboolean mgaUpdateTextureEnvBlend( GLcontext *ctx, int unit )
+static GLboolean mgaUpdateTextureEnvBlend( struct gl_context *ctx, int unit )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
const int source = mmesa->tmu_source[unit];
@@ -622,7 +622,7 @@ static GLboolean mgaUpdateTextureEnvBlend( GLcontext *ctx, int unit )
return GL_TRUE;
}
-static void mgaUpdateTextureEnvG400( GLcontext *ctx, GLuint unit )
+static void mgaUpdateTextureEnvG400( struct gl_context *ctx, GLuint unit )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
const int source = mmesa->tmu_source[unit];
@@ -719,7 +719,7 @@ static void mgaUpdateTextureEnvG400( GLcontext *ctx, GLuint unit )
}
}
-static void disable_tex( GLcontext *ctx, int unit )
+static void disable_tex( struct gl_context *ctx, int unit )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
@@ -747,7 +747,7 @@ static void disable_tex( GLcontext *ctx, int unit )
mmesa->dirty |= MGA_UPLOAD_CONTEXT | (MGA_UPLOAD_TEX0 << unit);
}
-static GLboolean enable_tex( GLcontext *ctx, int unit )
+static GLboolean enable_tex( struct gl_context *ctx, int unit )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
const int source = mmesa->tmu_source[unit];
@@ -768,7 +768,7 @@ static GLboolean enable_tex( GLcontext *ctx, int unit )
return GL_TRUE;
}
-static GLboolean update_tex_common( GLcontext *ctx, int unit )
+static GLboolean update_tex_common( struct gl_context *ctx, int unit )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
const int source = mmesa->tmu_source[unit];
@@ -842,7 +842,7 @@ static GLboolean update_tex_common( GLcontext *ctx, int unit )
}
-static GLboolean updateTextureUnit( GLcontext *ctx, int unit )
+static GLboolean updateTextureUnit( struct gl_context *ctx, int unit )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
const int source = mmesa->tmu_source[unit];
@@ -865,7 +865,7 @@ static GLboolean updateTextureUnit( GLcontext *ctx, int unit )
/* The G400 is now programmed quite differently wrt texture environment.
*/
-void mgaUpdateTextureState( GLcontext *ctx )
+void mgaUpdateTextureState( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
GLboolean ok;
diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.c b/src/mesa/drivers/dri/mga/mga_xmesa.c
index 13f73a83e90..d1b281a2c05 100644
--- a/src/mesa/drivers/dri/mga/mga_xmesa.c
+++ b/src/mesa/drivers/dri/mga/mga_xmesa.c
@@ -110,7 +110,7 @@ mgaFillInModes( __DRIscreen *psp,
unsigned stencil_bits, GLboolean have_back_buffer )
{
__DRIconfig **configs;
- __GLcontextModes * m;
+ struct gl_config * m;
unsigned depth_buffer_factor;
unsigned back_buffer_factor;
GLenum fb_format;
@@ -421,13 +421,13 @@ static const struct dri_debug_control debug_control[] =
static GLboolean
mgaCreateContext( gl_api api,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate )
{
int i;
unsigned maxlevels;
- GLcontext *ctx, *shareCtx;
+ struct gl_context *ctx, *shareCtx;
mgaContextPtr mmesa;
__DRIscreen *sPriv = driContextPriv->driScreenPriv;
mgaScreenPrivate *mgaScreen = (mgaScreenPrivate *)sPriv->private;
@@ -695,7 +695,7 @@ mgaDestroyContext(__DRIcontext *driContextPriv)
static GLboolean
mgaCreateBuffer( __DRIscreen *driScrnPriv,
__DRIdrawable *driDrawPriv,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
GLboolean isPixmap )
{
mgaScreenPrivate *screen = (mgaScreenPrivate *) driScrnPriv->private;
@@ -812,7 +812,7 @@ mgaCreateBuffer( __DRIscreen *driScrnPriv,
static void
mgaDestroyBuffer(__DRIdrawable *driDrawPriv)
{
- _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
+ _mesa_reference_framebuffer((struct gl_framebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
}
static void
@@ -820,7 +820,7 @@ mgaSwapBuffers(__DRIdrawable *dPriv)
{
if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) {
mgaContextPtr mmesa;
- GLcontext *ctx;
+ struct gl_context *ctx;
mmesa = (mgaContextPtr) dPriv->driContextPriv->driverPrivate;
ctx = mmesa->glCtx;
@@ -875,8 +875,8 @@ mgaMakeCurrent(__DRIcontext *driContextPriv,
mmesa->driReadable = driReadPriv;
_mesa_make_current(mmesa->glCtx,
- (GLframebuffer *) driDrawPriv->driverPrivate,
- (GLframebuffer *) driReadPriv->driverPrivate);
+ (struct gl_framebuffer *) driDrawPriv->driverPrivate,
+ (struct gl_framebuffer *) driReadPriv->driverPrivate);
}
else {
_mesa_make_current(NULL, NULL, NULL);
@@ -925,7 +925,7 @@ void mgaGetLock( mgaContextPtr mmesa, GLuint flags )
*
* \todo maybe fold this into intelInitDriver
*
- * \return the __GLcontextModes supported by this driver
+ * \return the struct gl_config supported by this driver
*/
static const __DRIconfig **mgaInitScreen(__DRIscreen *psp)
{
diff --git a/src/mesa/drivers/dri/mga/mgacontext.h b/src/mesa/drivers/dri/mga/mgacontext.h
index 41415659314..b1fbb3c45d6 100644
--- a/src/mesa/drivers/dri/mga/mgacontext.h
+++ b/src/mesa/drivers/dri/mga/mgacontext.h
@@ -179,7 +179,7 @@ struct mga_hw_state {
struct mga_context_t {
- GLcontext *glCtx;
+ struct gl_context *glCtx;
unsigned int lastStamp; /* fullscreen breaks dpriv->laststamp,
* need to shadow it here. */
diff --git a/src/mesa/drivers/dri/mga/mgadd.c b/src/mesa/drivers/dri/mga/mgadd.c
index 2f23c0e5142..1b39813e379 100644
--- a/src/mesa/drivers/dri/mga/mgadd.c
+++ b/src/mesa/drivers/dri/mga/mgadd.c
@@ -43,7 +43,7 @@
***************************************/
-static const GLubyte *mgaGetString( GLcontext *ctx, GLenum name )
+static const GLubyte *mgaGetString( struct gl_context *ctx, GLenum name )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
static char buffer[128];
diff --git a/src/mesa/drivers/dri/mga/mgaioctl.c b/src/mesa/drivers/dri/mga/mgaioctl.c
index 259358eaa3f..a54d86a178d 100644
--- a/src/mesa/drivers/dri/mga/mgaioctl.c
+++ b/src/mesa/drivers/dri/mga/mgaioctl.c
@@ -201,7 +201,7 @@ drmBufPtr mga_get_buffer_ioctl( mgaContextPtr mmesa )
static void
-mgaClear( GLcontext *ctx, GLbitfield mask )
+mgaClear( struct gl_context *ctx, GLbitfield mask )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
__DRIdrawable *dPriv = mmesa->driDrawable;
@@ -479,7 +479,7 @@ void mgaCopyBuffer( __DRIdrawable *dPriv )
*
* \sa glFinish, mgaFlush, mgaFlushDMA
*/
-static void mgaFinish( GLcontext *ctx )
+static void mgaFinish( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
uint32_t fence;
@@ -688,7 +688,7 @@ void mgaGetILoadBufferLocked( mgaContextPtr mmesa )
*
* \sa glFlush, mgaFinish, mgaFlushDMA
*/
-static void mgaFlush( GLcontext *ctx )
+static void mgaFlush( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
diff --git a/src/mesa/drivers/dri/mga/mgapixel.c b/src/mesa/drivers/dri/mga/mgapixel.c
index 9cbdbe02c94..b8e365c714c 100644
--- a/src/mesa/drivers/dri/mga/mgapixel.c
+++ b/src/mesa/drivers/dri/mga/mgapixel.c
@@ -56,7 +56,7 @@
static GLboolean
-check_depth_stencil_24_8( const GLcontext *ctx, GLenum type,
+check_depth_stencil_24_8( const struct gl_context *ctx, GLenum type,
const struct gl_pixelstore_attrib *packing,
const void *pixels, GLint sz,
GLint pitch )
@@ -80,7 +80,7 @@ check_depth_stencil_24_8( const GLcontext *ctx, GLenum type,
static GLboolean
-check_depth( const GLcontext *ctx, GLenum type,
+check_depth( const struct gl_context *ctx, GLenum type,
const struct gl_pixelstore_attrib *packing,
const void *pixels, GLint sz, GLint pitch )
{
@@ -100,7 +100,7 @@ check_depth( const GLcontext *ctx, GLenum type,
static GLboolean
-check_color( const GLcontext *ctx, GLenum type, GLenum format,
+check_color( const struct gl_context *ctx, GLenum type, GLenum format,
const struct gl_pixelstore_attrib *packing,
const void *pixels, GLint sz, GLint pitch )
{
@@ -125,7 +125,7 @@ check_color( const GLcontext *ctx, GLenum type, GLenum format,
}
static GLboolean
-check_color_per_fragment_ops( const GLcontext *ctx )
+check_color_per_fragment_ops( const struct gl_context *ctx )
{
return (!( ctx->Color.AlphaEnabled ||
ctx->Depth.Test ||
@@ -145,7 +145,7 @@ check_color_per_fragment_ops( const GLcontext *ctx )
}
static GLboolean
-check_depth_per_fragment_ops( const GLcontext *ctx )
+check_depth_per_fragment_ops( const struct gl_context *ctx )
{
return ( ctx->Current.RasterPosValid &&
ctx->Color.ColorMask[0][RCOMP] == 0 &&
@@ -160,7 +160,7 @@ check_depth_per_fragment_ops( const GLcontext *ctx )
*/
#if defined(MESA_packed_depth_stencil)
static GLboolean
-check_stencil_per_fragment_ops( const GLcontext *ctx )
+check_stencil_per_fragment_ops( const struct gl_context *ctx )
{
return ( !ctx->Pixel.IndexShift &&
!ctx->Pixel.IndexOffset );
@@ -169,8 +169,8 @@ check_stencil_per_fragment_ops( const GLcontext *ctx )
static GLboolean
-clip_pixelrect( const GLcontext *ctx,
- const GLframebuffer *buffer,
+clip_pixelrect( const struct gl_context *ctx,
+ const struct gl_framebuffer *buffer,
GLint *x, GLint *y,
GLsizei *width, GLsizei *height,
GLint *skipPixels, GLint *skipRows,
@@ -215,7 +215,7 @@ clip_pixelrect( const GLcontext *ctx,
}
static GLboolean
-mgaTryReadPixels( GLcontext *ctx,
+mgaTryReadPixels( struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *pack,
@@ -373,7 +373,7 @@ mgaTryReadPixels( GLcontext *ctx,
}
static void
-mgaDDReadPixels( GLcontext *ctx,
+mgaDDReadPixels( struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *pack,
@@ -386,7 +386,7 @@ mgaDDReadPixels( GLcontext *ctx,
-static void do_draw_pix( GLcontext *ctx,
+static void do_draw_pix( struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLint pitch,
const void *pixels,
@@ -470,7 +470,7 @@ static void do_draw_pix( GLcontext *ctx,
static GLboolean
-mgaTryDrawPixels( GLcontext *ctx,
+mgaTryDrawPixels( struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *unpack,
@@ -619,7 +619,7 @@ mgaTryDrawPixels( GLcontext *ctx,
}
static void
-mgaDDDrawPixels( GLcontext *ctx,
+mgaDDDrawPixels( struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *unpack,
@@ -637,7 +637,7 @@ mgaDDDrawPixels( GLcontext *ctx,
* the same block of agp space which isn't used for anything else at
* present.
*/
-void mgaDDInitPixelFuncs( GLcontext *ctx )
+void mgaDDInitPixelFuncs( struct gl_context *ctx )
{
#if 0
/* evidently, these functions don't always work */
diff --git a/src/mesa/drivers/dri/mga/mgapixel.h b/src/mesa/drivers/dri/mga/mgapixel.h
index f5f300db56d..6241b4b5ef4 100644
--- a/src/mesa/drivers/dri/mga/mgapixel.h
+++ b/src/mesa/drivers/dri/mga/mgapixel.h
@@ -30,6 +30,6 @@
#include "main/mtypes.h"
-extern void mgaDDInitPixelFuncs( GLcontext *ctx );
+extern void mgaDDInitPixelFuncs( struct gl_context *ctx );
#endif
diff --git a/src/mesa/drivers/dri/mga/mgarender.c b/src/mesa/drivers/dri/mga/mgarender.c
index cc0cea618d1..f10a91adcec 100644
--- a/src/mesa/drivers/dri/mga/mgarender.c
+++ b/src/mesa/drivers/dri/mga/mgarender.c
@@ -66,7 +66,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#define HAVE_ELTS 0 /* for now */
-static void mgaDmaPrimitive( GLcontext *ctx, GLenum prim )
+static void mgaDmaPrimitive( struct gl_context *ctx, GLenum prim )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
GLuint hwprim;
@@ -124,7 +124,7 @@ static void mgaDmaPrimitive( GLcontext *ctx, GLenum prim )
/**********************************************************************/
-static GLboolean mga_run_render( GLcontext *ctx,
+static GLboolean mga_run_render( struct gl_context *ctx,
struct tnl_pipeline_stage *stage )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/mga/mgaspan.c b/src/mesa/drivers/dri/mga/mgaspan.c
index 10606c152c3..dd9a8d74edd 100644
--- a/src/mesa/drivers/dri/mga/mgaspan.c
+++ b/src/mesa/drivers/dri/mga/mgaspan.c
@@ -169,7 +169,7 @@
static void
-mgaSpanRenderStart( GLcontext *ctx )
+mgaSpanRenderStart( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
FLUSH_BATCH( mmesa );
@@ -177,7 +177,7 @@ mgaSpanRenderStart( GLcontext *ctx )
}
static void
-mgaSpanRenderFinish( GLcontext *ctx )
+mgaSpanRenderFinish( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
_swrast_flush( ctx );
@@ -192,7 +192,7 @@ mgaSpanRenderFinish( GLcontext *ctx )
* write routines for 888 and 8888. We also need to determine whether or not
* the visual has destination alpha.
*/
-void mgaDDInitSpanFuncs( GLcontext *ctx )
+void mgaDDInitSpanFuncs( struct gl_context *ctx )
{
struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference(ctx);
swdd->SpanRenderStart = mgaSpanRenderStart;
@@ -204,7 +204,7 @@ void mgaDDInitSpanFuncs( GLcontext *ctx )
* Plug in the Get/Put routines for the given driRenderbuffer.
*/
void
-mgaSetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis)
+mgaSetSpanFunctions(driRenderbuffer *drb, const struct gl_config *vis)
{
if (drb->Base.Format == MESA_FORMAT_RGB565) {
mgaInitPointers_565(&drb->Base);
diff --git a/src/mesa/drivers/dri/mga/mgaspan.h b/src/mesa/drivers/dri/mga/mgaspan.h
index f5e2e49b8a4..48186b46e9a 100644
--- a/src/mesa/drivers/dri/mga/mgaspan.h
+++ b/src/mesa/drivers/dri/mga/mgaspan.h
@@ -30,10 +30,10 @@
#include "drirenderbuffer.h"
-extern void mgaDDInitSpanFuncs( GLcontext *ctx );
+extern void mgaDDInitSpanFuncs( struct gl_context *ctx );
extern void
-mgaSetSpanFunctions(driRenderbuffer *rb, const GLvisual *vis);
+mgaSetSpanFunctions(driRenderbuffer *rb, const struct gl_config *vis);
#endif
diff --git a/src/mesa/drivers/dri/mga/mgastate.c b/src/mesa/drivers/dri/mga/mgastate.c
index 745d5e98525..25d7de28fe8 100644
--- a/src/mesa/drivers/dri/mga/mgastate.c
+++ b/src/mesa/drivers/dri/mga/mgastate.c
@@ -51,7 +51,7 @@
#include "drirenderbuffer.h"
-static void updateSpecularLighting( GLcontext *ctx );
+static void updateSpecularLighting( struct gl_context *ctx );
static const GLuint mgarop_NoBLK[16] = {
DC_atype_rpl | 0x00000000, DC_atype_rstr | 0x00080000,
@@ -68,7 +68,7 @@ static const GLuint mgarop_NoBLK[16] = {
* Alpha blending
*/
-static void mgaDDAlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref)
+static void mgaDDAlphaFunc(struct gl_context *ctx, GLenum func, GLfloat ref)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
GLubyte refByte;
@@ -111,7 +111,7 @@ static void mgaDDAlphaFunc(GLcontext *ctx, GLenum func, GLfloat ref)
mmesa->hw.alpha_func = a | MGA_FIELD( AC_atref, refByte );
}
-static void updateBlendLogicOp(GLcontext *ctx)
+static void updateBlendLogicOp(struct gl_context *ctx)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
GLboolean logicOp = RGBA_LOGICOP_ENABLED(ctx);
@@ -126,14 +126,14 @@ static void updateBlendLogicOp(GLcontext *ctx)
mmesa->hw.blend_func == (AC_src_src_alpha_sat | AC_dst_zero) );
}
-static void mgaDDBlendEquationSeparate(GLcontext *ctx,
+static void mgaDDBlendEquationSeparate(struct gl_context *ctx,
GLenum modeRGB, GLenum modeA)
{
assert( modeRGB == modeA );
updateBlendLogicOp( ctx );
}
-static void mgaDDBlendFuncSeparate( GLcontext *ctx, GLenum sfactorRGB,
+static void mgaDDBlendFuncSeparate( struct gl_context *ctx, GLenum sfactorRGB,
GLenum dfactorRGB, GLenum sfactorA,
GLenum dfactorA )
{
@@ -205,7 +205,7 @@ static void mgaDDBlendFuncSeparate( GLcontext *ctx, GLenum sfactorRGB,
* Depth testing
*/
-static void mgaDDDepthFunc(GLcontext *ctx, GLenum func)
+static void mgaDDDepthFunc(struct gl_context *ctx, GLenum func)
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
int zmode;
@@ -239,7 +239,7 @@ static void mgaDDDepthFunc(GLcontext *ctx, GLenum func)
mmesa->hw.zmode |= zmode;
}
-static void mgaDDDepthMask(GLcontext *ctx, GLboolean flag)
+static void mgaDDDepthMask(struct gl_context *ctx, GLboolean flag)
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
@@ -250,7 +250,7 @@ static void mgaDDDepthMask(GLcontext *ctx, GLboolean flag)
}
-static void mgaDDClearDepth(GLcontext *ctx, GLclampd d)
+static void mgaDDClearDepth(struct gl_context *ctx, GLclampd d)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -272,7 +272,7 @@ static void mgaDDClearDepth(GLcontext *ctx, GLclampd d)
*/
-static void mgaDDFogfv(GLcontext *ctx, GLenum pname, const GLfloat *param)
+static void mgaDDFogfv(struct gl_context *ctx, GLenum pname, const GLfloat *param)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -292,7 +292,7 @@ static void mgaDDFogfv(GLcontext *ctx, GLenum pname, const GLfloat *param)
*/
-void mgaUpdateClipping(const GLcontext *ctx)
+void mgaUpdateClipping(const struct gl_context *ctx)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -319,7 +319,7 @@ void mgaUpdateClipping(const GLcontext *ctx)
}
-static void mgaDDScissor( GLcontext *ctx, GLint x, GLint y,
+static void mgaDDScissor( struct gl_context *ctx, GLint x, GLint y,
GLsizei w, GLsizei h )
{
if ( ctx->Scissor.Enabled ) {
@@ -338,7 +338,7 @@ static void mgaDDScissor( GLcontext *ctx, GLint x, GLint y,
#define _CULL_NEGATIVE ((1<<11)|(1<<5)|(1<<16))
#define _CULL_POSITIVE (1<<11)
-static void mgaDDCullFaceFrontFace(GLcontext *ctx, GLenum unused)
+static void mgaDDCullFaceFrontFace(struct gl_context *ctx, GLenum unused)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -368,7 +368,7 @@ static void mgaDDCullFaceFrontFace(GLcontext *ctx, GLenum unused)
* Masks
*/
-static void mgaDDColorMask(GLcontext *ctx,
+static void mgaDDColorMask(struct gl_context *ctx,
GLboolean r, GLboolean g,
GLboolean b, GLboolean a )
{
@@ -421,7 +421,7 @@ static int mgaStipples[16] = {
* \param mask Pointer to the 32x32 stipple mask
*/
-static void mgaDDPolygonStipple( GLcontext *ctx, const GLubyte *mask )
+static void mgaDDPolygonStipple( struct gl_context *ctx, const GLubyte *mask )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
const GLubyte *m = mask;
@@ -478,7 +478,7 @@ static void mgaDDPolygonStipple( GLcontext *ctx, const GLubyte *mask )
* sense to break them out of the core texture state update routines.
*/
-static void updateSpecularLighting( GLcontext *ctx )
+static void updateSpecularLighting( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
unsigned int specen;
@@ -497,7 +497,7 @@ static void updateSpecularLighting( GLcontext *ctx )
*/
-static void mgaDDLightModelfv(GLcontext *ctx, GLenum pname,
+static void mgaDDLightModelfv(struct gl_context *ctx, GLenum pname,
const GLfloat *param)
{
if (pname == GL_LIGHT_MODEL_COLOR_CONTROL) {
@@ -513,7 +513,7 @@ static void mgaDDLightModelfv(GLcontext *ctx, GLenum pname,
static void
-mgaDDStencilFuncSeparate(GLcontext *ctx, GLenum face, GLenum func, GLint ref,
+mgaDDStencilFuncSeparate(struct gl_context *ctx, GLenum face, GLenum func, GLint ref,
GLuint mask)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -558,7 +558,7 @@ mgaDDStencilFuncSeparate(GLcontext *ctx, GLenum face, GLenum func, GLint ref,
}
static void
-mgaDDStencilMaskSeparate(GLcontext *ctx, GLenum face, GLuint mask)
+mgaDDStencilMaskSeparate(struct gl_context *ctx, GLenum face, GLuint mask)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -568,7 +568,7 @@ mgaDDStencilMaskSeparate(GLcontext *ctx, GLenum face, GLuint mask)
}
static void
-mgaDDStencilOpSeparate(GLcontext *ctx, GLenum face, GLenum fail, GLenum zfail,
+mgaDDStencilOpSeparate(struct gl_context *ctx, GLenum face, GLenum fail, GLenum zfail,
GLenum zpass)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -676,7 +676,7 @@ mgaDDStencilOpSeparate(GLcontext *ctx, GLenum face, GLenum fail, GLenum zfail,
* Window position and viewport transformation
*/
-void mgaCalcViewport( GLcontext *ctx )
+void mgaCalcViewport( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
const GLfloat *v = ctx->Viewport._WindowMap.m;
@@ -694,14 +694,14 @@ void mgaCalcViewport( GLcontext *ctx )
mmesa->SetupNewInputs = ~0;
}
-static void mgaViewport( GLcontext *ctx,
+static void mgaViewport( struct gl_context *ctx,
GLint x, GLint y,
GLsizei width, GLsizei height )
{
mgaCalcViewport( ctx );
}
-static void mgaDepthRange( GLcontext *ctx,
+static void mgaDepthRange( struct gl_context *ctx,
GLclampd nearval, GLclampd farval )
{
mgaCalcViewport( ctx );
@@ -712,7 +712,7 @@ static void mgaDepthRange( GLcontext *ctx,
* Miscellaneous
*/
-static void mgaDDClearColor(GLcontext *ctx,
+static void mgaDDClearColor(struct gl_context *ctx,
const GLfloat color[4] )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -729,13 +729,13 @@ static void mgaDDClearColor(GLcontext *ctx,
/* Fallback to swrast for select and feedback.
*/
-static void mgaRenderMode( GLcontext *ctx, GLenum mode )
+static void mgaRenderMode( struct gl_context *ctx, GLenum mode )
{
FALLBACK( ctx, MGA_FALLBACK_RENDERMODE, (mode != GL_RENDER) );
}
-static void mgaDDLogicOp( GLcontext *ctx, GLenum opcode )
+static void mgaDDLogicOp( struct gl_context *ctx, GLenum opcode )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
@@ -791,7 +791,7 @@ void mgaUpdateRects( mgaContextPtr mmesa, GLuint buffers )
}
-static void mgaDDDrawBuffer(GLcontext *ctx, GLenum mode )
+static void mgaDDDrawBuffer(struct gl_context *ctx, GLenum mode )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -823,7 +823,7 @@ static void mgaDDDrawBuffer(GLcontext *ctx, GLenum mode )
}
-static void mgaDDReadBuffer(GLcontext *ctx, GLenum mode )
+static void mgaDDReadBuffer(struct gl_context *ctx, GLenum mode )
{
/* nothing, until we implement h/w glRead/CopyPixels or CopyTexImage */
}
@@ -834,7 +834,7 @@ static void mgaDDReadBuffer(GLcontext *ctx, GLenum mode )
*/
-static void mgaDDEnable(GLcontext *ctx, GLenum cap, GLboolean state)
+static void mgaDDEnable(struct gl_context *ctx, GLenum cap, GLboolean state)
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
@@ -932,7 +932,7 @@ static void mgaDDPrintDirty( const char *msg, GLuint state )
void mgaEmitHwStateLocked( mgaContextPtr mmesa )
{
drm_mga_sarea_t *sarea = mmesa->sarea;
- GLcontext * ctx = mmesa->glCtx;
+ struct gl_context * ctx = mmesa->glCtx;
if (MGA_DEBUG & DEBUG_VERBOSE_MSG)
mgaDDPrintDirty( __FUNCTION__, mmesa->dirty );
@@ -1009,7 +1009,7 @@ void mgaEmitHwStateLocked( mgaContextPtr mmesa )
*/
-static void mgaDDValidateState( GLcontext *ctx )
+static void mgaDDValidateState( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
@@ -1033,7 +1033,7 @@ static void mgaDDValidateState( GLcontext *ctx )
}
-static void mgaDDInvalidateState( GLcontext *ctx, GLuint new_state )
+static void mgaDDInvalidateState( struct gl_context *ctx, GLuint new_state )
{
_swrast_InvalidateState( ctx, new_state );
_swsetup_InvalidateState( ctx, new_state );
@@ -1043,7 +1043,7 @@ static void mgaDDInvalidateState( GLcontext *ctx, GLuint new_state )
}
-static void mgaRunPipeline( GLcontext *ctx )
+static void mgaRunPipeline( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -1062,7 +1062,7 @@ static void mgaRunPipeline( GLcontext *ctx )
void mgaInitState( mgaContextPtr mmesa )
{
mgaScreenPrivate *mgaScreen = mmesa->mgaScreen;
- GLcontext *ctx = mmesa->glCtx;
+ struct gl_context *ctx = mmesa->glCtx;
if (ctx->Visual.doubleBufferMode) {
/* use back buffer by default */
@@ -1161,7 +1161,7 @@ void mgaInitState( mgaContextPtr mmesa )
}
-void mgaDDInitStateFuncs( GLcontext *ctx )
+void mgaDDInitStateFuncs( struct gl_context *ctx )
{
ctx->Driver.UpdateState = mgaDDInvalidateState;
ctx->Driver.Enable = mgaDDEnable;
diff --git a/src/mesa/drivers/dri/mga/mgastate.h b/src/mesa/drivers/dri/mga/mgastate.h
index ec65d4e6cd7..6e8a869cf79 100644
--- a/src/mesa/drivers/dri/mga/mgastate.h
+++ b/src/mesa/drivers/dri/mga/mgastate.h
@@ -29,10 +29,10 @@
#define _MGA_STATE_H
extern void mgaInitState( mgaContextPtr mmesa );
-extern void mgaDDInitStateFuncs(GLcontext *ctx);
-extern void mgaUpdateClipping(const GLcontext *ctx);
-extern void mgaUpdateCull( GLcontext *ctx );
-extern void mgaCalcViewport( GLcontext *ctx );
+extern void mgaDDInitStateFuncs(struct gl_context *ctx);
+extern void mgaUpdateClipping(const struct gl_context *ctx);
+extern void mgaUpdateCull( struct gl_context *ctx );
+extern void mgaCalcViewport( struct gl_context *ctx );
extern void mgaUpdateRects( mgaContextPtr mmesa, GLuint buffers );
#endif
diff --git a/src/mesa/drivers/dri/mga/mgatex.c b/src/mesa/drivers/dri/mga/mgatex.c
index ca3dd4b0139..11ab9b6117d 100644
--- a/src/mesa/drivers/dri/mga/mgatex.c
+++ b/src/mesa/drivers/dri/mga/mgatex.c
@@ -161,7 +161,7 @@ static void mgaSetTexBorderColor(mgaTextureObjectPtr t, const GLfloat color[4])
static gl_format
-mgaChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
+mgaChooseTextureFormat( struct gl_context *ctx, GLint internalFormat,
GLenum format, GLenum type )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -336,7 +336,7 @@ mgaAllocTexObj( struct gl_texture_object *tObj )
}
-static void mgaTexEnv( GLcontext *ctx, GLenum target,
+static void mgaTexEnv( struct gl_context *ctx, GLenum target,
GLenum pname, const GLfloat *param )
{
GLuint unit = ctx->Texture.CurrentUnit;
@@ -355,7 +355,7 @@ static void mgaTexEnv( GLcontext *ctx, GLenum target,
}
-static void mgaTexImage2D( GLcontext *ctx, GLenum target, GLint level,
+static void mgaTexImage2D( struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -384,7 +384,7 @@ static void mgaTexImage2D( GLcontext *ctx, GLenum target, GLint level,
t->dirty_images[0] |= (1UL << level);
}
-static void mgaTexSubImage2D( GLcontext *ctx,
+static void mgaTexSubImage2D( struct gl_context *ctx,
GLenum target,
GLint level,
GLint xoffset, GLint yoffset,
@@ -424,7 +424,7 @@ static void mgaTexSubImage2D( GLcontext *ctx,
*/
static void
-mgaTexParameter( GLcontext *ctx, GLenum target,
+mgaTexParameter( struct gl_context *ctx, GLenum target,
struct gl_texture_object *tObj,
GLenum pname, const GLfloat *params )
{
@@ -480,7 +480,7 @@ mgaTexParameter( GLcontext *ctx, GLenum target,
static void
-mgaBindTexture( GLcontext *ctx, GLenum target,
+mgaBindTexture( struct gl_context *ctx, GLenum target,
struct gl_texture_object *tObj )
{
assert( (target != GL_TEXTURE_2D && target != GL_TEXTURE_RECTANGLE_NV) ||
@@ -489,7 +489,7 @@ mgaBindTexture( GLcontext *ctx, GLenum target,
static void
-mgaDeleteTexture( GLcontext *ctx, struct gl_texture_object *tObj )
+mgaDeleteTexture( struct gl_context *ctx, struct gl_texture_object *tObj )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
driTextureObject * t = (driTextureObject *) tObj->DriverData;
@@ -516,7 +516,7 @@ mgaDeleteTexture( GLcontext *ctx, struct gl_texture_object *tObj )
* texture object from the core mesa gl_texture_object. Not done at this time.
*/
static struct gl_texture_object *
-mgaNewTextureObject( GLcontext *ctx, GLuint name, GLenum target )
+mgaNewTextureObject( struct gl_context *ctx, GLuint name, GLenum target )
{
struct gl_texture_object *obj;
obj = _mesa_new_texture_object(ctx, name, target);
diff --git a/src/mesa/drivers/dri/mga/mgatex.h b/src/mesa/drivers/dri/mga/mgatex.h
index 789034964a0..3827fb06686 100644
--- a/src/mesa/drivers/dri/mga/mgatex.h
+++ b/src/mesa/drivers/dri/mga/mgatex.h
@@ -37,7 +37,7 @@ typedef struct mga_texture_object_s *mgaTextureObjectPtr;
* state is properly setup. Texture residence is checked later
* when we grab the lock.
*/
-void mgaUpdateTextureState( GLcontext *ctx );
+void mgaUpdateTextureState( struct gl_context *ctx );
int mgaUploadTexImages( mgaContextPtr mmesa, mgaTextureObjectPtr t );
@@ -45,6 +45,6 @@ void mgaDestroyTexObj( mgaContextPtr mmesa, mgaTextureObjectPtr t );
void mgaInitTextureFuncs( struct dd_function_table *functions );
-GLboolean mgaUpdateTextureEnvCombine( GLcontext *ctx, int unit );
+GLboolean mgaUpdateTextureEnvCombine( struct gl_context *ctx, int unit );
#endif
diff --git a/src/mesa/drivers/dri/mga/mgatris.c b/src/mesa/drivers/dri/mga/mgatris.c
index 07cf682f6e4..7b06774adb4 100644
--- a/src/mesa/drivers/dri/mga/mgatris.c
+++ b/src/mesa/drivers/dri/mga/mgatris.c
@@ -40,7 +40,7 @@
#include "mgavb.h"
-static void mgaRenderPrimitive( GLcontext *ctx, GLenum prim );
+static void mgaRenderPrimitive( struct gl_context *ctx, GLenum prim );
/***********************************************************************
* Functions to draw basic primitives *
@@ -285,7 +285,7 @@ mga_fallback_tri( mgaContextPtr mmesa,
mgaVertex *v1,
mgaVertex *v2 )
{
- GLcontext *ctx = mmesa->glCtx;
+ struct gl_context *ctx = mmesa->glCtx;
SWvertex v[3];
mga_translate_vertex( ctx, v0, &v[0] );
mga_translate_vertex( ctx, v1, &v[1] );
@@ -299,7 +299,7 @@ mga_fallback_line( mgaContextPtr mmesa,
mgaVertex *v0,
mgaVertex *v1 )
{
- GLcontext *ctx = mmesa->glCtx;
+ struct gl_context *ctx = mmesa->glCtx;
SWvertex v[2];
mga_translate_vertex( ctx, v0, &v[0] );
mga_translate_vertex( ctx, v1, &v[1] );
@@ -311,7 +311,7 @@ static void
mga_fallback_point( mgaContextPtr mmesa,
mgaVertex *v0 )
{
- GLcontext *ctx = mmesa->glCtx;
+ struct gl_context *ctx = mmesa->glCtx;
SWvertex v[1];
mga_translate_vertex( ctx, v0, &v[0] );
_swrast_Point( ctx, &v[0] );
@@ -630,7 +630,7 @@ static void init_rast_tab( void )
-static void mgaRenderClippedPoly( GLcontext *ctx, const GLuint *elts, GLuint n )
+static void mgaRenderClippedPoly( struct gl_context *ctx, const GLuint *elts, GLuint n )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -652,13 +652,13 @@ static void mgaRenderClippedPoly( GLcontext *ctx, const GLuint *elts, GLuint n )
tnl->Driver.Render.PrimitiveNotify( ctx, prim );
}
-static void mgaRenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj )
+static void mgaRenderClippedLine( struct gl_context *ctx, GLuint ii, GLuint jj )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
tnl->Driver.Render.Line( ctx, ii, jj );
}
-static void mgaFastRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
+static void mgaFastRenderClippedPoly( struct gl_context *ctx, const GLuint *elts,
GLuint n )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
@@ -687,7 +687,7 @@ static void mgaFastRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
#define ANY_RASTER_FLAGS (DD_FLATSHADE|DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET| \
DD_TRI_UNFILLED)
-void mgaChooseRenderState(GLcontext *ctx)
+void mgaChooseRenderState(struct gl_context *ctx)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -773,7 +773,7 @@ static GLenum reduced_prim[GL_POLYGON+1] = {
/* Always called between RenderStart and RenderFinish --> We already
* hold the lock.
*/
-void mgaRasterPrimitive( GLcontext *ctx, GLenum prim, GLuint hwprim )
+void mgaRasterPrimitive( struct gl_context *ctx, GLenum prim, GLuint hwprim )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
@@ -806,7 +806,7 @@ void mgaRasterPrimitive( GLcontext *ctx, GLenum prim, GLuint hwprim )
* which renders strips as strips, the equivalent calculations are
* performed in mgarender.c.
*/
-static void mgaRenderPrimitive( GLcontext *ctx, GLenum prim )
+static void mgaRenderPrimitive( struct gl_context *ctx, GLenum prim )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
GLuint rprim = reduced_prim[prim];
@@ -821,7 +821,7 @@ static void mgaRenderPrimitive( GLcontext *ctx, GLenum prim )
}
}
-static void mgaRenderFinish( GLcontext *ctx )
+static void mgaRenderFinish( struct gl_context *ctx )
{
if (MGA_CONTEXT(ctx)->RenderIndex & MGA_FALLBACK_BIT)
_swrast_flush( ctx );
@@ -856,7 +856,7 @@ static const char *getFallbackString(GLuint bit)
}
-void mgaFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
+void mgaFallback( struct gl_context *ctx, GLuint bit, GLboolean mode )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -893,7 +893,7 @@ void mgaFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
}
-void mgaDDInitTriFuncs( GLcontext *ctx )
+void mgaDDInitTriFuncs( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/mga/mgatris.h b/src/mesa/drivers/dri/mga/mgatris.h
index 43612b80a15..2f574feb936 100644
--- a/src/mesa/drivers/dri/mga/mgatris.h
+++ b/src/mesa/drivers/dri/mga/mgatris.h
@@ -30,11 +30,11 @@
#include "main/mtypes.h"
-extern void mgaDDInitTriFuncs( GLcontext *ctx );
-extern void mgaChooseRenderState( GLcontext *ctx );
-extern void mgaRasterPrimitive( GLcontext *ctx, GLenum prim, GLuint hwprim );
+extern void mgaDDInitTriFuncs( struct gl_context *ctx );
+extern void mgaChooseRenderState( struct gl_context *ctx );
+extern void mgaRasterPrimitive( struct gl_context *ctx, GLenum prim, GLuint hwprim );
-extern void mgaFallback( GLcontext *ctx, GLuint bit, GLboolean mode );
+extern void mgaFallback( struct gl_context *ctx, GLuint bit, GLboolean mode );
#define FALLBACK( ctx, bit, mode ) mgaFallback( ctx, bit, mode )
#define _MGA_NEW_RENDERSTATE (_DD_NEW_POINT_SMOOTH | \
diff --git a/src/mesa/drivers/dri/mga/mgavb.c b/src/mesa/drivers/dri/mga/mgavb.c
index 71bbf33f230..f098aa5cbc0 100644
--- a/src/mesa/drivers/dri/mga/mgavb.c
+++ b/src/mesa/drivers/dri/mga/mgavb.c
@@ -52,10 +52,10 @@
#define MGA_MAX_SETUP 0x80
static struct {
- void (*emit)( GLcontext *, GLuint, GLuint, void *, GLuint );
+ void (*emit)( struct gl_context *, GLuint, GLuint, void *, GLuint );
tnl_interp_func interp;
tnl_copy_pv_func copy_pv;
- GLboolean (*check_tex_sizes)( GLcontext *ctx );
+ GLboolean (*check_tex_sizes)( struct gl_context *ctx );
GLuint vertex_size;
GLuint vertex_format;
} setup_tab[MGA_MAX_SETUP];
@@ -316,7 +316,7 @@ void mgaPrintSetupFlags(char *msg, GLuint flags )
}
-void mgaCheckTexSizes( GLcontext *ctx )
+void mgaCheckTexSizes( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -339,7 +339,7 @@ void mgaCheckTexSizes( GLcontext *ctx )
}
-void mgaBuildVertices( GLcontext *ctx,
+void mgaBuildVertices( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint newinputs )
@@ -386,7 +386,7 @@ void mgaBuildVertices( GLcontext *ctx,
}
-void mgaChooseVertexState( GLcontext *ctx )
+void mgaChooseVertexState( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -433,7 +433,7 @@ void mgaChooseVertexState( GLcontext *ctx )
-void *mga_emit_contiguous_verts( GLcontext *ctx,
+void *mga_emit_contiguous_verts( struct gl_context *ctx,
GLuint start,
GLuint count,
void *dest)
@@ -446,7 +446,7 @@ void *mga_emit_contiguous_verts( GLcontext *ctx,
-void mgaInitVB( GLcontext *ctx )
+void mgaInitVB( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
GLuint size = TNL_CONTEXT(ctx)->vb.Size;
@@ -467,7 +467,7 @@ void mgaInitVB( GLcontext *ctx )
}
-void mgaFreeVB( GLcontext *ctx )
+void mgaFreeVB( struct gl_context *ctx )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
if (mmesa->verts) {
diff --git a/src/mesa/drivers/dri/mga/mgavb.h b/src/mesa/drivers/dri/mga/mgavb.h
index 8d24ab7b5fe..20e5d8ba700 100644
--- a/src/mesa/drivers/dri/mga/mgavb.h
+++ b/src/mesa/drivers/dri/mga/mgavb.h
@@ -39,27 +39,27 @@
_NEW_FOG)
-extern void mgaChooseVertexState( GLcontext *ctx );
-extern void mgaCheckTexSizes( GLcontext *ctx );
-extern void mgaBuildVertices( GLcontext *ctx,
+extern void mgaChooseVertexState( struct gl_context *ctx );
+extern void mgaCheckTexSizes( struct gl_context *ctx );
+extern void mgaBuildVertices( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint newinputs );
extern void mgaPrintSetupFlags(char *msg, GLuint flags );
-extern void mgaInitVB( GLcontext *ctx );
-extern void mgaFreeVB( GLcontext *ctx );
+extern void mgaInitVB( struct gl_context *ctx );
+extern void mgaFreeVB( struct gl_context *ctx );
-extern void *mga_emit_contiguous_verts( GLcontext *ctx,
+extern void *mga_emit_contiguous_verts( struct gl_context *ctx,
GLuint start,
GLuint count,
void *dest );
-extern void mga_translate_vertex(GLcontext *ctx,
+extern void mga_translate_vertex(struct gl_context *ctx,
const mgaVertex *src,
SWvertex *dst);
-extern void mga_print_vertex( GLcontext *ctx, const mgaVertex *v );
+extern void mga_print_vertex( struct gl_context *ctx, const mgaVertex *v );
#endif
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_bo_state.c b/src/mesa/drivers/dri/nouveau/nouveau_bo_state.c
index fc5f77b46a7..f31772fe1d1 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_bo_state.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_bo_state.c
@@ -28,7 +28,7 @@
#include "nouveau_context.h"
static GLboolean
-nouveau_bo_marker_emit(GLcontext *ctx, struct nouveau_bo_marker *m,
+nouveau_bo_marker_emit(struct gl_context *ctx, struct nouveau_bo_marker *m,
uint32_t flags)
{
struct nouveau_channel *chan = context_chan(ctx);
@@ -136,7 +136,7 @@ nouveau_bo_context_reset(struct nouveau_bo_context *bctx)
}
GLboolean
-nouveau_bo_state_emit(GLcontext *ctx)
+nouveau_bo_state_emit(struct gl_context *ctx)
{
struct nouveau_bo_state *s = &to_nouveau_context(ctx)->bo;
int i, j;
@@ -155,7 +155,7 @@ nouveau_bo_state_emit(GLcontext *ctx)
}
void
-nouveau_bo_state_init(GLcontext *ctx)
+nouveau_bo_state_init(struct gl_context *ctx)
{
struct nouveau_bo_state *s = &to_nouveau_context(ctx)->bo;
int i;
@@ -165,7 +165,7 @@ nouveau_bo_state_init(GLcontext *ctx)
}
void
-nouveau_bo_state_destroy(GLcontext *ctx)
+nouveau_bo_state_destroy(struct gl_context *ctx)
{
struct nouveau_bo_state *s = &to_nouveau_context(ctx)->bo;
int i, j;
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_bo_state.h b/src/mesa/drivers/dri/nouveau/nouveau_bo_state.h
index da0a3a5c6fe..6119a8336e3 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_bo_state.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_bo_state.h
@@ -52,7 +52,7 @@ struct nouveau_bo_marker {
};
struct nouveau_bo_context {
- GLcontext *ctx;
+ struct gl_context *ctx;
struct nouveau_bo_marker *marker;
int allocated;
@@ -84,13 +84,13 @@ void
nouveau_bo_context_reset(struct nouveau_bo_context *bctx);
GLboolean
-nouveau_bo_state_emit(GLcontext *ctx);
+nouveau_bo_state_emit(struct gl_context *ctx);
void
-nouveau_bo_state_init(GLcontext *ctx);
+nouveau_bo_state_init(struct gl_context *ctx);
void
-nouveau_bo_state_destroy(GLcontext *ctx);
+nouveau_bo_state_destroy(struct gl_context *ctx);
#define __context_bctx(ctx, i) \
({ \
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c
index 5906ad6d396..ad6e5bd805a 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c
@@ -31,7 +31,7 @@
#include "main/bufferobj.h"
static struct gl_buffer_object *
-nouveau_bufferobj_new(GLcontext *ctx, GLuint buffer, GLenum target)
+nouveau_bufferobj_new(struct gl_context *ctx, GLuint buffer, GLenum target)
{
struct nouveau_bufferobj *nbo;
@@ -45,7 +45,7 @@ nouveau_bufferobj_new(GLcontext *ctx, GLuint buffer, GLenum target)
}
static void
-nouveau_bufferobj_del(GLcontext *ctx, struct gl_buffer_object *obj)
+nouveau_bufferobj_del(struct gl_context *ctx, struct gl_buffer_object *obj)
{
struct nouveau_bufferobj *nbo = to_nouveau_bufferobj(obj);
@@ -54,7 +54,7 @@ nouveau_bufferobj_del(GLcontext *ctx, struct gl_buffer_object *obj)
}
static GLboolean
-nouveau_bufferobj_data(GLcontext *ctx, GLenum target, GLsizeiptrARB size,
+nouveau_bufferobj_data(struct gl_context *ctx, GLenum target, GLsizeiptrARB size,
const GLvoid *data, GLenum usage,
struct gl_buffer_object *obj)
{
@@ -80,7 +80,7 @@ nouveau_bufferobj_data(GLcontext *ctx, GLenum target, GLsizeiptrARB size,
}
static void
-nouveau_bufferobj_subdata(GLcontext *ctx, GLenum target, GLintptrARB offset,
+nouveau_bufferobj_subdata(struct gl_context *ctx, GLenum target, GLintptrARB offset,
GLsizeiptrARB size, const GLvoid *data,
struct gl_buffer_object *obj)
{
@@ -92,7 +92,7 @@ nouveau_bufferobj_subdata(GLcontext *ctx, GLenum target, GLintptrARB offset,
}
static void
-nouveau_bufferobj_get_subdata(GLcontext *ctx, GLenum target, GLintptrARB offset,
+nouveau_bufferobj_get_subdata(struct gl_context *ctx, GLenum target, GLintptrARB offset,
GLsizeiptrARB size, GLvoid *data,
struct gl_buffer_object *obj)
{
@@ -104,7 +104,7 @@ nouveau_bufferobj_get_subdata(GLcontext *ctx, GLenum target, GLintptrARB offset,
}
static void *
-nouveau_bufferobj_map(GLcontext *ctx, GLenum target, GLenum access,
+nouveau_bufferobj_map(struct gl_context *ctx, GLenum target, GLenum access,
struct gl_buffer_object *obj)
{
return ctx->Driver.MapBufferRange(ctx, target, 0, obj->Size, access,
@@ -112,7 +112,7 @@ nouveau_bufferobj_map(GLcontext *ctx, GLenum target, GLenum access,
}
static void *
-nouveau_bufferobj_map_range(GLcontext *ctx, GLenum target, GLintptr offset,
+nouveau_bufferobj_map_range(struct gl_context *ctx, GLenum target, GLintptr offset,
GLsizeiptr length, GLenum access,
struct gl_buffer_object *obj)
{
@@ -142,7 +142,7 @@ nouveau_bufferobj_map_range(GLcontext *ctx, GLenum target, GLintptr offset,
}
static GLboolean
-nouveau_bufferobj_unmap(GLcontext *ctx, GLenum target, struct gl_buffer_object *obj)
+nouveau_bufferobj_unmap(struct gl_context *ctx, GLenum target, struct gl_buffer_object *obj)
{
struct nouveau_bufferobj *nbo = to_nouveau_bufferobj(obj);
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c
index 1121d2d3d39..0ace139b886 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_context.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c
@@ -69,7 +69,7 @@ static void
nouveau_channel_flush_notify(struct nouveau_channel *chan)
{
struct nouveau_context *nctx = chan->user_private;
- GLcontext *ctx = &nctx->base;
+ struct gl_context *ctx = &nctx->base;
if (nctx->fallback < SWRAST)
nouveau_bo_state_emit(ctx);
@@ -77,13 +77,13 @@ nouveau_channel_flush_notify(struct nouveau_channel *chan)
GLboolean
nouveau_context_create(gl_api api,
- const __GLcontextModes *visual, __DRIcontext *dri_ctx,
+ const struct gl_config *visual, __DRIcontext *dri_ctx,
void *share_ctx)
{
__DRIscreen *dri_screen = dri_ctx->driScreenPriv;
struct nouveau_screen *screen = dri_screen->private;
struct nouveau_context *nctx;
- GLcontext *ctx;
+ struct gl_context *ctx;
ctx = screen->driver->context_create(screen, visual, share_ctx);
if (!ctx)
@@ -97,8 +97,8 @@ nouveau_context_create(gl_api api,
}
GLboolean
-nouveau_context_init(GLcontext *ctx, struct nouveau_screen *screen,
- const GLvisual *visual, GLcontext *share_ctx)
+nouveau_context_init(struct gl_context *ctx, struct nouveau_screen *screen,
+ const struct gl_config *visual, struct gl_context *share_ctx)
{
struct nouveau_context *nctx = to_nouveau_context(ctx);
struct dd_function_table functions;
@@ -128,7 +128,7 @@ nouveau_context_init(GLcontext *ctx, struct nouveau_screen *screen,
/* Allocate a hardware channel. */
ret = nouveau_channel_alloc(context_dev(ctx), 0xbeef0201, 0xbeef0202,
- &nctx->hw.chan);
+ 512*1024, &nctx->hw.chan);
if (ret) {
nouveau_error("Error initializing the FIFO.\n");
return GL_FALSE;
@@ -144,7 +144,7 @@ nouveau_context_init(GLcontext *ctx, struct nouveau_screen *screen,
}
void
-nouveau_context_deinit(GLcontext *ctx)
+nouveau_context_deinit(struct gl_context *ctx)
{
struct nouveau_context *nctx = to_nouveau_context(ctx);
@@ -171,7 +171,7 @@ void
nouveau_context_destroy(__DRIcontext *dri_ctx)
{
struct nouveau_context *nctx = dri_ctx->driverPrivate;
- GLcontext *ctx = &nctx->base;
+ struct gl_context *ctx = &nctx->base;
context_drv(ctx)->context_destroy(ctx);
}
@@ -179,7 +179,8 @@ nouveau_context_destroy(__DRIcontext *dri_ctx)
void
nouveau_update_renderbuffers(__DRIcontext *dri_ctx, __DRIdrawable *draw)
{
- GLcontext *ctx = dri_ctx->driverPrivate;
+ struct gl_context *ctx = dri_ctx->driverPrivate;
+ struct nouveau_context *nctx = to_nouveau_context(ctx);
__DRIscreen *screen = dri_ctx->driScreenPriv;
struct gl_framebuffer *fb = draw->driverPrivate;
struct nouveau_framebuffer *nfb = to_nouveau_framebuffer(fb);
@@ -211,6 +212,7 @@ nouveau_update_renderbuffers(__DRIcontext *dri_ctx, __DRIdrawable *draw)
for (i = 0; i < count; i++) {
struct gl_renderbuffer *rb;
struct nouveau_surface *s;
+ uint32_t old_name;
int index;
switch (buffers[i].attachment) {
@@ -240,6 +242,16 @@ nouveau_update_renderbuffers(__DRIcontext *dri_ctx, __DRIdrawable *draw)
s->pitch = buffers[i].pitch;
s->cpp = buffers[i].cpp;
+ if (index == BUFFER_DEPTH && s->bo) {
+ ret = nouveau_bo_handle_get(s->bo, &old_name);
+ /*
+ * Disable fast Z clears in the next frame, the
+ * depth buffer contents are undefined.
+ */
+ if (!ret && old_name != buffers[i].name)
+ nctx->hierz.clear_seq = 0;
+ }
+
nouveau_bo_ref(NULL, &s->bo);
ret = nouveau_bo_handle_ref(context_dev(ctx),
buffers[i].name, &s->bo);
@@ -253,7 +265,7 @@ static void
update_framebuffer(__DRIcontext *dri_ctx, __DRIdrawable *draw,
int *stamp)
{
- GLcontext *ctx = dri_ctx->driverPrivate;
+ struct gl_context *ctx = dri_ctx->driverPrivate;
struct gl_framebuffer *fb = draw->driverPrivate;
*stamp = *draw->pStamp;
@@ -273,7 +285,7 @@ nouveau_context_make_current(__DRIcontext *dri_ctx, __DRIdrawable *dri_draw,
{
if (dri_ctx) {
struct nouveau_context *nctx = dri_ctx->driverPrivate;
- GLcontext *ctx = &nctx->base;
+ struct gl_context *ctx = &nctx->base;
/* Ask the X server for new renderbuffers. */
if (dri_draw->driverPrivate != ctx->WinSysDrawBuffer)
@@ -307,7 +319,7 @@ nouveau_context_unbind(__DRIcontext *dri_ctx)
}
void
-nouveau_fallback(GLcontext *ctx, enum nouveau_fallback mode)
+nouveau_fallback(struct gl_context *ctx, enum nouveau_fallback mode)
{
struct nouveau_context *nctx = to_nouveau_context(ctx);
@@ -339,7 +351,7 @@ validate_framebuffer(__DRIcontext *dri_ctx, __DRIdrawable *draw,
}
void
-nouveau_validate_framebuffer(GLcontext *ctx)
+nouveau_validate_framebuffer(struct gl_context *ctx)
{
__DRIcontext *dri_ctx = to_nouveau_context(ctx)->dri_context;
__DRIdrawable *dri_draw = dri_ctx->driDrawablePriv;
@@ -353,6 +365,5 @@ nouveau_validate_framebuffer(GLcontext *ctx)
validate_framebuffer(dri_ctx, dri_read,
&dri_ctx->dri2.read_stamp);
- if (nouveau_next_dirty_state(ctx) >= 0)
- nouveau_state_emit(ctx);
+ nouveau_state_emit(ctx);
}
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h
index 5f00327119b..23a87256728 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_context.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h
@@ -57,7 +57,7 @@ struct nouveau_hw_state {
};
struct nouveau_context {
- GLcontext base;
+ struct gl_context base;
__DRIcontext *dri_context;
struct nouveau_screen *screen;
@@ -95,15 +95,15 @@ struct nouveau_context {
GLboolean
nouveau_context_create(gl_api api,
- const __GLcontextModes *visual, __DRIcontext *dri_ctx,
+ const struct gl_config *visual, __DRIcontext *dri_ctx,
void *share_ctx);
GLboolean
-nouveau_context_init(GLcontext *ctx, struct nouveau_screen *screen,
- const GLvisual *visual, GLcontext *share_ctx);
+nouveau_context_init(struct gl_context *ctx, struct nouveau_screen *screen,
+ const struct gl_config *visual, struct gl_context *share_ctx);
void
-nouveau_context_deinit(GLcontext *ctx);
+nouveau_context_deinit(struct gl_context *ctx);
void
nouveau_context_destroy(__DRIcontext *dri_ctx);
@@ -119,10 +119,10 @@ GLboolean
nouveau_context_unbind(__DRIcontext *dri_ctx);
void
-nouveau_fallback(GLcontext *ctx, enum nouveau_fallback mode);
+nouveau_fallback(struct gl_context *ctx, enum nouveau_fallback mode);
void
-nouveau_validate_framebuffer(GLcontext *ctx);
+nouveau_validate_framebuffer(struct gl_context *ctx);
#endif
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_driver.c b/src/mesa/drivers/dri/nouveau/nouveau_driver.c
index 6452fe218e5..27e2892f711 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_driver.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_driver.c
@@ -32,7 +32,7 @@
#include "drivers/common/meta.h"
static const GLubyte *
-nouveau_get_string(GLcontext *ctx, GLenum name)
+nouveau_get_string(struct gl_context *ctx, GLenum name)
{
static char buffer[128];
char hardware_name[32];
@@ -52,7 +52,7 @@ nouveau_get_string(GLcontext *ctx, GLenum name)
}
static void
-nouveau_flush(GLcontext *ctx)
+nouveau_flush(struct gl_context *ctx)
{
struct nouveau_context *nctx = to_nouveau_context(ctx);
struct nouveau_channel *chan = context_chan(ctx);
@@ -70,13 +70,13 @@ nouveau_flush(GLcontext *ctx)
}
static void
-nouveau_finish(GLcontext *ctx)
+nouveau_finish(struct gl_context *ctx)
{
nouveau_flush(ctx);
}
void
-nouveau_clear(GLcontext *ctx, GLbitfield buffers)
+nouveau_clear(struct gl_context *ctx, GLbitfield buffers)
{
struct gl_framebuffer *fb = ctx->DrawBuffer;
int x, y, w, h;
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_driver.h b/src/mesa/drivers/dri/nouveau/nouveau_driver.h
index 283f6eac2c8..8036b18edc0 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_driver.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_driver.h
@@ -51,16 +51,16 @@
#define DRIVER_AUTHOR "Nouveau"
struct nouveau_driver {
- GLcontext *(*context_create)(struct nouveau_screen *screen,
- const GLvisual *visual,
- GLcontext *share_ctx);
- void (*context_destroy)(GLcontext *ctx);
+ struct gl_context *(*context_create)(struct nouveau_screen *screen,
+ const struct gl_config *visual,
+ struct gl_context *share_ctx);
+ void (*context_destroy)(struct gl_context *ctx);
- void (*surface_copy)(GLcontext *ctx,
+ void (*surface_copy)(struct gl_context *ctx,
struct nouveau_surface *dst,
struct nouveau_surface *src,
int dx, int dy, int sx, int sy, int w, int h);
- void (*surface_fill)(GLcontext *ctx,
+ void (*surface_fill)(struct gl_context *ctx,
struct nouveau_surface *dst,
unsigned mask, unsigned value,
int dx, int dy, int w, int h);
@@ -73,10 +73,10 @@ struct nouveau_driver {
fprintf(stderr, "%s: " format, __func__, ## __VA_ARGS__)
void
-nouveau_clear(GLcontext *ctx, GLbitfield buffers);
+nouveau_clear(struct gl_context *ctx, GLbitfield buffers);
void
-nouveau_span_functions_init(GLcontext *ctx);
+nouveau_span_functions_init(struct gl_context *ctx);
void
nouveau_driver_functions_init(struct dd_function_table *functions);
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
index f0caf4c6291..079b5d63e4c 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
@@ -86,7 +86,7 @@ set_renderbuffer_format(struct gl_renderbuffer *rb, GLenum internalFormat)
}
static GLboolean
-nouveau_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
+nouveau_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLenum internalFormat,
GLuint width, GLuint height)
{
@@ -115,7 +115,7 @@ nouveau_renderbuffer_del(struct gl_renderbuffer *rb)
}
static struct gl_renderbuffer *
-nouveau_renderbuffer_new(GLcontext *ctx, GLuint name)
+nouveau_renderbuffer_new(struct gl_context *ctx, GLuint name)
{
struct gl_renderbuffer *rb;
@@ -133,7 +133,7 @@ nouveau_renderbuffer_new(GLcontext *ctx, GLuint name)
}
static GLboolean
-nouveau_renderbuffer_dri_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
+nouveau_renderbuffer_dri_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLenum internalFormat,
GLuint width, GLuint height)
{
@@ -166,7 +166,7 @@ nouveau_renderbuffer_dri_new(GLenum format, __DRIdrawable *drawable)
}
static struct gl_framebuffer *
-nouveau_framebuffer_new(GLcontext *ctx, GLuint name)
+nouveau_framebuffer_new(struct gl_context *ctx, GLuint name)
{
struct nouveau_framebuffer *nfb;
@@ -180,7 +180,7 @@ nouveau_framebuffer_new(GLcontext *ctx, GLuint name)
}
struct gl_framebuffer *
-nouveau_framebuffer_dri_new(const GLvisual *visual)
+nouveau_framebuffer_dri_new(const struct gl_config *visual)
{
struct nouveau_framebuffer *nfb;
@@ -195,7 +195,7 @@ nouveau_framebuffer_dri_new(const GLvisual *visual)
}
static void
-nouveau_bind_framebuffer(GLcontext *ctx, GLenum target,
+nouveau_bind_framebuffer(struct gl_context *ctx, GLenum target,
struct gl_framebuffer *dfb,
struct gl_framebuffer *rfb)
{
@@ -203,7 +203,7 @@ nouveau_bind_framebuffer(GLcontext *ctx, GLenum target,
}
static void
-nouveau_framebuffer_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb,
+nouveau_framebuffer_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
GLenum attachment, struct gl_renderbuffer *rb)
{
_mesa_framebuffer_renderbuffer(ctx, fb, attachment, rb);
@@ -227,7 +227,7 @@ get_tex_format(struct gl_texture_image *ti)
}
static void
-nouveau_render_texture(GLcontext *ctx, struct gl_framebuffer *fb,
+nouveau_render_texture(struct gl_context *ctx, struct gl_framebuffer *fb,
struct gl_renderbuffer_attachment *att)
{
struct gl_renderbuffer *rb = att->Renderbuffer;
@@ -255,7 +255,7 @@ nouveau_render_texture(GLcontext *ctx, struct gl_framebuffer *fb,
}
static void
-nouveau_finish_render_texture(GLcontext *ctx,
+nouveau_finish_render_texture(struct gl_context *ctx,
struct gl_renderbuffer_attachment *att)
{
texture_dirty(att->Texture);
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fbo.h b/src/mesa/drivers/dri/nouveau/nouveau_fbo.h
index 05ea03a075f..b1d5d8da45f 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_fbo.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_fbo.h
@@ -45,7 +45,7 @@ struct nouveau_renderbuffer {
#define to_nouveau_renderbuffer(x) ((struct nouveau_renderbuffer *)(x))
struct gl_framebuffer *
-nouveau_framebuffer_dri_new(const GLvisual *visual);
+nouveau_framebuffer_dri_new(const struct gl_config *visual);
struct gl_renderbuffer *
nouveau_renderbuffer_dri_new(GLenum format, __DRIdrawable *drawable);
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_render.h b/src/mesa/drivers/dri/nouveau/nouveau_render.h
index 29d96eda77c..81c6119fcc6 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_render.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_render.h
@@ -31,7 +31,7 @@
struct nouveau_array_state;
-typedef void (*dispatch_t)(GLcontext *, unsigned int, int, unsigned int);
+typedef void (*dispatch_t)(struct gl_context *, unsigned int, int, unsigned int);
typedef unsigned (*extract_u_t)(struct nouveau_array_state *, int, int);
typedef float (*extract_f_t)(struct nouveau_array_state *, int, int);
@@ -40,7 +40,7 @@ struct nouveau_attr_info {
int imm_method;
int imm_fields;
- void (*emit)(GLcontext *, struct nouveau_array_state *, const void *);
+ void (*emit)(struct gl_context *, struct nouveau_array_state *, const void *);
};
struct nouveau_array_state {
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_render_t.c b/src/mesa/drivers/dri/nouveau/nouveau_render_t.c
index 7ccd7e64165..dd38c14aa7c 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_render_t.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_render_t.c
@@ -104,9 +104,9 @@ static void
get_array_dispatch(struct nouveau_array_state *a, dispatch_t *dispatch)
{
if (!a->fields) {
- auto void f(GLcontext *, unsigned int, int, unsigned int);
+ auto void f(struct gl_context *, unsigned int, int, unsigned int);
- void f(GLcontext *ctx, unsigned int start, int delta,
+ void f(struct gl_context *ctx, unsigned int start, int delta,
unsigned int n) {
struct nouveau_channel *chan = context_chan(ctx);
RENDER_LOCALS(ctx);
@@ -117,9 +117,9 @@ get_array_dispatch(struct nouveau_array_state *a, dispatch_t *dispatch)
*dispatch = f;
} else if (a->type == GL_UNSIGNED_INT) {
- auto void f(GLcontext *, unsigned int, int, unsigned int);
+ auto void f(struct gl_context *, unsigned int, int, unsigned int);
- void f(GLcontext *ctx, unsigned int start, int delta,
+ void f(struct gl_context *ctx, unsigned int start, int delta,
unsigned int n) {
struct nouveau_channel *chan = context_chan(ctx);
RENDER_LOCALS(ctx);
@@ -130,9 +130,9 @@ get_array_dispatch(struct nouveau_array_state *a, dispatch_t *dispatch)
*dispatch = f;
} else {
- auto void f(GLcontext *, unsigned int, int, unsigned int);
+ auto void f(struct gl_context *, unsigned int, int, unsigned int);
- void f(GLcontext *ctx, unsigned int start, int delta,
+ void f(struct gl_context *ctx, unsigned int start, int delta,
unsigned int n) {
struct nouveau_channel *chan = context_chan(ctx);
RENDER_LOCALS(ctx);
@@ -208,7 +208,7 @@ get_array_extract(struct nouveau_array_state *a,
* always be located right at the beginning of <bo>.
*/
static inline void *
-get_scratch_vbo(GLcontext *ctx, unsigned size, struct nouveau_bo **bo,
+get_scratch_vbo(struct gl_context *ctx, unsigned size, struct nouveau_bo **bo,
unsigned *offset)
{
struct nouveau_scratch_state *scratch = &to_render_state(ctx)->scratch;
@@ -253,7 +253,7 @@ get_scratch_vbo(GLcontext *ctx, unsigned size, struct nouveau_bo **bo,
* Returns how many vertices you can draw using <n> pushbuf dwords.
*/
static inline unsigned
-get_max_vertices(GLcontext *ctx, const struct _mesa_index_buffer *ib,
+get_max_vertices(struct gl_context *ctx, const struct _mesa_index_buffer *ib,
int n)
{
struct nouveau_render_state *render = to_render_state(ctx);
@@ -290,7 +290,7 @@ get_max_vertices(GLcontext *ctx, const struct _mesa_index_buffer *ib,
#include "nouveau_swtnl_t.c"
static void
-TAG(emit_material)(GLcontext *ctx, struct nouveau_array_state *a,
+TAG(emit_material)(struct gl_context *ctx, struct nouveau_array_state *a,
const void *v)
{
const int attr = a->attr - VERT_ATTRIB_GENERIC0;
@@ -314,7 +314,7 @@ TAG(emit_material)(GLcontext *ctx, struct nouveau_array_state *a,
}
static void
-TAG(render_prims)(GLcontext *ctx, const struct gl_client_array **arrays,
+TAG(render_prims)(struct gl_context *ctx, const struct gl_client_array **arrays,
const struct _mesa_prim *prims, GLuint nr_prims,
const struct _mesa_index_buffer *ib,
GLboolean index_bounds_valid,
@@ -334,7 +334,7 @@ TAG(render_prims)(GLcontext *ctx, const struct gl_client_array **arrays,
}
void
-TAG(render_init)(GLcontext *ctx)
+TAG(render_init)(struct gl_context *ctx)
{
struct nouveau_render_state *render = to_render_state(ctx);
struct nouveau_scratch_state *scratch = &render->scratch;
@@ -355,7 +355,7 @@ TAG(render_init)(GLcontext *ctx)
}
void
-TAG(render_destroy)(GLcontext *ctx)
+TAG(render_destroy)(struct gl_context *ctx)
{
TAG(swtnl_destroy)(ctx);
}
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c
index 4330c8d9473..a6e2186cf43 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c
@@ -153,7 +153,7 @@ nouveau_destroy_screen(__DRIscreen *dri_screen)
static GLboolean
nouveau_create_buffer(__DRIscreen *dri_screen,
__DRIdrawable *drawable,
- const __GLcontextModes *visual,
+ const struct gl_config *visual,
GLboolean is_pixmap)
{
struct gl_renderbuffer *rb;
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_span.c b/src/mesa/drivers/dri/nouveau/nouveau_span.c
index 1bfdecc6a21..761cc769efe 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_span.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_span.c
@@ -131,7 +131,7 @@ renderbuffer_map_unmap(struct gl_renderbuffer *rb, GLboolean map)
}
static void
-texture_unit_map_unmap(GLcontext *ctx, struct gl_texture_unit *u, GLboolean map)
+texture_unit_map_unmap(struct gl_context *ctx, struct gl_texture_unit *u, GLboolean map)
{
if (!u->_ReallyEnabled)
return;
@@ -157,7 +157,7 @@ framebuffer_map_unmap(struct gl_framebuffer *fb, GLboolean map)
}
static void
-span_map_unmap(GLcontext *ctx, GLboolean map)
+span_map_unmap(struct gl_context *ctx, GLboolean map)
{
int i;
@@ -171,21 +171,21 @@ span_map_unmap(GLcontext *ctx, GLboolean map)
}
static void
-nouveau_span_start(GLcontext *ctx)
+nouveau_span_start(struct gl_context *ctx)
{
nouveau_fallback(ctx, SWRAST);
span_map_unmap(ctx, GL_TRUE);
}
static void
-nouveau_span_finish(GLcontext *ctx)
+nouveau_span_finish(struct gl_context *ctx)
{
span_map_unmap(ctx, GL_FALSE);
nouveau_fallback(ctx, HWTNL);
}
void
-nouveau_span_functions_init(GLcontext *ctx)
+nouveau_span_functions_init(struct gl_context *ctx)
{
struct swrast_device_driver *swdd =
_swrast_GetDeviceDriverReference(ctx);
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c
index 01bcbc4b3cc..7b7ddd2f54d 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_state.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c
@@ -33,45 +33,45 @@
#include "tnl/tnl.h"
static void
-nouveau_alpha_func(GLcontext *ctx, GLenum func, GLfloat ref)
+nouveau_alpha_func(struct gl_context *ctx, GLenum func, GLfloat ref)
{
context_dirty(ctx, ALPHA_FUNC);
}
static void
-nouveau_blend_color(GLcontext *ctx, const GLfloat color[4])
+nouveau_blend_color(struct gl_context *ctx, const GLfloat color[4])
{
context_dirty(ctx, BLEND_COLOR);
}
static void
-nouveau_blend_equation_separate(GLcontext *ctx, GLenum modeRGB, GLenum modeA)
+nouveau_blend_equation_separate(struct gl_context *ctx, GLenum modeRGB, GLenum modeA)
{
context_dirty(ctx, BLEND_EQUATION);
}
static void
-nouveau_blend_func_separate(GLcontext *ctx, GLenum sfactorRGB,
+nouveau_blend_func_separate(struct gl_context *ctx, GLenum sfactorRGB,
GLenum dfactorRGB, GLenum sfactorA, GLenum dfactorA)
{
context_dirty(ctx, BLEND_FUNC);
}
static void
-nouveau_clip_plane(GLcontext *ctx, GLenum plane, const GLfloat *equation)
+nouveau_clip_plane(struct gl_context *ctx, GLenum plane, const GLfloat *equation)
{
context_dirty_i(ctx, CLIP_PLANE, plane - GL_CLIP_PLANE0);
}
static void
-nouveau_color_mask(GLcontext *ctx, GLboolean rmask, GLboolean gmask,
+nouveau_color_mask(struct gl_context *ctx, GLboolean rmask, GLboolean gmask,
GLboolean bmask, GLboolean amask)
{
context_dirty(ctx, COLOR_MASK);
}
static void
-nouveau_color_material(GLcontext *ctx, GLenum face, GLenum mode)
+nouveau_color_material(struct gl_context *ctx, GLenum face, GLenum mode)
{
context_dirty(ctx, COLOR_MATERIAL);
context_dirty(ctx, MATERIAL_FRONT_AMBIENT);
@@ -83,44 +83,44 @@ nouveau_color_material(GLcontext *ctx, GLenum face, GLenum mode)
}
static void
-nouveau_cull_face(GLcontext *ctx, GLenum mode)
+nouveau_cull_face(struct gl_context *ctx, GLenum mode)
{
context_dirty(ctx, CULL_FACE);
}
static void
-nouveau_front_face(GLcontext *ctx, GLenum mode)
+nouveau_front_face(struct gl_context *ctx, GLenum mode)
{
context_dirty(ctx, FRONT_FACE);
}
static void
-nouveau_depth_func(GLcontext *ctx, GLenum func)
+nouveau_depth_func(struct gl_context *ctx, GLenum func)
{
context_dirty(ctx, DEPTH);
}
static void
-nouveau_depth_mask(GLcontext *ctx, GLboolean flag)
+nouveau_depth_mask(struct gl_context *ctx, GLboolean flag)
{
context_dirty(ctx, DEPTH);
}
static void
-nouveau_depth_range(GLcontext *ctx, GLclampd nearval, GLclampd farval)
+nouveau_depth_range(struct gl_context *ctx, GLclampd nearval, GLclampd farval)
{
context_dirty(ctx, VIEWPORT);
}
static void
-nouveau_draw_buffers(GLcontext *ctx, GLsizei n, const GLenum *buffers)
+nouveau_draw_buffers(struct gl_context *ctx, GLsizei n, const GLenum *buffers)
{
nouveau_validate_framebuffer(ctx);
context_dirty(ctx, FRAMEBUFFER);
}
static void
-nouveau_enable(GLcontext *ctx, GLenum cap, GLboolean state)
+nouveau_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
{
int i;
@@ -242,13 +242,13 @@ nouveau_enable(GLcontext *ctx, GLenum cap, GLboolean state)
}
static void
-nouveau_fog(GLcontext *ctx, GLenum pname, const GLfloat *params)
+nouveau_fog(struct gl_context *ctx, GLenum pname, const GLfloat *params)
{
context_dirty(ctx, FOG);
}
static void
-nouveau_light(GLcontext *ctx, GLenum light, GLenum pname, const GLfloat *params)
+nouveau_light(struct gl_context *ctx, GLenum light, GLenum pname, const GLfloat *params)
{
switch (pname) {
case GL_AMBIENT:
@@ -276,100 +276,100 @@ nouveau_light(GLcontext *ctx, GLenum light, GLenum pname, const GLfloat *params)
}
static void
-nouveau_light_model(GLcontext *ctx, GLenum pname, const GLfloat *params)
+nouveau_light_model(struct gl_context *ctx, GLenum pname, const GLfloat *params)
{
context_dirty(ctx, LIGHT_MODEL);
context_dirty(ctx, MODELVIEW);
}
static void
-nouveau_line_stipple(GLcontext *ctx, GLint factor, GLushort pattern )
+nouveau_line_stipple(struct gl_context *ctx, GLint factor, GLushort pattern )
{
context_dirty(ctx, LINE_STIPPLE);
}
static void
-nouveau_line_width(GLcontext *ctx, GLfloat width)
+nouveau_line_width(struct gl_context *ctx, GLfloat width)
{
context_dirty(ctx, LINE_MODE);
}
static void
-nouveau_logic_opcode(GLcontext *ctx, GLenum opcode)
+nouveau_logic_opcode(struct gl_context *ctx, GLenum opcode)
{
context_dirty(ctx, LOGIC_OPCODE);
}
static void
-nouveau_point_parameter(GLcontext *ctx, GLenum pname, const GLfloat *params)
+nouveau_point_parameter(struct gl_context *ctx, GLenum pname, const GLfloat *params)
{
context_dirty(ctx, POINT_PARAMETER);
}
static void
-nouveau_point_size(GLcontext *ctx, GLfloat size)
+nouveau_point_size(struct gl_context *ctx, GLfloat size)
{
context_dirty(ctx, POINT_MODE);
}
static void
-nouveau_polygon_mode(GLcontext *ctx, GLenum face, GLenum mode)
+nouveau_polygon_mode(struct gl_context *ctx, GLenum face, GLenum mode)
{
context_dirty(ctx, POLYGON_MODE);
}
static void
-nouveau_polygon_offset(GLcontext *ctx, GLfloat factor, GLfloat units)
+nouveau_polygon_offset(struct gl_context *ctx, GLfloat factor, GLfloat units)
{
context_dirty(ctx, POLYGON_OFFSET);
}
static void
-nouveau_polygon_stipple(GLcontext *ctx, const GLubyte *mask)
+nouveau_polygon_stipple(struct gl_context *ctx, const GLubyte *mask)
{
context_dirty(ctx, POLYGON_STIPPLE);
}
static void
-nouveau_render_mode(GLcontext *ctx, GLenum mode)
+nouveau_render_mode(struct gl_context *ctx, GLenum mode)
{
context_dirty(ctx, RENDER_MODE);
}
static void
-nouveau_scissor(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
+nouveau_scissor(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
{
context_dirty(ctx, SCISSOR);
}
static void
-nouveau_shade_model(GLcontext *ctx, GLenum mode)
+nouveau_shade_model(struct gl_context *ctx, GLenum mode)
{
context_dirty(ctx, SHADE_MODEL);
}
static void
-nouveau_stencil_func_separate(GLcontext *ctx, GLenum face, GLenum func,
+nouveau_stencil_func_separate(struct gl_context *ctx, GLenum face, GLenum func,
GLint ref, GLuint mask)
{
context_dirty(ctx, STENCIL_FUNC);
}
static void
-nouveau_stencil_mask_separate(GLcontext *ctx, GLenum face, GLuint mask)
+nouveau_stencil_mask_separate(struct gl_context *ctx, GLenum face, GLuint mask)
{
context_dirty(ctx, STENCIL_MASK);
}
static void
-nouveau_stencil_op_separate(GLcontext *ctx, GLenum face, GLenum fail,
+nouveau_stencil_op_separate(struct gl_context *ctx, GLenum face, GLenum fail,
GLenum zfail, GLenum zpass)
{
context_dirty(ctx, STENCIL_OP);
}
static void
-nouveau_tex_gen(GLcontext *ctx, GLenum coord, GLenum pname,
+nouveau_tex_gen(struct gl_context *ctx, GLenum coord, GLenum pname,
const GLfloat *params)
{
switch (pname) {
@@ -384,7 +384,7 @@ nouveau_tex_gen(GLcontext *ctx, GLenum coord, GLenum pname,
}
static void
-nouveau_tex_env(GLcontext *ctx, GLenum target, GLenum pname,
+nouveau_tex_env(struct gl_context *ctx, GLenum target, GLenum pname,
const GLfloat *param)
{
switch (target) {
@@ -398,7 +398,7 @@ nouveau_tex_env(GLcontext *ctx, GLenum target, GLenum pname,
}
static void
-nouveau_tex_parameter(GLcontext *ctx, GLenum target,
+nouveau_tex_parameter(struct gl_context *ctx, GLenum target,
struct gl_texture_object *t, GLenum pname,
const GLfloat *params)
{
@@ -424,18 +424,18 @@ nouveau_tex_parameter(GLcontext *ctx, GLenum target,
}
static void
-nouveau_viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
+nouveau_viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
{
context_dirty(ctx, VIEWPORT);
}
void
-nouveau_emit_nothing(GLcontext *ctx, int emit)
+nouveau_emit_nothing(struct gl_context *ctx, int emit)
{
}
int
-nouveau_next_dirty_state(GLcontext *ctx)
+nouveau_next_dirty_state(struct gl_context *ctx)
{
struct nouveau_context *nctx = to_nouveau_context(ctx);
int i = BITSET_FFS(nctx->dirty) - 1;
@@ -447,7 +447,7 @@ nouveau_next_dirty_state(GLcontext *ctx)
}
void
-nouveau_state_emit(GLcontext *ctx)
+nouveau_state_emit(struct gl_context *ctx)
{
struct nouveau_context *nctx = to_nouveau_context(ctx);
const struct nouveau_driver *drv = context_drv(ctx);
@@ -462,7 +462,7 @@ nouveau_state_emit(GLcontext *ctx)
}
static void
-nouveau_update_state(GLcontext *ctx, GLbitfield new_state)
+nouveau_update_state(struct gl_context *ctx, GLbitfield new_state)
{
int i;
@@ -496,7 +496,7 @@ nouveau_update_state(GLcontext *ctx, GLbitfield new_state)
}
void
-nouveau_state_init(GLcontext *ctx)
+nouveau_state_init(struct gl_context *ctx)
{
struct nouveau_context *nctx = to_nouveau_context(ctx);
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.h b/src/mesa/drivers/dri/nouveau/nouveau_state.h
index 38ac9753c8c..cc61cf1a527 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_state.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_state.h
@@ -105,18 +105,18 @@ enum {
MAX_NOUVEAU_STATE = NUM_NOUVEAU_STATE + 16,
};
-typedef void (*nouveau_state_func)(GLcontext *ctx, int emit);
+typedef void (*nouveau_state_func)(struct gl_context *ctx, int emit);
void
-nouveau_state_init(GLcontext *ctx);
+nouveau_state_init(struct gl_context *ctx);
void
-nouveau_emit_nothing(GLcontext *ctx, int emit);
+nouveau_emit_nothing(struct gl_context *ctx, int emit);
int
-nouveau_next_dirty_state(GLcontext *ctx);
+nouveau_next_dirty_state(struct gl_context *ctx);
void
-nouveau_state_emit(GLcontext *ctx);
+nouveau_state_emit(struct gl_context *ctx);
#endif
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_surface.c b/src/mesa/drivers/dri/nouveau/nouveau_surface.c
index 33393970a07..e6a712095c6 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_surface.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_surface.c
@@ -29,13 +29,13 @@
#include "nouveau_util.h"
void
-nouveau_surface_alloc(GLcontext *ctx, struct nouveau_surface *s,
+nouveau_surface_alloc(struct gl_context *ctx, struct nouveau_surface *s,
enum nouveau_surface_layout layout,
unsigned flags, unsigned format,
unsigned width, unsigned height)
{
- unsigned tile_mode, cpp = _mesa_get_format_bytes(format);
- int ret;
+ unsigned tile_mode = 0, tile_flags = 0;
+ int ret, cpp = _mesa_get_format_bytes(format);
nouveau_bo_ref(NULL, &s->bo);
@@ -51,13 +51,21 @@ nouveau_surface_alloc(GLcontext *ctx, struct nouveau_surface *s,
if (layout == TILED) {
s->pitch = align(s->pitch, 256);
tile_mode = s->pitch;
+
+ if (cpp == 4)
+ tile_flags = NOUVEAU_BO_TILE_32BPP;
+ else if (cpp == 2)
+ tile_flags = NOUVEAU_BO_TILE_16BPP;
+
+ if (_mesa_get_format_bits(format, GL_DEPTH_BITS))
+ tile_flags |= NOUVEAU_BO_TILE_ZETA;
+
} else {
s->pitch = align(s->pitch, 64);
- tile_mode = 0;
}
ret = nouveau_bo_new_tile(context_dev(ctx), flags, 0, s->pitch * height,
- tile_mode, 0, &s->bo);
+ tile_mode, tile_flags, &s->bo);
assert(!ret);
}
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_surface.h b/src/mesa/drivers/dri/nouveau/nouveau_surface.h
index ebdc89afb4e..8915ee4ca0f 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_surface.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_surface.h
@@ -46,7 +46,7 @@ struct nouveau_surface {
};
void
-nouveau_surface_alloc(GLcontext *ctx, struct nouveau_surface *s,
+nouveau_surface_alloc(struct gl_context *ctx, struct nouveau_surface *s,
enum nouveau_surface_layout layout,
unsigned flags, unsigned format,
unsigned width, unsigned height);
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_swtnl_t.c b/src/mesa/drivers/dri/nouveau/nouveau_swtnl_t.c
index a1609a0dd57..b3588e8fd39 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_swtnl_t.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_swtnl_t.c
@@ -99,7 +99,7 @@ static struct swtnl_attr_info {
};
static void
-swtnl_choose_attrs(GLcontext *ctx)
+swtnl_choose_attrs(struct gl_context *ctx)
{
struct nouveau_render_state *render = to_render_state(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -153,7 +153,7 @@ swtnl_choose_attrs(GLcontext *ctx)
}
static void
-swtnl_alloc_vertices(GLcontext *ctx)
+swtnl_alloc_vertices(struct gl_context *ctx)
{
struct nouveau_swtnl_state *swtnl = &to_render_state(ctx)->swtnl;
@@ -164,7 +164,7 @@ swtnl_alloc_vertices(GLcontext *ctx)
}
static void
-swtnl_bind_vertices(GLcontext *ctx)
+swtnl_bind_vertices(struct gl_context *ctx)
{
struct nouveau_render_state *render = to_render_state(ctx);
struct nouveau_swtnl_state *swtnl = &render->swtnl;
@@ -182,7 +182,7 @@ swtnl_bind_vertices(GLcontext *ctx)
}
static void
-swtnl_unbind_vertices(GLcontext *ctx)
+swtnl_unbind_vertices(struct gl_context *ctx)
{
struct nouveau_render_state *render = to_render_state(ctx);
int i;
@@ -200,7 +200,7 @@ swtnl_unbind_vertices(GLcontext *ctx)
}
static void
-swtnl_flush_vertices(GLcontext *ctx)
+swtnl_flush_vertices(struct gl_context *ctx)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_swtnl_state *swtnl = &to_render_state(ctx)->swtnl;
@@ -232,25 +232,25 @@ swtnl_flush_vertices(GLcontext *ctx)
/* TnL renderer entry points */
static void
-swtnl_start(GLcontext *ctx)
+swtnl_start(struct gl_context *ctx)
{
swtnl_choose_attrs(ctx);
}
static void
-swtnl_finish(GLcontext *ctx)
+swtnl_finish(struct gl_context *ctx)
{
swtnl_flush_vertices(ctx);
swtnl_unbind_vertices(ctx);
}
static void
-swtnl_primitive(GLcontext *ctx, GLenum mode)
+swtnl_primitive(struct gl_context *ctx, GLenum mode)
{
}
static void
-swtnl_reset_stipple(GLcontext *ctx)
+swtnl_reset_stipple(struct gl_context *ctx)
{
}
@@ -273,7 +273,7 @@ swtnl_reset_stipple(GLcontext *ctx)
} while (0)
static void
-swtnl_points(GLcontext *ctx, GLuint first, GLuint last)
+swtnl_points(struct gl_context *ctx, GLuint first, GLuint last)
{
int i, count;
@@ -289,7 +289,7 @@ swtnl_points(GLcontext *ctx, GLuint first, GLuint last)
}
static void
-swtnl_line(GLcontext *ctx, GLuint v1, GLuint v2)
+swtnl_line(struct gl_context *ctx, GLuint v1, GLuint v2)
{
BEGIN_PRIMITIVE(GL_LINES, 2);
OUT_VERTEX(v1);
@@ -297,7 +297,7 @@ swtnl_line(GLcontext *ctx, GLuint v1, GLuint v2)
}
static void
-swtnl_triangle(GLcontext *ctx, GLuint v1, GLuint v2, GLuint v3)
+swtnl_triangle(struct gl_context *ctx, GLuint v1, GLuint v2, GLuint v3)
{
BEGIN_PRIMITIVE(GL_TRIANGLES, 3);
OUT_VERTEX(v1);
@@ -306,7 +306,7 @@ swtnl_triangle(GLcontext *ctx, GLuint v1, GLuint v2, GLuint v3)
}
static void
-swtnl_quad(GLcontext *ctx, GLuint v1, GLuint v2, GLuint v3, GLuint v4)
+swtnl_quad(struct gl_context *ctx, GLuint v1, GLuint v2, GLuint v3, GLuint v4)
{
BEGIN_PRIMITIVE(GL_QUADS, 4);
OUT_VERTEX(v1);
@@ -317,7 +317,7 @@ swtnl_quad(GLcontext *ctx, GLuint v1, GLuint v2, GLuint v3, GLuint v4)
/* TnL initialization. */
static void
-TAG(swtnl_init)(GLcontext *ctx)
+TAG(swtnl_init)(struct gl_context *ctx)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -348,7 +348,7 @@ TAG(swtnl_init)(GLcontext *ctx)
}
static void
-TAG(swtnl_destroy)(GLcontext *ctx)
+TAG(swtnl_destroy)(struct gl_context *ctx)
{
nouveau_bo_ref(NULL, &to_render_state(ctx)->swtnl.vbo);
}
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
index 14c7b5f64b7..cd063702af0 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
@@ -41,7 +41,7 @@
#include "drivers/common/meta.h"
static struct gl_texture_object *
-nouveau_texture_new(GLcontext *ctx, GLuint name, GLenum target)
+nouveau_texture_new(struct gl_context *ctx, GLuint name, GLenum target)
{
struct nouveau_texture *nt = CALLOC_STRUCT(nouveau_texture);
@@ -51,7 +51,7 @@ nouveau_texture_new(GLcontext *ctx, GLuint name, GLenum target)
}
static void
-nouveau_texture_free(GLcontext *ctx, struct gl_texture_object *t)
+nouveau_texture_free(struct gl_context *ctx, struct gl_texture_object *t)
{
struct nouveau_texture *nt = to_nouveau_texture(t);
int i;
@@ -63,7 +63,7 @@ nouveau_texture_free(GLcontext *ctx, struct gl_texture_object *t)
}
static struct gl_texture_image *
-nouveau_teximage_new(GLcontext *ctx)
+nouveau_teximage_new(struct gl_context *ctx)
{
struct nouveau_teximage *nti = CALLOC_STRUCT(nouveau_teximage);
@@ -71,7 +71,7 @@ nouveau_teximage_new(GLcontext *ctx)
}
static void
-nouveau_teximage_free(GLcontext *ctx, struct gl_texture_image *ti)
+nouveau_teximage_free(struct gl_context *ctx, struct gl_texture_image *ti)
{
struct nouveau_teximage *nti = to_nouveau_teximage(ti);
@@ -79,7 +79,7 @@ nouveau_teximage_free(GLcontext *ctx, struct gl_texture_image *ti)
}
static void
-nouveau_teximage_map(GLcontext *ctx, struct gl_texture_image *ti)
+nouveau_teximage_map(struct gl_context *ctx, struct gl_texture_image *ti)
{
struct nouveau_surface *s = &to_nouveau_teximage(ti)->surface;
int ret;
@@ -93,7 +93,7 @@ nouveau_teximage_map(GLcontext *ctx, struct gl_texture_image *ti)
}
static void
-nouveau_teximage_unmap(GLcontext *ctx, struct gl_texture_image *ti)
+nouveau_teximage_unmap(struct gl_context *ctx, struct gl_texture_image *ti)
{
struct nouveau_surface *s = &to_nouveau_teximage(ti)->surface;
@@ -103,7 +103,7 @@ nouveau_teximage_unmap(GLcontext *ctx, struct gl_texture_image *ti)
}
static gl_format
-nouveau_choose_tex_format(GLcontext *ctx, GLint internalFormat,
+nouveau_choose_tex_format(struct gl_context *ctx, GLint internalFormat,
GLenum srcFormat, GLenum srcType)
{
switch (internalFormat) {
@@ -195,7 +195,7 @@ teximage_fits(struct gl_texture_object *t, int level)
}
static GLboolean
-validate_teximage(GLcontext *ctx, struct gl_texture_object *t,
+validate_teximage(struct gl_context *ctx, struct gl_texture_object *t,
int level, int x, int y, int z,
int width, int height, int depth)
{
@@ -231,7 +231,7 @@ get_last_level(struct gl_texture_object *t)
}
static void
-relayout_texture(GLcontext *ctx, struct gl_texture_object *t)
+relayout_texture(struct gl_context *ctx, struct gl_texture_object *t)
{
struct gl_texture_image *base = t->Image[0][t->BaseLevel];
@@ -284,7 +284,7 @@ relayout_texture(GLcontext *ctx, struct gl_texture_object *t)
}
GLboolean
-nouveau_texture_validate(GLcontext *ctx, struct gl_texture_object *t)
+nouveau_texture_validate(struct gl_context *ctx, struct gl_texture_object *t)
{
struct nouveau_texture *nt = to_nouveau_texture(t);
int i, last = get_last_level(t);
@@ -311,7 +311,7 @@ nouveau_texture_validate(GLcontext *ctx, struct gl_texture_object *t)
}
void
-nouveau_texture_reallocate(GLcontext *ctx, struct gl_texture_object *t)
+nouveau_texture_reallocate(struct gl_context *ctx, struct gl_texture_object *t)
{
if (!teximage_fits(t, t->BaseLevel) ||
!teximage_fits(t, get_last_level(t))) {
@@ -335,7 +335,7 @@ get_teximage_placement(struct gl_texture_image *ti)
}
static void
-nouveau_teximage(GLcontext *ctx, GLint dims, GLenum target, GLint level,
+nouveau_teximage(struct gl_context *ctx, GLint dims, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint depth, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -386,7 +386,7 @@ nouveau_teximage(GLcontext *ctx, GLint dims, GLenum target, GLint level,
}
static void
-nouveau_teximage_1d(GLcontext *ctx, GLenum target, GLint level,
+nouveau_teximage_1d(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -400,7 +400,7 @@ nouveau_teximage_1d(GLcontext *ctx, GLenum target, GLint level,
}
static void
-nouveau_teximage_2d(GLcontext *ctx, GLenum target, GLint level,
+nouveau_teximage_2d(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -414,7 +414,7 @@ nouveau_teximage_2d(GLcontext *ctx, GLenum target, GLint level,
}
static void
-nouveau_teximage_3d(GLcontext *ctx, GLenum target, GLint level,
+nouveau_teximage_3d(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint depth, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -428,7 +428,7 @@ nouveau_teximage_3d(GLcontext *ctx, GLenum target, GLint level,
}
static void
-nouveau_texsubimage(GLcontext *ctx, GLint dims, GLenum target, GLint level,
+nouveau_texsubimage(struct gl_context *ctx, GLint dims, GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLint width, GLint height, GLint depth,
GLenum format, GLenum type, const void *pixels,
@@ -462,7 +462,7 @@ nouveau_texsubimage(GLcontext *ctx, GLint dims, GLenum target, GLint level,
}
static void
-nouveau_texsubimage_3d(GLcontext *ctx, GLenum target, GLint level,
+nouveau_texsubimage_3d(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLint width, GLint height, GLint depth,
GLenum format, GLenum type, const void *pixels,
@@ -476,7 +476,7 @@ nouveau_texsubimage_3d(GLcontext *ctx, GLenum target, GLint level,
}
static void
-nouveau_texsubimage_2d(GLcontext *ctx, GLenum target, GLint level,
+nouveau_texsubimage_2d(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLint width, GLint height,
GLenum format, GLenum type, const void *pixels,
@@ -490,7 +490,7 @@ nouveau_texsubimage_2d(GLcontext *ctx, GLenum target, GLint level,
}
static void
-nouveau_texsubimage_1d(GLcontext *ctx, GLenum target, GLint level,
+nouveau_texsubimage_1d(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint width,
GLenum format, GLenum type, const void *pixels,
const struct gl_pixelstore_attrib *packing,
@@ -503,7 +503,7 @@ nouveau_texsubimage_1d(GLcontext *ctx, GLenum target, GLint level,
}
static void
-nouveau_get_teximage(GLcontext *ctx, GLenum target, GLint level,
+nouveau_get_teximage(struct gl_context *ctx, GLenum target, GLint level,
GLenum format, GLenum type, GLvoid *pixels,
struct gl_texture_object *t,
struct gl_texture_image *ti)
@@ -515,7 +515,7 @@ nouveau_get_teximage(GLcontext *ctx, GLenum target, GLint level,
}
static void
-nouveau_bind_texture(GLcontext *ctx, GLenum target,
+nouveau_bind_texture(struct gl_context *ctx, GLenum target,
struct gl_texture_object *t)
{
context_dirty_i(ctx, TEX_OBJ, ctx->Texture.CurrentUnit);
@@ -541,7 +541,7 @@ nouveau_set_texbuffer(__DRIcontext *dri_ctx,
__DRIdrawable *draw)
{
struct nouveau_context *nctx = dri_ctx->driverPrivate;
- GLcontext *ctx = &nctx->base;
+ struct gl_context *ctx = &nctx->base;
struct gl_framebuffer *fb = draw->driverPrivate;
struct gl_renderbuffer *rb =
fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer;
@@ -574,7 +574,7 @@ nouveau_set_texbuffer(__DRIcontext *dri_ctx,
}
static void
-nouveau_texture_map(GLcontext *ctx, struct gl_texture_object *t)
+nouveau_texture_map(struct gl_context *ctx, struct gl_texture_object *t)
{
int i;
@@ -585,7 +585,7 @@ nouveau_texture_map(GLcontext *ctx, struct gl_texture_object *t)
}
static void
-nouveau_texture_unmap(GLcontext *ctx, struct gl_texture_object *t)
+nouveau_texture_unmap(struct gl_context *ctx, struct gl_texture_object *t)
{
int i;
@@ -596,7 +596,7 @@ nouveau_texture_unmap(GLcontext *ctx, struct gl_texture_object *t)
}
static void
-store_mipmap(GLcontext *ctx, GLenum target, int first, int last,
+store_mipmap(struct gl_context *ctx, GLenum target, int first, int last,
struct gl_texture_object *t)
{
struct gl_pixelstore_attrib packing = {
@@ -624,7 +624,7 @@ store_mipmap(GLcontext *ctx, GLenum target, int first, int last,
}
static void
-nouveau_generate_mipmap(GLcontext *ctx, GLenum target,
+nouveau_generate_mipmap(struct gl_context *ctx, GLenum target,
struct gl_texture_object *t)
{
if (_mesa_meta_check_generate_mipmap_fallback(ctx, target, t)) {
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.h b/src/mesa/drivers/dri/nouveau/nouveau_texture.h
index 251f537bba7..fc170215f35 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_texture.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.h
@@ -49,9 +49,9 @@ nouveau_set_texbuffer(__DRIcontext *dri_ctx,
__DRIdrawable *draw);
GLboolean
-nouveau_texture_validate(GLcontext *ctx, struct gl_texture_object *t);
+nouveau_texture_validate(struct gl_context *ctx, struct gl_texture_object *t);
void
-nouveau_texture_reallocate(GLcontext *ctx, struct gl_texture_object *t);
+nouveau_texture_reallocate(struct gl_context *ctx, struct gl_texture_object *t);
#endif
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_util.h b/src/mesa/drivers/dri/nouveau/nouveau_util.h
index 584cb80ef62..8df8867d14c 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_util.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_util.h
@@ -130,7 +130,7 @@ get_scissors(struct gl_framebuffer *fb, int *x, int *y, int *w, int *h)
}
static inline void
-get_viewport_scale(GLcontext *ctx, float a[16])
+get_viewport_scale(struct gl_context *ctx, float a[16])
{
struct gl_viewport_attrib *vp = &ctx->Viewport;
struct gl_framebuffer *fb = ctx->DrawBuffer;
@@ -147,7 +147,7 @@ get_viewport_scale(GLcontext *ctx, float a[16])
}
static inline void
-get_viewport_translate(GLcontext *ctx, float a[4])
+get_viewport_translate(struct gl_context *ctx, float a[4])
{
struct gl_viewport_attrib *vp = &ctx->Viewport;
struct gl_framebuffer *fb = ctx->DrawBuffer;
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c b/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c
index e4415cbedb5..394f3c9b500 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c
@@ -32,7 +32,7 @@
/* Arbitrary pushbuf length we can assume we can get with a single
* WAIT_RING. */
-#define PUSHBUF_DWORDS 2048
+#define PUSHBUF_DWORDS 65536
/* Functions to set up struct nouveau_array_state from something like
* a GL array or index buffer. */
@@ -86,7 +86,7 @@ vbo_deinit_array(struct nouveau_array_state *a)
}
static int
-get_array_stride(GLcontext *ctx, const struct gl_client_array *a)
+get_array_stride(struct gl_context *ctx, const struct gl_client_array *a)
{
struct nouveau_render_state *render = to_render_state(ctx);
@@ -98,7 +98,7 @@ get_array_stride(GLcontext *ctx, const struct gl_client_array *a)
}
static void
-vbo_init_arrays(GLcontext *ctx, const struct _mesa_index_buffer *ib,
+vbo_init_arrays(struct gl_context *ctx, const struct _mesa_index_buffer *ib,
const struct gl_client_array **arrays)
{
struct nouveau_render_state *render = to_render_state(ctx);
@@ -124,7 +124,7 @@ vbo_init_arrays(GLcontext *ctx, const struct _mesa_index_buffer *ib,
}
static void
-vbo_deinit_arrays(GLcontext *ctx, const struct _mesa_index_buffer *ib,
+vbo_deinit_arrays(struct gl_context *ctx, const struct _mesa_index_buffer *ib,
const struct gl_client_array **arrays)
{
struct nouveau_render_state *render = to_render_state(ctx);
@@ -149,7 +149,7 @@ vbo_deinit_arrays(GLcontext *ctx, const struct _mesa_index_buffer *ib,
/* Make some rendering decisions from the GL context. */
static void
-vbo_choose_render_mode(GLcontext *ctx, const struct gl_client_array **arrays)
+vbo_choose_render_mode(struct gl_context *ctx, const struct gl_client_array **arrays)
{
struct nouveau_render_state *render = to_render_state(ctx);
int i;
@@ -172,7 +172,7 @@ vbo_choose_render_mode(GLcontext *ctx, const struct gl_client_array **arrays)
}
static void
-vbo_emit_attr(GLcontext *ctx, const struct gl_client_array **arrays, int attr)
+vbo_emit_attr(struct gl_context *ctx, const struct gl_client_array **arrays, int attr)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_render_state *render = to_render_state(ctx);
@@ -209,7 +209,7 @@ vbo_emit_attr(GLcontext *ctx, const struct gl_client_array **arrays, int attr)
#define MAT(a) (VERT_ATTRIB_GENERIC0 + MAT_ATTRIB_##a)
static void
-vbo_choose_attrs(GLcontext *ctx, const struct gl_client_array **arrays)
+vbo_choose_attrs(struct gl_context *ctx, const struct gl_client_array **arrays)
{
struct nouveau_render_state *render = to_render_state(ctx);
int i;
@@ -251,7 +251,7 @@ vbo_choose_attrs(GLcontext *ctx, const struct gl_client_array **arrays)
}
static int
-get_max_client_stride(GLcontext *ctx, const struct gl_client_array **arrays)
+get_max_client_stride(struct gl_context *ctx, const struct gl_client_array **arrays)
{
struct nouveau_render_state *render = to_render_state(ctx);
int i, s = 0;
@@ -271,14 +271,14 @@ get_max_client_stride(GLcontext *ctx, const struct gl_client_array **arrays)
}
static void
-TAG(vbo_render_prims)(GLcontext *ctx, const struct gl_client_array **arrays,
+TAG(vbo_render_prims)(struct gl_context *ctx, const struct gl_client_array **arrays,
const struct _mesa_prim *prims, GLuint nr_prims,
const struct _mesa_index_buffer *ib,
GLboolean index_bounds_valid,
GLuint min_index, GLuint max_index);
static GLboolean
-vbo_maybe_split(GLcontext *ctx, const struct gl_client_array **arrays,
+vbo_maybe_split(struct gl_context *ctx, const struct gl_client_array **arrays,
const struct _mesa_prim *prims, GLuint nr_prims,
const struct _mesa_index_buffer *ib,
GLuint min_index, GLuint max_index)
@@ -316,7 +316,7 @@ vbo_maybe_split(GLcontext *ctx, const struct gl_client_array **arrays,
/* VBO rendering path. */
static void
-vbo_bind_vertices(GLcontext *ctx, const struct gl_client_array **arrays,
+vbo_bind_vertices(struct gl_context *ctx, const struct gl_client_array **arrays,
GLint basevertex, GLuint min_index, GLuint max_index)
{
struct nouveau_render_state *render = to_render_state(ctx);
@@ -354,7 +354,7 @@ vbo_bind_vertices(GLcontext *ctx, const struct gl_client_array **arrays,
}
static void
-vbo_draw_vbo(GLcontext *ctx, const struct gl_client_array **arrays,
+vbo_draw_vbo(struct gl_context *ctx, const struct gl_client_array **arrays,
const struct _mesa_prim *prims, GLuint nr_prims,
const struct _mesa_index_buffer *ib, GLuint min_index,
GLuint max_index)
@@ -396,7 +396,7 @@ extract_id(struct nouveau_array_state *a, int i, int j)
}
static void
-vbo_draw_imm(GLcontext *ctx, const struct gl_client_array **arrays,
+vbo_draw_imm(struct gl_context *ctx, const struct gl_client_array **arrays,
const struct _mesa_prim *prims, GLuint nr_prims,
const struct _mesa_index_buffer *ib, GLuint min_index,
GLuint max_index)
@@ -433,7 +433,7 @@ vbo_draw_imm(GLcontext *ctx, const struct gl_client_array **arrays,
/* draw_prims entry point when we're doing hw-tnl. */
static void
-TAG(vbo_render_prims)(GLcontext *ctx, const struct gl_client_array **arrays,
+TAG(vbo_render_prims)(struct gl_context *ctx, const struct gl_client_array **arrays,
const struct _mesa_prim *prims, GLuint nr_prims,
const struct _mesa_index_buffer *ib,
GLboolean index_bounds_valid,
diff --git a/src/mesa/drivers/dri/nouveau/nv04_context.c b/src/mesa/drivers/dri/nouveau/nv04_context.c
index 94422f559dc..8683343b393 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_context.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_context.c
@@ -46,7 +46,7 @@ texunit_needs_combiners(struct gl_texture_unit *u)
}
struct nouveau_grobj *
-nv04_context_engine(GLcontext *ctx)
+nv04_context_engine(struct gl_context *ctx)
{
struct nv04_context *nctx = to_nv04_context(ctx);
struct nouveau_hw_state *hw = &to_nouveau_context(ctx)->hw;
@@ -90,7 +90,7 @@ static void
nv04_channel_flush_notify(struct nouveau_channel *chan)
{
struct nouveau_context *nctx = chan->user_private;
- GLcontext *ctx = &nctx->base;
+ struct gl_context *ctx = &nctx->base;
if (nctx->fallback < SWRAST) {
nouveau_bo_state_emit(ctx);
@@ -106,7 +106,7 @@ nv04_channel_flush_notify(struct nouveau_channel *chan)
}
static void
-nv04_hwctx_init(GLcontext *ctx)
+nv04_hwctx_init(struct gl_context *ctx)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_hw_state *hw = &to_nouveau_context(ctx)->hw;
@@ -136,7 +136,7 @@ nv04_hwctx_init(GLcontext *ctx)
}
static void
-init_dummy_texture(GLcontext *ctx)
+init_dummy_texture(struct gl_context *ctx)
{
struct nouveau_surface *s = &to_nv04_context(ctx)->dummy_texture;
@@ -150,7 +150,7 @@ init_dummy_texture(GLcontext *ctx)
}
static void
-nv04_context_destroy(GLcontext *ctx)
+nv04_context_destroy(struct gl_context *ctx)
{
struct nouveau_context *nctx = to_nouveau_context(ctx);
@@ -166,13 +166,13 @@ nv04_context_destroy(GLcontext *ctx)
FREE(ctx);
}
-static GLcontext *
-nv04_context_create(struct nouveau_screen *screen, const GLvisual *visual,
- GLcontext *share_ctx)
+static struct gl_context *
+nv04_context_create(struct nouveau_screen *screen, const struct gl_config *visual,
+ struct gl_context *share_ctx)
{
struct nv04_context *nctx;
struct nouveau_hw_state *hw;
- GLcontext *ctx;
+ struct gl_context *ctx;
int ret;
nctx = CALLOC_STRUCT(nv04_context);
diff --git a/src/mesa/drivers/dri/nouveau/nv04_context.h b/src/mesa/drivers/dri/nouveau/nv04_context.h
index ccd3b61e267..45e70d2bc3c 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_context.h
+++ b/src/mesa/drivers/dri/nouveau/nv04_context.h
@@ -40,7 +40,7 @@ struct nv04_context {
#define nv04_mtex_engine(obj) ((obj)->grclass == NV04_MULTITEX_TRIANGLE)
struct nouveau_grobj *
-nv04_context_engine(GLcontext *ctx);
+nv04_context_engine(struct gl_context *ctx);
extern const struct nouveau_driver nv04_driver;
diff --git a/src/mesa/drivers/dri/nouveau/nv04_driver.h b/src/mesa/drivers/dri/nouveau/nv04_driver.h
index 4d599e683a6..554914d1c30 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_driver.h
+++ b/src/mesa/drivers/dri/nouveau/nv04_driver.h
@@ -39,55 +39,55 @@ enum {
/* nv04_render.c */
void
-nv04_render_init(GLcontext *ctx);
+nv04_render_init(struct gl_context *ctx);
void
-nv04_render_destroy(GLcontext *ctx);
+nv04_render_destroy(struct gl_context *ctx);
/* nv04_surface.c */
GLboolean
-nv04_surface_init(GLcontext *ctx);
+nv04_surface_init(struct gl_context *ctx);
void
-nv04_surface_takedown(GLcontext *ctx);
+nv04_surface_takedown(struct gl_context *ctx);
void
-nv04_surface_copy(GLcontext *ctx,
+nv04_surface_copy(struct gl_context *ctx,
struct nouveau_surface *dst, struct nouveau_surface *src,
int dx, int dy, int sx, int sy, int w, int h);
void
-nv04_surface_fill(GLcontext *ctx,
+nv04_surface_fill(struct gl_context *ctx,
struct nouveau_surface *dst,
unsigned mask, unsigned value,
int dx, int dy, int w, int h);
/* nv04_state_fb.c */
void
-nv04_emit_framebuffer(GLcontext *ctx, int emit);
+nv04_emit_framebuffer(struct gl_context *ctx, int emit);
void
-nv04_emit_scissor(GLcontext *ctx, int emit);
+nv04_emit_scissor(struct gl_context *ctx, int emit);
/* nv04_state_raster.c */
void
-nv04_defer_control(GLcontext *ctx, int emit);
+nv04_defer_control(struct gl_context *ctx, int emit);
void
-nv04_emit_control(GLcontext *ctx, int emit);
+nv04_emit_control(struct gl_context *ctx, int emit);
void
-nv04_defer_blend(GLcontext *ctx, int emit);
+nv04_defer_blend(struct gl_context *ctx, int emit);
void
-nv04_emit_blend(GLcontext *ctx, int emit);
+nv04_emit_blend(struct gl_context *ctx, int emit);
/* nv04_state_frag.c */
void
-nv04_emit_tex_env(GLcontext *ctx, int emit);
+nv04_emit_tex_env(struct gl_context *ctx, int emit);
/* nv04_state_tex.c */
void
-nv04_emit_tex_obj(GLcontext *ctx, int emit);
+nv04_emit_tex_obj(struct gl_context *ctx, int emit);
#endif
diff --git a/src/mesa/drivers/dri/nouveau/nv04_render.c b/src/mesa/drivers/dri/nouveau/nv04_render.c
index 56e396d51f2..47bad24f9d9 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_render.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_render.c
@@ -37,7 +37,7 @@
#define NUM_VERTEX_ATTRS 6
static void
-swtnl_update_viewport(GLcontext *ctx)
+swtnl_update_viewport(struct gl_context *ctx)
{
float *viewport = to_nv04_context(ctx)->viewport;
struct gl_framebuffer *fb = ctx->DrawBuffer;
@@ -51,7 +51,7 @@ swtnl_update_viewport(GLcontext *ctx)
}
static void
-swtnl_emit_attr(GLcontext *ctx, struct tnl_attr_map *m, int attr, int emit)
+swtnl_emit_attr(struct gl_context *ctx, struct tnl_attr_map *m, int attr, int emit)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -68,7 +68,7 @@ swtnl_emit_attr(GLcontext *ctx, struct tnl_attr_map *m, int attr, int emit)
}
static void
-swtnl_choose_attrs(GLcontext *ctx)
+swtnl_choose_attrs(struct gl_context *ctx)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct nouveau_grobj *fahrenheit = nv04_context_engine(ctx);
@@ -94,24 +94,24 @@ swtnl_choose_attrs(GLcontext *ctx)
/* TnL renderer entry points */
static void
-swtnl_start(GLcontext *ctx)
+swtnl_start(struct gl_context *ctx)
{
swtnl_choose_attrs(ctx);
}
static void
-swtnl_finish(GLcontext *ctx)
+swtnl_finish(struct gl_context *ctx)
{
FIRE_RING(context_chan(ctx));
}
static void
-swtnl_primitive(GLcontext *ctx, GLenum mode)
+swtnl_primitive(struct gl_context *ctx, GLenum mode)
{
}
static void
-swtnl_reset_stipple(GLcontext *ctx)
+swtnl_reset_stipple(struct gl_context *ctx)
{
}
@@ -146,17 +146,17 @@ swtnl_reset_stipple(GLcontext *ctx)
}
static void
-swtnl_points(GLcontext *ctx, GLuint first, GLuint last)
+swtnl_points(struct gl_context *ctx, GLuint first, GLuint last)
{
}
static void
-swtnl_line(GLcontext *ctx, GLuint v1, GLuint v2)
+swtnl_line(struct gl_context *ctx, GLuint v1, GLuint v2)
{
}
static void
-swtnl_triangle(GLcontext *ctx, GLuint v1, GLuint v2, GLuint v3)
+swtnl_triangle(struct gl_context *ctx, GLuint v1, GLuint v2, GLuint v3)
{
BEGIN_PRIMITIVE(3);
OUT_VERTEX(v1);
@@ -166,7 +166,7 @@ swtnl_triangle(GLcontext *ctx, GLuint v1, GLuint v2, GLuint v3)
}
static void
-swtnl_quad(GLcontext *ctx, GLuint v1, GLuint v2, GLuint v3, GLuint v4)
+swtnl_quad(struct gl_context *ctx, GLuint v1, GLuint v2, GLuint v3, GLuint v4)
{
BEGIN_PRIMITIVE(4);
OUT_VERTEX(v1);
@@ -178,7 +178,7 @@ swtnl_quad(GLcontext *ctx, GLuint v1, GLuint v2, GLuint v3, GLuint v4)
/* TnL initialization. */
void
-nv04_render_init(GLcontext *ctx)
+nv04_render_init(struct gl_context *ctx)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -207,6 +207,6 @@ nv04_render_init(GLcontext *ctx)
}
void
-nv04_render_destroy(GLcontext *ctx)
+nv04_render_destroy(struct gl_context *ctx)
{
}
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_fb.c b/src/mesa/drivers/dri/nouveau/nv04_state_fb.c
index b9d232dbb80..a3e343660f8 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_fb.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_fb.c
@@ -47,7 +47,7 @@ get_rt_format(gl_format format)
}
void
-nv04_emit_framebuffer(GLcontext *ctx, int emit)
+nv04_emit_framebuffer(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_hw_state *hw = &to_nouveau_context(ctx)->hw;
@@ -97,7 +97,7 @@ nv04_emit_framebuffer(GLcontext *ctx, int emit)
}
void
-nv04_emit_scissor(GLcontext *ctx, int emit)
+nv04_emit_scissor(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_hw_state *hw = &to_nouveau_context(ctx)->hw;
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_frag.c b/src/mesa/drivers/dri/nouveau/nv04_state_frag.c
index bb5d7dc20fc..658b23a4d91 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_frag.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_frag.c
@@ -41,7 +41,7 @@
NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ALPHA0
struct combiner_state {
- GLcontext *ctx;
+ struct gl_context *ctx;
int unit;
GLboolean alpha;
GLboolean premodulate;
@@ -234,7 +234,7 @@ setup_combiner(struct combiner_state *rc)
}
void
-nv04_emit_tex_env(GLcontext *ctx, int emit)
+nv04_emit_tex_env(struct gl_context *ctx, int emit)
{
const int i = emit - NOUVEAU_STATE_TEX_ENV0;
struct nouveau_channel *chan = context_chan(ctx);
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
index c191571a5f8..a114f44b22b 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
@@ -127,13 +127,13 @@ get_blend_func(unsigned func)
}
void
-nv04_defer_control(GLcontext *ctx, int emit)
+nv04_defer_control(struct gl_context *ctx, int emit)
{
context_dirty(ctx, CONTROL);
}
void
-nv04_emit_control(GLcontext *ctx, int emit)
+nv04_emit_control(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *fahrenheit = nv04_context_engine(ctx);
@@ -247,13 +247,13 @@ nv04_emit_control(GLcontext *ctx, int emit)
}
void
-nv04_defer_blend(GLcontext *ctx, int emit)
+nv04_defer_blend(struct gl_context *ctx, int emit)
{
context_dirty(ctx, BLEND);
}
void
-nv04_emit_blend(GLcontext *ctx, int emit)
+nv04_emit_blend(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *fahrenheit = nv04_context_engine(ctx);
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_tex.c b/src/mesa/drivers/dri/nouveau/nv04_state_tex.c
index b720089fbf0..1fe47a30e45 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_tex.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_tex.c
@@ -56,7 +56,7 @@ get_tex_format(struct gl_texture_image *ti)
}
void
-nv04_emit_tex_obj(GLcontext *ctx, int emit)
+nv04_emit_tex_obj(struct gl_context *ctx, int emit)
{
const int i = emit - NOUVEAU_STATE_TEX_OBJ0;
struct nouveau_channel *chan = context_chan(ctx);
diff --git a/src/mesa/drivers/dri/nouveau/nv04_surface.c b/src/mesa/drivers/dri/nouveau/nv04_surface.c
index ce0103604c2..6d3ffa26d3d 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_surface.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_surface.c
@@ -191,7 +191,7 @@ sifm_format(gl_format format)
}
static void
-nv04_surface_copy_swizzle(GLcontext *ctx,
+nv04_surface_copy_swizzle(struct gl_context *ctx,
struct nouveau_surface *dst,
struct nouveau_surface *src,
int dx, int dy, int sx, int sy,
@@ -269,7 +269,7 @@ nv04_surface_copy_swizzle(GLcontext *ctx,
}
static void
-nv04_surface_copy_m2mf(GLcontext *ctx,
+nv04_surface_copy_m2mf(struct gl_context *ctx,
struct nouveau_surface *dst,
struct nouveau_surface *src,
int dx, int dy, int sx, int sy,
@@ -362,7 +362,7 @@ get_swizzled_offset(struct nouveau_surface *s, unsigned x, unsigned y)
}
static void
-nv04_surface_copy_cpu(GLcontext *ctx,
+nv04_surface_copy_cpu(struct gl_context *ctx,
struct nouveau_surface *dst,
struct nouveau_surface *src,
int dx, int dy, int sx, int sy,
@@ -393,7 +393,7 @@ nv04_surface_copy_cpu(GLcontext *ctx,
}
void
-nv04_surface_copy(GLcontext *ctx,
+nv04_surface_copy(struct gl_context *ctx,
struct nouveau_surface *dst,
struct nouveau_surface *src,
int dx, int dy, int sx, int sy,
@@ -418,7 +418,7 @@ nv04_surface_copy(GLcontext *ctx,
}
void
-nv04_surface_fill(GLcontext *ctx,
+nv04_surface_fill(struct gl_context *ctx,
struct nouveau_surface *dst,
unsigned mask, unsigned value,
int dx, int dy, int w, int h)
@@ -460,7 +460,7 @@ nv04_surface_fill(GLcontext *ctx,
}
void
-nv04_surface_takedown(GLcontext *ctx)
+nv04_surface_takedown(struct gl_context *ctx)
{
struct nouveau_hw_state *hw = &to_nouveau_context(ctx)->hw;
@@ -475,7 +475,7 @@ nv04_surface_takedown(GLcontext *ctx)
}
GLboolean
-nv04_surface_init(GLcontext *ctx)
+nv04_surface_init(struct gl_context *ctx)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_hw_state *hw = &to_nouveau_context(ctx)->hw;
diff --git a/src/mesa/drivers/dri/nouveau/nv10_context.c b/src/mesa/drivers/dri/nouveau/nv10_context.c
index 41723ff190f..fdcb43b7718 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_context.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_context.c
@@ -41,7 +41,7 @@ static const struct dri_extension nv10_extensions[] = {
};
static GLboolean
-use_fast_zclear(GLcontext *ctx, GLbitfield buffers)
+use_fast_zclear(struct gl_context *ctx, GLbitfield buffers)
{
struct nouveau_context *nctx = to_nouveau_context(ctx);
struct gl_framebuffer *fb = ctx->DrawBuffer;
@@ -61,46 +61,136 @@ use_fast_zclear(GLcontext *ctx, GLbitfield buffers)
fb->_Ymax == fb->Height && fb->_Ymin == 0;
}
+GLboolean
+nv10_use_viewport_zclear(struct gl_context *ctx)
+{
+ struct nouveau_context *nctx = to_nouveau_context(ctx);
+ struct gl_framebuffer *fb = ctx->DrawBuffer;
+
+ return context_chipset(ctx) < 0x17 &&
+ !nctx->hierz.clear_blocked && fb->_DepthBuffer &&
+ (_mesa_get_format_bits(fb->_DepthBuffer->Format,
+ GL_DEPTH_BITS) >= 24);
+}
+
+float
+nv10_transform_depth(struct gl_context *ctx, float z)
+{
+ struct nouveau_context *nctx = to_nouveau_context(ctx);
+
+ if (nv10_use_viewport_zclear(ctx))
+ return 2097152.0 * (z + (nctx->hierz.clear_seq & 7));
+ else
+ return ctx->DrawBuffer->_DepthMaxF * z;
+}
+
static void
-nv10_clear(GLcontext *ctx, GLbitfield buffers)
+nv10_zclear(struct gl_context *ctx, GLbitfield *buffers)
+{
+ /*
+ * Pre-nv17 cards don't have native support for fast Z clears,
+ * but in some cases we can still "clear" the Z buffer without
+ * actually blitting to it if we're willing to sacrifice a few
+ * bits of depth precision.
+ *
+ * Each time a clear is requested we modify the viewport
+ * transform in such a way that the old contents of the depth
+ * buffer are clamped to the requested clear value when
+ * they're read by the GPU.
+ */
+ struct nouveau_context *nctx = to_nouveau_context(ctx);
+ struct gl_framebuffer *fb = ctx->DrawBuffer;
+ struct nouveau_framebuffer *nfb = to_nouveau_framebuffer(fb);
+ struct nouveau_surface *s = &to_nouveau_renderbuffer(
+ fb->_DepthBuffer->Wrapped)->surface;
+
+ if (nv10_use_viewport_zclear(ctx)) {
+ int x, y, w, h;
+ float z = ctx->Depth.Clear;
+ uint32_t value = pack_zs_f(s->format, z, 0);
+
+ get_scissors(fb, &x, &y, &w, &h);
+ *buffers &= ~BUFFER_BIT_DEPTH;
+
+ if (use_fast_zclear(ctx, *buffers)) {
+ if (nfb->hierz.clear_value != value) {
+ /* Don't fast clear if we're changing
+ * the depth value. */
+ nfb->hierz.clear_value = value;
+
+ } else if (z == 0.0) {
+ nctx->hierz.clear_seq++;
+ context_dirty(ctx, ZCLEAR);
+
+ if ((nctx->hierz.clear_seq & 7) != 0 &&
+ nctx->hierz.clear_seq != 1)
+ /* We didn't wrap around -- no need to
+ * clear the depth buffer for real. */
+ return;
+
+ } else if (z == 1.0) {
+ nctx->hierz.clear_seq--;
+ context_dirty(ctx, ZCLEAR);
+
+ if ((nctx->hierz.clear_seq & 7) != 7)
+ /* No wrap around */
+ return;
+ }
+ }
+
+ value = pack_zs_f(s->format,
+ (z + (nctx->hierz.clear_seq & 7)) / 8, 0);
+ context_drv(ctx)->surface_fill(ctx, s, ~0, value, x, y, w, h);
+ }
+}
+
+static void
+nv17_zclear(struct gl_context *ctx, GLbitfield *buffers)
{
struct nouveau_context *nctx = to_nouveau_context(ctx);
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
struct nouveau_framebuffer *nfb = to_nouveau_framebuffer(
ctx->DrawBuffer);
+ struct nouveau_surface *s = &to_nouveau_renderbuffer(
+ nfb->base._DepthBuffer->Wrapped)->surface;
- nouveau_validate_framebuffer(ctx);
+ /* Clear the hierarchical depth buffer */
+ BEGIN_RING(chan, celsius, NV17TCL_LMA_DEPTH_FILL_VALUE, 1);
+ OUT_RING(chan, pack_zs_f(s->format, ctx->Depth.Clear, 0));
+ BEGIN_RING(chan, celsius, NV17TCL_LMA_DEPTH_BUFFER_CLEAR, 1);
+ OUT_RING(chan, 1);
- if ((buffers & BUFFER_BIT_DEPTH) &&
- ctx->Depth.Mask && nfb->hierz.bo) {
- struct nouveau_surface *s = &to_nouveau_renderbuffer(
- nfb->base._DepthBuffer->Wrapped)->surface;
+ /* Mark the depth buffer as cleared */
+ if (use_fast_zclear(ctx, *buffers)) {
+ if (nctx->hierz.clear_seq)
+ *buffers &= ~BUFFER_BIT_DEPTH;
- /* Clear the hierarchical depth buffer */
- BEGIN_RING(chan, celsius, NV17TCL_LMA_DEPTH_FILL_VALUE, 1);
- OUT_RING(chan, pack_zs_f(s->format, ctx->Depth.Clear, 0));
- BEGIN_RING(chan, celsius, NV17TCL_LMA_DEPTH_BUFFER_CLEAR, 1);
- OUT_RING(chan, 1);
+ nfb->hierz.clear_value =
+ pack_zs_f(s->format, ctx->Depth.Clear, 0);
+ nctx->hierz.clear_seq++;
- /* Mark the depth buffer as cleared */
- if (use_fast_zclear(ctx, buffers)) {
- if (nctx->hierz.clear_seq)
- buffers &= ~BUFFER_BIT_DEPTH;
+ context_dirty(ctx, ZCLEAR);
+ }
+}
- nfb->hierz.clear_value =
- pack_zs_f(s->format, ctx->Depth.Clear, 0);
- nctx->hierz.clear_seq++;
+static void
+nv10_clear(struct gl_context *ctx, GLbitfield buffers)
+{
+ nouveau_validate_framebuffer(ctx);
- context_dirty(ctx, ZCLEAR);
- }
+ if ((buffers & BUFFER_BIT_DEPTH) && ctx->Depth.Mask) {
+ if (context_chipset(ctx) >= 0x17)
+ nv17_zclear(ctx, &buffers);
+ else
+ nv10_zclear(ctx, &buffers);
}
nouveau_clear(ctx, buffers);
}
static void
-nv10_hwctx_init(GLcontext *ctx)
+nv10_hwctx_init(struct gl_context *ctx)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -305,14 +395,14 @@ nv10_hwctx_init(GLcontext *ctx)
OUT_RING(chan, 1);
BEGIN_RING(chan, celsius, NV10TCL_DEPTH_RANGE_NEAR, 2);
- OUT_RING(chan, 0.0);
+ OUT_RINGf(chan, 0.0);
OUT_RINGf(chan, 16777216.0);
FIRE_RING(chan);
}
static void
-nv10_context_destroy(GLcontext *ctx)
+nv10_context_destroy(struct gl_context *ctx)
{
struct nouveau_context *nctx = to_nouveau_context(ctx);
@@ -325,12 +415,12 @@ nv10_context_destroy(GLcontext *ctx)
FREE(ctx);
}
-static GLcontext *
-nv10_context_create(struct nouveau_screen *screen, const GLvisual *visual,
- GLcontext *share_ctx)
+static struct gl_context *
+nv10_context_create(struct nouveau_screen *screen, const struct gl_config *visual,
+ struct gl_context *share_ctx)
{
struct nouveau_context *nctx;
- GLcontext *ctx;
+ struct gl_context *ctx;
unsigned celsius_class;
int ret;
diff --git a/src/mesa/drivers/dri/nouveau/nv10_driver.h b/src/mesa/drivers/dri/nouveau/nv10_driver.h
index 340ba05adee..dec3d64e7d2 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_driver.h
+++ b/src/mesa/drivers/dri/nouveau/nv10_driver.h
@@ -37,119 +37,125 @@ enum {
/* nv10_context.c */
extern const struct nouveau_driver nv10_driver;
+GLboolean
+nv10_use_viewport_zclear(struct gl_context *ctx);
+
+float
+nv10_transform_depth(struct gl_context *ctx, float z);
+
/* nv10_render.c */
void
-nv10_render_init(GLcontext *ctx);
+nv10_render_init(struct gl_context *ctx);
void
-nv10_render_destroy(GLcontext *ctx);
+nv10_render_destroy(struct gl_context *ctx);
/* nv10_state_fb.c */
void
-nv10_emit_framebuffer(GLcontext *ctx, int emit);
+nv10_emit_framebuffer(struct gl_context *ctx, int emit);
void
-nv10_emit_render_mode(GLcontext *ctx, int emit);
+nv10_emit_render_mode(struct gl_context *ctx, int emit);
void
-nv10_emit_scissor(GLcontext *ctx, int emit);
+nv10_emit_scissor(struct gl_context *ctx, int emit);
void
-nv10_emit_viewport(GLcontext *ctx, int emit);
+nv10_emit_viewport(struct gl_context *ctx, int emit);
void
-nv10_emit_zclear(GLcontext *ctx, int emit);
+nv10_emit_zclear(struct gl_context *ctx, int emit);
/* nv10_state_polygon.c */
void
-nv10_emit_cull_face(GLcontext *ctx, int emit);
+nv10_emit_cull_face(struct gl_context *ctx, int emit);
void
-nv10_emit_front_face(GLcontext *ctx, int emit);
+nv10_emit_front_face(struct gl_context *ctx, int emit);
void
-nv10_emit_line_mode(GLcontext *ctx, int emit);
+nv10_emit_line_mode(struct gl_context *ctx, int emit);
void
-nv10_emit_line_stipple(GLcontext *ctx, int emit);
+nv10_emit_line_stipple(struct gl_context *ctx, int emit);
void
-nv10_emit_point_mode(GLcontext *ctx, int emit);
+nv10_emit_point_mode(struct gl_context *ctx, int emit);
void
-nv10_emit_polygon_mode(GLcontext *ctx, int emit);
+nv10_emit_polygon_mode(struct gl_context *ctx, int emit);
void
-nv10_emit_polygon_offset(GLcontext *ctx, int emit);
+nv10_emit_polygon_offset(struct gl_context *ctx, int emit);
void
-nv10_emit_polygon_stipple(GLcontext *ctx, int emit);
+nv10_emit_polygon_stipple(struct gl_context *ctx, int emit);
/* nv10_state_raster.c */
void
-nv10_emit_alpha_func(GLcontext *ctx, int emit);
+nv10_emit_alpha_func(struct gl_context *ctx, int emit);
void
-nv10_emit_blend_color(GLcontext *ctx, int emit);
+nv10_emit_blend_color(struct gl_context *ctx, int emit);
void
-nv10_emit_blend_equation(GLcontext *ctx, int emit);
+nv10_emit_blend_equation(struct gl_context *ctx, int emit);
void
-nv10_emit_blend_func(GLcontext *ctx, int emit);
+nv10_emit_blend_func(struct gl_context *ctx, int emit);
void
-nv10_emit_color_mask(GLcontext *ctx, int emit);
+nv10_emit_color_mask(struct gl_context *ctx, int emit);
void
-nv10_emit_depth(GLcontext *ctx, int emit);
+nv10_emit_depth(struct gl_context *ctx, int emit);
void
-nv10_emit_dither(GLcontext *ctx, int emit);
+nv10_emit_dither(struct gl_context *ctx, int emit);
void
-nv10_emit_logic_opcode(GLcontext *ctx, int emit);
+nv10_emit_logic_opcode(struct gl_context *ctx, int emit);
void
-nv10_emit_shade_model(GLcontext *ctx, int emit);
+nv10_emit_shade_model(struct gl_context *ctx, int emit);
void
-nv10_emit_stencil_func(GLcontext *ctx, int emit);
+nv10_emit_stencil_func(struct gl_context *ctx, int emit);
void
-nv10_emit_stencil_mask(GLcontext *ctx, int emit);
+nv10_emit_stencil_mask(struct gl_context *ctx, int emit);
void
-nv10_emit_stencil_op(GLcontext *ctx, int emit);
+nv10_emit_stencil_op(struct gl_context *ctx, int emit);
/* nv10_state_frag.c */
void
-nv10_get_general_combiner(GLcontext *ctx, int i,
+nv10_get_general_combiner(struct gl_context *ctx, int i,
uint32_t *a_in, uint32_t *a_out,
uint32_t *c_in, uint32_t *c_out, uint32_t *k);
void
-nv10_get_final_combiner(GLcontext *ctx, uint64_t *in, int *n);
+nv10_get_final_combiner(struct gl_context *ctx, uint64_t *in, int *n);
void
-nv10_emit_tex_env(GLcontext *ctx, int emit);
+nv10_emit_tex_env(struct gl_context *ctx, int emit);
void
-nv10_emit_frag(GLcontext *ctx, int emit);
+nv10_emit_frag(struct gl_context *ctx, int emit);
/* nv10_state_tex.c */
void
-nv10_emit_tex_gen(GLcontext *ctx, int emit);
+nv10_emit_tex_gen(struct gl_context *ctx, int emit);
void
-nv10_emit_tex_mat(GLcontext *ctx, int emit);
+nv10_emit_tex_mat(struct gl_context *ctx, int emit);
void
-nv10_emit_tex_obj(GLcontext *ctx, int emit);
+nv10_emit_tex_obj(struct gl_context *ctx, int emit);
/* nv10_state_tnl.c */
void
-nv10_get_fog_coeff(GLcontext *ctx, float k[3]);
+nv10_get_fog_coeff(struct gl_context *ctx, float k[3]);
void
nv10_get_spot_coeff(struct gl_light *l, float k[7]);
@@ -158,42 +164,42 @@ void
nv10_get_shininess_coeff(float s, float k[6]);
void
-nv10_emit_clip_plane(GLcontext *ctx, int emit);
+nv10_emit_clip_plane(struct gl_context *ctx, int emit);
void
-nv10_emit_color_material(GLcontext *ctx, int emit);
+nv10_emit_color_material(struct gl_context *ctx, int emit);
void
-nv10_emit_fog(GLcontext *ctx, int emit);
+nv10_emit_fog(struct gl_context *ctx, int emit);
void
-nv10_emit_light_enable(GLcontext *ctx, int emit);
+nv10_emit_light_enable(struct gl_context *ctx, int emit);
void
-nv10_emit_light_model(GLcontext *ctx, int emit);
+nv10_emit_light_model(struct gl_context *ctx, int emit);
void
-nv10_emit_light_source(GLcontext *ctx, int emit);
+nv10_emit_light_source(struct gl_context *ctx, int emit);
void
-nv10_emit_material_ambient(GLcontext *ctx, int emit);
+nv10_emit_material_ambient(struct gl_context *ctx, int emit);
void
-nv10_emit_material_diffuse(GLcontext *ctx, int emit);
+nv10_emit_material_diffuse(struct gl_context *ctx, int emit);
void
-nv10_emit_material_specular(GLcontext *ctx, int emit);
+nv10_emit_material_specular(struct gl_context *ctx, int emit);
void
-nv10_emit_material_shininess(GLcontext *ctx, int emit);
+nv10_emit_material_shininess(struct gl_context *ctx, int emit);
void
-nv10_emit_modelview(GLcontext *ctx, int emit);
+nv10_emit_modelview(struct gl_context *ctx, int emit);
void
-nv10_emit_point_parameter(GLcontext *ctx, int emit);
+nv10_emit_point_parameter(struct gl_context *ctx, int emit);
void
-nv10_emit_projection(GLcontext *ctx, int emit);
+nv10_emit_projection(struct gl_context *ctx, int emit);
#endif
diff --git a/src/mesa/drivers/dri/nouveau/nv10_render.c b/src/mesa/drivers/dri/nouveau/nv10_render.c
index 54245ea6bab..a03ace35366 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_render.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_render.c
@@ -32,7 +32,7 @@
#define NUM_VERTEX_ATTRS 8
static void
-nv10_emit_material(GLcontext *ctx, struct nouveau_array_state *a,
+nv10_emit_material(struct gl_context *ctx, struct nouveau_array_state *a,
const void *v);
/* Vertex attribute format. */
@@ -106,7 +106,7 @@ get_hw_format(int type)
}
static void
-nv10_render_set_format(GLcontext *ctx)
+nv10_render_set_format(struct gl_context *ctx)
{
struct nouveau_render_state *render = to_render_state(ctx);
struct nouveau_channel *chan = context_chan(ctx);
@@ -136,7 +136,7 @@ nv10_render_set_format(GLcontext *ctx)
}
static void
-nv10_render_bind_vertices(GLcontext *ctx)
+nv10_render_bind_vertices(struct gl_context *ctx)
{
struct nouveau_render_state *render = to_render_state(ctx);
struct nouveau_bo_context *bctx = context_bctx(ctx, VERTEX);
@@ -167,35 +167,35 @@ nv10_render_bind_vertices(GLcontext *ctx)
#define BATCH_BEGIN(prim) \
BEGIN_RING(chan, celsius, NV10TCL_VERTEX_BUFFER_BEGIN_END, 1); \
- OUT_RING(chan, prim);
+ OUT_RING(chan, prim)
#define BATCH_END() \
BEGIN_RING(chan, celsius, NV10TCL_VERTEX_BUFFER_BEGIN_END, 1); \
- OUT_RING(chan, 0);
+ OUT_RING(chan, 0)
#define MAX_PACKET 0x400
#define MAX_OUT_L 0x100
#define BATCH_PACKET_L(n) \
- BEGIN_RING_NI(chan, celsius, NV10TCL_VERTEX_BUFFER_DRAW_ARRAYS, n);
+ BEGIN_RING_NI(chan, celsius, NV10TCL_VERTEX_BUFFER_DRAW_ARRAYS, n)
#define BATCH_OUT_L(i, n) \
- OUT_RING(chan, ((n) - 1) << 24 | (i));
+ OUT_RING(chan, ((n) - 1) << 24 | (i))
#define MAX_OUT_I16 0x2
#define BATCH_PACKET_I16(n) \
- BEGIN_RING_NI(chan, celsius, NV10TCL_VB_ELEMENT_U16, n);
+ BEGIN_RING_NI(chan, celsius, NV10TCL_VB_ELEMENT_U16, n)
#define BATCH_OUT_I16(i0, i1) \
- OUT_RING(chan, (i1) << 16 | (i0));
+ OUT_RING(chan, (i1) << 16 | (i0))
#define MAX_OUT_I32 0x1
#define BATCH_PACKET_I32(n) \
- BEGIN_RING_NI(chan, celsius, NV10TCL_VB_ELEMENT_U32, n);
+ BEGIN_RING_NI(chan, celsius, NV10TCL_VB_ELEMENT_U32, n)
#define BATCH_OUT_I32(i) \
- OUT_RING(chan, i);
+ OUT_RING(chan, i)
#define IMM_PACKET(m, n) \
- BEGIN_RING(chan, celsius, m, n);
+ BEGIN_RING(chan, celsius, m, n)
#define IMM_OUT(x) \
- OUT_RINGf(chan, x);
+ OUT_RINGf(chan, x)
#define TAG(x) nv10_##x
#include "nouveau_render_t.c"
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
index 98eb0e8eceb..d87fe96b1c0 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
@@ -51,7 +51,7 @@ get_rt_format(gl_format format)
}
static void
-setup_lma_buffer(GLcontext *ctx)
+setup_lma_buffer(struct gl_context *ctx)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -64,8 +64,8 @@ setup_lma_buffer(GLcontext *ctx)
if (!nfb->hierz.bo || nfb->hierz.bo->size != size) {
nouveau_bo_ref(NULL, &nfb->hierz.bo);
- nouveau_bo_new(context_dev(ctx), NOUVEAU_BO_VRAM, 0, size,
- &nfb->hierz.bo);
+ nouveau_bo_new_tile(context_dev(ctx), NOUVEAU_BO_VRAM, 0, size,
+ 0, NOUVEAU_BO_TILE_ZETA, &nfb->hierz.bo);
}
nouveau_bo_markl(bctx, celsius, NV17TCL_LMA_DEPTH_BUFFER_OFFSET,
@@ -86,7 +86,7 @@ setup_lma_buffer(GLcontext *ctx)
}
void
-nv10_emit_framebuffer(GLcontext *ctx, int emit)
+nv10_emit_framebuffer(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -149,12 +149,12 @@ nv10_emit_framebuffer(GLcontext *ctx, int emit)
}
void
-nv10_emit_render_mode(GLcontext *ctx, int emit)
+nv10_emit_render_mode(struct gl_context *ctx, int emit)
{
}
void
-nv10_emit_scissor(GLcontext *ctx, int emit)
+nv10_emit_scissor(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -168,16 +168,19 @@ nv10_emit_scissor(GLcontext *ctx, int emit)
}
void
-nv10_emit_viewport(GLcontext *ctx, int emit)
+nv10_emit_viewport(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
+ struct gl_viewport_attrib *vp = &ctx->Viewport;
struct gl_framebuffer *fb = ctx->DrawBuffer;
float a[4] = {};
get_viewport_translate(ctx, a);
a[0] -= 2048;
a[1] -= 2048;
+ if (nv10_use_viewport_zclear(ctx))
+ a[2] = nv10_transform_depth(ctx, (vp->Far + vp->Near) / 2);
BEGIN_RING(chan, celsius, NV10TCL_VIEWPORT_TRANSLATE_X, 4);
OUT_RINGp(chan, a, 4);
@@ -191,7 +194,7 @@ nv10_emit_viewport(GLcontext *ctx, int emit)
}
void
-nv10_emit_zclear(GLcontext *ctx, int emit)
+nv10_emit_zclear(struct gl_context *ctx, int emit)
{
struct nouveau_context *nctx = to_nouveau_context(ctx);
struct nouveau_channel *chan = context_chan(ctx);
@@ -204,5 +207,10 @@ nv10_emit_zclear(GLcontext *ctx, int emit)
OUT_RING(chan, nctx->hierz.clear_blocked ? 0 : 1);
OUT_RING(chan, nfb->hierz.clear_value |
(nctx->hierz.clear_seq & 0xff));
+ } else {
+ BEGIN_RING(chan, celsius, NV10TCL_DEPTH_RANGE_NEAR, 2);
+ OUT_RINGf(chan, nv10_transform_depth(ctx, 0));
+ OUT_RINGf(chan, nv10_transform_depth(ctx, 1));
+ context_dirty(ctx, VIEWPORT);
}
}
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_frag.c b/src/mesa/drivers/dri/nouveau/nv10_state_frag.c
index ab713f9dbf5..5138c36df7b 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_frag.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_frag.c
@@ -61,7 +61,7 @@
#define RC_OUT_SUM NV10TCL_RC_OUT_RGB_SUM_OUTPUT_SPARE0
struct combiner_state {
- GLcontext *ctx;
+ struct gl_context *ctx;
int unit;
GLboolean premodulate;
@@ -298,7 +298,7 @@ setup_combiner(struct combiner_state *rc)
}
void
-nv10_get_general_combiner(GLcontext *ctx, int i,
+nv10_get_general_combiner(struct gl_context *ctx, int i,
uint32_t *a_in, uint32_t *a_out,
uint32_t *c_in, uint32_t *c_out, uint32_t *k)
{
@@ -328,7 +328,7 @@ nv10_get_general_combiner(GLcontext *ctx, int i,
}
void
-nv10_get_final_combiner(GLcontext *ctx, uint64_t *in, int *n)
+nv10_get_final_combiner(struct gl_context *ctx, uint64_t *in, int *n)
{
struct combiner_state rc = {};
@@ -366,7 +366,7 @@ nv10_get_final_combiner(GLcontext *ctx, uint64_t *in, int *n)
}
void
-nv10_emit_tex_env(GLcontext *ctx, int emit)
+nv10_emit_tex_env(struct gl_context *ctx, int emit)
{
const int i = emit - NOUVEAU_STATE_TEX_ENV0;
struct nouveau_channel *chan = context_chan(ctx);
@@ -398,7 +398,7 @@ nv10_emit_tex_env(GLcontext *ctx, int emit)
}
void
-nv10_emit_frag(GLcontext *ctx, int emit)
+nv10_emit_frag(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_polygon.c b/src/mesa/drivers/dri/nouveau/nv10_state_polygon.c
index deddca10118..4e49b0278cd 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_polygon.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_polygon.c
@@ -31,7 +31,7 @@
#include "nv10_driver.h"
void
-nv10_emit_cull_face(GLcontext *ctx, int emit)
+nv10_emit_cull_face(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -47,7 +47,7 @@ nv10_emit_cull_face(GLcontext *ctx, int emit)
}
void
-nv10_emit_front_face(GLcontext *ctx, int emit)
+nv10_emit_front_face(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -58,7 +58,7 @@ nv10_emit_front_face(GLcontext *ctx, int emit)
}
void
-nv10_emit_line_mode(GLcontext *ctx, int emit)
+nv10_emit_line_mode(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -73,12 +73,12 @@ nv10_emit_line_mode(GLcontext *ctx, int emit)
}
void
-nv10_emit_line_stipple(GLcontext *ctx, int emit)
+nv10_emit_line_stipple(struct gl_context *ctx, int emit)
{
}
void
-nv10_emit_point_mode(GLcontext *ctx, int emit)
+nv10_emit_point_mode(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -91,7 +91,7 @@ nv10_emit_point_mode(GLcontext *ctx, int emit)
}
void
-nv10_emit_polygon_mode(GLcontext *ctx, int emit)
+nv10_emit_polygon_mode(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -105,7 +105,7 @@ nv10_emit_polygon_mode(GLcontext *ctx, int emit)
}
void
-nv10_emit_polygon_offset(GLcontext *ctx, int emit)
+nv10_emit_polygon_offset(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -121,6 +121,6 @@ nv10_emit_polygon_offset(GLcontext *ctx, int emit)
}
void
-nv10_emit_polygon_stipple(GLcontext *ctx, int emit)
+nv10_emit_polygon_stipple(struct gl_context *ctx, int emit)
{
}
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_raster.c b/src/mesa/drivers/dri/nouveau/nv10_state_raster.c
index a62cd807a91..99609844a18 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_raster.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_raster.c
@@ -31,7 +31,7 @@
#include "nv10_driver.h"
void
-nv10_emit_alpha_func(GLcontext *ctx, int emit)
+nv10_emit_alpha_func(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -45,7 +45,7 @@ nv10_emit_alpha_func(GLcontext *ctx, int emit)
}
void
-nv10_emit_blend_color(GLcontext *ctx, int emit)
+nv10_emit_blend_color(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -58,7 +58,7 @@ nv10_emit_blend_color(GLcontext *ctx, int emit)
}
void
-nv10_emit_blend_equation(GLcontext *ctx, int emit)
+nv10_emit_blend_equation(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -71,7 +71,7 @@ nv10_emit_blend_equation(GLcontext *ctx, int emit)
}
void
-nv10_emit_blend_func(GLcontext *ctx, int emit)
+nv10_emit_blend_func(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -82,7 +82,7 @@ nv10_emit_blend_func(GLcontext *ctx, int emit)
}
void
-nv10_emit_color_mask(GLcontext *ctx, int emit)
+nv10_emit_color_mask(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -95,7 +95,7 @@ nv10_emit_color_mask(GLcontext *ctx, int emit)
}
void
-nv10_emit_depth(GLcontext *ctx, int emit)
+nv10_emit_depth(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -109,7 +109,7 @@ nv10_emit_depth(GLcontext *ctx, int emit)
}
void
-nv10_emit_dither(GLcontext *ctx, int emit)
+nv10_emit_dither(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -119,7 +119,7 @@ nv10_emit_dither(GLcontext *ctx, int emit)
}
void
-nv10_emit_logic_opcode(GLcontext *ctx, int emit)
+nv10_emit_logic_opcode(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -133,7 +133,7 @@ nv10_emit_logic_opcode(GLcontext *ctx, int emit)
}
void
-nv10_emit_shade_model(GLcontext *ctx, int emit)
+nv10_emit_shade_model(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -144,7 +144,7 @@ nv10_emit_shade_model(GLcontext *ctx, int emit)
}
void
-nv10_emit_stencil_func(GLcontext *ctx, int emit)
+nv10_emit_stencil_func(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -159,7 +159,7 @@ nv10_emit_stencil_func(GLcontext *ctx, int emit)
}
void
-nv10_emit_stencil_mask(GLcontext *ctx, int emit)
+nv10_emit_stencil_mask(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -169,7 +169,7 @@ nv10_emit_stencil_mask(GLcontext *ctx, int emit)
}
void
-nv10_emit_stencil_op(GLcontext *ctx, int emit)
+nv10_emit_stencil_op(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_tex.c b/src/mesa/drivers/dri/nouveau/nv10_state_tex.c
index 6961ccbb450..0092ad0c20c 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_tex.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_tex.c
@@ -37,7 +37,7 @@
#define TX_MATRIX(i) (NV10TCL_TX0_MATRIX(0) + 64 * (i))
void
-nv10_emit_tex_gen(GLcontext *ctx, int emit)
+nv10_emit_tex_gen(struct gl_context *ctx, int emit)
{
const int i = emit - NOUVEAU_STATE_TEX_GEN0;
struct nouveau_context *nctx = to_nouveau_context(ctx);
@@ -70,7 +70,7 @@ nv10_emit_tex_gen(GLcontext *ctx, int emit)
}
void
-nv10_emit_tex_mat(GLcontext *ctx, int emit)
+nv10_emit_tex_mat(struct gl_context *ctx, int emit)
{
const int i = emit - NOUVEAU_STATE_TEX_MAT0;
struct nouveau_context *nctx = to_nouveau_context(ctx);
@@ -151,7 +151,7 @@ get_tex_format_rect(struct gl_texture_image *ti)
}
void
-nv10_emit_tex_obj(GLcontext *ctx, int emit)
+nv10_emit_tex_obj(struct gl_context *ctx, int emit)
{
const int i = emit - NOUVEAU_STATE_TEX_OBJ0;
struct nouveau_channel *chan = context_chan(ctx);
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c b/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c
index 0e592a16292..175abfca5c1 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c
@@ -32,7 +32,7 @@
#include "nv10_driver.h"
void
-nv10_emit_clip_plane(GLcontext *ctx, int emit)
+nv10_emit_clip_plane(struct gl_context *ctx, int emit)
{
}
@@ -54,7 +54,7 @@ get_material_bitmask(unsigned m)
}
void
-nv10_emit_color_material(GLcontext *ctx, int emit)
+nv10_emit_color_material(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -93,7 +93,7 @@ get_fog_source(unsigned source)
}
void
-nv10_get_fog_coeff(GLcontext *ctx, float k[3])
+nv10_get_fog_coeff(struct gl_context *ctx, float k[3])
{
struct gl_fog_attrib *f = &ctx->Fog;
@@ -121,7 +121,7 @@ nv10_get_fog_coeff(GLcontext *ctx, float k[3])
}
void
-nv10_emit_fog(GLcontext *ctx, int emit)
+nv10_emit_fog(struct gl_context *ctx, int emit)
{
struct nouveau_context *nctx = to_nouveau_context(ctx);
struct nouveau_channel *chan = context_chan(ctx);
@@ -161,7 +161,7 @@ get_light_mode(struct gl_light *l)
}
void
-nv10_emit_light_enable(GLcontext *ctx, int emit)
+nv10_emit_light_enable(struct gl_context *ctx, int emit)
{
struct nouveau_context *nctx = to_nouveau_context(ctx);
struct nouveau_channel *chan = context_chan(ctx);
@@ -187,7 +187,7 @@ nv10_emit_light_enable(GLcontext *ctx, int emit)
}
void
-nv10_emit_light_model(GLcontext *ctx, int emit)
+nv10_emit_light_model(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -273,7 +273,7 @@ nv10_get_spot_coeff(struct gl_light *l, float k[7])
}
void
-nv10_emit_light_source(GLcontext *ctx, int emit)
+nv10_emit_light_source(struct gl_context *ctx, int emit)
{
const int i = emit - NOUVEAU_STATE_LIGHT_SOURCE0;
struct nouveau_channel *chan = context_chan(ctx);
@@ -313,7 +313,7 @@ nv10_emit_light_source(GLcontext *ctx, int emit)
ctx->Light.ColorMaterialBitmask & (1 << MAT_ATTRIB_FRONT_##attr))
void
-nv10_emit_material_ambient(GLcontext *ctx, int emit)
+nv10_emit_material_ambient(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -355,7 +355,7 @@ nv10_emit_material_ambient(GLcontext *ctx, int emit)
}
void
-nv10_emit_material_diffuse(GLcontext *ctx, int emit)
+nv10_emit_material_diffuse(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -377,7 +377,7 @@ nv10_emit_material_diffuse(GLcontext *ctx, int emit)
}
void
-nv10_emit_material_specular(GLcontext *ctx, int emit)
+nv10_emit_material_specular(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -419,7 +419,7 @@ nv10_get_shininess_coeff(float s, float k[6])
}
void
-nv10_emit_material_shininess(GLcontext *ctx, int emit)
+nv10_emit_material_shininess(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
@@ -435,7 +435,7 @@ nv10_emit_material_shininess(GLcontext *ctx, int emit)
}
void
-nv10_emit_modelview(GLcontext *ctx, int emit)
+nv10_emit_modelview(struct gl_context *ctx, int emit)
{
struct nouveau_context *nctx = to_nouveau_context(ctx);
struct nouveau_channel *chan = context_chan(ctx);
@@ -464,12 +464,12 @@ nv10_emit_modelview(GLcontext *ctx, int emit)
}
void
-nv10_emit_point_parameter(GLcontext *ctx, int emit)
+nv10_emit_point_parameter(struct gl_context *ctx, int emit)
{
}
void
-nv10_emit_projection(GLcontext *ctx, int emit)
+nv10_emit_projection(struct gl_context *ctx, int emit)
{
struct nouveau_context *nctx = to_nouveau_context(ctx);
struct nouveau_channel *chan = context_chan(ctx);
@@ -479,6 +479,9 @@ nv10_emit_projection(GLcontext *ctx, int emit)
_math_matrix_ctr(&m);
get_viewport_scale(ctx, m.m);
+ if (nv10_use_viewport_zclear(ctx))
+ m.m[MAT_SZ] /= 8;
+
if (nctx->fallback == HWTNL)
_math_matrix_mul_matrix(&m, &m, &ctx->_ModelProjectMatrix);
diff --git a/src/mesa/drivers/dri/nouveau/nv20_context.c b/src/mesa/drivers/dri/nouveau/nv20_context.c
index b9c221e716b..c6111a2a9a0 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_context.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_context.c
@@ -40,7 +40,7 @@ static const struct dri_extension nv20_extensions[] = {
};
static void
-nv20_hwctx_init(GLcontext *ctx)
+nv20_hwctx_init(struct gl_context *ctx)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *kelvin = context_eng3d(ctx);
@@ -371,7 +371,7 @@ nv20_hwctx_init(GLcontext *ctx)
}
static void
-nv20_context_destroy(GLcontext *ctx)
+nv20_context_destroy(struct gl_context *ctx)
{
struct nouveau_context *nctx = to_nouveau_context(ctx);
@@ -384,12 +384,12 @@ nv20_context_destroy(GLcontext *ctx)
FREE(ctx);
}
-static GLcontext *
-nv20_context_create(struct nouveau_screen *screen, const GLvisual *visual,
- GLcontext *share_ctx)
+static struct gl_context *
+nv20_context_create(struct nouveau_screen *screen, const struct gl_config *visual,
+ struct gl_context *share_ctx)
{
struct nouveau_context *nctx;
- GLcontext *ctx;
+ struct gl_context *ctx;
unsigned kelvin_class;
int ret;
diff --git a/src/mesa/drivers/dri/nouveau/nv20_driver.h b/src/mesa/drivers/dri/nouveau/nv20_driver.h
index 8adecef2c4e..7fbe6ccfa68 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_driver.h
+++ b/src/mesa/drivers/dri/nouveau/nv20_driver.h
@@ -39,78 +39,78 @@ extern const struct nouveau_driver nv20_driver;
/* nv20_render.c */
void
-nv20_render_init(GLcontext *ctx);
+nv20_render_init(struct gl_context *ctx);
void
-nv20_render_destroy(GLcontext *ctx);
+nv20_render_destroy(struct gl_context *ctx);
/* nv20_state_fb.c */
void
-nv20_emit_framebuffer(GLcontext *ctx, int emit);
+nv20_emit_framebuffer(struct gl_context *ctx, int emit);
void
-nv20_emit_viewport(GLcontext *ctx, int emit);
+nv20_emit_viewport(struct gl_context *ctx, int emit);
/* nv20_state_polygon.c */
void
-nv20_emit_point_mode(GLcontext *ctx, int emit);
+nv20_emit_point_mode(struct gl_context *ctx, int emit);
/* nv20_state_raster.c */
void
-nv20_emit_logic_opcode(GLcontext *ctx, int emit);
+nv20_emit_logic_opcode(struct gl_context *ctx, int emit);
/* nv20_state_frag.c */
void
-nv20_emit_tex_env(GLcontext *ctx, int emit);
+nv20_emit_tex_env(struct gl_context *ctx, int emit);
void
-nv20_emit_frag(GLcontext *ctx, int emit);
+nv20_emit_frag(struct gl_context *ctx, int emit);
/* nv20_state_tex.c */
void
-nv20_emit_tex_gen(GLcontext *ctx, int emit);
+nv20_emit_tex_gen(struct gl_context *ctx, int emit);
void
-nv20_emit_tex_mat(GLcontext *ctx, int emit);
+nv20_emit_tex_mat(struct gl_context *ctx, int emit);
void
-nv20_emit_tex_obj(GLcontext *ctx, int emit);
+nv20_emit_tex_obj(struct gl_context *ctx, int emit);
void
-nv20_emit_tex_shader(GLcontext *ctx, int emit);
+nv20_emit_tex_shader(struct gl_context *ctx, int emit);
/* nv20_state_tnl.c */
void
-nv20_emit_clip_plane(GLcontext *ctx, int emit);
+nv20_emit_clip_plane(struct gl_context *ctx, int emit);
void
-nv20_emit_color_material(GLcontext *ctx, int emit);
+nv20_emit_color_material(struct gl_context *ctx, int emit);
void
-nv20_emit_fog(GLcontext *ctx, int emit);
+nv20_emit_fog(struct gl_context *ctx, int emit);
void
-nv20_emit_light_model(GLcontext *ctx, int emit);
+nv20_emit_light_model(struct gl_context *ctx, int emit);
void
-nv20_emit_light_source(GLcontext *ctx, int emit);
+nv20_emit_light_source(struct gl_context *ctx, int emit);
void
-nv20_emit_material_ambient(GLcontext *ctx, int emit);
+nv20_emit_material_ambient(struct gl_context *ctx, int emit);
void
-nv20_emit_material_diffuse(GLcontext *ctx, int emit);
+nv20_emit_material_diffuse(struct gl_context *ctx, int emit);
void
-nv20_emit_material_specular(GLcontext *ctx, int emit);
+nv20_emit_material_specular(struct gl_context *ctx, int emit);
void
-nv20_emit_material_shininess(GLcontext *ctx, int emit);
+nv20_emit_material_shininess(struct gl_context *ctx, int emit);
void
-nv20_emit_modelview(GLcontext *ctx, int emit);
+nv20_emit_modelview(struct gl_context *ctx, int emit);
void
-nv20_emit_projection(GLcontext *ctx, int emit);
+nv20_emit_projection(struct gl_context *ctx, int emit);
#endif
diff --git a/src/mesa/drivers/dri/nouveau/nv20_render.c b/src/mesa/drivers/dri/nouveau/nv20_render.c
index a696ac107f5..6b668544627 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_render.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_render.c
@@ -32,7 +32,7 @@
#define NUM_VERTEX_ATTRS 16
static void
-nv20_emit_material(GLcontext *ctx, struct nouveau_array_state *a,
+nv20_emit_material(struct gl_context *ctx, struct nouveau_array_state *a,
const void *v);
/* Vertex attribute format. */
@@ -130,7 +130,7 @@ get_hw_format(int type)
}
static void
-nv20_render_set_format(GLcontext *ctx)
+nv20_render_set_format(struct gl_context *ctx)
{
struct nouveau_render_state *render = to_render_state(ctx);
struct nouveau_channel *chan = context_chan(ctx);
@@ -158,7 +158,7 @@ nv20_render_set_format(GLcontext *ctx)
}
static void
-nv20_render_bind_vertices(GLcontext *ctx)
+nv20_render_bind_vertices(struct gl_context *ctx)
{
struct nouveau_render_state *render = to_render_state(ctx);
struct nouveau_bo_context *bctx = context_bctx(ctx, VERTEX);
@@ -191,35 +191,35 @@ nv20_render_bind_vertices(GLcontext *ctx)
#define BATCH_BEGIN(prim) \
BEGIN_RING(chan, kelvin, NV20TCL_VERTEX_BEGIN_END, 1); \
- OUT_RING(chan, prim);
+ OUT_RING(chan, prim)
#define BATCH_END() \
BEGIN_RING(chan, kelvin, NV20TCL_VERTEX_BEGIN_END, 1); \
- OUT_RING(chan, 0);
+ OUT_RING(chan, 0)
#define MAX_PACKET 0x400
#define MAX_OUT_L 0x100
#define BATCH_PACKET_L(n) \
- BEGIN_RING_NI(chan, kelvin, NV20TCL_VB_VERTEX_BATCH, n);
+ BEGIN_RING_NI(chan, kelvin, NV20TCL_VB_VERTEX_BATCH, n)
#define BATCH_OUT_L(i, n) \
- OUT_RING(chan, ((n) - 1) << 24 | (i));
+ OUT_RING(chan, ((n) - 1) << 24 | (i))
#define MAX_OUT_I16 0x2
#define BATCH_PACKET_I16(n) \
- BEGIN_RING_NI(chan, kelvin, NV20TCL_VB_ELEMENT_U16, n);
+ BEGIN_RING_NI(chan, kelvin, NV20TCL_VB_ELEMENT_U16, n)
#define BATCH_OUT_I16(i0, i1) \
- OUT_RING(chan, (i1) << 16 | (i0));
+ OUT_RING(chan, (i1) << 16 | (i0))
#define MAX_OUT_I32 0x1
#define BATCH_PACKET_I32(n) \
- BEGIN_RING_NI(chan, kelvin, NV20TCL_VB_ELEMENT_U32, n);
+ BEGIN_RING_NI(chan, kelvin, NV20TCL_VB_ELEMENT_U32, n)
#define BATCH_OUT_I32(i) \
- OUT_RING(chan, i);
+ OUT_RING(chan, i)
#define IMM_PACKET(m, n) \
- BEGIN_RING(chan, kelvin, m, n);
+ BEGIN_RING(chan, kelvin, m, n)
#define IMM_OUT(x) \
- OUT_RINGf(chan, x);
+ OUT_RINGf(chan, x)
#define TAG(x) nv20_##x
#include "nouveau_render_t.c"
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_fb.c b/src/mesa/drivers/dri/nouveau/nv20_state_fb.c
index 95691cad047..7822ca2a098 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_fb.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_fb.c
@@ -52,7 +52,7 @@ get_rt_format(gl_format format)
}
void
-nv20_emit_framebuffer(GLcontext *ctx, int emit)
+nv20_emit_framebuffer(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *kelvin = context_eng3d(ctx);
@@ -103,7 +103,7 @@ nv20_emit_framebuffer(GLcontext *ctx, int emit)
}
void
-nv20_emit_viewport(GLcontext *ctx, int emit)
+nv20_emit_viewport(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *kelvin = context_eng3d(ctx);
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_frag.c b/src/mesa/drivers/dri/nouveau/nv20_state_frag.c
index 74803d2ae84..f9212d8b396 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_frag.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_frag.c
@@ -31,7 +31,7 @@
#include "nv20_driver.h"
void
-nv20_emit_tex_env(GLcontext *ctx, int emit)
+nv20_emit_tex_env(struct gl_context *ctx, int emit)
{
const int i = emit - NOUVEAU_STATE_TEX_ENV0;
struct nouveau_channel *chan = context_chan(ctx);
@@ -55,7 +55,7 @@ nv20_emit_tex_env(GLcontext *ctx, int emit)
}
void
-nv20_emit_frag(GLcontext *ctx, int emit)
+nv20_emit_frag(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *kelvin = context_eng3d(ctx);
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_polygon.c b/src/mesa/drivers/dri/nouveau/nv20_state_polygon.c
index 3a320e2dac5..a6e237f8c42 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_polygon.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_polygon.c
@@ -31,7 +31,7 @@
#include "nv20_driver.h"
void
-nv20_emit_point_mode(GLcontext *ctx, int emit)
+nv20_emit_point_mode(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *kelvin = context_eng3d(ctx);
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_raster.c b/src/mesa/drivers/dri/nouveau/nv20_state_raster.c
index b43b29bb23b..0fc7a3259d7 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_raster.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_raster.c
@@ -31,7 +31,7 @@
#include "nv20_driver.h"
void
-nv20_emit_logic_opcode(GLcontext *ctx, int emit)
+nv20_emit_logic_opcode(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *kelvin = context_eng3d(ctx);
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_tex.c b/src/mesa/drivers/dri/nouveau/nv20_state_tex.c
index ea6b9b96db3..cfff1fe8397 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_tex.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_tex.c
@@ -37,7 +37,7 @@
#define TX_MATRIX(i) (NV20TCL_TX0_MATRIX(0) + 64 * (i))
void
-nv20_emit_tex_gen(GLcontext *ctx, int emit)
+nv20_emit_tex_gen(struct gl_context *ctx, int emit)
{
const int i = emit - NOUVEAU_STATE_TEX_GEN0;
struct nouveau_context *nctx = to_nouveau_context(ctx);
@@ -67,7 +67,7 @@ nv20_emit_tex_gen(GLcontext *ctx, int emit)
}
void
-nv20_emit_tex_mat(GLcontext *ctx, int emit)
+nv20_emit_tex_mat(struct gl_context *ctx, int emit)
{
const int i = emit - NOUVEAU_STATE_TEX_MAT0;
struct nouveau_context *nctx = to_nouveau_context(ctx);
@@ -154,7 +154,7 @@ get_tex_format_rect(struct gl_texture_image *ti)
}
void
-nv20_emit_tex_obj(GLcontext *ctx, int emit)
+nv20_emit_tex_obj(struct gl_context *ctx, int emit)
{
const int i = emit - NOUVEAU_STATE_TEX_OBJ0;
struct nouveau_channel *chan = context_chan(ctx);
@@ -251,7 +251,7 @@ nv20_emit_tex_obj(GLcontext *ctx, int emit)
}
void
-nv20_emit_tex_shader(GLcontext *ctx, int emit)
+nv20_emit_tex_shader(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *kelvin = context_eng3d(ctx);
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c b/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c
index 2daaae260c5..b65cd9ad871 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c
@@ -55,7 +55,7 @@
NV20TCL_FRONT_MATERIAL_SHININESS(0))
void
-nv20_emit_clip_plane(GLcontext *ctx, int emit)
+nv20_emit_clip_plane(struct gl_context *ctx, int emit)
{
}
@@ -86,7 +86,7 @@ get_material_bitmask(unsigned m)
}
void
-nv20_emit_color_material(GLcontext *ctx, int emit)
+nv20_emit_color_material(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *kelvin = context_eng3d(ctx);
@@ -140,7 +140,7 @@ get_fog_source(unsigned source)
}
void
-nv20_emit_fog(GLcontext *ctx, int emit)
+nv20_emit_fog(struct gl_context *ctx, int emit)
{
struct nouveau_context *nctx = to_nouveau_context(ctx);
struct nouveau_channel *chan = context_chan(ctx);
@@ -165,7 +165,7 @@ nv20_emit_fog(GLcontext *ctx, int emit)
}
void
-nv20_emit_light_model(GLcontext *ctx, int emit)
+nv20_emit_light_model(struct gl_context *ctx, int emit)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *kelvin = context_eng3d(ctx);
@@ -187,7 +187,7 @@ nv20_emit_light_model(GLcontext *ctx, int emit)
}
void
-nv20_emit_light_source(GLcontext *ctx, int emit)
+nv20_emit_light_source(struct gl_context *ctx, int emit)
{
const int i = emit - NOUVEAU_STATE_LIGHT_SOURCE0;
struct nouveau_channel *chan = context_chan(ctx);
@@ -226,7 +226,7 @@ nv20_emit_light_source(GLcontext *ctx, int emit)
ctx->Light.ColorMaterialBitmask & (1 << MAT_ATTRIB_##attr(side)))
void
-nv20_emit_material_ambient(GLcontext *ctx, int emit)
+nv20_emit_material_ambient(struct gl_context *ctx, int emit)
{
const int side = emit - NOUVEAU_STATE_MATERIAL_FRONT_AMBIENT;
struct nouveau_channel *chan = context_chan(ctx);
@@ -269,7 +269,7 @@ nv20_emit_material_ambient(GLcontext *ctx, int emit)
}
void
-nv20_emit_material_diffuse(GLcontext *ctx, int emit)
+nv20_emit_material_diffuse(struct gl_context *ctx, int emit)
{
const int side = emit - NOUVEAU_STATE_MATERIAL_FRONT_DIFFUSE;
struct nouveau_channel *chan = context_chan(ctx);
@@ -292,7 +292,7 @@ nv20_emit_material_diffuse(GLcontext *ctx, int emit)
}
void
-nv20_emit_material_specular(GLcontext *ctx, int emit)
+nv20_emit_material_specular(struct gl_context *ctx, int emit)
{
const int side = emit - NOUVEAU_STATE_MATERIAL_FRONT_SPECULAR;
struct nouveau_channel *chan = context_chan(ctx);
@@ -311,7 +311,7 @@ nv20_emit_material_specular(GLcontext *ctx, int emit)
}
void
-nv20_emit_material_shininess(GLcontext *ctx, int emit)
+nv20_emit_material_shininess(struct gl_context *ctx, int emit)
{
const int side = emit - NOUVEAU_STATE_MATERIAL_FRONT_SHININESS;
struct nouveau_channel *chan = context_chan(ctx);
@@ -328,7 +328,7 @@ nv20_emit_material_shininess(GLcontext *ctx, int emit)
}
void
-nv20_emit_modelview(GLcontext *ctx, int emit)
+nv20_emit_modelview(struct gl_context *ctx, int emit)
{
struct nouveau_context *nctx = to_nouveau_context(ctx);
struct nouveau_channel *chan = context_chan(ctx);
@@ -357,7 +357,7 @@ nv20_emit_modelview(GLcontext *ctx, int emit)
}
void
-nv20_emit_projection(GLcontext *ctx, int emit)
+nv20_emit_projection(struct gl_context *ctx, int emit)
{
struct nouveau_context *nctx = to_nouveau_context(ctx);
struct nouveau_channel *chan = context_chan(ctx);
diff --git a/src/mesa/drivers/dri/r128/r128_context.c b/src/mesa/drivers/dri/r128/r128_context.c
index b917e0e0dcd..274108005f3 100644
--- a/src/mesa/drivers/dri/r128/r128_context.c
+++ b/src/mesa/drivers/dri/r128/r128_context.c
@@ -99,11 +99,11 @@ static const struct dri_debug_control debug_control[] =
/* Create the device specific context.
*/
GLboolean r128CreateContext( gl_api api,
- const __GLcontextModes *glVisual,
+ const struct gl_config *glVisual,
__DRIcontext *driContextPriv,
void *sharedContextPrivate )
{
- GLcontext *ctx, *shareCtx;
+ struct gl_context *ctx, *shareCtx;
__DRIscreen *sPriv = driContextPriv->driScreenPriv;
struct dd_function_table functions;
r128ContextPtr rmesa;
@@ -348,8 +348,8 @@ r128MakeCurrent( __DRIcontext *driContextPriv,
newR128Ctx->driDrawable = driDrawPriv;
_mesa_make_current( newR128Ctx->glCtx,
- (GLframebuffer *) driDrawPriv->driverPrivate,
- (GLframebuffer *) driReadPriv->driverPrivate );
+ (struct gl_framebuffer *) driDrawPriv->driverPrivate,
+ (struct gl_framebuffer *) driReadPriv->driverPrivate );
newR128Ctx->new_state |= R128_NEW_WINDOW | R128_NEW_CLIP;
} else {
diff --git a/src/mesa/drivers/dri/r128/r128_context.h b/src/mesa/drivers/dri/r128/r128_context.h
index 65ddb3bd23b..0a06c43878d 100644
--- a/src/mesa/drivers/dri/r128/r128_context.h
+++ b/src/mesa/drivers/dri/r128/r128_context.h
@@ -113,7 +113,7 @@ typedef void (*r128_point_func)( r128ContextPtr,
struct r128_context {
- GLcontext *glCtx; /* Mesa context */
+ struct gl_context *glCtx; /* Mesa context */
/* Driver and hardware state management
*/
@@ -225,7 +225,7 @@ struct r128_context {
extern GLboolean r128CreateContext( gl_api api,
- const __GLcontextModes *glVisual,
+ const struct gl_config *glVisual,
__DRIcontext *driContextPriv,
void *sharedContextPrivate );
diff --git a/src/mesa/drivers/dri/r128/r128_dd.c b/src/mesa/drivers/dri/r128/r128_dd.c
index 64dec70cdd5..0b7005eba69 100644
--- a/src/mesa/drivers/dri/r128/r128_dd.c
+++ b/src/mesa/drivers/dri/r128/r128_dd.c
@@ -45,7 +45,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
/* Return the width and height of the current color buffer.
*/
-static void r128GetBufferSize( GLframebuffer *buffer,
+static void r128GetBufferSize( struct gl_framebuffer *buffer,
GLuint *width, GLuint *height )
{
GET_CURRENT_CONTEXT(ctx);
@@ -59,7 +59,7 @@ static void r128GetBufferSize( GLframebuffer *buffer,
/* Return various strings for glGetString().
*/
-static const GLubyte *r128GetString( GLcontext *ctx, GLenum name )
+static const GLubyte *r128GetString( struct gl_context *ctx, GLenum name )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
static char buffer[128];
@@ -97,7 +97,7 @@ static const GLubyte *r128GetString( GLcontext *ctx, GLenum name )
* hardware. All commands that are normally sent to the ring are
* already considered `flushed'.
*/
-static void r128Flush( GLcontext *ctx )
+static void r128Flush( struct gl_context *ctx )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -118,7 +118,7 @@ static void r128Flush( GLcontext *ctx )
/* Make sure all commands have been sent to the hardware and have
* completed processing.
*/
-static void r128Finish( GLcontext *ctx )
+static void r128Finish( struct gl_context *ctx )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/r128/r128_ioctl.c b/src/mesa/drivers/dri/r128/r128_ioctl.c
index 56758d971c3..950e1d4fbd5 100644
--- a/src/mesa/drivers/dri/r128/r128_ioctl.c
+++ b/src/mesa/drivers/dri/r128/r128_ioctl.c
@@ -398,7 +398,7 @@ void r128PageFlip( __DRIdrawable *dPriv )
* Buffer clear
*/
-static void r128Clear( GLcontext *ctx, GLbitfield mask )
+static void r128Clear( struct gl_context *ctx, GLbitfield mask )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
__DRIdrawable *dPriv = rmesa->driDrawable;
diff --git a/src/mesa/drivers/dri/r128/r128_screen.c b/src/mesa/drivers/dri/r128/r128_screen.c
index 7626a159d6a..bbcb6ee1808 100644
--- a/src/mesa/drivers/dri/r128/r128_screen.c
+++ b/src/mesa/drivers/dri/r128/r128_screen.c
@@ -262,7 +262,7 @@ r128DestroyScreen( __DRIscreen *sPriv )
static GLboolean
r128CreateBuffer( __DRIscreen *driScrnPriv,
__DRIdrawable *driDrawPriv,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
GLboolean isPixmap )
{
r128ScreenPtr screen = (r128ScreenPtr) driScrnPriv->private;
@@ -349,7 +349,7 @@ r128CreateBuffer( __DRIscreen *driScrnPriv,
static void
r128DestroyBuffer(__DRIdrawable *driDrawPriv)
{
- _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
+ _mesa_reference_framebuffer((struct gl_framebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
}
@@ -359,7 +359,7 @@ r128SwapBuffers(__DRIdrawable *dPriv)
{
if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) {
r128ContextPtr rmesa;
- GLcontext *ctx;
+ struct gl_context *ctx;
rmesa = (r128ContextPtr) dPriv->driContextPriv->driverPrivate;
ctx = rmesa->glCtx;
if (ctx->Visual.doubleBufferMode) {
@@ -400,7 +400,7 @@ r128FillInModes( __DRIscreen *psp,
unsigned stencil_bits, GLboolean have_back_buffer )
{
__DRIconfig **configs;
- __GLcontextModes * m;
+ struct gl_config * m;
unsigned depth_buffer_factor;
unsigned back_buffer_factor;
GLenum fb_format;
@@ -473,7 +473,7 @@ r128FillInModes( __DRIscreen *psp,
*
* \todo maybe fold this into intelInitDriver
*
- * \return the __GLcontextModes supported by this driver
+ * \return the struct gl_config supported by this driver
*/
static const __DRIconfig **
r128InitScreen(__DRIscreen *psp)
diff --git a/src/mesa/drivers/dri/r128/r128_span.c b/src/mesa/drivers/dri/r128/r128_span.c
index 2fbe93c5905..307de56ee13 100644
--- a/src/mesa/drivers/dri/r128/r128_span.c
+++ b/src/mesa/drivers/dri/r128/r128_span.c
@@ -400,7 +400,7 @@ do { \
#include "stenciltmp.h"
static void
-r128SpanRenderStart( GLcontext *ctx )
+r128SpanRenderStart( struct gl_context *ctx )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
FLUSH_BATCH(rmesa);
@@ -409,7 +409,7 @@ r128SpanRenderStart( GLcontext *ctx )
}
static void
-r128SpanRenderFinish( GLcontext *ctx )
+r128SpanRenderFinish( struct gl_context *ctx )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
_swrast_flush( ctx );
@@ -417,7 +417,7 @@ r128SpanRenderFinish( GLcontext *ctx )
UNLOCK_HARDWARE( rmesa );
}
-void r128DDInitSpanFuncs( GLcontext *ctx )
+void r128DDInitSpanFuncs( struct gl_context *ctx )
{
struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference(ctx);
swdd->SpanRenderStart = r128SpanRenderStart;
@@ -429,7 +429,7 @@ void r128DDInitSpanFuncs( GLcontext *ctx )
* Plug in the Get/Put routines for the given driRenderbuffer.
*/
void
-r128SetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis)
+r128SetSpanFunctions(driRenderbuffer *drb, const struct gl_config *vis)
{
if (drb->Base.Format == MESA_FORMAT_RGB565) {
r128InitPointers_RGB565(&drb->Base);
diff --git a/src/mesa/drivers/dri/r128/r128_span.h b/src/mesa/drivers/dri/r128/r128_span.h
index 9af40581290..adb571d4d0f 100644
--- a/src/mesa/drivers/dri/r128/r128_span.h
+++ b/src/mesa/drivers/dri/r128/r128_span.h
@@ -37,9 +37,9 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "drirenderbuffer.h"
-extern void r128DDInitSpanFuncs( GLcontext *ctx );
+extern void r128DDInitSpanFuncs( struct gl_context *ctx );
extern void
-r128SetSpanFunctions(driRenderbuffer *rb, const GLvisual *vis);
+r128SetSpanFunctions(driRenderbuffer *rb, const struct gl_config *vis);
#endif
diff --git a/src/mesa/drivers/dri/r128/r128_state.c b/src/mesa/drivers/dri/r128/r128_state.c
index 9ad25f7f463..4a49e8fc70f 100644
--- a/src/mesa/drivers/dri/r128/r128_state.c
+++ b/src/mesa/drivers/dri/r128/r128_state.c
@@ -125,7 +125,7 @@ static int blend_factor( r128ContextPtr rmesa, GLenum factor, GLboolean is_src )
}
-static void r128UpdateAlphaMode( GLcontext *ctx )
+static void r128UpdateAlphaMode( struct gl_context *ctx )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
GLuint a = rmesa->setup.misc_3d_state_cntl_reg;
@@ -209,7 +209,7 @@ static void r128UpdateAlphaMode( GLcontext *ctx )
}
}
-static void r128DDAlphaFunc( GLcontext *ctx, GLenum func, GLfloat ref )
+static void r128DDAlphaFunc( struct gl_context *ctx, GLenum func, GLfloat ref )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -217,7 +217,7 @@ static void r128DDAlphaFunc( GLcontext *ctx, GLenum func, GLfloat ref )
rmesa->new_state |= R128_NEW_ALPHA;
}
-static void r128DDBlendEquationSeparate( GLcontext *ctx,
+static void r128DDBlendEquationSeparate( struct gl_context *ctx,
GLenum modeRGB, GLenum modeA )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -239,7 +239,7 @@ static void r128DDBlendEquationSeparate( GLcontext *ctx,
rmesa->new_state |= R128_NEW_ALPHA;
}
-static void r128DDBlendFuncSeparate( GLcontext *ctx,
+static void r128DDBlendFuncSeparate( struct gl_context *ctx,
GLenum sfactorRGB, GLenum dfactorRGB,
GLenum sfactorA, GLenum dfactorA )
{
@@ -254,7 +254,7 @@ static void r128DDBlendFuncSeparate( GLcontext *ctx,
*/
static void
-r128DDStencilFuncSeparate( GLcontext *ctx, GLenum face, GLenum func,
+r128DDStencilFuncSeparate( struct gl_context *ctx, GLenum face, GLenum func,
GLint ref, GLuint mask )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -302,7 +302,7 @@ r128DDStencilFuncSeparate( GLcontext *ctx, GLenum face, GLenum func,
}
static void
-r128DDStencilMaskSeparate( GLcontext *ctx, GLenum face, GLuint mask )
+r128DDStencilMaskSeparate( struct gl_context *ctx, GLenum face, GLuint mask )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
GLuint refmask = (((ctx->Stencil.Ref[0] & 0xff) << 0) |
@@ -315,7 +315,7 @@ r128DDStencilMaskSeparate( GLcontext *ctx, GLenum face, GLuint mask )
}
}
-static void r128DDStencilOpSeparate( GLcontext *ctx, GLenum face, GLenum fail,
+static void r128DDStencilOpSeparate( struct gl_context *ctx, GLenum face, GLenum fail,
GLenum zfail, GLenum zpass )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -414,7 +414,7 @@ static void r128DDStencilOpSeparate( GLcontext *ctx, GLenum face, GLenum fail,
}
}
-static void r128DDClearStencil( GLcontext *ctx, GLint s )
+static void r128DDClearStencil( struct gl_context *ctx, GLint s )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -428,7 +428,7 @@ static void r128DDClearStencil( GLcontext *ctx, GLint s )
* Depth testing
*/
-static void r128UpdateZMode( GLcontext *ctx )
+static void r128UpdateZMode( struct gl_context *ctx )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
GLuint z = rmesa->setup.z_sten_cntl_c;
@@ -485,7 +485,7 @@ static void r128UpdateZMode( GLcontext *ctx )
}
}
-static void r128DDDepthFunc( GLcontext *ctx, GLenum func )
+static void r128DDDepthFunc( struct gl_context *ctx, GLenum func )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -493,7 +493,7 @@ static void r128DDDepthFunc( GLcontext *ctx, GLenum func )
rmesa->new_state |= R128_NEW_DEPTH;
}
-static void r128DDDepthMask( GLcontext *ctx, GLboolean flag )
+static void r128DDDepthMask( struct gl_context *ctx, GLboolean flag )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -501,7 +501,7 @@ static void r128DDDepthMask( GLcontext *ctx, GLboolean flag )
rmesa->new_state |= R128_NEW_DEPTH;
}
-static void r128DDClearDepth( GLcontext *ctx, GLclampd d )
+static void r128DDClearDepth( struct gl_context *ctx, GLclampd d )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -524,7 +524,7 @@ static void r128DDClearDepth( GLcontext *ctx, GLclampd d )
* Fog
*/
-static void r128UpdateFogAttrib( GLcontext *ctx )
+static void r128UpdateFogAttrib( struct gl_context *ctx )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
GLuint t = rmesa->setup.tex_cntl_c;
@@ -553,7 +553,7 @@ static void r128UpdateFogAttrib( GLcontext *ctx )
}
}
-static void r128DDFogfv( GLcontext *ctx, GLenum pname, const GLfloat *param )
+static void r128DDFogfv( struct gl_context *ctx, GLenum pname, const GLfloat *param )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -566,7 +566,7 @@ static void r128DDFogfv( GLcontext *ctx, GLenum pname, const GLfloat *param )
* Clipping
*/
-static void r128UpdateClipping( GLcontext *ctx )
+static void r128UpdateClipping( struct gl_context *ctx )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -622,7 +622,7 @@ static void r128UpdateClipping( GLcontext *ctx )
}
}
-static void r128DDScissor( GLcontext *ctx,
+static void r128DDScissor( struct gl_context *ctx,
GLint x, GLint y, GLsizei w, GLsizei h )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -636,7 +636,7 @@ static void r128DDScissor( GLcontext *ctx,
* Culling
*/
-static void r128UpdateCull( GLcontext *ctx )
+static void r128UpdateCull( struct gl_context *ctx )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
GLuint f = rmesa->setup.pm4_vc_fpu_setup;
@@ -675,7 +675,7 @@ static void r128UpdateCull( GLcontext *ctx )
}
}
-static void r128DDCullFace( GLcontext *ctx, GLenum mode )
+static void r128DDCullFace( struct gl_context *ctx, GLenum mode )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -683,7 +683,7 @@ static void r128DDCullFace( GLcontext *ctx, GLenum mode )
rmesa->new_state |= R128_NEW_CULL;
}
-static void r128DDFrontFace( GLcontext *ctx, GLenum mode )
+static void r128DDFrontFace( struct gl_context *ctx, GLenum mode )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -696,7 +696,7 @@ static void r128DDFrontFace( GLcontext *ctx, GLenum mode )
* Masks
*/
-static void r128UpdateMasks( GLcontext *ctx )
+static void r128UpdateMasks( struct gl_context *ctx )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -712,7 +712,7 @@ static void r128UpdateMasks( GLcontext *ctx )
}
}
-static void r128DDColorMask( GLcontext *ctx,
+static void r128DDColorMask( struct gl_context *ctx,
GLboolean r, GLboolean g,
GLboolean b, GLboolean a )
{
@@ -731,7 +731,7 @@ static void r128DDColorMask( GLcontext *ctx,
* sense to break them out of the core texture state update routines.
*/
-static void updateSpecularLighting( GLcontext *ctx )
+static void updateSpecularLighting( struct gl_context *ctx )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
GLuint t = rmesa->setup.tex_cntl_c;
@@ -761,7 +761,7 @@ static void updateSpecularLighting( GLcontext *ctx )
}
-static void r128DDLightModelfv( GLcontext *ctx, GLenum pname,
+static void r128DDLightModelfv( struct gl_context *ctx, GLenum pname,
const GLfloat *param )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -777,7 +777,7 @@ static void r128DDLightModelfv( GLcontext *ctx, GLenum pname,
}
}
-static void r128DDShadeModel( GLcontext *ctx, GLenum mode )
+static void r128DDShadeModel( struct gl_context *ctx, GLenum mode )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
GLuint s = rmesa->setup.pm4_vc_fpu_setup;
@@ -811,7 +811,7 @@ static void r128DDShadeModel( GLcontext *ctx, GLenum mode )
* Window position
*/
-static void r128UpdateWindow( GLcontext *ctx )
+static void r128UpdateWindow( struct gl_context *ctx )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
int x = rmesa->driDrawable->x;
@@ -834,7 +834,7 @@ static void r128UpdateWindow( GLcontext *ctx )
* Viewport
*/
-static void r128CalcViewport( GLcontext *ctx )
+static void r128CalcViewport( struct gl_context *ctx )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
const GLfloat *v = ctx->Viewport._WindowMap.m;
@@ -850,14 +850,14 @@ static void r128CalcViewport( GLcontext *ctx )
m[MAT_TZ] = v[MAT_TZ] * rmesa->depth_scale;
}
-static void r128Viewport( GLcontext *ctx,
+static void r128Viewport( struct gl_context *ctx,
GLint x, GLint y,
GLsizei width, GLsizei height )
{
r128CalcViewport( ctx );
}
-static void r128DepthRange( GLcontext *ctx,
+static void r128DepthRange( struct gl_context *ctx,
GLclampd nearval, GLclampd farval )
{
r128CalcViewport( ctx );
@@ -868,7 +868,7 @@ static void r128DepthRange( GLcontext *ctx,
* Miscellaneous
*/
-static void r128DDClearColor( GLcontext *ctx,
+static void r128DDClearColor( struct gl_context *ctx,
const GLfloat color[4] )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -883,7 +883,7 @@ static void r128DDClearColor( GLcontext *ctx,
c[0], c[1], c[2], c[3] );
}
-static void r128DDLogicOpCode( GLcontext *ctx, GLenum opcode )
+static void r128DDLogicOpCode( struct gl_context *ctx, GLenum opcode )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -894,7 +894,7 @@ static void r128DDLogicOpCode( GLcontext *ctx, GLenum opcode )
}
}
-static void r128DDDrawBuffer( GLcontext *ctx, GLenum mode )
+static void r128DDDrawBuffer( struct gl_context *ctx, GLenum mode )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -921,7 +921,7 @@ static void r128DDDrawBuffer( GLcontext *ctx, GLenum mode )
rmesa->new_state |= R128_NEW_WINDOW;
}
-static void r128DDReadBuffer( GLcontext *ctx, GLenum mode )
+static void r128DDReadBuffer( struct gl_context *ctx, GLenum mode )
{
/* nothing, until we implement h/w glRead/CopyPixels or CopyTexImage */
}
@@ -931,7 +931,7 @@ static void r128DDReadBuffer( GLcontext *ctx, GLenum mode )
* Polygon stipple
*/
-static void r128DDPolygonStipple( GLcontext *ctx, const GLubyte *mask )
+static void r128DDPolygonStipple( struct gl_context *ctx, const GLubyte *mask )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
GLuint stipple[32], i;
@@ -962,7 +962,7 @@ static void r128DDPolygonStipple( GLcontext *ctx, const GLubyte *mask )
* Render mode
*/
-static void r128DDRenderMode( GLcontext *ctx, GLenum mode )
+static void r128DDRenderMode( struct gl_context *ctx, GLenum mode )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
FALLBACK( rmesa, R128_FALLBACK_RENDER_MODE, (mode != GL_RENDER) );
@@ -974,7 +974,7 @@ static void r128DDRenderMode( GLcontext *ctx, GLenum mode )
* State enable/disable
*/
-static void r128DDEnable( GLcontext *ctx, GLenum cap, GLboolean state )
+static void r128DDEnable( struct gl_context *ctx, GLenum cap, GLboolean state )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -1206,7 +1206,7 @@ static void r128DDPrintState( const char *msg, GLuint flags )
(flags & R128_NEW_WINDOW) ? "window, " : "" );
}
-void r128DDUpdateHWState( GLcontext *ctx )
+void r128DDUpdateHWState( struct gl_context *ctx )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
int new_state = rmesa->new_state;
@@ -1253,7 +1253,7 @@ void r128DDUpdateHWState( GLcontext *ctx )
}
-static void r128DDInvalidateState( GLcontext *ctx, GLuint new_state )
+static void r128DDInvalidateState( struct gl_context *ctx, GLuint new_state )
{
_swrast_InvalidateState( ctx, new_state );
_swsetup_InvalidateState( ctx, new_state );
@@ -1404,7 +1404,7 @@ void r128DDInitState( r128ContextPtr rmesa )
/* Initialize the driver's state functions.
*/
-void r128DDInitStateFuncs( GLcontext *ctx )
+void r128DDInitStateFuncs( struct gl_context *ctx )
{
ctx->Driver.UpdateState = r128DDInvalidateState;
diff --git a/src/mesa/drivers/dri/r128/r128_state.h b/src/mesa/drivers/dri/r128/r128_state.h
index a44327dfb39..55b0cbf4b77 100644
--- a/src/mesa/drivers/dri/r128/r128_state.h
+++ b/src/mesa/drivers/dri/r128/r128_state.h
@@ -38,10 +38,10 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r128_context.h"
extern void r128DDInitState( r128ContextPtr rmesa );
-extern void r128DDInitStateFuncs( GLcontext *ctx );
+extern void r128DDInitStateFuncs( struct gl_context *ctx );
-extern void r128DDUpdateState( GLcontext *ctx );
-extern void r128DDUpdateHWState( GLcontext *ctx );
+extern void r128DDUpdateState( struct gl_context *ctx );
+extern void r128DDUpdateHWState( struct gl_context *ctx );
extern void r128EmitHwStateLocked( r128ContextPtr rmesa );
diff --git a/src/mesa/drivers/dri/r128/r128_tex.c b/src/mesa/drivers/dri/r128/r128_tex.c
index 2dd47b06a56..ba3305e076e 100644
--- a/src/mesa/drivers/dri/r128/r128_tex.c
+++ b/src/mesa/drivers/dri/r128/r128_tex.c
@@ -173,7 +173,7 @@ static r128TexObjPtr r128AllocTexObj( struct gl_texture_object *texObj )
/* Called by the _mesa_store_teximage[123]d() functions. */
static gl_format
-r128ChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
+r128ChooseTextureFormat( struct gl_context *ctx, GLint internalFormat,
GLenum format, GLenum type )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -287,7 +287,7 @@ r128ChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
}
-static void r128TexImage1D( GLcontext *ctx, GLenum target, GLint level,
+static void r128TexImage1D( struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -317,7 +317,7 @@ static void r128TexImage1D( GLcontext *ctx, GLenum target, GLint level,
}
-static void r128TexSubImage1D( GLcontext *ctx,
+static void r128TexSubImage1D( struct gl_context *ctx,
GLenum target,
GLint level,
GLint xoffset,
@@ -350,7 +350,7 @@ static void r128TexSubImage1D( GLcontext *ctx,
}
-static void r128TexImage2D( GLcontext *ctx, GLenum target, GLint level,
+static void r128TexImage2D( struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -380,7 +380,7 @@ static void r128TexImage2D( GLcontext *ctx, GLenum target, GLint level,
}
-static void r128TexSubImage2D( GLcontext *ctx,
+static void r128TexSubImage2D( struct gl_context *ctx,
GLenum target,
GLint level,
GLint xoffset, GLint yoffset,
@@ -412,7 +412,7 @@ static void r128TexSubImage2D( GLcontext *ctx,
}
-static void r128TexEnv( GLcontext *ctx, GLenum target,
+static void r128TexEnv( struct gl_context *ctx, GLenum target,
GLenum pname, const GLfloat *param )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -500,7 +500,7 @@ static void r128TexEnv( GLcontext *ctx, GLenum target,
}
-static void r128TexParameter( GLcontext *ctx, GLenum target,
+static void r128TexParameter( struct gl_context *ctx, GLenum target,
struct gl_texture_object *tObj,
GLenum pname, const GLfloat *params )
{
@@ -551,7 +551,7 @@ static void r128TexParameter( GLcontext *ctx, GLenum target,
}
}
-static void r128BindTexture( GLcontext *ctx, GLenum target,
+static void r128BindTexture( struct gl_context *ctx, GLenum target,
struct gl_texture_object *tObj )
{
if ( R128_DEBUG & DEBUG_VERBOSE_API ) {
@@ -564,7 +564,7 @@ static void r128BindTexture( GLcontext *ctx, GLenum target,
}
-static void r128DeleteTexture( GLcontext *ctx,
+static void r128DeleteTexture( struct gl_context *ctx,
struct gl_texture_object *tObj )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -588,7 +588,7 @@ static void r128DeleteTexture( GLcontext *ctx,
* texture object from the core mesa gl_texture_object. Not done at this time.
*/
static struct gl_texture_object *
-r128NewTextureObject( GLcontext *ctx, GLuint name, GLenum target )
+r128NewTextureObject( struct gl_context *ctx, GLuint name, GLenum target )
{
struct gl_texture_object *obj;
obj = _mesa_new_texture_object(ctx, name, target);
diff --git a/src/mesa/drivers/dri/r128/r128_tex.h b/src/mesa/drivers/dri/r128/r128_tex.h
index 7df8decf76b..98e9b04ad01 100644
--- a/src/mesa/drivers/dri/r128/r128_tex.h
+++ b/src/mesa/drivers/dri/r128/r128_tex.h
@@ -35,7 +35,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __R128_TEX_H__
#define __R128_TEX_H__
-extern void r128UpdateTextureState( GLcontext *ctx );
+extern void r128UpdateTextureState( struct gl_context *ctx );
extern void r128UploadTexImages( r128ContextPtr rmesa, r128TexObjPtr t );
diff --git a/src/mesa/drivers/dri/r128/r128_texstate.c b/src/mesa/drivers/dri/r128/r128_texstate.c
index 2505b5cd655..11441639411 100644
--- a/src/mesa/drivers/dri/r128/r128_texstate.c
+++ b/src/mesa/drivers/dri/r128/r128_texstate.c
@@ -192,7 +192,7 @@ static void r128SetTexImages( r128ContextPtr rmesa,
#define INPUT_PREVIOUS (R128_INPUT_FACTOR_PREV_COLOR | \
R128_INP_FACTOR_A_PREV_ALPHA)
-static GLboolean r128UpdateTextureEnv( GLcontext *ctx, int unit )
+static GLboolean r128UpdateTextureEnv( struct gl_context *ctx, int unit )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
GLint source = rmesa->tmu_source[unit];
@@ -476,7 +476,7 @@ static GLboolean r128UpdateTextureEnv( GLcontext *ctx, int unit )
return GL_TRUE;
}
-static void disable_tex( GLcontext *ctx, int unit )
+static void disable_tex( struct gl_context *ctx, int unit )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -499,7 +499,7 @@ static void disable_tex( GLcontext *ctx, int unit )
rmesa->blend_flags &= ~R128_BLEND_MULTITEX;
}
-static GLboolean enable_tex_2d( GLcontext *ctx, int unit )
+static GLboolean enable_tex_2d( struct gl_context *ctx, int unit )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
const int source = rmesa->tmu_source[unit];
@@ -524,7 +524,7 @@ static GLboolean enable_tex_2d( GLcontext *ctx, int unit )
return GL_TRUE;
}
-static GLboolean update_tex_common( GLcontext *ctx, int unit )
+static GLboolean update_tex_common( struct gl_context *ctx, int unit )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
const int source = rmesa->tmu_source[unit];
@@ -597,7 +597,7 @@ static GLboolean update_tex_common( GLcontext *ctx, int unit )
return r128UpdateTextureEnv( ctx, unit );
}
-static GLboolean updateTextureUnit( GLcontext *ctx, int unit )
+static GLboolean updateTextureUnit( struct gl_context *ctx, int unit )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
const int source = rmesa->tmu_source[unit];
@@ -618,7 +618,7 @@ static GLboolean updateTextureUnit( GLcontext *ctx, int unit )
}
-void r128UpdateTextureState( GLcontext *ctx )
+void r128UpdateTextureState( struct gl_context *ctx )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
GLboolean ok;
diff --git a/src/mesa/drivers/dri/r128/r128_tris.c b/src/mesa/drivers/dri/r128/r128_tris.c
index 9ea2a9d1624..92c8a4eb6b8 100644
--- a/src/mesa/drivers/dri/r128/r128_tris.c
+++ b/src/mesa/drivers/dri/r128/r128_tris.c
@@ -62,8 +62,8 @@ static const GLuint hw_prim[GL_POLYGON+1] = {
R128_CCE_VC_CNTL_PRIM_TYPE_TRI_LIST,
};
-static void r128RasterPrimitive( GLcontext *ctx, GLuint hwprim );
-static void r128RenderPrimitive( GLcontext *ctx, GLenum prim );
+static void r128RasterPrimitive( struct gl_context *ctx, GLuint hwprim );
+static void r128RenderPrimitive( struct gl_context *ctx, GLenum prim );
/***********************************************************************
@@ -344,7 +344,7 @@ r128_fallback_tri( r128ContextPtr rmesa,
r128Vertex *v1,
r128Vertex *v2 )
{
- GLcontext *ctx = rmesa->glCtx;
+ struct gl_context *ctx = rmesa->glCtx;
SWvertex v[3];
_swsetup_Translate( ctx, v0, &v[0] );
_swsetup_Translate( ctx, v1, &v[1] );
@@ -358,7 +358,7 @@ r128_fallback_line( r128ContextPtr rmesa,
r128Vertex *v0,
r128Vertex *v1 )
{
- GLcontext *ctx = rmesa->glCtx;
+ struct gl_context *ctx = rmesa->glCtx;
SWvertex v[2];
_swsetup_Translate( ctx, v0, &v[0] );
_swsetup_Translate( ctx, v1, &v[1] );
@@ -370,7 +370,7 @@ static void
r128_fallback_point( r128ContextPtr rmesa,
r128Vertex *v0 )
{
- GLcontext *ctx = rmesa->glCtx;
+ struct gl_context *ctx = rmesa->glCtx;
SWvertex v[1];
_swsetup_Translate( ctx, v0, &v[0] );
_swrast_Point( ctx, &v[0] );
@@ -426,7 +426,7 @@ r128_fallback_point( r128ContextPtr rmesa,
#define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET|DD_TRI_UNFILLED)
#define _R128_NEW_RENDER_STATE (ANY_FALLBACK_FLAGS | ANY_RASTER_FLAGS)
-void r128ChooseRenderState(GLcontext *ctx)
+void r128ChooseRenderState(struct gl_context *ctx)
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
GLuint flags = ctx->_TriangleCaps;
@@ -479,7 +479,7 @@ void r128ChooseRenderState(GLcontext *ctx)
/* Validate state at pipeline start */
/**********************************************************************/
-static void r128RunPipeline( GLcontext *ctx )
+static void r128RunPipeline( struct gl_context *ctx )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -509,7 +509,7 @@ static void r128RunPipeline( GLcontext *ctx )
* primitives.
*/
-static void r128RasterPrimitive( GLcontext *ctx, GLuint hwprim )
+static void r128RasterPrimitive( struct gl_context *ctx, GLuint hwprim )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -531,7 +531,7 @@ static void r128RasterPrimitive( GLcontext *ctx, GLuint hwprim )
}
}
-static void r128SetupAntialias( GLcontext *ctx, GLenum prim )
+static void r128SetupAntialias( struct gl_context *ctx, GLenum prim )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -553,7 +553,7 @@ static void r128SetupAntialias( GLcontext *ctx, GLenum prim )
}
}
-static void r128RenderPrimitive( GLcontext *ctx, GLenum prim )
+static void r128RenderPrimitive( struct gl_context *ctx, GLenum prim )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
GLuint hw = hw_prim[prim];
@@ -584,7 +584,7 @@ do { \
offset += (SIZE); \
} while (0)
-static void r128RenderStart( GLcontext *ctx )
+static void r128RenderStart( struct gl_context *ctx )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -681,7 +681,7 @@ static void r128RenderStart( GLcontext *ctx )
}
}
-static void r128RenderFinish( GLcontext *ctx )
+static void r128RenderFinish( struct gl_context *ctx )
{
if (R128_CONTEXT(ctx)->RenderIndex & R128_FALLBACK_BIT)
_swrast_flush( ctx );
@@ -717,7 +717,7 @@ static const char *getFallbackString(GLuint bit)
return fallbackStrings[i];
}
-void r128Fallback( GLcontext *ctx, GLuint bit, GLboolean mode )
+void r128Fallback( struct gl_context *ctx, GLuint bit, GLboolean mode )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -768,7 +768,7 @@ void r128Fallback( GLcontext *ctx, GLuint bit, GLboolean mode )
/* Initialization. */
/**********************************************************************/
-void r128InitTriFuncs( GLcontext *ctx )
+void r128InitTriFuncs( struct gl_context *ctx )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/r128/r128_tris.h b/src/mesa/drivers/dri/r128/r128_tris.h
index c0667edb61f..a1394977656 100644
--- a/src/mesa/drivers/dri/r128/r128_tris.h
+++ b/src/mesa/drivers/dri/r128/r128_tris.h
@@ -37,10 +37,10 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/mtypes.h"
-extern void r128InitTriFuncs( GLcontext *ctx );
-extern void r128ChooseRenderState( GLcontext *ctx );
+extern void r128InitTriFuncs( struct gl_context *ctx );
+extern void r128ChooseRenderState( struct gl_context *ctx );
-extern void r128Fallback( GLcontext *ctx, GLuint bit, GLboolean mode );
+extern void r128Fallback( struct gl_context *ctx, GLuint bit, GLboolean mode );
#define FALLBACK( rmesa, bit, mode ) r128Fallback( rmesa->glCtx, bit, mode )
diff --git a/src/mesa/drivers/dri/r200/r200_blit.c b/src/mesa/drivers/dri/r200/r200_blit.c
index e187fc0f61e..05a15c444cc 100644
--- a/src/mesa/drivers/dri/r200/r200_blit.c
+++ b/src/mesa/drivers/dri/r200/r200_blit.c
@@ -444,7 +444,7 @@ static inline void emit_draw_packet(struct r200_context *r200,
* @param[in] height region height
* @param[in] flip_y set if y coords of the source image need to be flipped
*/
-unsigned r200_blit(GLcontext *ctx,
+unsigned r200_blit(struct gl_context *ctx,
struct radeon_bo *src_bo,
intptr_t src_offset,
gl_format src_mesaformat,
diff --git a/src/mesa/drivers/dri/r200/r200_blit.h b/src/mesa/drivers/dri/r200/r200_blit.h
index 53206f0b471..56018b9c0ea 100644
--- a/src/mesa/drivers/dri/r200/r200_blit.h
+++ b/src/mesa/drivers/dri/r200/r200_blit.h
@@ -32,7 +32,7 @@ void r200_blit_init(struct r200_context *r200);
unsigned r200_check_blit(gl_format mesa_format);
-unsigned r200_blit(GLcontext *ctx,
+unsigned r200_blit(struct gl_context *ctx,
struct radeon_bo *src_bo,
intptr_t src_offset,
gl_format src_mesaformat,
diff --git a/src/mesa/drivers/dri/r200/r200_cmdbuf.c b/src/mesa/drivers/dri/r200/r200_cmdbuf.c
index ad43a8ca920..931a9ecf8fe 100644
--- a/src/mesa/drivers/dri/r200/r200_cmdbuf.c
+++ b/src/mesa/drivers/dri/r200/r200_cmdbuf.c
@@ -167,7 +167,7 @@ static void r200FireEB(r200ContextPtr rmesa, int vertex_count, int type)
}
}
-void r200FlushElts(GLcontext *ctx)
+void r200FlushElts(struct gl_context *ctx)
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
int nr, elt_used = rmesa->tcl.elt_used;
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c
index 3b85e84d903..723e31401de 100644
--- a/src/mesa/drivers/dri/r200/r200_context.c
+++ b/src/mesa/drivers/dri/r200/r200_context.c
@@ -80,7 +80,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* Return various strings for glGetString().
*/
-static const GLubyte *r200GetString( GLcontext *ctx, GLenum name )
+static const GLubyte *r200GetString( struct gl_context *ctx, GLenum name )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
static char buffer[128];
@@ -271,7 +271,7 @@ static void r200_init_vtbl(radeonContextPtr radeon)
/* Create the device specific rendering context.
*/
GLboolean r200CreateContext( gl_api api,
- const __GLcontextModes *glVisual,
+ const struct gl_config *glVisual,
__DRIcontext *driContextPriv,
void *sharedContextPrivate)
{
@@ -279,7 +279,7 @@ GLboolean r200CreateContext( gl_api api,
radeonScreenPtr screen = (radeonScreenPtr)(sPriv->private);
struct dd_function_table functions;
r200ContextPtr rmesa;
- GLcontext *ctx;
+ struct gl_context *ctx;
int i;
int tcl_mode;
diff --git a/src/mesa/drivers/dri/r200/r200_context.h b/src/mesa/drivers/dri/r200/r200_context.h
index 305958f5d76..657902fcaa7 100644
--- a/src/mesa/drivers/dri/r200/r200_context.h
+++ b/src/mesa/drivers/dri/r200/r200_context.h
@@ -638,7 +638,7 @@ struct r200_context {
extern void r200DestroyContext( __DRIcontext *driContextPriv );
extern GLboolean r200CreateContext( gl_api api,
- const __GLcontextModes *glVisual,
+ const struct gl_config *glVisual,
__DRIcontext *driContextPriv,
void *sharedContextPrivate);
extern GLboolean r200MakeCurrent( __DRIcontext *driContextPriv,
diff --git a/src/mesa/drivers/dri/r200/r200_fragshader.c b/src/mesa/drivers/dri/r200/r200_fragshader.c
index 2a9268dd343..b1d045c5cae 100644
--- a/src/mesa/drivers/dri/r200/r200_fragshader.c
+++ b/src/mesa/drivers/dri/r200/r200_fragshader.c
@@ -121,7 +121,7 @@ static GLuint dstmask_table[8] =
R200_TXC_OUTPUT_MASK_RGB
};
-static void r200UpdateFSArith( GLcontext *ctx )
+static void r200UpdateFSArith( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint *afs_cmd;
@@ -322,7 +322,7 @@ static void r200UpdateFSArith( GLcontext *ctx )
rmesa->afs_loaded = ctx->ATIFragmentShader.Current;
}
-static void r200UpdateFSRouting( GLcontext *ctx ) {
+static void r200UpdateFSRouting( struct gl_context *ctx ) {
r200ContextPtr rmesa = R200_CONTEXT(ctx);
const struct ati_fragment_shader *shader = ctx->ATIFragmentShader.Current;
GLuint reg;
@@ -499,7 +499,7 @@ static void r200UpdateFSRouting( GLcontext *ctx ) {
}
}
-static void r200UpdateFSConstants( GLcontext *ctx )
+static void r200UpdateFSConstants( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
const struct ati_fragment_shader *shader = ctx->ATIFragmentShader.Current;
@@ -537,7 +537,7 @@ static void r200UpdateFSConstants( GLcontext *ctx )
* stored in some DriverData object attached to the mesa atifs object, i.e. binding a
* shader wouldn't force us to "recompile" the shader).
*/
-void r200UpdateFragmentShader( GLcontext *ctx )
+void r200UpdateFragmentShader( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/r200/r200_ioctl.c b/src/mesa/drivers/dri/r200/r200_ioctl.c
index df73de5394a..02201cb53d6 100644
--- a/src/mesa/drivers/dri/r200/r200_ioctl.c
+++ b/src/mesa/drivers/dri/r200/r200_ioctl.c
@@ -54,7 +54,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define R200_TIMEOUT 512
#define R200_IDLE_RETRY 16
-static void r200KernelClear(GLcontext *ctx, GLuint flags)
+static void r200KernelClear(struct gl_context *ctx, GLuint flags)
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
__DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
@@ -180,7 +180,7 @@ static void r200KernelClear(GLcontext *ctx, GLuint flags)
/* ================================================================
* Buffer clear
*/
-static void r200Clear( GLcontext *ctx, GLbitfield mask )
+static void r200Clear( struct gl_context *ctx, GLbitfield mask )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
__DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
diff --git a/src/mesa/drivers/dri/r200/r200_ioctl.h b/src/mesa/drivers/dri/r200/r200_ioctl.h
index c5dca89bc76..f2527189aa8 100644
--- a/src/mesa/drivers/dri/r200/r200_ioctl.h
+++ b/src/mesa/drivers/dri/r200/r200_ioctl.h
@@ -54,7 +54,7 @@ extern void r200EmitVbufPrim( r200ContextPtr rmesa,
GLuint primitive,
GLuint vertex_nr );
-extern void r200FlushElts(GLcontext *ctx);
+extern void r200FlushElts(struct gl_context *ctx);
extern GLushort *r200AllocEltsOpenEnded( r200ContextPtr rmesa,
GLuint primitive,
diff --git a/src/mesa/drivers/dri/r200/r200_maos.h b/src/mesa/drivers/dri/r200/r200_maos.h
index 16a70475e18..f58f77d8db8 100644
--- a/src/mesa/drivers/dri/r200/r200_maos.h
+++ b/src/mesa/drivers/dri/r200/r200_maos.h
@@ -37,6 +37,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r200_context.h"
-extern void r200EmitArrays( GLcontext *ctx, GLubyte *vimap_rev );
+extern void r200EmitArrays( struct gl_context *ctx, GLubyte *vimap_rev );
#endif
diff --git a/src/mesa/drivers/dri/r200/r200_maos_arrays.c b/src/mesa/drivers/dri/r200/r200_maos_arrays.c
index aecba7f8949..8a047e6419b 100644
--- a/src/mesa/drivers/dri/r200/r200_maos_arrays.c
+++ b/src/mesa/drivers/dri/r200/r200_maos_arrays.c
@@ -70,7 +70,7 @@ do { \
} while (0)
#endif
-static void r200_emit_vecfog(GLcontext *ctx, struct radeon_aos *aos,
+static void r200_emit_vecfog(struct gl_context *ctx, struct radeon_aos *aos,
GLvoid *data, int stride, int count)
{
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
@@ -103,7 +103,7 @@ static void r200_emit_vecfog(GLcontext *ctx, struct radeon_aos *aos,
/* Emit any changed arrays to new GART memory, re-emit a packet to
* update the arrays.
*/
-void r200EmitArrays( GLcontext *ctx, GLubyte *vimap_rev )
+void r200EmitArrays( struct gl_context *ctx, GLubyte *vimap_rev )
{
r200ContextPtr rmesa = R200_CONTEXT( ctx );
struct vertex_buffer *VB = &TNL_CONTEXT( ctx )->vb;
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
index 29d7bed8b6a..b523edcb5d9 100644
--- a/src/mesa/drivers/dri/r200/r200_state.c
+++ b/src/mesa/drivers/dri/r200/r200_state.c
@@ -63,7 +63,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* Alpha blending
*/
-static void r200AlphaFunc( GLcontext *ctx, GLenum func, GLfloat ref )
+static void r200AlphaFunc( struct gl_context *ctx, GLenum func, GLfloat ref )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
int pp_misc = rmesa->hw.ctx.cmd[CTX_PP_MISC];
@@ -106,7 +106,7 @@ static void r200AlphaFunc( GLcontext *ctx, GLenum func, GLfloat ref )
rmesa->hw.ctx.cmd[CTX_PP_MISC] = pp_misc;
}
-static void r200BlendColor( GLcontext *ctx, const GLfloat cf[4] )
+static void r200BlendColor( struct gl_context *ctx, const GLfloat cf[4] )
{
GLubyte color[4];
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -199,7 +199,7 @@ static int blend_factor( GLenum factor, GLboolean is_src )
* and GL_FUNC_REVERSE_SUBTRACT will cause wrong results otherwise for
* unknown reasons.
*/
-static void r200_set_blend_state( GLcontext * ctx )
+static void r200_set_blend_state( struct gl_context * ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint cntl = rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] &
@@ -323,13 +323,13 @@ static void r200_set_blend_state( GLcontext * ctx )
}
-static void r200BlendEquationSeparate( GLcontext *ctx,
+static void r200BlendEquationSeparate( struct gl_context *ctx,
GLenum modeRGB, GLenum modeA )
{
r200_set_blend_state( ctx );
}
-static void r200BlendFuncSeparate( GLcontext *ctx,
+static void r200BlendFuncSeparate( struct gl_context *ctx,
GLenum sfactorRGB, GLenum dfactorRGB,
GLenum sfactorA, GLenum dfactorA )
{
@@ -341,7 +341,7 @@ static void r200BlendFuncSeparate( GLcontext *ctx,
* Depth testing
*/
-static void r200DepthFunc( GLcontext *ctx, GLenum func )
+static void r200DepthFunc( struct gl_context *ctx, GLenum func )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -376,7 +376,7 @@ static void r200DepthFunc( GLcontext *ctx, GLenum func )
}
}
-static void r200ClearDepth( GLcontext *ctx, GLclampd d )
+static void r200ClearDepth( struct gl_context *ctx, GLclampd d )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint format = (rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] &
@@ -392,7 +392,7 @@ static void r200ClearDepth( GLcontext *ctx, GLclampd d )
}
}
-static void r200DepthMask( GLcontext *ctx, GLboolean flag )
+static void r200DepthMask( struct gl_context *ctx, GLboolean flag )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
R200_STATECHANGE( rmesa, ctx );
@@ -410,7 +410,7 @@ static void r200DepthMask( GLcontext *ctx, GLboolean flag )
*/
-static void r200Fogfv( GLcontext *ctx, GLenum pname, const GLfloat *param )
+static void r200Fogfv( struct gl_context *ctx, GLenum pname, const GLfloat *param )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
union { int i; float f; } c, d;
@@ -526,7 +526,7 @@ static void r200Fogfv( GLcontext *ctx, GLenum pname, const GLfloat *param )
* Culling
*/
-static void r200CullFace( GLcontext *ctx, GLenum unused )
+static void r200CullFace( struct gl_context *ctx, GLenum unused )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint s = rmesa->hw.set.cmd[SET_SE_CNTL];
@@ -563,7 +563,7 @@ static void r200CullFace( GLcontext *ctx, GLenum unused )
}
}
-static void r200FrontFace( GLcontext *ctx, GLenum mode )
+static void r200FrontFace( struct gl_context *ctx, GLenum mode )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -591,7 +591,7 @@ static void r200FrontFace( GLcontext *ctx, GLenum mode )
/* =============================================================
* Point state
*/
-static void r200PointSize( GLcontext *ctx, GLfloat size )
+static void r200PointSize( struct gl_context *ctx, GLfloat size )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLfloat *fcmd = (GLfloat *)rmesa->hw.ptp.cmd;
@@ -612,7 +612,7 @@ static void r200PointSize( GLcontext *ctx, GLfloat size )
fcmd[PTP_VPORT_SCALE_PTSIZE] = ctx->Point.Size;
}
-static void r200PointParameter( GLcontext *ctx, GLenum pname, const GLfloat *params)
+static void r200PointParameter( struct gl_context *ctx, GLenum pname, const GLfloat *params)
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLfloat *fcmd = (GLfloat *)rmesa->hw.ptp.cmd;
@@ -680,7 +680,7 @@ static void r200PointParameter( GLcontext *ctx, GLenum pname, const GLfloat *par
/* =============================================================
* Line state
*/
-static void r200LineWidth( GLcontext *ctx, GLfloat widthf )
+static void r200LineWidth( struct gl_context *ctx, GLfloat widthf )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -701,7 +701,7 @@ static void r200LineWidth( GLcontext *ctx, GLfloat widthf )
}
}
-static void r200LineStipple( GLcontext *ctx, GLint factor, GLushort pattern )
+static void r200LineStipple( struct gl_context *ctx, GLint factor, GLushort pattern )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -714,7 +714,7 @@ static void r200LineStipple( GLcontext *ctx, GLint factor, GLushort pattern )
/* =============================================================
* Masks
*/
-static void r200ColorMask( GLcontext *ctx,
+static void r200ColorMask( struct gl_context *ctx,
GLboolean r, GLboolean g,
GLboolean b, GLboolean a )
{
@@ -752,7 +752,7 @@ static void r200ColorMask( GLcontext *ctx,
* Polygon state
*/
-static void r200PolygonOffset( GLcontext *ctx,
+static void r200PolygonOffset( struct gl_context *ctx,
GLfloat factor, GLfloat units )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -770,7 +770,7 @@ static void r200PolygonOffset( GLcontext *ctx,
rmesa->hw.zbs.cmd[ZBS_SE_ZBIAS_CONSTANT] = constant.ui32;
}
-static void r200PolygonMode( GLcontext *ctx, GLenum face, GLenum mode )
+static void r200PolygonMode( struct gl_context *ctx, GLenum face, GLenum mode )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLboolean flag = (ctx->_TriangleCaps & DD_TRI_UNFILLED) != 0;
@@ -797,7 +797,7 @@ static void r200PolygonMode( GLcontext *ctx, GLenum face, GLenum mode )
/* Examine lighting and texture state to determine if separate specular
* should be enabled.
*/
-static void r200UpdateSpecular( GLcontext *ctx )
+static void r200UpdateSpecular( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
uint32_t p = rmesa->hw.ctx.cmd[CTX_PP_CNTL];
@@ -871,7 +871,7 @@ static void r200UpdateSpecular( GLcontext *ctx )
/* Update on colormaterial, material emmissive/ambient,
* lightmodel.globalambient
*/
-static void update_global_ambient( GLcontext *ctx )
+static void update_global_ambient( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
float *fcmd = (float *)R200_DB_STATE( glt );
@@ -902,7 +902,7 @@ static void update_global_ambient( GLcontext *ctx )
* - light[p].colors
* - light[p].enabled
*/
-static void update_light_colors( GLcontext *ctx, GLuint p )
+static void update_light_colors( struct gl_context *ctx, GLuint p )
{
struct gl_light *l = &ctx->Light.Light[p];
@@ -920,7 +920,7 @@ static void update_light_colors( GLcontext *ctx, GLuint p )
}
}
-static void r200ColorMaterial( GLcontext *ctx, GLenum face, GLenum mode )
+static void r200ColorMaterial( struct gl_context *ctx, GLenum face, GLenum mode )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint light_model_ctl1 = rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_1];
@@ -1022,7 +1022,7 @@ static void r200ColorMaterial( GLcontext *ctx, GLenum face, GLenum mode )
}
-void r200UpdateMaterial( GLcontext *ctx )
+void r200UpdateMaterial( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLfloat (*mat)[4] = ctx->Light.Material.Attrib;
@@ -1117,7 +1117,7 @@ void r200UpdateMaterial( GLcontext *ctx )
* lighting space (model or eye), hence dependencies on _NEW_MODELVIEW
* and _MESA_NEW_NEED_EYE_COORDS.
*/
-static void update_light( GLcontext *ctx )
+static void update_light( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -1177,7 +1177,7 @@ static void update_light( GLcontext *ctx )
}
}
-static void r200Lightfv( GLcontext *ctx, GLenum light,
+static void r200Lightfv( struct gl_context *ctx, GLenum light,
GLenum pname, const GLfloat *params )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -1288,7 +1288,7 @@ static void r200Lightfv( GLcontext *ctx, GLenum light,
}
}
-static void r200UpdateLocalViewer ( GLcontext *ctx )
+static void r200UpdateLocalViewer ( struct gl_context *ctx )
{
/* It looks like for the texgen modes GL_SPHERE_MAP, GL_NORMAL_MAP and
GL_REFLECTION_MAP we need R200_LOCAL_VIEWER set (fglrx does exactly that
@@ -1308,7 +1308,7 @@ static void r200UpdateLocalViewer ( GLcontext *ctx )
rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] &= ~R200_LOCAL_VIEWER;
}
-static void r200LightModelfv( GLcontext *ctx, GLenum pname,
+static void r200LightModelfv( struct gl_context *ctx, GLenum pname,
const GLfloat *param )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -1343,7 +1343,7 @@ static void r200LightModelfv( GLcontext *ctx, GLenum pname,
}
}
-static void r200ShadeModel( GLcontext *ctx, GLenum mode )
+static void r200ShadeModel( struct gl_context *ctx, GLenum mode )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint s = rmesa->hw.set.cmd[SET_SE_CNTL];
@@ -1384,7 +1384,7 @@ static void r200ShadeModel( GLcontext *ctx, GLenum mode )
* User clip planes
*/
-static void r200ClipPlane( GLcontext *ctx, GLenum plane, const GLfloat *eq )
+static void r200ClipPlane( struct gl_context *ctx, GLenum plane, const GLfloat *eq )
{
GLint p = (GLint) plane - (GLint) GL_CLIP_PLANE0;
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -1397,7 +1397,7 @@ static void r200ClipPlane( GLcontext *ctx, GLenum plane, const GLfloat *eq )
rmesa->hw.ucp[p].cmd[UCP_W] = ip[3];
}
-static void r200UpdateClipPlanes( GLcontext *ctx )
+static void r200UpdateClipPlanes( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint p;
@@ -1421,7 +1421,7 @@ static void r200UpdateClipPlanes( GLcontext *ctx )
*/
static void
-r200StencilFuncSeparate( GLcontext *ctx, GLenum face, GLenum func,
+r200StencilFuncSeparate( struct gl_context *ctx, GLenum face, GLenum func,
GLint ref, GLuint mask )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -1466,7 +1466,7 @@ r200StencilFuncSeparate( GLcontext *ctx, GLenum face, GLenum func,
}
static void
-r200StencilMaskSeparate( GLcontext *ctx, GLenum face, GLuint mask )
+r200StencilMaskSeparate( struct gl_context *ctx, GLenum face, GLuint mask )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -1477,7 +1477,7 @@ r200StencilMaskSeparate( GLcontext *ctx, GLenum face, GLuint mask )
}
static void
-r200StencilOpSeparate( GLcontext *ctx, GLenum face, GLenum fail,
+r200StencilOpSeparate( struct gl_context *ctx, GLenum face, GLenum fail,
GLenum zfail, GLenum zpass )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -1569,7 +1569,7 @@ r200StencilOpSeparate( GLcontext *ctx, GLenum face, GLenum fail,
}
}
-static void r200ClearStencil( GLcontext *ctx, GLint s )
+static void r200ClearStencil( struct gl_context *ctx, GLint s )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -1588,7 +1588,7 @@ static void r200ClearStencil( GLcontext *ctx, GLint s )
* Called when window size or position changes or viewport or depth range
* state is changed. We update the hardware viewport state here.
*/
-void r200UpdateWindow( GLcontext *ctx )
+void r200UpdateWindow( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
__DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
@@ -1624,7 +1624,7 @@ void r200UpdateWindow( GLcontext *ctx )
rmesa->hw.vpt.cmd[VPT_SE_VPORT_ZOFFSET] = tz.ui32;
}
-void r200_vtbl_update_scissor( GLcontext *ctx )
+void r200_vtbl_update_scissor( struct gl_context *ctx )
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
unsigned x1, y1, x2, y2;
@@ -1650,7 +1650,7 @@ void r200_vtbl_update_scissor( GLcontext *ctx )
}
-static void r200Viewport( GLcontext *ctx, GLint x, GLint y,
+static void r200Viewport( struct gl_context *ctx, GLint x, GLint y,
GLsizei width, GLsizei height )
{
/* Don't pipeline viewport changes, conflict with window offset
@@ -1662,13 +1662,13 @@ static void r200Viewport( GLcontext *ctx, GLint x, GLint y,
radeon_viewport(ctx, x, y, width, height);
}
-static void r200DepthRange( GLcontext *ctx, GLclampd nearval,
+static void r200DepthRange( struct gl_context *ctx, GLclampd nearval,
GLclampd farval )
{
r200UpdateWindow( ctx );
}
-void r200UpdateViewportOffset( GLcontext *ctx )
+void r200UpdateViewportOffset( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
__DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
@@ -1724,7 +1724,7 @@ void r200UpdateViewportOffset( GLcontext *ctx )
* Miscellaneous
*/
-static void r200ClearColor( GLcontext *ctx, const GLfloat c[4] )
+static void r200ClearColor( struct gl_context *ctx, const GLfloat c[4] )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLubyte color[4];
@@ -1743,7 +1743,7 @@ static void r200ClearColor( GLcontext *ctx, const GLfloat c[4] )
}
-static void r200RenderMode( GLcontext *ctx, GLenum mode )
+static void r200RenderMode( struct gl_context *ctx, GLenum mode )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
FALLBACK( rmesa, R200_FALLBACK_RENDER_MODE, (mode != GL_RENDER) );
@@ -1769,7 +1769,7 @@ static GLuint r200_rop_tab[] = {
R200_ROP_SET,
};
-static void r200LogicOpCode( GLcontext *ctx, GLenum opcode )
+static void r200LogicOpCode( struct gl_context *ctx, GLenum opcode )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint rop = (GLuint)opcode - GL_CLEAR;
@@ -1784,7 +1784,7 @@ static void r200LogicOpCode( GLcontext *ctx, GLenum opcode )
* State enable/disable
*/
-static void r200Enable( GLcontext *ctx, GLenum cap, GLboolean state )
+static void r200Enable( struct gl_context *ctx, GLenum cap, GLboolean state )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint p, flag;
@@ -2168,7 +2168,7 @@ static void r200Enable( GLcontext *ctx, GLenum cap, GLboolean state )
}
-void r200LightingSpaceChange( GLcontext *ctx )
+void r200LightingSpaceChange( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLboolean tmp;
@@ -2225,7 +2225,7 @@ static void upload_matrix_t( r200ContextPtr rmesa, const GLfloat *src, int idx )
}
-static void update_texturematrix( GLcontext *ctx )
+static void update_texturematrix( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT( ctx );
GLuint tpc = rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_0];
@@ -2283,7 +2283,7 @@ static void update_texturematrix( GLcontext *ctx )
}
}
-static GLboolean r200ValidateBuffers(GLcontext *ctx)
+static GLboolean r200ValidateBuffers(struct gl_context *ctx)
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
struct radeon_renderbuffer *rrb;
@@ -2333,7 +2333,7 @@ static GLboolean r200ValidateBuffers(GLcontext *ctx)
return GL_TRUE;
}
-GLboolean r200ValidateState( GLcontext *ctx )
+GLboolean r200ValidateState( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint new_state = rmesa->radeon.NewGLState;
@@ -2405,7 +2405,7 @@ GLboolean r200ValidateState( GLcontext *ctx )
}
-static void r200InvalidateState( GLcontext *ctx, GLuint new_state )
+static void r200InvalidateState( struct gl_context *ctx, GLuint new_state )
{
_swrast_InvalidateState( ctx, new_state );
_swsetup_InvalidateState( ctx, new_state );
@@ -2420,7 +2420,7 @@ static void r200InvalidateState( GLcontext *ctx, GLuint new_state )
* Should map to inputs just like the generic vertex arrays for vertex progs.
* In theory there could still be too many and we'd still need a fallback.
*/
-static GLboolean check_material( GLcontext *ctx )
+static GLboolean check_material( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
GLint i;
@@ -2435,7 +2435,7 @@ static GLboolean check_material( GLcontext *ctx )
return GL_FALSE;
}
-static void r200WrapRunPipeline( GLcontext *ctx )
+static void r200WrapRunPipeline( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLboolean has_material;
@@ -2465,7 +2465,7 @@ static void r200WrapRunPipeline( GLcontext *ctx )
}
-static void r200PolygonStipple( GLcontext *ctx, const GLubyte *mask )
+static void r200PolygonStipple( struct gl_context *ctx, const GLubyte *mask )
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
GLint i;
@@ -2538,7 +2538,7 @@ void r200InitStateFuncs( radeonContextPtr radeon, struct dd_function_table *func
}
-void r200InitTnlFuncs( GLcontext *ctx )
+void r200InitTnlFuncs( struct gl_context *ctx )
{
TNL_CONTEXT(ctx)->Driver.NotifyMaterialChange = r200UpdateMaterial;
TNL_CONTEXT(ctx)->Driver.RunPipeline = r200WrapRunPipeline;
diff --git a/src/mesa/drivers/dri/r200/r200_state.h b/src/mesa/drivers/dri/r200/r200_state.h
index 327ba837e25..340bd8234ac 100644
--- a/src/mesa/drivers/dri/r200/r200_state.h
+++ b/src/mesa/drivers/dri/r200/r200_state.h
@@ -39,25 +39,25 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
extern void r200InitState( r200ContextPtr rmesa );
extern void r200InitStateFuncs( radeonContextPtr radeon, struct dd_function_table *functions );
-extern void r200InitTnlFuncs( GLcontext *ctx );
+extern void r200InitTnlFuncs( struct gl_context *ctx );
-extern void r200UpdateMaterial( GLcontext *ctx );
+extern void r200UpdateMaterial( struct gl_context *ctx );
-extern void r200UpdateViewportOffset( GLcontext *ctx );
-extern void r200UpdateWindow( GLcontext *ctx );
-extern void r200UpdateDrawBuffer(GLcontext *ctx);
+extern void r200UpdateViewportOffset( struct gl_context *ctx );
+extern void r200UpdateWindow( struct gl_context *ctx );
+extern void r200UpdateDrawBuffer(struct gl_context *ctx);
-extern GLboolean r200ValidateState( GLcontext *ctx );
+extern GLboolean r200ValidateState( struct gl_context *ctx );
-extern void r200_vtbl_update_scissor( GLcontext *ctx );
+extern void r200_vtbl_update_scissor( struct gl_context *ctx );
-extern void r200Fallback( GLcontext *ctx, GLuint bit, GLboolean mode );
+extern void r200Fallback( struct gl_context *ctx, GLuint bit, GLboolean mode );
#define FALLBACK( rmesa, bit, mode ) do { \
if ( 0 ) fprintf( stderr, "FALLBACK in %s: #%d=%d\n", \
__FUNCTION__, bit, mode ); \
r200Fallback( rmesa->radeon.glCtx, bit, mode ); \
} while (0)
-extern void r200LightingSpaceChange( GLcontext *ctx );
+extern void r200LightingSpaceChange( struct gl_context *ctx );
#endif
diff --git a/src/mesa/drivers/dri/r200/r200_state_init.c b/src/mesa/drivers/dri/r200/r200_state_init.c
index 16065530093..f6afb90d595 100644
--- a/src/mesa/drivers/dri/r200/r200_state_init.c
+++ b/src/mesa/drivers/dri/r200/r200_state_init.c
@@ -228,7 +228,7 @@ static int cmdscl2( int offset, int stride, int count )
* If it is active check function returns maximum emit size.
*/
#define CHECK( NM, FLAG, ADD ) \
-static int check_##NM( GLcontext *ctx, struct radeon_state_atom *atom) \
+static int check_##NM( struct gl_context *ctx, struct radeon_state_atom *atom) \
{ \
r200ContextPtr rmesa = R200_CONTEXT(ctx); \
(void) rmesa; \
@@ -236,21 +236,21 @@ static int check_##NM( GLcontext *ctx, struct radeon_state_atom *atom) \
}
#define TCL_CHECK( NM, FLAG, ADD ) \
-static int check_##NM( GLcontext *ctx, struct radeon_state_atom *atom) \
+static int check_##NM( struct gl_context *ctx, struct radeon_state_atom *atom) \
{ \
r200ContextPtr rmesa = R200_CONTEXT(ctx); \
return (!rmesa->radeon.TclFallback && !ctx->VertexProgram._Enabled && (FLAG)) ? atom->cmd_size + (ADD) : 0; \
}
#define TCL_OR_VP_CHECK( NM, FLAG, ADD ) \
-static int check_##NM( GLcontext *ctx, struct radeon_state_atom *atom ) \
+static int check_##NM( struct gl_context *ctx, struct radeon_state_atom *atom ) \
{ \
r200ContextPtr rmesa = R200_CONTEXT(ctx); \
return (!rmesa->radeon.TclFallback && (FLAG)) ? atom->cmd_size + (ADD) : 0; \
}
#define VP_CHECK( NM, FLAG, ADD ) \
-static int check_##NM( GLcontext *ctx, struct radeon_state_atom *atom ) \
+static int check_##NM( struct gl_context *ctx, struct radeon_state_atom *atom ) \
{ \
r200ContextPtr rmesa = R200_CONTEXT(ctx); \
(void) atom; \
@@ -337,7 +337,7 @@ VP_CHECK( tcl_vpp_size_add4, ctx->VertexProgram.Current->Base.NumNativeParameter
OUT_BATCH(CP_PACKET0_ONE(R200_SE_TCL_SCALAR_DATA_REG, h.scalars.count - 1)); \
OUT_BATCH_TABLE((data), h.scalars.count); \
} while(0)
-static int check_rrb(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_rrb(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
struct radeon_renderbuffer *rrb;
@@ -347,7 +347,7 @@ static int check_rrb(GLcontext *ctx, struct radeon_state_atom *atom)
return atom->cmd_size;
}
-static int check_polygon_stipple(GLcontext *ctx,
+static int check_polygon_stipple(struct gl_context *ctx,
struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
@@ -356,7 +356,7 @@ static int check_polygon_stipple(GLcontext *ctx,
return 0;
}
-static void mtl_emit(GLcontext *ctx, struct radeon_state_atom *atom)
+static void mtl_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
BATCH_LOCALS(&r200->radeon);
@@ -368,7 +368,7 @@ static void mtl_emit(GLcontext *ctx, struct radeon_state_atom *atom)
END_BATCH();
}
-static void lit_emit(GLcontext *ctx, struct radeon_state_atom *atom)
+static void lit_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
BATCH_LOCALS(&r200->radeon);
@@ -380,7 +380,7 @@ static void lit_emit(GLcontext *ctx, struct radeon_state_atom *atom)
END_BATCH();
}
-static void ptp_emit(GLcontext *ctx, struct radeon_state_atom *atom)
+static void ptp_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
BATCH_LOCALS(&r200->radeon);
@@ -392,7 +392,7 @@ static void ptp_emit(GLcontext *ctx, struct radeon_state_atom *atom)
END_BATCH();
}
-static void veclinear_emit(GLcontext *ctx, struct radeon_state_atom *atom)
+static void veclinear_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
BATCH_LOCALS(&r200->radeon);
@@ -401,7 +401,7 @@ static void veclinear_emit(GLcontext *ctx, struct radeon_state_atom *atom)
OUT_VECLINEAR(atom->cmd[0], atom->cmd+1);
}
-static void scl_emit(GLcontext *ctx, struct radeon_state_atom *atom)
+static void scl_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
BATCH_LOCALS(&r200->radeon);
@@ -413,7 +413,7 @@ static void scl_emit(GLcontext *ctx, struct radeon_state_atom *atom)
}
-static void vec_emit(GLcontext *ctx, struct radeon_state_atom *atom)
+static void vec_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
BATCH_LOCALS(&r200->radeon);
@@ -424,7 +424,7 @@ static void vec_emit(GLcontext *ctx, struct radeon_state_atom *atom)
END_BATCH();
}
-static void ctx_emit(GLcontext *ctx, struct radeon_state_atom *atom)
+static void ctx_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
BATCH_LOCALS(&r200->radeon);
@@ -491,7 +491,7 @@ static void ctx_emit(GLcontext *ctx, struct radeon_state_atom *atom)
END_BATCH();
}
-static int check_always_ctx( GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_always_ctx( struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
struct radeon_renderbuffer *rrb, *drb;
@@ -516,7 +516,7 @@ static int check_always_ctx( GLcontext *ctx, struct radeon_state_atom *atom)
return dwords;
}
-static void ctx_emit_cs(GLcontext *ctx, struct radeon_state_atom *atom)
+static void ctx_emit_cs(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
BATCH_LOCALS(&r200->radeon);
@@ -600,7 +600,7 @@ static void ctx_emit_cs(GLcontext *ctx, struct radeon_state_atom *atom)
END_BATCH();
}
-static int get_tex_size(GLcontext* ctx, struct radeon_state_atom *atom)
+static int get_tex_size(struct gl_context* ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
uint32_t dwords = atom->cmd_size + 2;
@@ -612,7 +612,7 @@ static int get_tex_size(GLcontext* ctx, struct radeon_state_atom *atom)
return dwords;
}
-static int check_tex_pair(GLcontext* ctx, struct radeon_state_atom *atom)
+static int check_tex_pair(struct gl_context* ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
/** XOR is bit flip operation so use it for finding pair */
@@ -622,7 +622,7 @@ static int check_tex_pair(GLcontext* ctx, struct radeon_state_atom *atom)
return get_tex_size(ctx, atom);
}
-static int check_tex(GLcontext* ctx, struct radeon_state_atom *atom)
+static int check_tex(struct gl_context* ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
if (!(r200->state.texture.unit[atom->idx].unitneeded))
@@ -632,7 +632,7 @@ static int check_tex(GLcontext* ctx, struct radeon_state_atom *atom)
}
-static void tex_emit(GLcontext *ctx, struct radeon_state_atom *atom)
+static void tex_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
BATCH_LOCALS(&r200->radeon);
@@ -657,7 +657,7 @@ static void tex_emit(GLcontext *ctx, struct radeon_state_atom *atom)
END_BATCH();
}
-static int get_tex_mm_size(GLcontext* ctx, struct radeon_state_atom *atom)
+static int get_tex_mm_size(struct gl_context* ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
uint32_t dwords = atom->cmd_size + 2;
@@ -676,7 +676,7 @@ static int get_tex_mm_size(GLcontext* ctx, struct radeon_state_atom *atom)
return dwords;
}
-static int check_tex_pair_mm(GLcontext* ctx, struct radeon_state_atom *atom)
+static int check_tex_pair_mm(struct gl_context* ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
/** XOR is bit flip operation so use it for finding pair */
@@ -686,7 +686,7 @@ static int check_tex_pair_mm(GLcontext* ctx, struct radeon_state_atom *atom)
return get_tex_mm_size(ctx, atom);
}
-static int check_tex_mm(GLcontext* ctx, struct radeon_state_atom *atom)
+static int check_tex_mm(struct gl_context* ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
if (!(r200->state.texture.unit[atom->idx].unitneeded))
@@ -696,7 +696,7 @@ static int check_tex_mm(GLcontext* ctx, struct radeon_state_atom *atom)
}
-static void tex_emit_mm(GLcontext *ctx, struct radeon_state_atom *atom)
+static void tex_emit_mm(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
BATCH_LOCALS(&r200->radeon);
@@ -726,7 +726,7 @@ static void tex_emit_mm(GLcontext *ctx, struct radeon_state_atom *atom)
}
-static void cube_emit(GLcontext *ctx, struct radeon_state_atom *atom)
+static void cube_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
BATCH_LOCALS(&r200->radeon);
@@ -753,7 +753,7 @@ static void cube_emit(GLcontext *ctx, struct radeon_state_atom *atom)
END_BATCH();
}
-static void cube_emit_cs(GLcontext *ctx, struct radeon_state_atom *atom)
+static void cube_emit_cs(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r200ContextPtr r200 = R200_CONTEXT(ctx);
BATCH_LOCALS(&r200->radeon);
@@ -782,7 +782,7 @@ static void cube_emit_cs(GLcontext *ctx, struct radeon_state_atom *atom)
*/
void r200InitState( r200ContextPtr rmesa )
{
- GLcontext *ctx = rmesa->radeon.glCtx;
+ struct gl_context *ctx = rmesa->radeon.glCtx;
GLuint i;
rmesa->radeon.state.color.clear = 0x00000000;
diff --git a/src/mesa/drivers/dri/r200/r200_swtcl.c b/src/mesa/drivers/dri/r200/r200_swtcl.c
index dbf4ad477db..38864162ced 100644
--- a/src/mesa/drivers/dri/r200/r200_swtcl.c
+++ b/src/mesa/drivers/dri/r200/r200_swtcl.c
@@ -75,7 +75,7 @@ do { \
rmesa->radeon.swtcl.vertex_attr_count++; \
} while (0)
-static void r200SetVertexFormat( GLcontext *ctx )
+static void r200SetVertexFormat( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT( ctx );
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -221,7 +221,7 @@ static void r200_predict_emit_size( r200ContextPtr rmesa )
}
-static void r200RenderStart( GLcontext *ctx )
+static void r200RenderStart( struct gl_context *ctx )
{
r200SetVertexFormat( ctx );
if (RADEON_DEBUG & RADEON_VERTS)
@@ -234,7 +234,7 @@ static void r200RenderStart( GLcontext *ctx )
* determine in advance whether or not the hardware can / should do the
* projection divide or Mesa should do it.
*/
-void r200ChooseVertexState( GLcontext *ctx )
+void r200ChooseVertexState( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT( ctx );
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -286,7 +286,7 @@ void r200ChooseVertexState( GLcontext *ctx )
}
}
-void r200_swtcl_flush(GLcontext *ctx, uint32_t current_offset)
+void r200_swtcl_flush(struct gl_context *ctx, uint32_t current_offset)
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
if (RADEON_DEBUG & RADEON_VERTS)
@@ -315,7 +315,7 @@ void r200_swtcl_flush(GLcontext *ctx, uint32_t current_offset)
/**************************************************************************/
-static INLINE GLuint reduced_hw_prim( GLcontext *ctx, GLuint prim)
+static INLINE GLuint reduced_hw_prim( struct gl_context *ctx, GLuint prim)
{
switch (prim) {
case GL_POINTS:
@@ -336,9 +336,9 @@ static INLINE GLuint reduced_hw_prim( GLcontext *ctx, GLuint prim)
}
-static void r200RasterPrimitive( GLcontext *ctx, GLuint hwprim );
-static void r200RenderPrimitive( GLcontext *ctx, GLenum prim );
-static void r200ResetLineStipple( GLcontext *ctx );
+static void r200RasterPrimitive( struct gl_context *ctx, GLuint hwprim );
+static void r200RenderPrimitive( struct gl_context *ctx, GLenum prim );
+static void r200ResetLineStipple( struct gl_context *ctx );
/***********************************************************************
* Emit primitives as inline vertices *
@@ -568,7 +568,7 @@ static void init_rast_tab( void )
/* Choose render functions */
/**********************************************************************/
-void r200ChooseRenderState( GLcontext *ctx )
+void r200ChooseRenderState( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -608,11 +608,14 @@ void r200ChooseRenderState( GLcontext *ctx )
/**********************************************************************/
-static void r200RasterPrimitive( GLcontext *ctx, GLuint hwprim )
+static void r200RasterPrimitive( struct gl_context *ctx, GLuint hwprim )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
radeon_prepare_render(&rmesa->radeon);
+ if (rmesa->radeon.NewGLState)
+ r200ValidateState( ctx );
+
if (rmesa->radeon.swtcl.hw_primitive != hwprim) {
/* need to disable perspective-correct texturing for point sprites */
@@ -631,7 +634,7 @@ static void r200RasterPrimitive( GLcontext *ctx, GLuint hwprim )
}
}
-static void r200RenderPrimitive( GLcontext *ctx, GLenum prim )
+static void r200RenderPrimitive( struct gl_context *ctx, GLenum prim )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
rmesa->radeon.swtcl.render_primitive = prim;
@@ -639,11 +642,11 @@ static void r200RenderPrimitive( GLcontext *ctx, GLenum prim )
r200RasterPrimitive( ctx, reduced_hw_prim(ctx, prim) );
}
-static void r200RenderFinish( GLcontext *ctx )
+static void r200RenderFinish( struct gl_context *ctx )
{
}
-static void r200ResetLineStipple( GLcontext *ctx )
+static void r200ResetLineStipple( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
R200_STATECHANGE( rmesa, lin );
@@ -675,7 +678,7 @@ static const char *getFallbackString(GLuint bit)
}
-void r200Fallback( GLcontext *ctx, GLuint bit, GLboolean mode )
+void r200Fallback( struct gl_context *ctx, GLuint bit, GLboolean mode )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -742,7 +745,7 @@ void r200Fallback( GLcontext *ctx, GLuint bit, GLboolean mode )
* NV_texture_rectangle).
*/
void
-r200PointsBitmap( GLcontext *ctx, GLint px, GLint py,
+r200PointsBitmap( struct gl_context *ctx, GLint px, GLint py,
GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack,
const GLubyte *bitmap )
@@ -917,7 +920,7 @@ r200PointsBitmap( GLcontext *ctx, GLint px, GLint py,
/* Initialization. */
/**********************************************************************/
-void r200InitSwtcl( GLcontext *ctx )
+void r200InitSwtcl( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
r200ContextPtr rmesa = R200_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/r200/r200_swtcl.h b/src/mesa/drivers/dri/r200/r200_swtcl.h
index b0905879d7a..668e175603f 100644
--- a/src/mesa/drivers/dri/r200/r200_swtcl.h
+++ b/src/mesa/drivers/dri/r200/r200_swtcl.h
@@ -38,32 +38,32 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "swrast/swrast.h"
#include "r200_context.h"
-extern void r200InitSwtcl( GLcontext *ctx );
+extern void r200InitSwtcl( struct gl_context *ctx );
-extern void r200ChooseRenderState( GLcontext *ctx );
-extern void r200ChooseVertexState( GLcontext *ctx );
+extern void r200ChooseRenderState( struct gl_context *ctx );
+extern void r200ChooseVertexState( struct gl_context *ctx );
-extern void r200CheckTexSizes( GLcontext *ctx );
+extern void r200CheckTexSizes( struct gl_context *ctx );
-extern void r200BuildVertices( GLcontext *ctx, GLuint start, GLuint count,
+extern void r200BuildVertices( struct gl_context *ctx, GLuint start, GLuint count,
GLuint newinputs );
extern void r200PrintSetupFlags(char *msg, GLuint flags );
-extern void r200_translate_vertex( GLcontext *ctx,
+extern void r200_translate_vertex( struct gl_context *ctx,
const radeonVertex *src,
SWvertex *dst );
-extern void r200_print_vertex( GLcontext *ctx, const radeonVertex *v );
+extern void r200_print_vertex( struct gl_context *ctx, const radeonVertex *v );
-extern void r200_import_float_colors( GLcontext *ctx );
-extern void r200_import_float_spec_colors( GLcontext *ctx );
+extern void r200_import_float_colors( struct gl_context *ctx );
+extern void r200_import_float_spec_colors( struct gl_context *ctx );
-extern void r200PointsBitmap( GLcontext *ctx, GLint px, GLint py,
+extern void r200PointsBitmap( struct gl_context *ctx, GLint px, GLint py,
GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack,
const GLubyte *bitmap );
-void r200_swtcl_flush(GLcontext *ctx, uint32_t current_offset);
+void r200_swtcl_flush(struct gl_context *ctx, uint32_t current_offset);
#endif
diff --git a/src/mesa/drivers/dri/r200/r200_tcl.c b/src/mesa/drivers/dri/r200/r200_tcl.c
index 4ae0f304918..84db7c9d4eb 100644
--- a/src/mesa/drivers/dri/r200/r200_tcl.c
+++ b/src/mesa/drivers/dri/r200/r200_tcl.c
@@ -177,7 +177,7 @@ while (0)
* discrete and there are no intervening state changes. (Somewhat
* duplicates changes to DrawArrays code)
*/
-static void r200EmitPrim( GLcontext *ctx,
+static void r200EmitPrim( struct gl_context *ctx,
GLenum prim,
GLuint hwprim,
GLuint start,
@@ -241,7 +241,7 @@ static void r200EmitPrim( GLcontext *ctx,
/* External entrypoints */
/**********************************************************************/
-void r200EmitPrimitive( GLcontext *ctx,
+void r200EmitPrimitive( struct gl_context *ctx,
GLuint first,
GLuint last,
GLuint flags )
@@ -249,7 +249,7 @@ void r200EmitPrimitive( GLcontext *ctx,
tcl_render_tab_verts[flags&PRIM_MODE_MASK]( ctx, first, last, flags );
}
-void r200EmitEltPrimitive( GLcontext *ctx,
+void r200EmitEltPrimitive( struct gl_context *ctx,
GLuint first,
GLuint last,
GLuint flags )
@@ -257,7 +257,7 @@ void r200EmitEltPrimitive( GLcontext *ctx,
tcl_render_tab_elts[flags&PRIM_MODE_MASK]( ctx, first, last, flags );
}
-void r200TclPrimitive( GLcontext *ctx,
+void r200TclPrimitive( struct gl_context *ctx,
GLenum prim,
int hw_prim )
{
@@ -265,6 +265,8 @@ void r200TclPrimitive( GLcontext *ctx,
GLuint newprim = hw_prim | R200_VF_TCL_OUTPUT_VTX_ENABLE;
radeon_prepare_render(&rmesa->radeon);
+ if (rmesa->radeon.NewGLState)
+ r200ValidateState( ctx );
if (newprim != rmesa->tcl.hw_primitive ||
!discrete_prim[hw_prim&0xf]) {
@@ -337,7 +339,7 @@ r200InitStaticFogData( void )
* Fog blend factors are in the range [0,1].
*/
float
-r200ComputeFogBlendFactor( GLcontext *ctx, GLfloat fogcoord )
+r200ComputeFogBlendFactor( struct gl_context *ctx, GLfloat fogcoord )
{
GLfloat end = ctx->Fog.End;
GLfloat d, temp;
@@ -372,7 +374,7 @@ r200ComputeFogBlendFactor( GLcontext *ctx, GLfloat fogcoord )
* Predict total emit size for next rendering operation so there is no flush in middle of rendering
* Prediction has to aim towards the best possible value that is worse than worst case scenario
*/
-static GLuint r200EnsureEmitSize( GLcontext * ctx , GLubyte* vimap_rev )
+static GLuint r200EnsureEmitSize( struct gl_context * ctx , GLubyte* vimap_rev )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -437,7 +439,7 @@ static GLuint r200EnsureEmitSize( GLcontext * ctx , GLubyte* vimap_rev )
/* TCL render.
*/
-static GLboolean r200_run_tcl_render( GLcontext *ctx,
+static GLboolean r200_run_tcl_render( struct gl_context *ctx,
struct tnl_pipeline_stage *stage )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -594,7 +596,7 @@ const struct tnl_pipeline_stage _r200_tcl_stage =
*/
-static void transition_to_swtnl( GLcontext *ctx )
+static void transition_to_swtnl( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -618,7 +620,7 @@ static void transition_to_swtnl( GLcontext *ctx )
rmesa->hw.vap.cmd[VAP_SE_VAP_CNTL] &= ~(R200_VAP_TCL_ENABLE|R200_VAP_PROG_VTX_SHADER_ENABLE);
}
-static void transition_to_hwtnl( GLcontext *ctx )
+static void transition_to_hwtnl( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -688,7 +690,7 @@ static char *getFallbackString(GLuint bit)
-void r200TclFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
+void r200TclFallback( struct gl_context *ctx, GLuint bit, GLboolean mode )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint oldfallback = rmesa->radeon.TclFallback;
diff --git a/src/mesa/drivers/dri/r200/r200_tcl.h b/src/mesa/drivers/dri/r200/r200_tcl.h
index f191ddc7eb9..53a1f11e9db 100644
--- a/src/mesa/drivers/dri/r200/r200_tcl.h
+++ b/src/mesa/drivers/dri/r200/r200_tcl.h
@@ -37,17 +37,17 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r200_context.h"
-extern void r200TclPrimitive( GLcontext *ctx, GLenum prim, int hw_prim );
-extern void r200EmitEltPrimitive( GLcontext *ctx, GLuint first, GLuint last,
+extern void r200TclPrimitive( struct gl_context *ctx, GLenum prim, int hw_prim );
+extern void r200EmitEltPrimitive( struct gl_context *ctx, GLuint first, GLuint last,
GLuint flags );
-extern void r200EmitPrimitive( GLcontext *ctx, GLuint first, GLuint last,
+extern void r200EmitPrimitive( struct gl_context *ctx, GLuint first, GLuint last,
GLuint flags );
-extern void r200TclFallback( GLcontext *ctx, GLuint bit, GLboolean mode );
+extern void r200TclFallback( struct gl_context *ctx, GLuint bit, GLboolean mode );
extern void r200InitStaticFogData( void );
-extern float r200ComputeFogBlendFactor( GLcontext *ctx, GLfloat fogcoord );
+extern float r200ComputeFogBlendFactor( struct gl_context *ctx, GLfloat fogcoord );
#define R200_TCL_FALLBACK_RASTER 0x1 /* rasterization */
#define R200_TCL_FALLBACK_UNFILLED 0x2 /* unfilled tris */
diff --git a/src/mesa/drivers/dri/r200/r200_tex.c b/src/mesa/drivers/dri/r200/r200_tex.c
index 6723b12bf49..5207c2901a3 100644
--- a/src/mesa/drivers/dri/r200/r200_tex.c
+++ b/src/mesa/drivers/dri/r200/r200_tex.c
@@ -294,7 +294,7 @@ static void r200SetTexBorderColor( radeonTexObjPtr t, const GLfloat color[4] )
t->pp_border_color = radeonPackColor( 4, c[0], c[1], c[2], c[3] );
}
-static void r200TexEnv( GLcontext *ctx, GLenum target,
+static void r200TexEnv( struct gl_context *ctx, GLenum target,
GLenum pname, const GLfloat *param )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -366,7 +366,7 @@ static void r200TexEnv( GLcontext *ctx, GLenum target,
* next UpdateTextureState
*/
-static void r200TexParameter( GLcontext *ctx, GLenum target,
+static void r200TexParameter( struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj,
GLenum pname, const GLfloat *params )
{
@@ -409,7 +409,7 @@ static void r200TexParameter( GLcontext *ctx, GLenum target,
}
-static void r200DeleteTexture(GLcontext * ctx, struct gl_texture_object *texObj)
+static void r200DeleteTexture(struct gl_context * ctx, struct gl_texture_object *texObj)
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
radeonTexObj* t = radeon_tex_obj(texObj);
@@ -446,7 +446,7 @@ static void r200DeleteTexture(GLcontext * ctx, struct gl_texture_object *texObj)
* Basically impossible to do this on the fly - just collect some
* basic info & do the checks from ValidateState().
*/
-static void r200TexGen( GLcontext *ctx,
+static void r200TexGen( struct gl_context *ctx,
GLenum coord,
GLenum pname,
const GLfloat *params )
@@ -464,7 +464,7 @@ static void r200TexGen( GLcontext *ctx,
* allocate the default texture objects.
* Fixup MaxAnisotropy according to user preference.
*/
-static struct gl_texture_object *r200NewTextureObject(GLcontext * ctx,
+static struct gl_texture_object *r200NewTextureObject(struct gl_context * ctx,
GLuint name,
GLenum target)
{
diff --git a/src/mesa/drivers/dri/r200/r200_tex.h b/src/mesa/drivers/dri/r200/r200_tex.h
index 1a1e7038df6..8bebf8a037b 100644
--- a/src/mesa/drivers/dri/r200/r200_tex.h
+++ b/src/mesa/drivers/dri/r200/r200_tex.h
@@ -42,7 +42,7 @@ extern void r200SetTexOffset(__DRIcontext *pDRICtx, GLint texname,
unsigned long long offset, GLint depth,
GLuint pitch);
-extern void r200UpdateTextureState( GLcontext *ctx );
+extern void r200UpdateTextureState( struct gl_context *ctx );
extern int r200UploadTexImages( r200ContextPtr rmesa, radeonTexObjPtr t, GLuint face );
@@ -50,8 +50,8 @@ extern void r200DestroyTexObj( r200ContextPtr rmesa, radeonTexObjPtr t );
extern void r200InitTextureFuncs( radeonContextPtr radeon, struct dd_function_table *functions );
-extern void r200UpdateFragmentShader( GLcontext *ctx );
+extern void r200UpdateFragmentShader( struct gl_context *ctx );
-extern void set_re_cntl_d3d( GLcontext *ctx, int unit, GLboolean use_d3d );
+extern void set_re_cntl_d3d( struct gl_context *ctx, int unit, GLboolean use_d3d );
#endif /* __R200_TEX_H__ */
diff --git a/src/mesa/drivers/dri/r200/r200_texstate.c b/src/mesa/drivers/dri/r200/r200_texstate.c
index 9ccf30c3ac9..690bec640bd 100644
--- a/src/mesa/drivers/dri/r200/r200_texstate.c
+++ b/src/mesa/drivers/dri/r200/r200_texstate.c
@@ -302,7 +302,7 @@ do { \
* Texture unit state management
*/
-static GLboolean r200UpdateTextureEnv( GLcontext *ctx, int unit, int slot, GLuint replaceargs )
+static GLboolean r200UpdateTextureEnv( struct gl_context *ctx, int unit, int slot, GLuint replaceargs )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
@@ -869,7 +869,7 @@ void r200SetTexBuffer(__DRIcontext *pDRICtx, GLint target, __DRIdrawable *dPriv)
#define REF_COLOR 1
#define REF_ALPHA 2
-static GLboolean r200UpdateAllTexEnv( GLcontext *ctx )
+static GLboolean r200UpdateAllTexEnv( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLint i, j, currslot;
@@ -1203,7 +1203,7 @@ static GLuint r200_need_dis_texgen(const GLbitfield texGenEnabled,
/*
* Returns GL_FALSE if fallback required.
*/
-static GLboolean r200_validate_texgen( GLcontext *ctx, GLuint unit )
+static GLboolean r200_validate_texgen( struct gl_context *ctx, GLuint unit )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
@@ -1385,7 +1385,7 @@ static GLboolean r200_validate_texgen( GLcontext *ctx, GLuint unit )
return GL_TRUE;
}
-void set_re_cntl_d3d( GLcontext *ctx, int unit, GLboolean use_d3d )
+void set_re_cntl_d3d( struct gl_context *ctx, int unit, GLboolean use_d3d )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -1521,7 +1521,7 @@ static void setup_hardware_state(r200ContextPtr rmesa, radeonTexObj *t)
}
-static GLboolean r200_validate_texture(GLcontext *ctx, struct gl_texture_object *texObj, int unit)
+static GLboolean r200_validate_texture(struct gl_context *ctx, struct gl_texture_object *texObj, int unit)
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
radeonTexObj *t = radeon_tex_obj(texObj);
@@ -1564,7 +1564,7 @@ static GLboolean r200_validate_texture(GLcontext *ctx, struct gl_texture_object
return !t->border_fallback;
}
-static GLboolean r200UpdateTextureUnit(GLcontext *ctx, int unit)
+static GLboolean r200UpdateTextureUnit(struct gl_context *ctx, int unit)
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLuint unitneeded = rmesa->state.texture.unit[unit].unitneeded;
@@ -1588,7 +1588,7 @@ static GLboolean r200UpdateTextureUnit(GLcontext *ctx, int unit)
}
-void r200UpdateTextureState( GLcontext *ctx )
+void r200UpdateTextureState( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
GLboolean ok;
diff --git a/src/mesa/drivers/dri/r200/r200_vertprog.c b/src/mesa/drivers/dri/r200/r200_vertprog.c
index 5d268319f3f..5d69012a81f 100644
--- a/src/mesa/drivers/dri/r200/r200_vertprog.c
+++ b/src/mesa/drivers/dri/r200/r200_vertprog.c
@@ -100,7 +100,7 @@ static struct{
};
#undef OPN
-static GLboolean r200VertexProgUpdateParams(GLcontext *ctx, struct r200_vertex_program *vp)
+static GLboolean r200VertexProgUpdateParams(struct gl_context *ctx, struct r200_vertex_program *vp)
{
r200ContextPtr rmesa = R200_CONTEXT( ctx );
GLfloat *fcmd = (GLfloat *)&rmesa->hw.vpp[0].cmd[VPP_CMD_0 + 1];
@@ -396,7 +396,7 @@ static unsigned long op_operands(enum prog_opcode opcode)
*
* \return GL_TRUE for success, GL_FALSE for failure.
*/
-static GLboolean r200_translate_vertex_program(GLcontext *ctx, struct r200_vertex_program *vp)
+static GLboolean r200_translate_vertex_program(struct gl_context *ctx, struct r200_vertex_program *vp)
{
struct gl_vertex_program *mesa_vp = &vp->mesa_program;
struct prog_instruction *vpi;
@@ -1098,7 +1098,7 @@ else {
return GL_TRUE;
}
-void r200SetupVertexProg( GLcontext *ctx ) {
+void r200SetupVertexProg( struct gl_context *ctx ) {
r200ContextPtr rmesa = R200_CONTEXT(ctx);
struct r200_vertex_program *vp = (struct r200_vertex_program *)ctx->VertexProgram.Current;
GLboolean fallback;
@@ -1179,7 +1179,7 @@ void r200SetupVertexProg( GLcontext *ctx ) {
static void
-r200BindProgram(GLcontext *ctx, GLenum target, struct gl_program *prog)
+r200BindProgram(struct gl_context *ctx, GLenum target, struct gl_program *prog)
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -1194,7 +1194,7 @@ r200BindProgram(GLcontext *ctx, GLenum target, struct gl_program *prog)
}
static struct gl_program *
-r200NewProgram(GLcontext *ctx, GLenum target, GLuint id)
+r200NewProgram(struct gl_context *ctx, GLenum target, GLuint id)
{
struct r200_vertex_program *vp;
@@ -1213,13 +1213,13 @@ r200NewProgram(GLcontext *ctx, GLenum target, GLuint id)
static void
-r200DeleteProgram(GLcontext *ctx, struct gl_program *prog)
+r200DeleteProgram(struct gl_context *ctx, struct gl_program *prog)
{
_mesa_delete_program(ctx, prog);
}
static GLboolean
-r200ProgramStringNotify(GLcontext *ctx, GLenum target, struct gl_program *prog)
+r200ProgramStringNotify(struct gl_context *ctx, GLenum target, struct gl_program *prog)
{
struct r200_vertex_program *vp = (void *)prog;
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -1244,7 +1244,7 @@ r200ProgramStringNotify(GLcontext *ctx, GLenum target, struct gl_program *prog)
}
static GLboolean
-r200IsProgramNative(GLcontext *ctx, GLenum target, struct gl_program *prog)
+r200IsProgramNative(struct gl_context *ctx, GLenum target, struct gl_program *prog)
{
struct r200_vertex_program *vp = (void *)prog;
diff --git a/src/mesa/drivers/dri/r200/r200_vertprog.h b/src/mesa/drivers/dri/r200/r200_vertprog.h
index 938237680ce..4757f4b32bc 100644
--- a/src/mesa/drivers/dri/r200/r200_vertprog.h
+++ b/src/mesa/drivers/dri/r200/r200_vertprog.h
@@ -11,7 +11,7 @@ typedef struct {
} VERTEX_SHADER_INSTRUCTION;
extern void r200InitShaderFuncs(struct dd_function_table *functions);
-extern void r200SetupVertexProg( GLcontext *ctx );
+extern void r200SetupVertexProg( struct gl_context *ctx );
#define VSF_FLAG_X 1
#define VSF_FLAG_Y 2
diff --git a/src/mesa/drivers/dri/r300/compiler/Makefile b/src/mesa/drivers/dri/r300/compiler/Makefile
index d0eb1707845..51b896ae91f 100644
--- a/src/mesa/drivers/dri/r300/compiler/Makefile
+++ b/src/mesa/drivers/dri/r300/compiler/Makefile
@@ -8,6 +8,7 @@ LIBNAME = r300compiler
C_SOURCES = \
radeon_code.c \
radeon_compiler.c \
+ radeon_compiler_util.c \
radeon_emulate_branches.c \
radeon_emulate_loops.c \
radeon_program.c \
diff --git a/src/mesa/drivers/dri/r300/compiler/SConscript b/src/mesa/drivers/dri/r300/compiler/SConscript
index 847857b1425..2b4bce1c08c 100755
--- a/src/mesa/drivers/dri/r300/compiler/SConscript
+++ b/src/mesa/drivers/dri/r300/compiler/SConscript
@@ -12,6 +12,7 @@ r300compiler = env.ConvenienceLibrary(
source = [
'radeon_code.c',
'radeon_compiler.c',
+ 'radeon_compiler_util.c',
'radeon_program.c',
'radeon_program_print.c',
'radeon_opcodes.c',
diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
index 4793f335770..2f130198d35 100644
--- a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
+++ b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
@@ -145,8 +145,8 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
{"final code validation", 0, 1, rc_validate_final_shader, NULL},
{"machine code generation", 0, is_r500, r500BuildFragmentProgramHwCode, NULL},
{"machine code generation", 0, !is_r500, r300BuildFragmentProgramHwCode, NULL},
- {"dump machine code", 0, is_r500 && c->Base.Debug, r500FragmentProgramDump, NULL},
- {"dump machine code", 0, !is_r500 && c->Base.Debug, r300FragmentProgramDump, NULL},
+ {"dump machine code", 0, is_r500 && (c->Base.Debug & RC_DBG_LOG), r500FragmentProgramDump, NULL},
+ {"dump machine code", 0, !is_r500 && (c->Base.Debug & RC_DBG_LOG), r300FragmentProgramDump, NULL},
{NULL, 0, 0, NULL, NULL}
};
diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
index d7d49e514b9..bf8341f0173 100644
--- a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
+++ b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
@@ -1067,7 +1067,7 @@ void r3xx_compile_vertex_program(struct r300_vertex_program_compiler *c)
{"dead constants", 1, kill_consts, rc_remove_unused_constants, &c->code->constants_remap_table},
{"final code validation", 0, 1, rc_validate_final_shader, NULL},
{"machine code generation", 0, 1, translate_vertex_program, NULL},
- {"dump machine code", 0,c->Base.Debug,r300_vertex_program_dump, NULL},
+ {"dump machine code", 0, c->Base.Debug & RC_DBG_LOG, r300_vertex_program_dump, NULL},
{NULL, 0, 0, NULL, NULL}
};
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_compiler.c b/src/mesa/drivers/dri/r300/compiler/radeon_compiler.c
index b410b2daf42..4286baed0c6 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_compiler.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_compiler.c
@@ -26,7 +26,9 @@
#include <stdio.h>
#include <stdlib.h>
+#include "radeon_dataflow.h"
#include "radeon_program.h"
+#include "radeon_program_pair.h"
void rc_init(struct radeon_compiler * c)
@@ -50,7 +52,7 @@ void rc_debug(struct radeon_compiler * c, const char * fmt, ...)
{
va_list ap;
- if (!c->Debug)
+ if (!(c->Debug & RC_DBG_LOG))
return;
va_start(ap, fmt);
@@ -84,7 +86,7 @@ void rc_error(struct radeon_compiler * c, const char * fmt, ...)
}
}
- if (c->Debug) {
+ if (c->Debug & RC_DBG_LOG) {
fprintf(stderr, "r300compiler error: ");
va_start(ap, fmt);
@@ -351,11 +353,65 @@ void rc_transform_fragment_face(struct radeon_compiler *c, unsigned face)
}
}
+static void reg_count_callback(void * userdata, struct rc_instruction * inst,
+ rc_register_file file, unsigned int index, unsigned int mask)
+{
+ unsigned int * max_reg = userdata;
+ if (file == RC_FILE_TEMPORARY)
+ index > *max_reg ? *max_reg = index : 0;
+}
+
+static void print_stats(struct radeon_compiler * c)
+{
+ struct rc_instruction * tmp;
+ unsigned max_reg, insts, fc, tex, alpha, rgb, presub;
+ max_reg = insts = fc = tex = alpha = rgb = presub = 0;
+ for(tmp = c->Program.Instructions.Next; tmp != &c->Program.Instructions;
+ tmp = tmp->Next){
+ const struct rc_opcode_info * info;
+ rc_for_all_reads_mask(tmp, reg_count_callback, &max_reg);
+ if (tmp->Type == RC_INSTRUCTION_NORMAL) {
+ if (tmp->U.I.PreSub.Opcode != RC_PRESUB_NONE)
+ presub++;
+ info = rc_get_opcode_info(tmp->U.I.Opcode);
+ } else {
+ if (tmp->U.P.RGB.Src[RC_PAIR_PRESUB_SRC].Used)
+ presub++;
+ if (tmp->U.P.Alpha.Src[RC_PAIR_PRESUB_SRC].Used)
+ presub++;
+ /* Assuming alpha will never be a flow control or
+ * a tex instruction. */
+ if (tmp->U.P.Alpha.Opcode != RC_OPCODE_NOP)
+ alpha++;
+ if (tmp->U.P.RGB.Opcode != RC_OPCODE_NOP)
+ rgb++;
+ info = rc_get_opcode_info(tmp->U.P.RGB.Opcode);
+ }
+ if (info->IsFlowControl)
+ fc++;
+ if (info->HasTexture)
+ tex++;
+ insts++;
+ }
+ if (insts < 4)
+ return;
+ fprintf(stderr,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
+ "~%4u Instructions\n"
+ "~%4u Vector Instructions (RGB)\n"
+ "~%4u Scalar Instructions (Alpha)\n"
+ "~%4u Flow Control Instructions\n"
+ "~%4u Texture Instructions\n"
+ "~%4u Presub Operations\n"
+ "~%4u Temporary Registers\n"
+ "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
+ insts, rgb, alpha, fc, tex, presub, max_reg + 1);
+}
+
/* Executes a list of compiler passes given in the parameter 'list'. */
void rc_run_compiler(struct radeon_compiler *c, struct radeon_compiler_pass *list,
const char *shader_name)
{
- if (c->Debug) {
+ if (c->Debug & RC_DBG_LOG) {
fprintf(stderr, "%s: before compilation\n", shader_name);
rc_print_program(&c->Program);
}
@@ -367,12 +423,14 @@ void rc_run_compiler(struct radeon_compiler *c, struct radeon_compiler_pass *lis
if (c->Error)
return;
- if (c->Debug && list[i].dump) {
+ if ((c->Debug & RC_DBG_LOG) && list[i].dump) {
fprintf(stderr, "%s: after '%s'\n", shader_name, list[i].name);
rc_print_program(&c->Program);
}
}
}
+ if (c->Debug & RC_DBG_STATS)
+ print_stats(c);
}
void rc_validate_final_shader(struct radeon_compiler *c, void *user)
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_compiler.h b/src/mesa/drivers/dri/r300/compiler/radeon_compiler.h
index 6d96ac9fdd9..31fd469a04f 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_compiler.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_compiler.h
@@ -30,12 +30,15 @@
#include "radeon_program.h"
#include "radeon_emulate_loops.h"
+#define RC_DBG_LOG (1 << 0)
+#define RC_DBG_STATS (1 << 1)
+
struct rc_swizzle_caps;
struct radeon_compiler {
struct memory_pool Pool;
struct rc_program Program;
- unsigned Debug:1;
+ unsigned Debug:2;
unsigned Error:1;
char * ErrorMsg;
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.c b/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.c
new file mode 100644
index 00000000000..97f4c758492
--- /dev/null
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.c
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2010 Tom Stellard <[email protected]>
+ *
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+/**
+ * \file
+ */
+
+#include "radeon_compiler_util.h"
+
+/**
+ */
+unsigned int rc_swizzle_to_writemask(unsigned int swz)
+{
+ unsigned int mask = 0;
+ unsigned int i;
+
+ for(i = 0; i < 4; i++) {
+ mask |= 1 << GET_SWZ(swz, i);
+ }
+ mask &= RC_MASK_XYZW;
+
+ return mask;
+}
+
+unsigned int rc_src_reads_dst_mask(
+ rc_register_file src_file,
+ unsigned int src_idx,
+ unsigned int src_swz,
+ rc_register_file dst_file,
+ unsigned int dst_idx,
+ unsigned int dst_mask)
+{
+ if (src_file != dst_file || src_idx != dst_idx) {
+ return RC_MASK_NONE;
+ }
+ return dst_mask & rc_swizzle_to_writemask(src_swz);
+}
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.h b/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.h
new file mode 100644
index 00000000000..1a14e7cb0ef
--- /dev/null
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.h
@@ -0,0 +1,16 @@
+#include "radeon_program_constants.h"
+
+#ifndef RADEON_PROGRAM_UTIL_H
+#define RADEON_PROGRAM_UTIL_H
+
+unsigned int rc_swizzle_to_writemask(unsigned int swz);
+
+unsigned int rc_src_reads_dst_mask(
+ rc_register_file src_file,
+ unsigned int src_idx,
+ unsigned int src_swz,
+ rc_register_file dst_file,
+ unsigned int dst_idx,
+ unsigned int dst_mask);
+
+#endif /* RADEON_PROGRAM_UTIL_H */
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c
index a27d395587b..5927498818b 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2009 Nicolai Haehnle.
+ * Copyright 2010 Tom Stellard <[email protected]>
*
* All Rights Reserved.
*
@@ -27,6 +28,8 @@
#include "radeon_dataflow.h"
+#include "radeon_compiler.h"
+#include "radeon_compiler_util.h"
#include "radeon_program.h"
struct read_write_mask_data {
@@ -402,3 +405,252 @@ void rc_remap_registers(struct rc_instruction * inst, rc_remap_register_fn cb, v
else
remap_pair_instruction(inst, cb, userdata);
}
+
+/**
+ * @return RC_OPCODE_NOOP if inst is not a flow control instruction.
+ * @return The opcode of inst if it is a flow control instruction.
+ */
+static rc_opcode get_flow_control_inst(struct rc_instruction * inst)
+{
+ const struct rc_opcode_info * info;
+ if (inst->Type == RC_INSTRUCTION_NORMAL) {
+ info = rc_get_opcode_info(inst->U.I.Opcode);
+ } else {
+ info = rc_get_opcode_info(inst->U.P.RGB.Opcode);
+ /*A flow control instruction shouldn't have an alpha
+ * instruction.*/
+ assert(!info->IsFlowControl ||
+ inst->U.P.Alpha.Opcode == RC_OPCODE_NOP);
+ }
+
+ if (info->IsFlowControl)
+ return info->Opcode;
+ else
+ return RC_OPCODE_NOP;
+
+}
+
+struct get_readers_callback_data {
+ struct radeon_compiler * C;
+ struct rc_reader_data * ReaderData;
+ rc_read_src_fn ReadCB;
+ rc_read_write_mask_fn WriteCB;
+ unsigned int AliveWriteMask;
+};
+
+static void add_reader(
+ struct memory_pool * pool,
+ struct rc_reader_data * data,
+ struct rc_instruction * inst,
+ unsigned int mask,
+ struct rc_src_register * src)
+{
+ struct rc_reader * new;
+ memory_pool_array_reserve(pool, struct rc_reader, data->Readers,
+ data->ReaderCount, data->ReadersReserved, 1);
+ new = &data->Readers[data->ReaderCount++];
+ new->Inst = inst;
+ new->WriteMask = mask;
+ new->Src = src;
+}
+
+/**
+ * This function is used by rc_get_readers_normal() to determine whether inst
+ * is a reader of userdata->ReaderData->Writer
+ */
+static void get_readers_normal_read_callback(
+ void * userdata,
+ struct rc_instruction * inst,
+ struct rc_src_register * src)
+{
+ struct get_readers_callback_data * d = userdata;
+ unsigned int read_mask;
+
+ if (src->RelAddr)
+ d->ReaderData->Abort = 1;
+
+ unsigned int shared_mask = rc_src_reads_dst_mask(src->File, src->Index,
+ src->Swizzle,
+ d->ReaderData->Writer->U.I.DstReg.File,
+ d->ReaderData->Writer->U.I.DstReg.Index,
+ d->AliveWriteMask);
+
+ if (shared_mask == RC_MASK_NONE)
+ return;
+
+ /* If we make it this far, it means that this source reads from the
+ * same register written to by d->ReaderData->Writer. */
+
+ if (d->ReaderData->AbortOnRead) {
+ d->ReaderData->Abort = 1;
+ return;
+ }
+
+ read_mask = rc_swizzle_to_writemask(src->Swizzle);
+ /* XXX The behavior in this case should be configurable. */
+ if ((read_mask & d->AliveWriteMask) != read_mask) {
+ d->ReaderData->Abort = 1;
+ return;
+ }
+
+ d->ReadCB(d->ReaderData, inst, src);
+ if (d->ReaderData->Abort)
+ return;
+
+ add_reader(&d->C->Pool, d->ReaderData, inst, shared_mask, src);
+}
+
+/**
+ * This function is used by rc_get_readers_normal() to determine when
+ * userdata->ReaderData->Writer is dead (i. e. All compontents of its
+ * destination register have been overwritten by other instructions).
+ */
+static void get_readers_write_callback(
+ void *userdata,
+ struct rc_instruction * inst,
+ rc_register_file file,
+ unsigned int index,
+ unsigned int mask)
+{
+ struct get_readers_callback_data * d = userdata;
+
+ if (index == d->ReaderData->Writer->U.I.DstReg.Index
+ && file == d->ReaderData->Writer->U.I.DstReg.File) {
+ unsigned int shared_mask = mask
+ & d->ReaderData->Writer->U.I.DstReg.WriteMask;
+ if (d->ReaderData->InElse) {
+ if (shared_mask & d->AliveWriteMask) {
+ /* We set AbortOnRead here because the
+ * destination register of d->ReaderData->Writer
+ * is written to in both the IF and the
+ * ELSE block of this IF/ELSE statement.
+ * This means that readers of this
+ * destination register that follow this IF/ELSE
+ * statement use the value of different
+ * instructions depending on the control flow
+ * decisions made by the program. */
+ d->ReaderData->AbortOnRead = 1;
+ }
+ } else {
+ d->AliveWriteMask &= ~shared_mask;
+ }
+ }
+
+ d->WriteCB(d->ReaderData, inst, file, index, mask);
+}
+
+/**
+ * This function will create a list of readers via the rc_reader_data struct.
+ * This function will abort (set the flag data->Abort) and return if it
+ * encounters an instruction that reads from @param writer and also a different
+ * instruction. Here are some examples:
+ *
+ * writer = instruction 0;
+ * 0 MOV TEMP[0].xy, TEMP[1].xy
+ * 1 MOV TEMP[0].zw, TEMP[2].xy
+ * 2 MOV TEMP[3], TEMP[0]
+ * The Abort flag will be set on instruction 2, because it reads values written
+ * by instructions 0 and 1.
+ *
+ * writer = instruction 1;
+ * 0 IF TEMP[0].x
+ * 1 MOV TEMP[1], TEMP[2]
+ * 2 ELSE
+ * 3 MOV TEMP[1], TEMP[2]
+ * 4 ENDIF
+ * 5 MOV TEMP[3], TEMP[1]
+ * The Abort flag will be set on instruction 5, because it could read from the
+ * value written by either instruction 1 or 3, depending on the jump decision
+ * made at instruction 0.
+ *
+ * writer = instruction 0;
+ * 0 MOV TEMP[0], TEMP[1]
+ * 2 BGNLOOP
+ * 3 ADD TEMP[0], TEMP[0], none.1
+ * 4 ENDLOOP
+ * The Abort flag will be set on instruction 3, because in the first iteration
+ * of the loop it reads the value written by instruction 0 and in all other
+ * iterations it reads the value written by instruction 3.
+ *
+ * @param read_cb This function will be called for for every instruction that
+ * has been determined to be a reader of writer.
+ * @param write_cb This function will be called for every instruction after
+ * writer.
+ */
+void rc_get_readers_normal(
+ struct radeon_compiler * c,
+ struct rc_instruction * writer,
+ struct rc_reader_data * data,
+ rc_read_src_fn read_cb,
+ rc_read_write_mask_fn write_cb)
+{
+ struct rc_instruction * tmp;
+ struct get_readers_callback_data d;
+ unsigned int branch_depth = 0;
+
+ data->Writer = writer;
+ data->Abort = 0;
+ data->AbortOnRead = 0;
+ data->InElse = 0;
+ data->ReaderCount = 0;
+ data->ReadersReserved = 0;
+ data->Readers = NULL;
+
+ d.C = c;
+ d.AliveWriteMask = writer->U.I.DstReg.WriteMask;
+ d.ReaderData = data;
+ d.ReadCB = read_cb;
+ d.WriteCB = write_cb;
+
+ if (!writer->U.I.DstReg.WriteMask)
+ return;
+
+ for(tmp = writer->Next; tmp != &c->Program.Instructions;
+ tmp = tmp->Next){
+ rc_opcode opcode = get_flow_control_inst(tmp);
+ switch(opcode) {
+ case RC_OPCODE_BGNLOOP:
+ /* XXX We can do better when we see a BGNLOOP if we
+ * add a flag called AbortOnWrite to struct
+ * rc_reader_data and leave it set until the next
+ * ENDLOOP. */
+ case RC_OPCODE_ENDLOOP:
+ /* XXX We can do better when we see an ENDLOOP by
+ * searching backwards from writer and looking for
+ * readers of writer's destination index. If we find a
+ * reader before we get to the BGNLOOP, we must abort
+ * unless there is another writer between that reader
+ * and the BGNLOOP. */
+ data->Abort = 1;
+ return;
+ case RC_OPCODE_IF:
+ branch_depth++;
+ break;
+ case RC_OPCODE_ELSE:
+ if (branch_depth == 0)
+ data->InElse = 1;
+ break;
+ case RC_OPCODE_ENDIF:
+ if (branch_depth == 0) {
+ data->AbortOnRead = 1;
+ data->InElse = 0;
+ }
+ else {
+ branch_depth--;
+ }
+ break;
+ default:
+ break;
+ }
+
+ if (!data->InElse)
+ rc_for_all_reads_src(tmp, get_readers_normal_read_callback, &d);
+ rc_for_all_writes_mask(tmp, get_readers_write_callback, &d);
+
+ if (data->Abort)
+ return;
+
+ if (!d.AliveWriteMask)
+ return;
+ }
+}
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.h b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.h
index d10ae3c7b7e..7de6b98f763 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2009 Nicolai Haehnle.
+ * Copyright 2010 Tom Stellard <[email protected]>
*
* All Rights Reserved.
*
@@ -35,6 +36,7 @@ struct rc_instruction;
struct rc_swizzle_caps;
struct rc_src_register;
struct rc_pair_instruction_arg;
+struct rc_compiler;
/**
@@ -66,6 +68,32 @@ typedef void (*rc_remap_register_fn)(void * userdata, struct rc_instruction * in
void rc_remap_registers(struct rc_instruction * inst, rc_remap_register_fn cb, void * userdata);
/*@}*/
+struct rc_reader {
+ struct rc_instruction * Inst;
+ unsigned int WriteMask;
+ struct rc_src_register * Src;
+};
+
+struct rc_reader_data {
+ unsigned int Abort;
+ unsigned int AbortOnRead;
+ unsigned int InElse;
+ struct rc_instruction * Writer;
+
+ unsigned int ReaderCount;
+ unsigned int ReadersReserved;
+ struct rc_reader * Readers;
+
+ void * CbData;
+};
+
+void rc_get_readers_normal(
+ struct radeon_compiler * c,
+ struct rc_instruction * inst,
+ struct rc_reader_data * data,
+ /*XXX: These should be their own function types. */
+ rc_read_src_fn read_cb,
+ rc_read_write_mask_fn write_cb);
/**
* Compiler passes based on dataflow analysis.
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c b/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c
index 41769e347ec..5556927357b 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2009 Nicolai Haehnle.
+ * Copyright 2010 Tom Stellard <[email protected]>
*
* All Rights Reserved.
*
@@ -28,17 +29,15 @@
#include "radeon_dataflow.h"
#include "radeon_compiler.h"
+#include "radeon_compiler_util.h"
#include "radeon_swizzle.h"
-struct peephole_state {
- struct rc_instruction * Inst;
- /** Stores a bitmask of the components that are still "alive" (i.e.
- * they have not been written to since Inst was executed.)
- */
- unsigned int WriteMask;
+struct src_clobbered_data {
+ unsigned int NumSrcRegs;
+ unsigned int SrcMasks[3];
};
-typedef void (*rc_presub_replace_fn)(struct peephole_state *,
+typedef void (*rc_presub_replace_fn)(struct rc_instruction *,
struct rc_instruction *,
unsigned int);
@@ -65,101 +64,72 @@ static struct rc_src_register chain_srcregs(struct rc_src_register outer, struct
return combine;
}
-struct copy_propagate_state {
- struct radeon_compiler * C;
- struct rc_instruction * Mov;
- unsigned int Conflict:1;
-
- /** Whether Mov's source has been clobbered */
- unsigned int SourceClobbered:1;
-
- /** Which components of Mov's destination register are still from that Mov? */
- unsigned int MovMask:4;
-
- /** Which components of Mov's destination register are clearly *not* from that Mov */
- unsigned int DefinedMask:4;
-
- /** Which components of Mov's source register are sourced */
- unsigned int SourcedMask:4;
-
- /** Branch depth beyond Mov; negative value indicates we left the Mov's block */
- int BranchDepth;
-};
-
-/**
- * This is a callback function that is meant to be passed to
- * rc_for_all_reads_mask. This function will be called once for each source
- * register in inst.
- * @param inst The instruction that the source register belongs to.
- * @param file The register file of the source register.
- * @param index The index of the source register.
- * @param mask The components of the source register that are being read from.
- */
static void copy_propagate_scan_read(void * data, struct rc_instruction * inst,
- rc_register_file file, unsigned int index, unsigned int mask)
+ struct rc_src_register * src)
{
- struct copy_propagate_state * s = data;
+ rc_register_file file = src->File;
+ struct rc_reader_data * reader_data = data;
+ const struct rc_opcode_info * info = rc_get_opcode_info(inst->U.I.Opcode);
- /* XXX This could probably be handled better. */
- if (file == RC_FILE_ADDRESS) {
- s->Conflict = 1;
+ /* It is possible to do copy propigation in this situation,
+ * just not right now, see peephole_add_presub_inv() */
+ if (reader_data->Writer->U.I.PreSub.Opcode != RC_PRESUB_NONE &&
+ (info->NumSrcRegs > 2 || info->HasTexture)) {
+ reader_data->Abort = 1;
return;
}
- if (file != RC_FILE_TEMPORARY || index != s->Mov->U.I.DstReg.Index)
+ /* XXX This could probably be handled better. */
+ if (file == RC_FILE_ADDRESS) {
+ reader_data->Abort = 1;
return;
+ }
/* These instructions cannot read from the constants file.
* see radeonTransformTEX()
*/
- if(s->Mov->U.I.SrcReg[0].File != RC_FILE_TEMPORARY &&
- s->Mov->U.I.SrcReg[0].File != RC_FILE_INPUT &&
+ if(reader_data->Writer->U.I.SrcReg[0].File != RC_FILE_TEMPORARY &&
+ reader_data->Writer->U.I.SrcReg[0].File != RC_FILE_INPUT &&
(inst->U.I.Opcode == RC_OPCODE_TEX ||
inst->U.I.Opcode == RC_OPCODE_TXB ||
inst->U.I.Opcode == RC_OPCODE_TXP ||
inst->U.I.Opcode == RC_OPCODE_KIL)){
- s->Conflict = 1;
+ reader_data->Abort = 1;
return;
}
- if ((mask & s->MovMask) == mask) {
- if (s->SourceClobbered) {
- s->Conflict = 1;
- }
- } else if ((mask & s->DefinedMask) == mask) {
- /* read from something entirely written by other instruction: this is okay */
- } else {
- /* read from component combination that is not well-defined without
- * the MOV: cannot remove it */
- s->Conflict = 1;
- }
}
-static void copy_propagate_scan_write(void * data, struct rc_instruction * inst,
- rc_register_file file, unsigned int index, unsigned int mask)
+static void is_src_clobbered_scan_write(
+ void * data,
+ struct rc_instruction * inst,
+ rc_register_file file,
+ unsigned int index,
+ unsigned int mask)
{
- struct copy_propagate_state * s = data;
-
- if (s->BranchDepth < 0)
- return;
-
- if (file == s->Mov->U.I.DstReg.File && index == s->Mov->U.I.DstReg.Index) {
- s->MovMask &= ~mask;
- if (s->BranchDepth == 0)
- s->DefinedMask |= mask;
- else
- s->DefinedMask &= ~mask;
- }
- if (file == s->Mov->U.I.SrcReg[0].File && index == s->Mov->U.I.SrcReg[0].Index) {
- if (mask & s->SourcedMask)
- s->SourceClobbered = 1;
- } else if (s->Mov->U.I.SrcReg[0].RelAddr && file == RC_FILE_ADDRESS) {
- s->SourceClobbered = 1;
+ unsigned int i;
+ struct rc_reader_data * reader_data = data;
+ struct src_clobbered_data * d = reader_data->CbData;
+ for (i = 0; i < d->NumSrcRegs; i++) {
+ if (file == reader_data->Writer->U.I.SrcReg[i].File
+ && index == reader_data->Writer->U.I.SrcReg[i].Index
+ && (mask & d->SrcMasks[i])){
+
+ reader_data->AbortOnRead = 1;
+ return;
+ }
+ if (reader_data->Writer->U.I.SrcReg[i].RelAddr &&
+ file == RC_FILE_ADDRESS) {
+ reader_data->AbortOnRead = 1;
+ return;
+ }
}
}
static void copy_propagate(struct radeon_compiler * c, struct rc_instruction * inst_mov)
{
- struct copy_propagate_state s;
+ struct rc_reader_data reader_data;
+ struct src_clobbered_data sc_data;
+ unsigned int i;
if (inst_mov->U.I.DstReg.File != RC_FILE_TEMPORARY ||
inst_mov->U.I.DstReg.RelAddr ||
@@ -167,101 +137,26 @@ static void copy_propagate(struct radeon_compiler * c, struct rc_instruction * i
inst_mov->U.I.SaturateMode)
return;
- memset(&s, 0, sizeof(s));
- s.C = c;
- s.Mov = inst_mov;
- s.MovMask = inst_mov->U.I.DstReg.WriteMask;
- s.DefinedMask = RC_MASK_XYZW & ~s.MovMask;
+ sc_data.NumSrcRegs = 1;
+ sc_data.SrcMasks[0] = rc_swizzle_to_writemask(
+ inst_mov->U.I.SrcReg[0].Swizzle);
- for(unsigned int chan = 0; chan < 4; ++chan) {
- unsigned int swz = GET_SWZ(inst_mov->U.I.SrcReg[0].Swizzle, chan);
- s.SourcedMask |= (1 << swz) & RC_MASK_XYZW;
- }
-
- /* 1st pass: Check whether all subsequent readers can be changed */
- for(struct rc_instruction * inst = inst_mov->Next;
- inst != &c->Program.Instructions;
- inst = inst->Next) {
- const struct rc_opcode_info * info = rc_get_opcode_info(inst->U.I.Opcode);
- /* XXX In the future we might be able to make the optimizer
- * smart enough to handle loops. */
- if(inst->U.I.Opcode == RC_OPCODE_BGNLOOP
- || inst->U.I.Opcode == RC_OPCODE_ENDLOOP){
- return;
- }
-
- /* It is possible to do copy propigation in this situation,
- * just not right now, see peephole_add_presub_inv() */
- if (inst_mov->U.I.PreSub.Opcode != RC_PRESUB_NONE &&
- (info->NumSrcRegs > 2 || info->HasTexture)) {
- return;
- }
-
- rc_for_all_reads_mask(inst, copy_propagate_scan_read, &s);
- rc_for_all_writes_mask(inst, copy_propagate_scan_write, &s);
- if (s.Conflict)
- return;
+ reader_data.CbData = &sc_data;
- if (s.BranchDepth >= 0) {
- if (inst->U.I.Opcode == RC_OPCODE_IF) {
- s.BranchDepth++;
- } else if (inst->U.I.Opcode == RC_OPCODE_ENDIF
- || inst->U.I.Opcode == RC_OPCODE_ELSE) {
- s.BranchDepth--;
- if (s.BranchDepth < 0) {
- s.DefinedMask &= ~s.MovMask;
- s.MovMask = 0;
- }
- }
- }
- }
+ /* Get a list of all the readers of this MOV instruction. */
+ rc_get_readers_normal(c, inst_mov, &reader_data,
+ copy_propagate_scan_read, is_src_clobbered_scan_write);
- if (s.Conflict)
+ if (reader_data.Abort || reader_data.ReaderCount == 0)
return;
- /* 2nd pass: We can satisfy all readers, so switch them over all at once */
- s.MovMask = inst_mov->U.I.DstReg.WriteMask;
- s.BranchDepth = 0;
-
- for(struct rc_instruction * inst = inst_mov->Next;
- inst != &c->Program.Instructions;
- inst = inst->Next) {
- const struct rc_opcode_info * opcode = rc_get_opcode_info(inst->U.I.Opcode);
- for(unsigned int src = 0; src < opcode->NumSrcRegs; ++src) {
- if (inst->U.I.SrcReg[src].File == RC_FILE_TEMPORARY &&
- inst->U.I.SrcReg[src].Index == s.Mov->U.I.DstReg.Index) {
- unsigned int refmask = 0;
-
- for(unsigned int chan = 0; chan < 4; ++chan) {
- unsigned int swz = GET_SWZ(inst->U.I.SrcReg[src].Swizzle, chan);
- refmask |= (1 << swz) & RC_MASK_XYZW;
- }
-
- if ((refmask & s.MovMask) == refmask) {
- inst->U.I.SrcReg[src] = chain_srcregs(inst->U.I.SrcReg[src], s.Mov->U.I.SrcReg[0]);
- if (s.Mov->U.I.SrcReg[0].File == RC_FILE_PRESUB)
- inst->U.I.PreSub = s.Mov->U.I.PreSub;
- }
- }
- }
-
- if (opcode->HasDstReg) {
- if (inst->U.I.DstReg.File == RC_FILE_TEMPORARY &&
- inst->U.I.DstReg.Index == s.Mov->U.I.DstReg.Index) {
- s.MovMask &= ~inst->U.I.DstReg.WriteMask;
- }
- }
+ /* Propagate the MOV instruction. */
+ for (i = 0; i < reader_data.ReaderCount; i++) {
+ struct rc_instruction * inst = reader_data.Readers[i].Inst;
+ *reader_data.Readers[i].Src = chain_srcregs(*reader_data.Readers[i].Src, inst_mov->U.I.SrcReg[0]);
- if (s.BranchDepth >= 0) {
- if (inst->U.I.Opcode == RC_OPCODE_IF) {
- s.BranchDepth++;
- } else if (inst->U.I.Opcode == RC_OPCODE_ENDIF
- || inst->U.I.Opcode == RC_OPCODE_ELSE) {
- s.BranchDepth--;
- if (s.BranchDepth < 0)
- break; /* no more readers after this point */
- }
- }
+ if (inst_mov->U.I.SrcReg[0].File == RC_FILE_PRESUB)
+ inst->U.I.PreSub = inst_mov->U.I.PreSub;
}
/* Finally, remove the original MOV instruction */
@@ -408,6 +303,7 @@ static void constant_folding_add(struct rc_instruction * inst)
static void constant_folding(struct radeon_compiler * c, struct rc_instruction * inst)
{
const struct rc_opcode_info * opcode = rc_get_opcode_info(inst->U.I.Opcode);
+ unsigned int i;
/* Replace 0.0, 1.0 and 0.5 immediates by their explicit swizzles */
for(unsigned int src = 0; src < opcode->NumSrcRegs; ++src) {
@@ -480,6 +376,13 @@ static void constant_folding(struct radeon_compiler * c, struct rc_instruction *
constant_folding_mul(inst);
else if (inst->U.I.Opcode == RC_OPCODE_ADD)
constant_folding_add(inst);
+
+ /* In case this instruction has been converted, make sure all of the
+ * registers that are no longer used are empty. */
+ opcode = rc_get_opcode_info(inst->U.I.Opcode);
+ for(i = opcode->NumSrcRegs; i < 3; i++) {
+ memset(&inst->U.I.SrcReg[i], 0, sizeof(struct rc_src_register));
+ }
}
/**
@@ -489,18 +392,10 @@ static void constant_folding(struct radeon_compiler * c, struct rc_instruction *
static unsigned int src_reads_dst_mask(struct rc_src_register src,
struct rc_dst_register dst)
{
- unsigned int mask = 0;
- unsigned int i;
if (dst.File != src.File || dst.Index != src.Index) {
return 0;
}
-
- for(i = 0; i < 4; i++) {
- mask |= 1 << GET_SWZ(src.Swizzle, i);
- }
- mask &= RC_MASK_XYZW;
-
- return mask;
+ return rc_swizzle_to_writemask(src.Swizzle);
}
/* Return 1 if the source registers has a constant swizzle (e.g. 0, 0.5, 1.0)
@@ -517,129 +412,99 @@ static int src_has_const_swz(struct rc_src_register src) {
return 0;
}
-static void peephole_scan_write(void * data, struct rc_instruction * inst,
- rc_register_file file, unsigned int index, unsigned int mask)
+static void presub_scan_read(
+ void * data,
+ struct rc_instruction * inst,
+ struct rc_src_register * src)
{
- struct peephole_state * s = data;
- if(s->Inst->U.I.DstReg.File == file
- && s->Inst->U.I.DstReg.Index == index) {
- unsigned int common_mask = s->WriteMask & mask;
- s->WriteMask &= ~common_mask;
+ struct rc_reader_data * reader_data = data;
+ const struct rc_opcode_info * info =
+ rc_get_opcode_info(inst->U.I.Opcode);
+ /* XXX: There are some situations where instructions
+ * with more than 2 src registers can use the
+ * presubtract select, but to keep things simple we
+ * will disable presubtract on these instructions for
+ * now. */
+ if (info->NumSrcRegs > 2 || info->HasTexture) {
+ reader_data->Abort = 1;
+ return;
+ }
+
+ /* We can't use more than one presubtract value in an
+ * instruction, unless the two prsubtract operations
+ * are the same and read from the same registers.
+ * XXX For now we will limit instructions to only one presubtract
+ * value.*/
+ if (inst->U.I.PreSub.Opcode != RC_PRESUB_NONE) {
+ reader_data->Abort = 1;
+ return;
}
}
static int presub_helper(
struct radeon_compiler * c,
- struct peephole_state * s,
+ struct rc_instruction * inst_add,
rc_presubtract_op presub_opcode,
rc_presub_replace_fn presub_replace)
{
- struct rc_instruction * inst;
- unsigned int can_remove = 0;
- unsigned int cant_sub = 0;
-
- for(inst = s->Inst->Next; inst != &c->Program.Instructions;
- inst = inst->Next) {
- unsigned int i;
- unsigned char can_use_presub = 1;
- const struct rc_opcode_info * info =
- rc_get_opcode_info(inst->U.I.Opcode);
- /* XXX: There are some situations where instructions
- * with more than 2 src registers can use the
- * presubtract select, but to keep things simple we
- * will disable presubtract on these instructions for
- * now. */
- if (info->NumSrcRegs > 2 || info->HasTexture) {
- can_use_presub = 0;
- }
+ struct rc_reader_data reader_data;
+ struct src_clobbered_data sc_data;
+ unsigned int i;
- /* We can't use more than one presubtract value in an
- * instruction, unless the two prsubtract operations
- * are the same and read from the same registers. */
- if (inst->U.I.PreSub.Opcode != RC_PRESUB_NONE) {
- if (inst->U.I.PreSub.Opcode != presub_opcode
- || inst->U.I.PreSub.SrcReg[0].File !=
- s->Inst->U.I.SrcReg[1].File
- || inst->U.I.PreSub.SrcReg[0].Index !=
- s->Inst->U.I.SrcReg[1].Index) {
- can_use_presub = 0;
- }
- }
+ sc_data.NumSrcRegs = 2;
+ sc_data.SrcMasks[0] = rc_swizzle_to_writemask(
+ inst_add->U.I.SrcReg[0].Swizzle);
+ sc_data.SrcMasks[1] = rc_swizzle_to_writemask(
+ inst_add->U.I.SrcReg[1].Swizzle);
+ reader_data.CbData = &sc_data;
+ rc_get_readers_normal(c, inst_add, &reader_data, presub_scan_read,
+ is_src_clobbered_scan_write);
- /* Even if the instruction can't use a presubtract operation
- * we still need to check if the instruction reads from
- * s->Inst->U.I.DstReg, because if it does we must not
- * remove s->Inst. */
- for(i = 0; i < info->NumSrcRegs; i++) {
- unsigned int mask = src_reads_dst_mask(
- inst->U.I.SrcReg[i], s->Inst->U.I.DstReg);
- /* XXX We could be more aggressive here using
- * presubtract. It is okay if SrcReg[i] only reads
- * from some of the mask components. */
- if(s->Inst->U.I.DstReg.WriteMask != mask) {
- if (s->Inst->U.I.DstReg.WriteMask & mask) {
- can_remove = 0;
- break;
- } else {
- continue;
- }
- }
- if (cant_sub || !can_use_presub) {
- can_remove = 0;
- break;
- }
- presub_replace(s, inst, i);
- can_remove = 1;
- }
- if(!can_remove)
- break;
- rc_for_all_writes_mask(inst, peephole_scan_write, s);
- /* If all components of inst_add's destination register have
- * been written to by subsequent instructions, the original
- * value of the destination register is no longer valid and
- * we can't keep doing substitutions. */
- if (!s->WriteMask){
- break;
- }
- /* Make this instruction doesn't write to the presubtract source. */
- if (inst->U.I.DstReg.WriteMask &
- src_reads_dst_mask(s->Inst->U.I.SrcReg[1],
- inst->U.I.DstReg)
- || src_reads_dst_mask(s->Inst->U.I.SrcReg[0],
- inst->U.I.DstReg)
- || info->IsFlowControl) {
- cant_sub = 1;
+ if (reader_data.Abort || reader_data.ReaderCount == 0)
+ return 0;
+
+ for(i = 0; i < reader_data.ReaderCount; i++) {
+ unsigned int src_index;
+ struct rc_reader reader = reader_data.Readers[i];
+ const struct rc_opcode_info * info =
+ rc_get_opcode_info(reader.Inst->U.I.Opcode);
+
+ for (src_index = 0; src_index < info->NumSrcRegs; src_index++) {
+ if (&reader.Inst->U.I.SrcReg[src_index] == reader.Src)
+ presub_replace(inst_add, reader.Inst, src_index);
}
}
- return can_remove;
+ return 1;
}
-/* This function assumes that s->Inst->U.I.SrcReg[0] and
- * s->Inst->U.I.SrcReg[1] aren't both negative. */
-static void presub_replace_add(struct peephole_state *s,
- struct rc_instruction * inst,
- unsigned int src_index)
+/* This function assumes that inst_add->U.I.SrcReg[0] and
+ * inst_add->U.I.SrcReg[1] aren't both negative. */
+static void presub_replace_add(
+ struct rc_instruction * inst_add,
+ struct rc_instruction * inst_reader,
+ unsigned int src_index)
{
rc_presubtract_op presub_opcode;
- if (s->Inst->U.I.SrcReg[1].Negate || s->Inst->U.I.SrcReg[0].Negate)
+ if (inst_add->U.I.SrcReg[1].Negate || inst_add->U.I.SrcReg[0].Negate)
presub_opcode = RC_PRESUB_SUB;
else
presub_opcode = RC_PRESUB_ADD;
- if (s->Inst->U.I.SrcReg[1].Negate) {
- inst->U.I.PreSub.SrcReg[0] = s->Inst->U.I.SrcReg[1];
- inst->U.I.PreSub.SrcReg[1] = s->Inst->U.I.SrcReg[0];
+ if (inst_add->U.I.SrcReg[1].Negate) {
+ inst_reader->U.I.PreSub.SrcReg[0] = inst_add->U.I.SrcReg[1];
+ inst_reader->U.I.PreSub.SrcReg[1] = inst_add->U.I.SrcReg[0];
} else {
- inst->U.I.PreSub.SrcReg[0] = s->Inst->U.I.SrcReg[0];
- inst->U.I.PreSub.SrcReg[1] = s->Inst->U.I.SrcReg[1];
- }
- inst->U.I.PreSub.SrcReg[0].Negate = 0;
- inst->U.I.PreSub.SrcReg[1].Negate = 0;
- inst->U.I.PreSub.Opcode = presub_opcode;
- inst->U.I.SrcReg[src_index] = chain_srcregs(inst->U.I.SrcReg[src_index],
- inst->U.I.PreSub.SrcReg[0]);
- inst->U.I.SrcReg[src_index].File = RC_FILE_PRESUB;
- inst->U.I.SrcReg[src_index].Index = presub_opcode;
+ inst_reader->U.I.PreSub.SrcReg[0] = inst_add->U.I.SrcReg[0];
+ inst_reader->U.I.PreSub.SrcReg[1] = inst_add->U.I.SrcReg[1];
+ }
+ inst_reader->U.I.PreSub.SrcReg[0].Negate = 0;
+ inst_reader->U.I.PreSub.SrcReg[1].Negate = 0;
+ inst_reader->U.I.PreSub.Opcode = presub_opcode;
+ inst_reader->U.I.SrcReg[src_index] =
+ chain_srcregs(inst_reader->U.I.SrcReg[src_index],
+ inst_reader->U.I.PreSub.SrcReg[0]);
+ inst_reader->U.I.SrcReg[src_index].File = RC_FILE_PRESUB;
+ inst_reader->U.I.SrcReg[src_index].Index = presub_opcode;
}
static int is_presub_candidate(struct rc_instruction * inst)
@@ -664,7 +529,6 @@ static int peephole_add_presub_add(
struct rc_src_register * src0 = NULL;
struct rc_src_register * src1 = NULL;
unsigned int i;
- struct peephole_state s;
if (!is_presub_candidate(inst_add))
return 0;
@@ -690,30 +554,28 @@ static int peephole_add_presub_add(
if (!src1)
return 0;
- s.Inst = inst_add;
- s.WriteMask = inst_add->U.I.DstReg.WriteMask;
- if (presub_helper(c, &s, RC_PRESUB_ADD, presub_replace_add)) {
+ if (presub_helper(c, inst_add, RC_PRESUB_ADD, presub_replace_add)) {
rc_remove_instruction(inst_add);
return 1;
}
return 0;
}
-static void presub_replace_inv(struct peephole_state * s,
- struct rc_instruction * inst,
- unsigned int src_index)
+static void presub_replace_inv(
+ struct rc_instruction * inst_add,
+ struct rc_instruction * inst_reader,
+ unsigned int src_index)
{
- /* We must be careful not to modify s->Inst, since it
- * is possible it will remain part of the program.
- * XXX Maybe pass a struct instead of a pointer for s->Inst.*/
- inst->U.I.PreSub.SrcReg[0] = s->Inst->U.I.SrcReg[1];
- inst->U.I.PreSub.SrcReg[0].Negate = 0;
- inst->U.I.PreSub.Opcode = RC_PRESUB_INV;
- inst->U.I.SrcReg[src_index] = chain_srcregs(inst->U.I.SrcReg[src_index],
- inst->U.I.PreSub.SrcReg[0]);
-
- inst->U.I.SrcReg[src_index].File = RC_FILE_PRESUB;
- inst->U.I.SrcReg[src_index].Index = RC_PRESUB_INV;
+ /* We must be careful not to modify inst_add, since it
+ * is possible it will remain part of the program.*/
+ inst_reader->U.I.PreSub.SrcReg[0] = inst_add->U.I.SrcReg[1];
+ inst_reader->U.I.PreSub.SrcReg[0].Negate = 0;
+ inst_reader->U.I.PreSub.Opcode = RC_PRESUB_INV;
+ inst_reader->U.I.SrcReg[src_index] = chain_srcregs(inst_reader->U.I.SrcReg[src_index],
+ inst_reader->U.I.PreSub.SrcReg[0]);
+
+ inst_reader->U.I.SrcReg[src_index].File = RC_FILE_PRESUB;
+ inst_reader->U.I.SrcReg[src_index].Index = RC_PRESUB_INV;
}
/**
@@ -731,7 +593,6 @@ static int peephole_add_presub_inv(
struct rc_instruction * inst_add)
{
unsigned int i, swz, mask;
- struct peephole_state s;
if (!is_presub_candidate(inst_add))
return 0;
@@ -760,11 +621,7 @@ static int peephole_add_presub_inv(
return 0;
}
- /* Setup the peephole_state information. */
- s.Inst = inst_add;
- s.WriteMask = inst_add->U.I.DstReg.WriteMask;
-
- if (presub_helper(c, &s, RC_PRESUB_INV, presub_replace_inv)) {
+ if (presub_helper(c, inst_add, RC_PRESUB_INV, presub_replace_inv)) {
rc_remove_instruction(inst_add);
return 1;
}
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c b/src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c
index bfe3553460e..d4a38607d9e 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c
@@ -275,13 +275,112 @@ static void emit_all_tex(struct schedule_state * s, struct rc_instruction * befo
}
}
+/* This is a helper function for destructive_merge_instructions(). It helps
+ * merge presubtract sources from two instructions and makes sure the
+ * presubtract sources end up in the correct spot. This function assumes that
+ * dst_full is an rgb instruction, meaning that it has a vector instruction(rgb)
+ * but no scalar instruction (alpha).
+ * @return 0 if merging the presubtract sources fails.
+ * @retrun 1 if merging the presubtract sources succeeds.
+ */
+static int merge_presub_sources(
+ struct rc_pair_instruction * dst_full,
+ struct rc_pair_sub_instruction src,
+ unsigned int type)
+{
+ unsigned int srcp_src, srcp_regs, is_rgb, is_alpha;
+ struct rc_pair_sub_instruction * dst_sub;
+
+ assert(dst_full->Alpha.Opcode == RC_OPCODE_NOP);
+
+ switch(type) {
+ case RC_PAIR_SOURCE_RGB:
+ is_rgb = 1;
+ is_alpha = 0;
+ dst_sub = &dst_full->RGB;
+ break;
+ case RC_PAIR_SOURCE_ALPHA:
+ is_rgb = 0;
+ is_alpha = 1;
+ dst_sub = &dst_full->Alpha;
+ break;
+ default:
+ assert(0);
+ return 0;
+ }
+
+ const struct rc_opcode_info * info =
+ rc_get_opcode_info(dst_full->RGB.Opcode);
+ if (dst_sub->Src[RC_PAIR_PRESUB_SRC].Used)
+ return 0;
+
+ srcp_regs = rc_presubtract_src_reg_count(
+ src.Src[RC_PAIR_PRESUB_SRC].Index);
+ for(srcp_src = 0; srcp_src < srcp_regs; srcp_src++) {
+ unsigned int arg;
+ int free_source;
+ unsigned int one_way = 0;
+ struct rc_pair_instruction_source srcp = src.Src[srcp_src];
+ struct rc_pair_instruction_source temp;
+
+ free_source = rc_pair_alloc_source(dst_full, is_rgb, is_alpha,
+ srcp.File, srcp.Index);
+
+ /* If free_source < 0 then there are no free source
+ * slots. */
+ if (free_source < 0)
+ return 0;
+
+ temp = dst_sub->Src[srcp_src];
+ dst_sub->Src[srcp_src] = dst_sub->Src[free_source];
+
+ /* srcp needs src0 and src1 to be the same */
+ if (free_source < srcp_src) {
+ if (!temp.Used)
+ continue;
+ free_source = rc_pair_alloc_source(dst_full, is_rgb,
+ is_alpha, temp.File, temp.Index);
+ one_way = 1;
+ } else {
+ dst_sub->Src[free_source] = temp;
+ }
+
+ /* If free_source == srcp_src, then the presubtract
+ * source is already in the correct place. */
+ if (free_source == srcp_src)
+ continue;
+
+ /* Shuffle the sources, so we can put the
+ * presubtract source in the correct place. */
+ for(arg = 0; arg < info->NumSrcRegs; arg++) {
+ /*If this arg does not read from an rgb source,
+ * do nothing. */
+ if (!(rc_source_type_that_arg_reads(
+ dst_full->RGB.Arg[arg].Source,
+ dst_full->RGB.Arg[arg].Swizzle) & type)) {
+ continue;
+ }
+ if (dst_full->RGB.Arg[arg].Source == srcp_src)
+ dst_full->RGB.Arg[arg].Source = free_source;
+ /* We need to do this just in case register
+ * is one of the sources already, but in the
+ * wrong spot. */
+ else if(dst_full->RGB.Arg[arg].Source == free_source
+ && !one_way) {
+ dst_full->RGB.Arg[arg].Source = srcp_src;
+ }
+ }
+ }
+ return 1;
+}
+
+/* This function assumes that rgb.Alpha and alpha.RGB are unused */
static int destructive_merge_instructions(
struct rc_pair_instruction * rgb,
struct rc_pair_instruction * alpha)
{
const struct rc_opcode_info * opcode;
- const struct rc_opcode_info * rgb_info;
assert(rgb->Alpha.Opcode == RC_OPCODE_NOP);
assert(alpha->RGB.Opcode == RC_OPCODE_NOP);
@@ -291,129 +390,15 @@ static int destructive_merge_instructions(
* src1. */
/* Merge the rgb presubtract registers. */
- rgb_info = rc_get_opcode_info(rgb->RGB.Opcode);
if (alpha->RGB.Src[RC_PAIR_PRESUB_SRC].Used) {
- unsigned int srcp_src;
- unsigned int srcp_regs;
- if (rgb->RGB.Src[RC_PAIR_PRESUB_SRC].Used)
+ if (!merge_presub_sources(rgb, alpha->RGB, RC_PAIR_SOURCE_RGB)) {
return 0;
- srcp_regs = rc_presubtract_src_reg_count(
- alpha->RGB.Src[RC_PAIR_PRESUB_SRC].Index);
- for(srcp_src = 0; srcp_src < srcp_regs; srcp_src++) {
- unsigned int arg;
- int free_source;
- unsigned int one_way = 0;
- struct rc_pair_instruction_source srcp =
- alpha->RGB.Src[srcp_src];
- struct rc_pair_instruction_source temp;
- /* 2nd arg of 1 means this is an rgb source.
- * 3rd arg of 0 means this is not an alpha source. */
- free_source = rc_pair_alloc_source(rgb, 1, 0,
- srcp.File, srcp.Index);
- /* If free_source < 0 then there are no free source
- * slots. */
- if (free_source < 0)
- return 0;
-
- temp = rgb->RGB.Src[srcp_src];
- rgb->RGB.Src[srcp_src] = rgb->RGB.Src[free_source];
- /* srcp needs src0 and src1 to be the same */
- if (free_source < srcp_src) {
- if (!temp.Used)
- continue;
- free_source = rc_pair_alloc_source(rgb, 1, 0,
- srcp.File, srcp.Index);
- one_way = 1;
- } else {
- rgb->RGB.Src[free_source] = temp;
- }
- /* If free_source == srcp_src, then the presubtract
- * source is already in the correct place. */
- if (free_source == srcp_src)
- continue;
- /* Shuffle the sources, so we can put the
- * presubtract source in the correct place. */
- for (arg = 0; arg < rgb_info->NumSrcRegs; arg++) {
- /*If this arg does not read from an rgb source,
- * do nothing. */
- if (rc_source_type_that_arg_reads(
- rgb->RGB.Arg[arg].Source,
- rgb->RGB.Arg[arg].Swizzle, 3)
- != RC_PAIR_SOURCE_RGB) {
- continue;
- }
- if (rgb->RGB.Arg[arg].Source == srcp_src)
- rgb->RGB.Arg[arg].Source = free_source;
- /* We need to do this just in case register
- * is one of the sources already, but in the
- * wrong spot. */
- else if(rgb->RGB.Arg[arg].Source == free_source
- && !one_way) {
- rgb->RGB.Arg[arg].Source = srcp_src;
- }
- }
}
}
-
/* Merge the alpha presubtract registers */
if (alpha->Alpha.Src[RC_PAIR_PRESUB_SRC].Used) {
- unsigned int srcp_src;
- unsigned int srcp_regs;
- if(rgb->Alpha.Src[RC_PAIR_PRESUB_SRC].Used)
+ if(!merge_presub_sources(rgb, alpha->Alpha, RC_PAIR_SOURCE_ALPHA)){
return 0;
-
- srcp_regs = rc_presubtract_src_reg_count(
- alpha->Alpha.Src[RC_PAIR_PRESUB_SRC].Index);
- for(srcp_src = 0; srcp_src < srcp_regs; srcp_src++) {
- unsigned int arg;
- int free_source;
- unsigned int one_way = 0;
- struct rc_pair_instruction_source srcp =
- alpha->Alpha.Src[srcp_src];
- struct rc_pair_instruction_source temp;
- /* 2nd arg of 0 means this is not an rgb source.
- * 3rd arg of 1 means this is an alpha source. */
- free_source = rc_pair_alloc_source(rgb, 0, 1,
- srcp.File, srcp.Index);
- /* If free_source < 0 then there are no free source
- * slots. */
- if (free_source < 0)
- return 0;
-
- temp = rgb->Alpha.Src[srcp_src];
- rgb->Alpha.Src[srcp_src] = rgb->Alpha.Src[free_source];
- /* srcp needs src0 and src1 to be the same. */
- if (free_source < srcp_src) {
- if (!temp.Used)
- continue;
- free_source = rc_pair_alloc_source(rgb, 0, 1,
- temp.File, temp.Index);
- one_way = 1;
- } else {
- rgb->Alpha.Src[free_source] = temp;
- }
- /* If free_source == srcp_src, then the presubtract
- * source is already in the correct place. */
- if (free_source == srcp_src)
- continue;
- /* Shuffle the sources, so we can put the
- * presubtract source in the correct place. */
- for(arg = 0; arg < rgb_info->NumSrcRegs; arg++) {
- /*If this arg does not read from an alpha
- * source, do nothing. */
- if (rc_source_type_that_arg_reads(
- rgb->RGB.Arg[arg].Source,
- rgb->RGB.Arg[arg].Swizzle, 3)
- != RC_PAIR_SOURCE_ALPHA) {
- continue;
- }
- if (rgb->RGB.Arg[arg].Source == srcp_src)
- rgb->RGB.Arg[arg].Source = free_source;
- else if (rgb->RGB.Arg[arg].Source == free_source
- && !one_way) {
- rgb->RGB.Arg[arg].Source = srcp_src;
- }
- }
}
}
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c b/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c
index c31efdb0590..a21fe8d3df8 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c
@@ -206,34 +206,22 @@ void rc_pair_foreach_source_that_rgb_reads(
/*return 0 for rgb, 1 for alpha -1 for error. */
-rc_pair_source_type rc_source_type_that_arg_reads(
+unsigned int rc_source_type_that_arg_reads(
unsigned int source,
- unsigned int swizzle,
- unsigned int channels)
+ unsigned int swizzle)
{
unsigned int chan;
unsigned int swz = RC_SWIZZLE_UNUSED;
- int isRGB = 0;
- int isAlpha = 0;
- /* Find a swizzle that is either X,Y,Z,or W. We assume here
- * that if one channel swizzles X,Y, or Z, then none of the
- * other channels swizzle W, and vice-versa. */
- for(chan = 0; chan < channels; chan++) {
+ unsigned int ret = RC_PAIR_SOURCE_NONE;
+
+ for(chan = 0; chan < 3; chan++) {
swz = GET_SWZ(swizzle, chan);
if (swz == RC_SWIZZLE_W) {
- isAlpha = 1;
+ ret |= RC_PAIR_SOURCE_ALPHA;
} else if (swz == RC_SWIZZLE_X || swz == RC_SWIZZLE_Y
|| swz == RC_SWIZZLE_Z) {
- isRGB = 1;
+ ret |= RC_PAIR_SOURCE_RGB;
}
}
- assert(!isRGB || !isAlpha);
-
- if(!isRGB && !isAlpha)
- return RC_PAIR_SOURCE_NONE;
-
- if (isRGB)
- return RC_PAIR_SOURCE_RGB;
- /*isAlpha*/
- return RC_PAIR_SOURCE_ALPHA;
+ return ret;
}
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h b/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h
index 01cdb154240..54d44a2098b 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h
@@ -55,6 +55,10 @@ struct radeon_compiler;
*/
#define RC_PAIR_PRESUB_SRC 3
+#define RC_PAIR_SOURCE_NONE 0x0
+#define RC_PAIR_SOURCE_RGB 0x1
+#define RC_PAIR_SOURCE_ALPHA 0x2
+
struct rc_pair_instruction_source {
unsigned int Used:1;
unsigned int File:3;
@@ -93,12 +97,6 @@ struct rc_pair_instruction {
typedef void (*rc_pair_foreach_src_fn)
(void *, struct rc_pair_instruction_source *);
-typedef enum {
- RC_PAIR_SOURCE_NONE = 0,
- RC_PAIR_SOURCE_RGB,
- RC_PAIR_SOURCE_ALPHA
-} rc_pair_source_type;
-
/**
* General helper functions for dealing with the paired instruction format.
*/
@@ -117,10 +115,9 @@ void rc_pair_foreach_source_that_rgb_reads(
void * data,
rc_pair_foreach_src_fn cb);
-rc_pair_source_type rc_source_type_that_arg_reads(
+unsigned int rc_source_type_that_arg_reads(
unsigned int source,
- unsigned int swizzle,
- unsigned int channels);
+ unsigned int swizzle);
/*@}*/
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_remove_constants.c b/src/mesa/drivers/dri/r300/compiler/radeon_remove_constants.c
index d6c808ad815..5f67f536f61 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_remove_constants.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_remove_constants.c
@@ -145,6 +145,6 @@ void rc_remove_unused_constants(struct radeon_compiler *c, void *user)
free(const_used);
free(inv_remap_table);
- if (c->Debug)
+ if (c->Debug & RC_DBG_LOG)
rc_constants_print(&c->Program.Constants);
}
diff --git a/src/mesa/drivers/dri/r300/r300_blit.c b/src/mesa/drivers/dri/r300/r300_blit.c
index 74aef765e30..9fd8e8fde5f 100644
--- a/src/mesa/drivers/dri/r300/r300_blit.c
+++ b/src/mesa/drivers/dri/r300/r300_blit.c
@@ -569,7 +569,7 @@ unsigned r300_check_blit(gl_format dst_format)
* @param[in] height region height
* @param[in] flip_y set if y coords of the source image need to be flipped
*/
-unsigned r300_blit(GLcontext *ctx,
+unsigned r300_blit(struct gl_context *ctx,
struct radeon_bo *src_bo,
intptr_t src_offset,
gl_format src_mesaformat,
diff --git a/src/mesa/drivers/dri/r300/r300_blit.h b/src/mesa/drivers/dri/r300/r300_blit.h
index 39b157a57b8..286dbe18560 100644
--- a/src/mesa/drivers/dri/r300/r300_blit.h
+++ b/src/mesa/drivers/dri/r300/r300_blit.h
@@ -32,7 +32,7 @@ void r300_blit_init(struct r300_context *r300);
unsigned r300_check_blit(gl_format mesa_format);
-unsigned r300_blit(GLcontext *ctx,
+unsigned r300_blit(struct gl_context *ctx,
struct radeon_bo *src_bo,
intptr_t src_offset,
gl_format src_mesaformat,
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
index c40802aec6e..8a2f5ce0214 100644
--- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c
+++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
@@ -69,7 +69,7 @@ static unsigned packet0_count(r300ContextPtr r300, uint32_t *pkt)
#define vpu_count(ptr) (((drm_r300_cmd_header_t*)(ptr))->vpu.count)
#define r500fp_count(ptr) (((drm_r300_cmd_header_t*)(ptr))->r500fp.count)
-static int check_vpu(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_vpu(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
int cnt;
@@ -83,7 +83,7 @@ static int check_vpu(GLcontext *ctx, struct radeon_state_atom *atom)
return cnt ? (cnt * 4) + extra : 0;
}
-static int check_vpp(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_vpp(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
int cnt;
@@ -114,7 +114,7 @@ void r300_emit_vpu(struct r300_context *r300,
END_BATCH();
}
-static void emit_vpu_state(GLcontext *ctx, struct radeon_state_atom * atom)
+static void emit_vpu_state(struct gl_context *ctx, struct radeon_state_atom * atom)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
drm_r300_cmd_header_t cmd;
@@ -126,7 +126,7 @@ static void emit_vpu_state(GLcontext *ctx, struct radeon_state_atom * atom)
r300_emit_vpu(r300, &atom->cmd[1], vpu_count(atom->cmd) * 4, addr);
}
-static void emit_vpp_state(GLcontext *ctx, struct radeon_state_atom * atom)
+static void emit_vpp_state(struct gl_context *ctx, struct radeon_state_atom * atom)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
drm_r300_cmd_header_t cmd;
@@ -158,7 +158,7 @@ void r500_emit_fp(struct r300_context *r300,
END_BATCH();
}
-static void emit_r500fp_atom(GLcontext *ctx, struct radeon_state_atom * atom)
+static void emit_r500fp_atom(struct gl_context *ctx, struct radeon_state_atom * atom)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
drm_r300_cmd_header_t cmd;
@@ -179,7 +179,7 @@ static void emit_r500fp_atom(GLcontext *ctx, struct radeon_state_atom * atom)
r500_emit_fp(r300, &atom->cmd[1], count, addr, type, clamp);
}
-static int check_tex_offsets(GLcontext *ctx, struct radeon_state_atom * atom)
+static int check_tex_offsets(struct gl_context *ctx, struct radeon_state_atom * atom)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
int numtmus = packet0_count(r300, r300->hw.tex.offset.cmd);
@@ -200,7 +200,7 @@ static int check_tex_offsets(GLcontext *ctx, struct radeon_state_atom * atom)
return dw;
}
-static void emit_tex_offsets(GLcontext *ctx, struct radeon_state_atom * atom)
+static void emit_tex_offsets(struct gl_context *ctx, struct radeon_state_atom * atom)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
BATCH_LOCALS(&r300->radeon);
@@ -249,7 +249,7 @@ static void emit_tex_offsets(GLcontext *ctx, struct radeon_state_atom * atom)
}
}
-void r300_emit_scissor(GLcontext *ctx)
+void r300_emit_scissor(struct gl_context *ctx)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
BATCH_LOCALS(&r300->radeon);
@@ -287,7 +287,7 @@ void r300_emit_scissor(GLcontext *ctx)
OUT_BATCH((x2 << R300_SCISSORS_X_SHIFT)|(y2 << R300_SCISSORS_Y_SHIFT));
END_BATCH();
}
-static int check_cb_offset(GLcontext *ctx, struct radeon_state_atom * atom)
+static int check_cb_offset(struct gl_context *ctx, struct radeon_state_atom * atom)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
uint32_t dw = 6 + 3 + 16;
@@ -411,7 +411,7 @@ void r300_emit_cb_setup(struct r300_context *r300,
END_BATCH();
}
-static void emit_cb_offset_atom(GLcontext *ctx, struct radeon_state_atom * atom)
+static void emit_cb_offset_atom(struct gl_context *ctx, struct radeon_state_atom * atom)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
struct radeon_renderbuffer *rrb;
@@ -433,7 +433,7 @@ static void emit_cb_offset_atom(GLcontext *ctx, struct radeon_state_atom * atom)
}
}
-static int check_zb_offset(GLcontext *ctx, struct radeon_state_atom * atom)
+static int check_zb_offset(struct gl_context *ctx, struct radeon_state_atom * atom)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
uint32_t dw;
@@ -443,7 +443,7 @@ static int check_zb_offset(GLcontext *ctx, struct radeon_state_atom * atom)
return dw;
}
-static void emit_zb_offset(GLcontext *ctx, struct radeon_state_atom * atom)
+static void emit_zb_offset(struct gl_context *ctx, struct radeon_state_atom * atom)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
BATCH_LOCALS(&r300->radeon);
@@ -476,7 +476,7 @@ static void emit_zb_offset(GLcontext *ctx, struct radeon_state_atom * atom)
END_BATCH();
}
-static void emit_zstencil_format(GLcontext *ctx, struct radeon_state_atom * atom)
+static void emit_zstencil_format(struct gl_context *ctx, struct radeon_state_atom * atom)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
BATCH_LOCALS(&r300->radeon);
@@ -504,17 +504,17 @@ static void emit_zstencil_format(GLcontext *ctx, struct radeon_state_atom * atom
END_BATCH();
}
-static int check_never(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_never(struct gl_context *ctx, struct radeon_state_atom *atom)
{
return 0;
}
-static int check_always(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_always(struct gl_context *ctx, struct radeon_state_atom *atom)
{
return atom->cmd_size;
}
-static int check_variable(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_variable(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
int cnt;
@@ -525,7 +525,7 @@ static int check_variable(GLcontext *ctx, struct radeon_state_atom *atom)
return cnt ? cnt + 1 : 0;
}
-static int check_r500fp(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_r500fp(struct gl_context *ctx, struct radeon_state_atom *atom)
{
int cnt;
r300ContextPtr r300 = R300_CONTEXT(ctx);
@@ -537,7 +537,7 @@ static int check_r500fp(GLcontext *ctx, struct radeon_state_atom *atom)
return cnt ? (cnt * 6) + extra : 0;
}
-static int check_r500fp_const(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_r500fp_const(struct gl_context *ctx, struct radeon_state_atom *atom)
{
int cnt;
r300ContextPtr r300 = R300_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.h b/src/mesa/drivers/dri/r300/r300_cmdbuf.h
index 0e68da928ed..7e6b8c5de62 100644
--- a/src/mesa/drivers/dri/r300/r300_cmdbuf.h
+++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.h
@@ -45,7 +45,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define SCISSORS_BUFSZ (3)
void r300InitCmdBuf(r300ContextPtr r300);
-void r300_emit_scissor(GLcontext *ctx);
+void r300_emit_scissor(struct gl_context *ctx);
void r300_emit_vpu(struct r300_context *ctx,
uint32_t *data,
diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c
index ef495aabb91..9fbd36bfe63 100644
--- a/src/mesa/drivers/dri/r300/r300_context.c
+++ b/src/mesa/drivers/dri/r300/r300_context.c
@@ -219,7 +219,7 @@ static void r300_vtbl_pre_emit_atoms(radeonContextPtr radeon)
end_3d(radeon);
}
-static void r300_fallback(GLcontext *ctx, GLuint bit, GLboolean mode)
+static void r300_fallback(struct gl_context *ctx, GLuint bit, GLboolean mode)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
if (mode)
@@ -331,7 +331,7 @@ static void r300_init_vtbl(radeonContextPtr radeon)
}
}
-static void r300InitConstValues(GLcontext *ctx, radeonScreenPtr screen)
+static void r300InitConstValues(struct gl_context *ctx, radeonScreenPtr screen)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
@@ -439,7 +439,7 @@ static void r300ParseOptions(r300ContextPtr r300, radeonScreenPtr screen)
r300->options = options;
}
-static void r300InitGLExtensions(GLcontext *ctx)
+static void r300InitGLExtensions(struct gl_context *ctx)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
@@ -477,7 +477,7 @@ static void r300InitIoctlFuncs(struct dd_function_table *functions)
/* Create the device specific rendering context.
*/
GLboolean r300CreateContext(gl_api api,
- const __GLcontextModes * glVisual,
+ const struct gl_config * glVisual,
__DRIcontext * driContextPriv,
void *sharedContextPrivate)
{
@@ -485,7 +485,7 @@ GLboolean r300CreateContext(gl_api api,
radeonScreenPtr screen = (radeonScreenPtr) (sPriv->private);
struct dd_function_table functions;
r300ContextPtr r300;
- GLcontext *ctx;
+ struct gl_context *ctx;
assert(glVisual);
assert(driContextPriv);
diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h
index 99540e3354f..349a3d412f1 100644
--- a/src/mesa/drivers/dri/r300/r300_context.h
+++ b/src/mesa/drivers/dri/r300/r300_context.h
@@ -463,9 +463,9 @@ struct r300_swtcl_info {
};
struct r300_vtable {
- void (* SetupRSUnit)(GLcontext *ctx);
- void (* SetupFragmentShaderTextures)(GLcontext *ctx, int *tmu_mappings);
- void (* SetupPixelShader)(GLcontext *ctx);
+ void (* SetupRSUnit)(struct gl_context *ctx);
+ void (* SetupFragmentShaderTextures)(struct gl_context *ctx, int *tmu_mappings);
+ void (* SetupPixelShader)(struct gl_context *ctx);
};
struct r300_vertex_buffer {
@@ -544,7 +544,7 @@ struct r300_context {
extern void r300DestroyContext(__DRIcontext * driContextPriv);
extern GLboolean r300CreateContext(gl_api api,
- const __GLcontextModes * glVisual,
+ const struct gl_config * glVisual,
__DRIcontext * driContextPriv,
void *sharedContextPrivate);
@@ -552,7 +552,7 @@ extern void r300InitShaderFuncs(struct dd_function_table *functions);
extern void r300InitShaderFunctions(r300ContextPtr r300);
-extern void r300InitDraw(GLcontext *ctx);
+extern void r300InitDraw(struct gl_context *ctx);
#define r300PackFloat32 radeonPackFloat32
#define r300PackFloat24 radeonPackFloat24
diff --git a/src/mesa/drivers/dri/r300/r300_draw.c b/src/mesa/drivers/dri/r300/r300_draw.c
index 5ae9f49840b..81769e1ee5f 100644
--- a/src/mesa/drivers/dri/r300/r300_draw.c
+++ b/src/mesa/drivers/dri/r300/r300_draw.c
@@ -75,7 +75,7 @@ static int getTypeSize(GLenum type)
}
}
-static void r300FixupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer *mesa_ind_buf)
+static void r300FixupIndexBuffer(struct gl_context *ctx, const struct _mesa_index_buffer *mesa_ind_buf)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
GLvoid *src_ptr;
@@ -143,7 +143,7 @@ static void r300FixupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer
}
-static void r300SetupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer *mesa_ind_buf)
+static void r300SetupIndexBuffer(struct gl_context *ctx, const struct _mesa_index_buffer *mesa_ind_buf)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
@@ -219,7 +219,7 @@ static void r300SetupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer
* Convert attribute data type to float
* If the attribute uses named buffer object replace the bo with newly allocated bo
*/
-static void r300ConvertAttrib(GLcontext *ctx, int count, const struct gl_client_array *input, struct vertex_attribute *attr)
+static void r300ConvertAttrib(struct gl_context *ctx, int count, const struct gl_client_array *input, struct vertex_attribute *attr)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
const GLvoid *src_ptr;
@@ -290,7 +290,7 @@ static void r300ConvertAttrib(GLcontext *ctx, int count, const struct gl_client_
}
}
-static void r300AlignDataToDword(GLcontext *ctx, const struct gl_client_array *input, int count, struct vertex_attribute *attr)
+static void r300AlignDataToDword(struct gl_context *ctx, const struct gl_client_array *input, int count, struct vertex_attribute *attr)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
const int dst_stride = (input->StrideB + 3) & ~3;
@@ -328,7 +328,7 @@ static void r300AlignDataToDword(GLcontext *ctx, const struct gl_client_array *i
attr->stride = dst_stride;
}
-static void r300TranslateAttrib(GLcontext *ctx, GLuint attr, int count, const struct gl_client_array *input)
+static void r300TranslateAttrib(struct gl_context *ctx, GLuint attr, int count, const struct gl_client_array *input)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
struct r300_vertex_buffer *vbuf = &r300->vbuf;
@@ -467,7 +467,7 @@ static void r300TranslateAttrib(GLcontext *ctx, GLuint attr, int count, const st
++vbuf->num_attribs;
}
-static void r300SetVertexFormat(GLcontext *ctx, const struct gl_client_array *arrays[], int count)
+static void r300SetVertexFormat(struct gl_context *ctx, const struct gl_client_array *arrays[], int count)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
struct r300_vertex_buffer *vbuf = &r300->vbuf;
@@ -497,7 +497,7 @@ static void r300SetVertexFormat(GLcontext *ctx, const struct gl_client_array *ar
return;
}
-static void r300AllocDmaRegions(GLcontext *ctx, const struct gl_client_array *input[], int count)
+static void r300AllocDmaRegions(struct gl_context *ctx, const struct gl_client_array *input[], int count)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
struct r300_vertex_buffer *vbuf = &r300->vbuf;
@@ -578,7 +578,7 @@ static void r300AllocDmaRegions(GLcontext *ctx, const struct gl_client_array *in
}
-static void r300FreeData(GLcontext *ctx)
+static void r300FreeData(struct gl_context *ctx)
{
/* Need to zero tcl.aos[n].bo and tcl.elt_dma_bo
* to prevent double unref in radeonReleaseArrays
@@ -604,7 +604,7 @@ static void r300FreeData(GLcontext *ctx)
}
}
-static GLuint r300PredictTryDrawPrimsSize(GLcontext *ctx,
+static GLuint r300PredictTryDrawPrimsSize(struct gl_context *ctx,
GLuint nr_prims, const struct _mesa_prim *prim)
{
struct r300_context *r300 = R300_CONTEXT(ctx);
@@ -641,7 +641,7 @@ static GLuint r300PredictTryDrawPrimsSize(GLcontext *ctx,
return dwords;
}
-static GLboolean r300TryDrawPrims(GLcontext *ctx,
+static GLboolean r300TryDrawPrims(struct gl_context *ctx,
const struct gl_client_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
@@ -707,7 +707,7 @@ static GLboolean r300TryDrawPrims(GLcontext *ctx,
return GL_TRUE;
}
-static void r300DrawPrims(GLcontext *ctx,
+static void r300DrawPrims(struct gl_context *ctx,
const struct gl_client_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
@@ -741,7 +741,7 @@ static void r300DrawPrims(GLcontext *ctx,
_tnl_draw_prims(ctx, arrays, prim, nr_prims, ib, min_index, max_index);
}
-void r300InitDraw(GLcontext *ctx)
+void r300InitDraw(struct gl_context *ctx)
{
struct vbo_context *vbo = vbo_context(ctx);
diff --git a/src/mesa/drivers/dri/r300/r300_emit.c b/src/mesa/drivers/dri/r300/r300_emit.c
index a24d4316115..f392006cedc 100644
--- a/src/mesa/drivers/dri/r300/r300_emit.c
+++ b/src/mesa/drivers/dri/r300/r300_emit.c
@@ -48,14 +48,14 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r300_emit.h"
-GLuint r300VAPInputCntl0(GLcontext * ctx, GLuint InputsRead)
+GLuint r300VAPInputCntl0(struct gl_context * ctx, GLuint InputsRead)
{
/* No idea what this value means. I have seen other values written to
* this register... */
return 0x5555;
}
-GLuint r300VAPInputCntl1(GLcontext * ctx, GLuint InputsRead)
+GLuint r300VAPInputCntl1(struct gl_context * ctx, GLuint InputsRead)
{
GLuint i, vic_1 = 0;
@@ -76,7 +76,7 @@ GLuint r300VAPInputCntl1(GLcontext * ctx, GLuint InputsRead)
return vic_1;
}
-GLuint r300VAPOutputCntl0(GLcontext * ctx, GLuint vp_writes)
+GLuint r300VAPOutputCntl0(struct gl_context * ctx, GLuint vp_writes)
{
GLuint ret = 0;
@@ -100,7 +100,7 @@ GLuint r300VAPOutputCntl0(GLcontext * ctx, GLuint vp_writes)
return ret;
}
-GLuint r300VAPOutputCntl1(GLcontext * ctx, GLuint vp_writes)
+GLuint r300VAPOutputCntl1(struct gl_context * ctx, GLuint vp_writes)
{
GLuint i, ret = 0, first_free_texcoord = 0;
diff --git a/src/mesa/drivers/dri/r300/r300_emit.h b/src/mesa/drivers/dri/r300/r300_emit.h
index a456d8867c4..8911ab77283 100644
--- a/src/mesa/drivers/dri/r300/r300_emit.h
+++ b/src/mesa/drivers/dri/r300/r300_emit.h
@@ -220,9 +220,9 @@ extern int r300NumVerts(r300ContextPtr rmesa, int num_verts, int prim);
extern void r300EmitCacheFlush(r300ContextPtr rmesa);
-extern GLuint r300VAPInputCntl0(GLcontext * ctx, GLuint InputsRead);
-extern GLuint r300VAPInputCntl1(GLcontext * ctx, GLuint InputsRead);
-extern GLuint r300VAPOutputCntl0(GLcontext * ctx, GLuint vp_writes);
-extern GLuint r300VAPOutputCntl1(GLcontext * ctx, GLuint vp_writes);
+extern GLuint r300VAPInputCntl0(struct gl_context * ctx, GLuint InputsRead);
+extern GLuint r300VAPInputCntl1(struct gl_context * ctx, GLuint InputsRead);
+extern GLuint r300VAPOutputCntl0(struct gl_context * ctx, GLuint vp_writes);
+extern GLuint r300VAPOutputCntl1(struct gl_context * ctx, GLuint vp_writes);
#endif
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog_common.c b/src/mesa/drivers/dri/r300/r300_fragprog_common.c
index 4af91f114d5..4e457b51eba 100644
--- a/src/mesa/drivers/dri/r300/r300_fragprog_common.c
+++ b/src/mesa/drivers/dri/r300/r300_fragprog_common.c
@@ -208,7 +208,7 @@ static void allocate_hw_inputs(
}
-static void translate_fragment_program(GLcontext *ctx, struct r300_fragment_program_cont *cont, struct r300_fragment_program *fp)
+static void translate_fragment_program(struct gl_context *ctx, struct r300_fragment_program_cont *cont, struct r300_fragment_program *fp)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
struct r300_fragment_program_compiler compiler;
@@ -278,7 +278,7 @@ static void translate_fragment_program(GLcontext *ctx, struct r300_fragment_prog
rc_destroy(&compiler.Base);
}
-struct r300_fragment_program *r300SelectAndTranslateFragmentShader(GLcontext *ctx)
+struct r300_fragment_program *r300SelectAndTranslateFragmentShader(struct gl_context *ctx)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
struct r300_fragment_program_cont *fp_list;
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog_common.h b/src/mesa/drivers/dri/r300/r300_fragprog_common.h
index 3d64c08cee9..cfa5acf4330 100644
--- a/src/mesa/drivers/dri/r300/r300_fragprog_common.h
+++ b/src/mesa/drivers/dri/r300/r300_fragprog_common.h
@@ -32,6 +32,6 @@
#include "r300_context.h"
-struct r300_fragment_program *r300SelectAndTranslateFragmentShader(GLcontext *ctx);
+struct r300_fragment_program *r300SelectAndTranslateFragmentShader(struct gl_context *ctx);
#endif
diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c
index cf89ab7ec3d..821318e7a59 100644
--- a/src/mesa/drivers/dri/r300/r300_render.c
+++ b/src/mesa/drivers/dri/r300/r300_render.c
@@ -321,7 +321,7 @@ static void r300FireAOS(r300ContextPtr rmesa, int vertex_count, int type)
END_BATCH();
}
-void r300RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim)
+void r300RunRenderPrimitive(struct gl_context * ctx, int start, int end, int prim)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
BATCH_LOCALS(&rmesa->radeon);
@@ -444,7 +444,7 @@ static const char *getFallbackString(r300ContextPtr rmesa, uint32_t bit)
}
}
-void r300SwitchFallback(GLcontext *ctx, uint32_t bit, GLboolean mode)
+void r300SwitchFallback(struct gl_context *ctx, uint32_t bit, GLboolean mode)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
r300ContextPtr rmesa = R300_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/r300/r300_render.h b/src/mesa/drivers/dri/r300/r300_render.h
index 581e9fa0ccd..5a78592c751 100644
--- a/src/mesa/drivers/dri/r300/r300_render.h
+++ b/src/mesa/drivers/dri/r300/r300_render.h
@@ -63,8 +63,8 @@
extern const struct tnl_pipeline_stage _r300_render_stage;
-extern void r300SwitchFallback(GLcontext *ctx, uint32_t bit, GLboolean mode);
+extern void r300SwitchFallback(struct gl_context *ctx, uint32_t bit, GLboolean mode);
-extern void r300RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim);
+extern void r300RunRenderPrimitive(struct gl_context * ctx, int start, int end, int prim);
#endif
diff --git a/src/mesa/drivers/dri/r300/r300_shader.c b/src/mesa/drivers/dri/r300/r300_shader.c
index a9bddf05779..f2bbac5b857 100644
--- a/src/mesa/drivers/dri/r300/r300_shader.c
+++ b/src/mesa/drivers/dri/r300/r300_shader.c
@@ -32,7 +32,7 @@
#include "r300_context.h"
#include "r300_fragprog_common.h"
-static void freeFragProgCache(GLcontext *ctx, struct r300_fragment_program_cont *cache)
+static void freeFragProgCache(struct gl_context *ctx, struct r300_fragment_program_cont *cache)
{
struct r300_fragment_program *tmp, *fp = cache->progs;
@@ -44,7 +44,7 @@ static void freeFragProgCache(GLcontext *ctx, struct r300_fragment_program_cont
}
}
-static void freeVertProgCache(GLcontext *ctx, struct r300_vertex_program_cont *cache)
+static void freeVertProgCache(struct gl_context *ctx, struct r300_vertex_program_cont *cache)
{
struct r300_vertex_program *tmp, *vp = cache->progs;
@@ -57,7 +57,7 @@ static void freeVertProgCache(GLcontext *ctx, struct r300_vertex_program_cont *c
}
}
-static struct gl_program *r300NewProgram(GLcontext * ctx, GLenum target,
+static struct gl_program *r300NewProgram(struct gl_context * ctx, GLenum target,
GLuint id)
{
struct r300_vertex_program_cont *vp;
@@ -81,7 +81,7 @@ static struct gl_program *r300NewProgram(GLcontext * ctx, GLenum target,
return NULL;
}
-static void r300DeleteProgram(GLcontext * ctx, struct gl_program *prog)
+static void r300DeleteProgram(struct gl_context * ctx, struct gl_program *prog)
{
struct r300_vertex_program_cont *vp = (struct r300_vertex_program_cont *)prog;
struct r300_fragment_program_cont *fp = (struct r300_fragment_program_cont *)prog;
@@ -99,7 +99,7 @@ static void r300DeleteProgram(GLcontext * ctx, struct gl_program *prog)
}
static GLboolean
-r300ProgramStringNotify(GLcontext * ctx, GLenum target, struct gl_program *prog)
+r300ProgramStringNotify(struct gl_context * ctx, GLenum target, struct gl_program *prog)
{
struct r300_vertex_program_cont *vp = (struct r300_vertex_program_cont *)prog;
struct r300_fragment_program_cont *fp = (struct r300_fragment_program_cont *)prog;
@@ -123,7 +123,7 @@ r300ProgramStringNotify(GLcontext * ctx, GLenum target, struct gl_program *prog)
}
static GLboolean
-r300IsProgramNative(GLcontext * ctx, GLenum target, struct gl_program *prog)
+r300IsProgramNative(struct gl_context * ctx, GLenum target, struct gl_program *prog)
{
if (target == GL_FRAGMENT_PROGRAM_ARB) {
struct r300_fragment_program *fp = r300SelectAndTranslateFragmentShader(ctx);
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index 0113eecaa3a..ab8c1df5f74 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -62,7 +62,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r300_render.h"
#include "r300_vertprog.h"
-static void r300BlendColor(GLcontext * ctx, const GLfloat cf[4])
+static void r300BlendColor(struct gl_context * ctx, const GLfloat cf[4])
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
@@ -204,7 +204,7 @@ static void r300SetBlendCntl(r300ContextPtr r300, int func, int eqn,
}
}
-static void r300SetBlendState(GLcontext * ctx)
+static void r300SetBlendState(struct gl_context * ctx)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
int func = (R300_BLEND_GL_ONE << R300_SRC_BLEND_SHIFT) |
@@ -302,13 +302,13 @@ static void r300SetBlendState(GLcontext * ctx)
R300_ALPHA_BLEND_ENABLE), funcA, eqnA);
}
-static void r300BlendEquationSeparate(GLcontext * ctx,
+static void r300BlendEquationSeparate(struct gl_context * ctx,
GLenum modeRGB, GLenum modeA)
{
r300SetBlendState(ctx);
}
-static void r300BlendFuncSeparate(GLcontext * ctx,
+static void r300BlendFuncSeparate(struct gl_context * ctx,
GLenum sfactorRGB, GLenum dfactorRGB,
GLenum sfactorA, GLenum dfactorA)
{
@@ -331,7 +331,7 @@ static GLuint translate_logicop(GLenum logicop)
* Used internally to update the r300->hw hardware state to match the
* current OpenGL state.
*/
-static void r300SetLogicOpState(GLcontext *ctx)
+static void r300SetLogicOpState(struct gl_context *ctx)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
R300_STATECHANGE(r300, rop);
@@ -347,13 +347,13 @@ static void r300SetLogicOpState(GLcontext *ctx)
* Called by Mesa when an application program changes the LogicOp state
* via glLogicOp.
*/
-static void r300LogicOpcode(GLcontext *ctx, GLenum logicop)
+static void r300LogicOpcode(struct gl_context *ctx, GLenum logicop)
{
if (RGBA_LOGICOP_ENABLED(ctx))
r300SetLogicOpState(ctx);
}
-static void r300ClipPlane( GLcontext *ctx, GLenum plane, const GLfloat *eq )
+static void r300ClipPlane( struct gl_context *ctx, GLenum plane, const GLfloat *eq )
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
GLint p;
@@ -373,7 +373,7 @@ static void r300ClipPlane( GLcontext *ctx, GLenum plane, const GLfloat *eq )
rmesa->hw.vpucp[p].cmd[R300_VPUCP_W] = ip[3];
}
-static void r300SetClipPlaneState(GLcontext * ctx, GLenum cap, GLboolean state)
+static void r300SetClipPlaneState(struct gl_context * ctx, GLenum cap, GLboolean state)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
GLuint p;
@@ -395,7 +395,7 @@ static void r300SetClipPlaneState(GLcontext * ctx, GLenum cap, GLboolean state)
/**
* Update our tracked culling state based on Mesa's state.
*/
-static void r300UpdateCulling(GLcontext * ctx)
+static void r300UpdateCulling(struct gl_context * ctx)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
uint32_t val = 0;
@@ -435,7 +435,7 @@ static void r300UpdateCulling(GLcontext * ctx)
r300->hw.cul.cmd[R300_CUL_CULL] = val;
}
-static void r300SetPolygonOffsetState(GLcontext * ctx, GLboolean state)
+static void r300SetPolygonOffsetState(struct gl_context * ctx, GLboolean state)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
@@ -447,14 +447,14 @@ static void r300SetPolygonOffsetState(GLcontext * ctx, GLboolean state)
}
}
-static GLboolean current_fragment_program_writes_depth(GLcontext* ctx)
+static GLboolean current_fragment_program_writes_depth(struct gl_context* ctx)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
return ctx->FragmentProgram._Current && r300->selected_fp->code.writes_depth;
}
-static void r300SetEarlyZState(GLcontext * ctx)
+static void r300SetEarlyZState(struct gl_context * ctx)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
GLuint topZ = R300_ZTOP_ENABLE;
@@ -499,7 +499,7 @@ static void r300SetEarlyZState(GLcontext * ctx)
}
}
-static void r300SetAlphaState(GLcontext * ctx)
+static void r300SetAlphaState(struct gl_context * ctx)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
GLubyte refByte;
@@ -549,7 +549,7 @@ static void r300SetAlphaState(GLcontext * ctx)
r300->hw.at.cmd[R300_AT_UNKNOWN] = 0;
}
-static void r300AlphaFunc(GLcontext * ctx, GLenum func, GLfloat ref)
+static void r300AlphaFunc(struct gl_context * ctx, GLenum func, GLfloat ref)
{
(void)func;
(void)ref;
@@ -579,7 +579,7 @@ static int translate_func(int func)
return 0;
}
-static void r300SetDepthState(GLcontext * ctx)
+static void r300SetDepthState(struct gl_context * ctx)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
@@ -598,7 +598,7 @@ static void r300SetDepthState(GLcontext * ctx)
}
}
-static void r300CatchStencilFallback(GLcontext *ctx)
+static void r300CatchStencilFallback(struct gl_context *ctx)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
const unsigned back = ctx->Stencil._BackFace;
@@ -616,7 +616,7 @@ static void r300CatchStencilFallback(GLcontext *ctx)
}
}
-static void r300SetStencilState(GLcontext * ctx, GLboolean state)
+static void r300SetStencilState(struct gl_context * ctx, GLboolean state)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
GLboolean hw_stencil = GL_FALSE;
@@ -641,7 +641,7 @@ static void r300SetStencilState(GLcontext * ctx, GLboolean state)
}
}
-static void r300UpdatePolygonMode(GLcontext * ctx)
+static void r300UpdatePolygonMode(struct gl_context * ctx)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
uint32_t hw_mode = R300_GA_POLY_MODE_DISABLE;
@@ -704,7 +704,7 @@ static void r300UpdatePolygonMode(GLcontext * ctx)
*
* \note Mesa already filters redundant calls to this function.
*/
-static void r300CullFace(GLcontext * ctx, GLenum mode)
+static void r300CullFace(struct gl_context * ctx, GLenum mode)
{
(void)mode;
@@ -716,7 +716,7 @@ static void r300CullFace(GLcontext * ctx, GLenum mode)
*
* \note Mesa already filters redundant calls to this function.
*/
-static void r300FrontFace(GLcontext * ctx, GLenum mode)
+static void r300FrontFace(struct gl_context * ctx, GLenum mode)
{
(void)mode;
@@ -729,7 +729,7 @@ static void r300FrontFace(GLcontext * ctx, GLenum mode)
*
* \note Mesa already filters redundant calls to this function.
*/
-static void r300DepthFunc(GLcontext * ctx, GLenum func)
+static void r300DepthFunc(struct gl_context * ctx, GLenum func)
{
(void)func;
r300SetDepthState(ctx);
@@ -740,7 +740,7 @@ static void r300DepthFunc(GLcontext * ctx, GLenum func)
*
* \note Mesa already filters redundant calls to this function.
*/
-static void r300DepthMask(GLcontext * ctx, GLboolean mask)
+static void r300DepthMask(struct gl_context * ctx, GLboolean mask)
{
(void)mask;
r300SetDepthState(ctx);
@@ -749,7 +749,7 @@ static void r300DepthMask(GLcontext * ctx, GLboolean mask)
/**
* Handle glColorMask()
*/
-static void r300ColorMask(GLcontext * ctx,
+static void r300ColorMask(struct gl_context * ctx,
GLboolean r, GLboolean g, GLboolean b, GLboolean a)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
@@ -767,7 +767,7 @@ static void r300ColorMask(GLcontext * ctx,
/* =============================================================
* Point state
*/
-static void r300PointSize(GLcontext * ctx, GLfloat size)
+static void r300PointSize(struct gl_context * ctx, GLfloat size)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
@@ -784,7 +784,7 @@ static void r300PointSize(GLcontext * ctx, GLfloat size)
((int)(size * 6) << R300_POINTSIZE_Y_SHIFT);
}
-static void r300PointParameter(GLcontext * ctx, GLenum pname, const GLfloat * param)
+static void r300PointParameter(struct gl_context * ctx, GLenum pname, const GLfloat * param)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
@@ -814,7 +814,7 @@ static void r300PointParameter(GLcontext * ctx, GLenum pname, const GLfloat * pa
/* =============================================================
* Line state
*/
-static void r300LineWidth(GLcontext * ctx, GLfloat widthf)
+static void r300LineWidth(struct gl_context * ctx, GLfloat widthf)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
@@ -826,7 +826,7 @@ static void r300LineWidth(GLcontext * ctx, GLfloat widthf)
R300_LINE_CNT_HO | R300_LINE_CNT_VE | (int)(widthf * 6.0);
}
-static void r300PolygonMode(GLcontext * ctx, GLenum face, GLenum mode)
+static void r300PolygonMode(struct gl_context * ctx, GLenum face, GLenum mode)
{
(void)face;
(void)mode;
@@ -864,7 +864,7 @@ static int translate_stencil_op(int op)
return 0;
}
-static void r300ShadeModel(GLcontext * ctx, GLenum mode)
+static void r300ShadeModel(struct gl_context * ctx, GLenum mode)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
@@ -885,7 +885,7 @@ static void r300ShadeModel(GLcontext * ctx, GLenum mode)
rmesa->hw.shade2.cmd[3] = 0x00000000;
}
-static void r300StencilFuncSeparate(GLcontext * ctx, GLenum face,
+static void r300StencilFuncSeparate(struct gl_context * ctx, GLenum face,
GLenum func, GLint ref, GLuint mask)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
@@ -932,7 +932,7 @@ static void r300StencilFuncSeparate(GLcontext * ctx, GLenum face,
}
}
-static void r300StencilMaskSeparate(GLcontext * ctx, GLenum face, GLuint mask)
+static void r300StencilMaskSeparate(struct gl_context * ctx, GLenum face, GLuint mask)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
const unsigned back = ctx->Stencil._BackFace;
@@ -956,7 +956,7 @@ static void r300StencilMaskSeparate(GLcontext * ctx, GLenum face, GLuint mask)
}
}
-static void r300StencilOpSeparate(GLcontext * ctx, GLenum face,
+static void r300StencilOpSeparate(struct gl_context * ctx, GLenum face,
GLenum fail, GLenum zfail, GLenum zpass)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
@@ -992,7 +992,7 @@ static void r300StencilOpSeparate(GLcontext * ctx, GLenum face,
* Window position and viewport transformation
*/
-static void r300UpdateWindow(GLcontext * ctx)
+static void r300UpdateWindow(struct gl_context * ctx)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
__DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
@@ -1028,7 +1028,7 @@ static void r300UpdateWindow(GLcontext * ctx)
rmesa->hw.vpt.cmd[R300_VPT_ZOFFSET] = r300PackFloat32(tz);
}
-static void r300Viewport(GLcontext * ctx, GLint x, GLint y,
+static void r300Viewport(struct gl_context * ctx, GLint x, GLint y,
GLsizei width, GLsizei height)
{
/* Don't pipeline viewport changes, conflict with window offset
@@ -1040,12 +1040,12 @@ static void r300Viewport(GLcontext * ctx, GLint x, GLint y,
radeon_viewport(ctx, x, y, width, height);
}
-static void r300DepthRange(GLcontext * ctx, GLclampd nearval, GLclampd farval)
+static void r300DepthRange(struct gl_context * ctx, GLclampd nearval, GLclampd farval)
{
r300UpdateWindow(ctx);
}
-void r300UpdateViewportOffset(GLcontext * ctx)
+void r300UpdateViewportOffset(struct gl_context * ctx)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
__DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
@@ -1074,7 +1074,7 @@ void r300UpdateViewportOffset(GLcontext * ctx)
* Update R300's own internal state parameters.
* For now just STATE_R300_WINDOW_DIMENSION
*/
-static void r300UpdateStateParameters(GLcontext * ctx, GLuint new_state)
+static void r300UpdateStateParameters(struct gl_context * ctx, GLuint new_state)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
struct gl_program_parameter_list *paramList;
@@ -1096,7 +1096,7 @@ static void r300UpdateStateParameters(GLcontext * ctx, GLuint new_state)
/* =============================================================
* Polygon state
*/
-static void r300PolygonOffset(GLcontext * ctx, GLfloat factor, GLfloat units)
+static void r300PolygonOffset(struct gl_context * ctx, GLfloat factor, GLfloat units)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
GLfloat constant = units;
@@ -1193,7 +1193,7 @@ static unsigned long gen_fixed_filter(unsigned long f)
return f;
}
-static void r300SetupFragmentShaderTextures(GLcontext *ctx, int *tmu_mappings)
+static void r300SetupFragmentShaderTextures(struct gl_context *ctx, int *tmu_mappings)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
int i;
@@ -1235,7 +1235,7 @@ static void r300SetupFragmentShaderTextures(GLcontext *ctx, int *tmu_mappings)
R300_US_TEX_INST_0, code->tex.length);
}
-static void r500SetupFragmentShaderTextures(GLcontext *ctx, int *tmu_mappings)
+static void r500SetupFragmentShaderTextures(struct gl_context *ctx, int *tmu_mappings)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
int i;
@@ -1280,7 +1280,7 @@ static GLuint translate_lod_bias(GLfloat bias)
}
-static void r300SetupTextures(GLcontext * ctx)
+static void r300SetupTextures(struct gl_context * ctx)
{
int i, mtu;
struct radeon_tex_obj *t;
@@ -1427,7 +1427,7 @@ union r300_outputs_written {
((hw_tcl_on) ? (ow).vp_outputs & (1 << (vp_result)) : \
RENDERINPUTS_TEST( (ow.index_bitset), (tnl_attrib) ))
-static void r300SetupRSUnit(GLcontext * ctx)
+static void r300SetupRSUnit(struct gl_context * ctx)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
union r300_outputs_written OutputsWritten;
@@ -1521,7 +1521,7 @@ static void r300SetupRSUnit(GLcontext * ctx)
WARN_ONCE("Don't know how to satisfy InputsRead=0x%08x\n", InputsRead);
}
-static void r500SetupRSUnit(GLcontext * ctx)
+static void r500SetupRSUnit(struct gl_context * ctx)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
union r300_outputs_written OutputsWritten;
@@ -1681,7 +1681,7 @@ void r300VapCntl(r300ContextPtr rmesa, GLuint input_count,
*
* \note Mesa already filters redundant calls to this function.
*/
-static void r300Enable(GLcontext * ctx, GLenum cap, GLboolean state)
+static void r300Enable(struct gl_context * ctx, GLenum cap, GLboolean state)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
if (RADEON_DEBUG & RADEON_STATE)
@@ -1756,7 +1756,7 @@ static void r300Enable(GLcontext * ctx, GLenum cap, GLboolean state)
*/
static void r300ResetHwState(r300ContextPtr r300)
{
- GLcontext *ctx = r300->radeon.glCtx;
+ struct gl_context *ctx = r300->radeon.glCtx;
int has_tcl;
has_tcl = r300->options.hw_tcl_enabled;
@@ -1965,7 +1965,7 @@ static void r300ResetHwState(r300ContextPtr r300)
void r300UpdateShaders(r300ContextPtr rmesa)
{
- GLcontext *ctx = rmesa->radeon.glCtx;
+ struct gl_context *ctx = rmesa->radeon.glCtx;
/* should only happenen once, just after context is created */
/* TODO: shouldn't we fallback to sw here? */
@@ -1994,7 +1994,7 @@ void r300UpdateShaders(r300ContextPtr rmesa)
rmesa->radeon.NewGLState = 0;
}
-static const GLfloat *get_fragmentprogram_constant(GLcontext *ctx, GLuint index, GLfloat * buffer)
+static const GLfloat *get_fragmentprogram_constant(struct gl_context *ctx, GLuint index, GLfloat * buffer)
{
static const GLfloat dummy[4] = { 0, 0, 0, 0 };
r300ContextPtr rmesa = R300_CONTEXT(ctx);
@@ -2052,7 +2052,7 @@ static const GLfloat *get_fragmentprogram_constant(GLcontext *ctx, GLuint index,
}
-static void r300SetupPixelShader(GLcontext *ctx)
+static void r300SetupPixelShader(struct gl_context *ctx)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
struct r300_fragment_program *fp = rmesa->selected_fp;
@@ -2109,7 +2109,7 @@ static void r300SetupPixelShader(GLcontext *ctx)
if(_nc>_p->r500fp.count)_p->r500fp.count=_nc;\
} while(0)
-static void r500SetupPixelShader(GLcontext *ctx)
+static void r500SetupPixelShader(struct gl_context *ctx)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
struct r300_fragment_program *fp = rmesa->selected_fp;
@@ -2158,7 +2158,7 @@ static void r500SetupPixelShader(GLcontext *ctx)
bump_r500fp_const_count(rmesa->hw.r500fp_const.cmd, fp->code.constants.Count * 4);
}
-void r300SetupVAP(GLcontext *ctx, GLuint InputsRead, GLuint OutputsWritten)
+void r300SetupVAP(struct gl_context *ctx, GLuint InputsRead, GLuint OutputsWritten)
{
r300ContextPtr rmesa = R300_CONTEXT( ctx );
struct vertex_attribute *attrs = rmesa->vbuf.attribs;
@@ -2218,7 +2218,7 @@ void r300SetupVAP(GLcontext *ctx, GLuint InputsRead, GLuint OutputsWritten)
void r300UpdateShaderStates(r300ContextPtr rmesa)
{
- GLcontext *ctx;
+ struct gl_context *ctx;
ctx = rmesa->radeon.glCtx;
/* should only happenen once, just after context is created */
@@ -2241,7 +2241,7 @@ void r300UpdateShaderStates(r300ContextPtr rmesa)
#define EASY_US_OUT_FMT(comps, c0, c1, c2, c3) \
(R500_OUT_FMT_##comps | R500_C0_SEL_##c0 | R500_C1_SEL_##c1 | \
R500_C2_SEL_##c2 | R500_C3_SEL_##c3)
-static void r300SetupUsOutputFormat(GLcontext *ctx)
+static void r300SetupUsOutputFormat(struct gl_context *ctx)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
uint32_t hw_format;
@@ -2292,6 +2292,7 @@ static void r300SetupUsOutputFormat(GLcontext *ctx)
break;
default:
assert(!"Unsupported format");
+ hw_format = 0;
break;
}
@@ -2303,7 +2304,7 @@ static void r300SetupUsOutputFormat(GLcontext *ctx)
/**
* Called by Mesa after an internal state update.
*/
-static void r300InvalidateState(GLcontext * ctx, GLuint new_state)
+static void r300InvalidateState(struct gl_context * ctx, GLuint new_state)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
@@ -2346,7 +2347,7 @@ void r300InitState(r300ContextPtr r300)
r300ResetHwState(r300);
}
-static void r300RenderMode(GLcontext * ctx, GLenum mode)
+static void r300RenderMode(struct gl_context * ctx, GLenum mode)
{
r300SwitchFallback(ctx, R300_FALLBACK_RENDER_MODE, ctx->RenderMode != GL_RENDER);
}
diff --git a/src/mesa/drivers/dri/r300/r300_state.h b/src/mesa/drivers/dri/r300/r300_state.h
index e70f84f4e4b..e3b0da4cbde 100644
--- a/src/mesa/drivers/dri/r300/r300_state.h
+++ b/src/mesa/drivers/dri/r300/r300_state.h
@@ -50,13 +50,13 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
r300->radeon.hw.is_dirty = GL_TRUE; \
} while(0)
-void r300UpdateViewportOffset (GLcontext * ctx);
-void r300UpdateDrawBuffer (GLcontext * ctx);
+void r300UpdateViewportOffset (struct gl_context * ctx);
+void r300UpdateDrawBuffer (struct gl_context * ctx);
void r300UpdateShaders (r300ContextPtr rmesa);
void r300UpdateShaderStates (r300ContextPtr rmesa);
void r300InitState (r300ContextPtr r300);
void r300InitStateFuncs (radeonContextPtr radeon, struct dd_function_table *functions);
void r300VapCntl(r300ContextPtr rmesa, GLuint input_count, GLuint output_count, GLuint temp_count);
-void r300SetupVAP(GLcontext *ctx, GLuint InputsRead, GLuint OutputsWritten);
+void r300SetupVAP(struct gl_context *ctx, GLuint InputsRead, GLuint OutputsWritten);
#endif /* __R300_STATE_H__ */
diff --git a/src/mesa/drivers/dri/r300/r300_swtcl.c b/src/mesa/drivers/dri/r300/r300_swtcl.c
index 4dcc7cb022a..4a6762ff830 100644
--- a/src/mesa/drivers/dri/r300/r300_swtcl.c
+++ b/src/mesa/drivers/dri/r300/r300_swtcl.c
@@ -68,7 +68,7 @@ do { \
++num_attrs; \
} while (0)
-void r300ChooseSwtclVertexFormat(GLcontext *ctx, GLuint *_InputsRead, GLuint *_OutputsWritten)
+void r300ChooseSwtclVertexFormat(struct gl_context *ctx, GLuint *_InputsRead, GLuint *_OutputsWritten)
{
r300ContextPtr rmesa = R300_CONTEXT( ctx );
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -226,7 +226,7 @@ void r300ChooseSwtclVertexFormat(GLcontext *ctx, GLuint *_InputsRead, GLuint *_
RENDERINPUTS_COPY(rmesa->render_inputs_bitset, tnl->render_inputs_bitset);
}
-static void r300PrepareVertices(GLcontext *ctx)
+static void r300PrepareVertices(struct gl_context *ctx)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
GLuint InputsRead, OutputsWritten;
@@ -285,7 +285,7 @@ static GLuint reduced_prim[] = {
GL_TRIANGLES,
};
-static void r300RasterPrimitive( GLcontext *ctx, GLuint prim );
+static void r300RasterPrimitive( struct gl_context *ctx, GLuint prim );
/***********************************************************************
* Emit primitives as inline vertices *
@@ -497,7 +497,7 @@ static void init_rast_tab( void )
/**********************************************************************/
/* Choose render functions */
/**********************************************************************/
-static void r300ChooseRenderState( GLcontext *ctx )
+static void r300ChooseRenderState( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
r300ContextPtr rmesa = R300_CONTEXT(ctx);
@@ -528,7 +528,7 @@ static void r300ChooseRenderState( GLcontext *ctx )
}
}
-void r300RenderStart(GLcontext *ctx)
+void r300RenderStart(struct gl_context *ctx)
{
radeon_print(RADEON_SWRENDER, RADEON_VERBOSE, "%s\n", __func__);
r300ContextPtr rmesa = R300_CONTEXT( ctx );
@@ -550,11 +550,11 @@ void r300RenderStart(GLcontext *ctx)
}
}
-void r300RenderFinish(GLcontext *ctx)
+void r300RenderFinish(struct gl_context *ctx)
{
}
-static void r300RasterPrimitive( GLcontext *ctx, GLuint hwprim )
+static void r300RasterPrimitive( struct gl_context *ctx, GLuint hwprim )
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
radeon_print(RADEON_SWRENDER, RADEON_TRACE, "%s\n", __func__);
@@ -565,7 +565,7 @@ static void r300RasterPrimitive( GLcontext *ctx, GLuint hwprim )
}
}
-void r300RenderPrimitive(GLcontext *ctx, GLenum prim)
+void r300RenderPrimitive(struct gl_context *ctx, GLenum prim)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
@@ -578,13 +578,13 @@ void r300RenderPrimitive(GLcontext *ctx, GLenum prim)
r300RasterPrimitive( ctx, reduced_prim[prim] );
}
-void r300ResetLineStipple(GLcontext *ctx)
+void r300ResetLineStipple(struct gl_context *ctx)
{
if (RADEON_DEBUG & RADEON_VERTS)
fprintf(stderr, "%s\n", __func__);
}
-void r300InitSwtcl(GLcontext *ctx)
+void r300InitSwtcl(struct gl_context *ctx)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
r300ContextPtr rmesa = R300_CONTEXT(ctx);
@@ -620,7 +620,7 @@ void r300InitSwtcl(GLcontext *ctx)
_tnl_need_projected_coords( ctx, GL_FALSE );
}
-void r300DestroySwtcl(GLcontext *ctx)
+void r300DestroySwtcl(struct gl_context *ctx)
{
}
@@ -656,7 +656,7 @@ static void r300EmitVbufPrim(r300ContextPtr rmesa, GLuint primitive, GLuint vert
END_BATCH();
}
-void r300_swtcl_flush(GLcontext *ctx, uint32_t current_offset)
+void r300_swtcl_flush(struct gl_context *ctx, uint32_t current_offset)
{
radeon_print(RADEON_SWRENDER, RADEON_TRACE, "%s\n", __func__);
r300ContextPtr rmesa = R300_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/r300/r300_swtcl.h b/src/mesa/drivers/dri/r300/r300_swtcl.h
index c271d265468..51cfffc2af2 100644
--- a/src/mesa/drivers/dri/r300/r300_swtcl.h
+++ b/src/mesa/drivers/dri/r300/r300_swtcl.h
@@ -50,16 +50,16 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define SWTCL_OVM_TEX(n) ((n) + 6)
#define SWTCL_OVM_POINT_SIZE 15
-extern void r300ChooseSwtclVertexFormat(GLcontext *ctx, GLuint *InputsRead, GLuint *OutputsWritten);
+extern void r300ChooseSwtclVertexFormat(struct gl_context *ctx, GLuint *InputsRead, GLuint *OutputsWritten);
-extern void r300InitSwtcl( GLcontext *ctx );
-extern void r300DestroySwtcl( GLcontext *ctx );
+extern void r300InitSwtcl( struct gl_context *ctx );
+extern void r300DestroySwtcl( struct gl_context *ctx );
-extern void r300RenderStart(GLcontext *ctx);
-extern void r300RenderFinish(GLcontext *ctx);
-extern void r300RenderPrimitive(GLcontext *ctx, GLenum prim);
-extern void r300ResetLineStipple(GLcontext *ctx);
+extern void r300RenderStart(struct gl_context *ctx);
+extern void r300RenderFinish(struct gl_context *ctx);
+extern void r300RenderPrimitive(struct gl_context *ctx, GLenum prim);
+extern void r300ResetLineStipple(struct gl_context *ctx);
-extern void r300_swtcl_flush(GLcontext *ctx, uint32_t current_offset);
+extern void r300_swtcl_flush(struct gl_context *ctx, uint32_t current_offset);
#endif
diff --git a/src/mesa/drivers/dri/r300/r300_tex.c b/src/mesa/drivers/dri/r300/r300_tex.c
index baef206bc26..a6bda0e4990 100644
--- a/src/mesa/drivers/dri/r300/r300_tex.c
+++ b/src/mesa/drivers/dri/r300/r300_tex.c
@@ -185,7 +185,7 @@ static void r300SetTexBorderColor(radeonTexObjPtr t, const GLfloat color[4])
* next UpdateTextureState
*/
-static void r300TexParameter(GLcontext * ctx, GLenum target,
+static void r300TexParameter(struct gl_context * ctx, GLenum target,
struct gl_texture_object *texObj,
GLenum pname, const GLfloat * params)
{
@@ -243,7 +243,7 @@ static void r300TexParameter(GLcontext * ctx, GLenum target,
}
}
-static void r300DeleteTexture(GLcontext * ctx, struct gl_texture_object *texObj)
+static void r300DeleteTexture(struct gl_context * ctx, struct gl_texture_object *texObj)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
radeonTexObj* t = radeon_tex_obj(texObj);
@@ -284,7 +284,7 @@ static void r300DeleteTexture(GLcontext * ctx, struct gl_texture_object *texObj)
* allocate the default texture objects.
* Fixup MaxAnisotropy according to user preference.
*/
-static struct gl_texture_object *r300NewTextureObject(GLcontext * ctx,
+static struct gl_texture_object *r300NewTextureObject(struct gl_context * ctx,
GLuint name,
GLenum target)
{
diff --git a/src/mesa/drivers/dri/r300/r300_tex.h b/src/mesa/drivers/dri/r300/r300_tex.h
index aca44cd7669..c44a39cb460 100644
--- a/src/mesa/drivers/dri/r300/r300_tex.h
+++ b/src/mesa/drivers/dri/r300/r300_tex.h
@@ -47,7 +47,7 @@ extern void r300SetTexOffset(__DRIcontext *pDRICtx, GLint texname,
unsigned long long offset, GLint depth,
GLuint pitch);
-extern GLboolean r300ValidateBuffers(GLcontext * ctx);
+extern GLboolean r300ValidateBuffers(struct gl_context * ctx);
extern void r300InitTextureFuncs(radeonContextPtr radeon, struct dd_function_table *functions);
diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c
index 94588698265..0116c5d2fa4 100644
--- a/src/mesa/drivers/dri/r300/r300_texstate.c
+++ b/src/mesa/drivers/dri/r300/r300_texstate.c
@@ -301,7 +301,7 @@ static void setup_hardware_state(r300ContextPtr rmesa, radeonTexObj *t)
*
* Mostly this means populating the texture object's mipmap tree.
*/
-static GLboolean r300_validate_texture(GLcontext * ctx, struct gl_texture_object *texObj)
+static GLboolean r300_validate_texture(struct gl_context * ctx, struct gl_texture_object *texObj)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
radeonTexObj *t = radeon_tex_obj(texObj);
@@ -320,7 +320,7 @@ static GLboolean r300_validate_texture(GLcontext * ctx, struct gl_texture_object
/**
* Ensure all enabled and complete textures are uploaded along with any buffers being used.
*/
-GLboolean r300ValidateBuffers(GLcontext * ctx)
+GLboolean r300ValidateBuffers(struct gl_context * ctx)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
struct radeon_renderbuffer *rrb;
diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c
index a1601280911..1daa305e3c4 100644
--- a/src/mesa/drivers/dri/r300/r300_vertprog.c
+++ b/src/mesa/drivers/dri/r300/r300_vertprog.c
@@ -49,7 +49,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
* Write parameter array for the given vertex program into dst.
* Return the total number of components written.
*/
-static int r300VertexProgUpdateParams(GLcontext * ctx, struct r300_vertex_program *vp, float *dst)
+static int r300VertexProgUpdateParams(struct gl_context * ctx, struct r300_vertex_program *vp, float *dst)
{
int i;
@@ -227,7 +227,7 @@ static void initialize_NV_registers(struct radeon_compiler * compiler)
inst->U.I.SrcReg[0].Swizzle = RC_SWIZZLE_0000;
}
-static struct r300_vertex_program *build_program(GLcontext *ctx,
+static struct r300_vertex_program *build_program(struct gl_context *ctx,
struct r300_vertex_program_key *wanted_key,
const struct gl_vertex_program *mesa_vp)
{
@@ -307,7 +307,7 @@ static struct r300_vertex_program *build_program(GLcontext *ctx,
return vp;
}
-struct r300_vertex_program * r300SelectAndTranslateVertexShader(GLcontext *ctx)
+struct r300_vertex_program * r300SelectAndTranslateVertexShader(struct gl_context *ctx)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
struct r300_vertex_program_key wanted_key = { 0 };
@@ -386,7 +386,7 @@ static void r300EmitVertexProgram(r300ContextPtr r300, int dest, struct r300_ver
void r300SetupVertexProgram(r300ContextPtr rmesa)
{
- GLcontext *ctx = rmesa->radeon.glCtx;
+ struct gl_context *ctx = rmesa->radeon.glCtx;
struct r300_vertex_program *prog = rmesa->selected_vp;
int inst_count = 0;
int param_count = 0;
diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.h b/src/mesa/drivers/dri/r300/r300_vertprog.h
index ccec896be40..ce24dcb3535 100644
--- a/src/mesa/drivers/dri/r300/r300_vertprog.h
+++ b/src/mesa/drivers/dri/r300/r300_vertprog.h
@@ -6,6 +6,6 @@
void r300SetupVertexProgram(r300ContextPtr rmesa);
-struct r300_vertex_program * r300SelectAndTranslateVertexShader(GLcontext *ctx);
+struct r300_vertex_program * r300SelectAndTranslateVertexShader(struct gl_context *ctx);
#endif
diff --git a/src/mesa/drivers/dri/r300/radeon_context.h b/src/mesa/drivers/dri/r300/radeon_context.h
index e793656dbea..52b7fb91e65 100644
--- a/src/mesa/drivers/dri/r300/radeon_context.h
+++ b/src/mesa/drivers/dri/r300/radeon_context.h
@@ -52,7 +52,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define FALLBACK( radeon, bit, mode ) fprintf(stderr, "%s:%s\n", __LINE__, __FILE__);
/* TCL fallbacks */
-extern void radeonTclFallback(GLcontext * ctx, GLuint bit, GLboolean mode);
+extern void radeonTclFallback(struct gl_context * ctx, GLuint bit, GLboolean mode);
#define TCL_FALLBACK( ctx, bit, mode ) ;
diff --git a/src/mesa/drivers/dri/r600/evergreen_blit.c b/src/mesa/drivers/dri/r600/evergreen_blit.c
index 1ed8a08b78c..fc9fa9d22c7 100644
--- a/src/mesa/drivers/dri/r600/evergreen_blit.c
+++ b/src/mesa/drivers/dri/r600/evergreen_blit.c
@@ -423,7 +423,7 @@ eg_set_render_target(context_t *context, struct radeon_bo *bo, gl_format mesa_fo
}
-static inline void eg_load_shaders(GLcontext * ctx)
+static inline void eg_load_shaders(struct gl_context * ctx)
{
radeonContextPtr radeonctx = RADEON_CONTEXT(ctx);
@@ -1688,7 +1688,7 @@ static GLboolean eg_validate_buffers(context_t *rmesa,
return GL_TRUE;
}
-unsigned evergreen_blit(GLcontext *ctx,
+unsigned evergreen_blit(struct gl_context *ctx,
struct radeon_bo *src_bo,
intptr_t src_offset,
gl_format src_mesaformat,
diff --git a/src/mesa/drivers/dri/r600/evergreen_blit.h b/src/mesa/drivers/dri/r600/evergreen_blit.h
index 68d072ecb00..783f83f0899 100644
--- a/src/mesa/drivers/dri/r600/evergreen_blit.h
+++ b/src/mesa/drivers/dri/r600/evergreen_blit.h
@@ -30,7 +30,7 @@
unsigned evergreen_check_blit(gl_format mesa_format);
-unsigned evergreen_blit(GLcontext *ctx,
+unsigned evergreen_blit(struct gl_context *ctx,
struct radeon_bo *src_bo,
intptr_t src_offset,
gl_format src_mesaformat,
diff --git a/src/mesa/drivers/dri/r600/evergreen_chip.c b/src/mesa/drivers/dri/r600/evergreen_chip.c
index 770e7f91c6a..2c9e4e2b844 100644
--- a/src/mesa/drivers/dri/r600/evergreen_chip.c
+++ b/src/mesa/drivers/dri/r600/evergreen_chip.c
@@ -60,7 +60,7 @@ do { \
insert_at_tail(&context->radeon.hw.atomlist, &context->evergreen_atoms.ATOM); \
} while (0)
-static int check_queryobj(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_queryobj(struct gl_context *ctx, struct radeon_state_atom *atom)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
struct radeon_query_object *query = radeon->query.current;
@@ -74,7 +74,7 @@ static int check_queryobj(GLcontext *ctx, struct radeon_state_atom *atom)
return count;
}
-static void evergreenSendQueryBegin(GLcontext *ctx, struct radeon_state_atom *atom)
+static void evergreenSendQueryBegin(struct gl_context *ctx, struct radeon_state_atom *atom)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
struct radeon_query_object *query = radeon->query.current;
@@ -114,12 +114,12 @@ static void evergreen_init_query_stateobj(radeonContextPtr radeon, int SZ)
}
-static int check_always(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_always(struct gl_context *ctx, struct radeon_state_atom *atom)
{
return atom->cmd_size;
}
-static void evergreenSendTexState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void evergreenSendTexState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -221,7 +221,7 @@ static void evergreenSendTexState(GLcontext *ctx, struct radeon_state_atom *atom
}
}
-static int check_evergreen_tx(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_evergreen_tx(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
unsigned int i, count = 0;
@@ -238,7 +238,7 @@ static int check_evergreen_tx(GLcontext *ctx, struct radeon_state_atom *atom)
return count * 37 + 6;
}
-static void evergreenSendSQConfig(GLcontext *ctx, struct radeon_state_atom *atom)
+static void evergreenSendSQConfig(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -269,7 +269,7 @@ static void evergreenSendSQConfig(GLcontext *ctx, struct radeon_state_atom *atom
}
extern int evergreen_getTypeSize(GLenum type);
-static void evergreenSetupVTXConstants(GLcontext * ctx,
+static void evergreenSetupVTXConstants(struct gl_context * ctx,
void * pAos,
StreamDesc * pStreamDesc)
{
@@ -357,7 +357,7 @@ static void evergreenSetupVTXConstants(GLcontext * ctx,
COMMIT_BATCH();
}
-static int check_evergreen_vtx(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_evergreen_vtx(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
int count = context->radeon.tcl.aos_count * 12;
@@ -369,7 +369,7 @@ static int check_evergreen_vtx(GLcontext *ctx, struct radeon_state_atom *atom)
return count;
}
-static void evergreenSendVTX(GLcontext *ctx, struct radeon_state_atom *atom)
+static void evergreenSendVTX(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
struct evergreen_vertex_program *vp = (struct evergreen_vertex_program *)(context->selected_vp);
@@ -390,7 +390,7 @@ static void evergreenSendVTX(GLcontext *ctx, struct radeon_state_atom *atom)
}
}
}
-static void evergreenSendPA(GLcontext *ctx, struct radeon_state_atom *atom)
+static void evergreenSendPA(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -511,7 +511,7 @@ static void evergreenSendPA(GLcontext *ctx, struct radeon_state_atom *atom)
COMMIT_BATCH();
}
-static void evergreenSendTP(GLcontext *ctx, struct radeon_state_atom *atom)
+static void evergreenSendTP(struct gl_context *ctx, struct radeon_state_atom *atom)
{
/*
context_t *context = EVERGREEN_CONTEXT(ctx);
@@ -523,7 +523,7 @@ static void evergreenSendTP(GLcontext *ctx, struct radeon_state_atom *atom)
*/
}
-static void evergreenSendPSresource(GLcontext *ctx)
+static void evergreenSendPSresource(struct gl_context *ctx)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -578,7 +578,7 @@ static void evergreenSendPSresource(GLcontext *ctx)
COMMIT_BATCH();
}
-static void evergreenSendVSresource(GLcontext *ctx, struct radeon_state_atom *atom)
+static void evergreenSendVSresource(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -634,7 +634,7 @@ static void evergreenSendVSresource(GLcontext *ctx, struct radeon_state_atom *at
COMMIT_BATCH();
}
-static void evergreenSendSQ(GLcontext *ctx, struct radeon_state_atom *atom)
+static void evergreenSendSQ(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -749,7 +749,7 @@ static void evergreenSendSQ(GLcontext *ctx, struct radeon_state_atom *atom)
COMMIT_BATCH();
}
-static void evergreenSendSPI(GLcontext *ctx, struct radeon_state_atom *atom)
+static void evergreenSendSPI(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -821,7 +821,7 @@ static void evergreenSendSPI(GLcontext *ctx, struct radeon_state_atom *atom)
COMMIT_BATCH();
}
-static void evergreenSendSX(GLcontext *ctx, struct radeon_state_atom *atom)
+static void evergreenSendSX(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -897,7 +897,7 @@ static void evergreenSetDepthTarget(context_t *context)
}
-static void evergreenSendDB(GLcontext *ctx, struct radeon_state_atom *atom)
+static void evergreenSendDB(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -1366,7 +1366,7 @@ static void evergreenSetRenderTarget(context_t *context, int id)
evergreen->render_target[id].enabled = GL_TRUE;
}
-static void evergreenSendCB(GLcontext *ctx, struct radeon_state_atom *atom)
+static void evergreenSendCB(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -1451,7 +1451,7 @@ static void evergreenSendCB(GLcontext *ctx, struct radeon_state_atom *atom)
COMMIT_BATCH();
}
-static void evergreenSendVGT(GLcontext *ctx, struct radeon_state_atom *atom)
+static void evergreenSendVGT(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
diff --git a/src/mesa/drivers/dri/r600/evergreen_context.c b/src/mesa/drivers/dri/r600/evergreen_context.c
index fff7c200310..911775f590f 100644
--- a/src/mesa/drivers/dri/r600/evergreen_context.c
+++ b/src/mesa/drivers/dri/r600/evergreen_context.c
@@ -61,7 +61,7 @@ static void evergreen_vtbl_pre_emit_atoms(radeonContextPtr radeon)
r700Start3D((context_t *)radeon);
}
-static void evergreen_fallback(GLcontext *ctx, GLuint bit, GLboolean mode)
+static void evergreen_fallback(struct gl_context *ctx, GLuint bit, GLboolean mode)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
if (mode)
diff --git a/src/mesa/drivers/dri/r600/evergreen_fragprog.c b/src/mesa/drivers/dri/r600/evergreen_fragprog.c
index 0e7edf4fbe4..cfb923efdd5 100644
--- a/src/mesa/drivers/dri/r600/evergreen_fragprog.c
+++ b/src/mesa/drivers/dri/r600/evergreen_fragprog.c
@@ -44,7 +44,7 @@
#include "evergreen_vertprog.h"
#include "evergreen_fragprog.h"
-void evergreen_insert_wpos_code(GLcontext *ctx, struct gl_fragment_program *fprog)
+void evergreen_insert_wpos_code(struct gl_context *ctx, struct gl_fragment_program *fprog)
{
static const gl_state_index winstate[STATE_LENGTH]
= { STATE_INTERNAL, STATE_FB_SIZE, 0, 0, 0};
@@ -95,7 +95,7 @@ void evergreen_insert_wpos_code(GLcontext *ctx, struct gl_fragment_program *fpro
//TODO : Validate FP input with VP output.
void evergreen_Map_Fragment_Program(r700_AssemblerBase *pAsm,
struct gl_fragment_program *mesa_fp,
- GLcontext *ctx)
+ struct gl_context *ctx)
{
unsigned int unBit;
unsigned int i;
@@ -354,7 +354,7 @@ GLboolean evergreen_Find_Instruction_Dependencies_fp(struct evergreen_fragment_p
GLboolean evergreenTranslateFragmentShader(struct evergreen_fragment_program *fp,
struct gl_fragment_program *mesa_fp,
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLuint number_of_colors_exported;
GLboolean z_enabled = GL_FALSE;
@@ -457,7 +457,7 @@ GLboolean evergreenTranslateFragmentShader(struct evergreen_fragment_program *fp
return GL_TRUE;
}
-void evergreenSelectFragmentShader(GLcontext *ctx)
+void evergreenSelectFragmentShader(struct gl_context *ctx)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
struct evergreen_fragment_program *fp = (struct evergreen_fragment_program *)
@@ -471,7 +471,7 @@ void evergreenSelectFragmentShader(GLcontext *ctx)
evergreenTranslateFragmentShader(fp, &(fp->mesa_program), ctx);
}
-void * evergreenGetActiveFpShaderBo(GLcontext * ctx)
+void * evergreenGetActiveFpShaderBo(struct gl_context * ctx)
{
struct evergreen_fragment_program *fp = (struct evergreen_fragment_program *)
(ctx->FragmentProgram._Current);
@@ -479,7 +479,7 @@ void * evergreenGetActiveFpShaderBo(GLcontext * ctx)
return fp->shaderbo;
}
-void * evergreenGetActiveFpShaderConstBo(GLcontext * ctx)
+void * evergreenGetActiveFpShaderConstBo(struct gl_context * ctx)
{
struct evergreen_fragment_program *fp = (struct evergreen_fragment_program *)
(ctx->FragmentProgram._Current);
@@ -487,7 +487,7 @@ void * evergreenGetActiveFpShaderConstBo(GLcontext * ctx)
return fp->constbo0;
}
-GLboolean evergreenSetupFragmentProgram(GLcontext * ctx)
+GLboolean evergreenSetupFragmentProgram(struct gl_context * ctx)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -737,7 +737,7 @@ GLboolean evergreenSetupFragmentProgram(GLcontext * ctx)
return GL_TRUE;
}
-GLboolean evergreenSetupFPconstants(GLcontext * ctx)
+GLboolean evergreenSetupFPconstants(struct gl_context * ctx)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
diff --git a/src/mesa/drivers/dri/r600/evergreen_fragprog.h b/src/mesa/drivers/dri/r600/evergreen_fragprog.h
index 0e200bf3833..97f06a75fc0 100644
--- a/src/mesa/drivers/dri/r600/evergreen_fragprog.h
+++ b/src/mesa/drivers/dri/r600/evergreen_fragprog.h
@@ -51,27 +51,27 @@ struct evergreen_fragment_program
};
/* Internal */
-void evergreen_insert_wpos_code(GLcontext *ctx, struct gl_fragment_program *fprog);
+void evergreen_insert_wpos_code(struct gl_context *ctx, struct gl_fragment_program *fprog);
void evergreen_Map_Fragment_Program(r700_AssemblerBase *pAsm,
struct gl_fragment_program *mesa_fp,
- GLcontext *ctx);
+ struct gl_context *ctx);
GLboolean evergreen_Find_Instruction_Dependencies_fp(struct evergreen_fragment_program *fp,
struct gl_fragment_program *mesa_fp);
GLboolean evergreenTranslateFragmentShader(struct evergreen_fragment_program *fp,
struct gl_fragment_program *mesa_vp,
- GLcontext *ctx);
+ struct gl_context *ctx);
/* Interface */
-extern void evergreenSelectFragmentShader(GLcontext *ctx);
+extern void evergreenSelectFragmentShader(struct gl_context *ctx);
-extern GLboolean evergreenSetupFragmentProgram(GLcontext * ctx);
+extern GLboolean evergreenSetupFragmentProgram(struct gl_context * ctx);
-extern GLboolean evergreenSetupFPconstants(GLcontext * ctx);
+extern GLboolean evergreenSetupFPconstants(struct gl_context * ctx);
-extern void * evergreenGetActiveFpShaderBo(GLcontext * ctx);
+extern void * evergreenGetActiveFpShaderBo(struct gl_context * ctx);
-extern void * evergreenGetActiveFpShaderConstBo(GLcontext * ctx);
+extern void * evergreenGetActiveFpShaderConstBo(struct gl_context * ctx);
#endif /*_EVERGREEN_FRAGPROG_H_*/
diff --git a/src/mesa/drivers/dri/r600/evergreen_ioctl.c b/src/mesa/drivers/dri/r600/evergreen_ioctl.c
index 5c1270790df..19f8e6b3ec3 100644
--- a/src/mesa/drivers/dri/r600/evergreen_ioctl.c
+++ b/src/mesa/drivers/dri/r600/evergreen_ioctl.c
@@ -40,7 +40,7 @@
#include "r700_clear.h"
-void evergreenClear(GLcontext * ctx, GLbitfield mask)
+void evergreenClear(struct gl_context * ctx, GLbitfield mask)
{
r700Clear(ctx, mask);
}
diff --git a/src/mesa/drivers/dri/r600/evergreen_ioctl.h b/src/mesa/drivers/dri/r600/evergreen_ioctl.h
index 3c663a7083a..a41b5b60333 100644
--- a/src/mesa/drivers/dri/r600/evergreen_ioctl.h
+++ b/src/mesa/drivers/dri/r600/evergreen_ioctl.h
@@ -30,7 +30,7 @@
#include "r600_context.h"
#include "radeon_drm.h"
-extern void evergreenClear(GLcontext * ctx, GLbitfield mask);
+extern void evergreenClear(struct gl_context * ctx, GLbitfield mask);
extern void evergreenInitIoctlFuncs(struct dd_function_table *functions);
#endif /* _EVERGREEN_IOCTL_H_ */
diff --git a/src/mesa/drivers/dri/r600/evergreen_oglprog.c b/src/mesa/drivers/dri/r600/evergreen_oglprog.c
index 9fe523234cc..a2a361f32e6 100644
--- a/src/mesa/drivers/dri/r600/evergreen_oglprog.c
+++ b/src/mesa/drivers/dri/r600/evergreen_oglprog.c
@@ -40,7 +40,7 @@
#include "evergreen_vertprog.h"
-static void evergreen_freeVertProgCache(GLcontext *ctx, struct r700_vertex_program_cont *cache)
+static void evergreen_freeVertProgCache(struct gl_context *ctx, struct r700_vertex_program_cont *cache)
{
struct evergreen_vertex_program *tmp, *vp = cache->progs;
@@ -64,7 +64,7 @@ static void evergreen_freeVertProgCache(GLcontext *ctx, struct r700_vertex_progr
}
}
-static struct gl_program *evergreenNewProgram(GLcontext * ctx,
+static struct gl_program *evergreenNewProgram(struct gl_context * ctx,
GLenum target,
GLuint id)
{
@@ -109,7 +109,7 @@ static struct gl_program *evergreenNewProgram(GLcontext * ctx,
return pProgram;
}
-static void evergreenDeleteProgram(GLcontext * ctx, struct gl_program *prog)
+static void evergreenDeleteProgram(struct gl_context * ctx, struct gl_program *prog)
{
struct evergreen_vertex_program_cont *vpc = (struct evergreen_vertex_program_cont *)prog;
struct evergreen_fragment_program * fp;
@@ -147,7 +147,7 @@ static void evergreenDeleteProgram(GLcontext * ctx, struct gl_program *prog)
}
static GLboolean
-evergreenProgramStringNotify(GLcontext * ctx, GLenum target, struct gl_program *prog)
+evergreenProgramStringNotify(struct gl_context * ctx, GLenum target, struct gl_program *prog)
{
struct evergreen_vertex_program_cont *vpc = (struct evergreen_vertex_program_cont *)prog;
struct evergreen_fragment_program * fp = (struct evergreen_fragment_program*)prog;
@@ -178,7 +178,7 @@ evergreenProgramStringNotify(GLcontext * ctx, GLenum target, struct gl_program *
return GL_TRUE;
}
-static GLboolean evergreenIsProgramNative(GLcontext * ctx, GLenum target, struct gl_program *prog)
+static GLboolean evergreenIsProgramNative(struct gl_context * ctx, GLenum target, struct gl_program *prog)
{
return GL_TRUE;
diff --git a/src/mesa/drivers/dri/r600/evergreen_render.c b/src/mesa/drivers/dri/r600/evergreen_render.c
index 27089bfcf75..6e51832c878 100644
--- a/src/mesa/drivers/dri/r600/evergreen_render.c
+++ b/src/mesa/drivers/dri/r600/evergreen_render.c
@@ -148,7 +148,7 @@ static int evergreenNumVerts(int num_verts, int prim) //same
return num_verts - verts_off;
}
-static void evergreenRunRenderPrimitive(GLcontext * ctx, int start, int end, int prim,
+static void evergreenRunRenderPrimitive(struct gl_context * ctx, int start, int end, int prim,
GLint basevertex) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
@@ -219,7 +219,7 @@ static void evergreenRunRenderPrimitive(GLcontext * ctx, int start, int end, int
COMMIT_BATCH();
}
-static void evergreenRunRenderPrimitiveImmediate(GLcontext * ctx, int start, int end, int prim) //same
+static void evergreenRunRenderPrimitiveImmediate(struct gl_context * ctx, int start, int end, int prim) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
BATCH_LOCALS(&context->radeon);
@@ -363,7 +363,7 @@ static void evergreenRunRenderPrimitiveImmediate(GLcontext * ctx, int start, int
* Convert attribute data type to float
* If the attribute uses named buffer object replace the bo with newly allocated bo
*/
-static void evergreenConvertAttrib(GLcontext *ctx, int count,
+static void evergreenConvertAttrib(struct gl_context *ctx, int count,
const struct gl_client_array *input,
struct StreamDesc *attr)
{
@@ -442,7 +442,7 @@ static void evergreenConvertAttrib(GLcontext *ctx, int count,
}
}
-static void evergreenFixupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer *mesa_ind_buf)
+static void evergreenFixupIndexBuffer(struct gl_context *ctx, const struct _mesa_index_buffer *mesa_ind_buf)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
GLvoid *src_ptr;
@@ -517,7 +517,7 @@ static void evergreenFixupIndexBuffer(GLcontext *ctx, const struct _mesa_index_b
}
}
-static GLboolean evergreen_check_fallbacks(GLcontext *ctx) //same
+static GLboolean evergreen_check_fallbacks(struct gl_context *ctx) //same
{
if (ctx->RenderMode != GL_RENDER)
return GL_TRUE;
@@ -528,7 +528,7 @@ static GLboolean evergreen_check_fallbacks(GLcontext *ctx) //same
/* start 3d, idle, cb/db flush */
#define PRE_EMIT_STATE_BUFSZ 5 + 5 + 14
-static GLuint evergreenPredictRenderSize(GLcontext* ctx,
+static GLuint evergreenPredictRenderSize(struct gl_context* ctx,
const struct _mesa_prim *prim,
const struct _mesa_index_buffer *ib,
GLuint nr_prims)
@@ -567,7 +567,7 @@ static GLuint evergreenPredictRenderSize(GLcontext* ctx,
}
-static void evergreenSetupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer *mesa_ind_buf)
+static void evergreenSetupIndexBuffer(struct gl_context *ctx, const struct _mesa_index_buffer *mesa_ind_buf)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
@@ -620,7 +620,7 @@ static void evergreenSetupIndexBuffer(GLcontext *ctx, const struct _mesa_index_b
}
}
-static void evergreenAlignDataToDword(GLcontext *ctx,
+static void evergreenAlignDataToDword(struct gl_context *ctx,
const struct gl_client_array *input,
int count,
struct StreamDesc *attr)
@@ -662,7 +662,7 @@ static void evergreenAlignDataToDword(GLcontext *ctx,
attr->stride = dst_stride;
}
-static void evergreenSetupStreams(GLcontext *ctx, const struct gl_client_array *input[], int count)
+static void evergreenSetupStreams(struct gl_context *ctx, const struct gl_client_array *input[], int count)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
GLuint stride;
@@ -763,7 +763,7 @@ static void evergreenSetupStreams(GLcontext *ctx, const struct gl_client_array *
RADEON_GEM_DOMAIN_GTT, 0);
}
-static void evergreenFreeData(GLcontext *ctx)
+static void evergreenFreeData(struct gl_context *ctx)
{
/* Need to zero tcl.aos[n].bo and tcl.elt_dma_bo
* to prevent double unref in radeonReleaseArrays
@@ -799,7 +799,7 @@ static void evergreenFreeData(GLcontext *ctx)
}
}
-static GLboolean evergreenTryDrawPrims(GLcontext *ctx,
+static GLboolean evergreenTryDrawPrims(struct gl_context *ctx,
const struct gl_client_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
@@ -898,7 +898,7 @@ static GLboolean evergreenTryDrawPrims(GLcontext *ctx,
return GL_TRUE;
}
-static void evergreenDrawPrims(GLcontext *ctx,
+static void evergreenDrawPrims(struct gl_context *ctx,
const struct gl_client_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
@@ -909,6 +909,10 @@ static void evergreenDrawPrims(GLcontext *ctx,
{
GLboolean retval = GL_FALSE;
+ context_t *context = EVERGREEN_CONTEXT(ctx);
+ radeonContextPtr radeon = &context->radeon;
+ radeon_prepare_render(radeon);
+
/* This check should get folded into just the places that
* min/max index are really needed.
*/
@@ -932,7 +936,7 @@ static void evergreenDrawPrims(GLcontext *ctx,
}
}
-void evergreenInitDraw(GLcontext *ctx)
+void evergreenInitDraw(struct gl_context *ctx)
{
struct vbo_context *vbo = vbo_context(ctx);
diff --git a/src/mesa/drivers/dri/r600/evergreen_state.c b/src/mesa/drivers/dri/r600/evergreen_state.c
index 69c5ab656ea..a77be183a12 100644
--- a/src/mesa/drivers/dri/r600/evergreen_state.c
+++ b/src/mesa/drivers/dri/r600/evergreen_state.c
@@ -53,9 +53,9 @@
#include "evergreen_fragprog.h"
#include "evergreen_tex.h"
-void evergreenUpdateStateParameters(GLcontext * ctx, GLuint new_state); //same
+void evergreenUpdateStateParameters(struct gl_context * ctx, GLuint new_state); //same
-void evergreenUpdateShaders(GLcontext * ctx)
+void evergreenUpdateShaders(struct gl_context * ctx)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
@@ -73,7 +73,7 @@ void evergreenUpdateShaders(GLcontext * ctx)
context->radeon.NewGLState = 0;
}
-void evergreeUpdateShaders(GLcontext * ctx)
+void evergreeUpdateShaders(struct gl_context * ctx)
{
context_t *context = R700_CONTEXT(ctx);
@@ -94,7 +94,7 @@ void evergreeUpdateShaders(GLcontext * ctx)
/*
* To correctly position primitives:
*/
-void evergreenUpdateViewportOffset(GLcontext * ctx) //------------------
+void evergreenUpdateViewportOffset(struct gl_context * ctx) //------------------
{
context_t *context = R700_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -120,7 +120,7 @@ void evergreenUpdateViewportOffset(GLcontext * ctx) //------------------
radeonUpdateScissor(ctx);
}
-void evergreenUpdateStateParameters(GLcontext * ctx, GLuint new_state) //same
+void evergreenUpdateStateParameters(struct gl_context * ctx, GLuint new_state) //same
{
struct evergreen_fragment_program *fp =
(struct evergreen_fragment_program *)ctx->FragmentProgram._Current;
@@ -144,7 +144,7 @@ void evergreenUpdateStateParameters(GLcontext * ctx, GLuint new_state) //same
/**
* Called by Mesa after an internal state update.
*/
-static void evergreenInvalidateState(GLcontext * ctx, GLuint new_state) //same
+static void evergreenInvalidateState(struct gl_context * ctx, GLuint new_state) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
@@ -212,7 +212,7 @@ static void evergreenInvalidateState(GLcontext * ctx, GLuint new_state) //same
context->radeon.NewGLState |= new_state;
}
-static void evergreenSetAlphaState(GLcontext * ctx) //same
+static void evergreenSetAlphaState(struct gl_context * ctx) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -259,14 +259,14 @@ static void evergreenSetAlphaState(GLcontext * ctx) //same
}
}
-static void evergreenAlphaFunc(GLcontext * ctx, GLenum func, GLfloat ref) //same
+static void evergreenAlphaFunc(struct gl_context * ctx, GLenum func, GLfloat ref) //same
{
(void)func;
(void)ref;
evergreenSetAlphaState(ctx);
}
-static void evergreenBlendColor(GLcontext * ctx, const GLfloat cf[4]) //same
+static void evergreenBlendColor(struct gl_context * ctx, const GLfloat cf[4]) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -334,7 +334,7 @@ static int evergreenblend_factor(GLenum factor, GLboolean is_src) //same
}
}
-static void evergreenSetBlendState(GLcontext * ctx) //diff : CB_COLOR_CONTROL, CB_BLEND0_CONTROL bits
+static void evergreenSetBlendState(struct gl_context * ctx) //diff : CB_COLOR_CONTROL, CB_BLEND0_CONTROL bits
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -459,13 +459,13 @@ static void evergreenSetBlendState(GLcontext * ctx) //diff : CB_COLOR_CONTROL, C
evergreen->CB_BLEND0_CONTROL.u32All = blend_reg;
}
-static void evergreenBlendEquationSeparate(GLcontext * ctx,
+static void evergreenBlendEquationSeparate(struct gl_context * ctx,
GLenum modeRGB, GLenum modeA) //same
{
evergreenSetBlendState(ctx);
}
-static void evergreenBlendFuncSeparate(GLcontext * ctx,
+static void evergreenBlendFuncSeparate(struct gl_context * ctx,
GLenum sfactorRGB, GLenum dfactorRGB,
GLenum sfactorA, GLenum dfactorA) //same
{
@@ -513,7 +513,7 @@ static GLuint evergreen_translate_logicop(GLenum logicop) //same
}
}
-static void evergreenSetLogicOpState(GLcontext *ctx) //diff : CB_COLOR_CONTROL.ROP3 is actually same bits.
+static void evergreenSetLogicOpState(struct gl_context *ctx) //diff : CB_COLOR_CONTROL.ROP3 is actually same bits.
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -531,7 +531,7 @@ static void evergreenSetLogicOpState(GLcontext *ctx) //diff : CB_COLOR_CONTROL.R
EG_CB_COLOR_CONTROL__ROP3_mask);
}
-static void evergreenClipPlane( GLcontext *ctx, GLenum plane, const GLfloat *eq ) //same , but PA_CL_UCP_0_ offset diff
+static void evergreenClipPlane( struct gl_context *ctx, GLenum plane, const GLfloat *eq ) //same , but PA_CL_UCP_0_ offset diff
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -549,7 +549,7 @@ static void evergreenClipPlane( GLcontext *ctx, GLenum plane, const GLfloat *eq
evergreen->ucp[p].PA_CL_UCP_0_W.u32All = ip[3];
}
-static void evergreenSetClipPlaneState(GLcontext * ctx, GLenum cap, GLboolean state) //diff in func calls
+static void evergreenSetClipPlaneState(struct gl_context * ctx, GLenum cap, GLboolean state) //diff in func calls
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -569,7 +569,7 @@ static void evergreenSetClipPlaneState(GLcontext * ctx, GLenum cap, GLboolean st
}
}
-static void evergreenSetDBRenderState(GLcontext * ctx)
+static void evergreenSetDBRenderState(struct gl_context * ctx)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -629,13 +629,13 @@ static void evergreenSetDBRenderState(GLcontext * ctx)
}
}
-void evergreenUpdateShaderStates(GLcontext * ctx)
+void evergreenUpdateShaderStates(struct gl_context * ctx)
{
evergreenSetDBRenderState(ctx);
evergreenUpdateTextureState(ctx);
}
-static void evergreenSetDepthState(GLcontext * ctx) //same
+static void evergreenSetDepthState(struct gl_context * ctx) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -701,7 +701,7 @@ static void evergreenSetDepthState(GLcontext * ctx) //same
}
}
-static void evergreenSetStencilState(GLcontext * ctx, GLboolean state) //same
+static void evergreenSetStencilState(struct gl_context * ctx, GLboolean state) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -724,7 +724,7 @@ static void evergreenSetStencilState(GLcontext * ctx, GLboolean state) //same
}
}
-static void evergreenUpdateCulling(GLcontext * ctx) //same
+static void evergreenUpdateCulling(struct gl_context * ctx) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -776,7 +776,7 @@ static void evergreenUpdateCulling(GLcontext * ctx) //same
evergreen->PA_SU_SC_MODE_CNTL.u32All ^= FACE_bit;
}
-static void evergreenSetPolygonOffsetState(GLcontext * ctx, GLboolean state) //same
+static void evergreenSetPolygonOffsetState(struct gl_context * ctx, GLboolean state) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -794,7 +794,7 @@ static void evergreenSetPolygonOffsetState(GLcontext * ctx, GLboolean state) //s
}
}
-static void evergreenUpdateLineStipple(GLcontext * ctx) //diff
+static void evergreenUpdateLineStipple(struct gl_context * ctx) //diff
{
/* TODO */
}
@@ -913,7 +913,7 @@ void evergreenSetScissor(context_t *context) //diff
evergreen->viewport[id].enabled = GL_TRUE;
}
-static void evergreenUpdateWindow(GLcontext * ctx, int id) //diff in calling evergreenSetScissor
+static void evergreenUpdateWindow(struct gl_context * ctx, int id) //diff in calling evergreenSetScissor
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -969,7 +969,7 @@ static void evergreenUpdateWindow(GLcontext * ctx, int id) //diff in calling eve
evergreenSetScissor(context);
}
-static void evergreenEnable(GLcontext * ctx, GLenum cap, GLboolean state) //diff in func calls
+static void evergreenEnable(struct gl_context * ctx, GLenum cap, GLboolean state) //diff in func calls
{
context_t *context = EVERGREEN_CONTEXT(ctx);
@@ -1030,7 +1030,7 @@ static void evergreenEnable(GLcontext * ctx, GLenum cap, GLboolean state) //diff
}
-static void evergreenColorMask(GLcontext * ctx,
+static void evergreenColorMask(struct gl_context * ctx,
GLboolean r, GLboolean g, GLboolean b, GLboolean a) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
@@ -1046,26 +1046,26 @@ static void evergreenColorMask(GLcontext * ctx,
}
}
-static void evergreenDepthFunc(GLcontext * ctx, GLenum func) //same
+static void evergreenDepthFunc(struct gl_context * ctx, GLenum func) //same
{
evergreenSetDepthState(ctx);
}
-static void evergreenDepthMask(GLcontext * ctx, GLboolean mask) //same
+static void evergreenDepthMask(struct gl_context * ctx, GLboolean mask) //same
{
evergreenSetDepthState(ctx);
}
-static void evergreenCullFace(GLcontext * ctx, GLenum mode) //same
+static void evergreenCullFace(struct gl_context * ctx, GLenum mode) //same
{
evergreenUpdateCulling(ctx);
}
-static void evergreenFogfv(GLcontext * ctx, GLenum pname, const GLfloat * param) //same
+static void evergreenFogfv(struct gl_context * ctx, GLenum pname, const GLfloat * param) //same
{
}
-static void evergreenUpdatePolygonMode(GLcontext * ctx) //same
+static void evergreenUpdatePolygonMode(struct gl_context * ctx) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -1120,13 +1120,13 @@ static void evergreenUpdatePolygonMode(GLcontext * ctx) //same
}
}
-static void evergreenFrontFace(GLcontext * ctx, GLenum mode) //same
+static void evergreenFrontFace(struct gl_context * ctx, GLenum mode) //same
{
evergreenUpdateCulling(ctx);
evergreenUpdatePolygonMode(ctx);
}
-static void evergreenShadeModel(GLcontext * ctx, GLenum mode) //same
+static void evergreenShadeModel(struct gl_context * ctx, GLenum mode) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -1146,13 +1146,13 @@ static void evergreenShadeModel(GLcontext * ctx, GLenum mode) //same
}
}
-static void evergreenLogicOpcode(GLcontext *ctx, GLenum logicop) //diff
+static void evergreenLogicOpcode(struct gl_context *ctx, GLenum logicop) //diff
{
if (RGBA_LOGICOP_ENABLED(ctx))
evergreenSetLogicOpState(ctx);
}
-static void evergreenPointSize(GLcontext * ctx, GLfloat size) //same
+static void evergreenPointSize(struct gl_context * ctx, GLfloat size) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -1174,7 +1174,7 @@ static void evergreenPointSize(GLcontext * ctx, GLfloat size) //same
}
-static void evergreenPointParameter(GLcontext * ctx, GLenum pname, const GLfloat * param) //same
+static void evergreenPointParameter(struct gl_context * ctx, GLenum pname, const GLfloat * param) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -1225,7 +1225,7 @@ static int evergreen_translate_stencil_func(int func) //same
return 0;
}
-static void evergreenStencilFuncSeparate(GLcontext * ctx, GLenum face,
+static void evergreenStencilFuncSeparate(struct gl_context * ctx, GLenum face,
GLenum func, GLint ref, GLuint mask) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
@@ -1254,7 +1254,7 @@ static void evergreenStencilFuncSeparate(GLcontext * ctx, GLenum face,
STENCILFUNC_BF_shift, STENCILFUNC_BF_mask);
}
-static void evergreenStencilMaskSeparate(GLcontext * ctx, GLenum face, GLuint mask) //same
+static void evergreenStencilMaskSeparate(struct gl_context * ctx, GLenum face, GLuint mask) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -1298,7 +1298,7 @@ static int evergreen_translate_stencil_op(int op) //same
return 0;
}
-static void evergreenStencilOpSeparate(GLcontext * ctx, GLenum face,
+static void evergreenStencilOpSeparate(struct gl_context * ctx, GLenum face,
GLenum fail, GLenum zfail, GLenum zpass) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
@@ -1322,7 +1322,7 @@ static void evergreenStencilOpSeparate(GLcontext * ctx, GLenum face,
STENCILZPASS_BF_shift, STENCILZPASS_BF_mask);
}
-static void evergreenViewport(GLcontext * ctx,
+static void evergreenViewport(struct gl_context * ctx,
GLint x,
GLint y,
GLsizei width,
@@ -1333,12 +1333,12 @@ static void evergreenViewport(GLcontext * ctx,
radeon_viewport(ctx, x, y, width, height);
}
-static void evergreenDepthRange(GLcontext * ctx, GLclampd nearval, GLclampd farval) //diff in evergreenUpdateWindow
+static void evergreenDepthRange(struct gl_context * ctx, GLclampd nearval, GLclampd farval) //diff in evergreenUpdateWindow
{
evergreenUpdateWindow(ctx, 0);
}
-static void evergreenLineWidth(GLcontext * ctx, GLfloat widthf) //same
+static void evergreenLineWidth(struct gl_context * ctx, GLfloat widthf) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -1352,7 +1352,7 @@ static void evergreenLineWidth(GLcontext * ctx, GLfloat widthf) //same
PA_SU_LINE_CNTL__WIDTH_shift, PA_SU_LINE_CNTL__WIDTH_mask);
}
-static void evergreenLineStipple(GLcontext *ctx, GLint factor, GLushort pattern) //same
+static void evergreenLineStipple(struct gl_context *ctx, GLint factor, GLushort pattern) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -1364,7 +1364,7 @@ static void evergreenLineStipple(GLcontext *ctx, GLint factor, GLushort pattern)
SETfield(evergreen->PA_SC_LINE_STIPPLE.u32All, 1, AUTO_RESET_CNTL_shift, AUTO_RESET_CNTL_mask);
}
-static void evergreenPolygonOffset(GLcontext * ctx, GLfloat factor, GLfloat units) //diff :
+static void evergreenPolygonOffset(struct gl_context * ctx, GLfloat factor, GLfloat units) //diff :
//all register here offset diff, bits same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
@@ -1395,7 +1395,7 @@ static void evergreenPolygonOffset(GLcontext * ctx, GLfloat factor, GLfloat unit
evergreen->PA_SU_POLY_OFFSET_BACK_OFFSET.f32All = constant;
}
-static void evergreenPolygonMode(GLcontext * ctx, GLenum face, GLenum mode) //same
+static void evergreenPolygonMode(struct gl_context * ctx, GLenum face, GLenum mode) //same
{
(void)face;
(void)mode;
@@ -1403,12 +1403,12 @@ static void evergreenPolygonMode(GLcontext * ctx, GLenum face, GLenum mode) //sa
evergreenUpdatePolygonMode(ctx);
}
-static void evergreenRenderMode(GLcontext * ctx, GLenum mode) //same
+static void evergreenRenderMode(struct gl_context * ctx, GLenum mode) //same
{
}
//TODO : move to kernel.
-static void evergreenInitSQConfig(GLcontext * ctx)
+static void evergreenInitSQConfig(struct gl_context * ctx)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -1608,7 +1608,7 @@ static void evergreenInitSQConfig(GLcontext * ctx)
NUM_CLIP_SEQ_mask);
}
-void evergreenInitState(GLcontext * ctx) //diff
+void evergreenInitState(struct gl_context * ctx) //diff
{
context_t *context = R700_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
diff --git a/src/mesa/drivers/dri/r600/evergreen_state.h b/src/mesa/drivers/dri/r600/evergreen_state.h
index ffdb56b38ae..2f350e90faa 100644
--- a/src/mesa/drivers/dri/r600/evergreen_state.h
+++ b/src/mesa/drivers/dri/r600/evergreen_state.h
@@ -31,15 +31,15 @@
#include "r600_context.h"
-extern void evergreenUpdateStateParameters(GLcontext * ctx, GLuint new_state);
-extern void evergreenUpdateShaders(GLcontext * ctx);
-extern void evergreenUpdateShaderStates(GLcontext * ctx);
+extern void evergreenUpdateStateParameters(struct gl_context * ctx, GLuint new_state);
+extern void evergreenUpdateShaders(struct gl_context * ctx);
+extern void evergreenUpdateShaderStates(struct gl_context * ctx);
-extern void evergreeUpdateShaders(GLcontext * ctx);
+extern void evergreeUpdateShaders(struct gl_context * ctx);
-extern void evergreenUpdateViewportOffset(GLcontext * ctx);
+extern void evergreenUpdateViewportOffset(struct gl_context * ctx);
-extern void evergreenInitState(GLcontext * ctx);
+extern void evergreenInitState(struct gl_context * ctx);
extern void evergreenInitStateFuncs (radeonContextPtr radeon, struct dd_function_table *functions);
extern void evergreenSetScissor(context_t *context);
diff --git a/src/mesa/drivers/dri/r600/evergreen_tex.c b/src/mesa/drivers/dri/r600/evergreen_tex.c
index 8b42045ebb6..58420ed1239 100644
--- a/src/mesa/drivers/dri/r600/evergreen_tex.c
+++ b/src/mesa/drivers/dri/r600/evergreen_tex.c
@@ -934,7 +934,7 @@ EG_S_FIXED(float value, uint32_t frac_bits)
return value * (1 << frac_bits);
}
-static GLboolean evergreen_setup_hardware_state(GLcontext * ctx, struct gl_texture_object *texObj, int unit)
+static GLboolean evergreen_setup_hardware_state(struct gl_context * ctx, struct gl_texture_object *texObj, int unit)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
radeonTexObj *t = radeon_tex_obj(texObj);
@@ -1289,7 +1289,7 @@ void evergreenSetTexBuffer(__DRIcontext *pDRICtx, GLint target, GLint glx_textur
return;
}
-void evergreenUpdateTextureState(GLcontext * ctx)
+void evergreenUpdateTextureState(struct gl_context * ctx)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT * evergreen = GET_EVERGREEN_CHIP(context);
@@ -1311,7 +1311,7 @@ void evergreenUpdateTextureState(GLcontext * ctx)
}
}
-static GLboolean evergreen_validate_texture(GLcontext * ctx, struct gl_texture_object *texObj, int unit)
+static GLboolean evergreen_validate_texture(struct gl_context * ctx, struct gl_texture_object *texObj, int unit)
{
radeonTexObj *t = radeon_tex_obj(texObj);
@@ -1327,7 +1327,7 @@ static GLboolean evergreen_validate_texture(GLcontext * ctx, struct gl_texture_o
return GL_TRUE;
}
-GLboolean evergreenValidateBuffers(GLcontext * ctx)
+GLboolean evergreenValidateBuffers(struct gl_context * ctx)
{
context_t *rmesa = EVERGREEN_CONTEXT(ctx);
struct radeon_renderbuffer *rrb;
@@ -1403,7 +1403,7 @@ GLboolean evergreenValidateBuffers(GLcontext * ctx)
return GL_TRUE;
}
-static struct gl_texture_object *evergreenNewTextureObject(GLcontext * ctx,
+static struct gl_texture_object *evergreenNewTextureObject(struct gl_context * ctx,
GLuint name,
GLenum target)
{
@@ -1426,7 +1426,7 @@ static struct gl_texture_object *evergreenNewTextureObject(GLcontext * ctx,
return &t->base;
}
-static void evergreenDeleteTexture(GLcontext * ctx, struct gl_texture_object *texObj)
+static void evergreenDeleteTexture(struct gl_context * ctx, struct gl_texture_object *texObj)
{
context_t * rmesa = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT * evergreen = GET_EVERGREEN_CHIP(rmesa);
@@ -1456,7 +1456,7 @@ static void evergreenDeleteTexture(GLcontext * ctx, struct gl_texture_object *te
_mesa_delete_texture_object(ctx, texObj);
}
-static void evergreenTexParameter(GLcontext * ctx, GLenum target,
+static void evergreenTexParameter(struct gl_context * ctx, GLenum target,
struct gl_texture_object *texObj,
GLenum pname, const GLfloat * params)
{
diff --git a/src/mesa/drivers/dri/r600/evergreen_tex.h b/src/mesa/drivers/dri/r600/evergreen_tex.h
index b43508a9eab..982a087f8ed 100644
--- a/src/mesa/drivers/dri/r600/evergreen_tex.h
+++ b/src/mesa/drivers/dri/r600/evergreen_tex.h
@@ -27,9 +27,9 @@
#ifndef _EVERGREEN_TEX_H_
#define _EVERGREEN_TEX_H_
-extern GLboolean evergreenValidateBuffers(GLcontext * ctx);
+extern GLboolean evergreenValidateBuffers(struct gl_context * ctx);
-extern void evergreenUpdateTextureState(GLcontext * ctx);
+extern void evergreenUpdateTextureState(struct gl_context * ctx);
extern void evergreenInitTextureFuncs(radeonContextPtr radeon, struct dd_function_table *functions);
extern void evergreenSetTexOffset(__DRIcontext * pDRICtx, GLint texname,
unsigned long long offset, GLint depth, GLuint pitch);
diff --git a/src/mesa/drivers/dri/r600/evergreen_vertprog.c b/src/mesa/drivers/dri/r600/evergreen_vertprog.c
index 0099cef527a..b3371f20b19 100644
--- a/src/mesa/drivers/dri/r600/evergreen_vertprog.c
+++ b/src/mesa/drivers/dri/r600/evergreen_vertprog.c
@@ -169,7 +169,7 @@ GLboolean evergreen_Process_Vertex_Program_Vfetch_Instructions(
}
GLboolean evergreen_Process_Vertex_Program_Vfetch_Instructions2(
- GLcontext *ctx,
+ struct gl_context *ctx,
struct evergreen_vertex_program *vp,
struct gl_vertex_program *mesa_vp)
{
@@ -196,7 +196,7 @@ GLboolean evergreen_Process_Vertex_Program_Vfetch_Instructions2(
return GL_TRUE;
}
-void evergreen_Map_Vertex_Program(GLcontext *ctx,
+void evergreen_Map_Vertex_Program(struct gl_context *ctx,
struct evergreen_vertex_program *vp,
struct gl_vertex_program *mesa_vp)
{
@@ -292,7 +292,7 @@ GLboolean evergreen_Find_Instruction_Dependencies_vp(struct evergreen_vertex_pro
return GL_TRUE;
}
-struct evergreen_vertex_program* evergreenTranslateVertexShader(GLcontext *ctx,
+struct evergreen_vertex_program* evergreenTranslateVertexShader(struct gl_context *ctx,
struct gl_vertex_program *mesa_vp)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
@@ -374,7 +374,7 @@ struct evergreen_vertex_program* evergreenTranslateVertexShader(GLcontext *ctx,
return vp;
}
-void evergreenSelectVertexShader(GLcontext *ctx)
+void evergreenSelectVertexShader(struct gl_context *ctx)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
struct evergreen_vertex_program_cont *vpc;
@@ -448,7 +448,7 @@ int evergreen_getTypeSize(GLenum type)
}
}
-static void evergreenTranslateAttrib(GLcontext *ctx, GLuint unLoc, int count, const struct gl_client_array *input)
+static void evergreenTranslateAttrib(struct gl_context *ctx, GLuint unLoc, int count, const struct gl_client_array *input)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
@@ -534,7 +534,7 @@ static void evergreenTranslateAttrib(GLcontext *ctx, GLuint unLoc, int count, co
context->nNumActiveAos++;
}
-void evergreenSetVertexFormat(GLcontext *ctx, const struct gl_client_array *arrays[], int count)
+void evergreenSetVertexFormat(struct gl_context *ctx, const struct gl_client_array *arrays[], int count)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
struct evergreen_vertex_program *vpc
@@ -563,7 +563,7 @@ void evergreenSetVertexFormat(GLcontext *ctx, const struct gl_client_array *arra
context->radeon.tcl.aos_count = context->nNumActiveAos;
}
-void * evergreenGetActiveVpShaderBo(GLcontext * ctx)
+void * evergreenGetActiveVpShaderBo(struct gl_context * ctx)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
struct evergreen_vertex_program *vp = context->selected_vp;;
@@ -574,7 +574,7 @@ void * evergreenGetActiveVpShaderBo(GLcontext * ctx)
return NULL;
}
-void * evergreenGetActiveVpShaderConstBo(GLcontext * ctx)
+void * evergreenGetActiveVpShaderConstBo(struct gl_context * ctx)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
struct evergreen_vertex_program *vp = context->selected_vp;;
@@ -585,7 +585,7 @@ void * evergreenGetActiveVpShaderConstBo(GLcontext * ctx)
return NULL;
}
-GLboolean evergreenSetupVertexProgram(GLcontext * ctx)
+GLboolean evergreenSetupVertexProgram(struct gl_context * ctx)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
@@ -646,7 +646,7 @@ GLboolean evergreenSetupVertexProgram(GLcontext * ctx)
return GL_TRUE;
}
-GLboolean evergreenSetupVPconstants(GLcontext * ctx)
+GLboolean evergreenSetupVPconstants(struct gl_context * ctx)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
diff --git a/src/mesa/drivers/dri/r600/evergreen_vertprog.h b/src/mesa/drivers/dri/r600/evergreen_vertprog.h
index 58539021152..8163e369277 100644
--- a/src/mesa/drivers/dri/r600/evergreen_vertprog.h
+++ b/src/mesa/drivers/dri/r600/evergreen_vertprog.h
@@ -80,29 +80,29 @@ GLboolean evergreen_Process_Vertex_Program_Vfetch_Instructions(
struct evergreen_vertex_program *vp,
struct gl_vertex_program *mesa_vp);
GLboolean evergreen_Process_Vertex_Program_Vfetch_Instructions2(
- GLcontext *ctx,
+ struct gl_context *ctx,
struct evergreen_vertex_program *vp,
struct gl_vertex_program *mesa_vp);
-void evergreen_Map_Vertex_Program(GLcontext *ctx,
+void evergreen_Map_Vertex_Program(struct gl_context *ctx,
struct evergreen_vertex_program *vp,
struct gl_vertex_program *mesa_vp);
GLboolean evergreen_Find_Instruction_Dependencies_vp(struct evergreen_vertex_program *vp,
struct gl_vertex_program *mesa_vp);
-struct evergreen_vertex_program* evergreenTranslateVertexShader(GLcontext *ctx,
+struct evergreen_vertex_program* evergreenTranslateVertexShader(struct gl_context *ctx,
struct gl_vertex_program *mesa_vp);
/* Interface */
-extern void evergreenSelectVertexShader(GLcontext *ctx);
-extern void evergreenSetVertexFormat(GLcontext *ctx, const struct gl_client_array *arrays[], int count);
+extern void evergreenSelectVertexShader(struct gl_context *ctx);
+extern void evergreenSetVertexFormat(struct gl_context *ctx, const struct gl_client_array *arrays[], int count);
-extern GLboolean evergreenSetupVertexProgram(GLcontext * ctx);
+extern GLboolean evergreenSetupVertexProgram(struct gl_context * ctx);
-extern GLboolean evergreenSetupVPconstants(GLcontext * ctx);
+extern GLboolean evergreenSetupVPconstants(struct gl_context * ctx);
-extern void * evergreenGetActiveVpShaderBo(GLcontext * ctx);
+extern void * evergreenGetActiveVpShaderBo(struct gl_context * ctx);
-extern void * evergreenGetActiveVpShaderConstBo(GLcontext * ctx);
+extern void * evergreenGetActiveVpShaderConstBo(struct gl_context * ctx);
extern int evergreen_getTypeSize(GLenum type);
diff --git a/src/mesa/drivers/dri/r600/r600_blit.c b/src/mesa/drivers/dri/r600/r600_blit.c
index 3090c9f613b..31c32d62f9a 100644
--- a/src/mesa/drivers/dri/r600/r600_blit.c
+++ b/src/mesa/drivers/dri/r600/r600_blit.c
@@ -408,7 +408,7 @@ set_render_target(context_t *context, struct radeon_bo *bo, gl_format mesa_forma
}
-static inline void load_shaders(GLcontext * ctx)
+static inline void load_shaders(struct gl_context * ctx)
{
radeonContextPtr radeonctx = RADEON_CONTEXT(ctx);
@@ -1566,7 +1566,7 @@ static GLboolean validate_buffers(context_t *rmesa,
return GL_TRUE;
}
-unsigned r600_blit(GLcontext *ctx,
+unsigned r600_blit(struct gl_context *ctx,
struct radeon_bo *src_bo,
intptr_t src_offset,
gl_format src_mesaformat,
diff --git a/src/mesa/drivers/dri/r600/r600_blit.h b/src/mesa/drivers/dri/r600/r600_blit.h
index d56b21ba9b5..9dc8e2fec64 100644
--- a/src/mesa/drivers/dri/r600/r600_blit.h
+++ b/src/mesa/drivers/dri/r600/r600_blit.h
@@ -30,7 +30,7 @@
unsigned r600_check_blit(gl_format mesa_format);
-unsigned r600_blit(GLcontext *ctx,
+unsigned r600_blit(struct gl_context *ctx,
struct radeon_bo *src_bo,
intptr_t src_offset,
gl_format src_mesaformat,
diff --git a/src/mesa/drivers/dri/r600/r600_context.c b/src/mesa/drivers/dri/r600/r600_context.c
index cd34e6208d8..c882a9cce9e 100644
--- a/src/mesa/drivers/dri/r600/r600_context.c
+++ b/src/mesa/drivers/dri/r600/r600_context.c
@@ -208,7 +208,7 @@ static void r600_vtbl_pre_emit_atoms(radeonContextPtr radeon)
r700Start3D((context_t *)radeon);
}
-static void r600_fallback(GLcontext *ctx, GLuint bit, GLboolean mode)
+static void r600_fallback(struct gl_context *ctx, GLuint bit, GLboolean mode)
{
context_t *context = R700_CONTEXT(ctx);
if (mode)
@@ -249,7 +249,7 @@ static void r600_init_vtbl(radeonContextPtr radeon)
radeon->vtbl.is_format_renderable = r600IsFormatRenderable;
}
-static void r600InitConstValues(GLcontext *ctx, radeonScreenPtr screen)
+static void r600InitConstValues(struct gl_context *ctx, radeonScreenPtr screen)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -335,7 +335,7 @@ static void r600ParseOptions(context_t *r600, radeonScreenPtr screen)
}
-static void r600InitGLExtensions(GLcontext *ctx)
+static void r600InitGLExtensions(struct gl_context *ctx)
{
context_t *r600 = R700_CONTEXT(ctx);
#ifdef R600_ENABLE_GLSL_TEST
@@ -380,7 +380,7 @@ static void r600InitGLExtensions(GLcontext *ctx)
/* Create the device specific rendering context.
*/
GLboolean r600CreateContext(gl_api api,
- const __GLcontextModes * glVisual,
+ const struct gl_config * glVisual,
__DRIcontext * driContextPriv,
void *sharedContextPrivate)
{
@@ -388,7 +388,7 @@ GLboolean r600CreateContext(gl_api api,
radeonScreenPtr screen = (radeonScreenPtr) (sPriv->private);
struct dd_function_table functions;
context_t *r600;
- GLcontext *ctx;
+ struct gl_context *ctx;
assert(glVisual);
assert(driContextPriv);
diff --git a/src/mesa/drivers/dri/r600/r600_context.h b/src/mesa/drivers/dri/r600/r600_context.h
index 6a831966487..d3dc901acf8 100644
--- a/src/mesa/drivers/dri/r600/r600_context.h
+++ b/src/mesa/drivers/dri/r600/r600_context.h
@@ -188,12 +188,12 @@ struct r600_context {
#define EVERGREEN_CONTEXT(ctx) ((context_t *)(ctx->DriverCtx))
#define R700_CONTEXT(ctx) ((context_t *)(ctx->DriverCtx))
-#define GL_CONTEXT(context) ((GLcontext *)(context->radeon.glCtx))
+#define GL_CONTEXT(context) ((struct gl_context *)(context->radeon.glCtx))
#define GET_EVERGREEN_CHIP(context) ((EVERGREEN_CHIP_CONTEXT*)(context->pChip))
extern GLboolean r600CreateContext(gl_api api,
- const __GLcontextModes * glVisual,
+ const struct gl_config * glVisual,
__DRIcontext * driContextPriv,
void *sharedContextPrivate);
@@ -232,10 +232,10 @@ extern void r700WaitForIdleClean(context_t *context);
extern void r700Start3D(context_t *context);
extern void r600InitAtoms(context_t *context);
-extern void r700InitDraw(GLcontext *ctx);
+extern void r700InitDraw(struct gl_context *ctx);
extern void evergreenInitAtoms(context_t *context);
-extern void evergreenInitDraw(GLcontext *ctx);
+extern void evergreenInitDraw(struct gl_context *ctx);
#define RADEON_D_CAPTURE 0
#define RADEON_D_PLAYBACK 1
diff --git a/src/mesa/drivers/dri/r600/r600_emit.c b/src/mesa/drivers/dri/r600/r600_emit.c
index a840106c144..53ece9a3505 100644
--- a/src/mesa/drivers/dri/r600/r600_emit.c
+++ b/src/mesa/drivers/dri/r600/r600_emit.c
@@ -49,7 +49,7 @@ void r600EmitCacheFlush(context_t *rmesa)
{
}
-GLboolean r600AllocShaderConsts(GLcontext * ctx,
+GLboolean r600AllocShaderConsts(struct gl_context * ctx,
void ** constbo,
int sizeinBYTE,
char * szShaderUsage)
@@ -93,7 +93,7 @@ shader_again_alloc:
return GL_TRUE;
}
-GLboolean r600EmitShaderConsts(GLcontext * ctx,
+GLboolean r600EmitShaderConsts(struct gl_context * ctx,
void * constbo,
int bo_offset,
GLvoid * data,
@@ -114,7 +114,7 @@ GLboolean r600EmitShaderConsts(GLcontext * ctx,
return GL_TRUE;
}
-GLboolean r600EmitShader(GLcontext * ctx,
+GLboolean r600EmitShader(struct gl_context * ctx,
void ** shaderbo,
GLvoid * data,
int sizeinDWORD,
@@ -163,7 +163,7 @@ shader_again_alloc:
return GL_TRUE;
}
-GLboolean r600DeleteShader(GLcontext * ctx,
+GLboolean r600DeleteShader(struct gl_context * ctx,
void * shaderbo)
{
struct radeon_bo * pbo = (struct radeon_bo *)shaderbo;
diff --git a/src/mesa/drivers/dri/r600/r600_emit.h b/src/mesa/drivers/dri/r600/r600_emit.h
index 259561539fa..c50b6060ca9 100644
--- a/src/mesa/drivers/dri/r600/r600_emit.h
+++ b/src/mesa/drivers/dri/r600/r600_emit.h
@@ -43,20 +43,20 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
void r600EmitCacheFlush(context_t *rmesa);
-extern GLboolean r600EmitShader(GLcontext * ctx,
+extern GLboolean r600EmitShader(struct gl_context * ctx,
void ** shaderbo,
GLvoid * data,
int sizeinDWORD,
char * szShaderUsage);
-extern GLboolean r600DeleteShader(GLcontext * ctx,
+extern GLboolean r600DeleteShader(struct gl_context * ctx,
void * shaderbo);
-extern GLboolean r600AllocShaderConsts(GLcontext * ctx,
+extern GLboolean r600AllocShaderConsts(struct gl_context * ctx,
void ** constbo,
int sizeinBYTE,
char * szShaderUsage);
-GLboolean r600EmitShaderConsts(GLcontext * ctx,
+GLboolean r600EmitShaderConsts(struct gl_context * ctx,
void * constbo,
int bo_offset,
GLvoid * data,
diff --git a/src/mesa/drivers/dri/r600/r600_tex.c b/src/mesa/drivers/dri/r600/r600_tex.c
index 512a52ede3e..d6a58f410cc 100644
--- a/src/mesa/drivers/dri/r600/r600_tex.c
+++ b/src/mesa/drivers/dri/r600/r600_tex.c
@@ -276,7 +276,7 @@ static void r600SetTexBorderColor(radeonTexObjPtr t, const GLfloat color[4])
* next UpdateTextureState
*/
-static void r600TexParameter(GLcontext * ctx, GLenum target,
+static void r600TexParameter(struct gl_context * ctx, GLenum target,
struct gl_texture_object *texObj,
GLenum pname, const GLfloat * params)
{
@@ -332,7 +332,7 @@ static void r600TexParameter(GLcontext * ctx, GLenum target,
}
}
-static void r600DeleteTexture(GLcontext * ctx, struct gl_texture_object *texObj)
+static void r600DeleteTexture(struct gl_context * ctx, struct gl_texture_object *texObj)
{
context_t* rmesa = R700_CONTEXT(ctx);
radeonTexObj* t = radeon_tex_obj(texObj);
@@ -368,7 +368,7 @@ static void r600DeleteTexture(GLcontext * ctx, struct gl_texture_object *texObj)
* allocate the default texture objects.
* Fixup MaxAnisotropy according to user preference.
*/
-static struct gl_texture_object *r600NewTextureObject(GLcontext * ctx,
+static struct gl_texture_object *r600NewTextureObject(struct gl_context * ctx,
GLuint name,
GLenum target)
{
diff --git a/src/mesa/drivers/dri/r600/r600_tex.h b/src/mesa/drivers/dri/r600/r600_tex.h
index 771affdfa60..256588429e8 100644
--- a/src/mesa/drivers/dri/r600/r600_tex.h
+++ b/src/mesa/drivers/dri/r600/r600_tex.h
@@ -56,7 +56,7 @@ extern void r600SetTexOffset(__DRIcontext *pDRICtx, GLint texname,
unsigned long long offset, GLint depth,
GLuint pitch);
-extern GLboolean r600ValidateBuffers(GLcontext * ctx);
+extern GLboolean r600ValidateBuffers(struct gl_context * ctx);
extern void r600InitTextureFuncs(radeonContextPtr radeon, struct dd_function_table *functions);
diff --git a/src/mesa/drivers/dri/r600/r600_texstate.c b/src/mesa/drivers/dri/r600/r600_texstate.c
index fd928cfe5d2..3869768bf0e 100644
--- a/src/mesa/drivers/dri/r600/r600_texstate.c
+++ b/src/mesa/drivers/dri/r600/r600_texstate.c
@@ -52,9 +52,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "evergreen_tex.h"
-void r600UpdateTextureState(GLcontext * ctx);
+void r600UpdateTextureState(struct gl_context * ctx);
-void r600UpdateTextureState(GLcontext * ctx)
+void r600UpdateTextureState(struct gl_context * ctx)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -707,7 +707,7 @@ void r600SetDepthTexMode(struct gl_texture_object *tObj)
* \param rmesa Context pointer
* \param t the r300 texture object
*/
-static GLboolean setup_hardware_state(GLcontext * ctx, struct gl_texture_object *texObj, int unit)
+static GLboolean setup_hardware_state(struct gl_context * ctx, struct gl_texture_object *texObj, int unit)
{
context_t *rmesa = R700_CONTEXT(ctx);
radeonTexObj *t = radeon_tex_obj(texObj);
@@ -803,7 +803,7 @@ static GLboolean setup_hardware_state(GLcontext * ctx, struct gl_texture_object
*
* Mostly this means populating the texture object's mipmap tree.
*/
-static GLboolean r600_validate_texture(GLcontext * ctx, struct gl_texture_object *texObj, int unit)
+static GLboolean r600_validate_texture(struct gl_context * ctx, struct gl_texture_object *texObj, int unit)
{
radeonTexObj *t = radeon_tex_obj(texObj);
@@ -822,7 +822,7 @@ static GLboolean r600_validate_texture(GLcontext * ctx, struct gl_texture_object
/**
* Ensure all enabled and complete textures are uploaded along with any buffers being used.
*/
-GLboolean r600ValidateBuffers(GLcontext * ctx)
+GLboolean r600ValidateBuffers(struct gl_context * ctx)
{
context_t *rmesa = R700_CONTEXT(ctx);
struct radeon_renderbuffer *rrb;
diff --git a/src/mesa/drivers/dri/r600/r700_chip.c b/src/mesa/drivers/dri/r600/r700_chip.c
index 3bb194eb6d6..4ec2845ab44 100644
--- a/src/mesa/drivers/dri/r600/r700_chip.c
+++ b/src/mesa/drivers/dri/r600/r700_chip.c
@@ -39,7 +39,7 @@
#include "radeon_mipmap_tree.h"
-static void r700SendTexState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendTexState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -104,7 +104,7 @@ static void r700SendTexState(GLcontext *ctx, struct radeon_state_atom *atom)
#define SAMPLER_STRIDE 3
-static void r700SendTexSamplerState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendTexSamplerState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -141,7 +141,7 @@ static void r700SendTexSamplerState(GLcontext *ctx, struct radeon_state_atom *at
}
}
-static void r700SendTexBorderColorState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendTexBorderColorState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -167,7 +167,7 @@ static void r700SendTexBorderColorState(GLcontext *ctx, struct radeon_state_atom
}
extern int getTypeSize(GLenum type);
-static void r700SetupVTXConstants(GLcontext * ctx,
+static void r700SetupVTXConstants(struct gl_context * ctx,
void * pAos,
StreamDesc * pStreamDesc)
{
@@ -243,7 +243,7 @@ static void r700SetupVTXConstants(GLcontext * ctx,
}
-static void r700SendVTXState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendVTXState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
struct r700_vertex_program *vp = context->selected_vp;
@@ -599,7 +599,7 @@ static void r700SetDepthTarget(context_t *context)
/* r700->DB_PREFETCH_LIMIT.bits.DEPTH_HEIGHT_TILE_MAX = (context->currentDraw->h >> 3) - 1; */ /* z buffer sie may much bigger than what need, so use actual used h. */
}
-static void r700SendDepthTargetState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendDepthTargetState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -646,7 +646,7 @@ static void r700SendDepthTargetState(GLcontext *ctx, struct radeon_state_atom *a
}
-static void r700SendRenderTargetState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendRenderTargetState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -724,7 +724,7 @@ static void r700SendRenderTargetState(GLcontext *ctx, struct radeon_state_atom *
}
-static void r700SendPSState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendPSState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -766,7 +766,7 @@ static void r700SendPSState(GLcontext *ctx, struct radeon_state_atom *atom)
}
-static void r700SendVSState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendVSState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -827,7 +827,7 @@ static void r700SendVSState(GLcontext *ctx, struct radeon_state_atom *atom)
COMMIT_BATCH();
}
-static void r700SendFSState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendFSState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -869,7 +869,7 @@ static void r700SendFSState(GLcontext *ctx, struct radeon_state_atom *atom)
}
-static void r700SendViewportState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendViewportState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -903,7 +903,7 @@ static void r700SendViewportState(GLcontext *ctx, struct radeon_state_atom *atom
}
-static void r700SendSQConfig(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendSQConfig(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -940,7 +940,7 @@ static void r700SendSQConfig(GLcontext *ctx, struct radeon_state_atom *atom)
COMMIT_BATCH();
}
-static void r700SendUCPState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendUCPState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -962,7 +962,7 @@ static void r700SendUCPState(GLcontext *ctx, struct radeon_state_atom *atom)
}
}
-static void r700SendSPIState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendSPIState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -1037,7 +1037,7 @@ static void r700SendSPIState(GLcontext *ctx, struct radeon_state_atom *atom)
COMMIT_BATCH();
}
-static void r700SendVGTState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendVGTState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -1083,7 +1083,7 @@ static void r700SendVGTState(GLcontext *ctx, struct radeon_state_atom *atom)
COMMIT_BATCH();
}
-static void r700SendSXState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendSXState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -1098,7 +1098,7 @@ static void r700SendSXState(GLcontext *ctx, struct radeon_state_atom *atom)
COMMIT_BATCH();
}
-static void r700SendDBState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendDBState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -1124,7 +1124,7 @@ static void r700SendDBState(GLcontext *ctx, struct radeon_state_atom *atom)
COMMIT_BATCH();
}
-static void r700SendStencilState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendStencilState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -1138,7 +1138,7 @@ static void r700SendStencilState(GLcontext *ctx, struct radeon_state_atom *atom)
COMMIT_BATCH();
}
-static void r700SendCBState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendCBState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -1168,7 +1168,7 @@ static void r700SendCBState(GLcontext *ctx, struct radeon_state_atom *atom)
COMMIT_BATCH();
}
-static void r700SendCBCLRCMPState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendCBCLRCMPState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -1184,7 +1184,7 @@ static void r700SendCBCLRCMPState(GLcontext *ctx, struct radeon_state_atom *atom
COMMIT_BATCH();
}
-static void r700SendCBBlendState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendCBBlendState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -1216,7 +1216,7 @@ static void r700SendCBBlendState(GLcontext *ctx, struct radeon_state_atom *atom)
COMMIT_BATCH();
}
-static void r700SendCBBlendColorState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendCBBlendColorState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -1233,7 +1233,7 @@ static void r700SendCBBlendColorState(GLcontext *ctx, struct radeon_state_atom *
COMMIT_BATCH();
}
-static void r700SendSUState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendSUState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -1251,7 +1251,7 @@ static void r700SendSUState(GLcontext *ctx, struct radeon_state_atom *atom)
}
-static void r700SendPolyState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendPolyState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -1271,7 +1271,7 @@ static void r700SendPolyState(GLcontext *ctx, struct radeon_state_atom *atom)
}
-static void r700SendCLState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendCLState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -1287,7 +1287,7 @@ static void r700SendCLState(GLcontext *ctx, struct radeon_state_atom *atom)
COMMIT_BATCH();
}
-static void r700SendGBState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendGBState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -1303,7 +1303,7 @@ static void r700SendGBState(GLcontext *ctx, struct radeon_state_atom *atom)
COMMIT_BATCH();
}
-static void r700SendScissorState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendScissorState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -1336,7 +1336,7 @@ static void r700SendScissorState(GLcontext *ctx, struct radeon_state_atom *atom)
COMMIT_BATCH();
}
-static void r700SendSCState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendSCState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -1353,7 +1353,7 @@ static void r700SendSCState(GLcontext *ctx, struct radeon_state_atom *atom)
COMMIT_BATCH();
}
-static void r700SendAAState(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendAAState(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -1368,7 +1368,7 @@ static void r700SendAAState(GLcontext *ctx, struct radeon_state_atom *atom)
COMMIT_BATCH();
}
-static void r700SendPSConsts(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendPSConsts(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -1392,7 +1392,7 @@ static void r700SendPSConsts(GLcontext *ctx, struct radeon_state_atom *atom)
COMMIT_BATCH();
}
-static void r700SendVSConsts(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendVSConsts(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
@@ -1417,7 +1417,7 @@ static void r700SendVSConsts(GLcontext *ctx, struct radeon_state_atom *atom)
COMMIT_BATCH();
}
-static void r700SendQueryBegin(GLcontext *ctx, struct radeon_state_atom *atom)
+static void r700SendQueryBegin(struct gl_context *ctx, struct radeon_state_atom *atom)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
struct radeon_query_object *query = radeon->query.current;
@@ -1443,12 +1443,12 @@ static void r700SendQueryBegin(GLcontext *ctx, struct radeon_state_atom *atom)
query->emitted_begin = GL_TRUE;
}
-static int check_always(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_always(struct gl_context *ctx, struct radeon_state_atom *atom)
{
return atom->cmd_size;
}
-static int check_cb(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_cb(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
int count = 7;
@@ -1460,7 +1460,7 @@ static int check_cb(GLcontext *ctx, struct radeon_state_atom *atom)
return count;
}
-static int check_blnd(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_blnd(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -1485,7 +1485,7 @@ static int check_blnd(GLcontext *ctx, struct radeon_state_atom *atom)
return count;
}
-static int check_ucp(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_ucp(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -1500,7 +1500,7 @@ static int check_ucp(GLcontext *ctx, struct radeon_state_atom *atom)
return count;
}
-static int check_vtx(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_vtx(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
int count = context->radeon.tcl.aos_count * 18;
@@ -1509,7 +1509,7 @@ static int check_vtx(GLcontext *ctx, struct radeon_state_atom *atom)
return count;
}
-static int check_tx(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_tx(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
unsigned int i, count = 0;
@@ -1526,7 +1526,7 @@ static int check_tx(GLcontext *ctx, struct radeon_state_atom *atom)
return count * 31;
}
-static int check_ps_consts(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_ps_consts(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -1539,7 +1539,7 @@ static int check_ps_consts(GLcontext *ctx, struct radeon_state_atom *atom)
return count;
}
-static int check_vs_consts(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_vs_consts(struct gl_context *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -1552,7 +1552,7 @@ static int check_vs_consts(GLcontext *ctx, struct radeon_state_atom *atom)
return count;
}
-static int check_queryobj(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_queryobj(struct gl_context *ctx, struct radeon_state_atom *atom)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
struct radeon_query_object *query = radeon->query.current;
diff --git a/src/mesa/drivers/dri/r600/r700_clear.c b/src/mesa/drivers/dri/r600/r700_clear.c
index d1008f28b9b..853dec9233c 100644
--- a/src/mesa/drivers/dri/r600/r700_clear.c
+++ b/src/mesa/drivers/dri/r600/r700_clear.c
@@ -45,7 +45,7 @@ static GLboolean r700ClearFast(context_t *context, GLbitfield mask)
return GL_FALSE;
}
-void r700Clear(GLcontext * ctx, GLbitfield mask)
+void r700Clear(struct gl_context * ctx, GLbitfield mask)
{
context_t *context = R700_CONTEXT(ctx);
radeonContextPtr radeon = &context->radeon;
diff --git a/src/mesa/drivers/dri/r600/r700_clear.h b/src/mesa/drivers/dri/r600/r700_clear.h
index bed1d3a90e5..de372ee3039 100644
--- a/src/mesa/drivers/dri/r600/r700_clear.h
+++ b/src/mesa/drivers/dri/r600/r700_clear.h
@@ -28,6 +28,6 @@
#ifndef __r700_CLEAR_H__
#define __r700_CLEAR_H__
-extern void r700Clear(GLcontext * ctx, GLbitfield mask);
+extern void r700Clear(struct gl_context * ctx, GLbitfield mask);
#endif /* __r700_CLEAR_H__ */
diff --git a/src/mesa/drivers/dri/r600/r700_fragprog.c b/src/mesa/drivers/dri/r600/r700_fragprog.c
index 217b0e27a4a..2a6a39dfbac 100644
--- a/src/mesa/drivers/dri/r600/r700_fragprog.c
+++ b/src/mesa/drivers/dri/r600/r700_fragprog.c
@@ -44,7 +44,7 @@
#include "r700_debug.h"
-void insert_wpos_code(GLcontext *ctx, struct gl_fragment_program *fprog)
+void insert_wpos_code(struct gl_context *ctx, struct gl_fragment_program *fprog)
{
static const gl_state_index winstate[STATE_LENGTH]
= { STATE_INTERNAL, STATE_FB_SIZE, 0, 0, 0};
@@ -95,7 +95,7 @@ void insert_wpos_code(GLcontext *ctx, struct gl_fragment_program *fprog)
//TODO : Validate FP input with VP output.
void Map_Fragment_Program(r700_AssemblerBase *pAsm,
struct gl_fragment_program *mesa_fp,
- GLcontext *ctx)
+ struct gl_context *ctx)
{
unsigned int unBit;
unsigned int i;
@@ -353,7 +353,7 @@ GLboolean Find_Instruction_Dependencies_fp(struct r700_fragment_program *fp,
GLboolean r700TranslateFragmentShader(struct r700_fragment_program *fp,
struct gl_fragment_program *mesa_fp,
- GLcontext *ctx)
+ struct gl_context *ctx)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -466,7 +466,7 @@ GLboolean r700TranslateFragmentShader(struct r700_fragment_program *fp,
return GL_TRUE;
}
-void r700SelectFragmentShader(GLcontext *ctx)
+void r700SelectFragmentShader(struct gl_context *ctx)
{
context_t *context = R700_CONTEXT(ctx);
struct r700_fragment_program *fp = (struct r700_fragment_program *)
@@ -480,7 +480,7 @@ void r700SelectFragmentShader(GLcontext *ctx)
r700TranslateFragmentShader(fp, &(fp->mesa_program), ctx);
}
-void * r700GetActiveFpShaderBo(GLcontext * ctx)
+void * r700GetActiveFpShaderBo(struct gl_context * ctx)
{
struct r700_fragment_program *fp = (struct r700_fragment_program *)
(ctx->FragmentProgram._Current);
@@ -488,7 +488,7 @@ void * r700GetActiveFpShaderBo(GLcontext * ctx)
return fp->shaderbo;
}
-void * r700GetActiveFpShaderConstBo(GLcontext * ctx)
+void * r700GetActiveFpShaderConstBo(struct gl_context * ctx)
{
struct r700_fragment_program *fp = (struct r700_fragment_program *)
(ctx->FragmentProgram._Current);
@@ -496,7 +496,7 @@ void * r700GetActiveFpShaderConstBo(GLcontext * ctx)
return fp->constbo0;
}
-GLboolean r700SetupFragmentProgram(GLcontext * ctx)
+GLboolean r700SetupFragmentProgram(struct gl_context * ctx)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
diff --git a/src/mesa/drivers/dri/r600/r700_fragprog.h b/src/mesa/drivers/dri/r600/r700_fragprog.h
index aaa6043d5d8..bdb95ff0e71 100644
--- a/src/mesa/drivers/dri/r600/r700_fragprog.h
+++ b/src/mesa/drivers/dri/r600/r700_fragprog.h
@@ -51,25 +51,25 @@ struct r700_fragment_program
};
/* Internal */
-void insert_wpos_code(GLcontext *ctx, struct gl_fragment_program *fprog);
+void insert_wpos_code(struct gl_context *ctx, struct gl_fragment_program *fprog);
void Map_Fragment_Program(r700_AssemblerBase *pAsm,
struct gl_fragment_program *mesa_fp,
- GLcontext *ctx);
+ struct gl_context *ctx);
GLboolean Find_Instruction_Dependencies_fp(struct r700_fragment_program *fp,
struct gl_fragment_program *mesa_fp);
GLboolean r700TranslateFragmentShader(struct r700_fragment_program *fp,
struct gl_fragment_program *mesa_vp,
- GLcontext *ctx);
+ struct gl_context *ctx);
/* Interface */
-extern void r700SelectFragmentShader(GLcontext *ctx);
+extern void r700SelectFragmentShader(struct gl_context *ctx);
-extern GLboolean r700SetupFragmentProgram(GLcontext * ctx);
+extern GLboolean r700SetupFragmentProgram(struct gl_context * ctx);
-extern void * r700GetActiveFpShaderBo(GLcontext * ctx);
+extern void * r700GetActiveFpShaderBo(struct gl_context * ctx);
-extern void * r700GetActiveFpShaderConstBo(GLcontext * ctx);
+extern void * r700GetActiveFpShaderConstBo(struct gl_context * ctx);
#endif /*_R700_FRAGPROG_H_*/
diff --git a/src/mesa/drivers/dri/r600/r700_oglprog.c b/src/mesa/drivers/dri/r600/r700_oglprog.c
index e0c9179004d..6ca74580035 100644
--- a/src/mesa/drivers/dri/r600/r700_oglprog.c
+++ b/src/mesa/drivers/dri/r600/r700_oglprog.c
@@ -40,7 +40,7 @@
#include "r700_vertprog.h"
-static void freeVertProgCache(GLcontext *ctx, struct r700_vertex_program_cont *cache)
+static void freeVertProgCache(struct gl_context *ctx, struct r700_vertex_program_cont *cache)
{
struct r700_vertex_program *tmp, *vp = cache->progs;
@@ -64,7 +64,7 @@ static void freeVertProgCache(GLcontext *ctx, struct r700_vertex_program_cont *c
}
}
-static struct gl_program *r700NewProgram(GLcontext * ctx,
+static struct gl_program *r700NewProgram(struct gl_context * ctx,
GLenum target,
GLuint id)
{
@@ -109,7 +109,7 @@ static struct gl_program *r700NewProgram(GLcontext * ctx,
return pProgram;
}
-static void r700DeleteProgram(GLcontext * ctx, struct gl_program *prog)
+static void r700DeleteProgram(struct gl_context * ctx, struct gl_program *prog)
{
struct r700_vertex_program_cont *vpc = (struct r700_vertex_program_cont *)prog;
struct r700_fragment_program * fp;
@@ -147,7 +147,7 @@ static void r700DeleteProgram(GLcontext * ctx, struct gl_program *prog)
}
static GLboolean
-r700ProgramStringNotify(GLcontext * ctx, GLenum target, struct gl_program *prog)
+r700ProgramStringNotify(struct gl_context * ctx, GLenum target, struct gl_program *prog)
{
struct r700_vertex_program_cont *vpc = (struct r700_vertex_program_cont *)prog;
struct r700_fragment_program * fp = (struct r700_fragment_program*)prog;
@@ -178,7 +178,7 @@ r700ProgramStringNotify(GLcontext * ctx, GLenum target, struct gl_program *prog)
return GL_TRUE;
}
-static GLboolean r700IsProgramNative(GLcontext * ctx, GLenum target, struct gl_program *prog)
+static GLboolean r700IsProgramNative(struct gl_context * ctx, GLenum target, struct gl_program *prog)
{
return GL_TRUE;
diff --git a/src/mesa/drivers/dri/r600/r700_render.c b/src/mesa/drivers/dri/r600/r700_render.c
index f90c69c4166..bb14a239b77 100644
--- a/src/mesa/drivers/dri/r600/r700_render.c
+++ b/src/mesa/drivers/dri/r600/r700_render.c
@@ -244,7 +244,7 @@ static int r700NumVerts(int num_verts, int prim)
return num_verts - verts_off;
}
-static void r700RunRenderPrimitive(GLcontext * ctx, int start, int end,
+static void r700RunRenderPrimitive(struct gl_context * ctx, int start, int end,
int prim, GLint basevertex)
{
context_t *context = R700_CONTEXT(ctx);
@@ -315,7 +315,7 @@ static void r700RunRenderPrimitive(GLcontext * ctx, int start, int end,
COMMIT_BATCH();
}
-static void r700RunRenderPrimitiveImmediate(GLcontext * ctx, int start, int end, int prim)
+static void r700RunRenderPrimitiveImmediate(struct gl_context * ctx, int start, int end, int prim)
{
context_t *context = R700_CONTEXT(ctx);
BATCH_LOCALS(&context->radeon);
@@ -434,7 +434,7 @@ static void r700RunRenderPrimitiveImmediate(GLcontext * ctx, int start, int end,
/* start 3d, idle, cb/db flush */
#define PRE_EMIT_STATE_BUFSZ 5 + 5 + 14
-static GLuint r700PredictRenderSize(GLcontext* ctx,
+static GLuint r700PredictRenderSize(struct gl_context* ctx,
const struct _mesa_prim *prim,
const struct _mesa_index_buffer *ib,
GLuint nr_prims)
@@ -501,7 +501,7 @@ static GLuint r700PredictRenderSize(GLcontext* ctx,
* Convert attribute data type to float
* If the attribute uses named buffer object replace the bo with newly allocated bo
*/
-static void r700ConvertAttrib(GLcontext *ctx, int count,
+static void r700ConvertAttrib(struct gl_context *ctx, int count,
const struct gl_client_array *input,
struct StreamDesc *attr)
{
@@ -580,7 +580,7 @@ static void r700ConvertAttrib(GLcontext *ctx, int count,
}
}
-static void r700AlignDataToDword(GLcontext *ctx,
+static void r700AlignDataToDword(struct gl_context *ctx,
const struct gl_client_array *input,
int count,
struct StreamDesc *attr)
@@ -622,7 +622,7 @@ static void r700AlignDataToDword(GLcontext *ctx,
attr->stride = dst_stride;
}
-static void r700SetupStreams(GLcontext *ctx, const struct gl_client_array *input[], int count)
+static void r700SetupStreams(struct gl_context *ctx, const struct gl_client_array *input[], int count)
{
context_t *context = R700_CONTEXT(ctx);
GLuint stride;
@@ -723,7 +723,7 @@ static void r700SetupStreams(GLcontext *ctx, const struct gl_client_array *input
RADEON_GEM_DOMAIN_GTT, 0);
}
-static void r700FreeData(GLcontext *ctx)
+static void r700FreeData(struct gl_context *ctx)
{
/* Need to zero tcl.aos[n].bo and tcl.elt_dma_bo
* to prevent double unref in radeonReleaseArrays
@@ -748,7 +748,7 @@ static void r700FreeData(GLcontext *ctx)
}
}
-static void r700FixupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer *mesa_ind_buf)
+static void r700FixupIndexBuffer(struct gl_context *ctx, const struct _mesa_index_buffer *mesa_ind_buf)
{
context_t *context = R700_CONTEXT(ctx);
GLvoid *src_ptr;
@@ -823,7 +823,7 @@ static void r700FixupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer
}
}
-static void r700SetupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer *mesa_ind_buf)
+static void r700SetupIndexBuffer(struct gl_context *ctx, const struct _mesa_index_buffer *mesa_ind_buf)
{
context_t *context = R700_CONTEXT(ctx);
@@ -876,7 +876,7 @@ static void r700SetupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer
}
}
-static GLboolean check_fallbacks(GLcontext *ctx)
+static GLboolean check_fallbacks(struct gl_context *ctx)
{
if (ctx->RenderMode != GL_RENDER)
return GL_TRUE;
@@ -884,7 +884,7 @@ static GLboolean check_fallbacks(GLcontext *ctx)
return GL_FALSE;
}
-static GLboolean r700TryDrawPrims(GLcontext *ctx,
+static GLboolean r700TryDrawPrims(struct gl_context *ctx,
const struct gl_client_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
@@ -972,7 +972,7 @@ static GLboolean r700TryDrawPrims(GLcontext *ctx,
return GL_TRUE;
}
-static void r700DrawPrims(GLcontext *ctx,
+static void r700DrawPrims(struct gl_context *ctx,
const struct gl_client_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
@@ -1011,7 +1011,7 @@ static void r700DrawPrims(GLcontext *ctx,
}
}
-void r700InitDraw(GLcontext *ctx)
+void r700InitDraw(struct gl_context *ctx)
{
struct vbo_context *vbo = vbo_context(ctx);
diff --git a/src/mesa/drivers/dri/r600/r700_shader.c b/src/mesa/drivers/dri/r600/r700_shader.c
index 8b3ed5cd823..cbbfaed31c9 100644
--- a/src/mesa/drivers/dri/r600/r700_shader.c
+++ b/src/mesa/drivers/dri/r600/r700_shader.c
@@ -38,7 +38,7 @@
#include "r700_shader.h"
-void r700ShaderInit(GLcontext * ctx)
+void r700ShaderInit(struct gl_context * ctx)
{
}
diff --git a/src/mesa/drivers/dri/r600/r700_shader.h b/src/mesa/drivers/dri/r600/r700_shader.h
index 0599ffd901f..183dd33525f 100644
--- a/src/mesa/drivers/dri/r600/r700_shader.h
+++ b/src/mesa/drivers/dri/r600/r700_shader.h
@@ -33,7 +33,7 @@
#include "r700_shaderinst.h"
-void r700ShaderInit(GLcontext * ctx);
+void r700ShaderInit(struct gl_context * ctx);
typedef enum R700ShaderType
{
diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c
index 925b4ffe6dd..bd04a633b48 100644
--- a/src/mesa/drivers/dri/r600/r700_state.c
+++ b/src/mesa/drivers/dri/r600/r700_state.c
@@ -52,14 +52,14 @@
#include "r700_fragprog.h"
#include "r700_vertprog.h"
-void r600UpdateTextureState(GLcontext * ctx);
-static void r700SetClipPlaneState(GLcontext * ctx, GLenum cap, GLboolean state);
-static void r700UpdatePolygonMode(GLcontext * ctx);
-static void r700SetPolygonOffsetState(GLcontext * ctx, GLboolean state);
-static void r700SetStencilState(GLcontext * ctx, GLboolean state);
-static void r700UpdateWindow(GLcontext * ctx, int id);
-
-void r700UpdateShaders(GLcontext * ctx)
+void r600UpdateTextureState(struct gl_context * ctx);
+static void r700SetClipPlaneState(struct gl_context * ctx, GLenum cap, GLboolean state);
+static void r700UpdatePolygonMode(struct gl_context * ctx);
+static void r700SetPolygonOffsetState(struct gl_context * ctx, GLboolean state);
+static void r700SetStencilState(struct gl_context * ctx, GLboolean state);
+static void r700UpdateWindow(struct gl_context * ctx, int id);
+
+void r700UpdateShaders(struct gl_context * ctx)
{
context_t *context = R700_CONTEXT(ctx);
@@ -80,7 +80,7 @@ void r700UpdateShaders(GLcontext * ctx)
/*
* To correctly position primitives:
*/
-void r700UpdateViewportOffset(GLcontext * ctx) //------------------
+void r700UpdateViewportOffset(struct gl_context * ctx) //------------------
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -106,7 +106,7 @@ void r700UpdateViewportOffset(GLcontext * ctx) //------------------
radeonUpdateScissor(ctx);
}
-void r700UpdateStateParameters(GLcontext * ctx, GLuint new_state) //--------------------
+void r700UpdateStateParameters(struct gl_context * ctx, GLuint new_state) //--------------------
{
struct r700_fragment_program *fp =
(struct r700_fragment_program *)ctx->FragmentProgram._Current;
@@ -130,7 +130,7 @@ void r700UpdateStateParameters(GLcontext * ctx, GLuint new_state) //------------
/**
* Called by Mesa after an internal state update.
*/
-static void r700InvalidateState(GLcontext * ctx, GLuint new_state) //-------------------
+static void r700InvalidateState(struct gl_context * ctx, GLuint new_state) //-------------------
{
context_t *context = R700_CONTEXT(ctx);
@@ -190,7 +190,7 @@ static void r700InvalidateState(GLcontext * ctx, GLuint new_state) //-----------
context->radeon.NewGLState |= new_state;
}
-static void r700SetDBRenderState(GLcontext * ctx)
+static void r700SetDBRenderState(struct gl_context * ctx)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -245,13 +245,13 @@ static void r700SetDBRenderState(GLcontext * ctx)
}
}
-void r700UpdateShaderStates(GLcontext * ctx)
+void r700UpdateShaderStates(struct gl_context * ctx)
{
r700SetDBRenderState(ctx);
r600UpdateTextureState(ctx);
}
-static void r700SetDepthState(GLcontext * ctx)
+static void r700SetDepthState(struct gl_context * ctx)
{
struct radeon_renderbuffer *rrb;
context_t *context = R700_CONTEXT(ctx);
@@ -320,7 +320,7 @@ static void r700SetDepthState(GLcontext * ctx)
}
}
-static void r700SetAlphaState(GLcontext * ctx)
+static void r700SetAlphaState(struct gl_context * ctx)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -368,7 +368,7 @@ static void r700SetAlphaState(GLcontext * ctx)
}
-static void r700AlphaFunc(GLcontext * ctx, GLenum func, GLfloat ref) //---------------
+static void r700AlphaFunc(struct gl_context * ctx, GLenum func, GLfloat ref) //---------------
{
(void)func;
(void)ref;
@@ -376,7 +376,7 @@ static void r700AlphaFunc(GLcontext * ctx, GLenum func, GLfloat ref) //---------
}
-static void r700BlendColor(GLcontext * ctx, const GLfloat cf[4]) //----------------
+static void r700BlendColor(struct gl_context * ctx, const GLfloat cf[4]) //----------------
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -444,7 +444,7 @@ static int blend_factor(GLenum factor, GLboolean is_src)
}
}
-static void r700SetBlendState(GLcontext * ctx)
+static void r700SetBlendState(struct gl_context * ctx)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -576,13 +576,13 @@ static void r700SetBlendState(GLcontext * ctx)
}
-static void r700BlendEquationSeparate(GLcontext * ctx,
+static void r700BlendEquationSeparate(struct gl_context * ctx,
GLenum modeRGB, GLenum modeA) //-----------------
{
r700SetBlendState(ctx);
}
-static void r700BlendFuncSeparate(GLcontext * ctx,
+static void r700BlendFuncSeparate(struct gl_context * ctx,
GLenum sfactorRGB, GLenum dfactorRGB,
GLenum sfactorA, GLenum dfactorA) //------------------------
{
@@ -637,7 +637,7 @@ static GLuint translate_logicop(GLenum logicop)
* Used internally to update the r300->hw hardware state to match the
* current OpenGL state.
*/
-static void r700SetLogicOpState(GLcontext *ctx)
+static void r700SetLogicOpState(struct gl_context *ctx)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&R700_CONTEXT(ctx)->hw);
@@ -655,13 +655,13 @@ static void r700SetLogicOpState(GLcontext *ctx)
* Called by Mesa when an application program changes the LogicOp state
* via glLogicOp.
*/
-static void r700LogicOpcode(GLcontext *ctx, GLenum logicop)
+static void r700LogicOpcode(struct gl_context *ctx, GLenum logicop)
{
if (RGBA_LOGICOP_ENABLED(ctx))
r700SetLogicOpState(ctx);
}
-static void r700UpdateCulling(GLcontext * ctx)
+static void r700UpdateCulling(struct gl_context * ctx)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&R700_CONTEXT(ctx)->hw);
@@ -713,7 +713,7 @@ static void r700UpdateCulling(GLcontext * ctx)
r700->PA_SU_SC_MODE_CNTL.u32All ^= FACE_bit;
}
-static void r700UpdateLineStipple(GLcontext * ctx)
+static void r700UpdateLineStipple(struct gl_context * ctx)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&R700_CONTEXT(ctx)->hw);
@@ -730,7 +730,7 @@ static void r700UpdateLineStipple(GLcontext * ctx)
}
}
-static void r700Enable(GLcontext * ctx, GLenum cap, GLboolean state) //------------------
+static void r700Enable(struct gl_context * ctx, GLenum cap, GLboolean state) //------------------
{
context_t *context = R700_CONTEXT(ctx);
@@ -794,7 +794,7 @@ static void r700Enable(GLcontext * ctx, GLenum cap, GLboolean state) //---------
/**
* Handle glColorMask()
*/
-static void r700ColorMask(GLcontext * ctx,
+static void r700ColorMask(struct gl_context * ctx,
GLboolean r, GLboolean g, GLboolean b, GLboolean a) //------------------
{
context_t *context = R700_CONTEXT(ctx);
@@ -815,7 +815,7 @@ static void r700ColorMask(GLcontext * ctx,
*
* \note Mesa already filters redundant calls to this function.
*/
-static void r700DepthFunc(GLcontext * ctx, GLenum func) //--------------------
+static void r700DepthFunc(struct gl_context * ctx, GLenum func) //--------------------
{
r700SetDepthState(ctx);
}
@@ -825,7 +825,7 @@ static void r700DepthFunc(GLcontext * ctx, GLenum func) //--------------------
*
* \note Mesa already filters redundant calls to this function.
*/
-static void r700DepthMask(GLcontext * ctx, GLboolean mask) //------------------
+static void r700DepthMask(struct gl_context * ctx, GLboolean mask) //------------------
{
r700SetDepthState(ctx);
}
@@ -835,7 +835,7 @@ static void r700DepthMask(GLcontext * ctx, GLboolean mask) //------------------
*
* \note Mesa already filters redundant calls to this function.
*/
-static void r700CullFace(GLcontext * ctx, GLenum mode) //-----------------
+static void r700CullFace(struct gl_context * ctx, GLenum mode) //-----------------
{
r700UpdateCulling(ctx);
}
@@ -843,7 +843,7 @@ static void r700CullFace(GLcontext * ctx, GLenum mode) //-----------------
/* =============================================================
* Fog
*/
-static void r700Fogfv(GLcontext * ctx, GLenum pname, const GLfloat * param) //--------------
+static void r700Fogfv(struct gl_context * ctx, GLenum pname, const GLfloat * param) //--------------
{
}
@@ -852,13 +852,13 @@ static void r700Fogfv(GLcontext * ctx, GLenum pname, const GLfloat * param) //--
*
* \note Mesa already filters redundant calls to this function.
*/
-static void r700FrontFace(GLcontext * ctx, GLenum mode) //------------------
+static void r700FrontFace(struct gl_context * ctx, GLenum mode) //------------------
{
r700UpdateCulling(ctx);
r700UpdatePolygonMode(ctx);
}
-static void r700ShadeModel(GLcontext * ctx, GLenum mode) //--------------------
+static void r700ShadeModel(struct gl_context * ctx, GLenum mode) //--------------------
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -881,7 +881,7 @@ static void r700ShadeModel(GLcontext * ctx, GLenum mode) //--------------------
/* =============================================================
* Point state
*/
-static void r700PointSize(GLcontext * ctx, GLfloat size)
+static void r700PointSize(struct gl_context * ctx, GLfloat size)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -903,7 +903,7 @@ static void r700PointSize(GLcontext * ctx, GLfloat size)
}
-static void r700PointParameter(GLcontext * ctx, GLenum pname, const GLfloat * param) //---------------
+static void r700PointParameter(struct gl_context * ctx, GLenum pname, const GLfloat * param) //---------------
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -980,7 +980,7 @@ static int translate_stencil_op(int op)
return 0;
}
-static void r700SetStencilState(GLcontext * ctx, GLboolean state)
+static void r700SetStencilState(struct gl_context * ctx, GLboolean state)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -1002,7 +1002,7 @@ static void r700SetStencilState(GLcontext * ctx, GLboolean state)
}
}
-static void r700StencilFuncSeparate(GLcontext * ctx, GLenum face,
+static void r700StencilFuncSeparate(struct gl_context * ctx, GLenum face,
GLenum func, GLint ref, GLuint mask) //---------------------
{
context_t *context = R700_CONTEXT(ctx);
@@ -1032,7 +1032,7 @@ static void r700StencilFuncSeparate(GLcontext * ctx, GLenum face,
}
-static void r700StencilMaskSeparate(GLcontext * ctx, GLenum face, GLuint mask) //--------------
+static void r700StencilMaskSeparate(struct gl_context * ctx, GLenum face, GLuint mask) //--------------
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -1050,7 +1050,7 @@ static void r700StencilMaskSeparate(GLcontext * ctx, GLenum face, GLuint mask) /
}
-static void r700StencilOpSeparate(GLcontext * ctx, GLenum face,
+static void r700StencilOpSeparate(struct gl_context * ctx, GLenum face,
GLenum fail, GLenum zfail, GLenum zpass) //--------------------
{
context_t *context = R700_CONTEXT(ctx);
@@ -1074,7 +1074,7 @@ static void r700StencilOpSeparate(GLcontext * ctx, GLenum face,
STENCILZPASS_BF_shift, STENCILZPASS_BF_mask);
}
-static void r700UpdateWindow(GLcontext * ctx, int id) //--------------------
+static void r700UpdateWindow(struct gl_context * ctx, int id) //--------------------
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -1131,7 +1131,7 @@ static void r700UpdateWindow(GLcontext * ctx, int id) //--------------------
}
-static void r700Viewport(GLcontext * ctx,
+static void r700Viewport(struct gl_context * ctx,
GLint x,
GLint y,
GLsizei width,
@@ -1142,12 +1142,12 @@ static void r700Viewport(GLcontext * ctx,
radeon_viewport(ctx, x, y, width, height);
}
-static void r700DepthRange(GLcontext * ctx, GLclampd nearval, GLclampd farval) //-------------
+static void r700DepthRange(struct gl_context * ctx, GLclampd nearval, GLclampd farval) //-------------
{
r700UpdateWindow(ctx, 0);
}
-static void r700LineWidth(GLcontext * ctx, GLfloat widthf) //---------------
+static void r700LineWidth(struct gl_context * ctx, GLfloat widthf) //---------------
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -1161,7 +1161,7 @@ static void r700LineWidth(GLcontext * ctx, GLfloat widthf) //---------------
PA_SU_LINE_CNTL__WIDTH_shift, PA_SU_LINE_CNTL__WIDTH_mask);
}
-static void r700LineStipple(GLcontext *ctx, GLint factor, GLushort pattern)
+static void r700LineStipple(struct gl_context *ctx, GLint factor, GLushort pattern)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -1173,7 +1173,7 @@ static void r700LineStipple(GLcontext *ctx, GLint factor, GLushort pattern)
SETfield(r700->PA_SC_LINE_STIPPLE.u32All, 1, AUTO_RESET_CNTL_shift, AUTO_RESET_CNTL_mask);
}
-static void r700SetPolygonOffsetState(GLcontext * ctx, GLboolean state)
+static void r700SetPolygonOffsetState(struct gl_context * ctx, GLboolean state)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -1191,7 +1191,7 @@ static void r700SetPolygonOffsetState(GLcontext * ctx, GLboolean state)
}
}
-static void r700PolygonOffset(GLcontext * ctx, GLfloat factor, GLfloat units) //--------------
+static void r700PolygonOffset(struct gl_context * ctx, GLfloat factor, GLfloat units) //--------------
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -1221,7 +1221,7 @@ static void r700PolygonOffset(GLcontext * ctx, GLfloat factor, GLfloat units) //
r700->PA_SU_POLY_OFFSET_BACK_OFFSET.f32All = constant;
}
-static void r700UpdatePolygonMode(GLcontext * ctx)
+static void r700UpdatePolygonMode(struct gl_context * ctx)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -1276,7 +1276,7 @@ static void r700UpdatePolygonMode(GLcontext * ctx)
}
}
-static void r700PolygonMode(GLcontext * ctx, GLenum face, GLenum mode) //------------------
+static void r700PolygonMode(struct gl_context * ctx, GLenum face, GLenum mode) //------------------
{
(void)face;
(void)mode;
@@ -1284,11 +1284,11 @@ static void r700PolygonMode(GLcontext * ctx, GLenum face, GLenum mode) //-------
r700UpdatePolygonMode(ctx);
}
-static void r700RenderMode(GLcontext * ctx, GLenum mode) //---------------------
+static void r700RenderMode(struct gl_context * ctx, GLenum mode) //---------------------
{
}
-static void r700ClipPlane( GLcontext *ctx, GLenum plane, const GLfloat *eq )
+static void r700ClipPlane( struct gl_context *ctx, GLenum plane, const GLfloat *eq )
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -1306,7 +1306,7 @@ static void r700ClipPlane( GLcontext *ctx, GLenum plane, const GLfloat *eq )
r700->ucp[p].PA_CL_UCP_0_W.u32All = ip[3];
}
-static void r700SetClipPlaneState(GLcontext * ctx, GLenum cap, GLboolean state)
+static void r700SetClipPlaneState(struct gl_context * ctx, GLenum cap, GLboolean state)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -1428,7 +1428,7 @@ void r700SetScissor(context_t *context) //---------------
r700->viewport[id].enabled = GL_TRUE;
}
-static void r700InitSQConfig(GLcontext * ctx)
+static void r700InitSQConfig(struct gl_context * ctx)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
@@ -1635,7 +1635,7 @@ static void r700InitSQConfig(GLcontext * ctx)
* Assumes that the command buffer and state atoms have been
* initialized already.
*/
-void r700InitState(GLcontext * ctx) //-------------------
+void r700InitState(struct gl_context * ctx) //-------------------
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
diff --git a/src/mesa/drivers/dri/r600/r700_state.h b/src/mesa/drivers/dri/r600/r700_state.h
index 56885e0b154..2d51198c8a8 100644
--- a/src/mesa/drivers/dri/r600/r700_state.h
+++ b/src/mesa/drivers/dri/r600/r700_state.h
@@ -33,13 +33,13 @@
#include "r700_chip.h"
-extern void r700UpdateStateParameters(GLcontext * ctx, GLuint new_state);
-extern void r700UpdateShaders (GLcontext * ctx);
-extern void r700UpdateShaderStates(GLcontext * ctx);
+extern void r700UpdateStateParameters(struct gl_context * ctx, GLuint new_state);
+extern void r700UpdateShaders (struct gl_context * ctx);
+extern void r700UpdateShaderStates(struct gl_context * ctx);
-extern void r700UpdateViewportOffset(GLcontext * ctx);
+extern void r700UpdateViewportOffset(struct gl_context * ctx);
-extern void r700InitState (GLcontext * ctx);
+extern void r700InitState (struct gl_context * ctx);
extern void r700InitStateFuncs (radeonContextPtr radeon, struct dd_function_table *functions);
extern void r700SetScissor(context_t *context);
diff --git a/src/mesa/drivers/dri/r600/r700_vertprog.c b/src/mesa/drivers/dri/r600/r700_vertprog.c
index 2fee5b4433e..7ba49d8f986 100644
--- a/src/mesa/drivers/dri/r600/r700_vertprog.c
+++ b/src/mesa/drivers/dri/r600/r700_vertprog.c
@@ -170,7 +170,7 @@ GLboolean Process_Vertex_Program_Vfetch_Instructions(
}
GLboolean Process_Vertex_Program_Vfetch_Instructions2(
- GLcontext *ctx,
+ struct gl_context *ctx,
struct r700_vertex_program *vp,
struct gl_vertex_program *mesa_vp)
{
@@ -197,7 +197,7 @@ GLboolean Process_Vertex_Program_Vfetch_Instructions2(
return GL_TRUE;
}
-void Map_Vertex_Program(GLcontext *ctx,
+void Map_Vertex_Program(struct gl_context *ctx,
struct r700_vertex_program *vp,
struct gl_vertex_program *mesa_vp)
{
@@ -293,7 +293,7 @@ GLboolean Find_Instruction_Dependencies_vp(struct r700_vertex_program *vp,
return GL_TRUE;
}
-struct r700_vertex_program* r700TranslateVertexShader(GLcontext *ctx,
+struct r700_vertex_program* r700TranslateVertexShader(struct gl_context *ctx,
struct gl_vertex_program *mesa_vp)
{
context_t *context = R700_CONTEXT(ctx);
@@ -385,7 +385,7 @@ struct r700_vertex_program* r700TranslateVertexShader(GLcontext *ctx,
return vp;
}
-void r700SelectVertexShader(GLcontext *ctx)
+void r700SelectVertexShader(struct gl_context *ctx)
{
context_t *context = R700_CONTEXT(ctx);
struct r700_vertex_program_cont *vpc;
@@ -459,7 +459,7 @@ int getTypeSize(GLenum type)
}
}
-static void r700TranslateAttrib(GLcontext *ctx, GLuint unLoc, int count, const struct gl_client_array *input)
+static void r700TranslateAttrib(struct gl_context *ctx, GLuint unLoc, int count, const struct gl_client_array *input)
{
context_t *context = R700_CONTEXT(ctx);
@@ -545,7 +545,7 @@ static void r700TranslateAttrib(GLcontext *ctx, GLuint unLoc, int count, const s
context->nNumActiveAos++;
}
-void r700SetVertexFormat(GLcontext *ctx, const struct gl_client_array *arrays[], int count)
+void r700SetVertexFormat(struct gl_context *ctx, const struct gl_client_array *arrays[], int count)
{
context_t *context = R700_CONTEXT(ctx);
struct r700_vertex_program *vpc
@@ -574,7 +574,7 @@ void r700SetVertexFormat(GLcontext *ctx, const struct gl_client_array *arrays[],
context->radeon.tcl.aos_count = context->nNumActiveAos;
}
-void * r700GetActiveVpShaderBo(GLcontext * ctx)
+void * r700GetActiveVpShaderBo(struct gl_context * ctx)
{
context_t *context = R700_CONTEXT(ctx);
struct r700_vertex_program *vp = context->selected_vp;;
@@ -585,7 +585,7 @@ void * r700GetActiveVpShaderBo(GLcontext * ctx)
return NULL;
}
-void * r700GetActiveVpShaderConstBo(GLcontext * ctx)
+void * r700GetActiveVpShaderConstBo(struct gl_context * ctx)
{
context_t *context = R700_CONTEXT(ctx);
struct r700_vertex_program *vp = context->selected_vp;;
@@ -596,7 +596,7 @@ void * r700GetActiveVpShaderConstBo(GLcontext * ctx)
return NULL;
}
-GLboolean r700SetupVertexProgram(GLcontext * ctx)
+GLboolean r700SetupVertexProgram(struct gl_context * ctx)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
diff --git a/src/mesa/drivers/dri/r600/r700_vertprog.h b/src/mesa/drivers/dri/r600/r700_vertprog.h
index 9acdc8e3501..859afb6e97c 100644
--- a/src/mesa/drivers/dri/r600/r700_vertprog.h
+++ b/src/mesa/drivers/dri/r600/r700_vertprog.h
@@ -80,27 +80,27 @@ GLboolean Process_Vertex_Program_Vfetch_Instructions(
struct r700_vertex_program *vp,
struct gl_vertex_program *mesa_vp);
GLboolean Process_Vertex_Program_Vfetch_Instructions2(
- GLcontext *ctx,
+ struct gl_context *ctx,
struct r700_vertex_program *vp,
struct gl_vertex_program *mesa_vp);
-void Map_Vertex_Program(GLcontext *ctx,
+void Map_Vertex_Program(struct gl_context *ctx,
struct r700_vertex_program *vp,
struct gl_vertex_program *mesa_vp);
GLboolean Find_Instruction_Dependencies_vp(struct r700_vertex_program *vp,
struct gl_vertex_program *mesa_vp);
-struct r700_vertex_program* r700TranslateVertexShader(GLcontext *ctx,
+struct r700_vertex_program* r700TranslateVertexShader(struct gl_context *ctx,
struct gl_vertex_program *mesa_vp);
/* Interface */
-extern void r700SelectVertexShader(GLcontext *ctx);
-extern void r700SetVertexFormat(GLcontext *ctx, const struct gl_client_array *arrays[], int count);
+extern void r700SelectVertexShader(struct gl_context *ctx);
+extern void r700SetVertexFormat(struct gl_context *ctx, const struct gl_client_array *arrays[], int count);
-extern GLboolean r700SetupVertexProgram(GLcontext * ctx);
+extern GLboolean r700SetupVertexProgram(struct gl_context * ctx);
-extern void * r700GetActiveVpShaderBo(GLcontext * ctx);
+extern void * r700GetActiveVpShaderBo(struct gl_context * ctx);
-extern void * r700GetActiveVpShaderConstBo(GLcontext * ctx);
+extern void * r700GetActiveVpShaderConstBo(struct gl_context * ctx);
extern int getTypeSize(GLenum type);
diff --git a/src/mesa/drivers/dri/radeon/radeon_blit.c b/src/mesa/drivers/dri/radeon/radeon_blit.c
index 143822361e1..fe14540bc2e 100644
--- a/src/mesa/drivers/dri/radeon/radeon_blit.c
+++ b/src/mesa/drivers/dri/radeon/radeon_blit.c
@@ -321,7 +321,7 @@ static inline void emit_draw_packet(struct r100_context *r100,
* @param[in] height region height
* @param[in] flip_y set if y coords of the source image need to be flipped
*/
-unsigned r100_blit(GLcontext *ctx,
+unsigned r100_blit(struct gl_context *ctx,
struct radeon_bo *src_bo,
intptr_t src_offset,
gl_format src_mesaformat,
diff --git a/src/mesa/drivers/dri/radeon/radeon_blit.h b/src/mesa/drivers/dri/radeon/radeon_blit.h
index d7d0b5554a6..5e5c73481a6 100644
--- a/src/mesa/drivers/dri/radeon/radeon_blit.h
+++ b/src/mesa/drivers/dri/radeon/radeon_blit.h
@@ -32,7 +32,7 @@ void r100_blit_init(struct r100_context *r100);
unsigned r100_check_blit(gl_format mesa_format);
-unsigned r100_blit(GLcontext *ctx,
+unsigned r100_blit(struct gl_context *ctx,
struct radeon_bo *src_bo,
intptr_t src_offset,
gl_format src_mesaformat,
diff --git a/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c b/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c
index 0897dafbd8b..0d1af726c07 100644
--- a/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c
+++ b/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c
@@ -40,7 +40,7 @@ get_radeon_buffer_object(struct gl_buffer_object *obj)
}
static struct gl_buffer_object *
-radeonNewBufferObject(GLcontext * ctx,
+radeonNewBufferObject(struct gl_context * ctx,
GLuint name,
GLenum target)
{
@@ -57,7 +57,7 @@ radeonNewBufferObject(GLcontext * ctx,
* Called via glDeleteBuffersARB().
*/
static void
-radeonDeleteBufferObject(GLcontext * ctx,
+radeonDeleteBufferObject(struct gl_context * ctx,
struct gl_buffer_object *obj)
{
struct radeon_buffer_object *radeon_obj = get_radeon_buffer_object(obj);
@@ -82,7 +82,7 @@ radeonDeleteBufferObject(GLcontext * ctx,
* \return GL_TRUE for success, GL_FALSE if out of memory
*/
static GLboolean
-radeonBufferData(GLcontext * ctx,
+radeonBufferData(struct gl_context * ctx,
GLenum target,
GLsizeiptrARB size,
const GLvoid * data,
@@ -129,7 +129,7 @@ radeonBufferData(GLcontext * ctx,
* Called via glBufferSubDataARB().
*/
static void
-radeonBufferSubData(GLcontext * ctx,
+radeonBufferSubData(struct gl_context * ctx,
GLenum target,
GLintptrARB offset,
GLsizeiptrARB size,
@@ -154,7 +154,7 @@ radeonBufferSubData(GLcontext * ctx,
* Called via glGetBufferSubDataARB()
*/
static void
-radeonGetBufferSubData(GLcontext * ctx,
+radeonGetBufferSubData(struct gl_context * ctx,
GLenum target,
GLintptrARB offset,
GLsizeiptrARB size,
@@ -174,7 +174,7 @@ radeonGetBufferSubData(GLcontext * ctx,
* Called via glMapBufferARB()
*/
static void *
-radeonMapBuffer(GLcontext * ctx,
+radeonMapBuffer(struct gl_context * ctx,
GLenum target,
GLenum access,
struct gl_buffer_object *obj)
@@ -204,7 +204,7 @@ radeonMapBuffer(GLcontext * ctx,
* Called via glUnmapBufferARB()
*/
static GLboolean
-radeonUnmapBuffer(GLcontext * ctx,
+radeonUnmapBuffer(struct gl_context * ctx,
GLenum target,
struct gl_buffer_object *obj)
{
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index c1a660af3d0..43a6355ad8b 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -201,7 +201,7 @@ void radeonSetCliprects(radeonContextPtr radeon)
-void radeonUpdateScissor( GLcontext *ctx )
+void radeonUpdateScissor( struct gl_context *ctx )
{
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
GLint x = ctx->Scissor.X, y = ctx->Scissor.Y;
@@ -252,7 +252,7 @@ void radeonUpdateScissor( GLcontext *ctx )
* Scissoring
*/
-void radeonScissor(GLcontext* ctx, GLint x, GLint y, GLsizei w, GLsizei h)
+void radeonScissor(struct gl_context* ctx, GLint x, GLint y, GLsizei w, GLsizei h)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
if (ctx->Scissor.Enabled) {
@@ -578,7 +578,7 @@ void radeonSwapBuffers(__DRIdrawable * dPriv)
if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) {
radeonContextPtr radeon;
- GLcontext *ctx;
+ struct gl_context *ctx;
radeon = (radeonContextPtr) dPriv->driContextPriv->driverPrivate;
ctx = radeon->glCtx;
@@ -620,7 +620,7 @@ void radeonCopySubBuffer(__DRIdrawable * dPriv,
{
if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) {
radeonContextPtr radeon;
- GLcontext *ctx;
+ struct gl_context *ctx;
radeon = (radeonContextPtr) dPriv->driContextPriv->driverPrivate;
ctx = radeon->glCtx;
@@ -646,7 +646,7 @@ void radeonCopySubBuffer(__DRIdrawable * dPriv,
* If so, set the intel->front_buffer_dirty field to true.
*/
void
-radeon_check_front_buffer_rendering(GLcontext *ctx)
+radeon_check_front_buffer_rendering(struct gl_context *ctx)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
const struct gl_framebuffer *fb = ctx->DrawBuffer;
@@ -662,7 +662,7 @@ radeon_check_front_buffer_rendering(GLcontext *ctx)
}
-void radeon_draw_buffer(GLcontext *ctx, struct gl_framebuffer *fb)
+void radeon_draw_buffer(struct gl_context *ctx, struct gl_framebuffer *fb)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
struct radeon_renderbuffer *rrbDepth = NULL, *rrbStencil = NULL,
@@ -817,7 +817,7 @@ void radeon_draw_buffer(GLcontext *ctx, struct gl_framebuffer *fb)
/**
* Called via glDrawBuffer.
*/
-void radeonDrawBuffer( GLcontext *ctx, GLenum mode )
+void radeonDrawBuffer( struct gl_context *ctx, GLenum mode )
{
if (RADEON_DEBUG & RADEON_DRI)
fprintf(stderr, "%s %s\n", __FUNCTION__,
@@ -844,7 +844,7 @@ void radeonDrawBuffer( GLcontext *ctx, GLenum mode )
radeon_draw_buffer(ctx, ctx->DrawBuffer);
}
-void radeonReadBuffer( GLcontext *ctx, GLenum mode )
+void radeonReadBuffer( struct gl_context *ctx, GLenum mode )
{
if ((ctx->DrawBuffer != NULL) && (ctx->DrawBuffer->Name == 0)) {
struct radeon_context *const rmesa = RADEON_CONTEXT(ctx);
@@ -891,11 +891,11 @@ void radeon_window_moved(radeonContextPtr radeon)
}
}
-void radeon_viewport(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height)
+void radeon_viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
__DRIcontext *driContext = radeon->dri.context;
- void (*old_viewport)(GLcontext *ctx, GLint x, GLint y,
+ void (*old_viewport)(struct gl_context *ctx, GLint x, GLint y,
GLsizei w, GLsizei h);
if (!driContext->driScreenPriv->dri2.enabled)
@@ -1064,7 +1064,7 @@ static INLINE void radeonEmitAtoms(radeonContextPtr radeon, GLboolean emitAll)
COMMIT_BATCH();
}
-static GLboolean radeon_revalidate_bos(GLcontext *ctx)
+static GLboolean radeon_revalidate_bos(struct gl_context *ctx)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
int ret;
@@ -1104,7 +1104,7 @@ void radeonEmitState(radeonContextPtr radeon)
}
-void radeonFlush(GLcontext *ctx)
+void radeonFlush(struct gl_context *ctx)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
if (RADEON_DEBUG & RADEON_IOCTL)
@@ -1145,7 +1145,7 @@ flush_front:
/* Make sure all commands have been sent to the hardware and have
* completed processing.
*/
-void radeonFinish(GLcontext * ctx)
+void radeonFinish(struct gl_context * ctx)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
struct gl_framebuffer *fb = ctx->DrawBuffer;
@@ -1327,7 +1327,7 @@ void rcommonBeginBatch(radeonContextPtr rmesa, int n,
}
-void radeonUserClear(GLcontext *ctx, GLuint mask)
+void radeonUserClear(struct gl_context *ctx, GLuint mask)
{
_mesa_meta_Clear(ctx, mask);
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.h b/src/mesa/drivers/dri/radeon/radeon_common.h
index 35b3f08fff9..85a114623ad 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.h
+++ b/src/mesa/drivers/dri/radeon/radeon_common.h
@@ -5,11 +5,11 @@
#include "radeon_dma.h"
#include "radeon_texture.h"
-void radeonUserClear(GLcontext *ctx, GLuint mask);
+void radeonUserClear(struct gl_context *ctx, GLuint mask);
void radeonRecalcScissorRects(radeonContextPtr radeon);
void radeonSetCliprects(radeonContextPtr radeon);
-void radeonUpdateScissor( GLcontext *ctx );
-void radeonScissor(GLcontext* ctx, GLint x, GLint y, GLsizei w, GLsizei h);
+void radeonUpdateScissor( struct gl_context *ctx );
+void radeonScissor(struct gl_context* ctx, GLint x, GLint y, GLsizei w, GLsizei h);
void radeonWaitForIdleLocked(radeonContextPtr radeon);
extern uint32_t radeonGetAge(radeonContextPtr radeon);
@@ -21,18 +21,18 @@ void radeonCopySubBuffer(__DRIdrawable * dPriv,
void radeonUpdatePageFlipping(radeonContextPtr rmesa);
-void radeonFlush(GLcontext *ctx);
-void radeonFinish(GLcontext * ctx);
+void radeonFlush(struct gl_context *ctx);
+void radeonFinish(struct gl_context * ctx);
void radeonEmitState(radeonContextPtr radeon);
GLuint radeonCountStateEmitSize(radeonContextPtr radeon);
-void radeon_clear_tris(GLcontext *ctx, GLbitfield mask);
+void radeon_clear_tris(struct gl_context *ctx, GLbitfield mask);
void radeon_window_moved(radeonContextPtr radeon);
-void radeon_draw_buffer(GLcontext *ctx, struct gl_framebuffer *fb);
-void radeonDrawBuffer( GLcontext *ctx, GLenum mode );
-void radeonReadBuffer( GLcontext *ctx, GLenum mode );
-void radeon_viewport(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height);
+void radeon_draw_buffer(struct gl_context *ctx, struct gl_framebuffer *fb);
+void radeonDrawBuffer( struct gl_context *ctx, GLenum mode );
+void radeonReadBuffer( struct gl_context *ctx, GLenum mode );
+void radeon_viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height);
void radeon_get_cliprects(radeonContextPtr radeon,
struct drm_clip_rect **cliprects,
unsigned int *num_cliprects,
@@ -45,12 +45,12 @@ struct radeon_renderbuffer *
radeon_create_renderbuffer(gl_format format, __DRIdrawable *driDrawPriv);
void
-radeonReadPixels(GLcontext * ctx,
+radeonReadPixels(struct gl_context * ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *pack, GLvoid * pixels);
-void radeon_check_front_buffer_rendering(GLcontext *ctx);
+void radeon_check_front_buffer_rendering(struct gl_context *ctx);
static inline struct radeon_renderbuffer *radeon_renderbuffer(struct gl_renderbuffer *rb)
{
struct radeon_renderbuffer *rrb = (struct radeon_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 85e4988c53f..40544860b3b 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c
@@ -105,7 +105,7 @@ static const char* get_chip_family_name(int chip_family)
/* Return various strings for glGetString().
*/
-static const GLubyte *radeonGetString(GLcontext * ctx, GLenum name)
+static const GLubyte *radeonGetString(struct gl_context * ctx, GLenum name)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
static char buffer[128];
@@ -180,14 +180,14 @@ static void radeonInitDriverFuncs(struct dd_function_table *functions)
*/
GLboolean radeonInitContext(radeonContextPtr radeon,
struct dd_function_table* functions,
- const __GLcontextModes * glVisual,
+ const struct gl_config * glVisual,
__DRIcontext * driContextPriv,
void *sharedContextPrivate)
{
__DRIscreen *sPriv = driContextPriv->driScreenPriv;
radeonScreenPtr screen = (radeonScreenPtr) (sPriv->private);
- GLcontext* ctx;
- GLcontext* shareCtx;
+ struct gl_context* ctx;
+ struct gl_context* shareCtx;
int fthrottle_mode;
/* Fill in additional standard functions. */
@@ -521,6 +521,7 @@ void radeon_prepare_render(radeonContextPtr radeon)
__DRIcontext *driContext = radeon->dri.context;
__DRIdrawable *drawable;
__DRIscreen *screen;
+ struct radeon_framebuffer *draw;
screen = driContext->driScreenPriv;
if (!screen->dri2.loader)
@@ -531,9 +532,10 @@ void radeon_prepare_render(radeonContextPtr radeon)
if (drawable->lastStamp != drawable->dri2.stamp)
radeon_update_renderbuffers(driContext, drawable, GL_FALSE);
- /* Intel driver does the equivalent of this, no clue if it is needed:
- * radeon_draw_buffer(radeon->glCtx, &(drawable->driverPrivate)->base);
- */
+ /* Intel driver does the equivalent of this, no clue if it is needed:*/
+ draw = drawable->driverPrivate;
+ radeon_draw_buffer(radeon->glCtx, &draw->base);
+
driContext->dri2.draw_stamp = drawable->dri2.stamp;
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.h b/src/mesa/drivers/dri/radeon/radeon_common_context.h
index 024e31f8ec7..c62913afd0c 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.h
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.h
@@ -159,8 +159,8 @@ struct radeon_state_atom {
GLuint *cmd; /* one or more cmd's */
GLuint *lastcmd; /* one or more cmd's */
GLboolean dirty; /* dirty-mark in emit_state_list */
- int (*check) (GLcontext *, struct radeon_state_atom *atom); /* is this state active? */
- void (*emit) (GLcontext *, struct radeon_state_atom *atom);
+ int (*check) (struct gl_context *, struct radeon_state_atom *atom); /* is this state active? */
+ void (*emit) (struct gl_context *, struct radeon_state_atom *atom);
};
struct radeon_hw_state {
@@ -316,7 +316,7 @@ struct radeon_dma {
* flush must be called before non-active vertex allocations can be
* performed.
*/
- void (*flush) (GLcontext *);
+ void (*flush) (struct gl_context *);
};
/* radeon_swtcl.c
@@ -432,7 +432,7 @@ struct radeon_cmdbuf {
};
struct radeon_context {
- GLcontext *glCtx;
+ struct gl_context *glCtx;
radeonScreenPtr radeonScreen; /* Screen private DRI data */
/* Texture object bookkeeping
@@ -518,17 +518,17 @@ struct radeon_context {
struct {
void (*get_lock)(radeonContextPtr radeon);
- void (*update_viewport_offset)(GLcontext *ctx);
+ void (*update_viewport_offset)(struct gl_context *ctx);
void (*emit_cs_header)(struct radeon_cs *cs, radeonContextPtr rmesa);
- void (*swtcl_flush)(GLcontext *ctx, uint32_t offset);
+ void (*swtcl_flush)(struct gl_context *ctx, uint32_t offset);
void (*pre_emit_atoms)(radeonContextPtr rmesa);
void (*pre_emit_state)(radeonContextPtr rmesa);
- void (*fallback)(GLcontext *ctx, GLuint bit, GLboolean mode);
- void (*free_context)(GLcontext *ctx);
+ void (*fallback)(struct gl_context *ctx, GLuint bit, GLboolean mode);
+ void (*free_context)(struct gl_context *ctx);
void (*emit_query_finish)(radeonContextPtr radeon);
- void (*update_scissor)(GLcontext *ctx);
+ void (*update_scissor)(struct gl_context *ctx);
unsigned (*check_blit)(gl_format mesa_format);
- unsigned (*blit)(GLcontext *ctx,
+ unsigned (*blit)(struct gl_context *ctx,
struct radeon_bo *src_bo,
intptr_t src_offset,
gl_format src_mesaformat,
@@ -611,7 +611,7 @@ static INLINE uint32_t radeonPackFloat24(float f)
GLboolean radeonInitContext(radeonContextPtr radeon,
struct dd_function_table* functions,
- const __GLcontextModes * glVisual,
+ const struct gl_config * glVisual,
__DRIcontext * driContextPriv,
void *sharedContextPrivate);
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c
index 0b92c514660..cc9590213c4 100644
--- a/src/mesa/drivers/dri/radeon/radeon_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_context.c
@@ -167,7 +167,7 @@ static void r100_vtbl_pre_emit_state(radeonContextPtr radeon)
radeon->hw.is_dirty = 1;
}
-static void r100_vtbl_free_context(GLcontext *ctx)
+static void r100_vtbl_free_context(struct gl_context *ctx)
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
_mesa_vector4f_free( &rmesa->tcl.ObjClean );
@@ -206,7 +206,7 @@ static void r100_init_vtbl(radeonContextPtr radeon)
*/
GLboolean
r100CreateContext( gl_api api,
- const __GLcontextModes *glVisual,
+ const struct gl_config *glVisual,
__DRIcontext *driContextPriv,
void *sharedContextPrivate)
{
@@ -214,7 +214,7 @@ r100CreateContext( gl_api api,
radeonScreenPtr screen = (radeonScreenPtr)(sPriv->private);
struct dd_function_table functions;
r100ContextPtr rmesa;
- GLcontext *ctx;
+ struct gl_context *ctx;
int i;
int tcl_mode, fthrottle_mode;
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.h b/src/mesa/drivers/dri/radeon/radeon_context.h
index c4bfbfdaeb3..de71aa2c6dd 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( gl_api api,
- const __GLcontextModes *glVisual,
+ const struct gl_config *glVisual,
__DRIcontext *driContextPriv,
void *sharedContextPrivate);
diff --git a/src/mesa/drivers/dri/radeon/radeon_dma.c b/src/mesa/drivers/dri/radeon/radeon_dma.c
index 31a45169daf..03d4e9656d7 100644
--- a/src/mesa/drivers/dri/radeon/radeon_dma.c
+++ b/src/mesa/drivers/dri/radeon/radeon_dma.c
@@ -133,7 +133,7 @@ void radeonEmitVec16(uint32_t *out, const GLvoid * data, int stride, int count)
}
}
-void rcommon_emit_vector(GLcontext * ctx, struct radeon_aos *aos,
+void rcommon_emit_vector(struct gl_context * ctx, struct radeon_aos *aos,
const GLvoid * data, int size, int stride, int count)
{
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
@@ -389,7 +389,7 @@ void radeonReleaseDmaRegions(radeonContextPtr rmesa)
/* Flush vertices in the current dma region.
*/
-void rcommon_flush_last_swtcl_prim( GLcontext *ctx )
+void rcommon_flush_last_swtcl_prim( struct gl_context *ctx )
{
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
struct radeon_dma *dma = &rmesa->dma;
@@ -462,7 +462,7 @@ rcommonAllocDmaLowVerts( radeonContextPtr rmesa, int nverts, int vsize )
return head;
}
-void radeonReleaseArrays( GLcontext *ctx, GLuint newinputs )
+void radeonReleaseArrays( struct gl_context *ctx, GLuint newinputs )
{
radeonContextPtr radeon = RADEON_CONTEXT( ctx );
int i;
diff --git a/src/mesa/drivers/dri/radeon/radeon_dma.h b/src/mesa/drivers/dri/radeon/radeon_dma.h
index 74e653fd189..ad6a3b8baab 100644
--- a/src/mesa/drivers/dri/radeon/radeon_dma.h
+++ b/src/mesa/drivers/dri/radeon/radeon_dma.h
@@ -38,7 +38,7 @@ void radeonEmitVec8(uint32_t *out, const GLvoid * data, int stride, int count);
void radeonEmitVec12(uint32_t *out, const GLvoid * data, int stride, int count);
void radeonEmitVec16(uint32_t *out, const GLvoid * data, int stride, int count);
-void rcommon_emit_vector(GLcontext * ctx, struct radeon_aos *aos,
+void rcommon_emit_vector(struct gl_context * ctx, struct radeon_aos *aos,
const GLvoid * data, int size, int stride, int count);
void radeonReturnDmaRegion(radeonContextPtr rmesa, int return_bytes);
@@ -50,9 +50,9 @@ void radeonAllocDmaRegion(radeonContextPtr rmesa,
int bytes, int alignment);
void radeonReleaseDmaRegions(radeonContextPtr rmesa);
-void rcommon_flush_last_swtcl_prim(GLcontext *ctx);
+void rcommon_flush_last_swtcl_prim(struct gl_context *ctx);
void *rcommonAllocDmaLowVerts(radeonContextPtr rmesa, int nverts, int vsize);
void radeonFreeDmaRegions(radeonContextPtr rmesa);
-void radeonReleaseArrays( GLcontext *ctx, GLuint newinputs );
+void radeonReleaseArrays( struct gl_context *ctx, GLuint newinputs );
#endif
diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c
index 0597d4250de..2a6fbaeaf09 100644
--- a/src/mesa/drivers/dri/radeon/radeon_fbo.c
+++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c
@@ -47,7 +47,7 @@
} while(0)
static struct gl_framebuffer *
-radeon_new_framebuffer(GLcontext *ctx, GLuint name)
+radeon_new_framebuffer(struct gl_context *ctx, GLuint name)
{
return _mesa_new_framebuffer(ctx, name);
}
@@ -70,7 +70,7 @@ radeon_delete_renderbuffer(struct gl_renderbuffer *rb)
}
static void *
-radeon_get_pointer(GLcontext *ctx, struct gl_renderbuffer *rb,
+radeon_get_pointer(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLint x, GLint y)
{
radeon_print(RADEON_TEXTURE, RADEON_TRACE,
@@ -85,7 +85,7 @@ radeon_get_pointer(GLcontext *ctx, struct gl_renderbuffer *rb,
* storage for a user-created renderbuffer.
*/
static GLboolean
-radeon_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
+radeon_alloc_renderbuffer_storage(struct gl_context * ctx, struct gl_renderbuffer *rb,
GLenum internalFormat,
GLuint width, GLuint height)
{
@@ -206,7 +206,7 @@ radeon_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
* Not used for user-created renderbuffers!
*/
static GLboolean
-radeon_alloc_window_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
+radeon_alloc_window_storage(struct gl_context * ctx, struct gl_renderbuffer *rb,
GLenum internalFormat, GLuint width, GLuint height)
{
ASSERT(rb->Name == 0);
@@ -223,7 +223,7 @@ radeon_alloc_window_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
static void
-radeon_resize_buffers(GLcontext *ctx, struct gl_framebuffer *fb,
+radeon_resize_buffers(struct gl_context *ctx, struct gl_framebuffer *fb,
GLuint width, GLuint height)
{
struct radeon_framebuffer *radeon_fb = (struct radeon_framebuffer*)fb;
@@ -255,7 +255,7 @@ radeon_resize_buffers(GLcontext *ctx, struct gl_framebuffer *fb,
/** Dummy function for gl_renderbuffer::AllocStorage() */
static GLboolean
-radeon_nop_alloc_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
+radeon_nop_alloc_storage(struct gl_context * ctx, struct gl_renderbuffer *rb,
GLenum internalFormat, GLuint width, GLuint height)
{
_mesa_problem(ctx, "radeon_op_alloc_storage should never be called.");
@@ -352,7 +352,7 @@ radeon_create_renderbuffer(gl_format format, __DRIdrawable *driDrawPriv)
}
static struct gl_renderbuffer *
-radeon_new_renderbuffer(GLcontext * ctx, GLuint name)
+radeon_new_renderbuffer(struct gl_context * ctx, GLuint name)
{
struct radeon_renderbuffer *rrb;
@@ -376,7 +376,7 @@ radeon_new_renderbuffer(GLcontext * ctx, GLuint name)
}
static void
-radeon_bind_framebuffer(GLcontext * ctx, GLenum target,
+radeon_bind_framebuffer(struct gl_context * ctx, GLenum target,
struct gl_framebuffer *fb, struct gl_framebuffer *fbread)
{
radeon_print(RADEON_TEXTURE, RADEON_TRACE,
@@ -393,7 +393,7 @@ radeon_bind_framebuffer(GLcontext * ctx, GLenum target,
}
static void
-radeon_framebuffer_renderbuffer(GLcontext * ctx,
+radeon_framebuffer_renderbuffer(struct gl_context * ctx,
struct gl_framebuffer *fb,
GLenum attachment, struct gl_renderbuffer *rb)
{
@@ -410,7 +410,7 @@ radeon_framebuffer_renderbuffer(GLcontext * ctx,
}
static GLboolean
-radeon_update_wrapper(GLcontext *ctx, struct radeon_renderbuffer *rrb,
+radeon_update_wrapper(struct gl_context *ctx, struct radeon_renderbuffer *rrb,
struct gl_texture_image *texImage)
{
radeon_print(RADEON_TEXTURE, RADEON_TRACE,
@@ -459,7 +459,7 @@ radeon_update_wrapper(GLcontext *ctx, struct radeon_renderbuffer *rrb,
static struct radeon_renderbuffer *
-radeon_wrap_texture(GLcontext * ctx, struct gl_texture_image *texImage)
+radeon_wrap_texture(struct gl_context * ctx, struct gl_texture_image *texImage)
{
const GLuint name = ~0; /* not significant, but distinct for debugging */
struct radeon_renderbuffer *rrb;
@@ -488,7 +488,7 @@ radeon_wrap_texture(GLcontext * ctx, struct gl_texture_image *texImage)
}
static void
-radeon_render_texture(GLcontext * ctx,
+radeon_render_texture(struct gl_context * ctx,
struct gl_framebuffer *fb,
struct gl_renderbuffer_attachment *att)
{
@@ -568,13 +568,13 @@ radeon_render_texture(GLcontext * ctx,
}
static void
-radeon_finish_render_texture(GLcontext * ctx,
+radeon_finish_render_texture(struct gl_context * ctx,
struct gl_renderbuffer_attachment *att)
{
}
static void
-radeon_validate_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb)
+radeon_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
gl_format mesa_format;
diff --git a/src/mesa/drivers/dri/radeon/radeon_ioctl.c b/src/mesa/drivers/dri/radeon/radeon_ioctl.c
index d08a82f1a55..a91d8727792 100644
--- a/src/mesa/drivers/dri/radeon/radeon_ioctl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_ioctl.c
@@ -178,7 +178,7 @@ extern void radeonEmitVbufPrim( r100ContextPtr rmesa,
#endif
}
-void radeonFlushElts( GLcontext *ctx )
+void radeonFlushElts( struct gl_context *ctx )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
BATCH_LOCALS(&rmesa->radeon);
@@ -432,7 +432,7 @@ void radeonEmitAOS( r100ContextPtr rmesa,
*/
#define RADEON_MAX_CLEARS 256
-static void radeonKernelClear(GLcontext *ctx, GLuint flags)
+static void radeonKernelClear(struct gl_context *ctx, GLuint flags)
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
__DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
@@ -555,7 +555,7 @@ static void radeonKernelClear(GLcontext *ctx, GLuint flags)
UNLOCK_HARDWARE( &rmesa->radeon );
}
-static void radeonClear( GLcontext *ctx, GLbitfield mask )
+static void radeonClear( struct gl_context *ctx, GLbitfield mask )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
__DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
@@ -629,7 +629,7 @@ static void radeonClear( GLcontext *ctx, GLbitfield mask )
}
}
-void radeonInitIoctlFuncs( GLcontext *ctx )
+void radeonInitIoctlFuncs( struct gl_context *ctx )
{
ctx->Driver.Clear = radeonClear;
ctx->Driver.Finish = radeonFinish;
diff --git a/src/mesa/drivers/dri/radeon/radeon_ioctl.h b/src/mesa/drivers/dri/radeon/radeon_ioctl.h
index deb53ae3138..790205719b6 100644
--- a/src/mesa/drivers/dri/radeon/radeon_ioctl.h
+++ b/src/mesa/drivers/dri/radeon/radeon_ioctl.h
@@ -50,7 +50,7 @@ extern void radeonEmitVbufPrim( r100ContextPtr rmesa,
GLuint primitive,
GLuint vertex_nr );
-extern void radeonFlushElts( GLcontext *ctx );
+extern void radeonFlushElts( struct gl_context *ctx );
extern GLushort *radeonAllocEltsOpenEnded( r100ContextPtr rmesa,
@@ -77,9 +77,9 @@ extern void radeonEmitWait( r100ContextPtr rmesa, GLuint flags );
extern void radeonFlushCmdBuf( r100ContextPtr rmesa, const char * );
-extern void radeonFlush( GLcontext *ctx );
-extern void radeonFinish( GLcontext *ctx );
-extern void radeonInitIoctlFuncs( GLcontext *ctx );
+extern void radeonFlush( struct gl_context *ctx );
+extern void radeonFinish( struct gl_context *ctx );
+extern void radeonInitIoctlFuncs( struct gl_context *ctx );
extern void radeonGetAllParams( r100ContextPtr rmesa );
extern void radeonSetUpAtomList( r100ContextPtr rmesa );
diff --git a/src/mesa/drivers/dri/radeon/radeon_maos.h b/src/mesa/drivers/dri/radeon/radeon_maos.h
index b88eb198d57..0feea358151 100644
--- a/src/mesa/drivers/dri/radeon/radeon_maos.h
+++ b/src/mesa/drivers/dri/radeon/radeon_maos.h
@@ -37,6 +37,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "radeon_context.h"
-extern void radeonEmitArrays( GLcontext *ctx, GLuint inputs );
+extern void radeonEmitArrays( struct gl_context *ctx, GLuint inputs );
#endif
diff --git a/src/mesa/drivers/dri/radeon/radeon_maos_arrays.c b/src/mesa/drivers/dri/radeon/radeon_maos_arrays.c
index d810e6080eb..94fe7e4b9f5 100644
--- a/src/mesa/drivers/dri/radeon/radeon_maos_arrays.c
+++ b/src/mesa/drivers/dri/radeon/radeon_maos_arrays.c
@@ -48,7 +48,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "radeon_maos.h"
#include "radeon_tcl.h"
-static void emit_vecfog(GLcontext *ctx, struct radeon_aos *aos,
+static void emit_vecfog(struct gl_context *ctx, struct radeon_aos *aos,
GLvoid *data, int stride, int count)
{
int i;
@@ -121,7 +121,7 @@ static void emit_stq_vec(uint32_t *out, GLvoid *data, int stride, int count)
-static void emit_tex_vector(GLcontext *ctx, struct radeon_aos *aos,
+static void emit_tex_vector(struct gl_context *ctx, struct radeon_aos *aos,
GLvoid *data, int size, int stride, int count)
{
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
@@ -182,7 +182,7 @@ static void emit_tex_vector(GLcontext *ctx, struct radeon_aos *aos,
/* Emit any changed arrays to new GART memory, re-emit a packet to
* update the arrays.
*/
-void radeonEmitArrays( GLcontext *ctx, GLuint inputs )
+void radeonEmitArrays( struct gl_context *ctx, GLuint inputs )
{
r100ContextPtr rmesa = R100_CONTEXT( ctx );
struct vertex_buffer *VB = &TNL_CONTEXT( ctx )->vb;
diff --git a/src/mesa/drivers/dri/radeon/radeon_maos_vbtmp.h b/src/mesa/drivers/dri/radeon/radeon_maos_vbtmp.h
index d764ccb9826..b73fc8abfe2 100644
--- a/src/mesa/drivers/dri/radeon/radeon_maos_vbtmp.h
+++ b/src/mesa/drivers/dri/radeon/radeon_maos_vbtmp.h
@@ -34,7 +34,7 @@
#define TCL_DEBUG 0
#endif
-static void TAG(emit)( GLcontext *ctx,
+static void TAG(emit)( struct gl_context *ctx,
GLuint start, GLuint end,
void *dest )
{
diff --git a/src/mesa/drivers/dri/radeon/radeon_maos_verts.c b/src/mesa/drivers/dri/radeon/radeon_maos_verts.c
index ad3bc2d23db..5dac2a362b2 100644
--- a/src/mesa/drivers/dri/radeon/radeon_maos_verts.c
+++ b/src/mesa/drivers/dri/radeon/radeon_maos_verts.c
@@ -54,7 +54,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
union emit_union { float f; GLuint ui; radeon_color_t rgba; };
static struct {
- void (*emit)( GLcontext *, GLuint, GLuint, void * );
+ void (*emit)( struct gl_context *, GLuint, GLuint, void * );
GLuint vertex_size;
GLuint vertex_format;
} setup_tab[RADEON_TCL_MAX_SETUP];
@@ -307,7 +307,7 @@ static void init_tcl_verts( void )
}
-void radeonEmitArrays( GLcontext *ctx, GLuint inputs )
+void radeonEmitArrays( struct gl_context *ctx, GLuint inputs )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
diff --git a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
index ddfde3edaf7..1fadad2756b 100644
--- a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
+++ b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
@@ -578,7 +578,7 @@ static radeon_mipmap_tree * get_biggest_matching_miptree(radeonTexObj *texObj,
* If individual images are stored in different mipmap trees
* use the mipmap tree that has the most of the correct data.
*/
-int radeon_validate_texture_miptree(GLcontext * ctx, struct gl_texture_object *texObj)
+int radeon_validate_texture_miptree(struct gl_context * ctx, struct gl_texture_object *texObj)
{
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
radeonTexObj *t = radeon_tex_obj(texObj);
diff --git a/src/mesa/drivers/dri/radeon/radeon_pixel_read.c b/src/mesa/drivers/dri/radeon/radeon_pixel_read.c
index 216eb932db0..e44d6f2f8f7 100644
--- a/src/mesa/drivers/dri/radeon/radeon_pixel_read.c
+++ b/src/mesa/drivers/dri/radeon/radeon_pixel_read.c
@@ -86,7 +86,7 @@ static gl_format gl_format_and_type_to_mesa_format(GLenum format, GLenum type)
}
static GLboolean
-do_blit_readpixels(GLcontext * ctx,
+do_blit_readpixels(struct gl_context * ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *pack, GLvoid * pixels)
@@ -194,7 +194,7 @@ do_blit_readpixels(GLcontext * ctx,
}
void
-radeonReadPixels(GLcontext * ctx,
+radeonReadPixels(struct gl_context * ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *pack, GLvoid * pixels)
diff --git a/src/mesa/drivers/dri/radeon/radeon_queryobj.c b/src/mesa/drivers/dri/radeon/radeon_queryobj.c
index 5b7178bcca2..a45ca7cad0d 100644
--- a/src/mesa/drivers/dri/radeon/radeon_queryobj.c
+++ b/src/mesa/drivers/dri/radeon/radeon_queryobj.c
@@ -33,7 +33,7 @@
#include <inttypes.h>
-static void radeonQueryGetResult(GLcontext *ctx, struct gl_query_object *q)
+static void radeonQueryGetResult(struct gl_context *ctx, struct gl_query_object *q)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
struct radeon_query_object *query = (struct radeon_query_object *)q;
@@ -79,7 +79,7 @@ static void radeonQueryGetResult(GLcontext *ctx, struct gl_query_object *q)
radeon_bo_unmap(query->bo);
}
-static struct gl_query_object * radeonNewQueryObject(GLcontext *ctx, GLuint id)
+static struct gl_query_object * radeonNewQueryObject(struct gl_context *ctx, GLuint id)
{
struct radeon_query_object *query;
@@ -95,7 +95,7 @@ static struct gl_query_object * radeonNewQueryObject(GLcontext *ctx, GLuint id)
return &query->Base;
}
-static void radeonDeleteQuery(GLcontext *ctx, struct gl_query_object *q)
+static void radeonDeleteQuery(struct gl_context *ctx, struct gl_query_object *q)
{
struct radeon_query_object *query = (struct radeon_query_object *)q;
@@ -108,7 +108,7 @@ static void radeonDeleteQuery(GLcontext *ctx, struct gl_query_object *q)
free(query);
}
-static void radeonWaitQuery(GLcontext *ctx, struct gl_query_object *q)
+static void radeonWaitQuery(struct gl_context *ctx, struct gl_query_object *q)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
struct radeon_query_object *query = (struct radeon_query_object *)q;
@@ -125,7 +125,7 @@ static void radeonWaitQuery(GLcontext *ctx, struct gl_query_object *q)
}
-static void radeonBeginQuery(GLcontext *ctx, struct gl_query_object *q)
+static void radeonBeginQuery(struct gl_context *ctx, struct gl_query_object *q)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
struct radeon_query_object *query = (struct radeon_query_object *)q;
@@ -148,7 +148,7 @@ static void radeonBeginQuery(GLcontext *ctx, struct gl_query_object *q)
radeon->hw.is_dirty = GL_TRUE;
}
-void radeonEmitQueryEnd(GLcontext *ctx)
+void radeonEmitQueryEnd(struct gl_context *ctx)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
struct radeon_query_object *query = radeon->query.current;
@@ -168,7 +168,7 @@ void radeonEmitQueryEnd(GLcontext *ctx)
radeon->vtbl.emit_query_finish(radeon);
}
-static void radeonEndQuery(GLcontext *ctx, struct gl_query_object *q)
+static void radeonEndQuery(struct gl_context *ctx, struct gl_query_object *q)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
@@ -181,7 +181,7 @@ static void radeonEndQuery(GLcontext *ctx, struct gl_query_object *q)
radeon->query.current = NULL;
}
-static void radeonCheckQuery(GLcontext *ctx, struct gl_query_object *q)
+static void radeonCheckQuery(struct gl_context *ctx, struct gl_query_object *q)
{
radeon_print(RADEON_STATE, RADEON_TRACE, "%s: query id %d\n", __FUNCTION__, q->Id);
@@ -219,7 +219,7 @@ void radeonInitQueryObjFunctions(struct dd_function_table *functions)
functions->WaitQuery = radeonWaitQuery;
}
-int radeon_check_query_active(GLcontext *ctx, struct radeon_state_atom *atom)
+int radeon_check_query_active(struct gl_context *ctx, struct radeon_state_atom *atom)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
struct radeon_query_object *query = radeon->query.current;
@@ -229,7 +229,7 @@ int radeon_check_query_active(GLcontext *ctx, struct radeon_state_atom *atom)
return atom->cmd_size;
}
-void radeon_emit_queryobj(GLcontext *ctx, struct radeon_state_atom *atom)
+void radeon_emit_queryobj(struct gl_context *ctx, struct radeon_state_atom *atom)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
BATCH_LOCALS(radeon);
diff --git a/src/mesa/drivers/dri/radeon/radeon_queryobj.h b/src/mesa/drivers/dri/radeon/radeon_queryobj.h
index 19374dc76b7..e5063934824 100644
--- a/src/mesa/drivers/dri/radeon/radeon_queryobj.h
+++ b/src/mesa/drivers/dri/radeon/radeon_queryobj.h
@@ -29,15 +29,15 @@
#include "main/simple_list.h"
#include "radeon_common_context.h"
-extern void radeonEmitQueryBegin(GLcontext *ctx);
-extern void radeonEmitQueryEnd(GLcontext *ctx);
+extern void radeonEmitQueryBegin(struct gl_context *ctx);
+extern void radeonEmitQueryEnd(struct gl_context *ctx);
extern void radeonInitQueryObjFunctions(struct dd_function_table *functions);
#define RADEON_QUERY_PAGE_SIZE 4096
-int radeon_check_query_active(GLcontext *ctx, struct radeon_state_atom *atom);
-void radeon_emit_queryobj(GLcontext *ctx, struct radeon_state_atom *atom);
+int radeon_check_query_active(struct gl_context *ctx, struct radeon_state_atom *atom);
+void radeon_emit_queryobj(struct gl_context *ctx, struct radeon_state_atom *atom);
static inline void radeon_init_query_stateobj(radeonContextPtr radeon, int SZ)
{
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index 2ea77e56c7e..43ebc810939 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -258,7 +258,7 @@ radeonFillInModes( __DRIscreen *psp,
unsigned stencil_bits, GLboolean have_back_buffer )
{
__DRIconfig **configs;
- __GLcontextModes *m;
+ struct gl_config *m;
unsigned depth_buffer_factor;
unsigned back_buffer_factor;
int i;
@@ -1583,7 +1583,7 @@ radeonInitDriver( __DRIscreen *sPriv )
static GLboolean
radeonCreateBuffer( __DRIscreen *driScrnPriv,
__DRIdrawable *driDrawPriv,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
GLboolean isPixmap )
{
radeonScreenPtr screen = (radeonScreenPtr) driScrnPriv->private;
@@ -1691,7 +1691,7 @@ radeonDestroyBuffer(__DRIdrawable *driDrawPriv)
if (!rfb)
return;
radeon_cleanup_renderbuffers(rfb);
- _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
+ _mesa_reference_framebuffer((struct gl_framebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
}
@@ -1700,7 +1700,7 @@ radeonDestroyBuffer(__DRIdrawable *driDrawPriv)
*
* \todo maybe fold this into intelInitDriver
*
- * \return the __GLcontextModes supported by this driver
+ * \return the struct gl_config supported by this driver
*/
static const __DRIconfig **
radeonInitScreen(__DRIscreen *psp)
@@ -1750,7 +1750,7 @@ radeonInitScreen(__DRIscreen *psp)
* This is the driver specific part of the createNewScreen entry point.
* Called when using DRI2.
*
- * \return the __GLcontextModes supported by this driver
+ * \return the struct gl_config supported by this driver
*/
static const
__DRIconfig **radeonInitScreen2(__DRIscreen *psp)
diff --git a/src/mesa/drivers/dri/radeon/radeon_span.c b/src/mesa/drivers/dri/radeon/radeon_span.c
index 9dfe2dd2433..1c5326fe9dc 100644
--- a/src/mesa/drivers/dri/radeon/radeon_span.c
+++ b/src/mesa/drivers/dri/radeon/radeon_span.c
@@ -1015,7 +1015,7 @@ static void map_unmap_rb(struct gl_renderbuffer *rb, int flag)
}
static void
-radeon_map_unmap_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb,
+radeon_map_unmap_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
GLboolean map)
{
GLuint i, j;
@@ -1060,7 +1060,7 @@ radeon_map_unmap_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb,
radeon_check_front_buffer_rendering(ctx);
}
-static void radeonSpanRenderStart(GLcontext * ctx)
+static void radeonSpanRenderStart(struct gl_context * ctx)
{
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
int i;
@@ -1087,7 +1087,7 @@ static void radeonSpanRenderStart(GLcontext * ctx)
radeon_map_unmap_framebuffer(ctx, ctx->ReadBuffer, GL_TRUE);
}
-static void radeonSpanRenderFinish(GLcontext * ctx)
+static void radeonSpanRenderFinish(struct gl_context * ctx)
{
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
int i;
@@ -1108,7 +1108,7 @@ static void radeonSpanRenderFinish(GLcontext * ctx)
}
}
-void radeonInitSpanFuncs(GLcontext * ctx)
+void radeonInitSpanFuncs(struct gl_context * ctx)
{
struct swrast_device_driver *swdd =
_swrast_GetDeviceDriverReference(ctx);
diff --git a/src/mesa/drivers/dri/radeon/radeon_span.h b/src/mesa/drivers/dri/radeon/radeon_span.h
index ea6a2e7fb4e..64517b59237 100644
--- a/src/mesa/drivers/dri/radeon/radeon_span.h
+++ b/src/mesa/drivers/dri/radeon/radeon_span.h
@@ -42,6 +42,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __RADEON_SPAN_H__
#define __RADEON_SPAN_H__
-extern void radeonInitSpanFuncs(GLcontext * ctx);
+extern void radeonInitSpanFuncs(struct gl_context * ctx);
#endif
diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c
index 539b067742f..cae12f192c3 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state.c
@@ -55,13 +55,13 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "radeon_tex.h"
#include "radeon_swtcl.h"
-static void radeonUpdateSpecular( GLcontext *ctx );
+static void radeonUpdateSpecular( struct gl_context *ctx );
/* =============================================================
* Alpha blending
*/
-static void radeonAlphaFunc( GLcontext *ctx, GLenum func, GLfloat ref )
+static void radeonAlphaFunc( struct gl_context *ctx, GLenum func, GLfloat ref )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
int pp_misc = rmesa->hw.ctx.cmd[CTX_PP_MISC];
@@ -104,7 +104,7 @@ static void radeonAlphaFunc( GLcontext *ctx, GLenum func, GLfloat ref )
rmesa->hw.ctx.cmd[CTX_PP_MISC] = pp_misc;
}
-static void radeonBlendEquationSeparate( GLcontext *ctx,
+static void radeonBlendEquationSeparate( struct gl_context *ctx,
GLenum modeRGB, GLenum modeA )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
@@ -144,7 +144,7 @@ static void radeonBlendEquationSeparate( GLcontext *ctx,
}
}
-static void radeonBlendFuncSeparate( GLcontext *ctx,
+static void radeonBlendFuncSeparate( struct gl_context *ctx,
GLenum sfactorRGB, GLenum dfactorRGB,
GLenum sfactorA, GLenum dfactorA )
{
@@ -256,7 +256,7 @@ static void radeonBlendFuncSeparate( GLcontext *ctx,
* Depth testing
*/
-static void radeonDepthFunc( GLcontext *ctx, GLenum func )
+static void radeonDepthFunc( struct gl_context *ctx, GLenum func )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
@@ -292,7 +292,7 @@ static void radeonDepthFunc( GLcontext *ctx, GLenum func )
}
-static void radeonDepthMask( GLcontext *ctx, GLboolean flag )
+static void radeonDepthMask( struct gl_context *ctx, GLboolean flag )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
RADEON_STATECHANGE( rmesa, ctx );
@@ -304,7 +304,7 @@ static void radeonDepthMask( GLcontext *ctx, GLboolean flag )
}
}
-static void radeonClearDepth( GLcontext *ctx, GLclampd d )
+static void radeonClearDepth( struct gl_context *ctx, GLclampd d )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
GLuint format = (rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] &
@@ -326,7 +326,7 @@ static void radeonClearDepth( GLcontext *ctx, GLclampd d )
*/
-static void radeonFogfv( GLcontext *ctx, GLenum pname, const GLfloat *param )
+static void radeonFogfv( struct gl_context *ctx, GLenum pname, const GLfloat *param )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
union { int i; float f; } c, d;
@@ -411,7 +411,7 @@ static void radeonFogfv( GLcontext *ctx, GLenum pname, const GLfloat *param )
* Culling
*/
-static void radeonCullFace( GLcontext *ctx, GLenum unused )
+static void radeonCullFace( struct gl_context *ctx, GLenum unused )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
GLuint s = rmesa->hw.set.cmd[SET_SE_CNTL];
@@ -448,7 +448,7 @@ static void radeonCullFace( GLcontext *ctx, GLenum unused )
}
}
-static void radeonFrontFace( GLcontext *ctx, GLenum mode )
+static void radeonFrontFace( struct gl_context *ctx, GLenum mode )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
@@ -477,7 +477,7 @@ static void radeonFrontFace( GLcontext *ctx, GLenum mode )
/* =============================================================
* Line state
*/
-static void radeonLineWidth( GLcontext *ctx, GLfloat widthf )
+static void radeonLineWidth( struct gl_context *ctx, GLfloat widthf )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
@@ -494,7 +494,7 @@ static void radeonLineWidth( GLcontext *ctx, GLfloat widthf )
}
}
-static void radeonLineStipple( GLcontext *ctx, GLint factor, GLushort pattern )
+static void radeonLineStipple( struct gl_context *ctx, GLint factor, GLushort pattern )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
@@ -507,7 +507,7 @@ static void radeonLineStipple( GLcontext *ctx, GLint factor, GLushort pattern )
/* =============================================================
* Masks
*/
-static void radeonColorMask( GLcontext *ctx,
+static void radeonColorMask( struct gl_context *ctx,
GLboolean r, GLboolean g,
GLboolean b, GLboolean a )
{
@@ -536,7 +536,7 @@ static void radeonColorMask( GLcontext *ctx,
* Polygon state
*/
-static void radeonPolygonOffset( GLcontext *ctx,
+static void radeonPolygonOffset( struct gl_context *ctx,
GLfloat factor, GLfloat units )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
@@ -549,7 +549,7 @@ static void radeonPolygonOffset( GLcontext *ctx,
rmesa->hw.zbs.cmd[ZBS_SE_ZBIAS_CONSTANT] = constant.ui32;
}
-static void radeonPolygonStipplePreKMS( GLcontext *ctx, const GLubyte *mask )
+static void radeonPolygonStipplePreKMS( struct gl_context *ctx, const GLubyte *mask )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
GLuint i;
@@ -574,7 +574,7 @@ static void radeonPolygonStipplePreKMS( GLcontext *ctx, const GLubyte *mask )
UNLOCK_HARDWARE( &rmesa->radeon );
}
-static void radeonPolygonMode( GLcontext *ctx, GLenum face, GLenum mode )
+static void radeonPolygonMode( struct gl_context *ctx, GLenum face, GLenum mode )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
GLboolean flag = (ctx->_TriangleCaps & DD_TRI_UNFILLED) != 0;
@@ -601,7 +601,7 @@ static void radeonPolygonMode( GLcontext *ctx, GLenum face, GLenum mode )
/* Examine lighting and texture state to determine if separate specular
* should be enabled.
*/
-static void radeonUpdateSpecular( GLcontext *ctx )
+static void radeonUpdateSpecular( struct gl_context *ctx )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
uint32_t p = rmesa->hw.ctx.cmd[CTX_PP_CNTL];
@@ -689,7 +689,7 @@ static void radeonUpdateSpecular( GLcontext *ctx )
/* Update on colormaterial, material emmissive/ambient,
* lightmodel.globalambient
*/
-static void update_global_ambient( GLcontext *ctx )
+static void update_global_ambient( struct gl_context *ctx )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
float *fcmd = (float *)RADEON_DB_STATE( glt );
@@ -719,7 +719,7 @@ static void update_global_ambient( GLcontext *ctx )
* - light[p].colors
* - light[p].enabled
*/
-static void update_light_colors( GLcontext *ctx, GLuint p )
+static void update_light_colors( struct gl_context *ctx, GLuint p )
{
struct gl_light *l = &ctx->Light.Light[p];
@@ -739,7 +739,7 @@ static void update_light_colors( GLcontext *ctx, GLuint p )
/* Also fallback for asym colormaterial mode in twoside lighting...
*/
-static void check_twoside_fallback( GLcontext *ctx )
+static void check_twoside_fallback( struct gl_context *ctx )
{
GLboolean fallback = GL_FALSE;
GLint i;
@@ -764,7 +764,7 @@ static void check_twoside_fallback( GLcontext *ctx )
}
-static void radeonColorMaterial( GLcontext *ctx, GLenum face, GLenum mode )
+static void radeonColorMaterial( struct gl_context *ctx, GLenum face, GLenum mode )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
GLuint light_model_ctl1 = rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL];
@@ -828,7 +828,7 @@ static void radeonColorMaterial( GLcontext *ctx, GLenum face, GLenum mode )
}
}
-void radeonUpdateMaterial( GLcontext *ctx )
+void radeonUpdateMaterial( struct gl_context *ctx )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
GLfloat (*mat)[4] = ctx->Light.Material.Attrib;
@@ -893,7 +893,7 @@ void radeonUpdateMaterial( GLcontext *ctx )
* lighting space (model or eye), hence dependencies on _NEW_MODELVIEW
* and _MESA_NEW_NEED_EYE_COORDS.
*/
-static void update_light( GLcontext *ctx )
+static void update_light( struct gl_context *ctx )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
@@ -957,7 +957,7 @@ static void update_light( GLcontext *ctx )
}
}
-static void radeonLightfv( GLcontext *ctx, GLenum light,
+static void radeonLightfv( struct gl_context *ctx, GLenum light,
GLenum pname, const GLfloat *params )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
@@ -1078,7 +1078,7 @@ static void radeonLightfv( GLcontext *ctx, GLenum light,
-static void radeonLightModelfv( GLcontext *ctx, GLenum pname,
+static void radeonLightModelfv( struct gl_context *ctx, GLenum pname,
const GLfloat *param )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
@@ -1120,7 +1120,7 @@ static void radeonLightModelfv( GLcontext *ctx, GLenum pname,
}
}
-static void radeonShadeModel( GLcontext *ctx, GLenum mode )
+static void radeonShadeModel( struct gl_context *ctx, GLenum mode )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
GLuint s = rmesa->hw.set.cmd[SET_SE_CNTL];
@@ -1158,7 +1158,7 @@ static void radeonShadeModel( GLcontext *ctx, GLenum mode )
* User clip planes
*/
-static void radeonClipPlane( GLcontext *ctx, GLenum plane, const GLfloat *eq )
+static void radeonClipPlane( struct gl_context *ctx, GLenum plane, const GLfloat *eq )
{
GLint p = (GLint) plane - (GLint) GL_CLIP_PLANE0;
r100ContextPtr rmesa = R100_CONTEXT(ctx);
@@ -1171,7 +1171,7 @@ static void radeonClipPlane( GLcontext *ctx, GLenum plane, const GLfloat *eq )
rmesa->hw.ucp[p].cmd[UCP_W] = ip[3];
}
-static void radeonUpdateClipPlanes( GLcontext *ctx )
+static void radeonUpdateClipPlanes( struct gl_context *ctx )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
GLuint p;
@@ -1195,7 +1195,7 @@ static void radeonUpdateClipPlanes( GLcontext *ctx )
*/
static void
-radeonStencilFuncSeparate( GLcontext *ctx, GLenum face, GLenum func,
+radeonStencilFuncSeparate( struct gl_context *ctx, GLenum face, GLenum func,
GLint ref, GLuint mask )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
@@ -1240,7 +1240,7 @@ radeonStencilFuncSeparate( GLcontext *ctx, GLenum face, GLenum func,
}
static void
-radeonStencilMaskSeparate( GLcontext *ctx, GLenum face, GLuint mask )
+radeonStencilMaskSeparate( struct gl_context *ctx, GLenum face, GLuint mask )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
@@ -1250,7 +1250,7 @@ radeonStencilMaskSeparate( GLcontext *ctx, GLenum face, GLuint mask )
((ctx->Stencil.WriteMask[0] & 0xff) << RADEON_STENCIL_WRITEMASK_SHIFT);
}
-static void radeonStencilOpSeparate( GLcontext *ctx, GLenum face, GLenum fail,
+static void radeonStencilOpSeparate( struct gl_context *ctx, GLenum face, GLenum fail,
GLenum zfail, GLenum zpass )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
@@ -1370,7 +1370,7 @@ static void radeonStencilOpSeparate( GLcontext *ctx, GLenum face, GLenum fail,
}
}
-static void radeonClearStencil( GLcontext *ctx, GLint s )
+static void radeonClearStencil( struct gl_context *ctx, GLint s )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
@@ -1396,7 +1396,7 @@ static void radeonClearStencil( GLcontext *ctx, GLint s )
* Called when window size or position changes or viewport or depth range
* state is changed. We update the hardware viewport state here.
*/
-void radeonUpdateWindow( GLcontext *ctx )
+void radeonUpdateWindow( struct gl_context *ctx )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
__DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
@@ -1433,7 +1433,7 @@ void radeonUpdateWindow( GLcontext *ctx )
}
-static void radeonViewport( GLcontext *ctx, GLint x, GLint y,
+static void radeonViewport( struct gl_context *ctx, GLint x, GLint y,
GLsizei width, GLsizei height )
{
/* Don't pipeline viewport changes, conflict with window offset
@@ -1445,13 +1445,13 @@ static void radeonViewport( GLcontext *ctx, GLint x, GLint y,
radeon_viewport(ctx, x, y, width, height);
}
-static void radeonDepthRange( GLcontext *ctx, GLclampd nearval,
+static void radeonDepthRange( struct gl_context *ctx, GLclampd nearval,
GLclampd farval )
{
radeonUpdateWindow( ctx );
}
-void radeonUpdateViewportOffset( GLcontext *ctx )
+void radeonUpdateViewportOffset( struct gl_context *ctx )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
__DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
@@ -1507,7 +1507,7 @@ void radeonUpdateViewportOffset( GLcontext *ctx )
* Miscellaneous
*/
-static void radeonClearColor( GLcontext *ctx, const GLfloat color[4] )
+static void radeonClearColor( struct gl_context *ctx, const GLfloat color[4] )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
GLubyte c[4];
@@ -1526,7 +1526,7 @@ static void radeonClearColor( GLcontext *ctx, const GLfloat color[4] )
}
-static void radeonRenderMode( GLcontext *ctx, GLenum mode )
+static void radeonRenderMode( struct gl_context *ctx, GLenum mode )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
FALLBACK( rmesa, RADEON_FALLBACK_RENDER_MODE, (mode != GL_RENDER) );
@@ -1552,7 +1552,7 @@ static GLuint radeon_rop_tab[] = {
RADEON_ROP_SET,
};
-static void radeonLogicOpCode( GLcontext *ctx, GLenum opcode )
+static void radeonLogicOpCode( struct gl_context *ctx, GLenum opcode )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
GLuint rop = (GLuint)opcode - GL_CLEAR;
@@ -1567,7 +1567,7 @@ static void radeonLogicOpCode( GLcontext *ctx, GLenum opcode )
* State enable/disable
*/
-static void radeonEnable( GLcontext *ctx, GLenum cap, GLboolean state )
+static void radeonEnable( struct gl_context *ctx, GLenum cap, GLboolean state )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
GLuint p, flag;
@@ -1860,7 +1860,7 @@ static void radeonEnable( GLcontext *ctx, GLenum cap, GLboolean state )
}
-static void radeonLightingSpaceChange( GLcontext *ctx )
+static void radeonLightingSpaceChange( struct gl_context *ctx )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
GLboolean tmp;
@@ -1995,7 +1995,7 @@ static void upload_matrix_t( r100ContextPtr rmesa, GLfloat *src, int idx )
}
-static void update_texturematrix( GLcontext *ctx )
+static void update_texturematrix( struct gl_context *ctx )
{
r100ContextPtr rmesa = R100_CONTEXT( ctx );
GLuint tpc = rmesa->hw.tcl.cmd[TCL_TEXTURE_PROC_CTL];
@@ -2061,7 +2061,7 @@ static void update_texturematrix( GLcontext *ctx )
}
}
-static GLboolean r100ValidateBuffers(GLcontext *ctx)
+static GLboolean r100ValidateBuffers(struct gl_context *ctx)
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
struct radeon_renderbuffer *rrb;
@@ -2105,7 +2105,7 @@ static GLboolean r100ValidateBuffers(GLcontext *ctx)
return GL_TRUE;
}
-GLboolean radeonValidateState( GLcontext *ctx )
+GLboolean radeonValidateState( struct gl_context *ctx )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
GLuint new_state = rmesa->radeon.NewGLState;
@@ -2163,7 +2163,7 @@ GLboolean radeonValidateState( GLcontext *ctx )
}
-static void radeonInvalidateState( GLcontext *ctx, GLuint new_state )
+static void radeonInvalidateState( struct gl_context *ctx, GLuint new_state )
{
_swrast_InvalidateState( ctx, new_state );
_swsetup_InvalidateState( ctx, new_state );
@@ -2176,7 +2176,7 @@ static void radeonInvalidateState( GLcontext *ctx, GLuint new_state )
/* A hack. Need a faster way to find this out.
*/
-static GLboolean check_material( GLcontext *ctx )
+static GLboolean check_material( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
GLint i;
@@ -2192,7 +2192,7 @@ static GLboolean check_material( GLcontext *ctx )
}
-static void radeonWrapRunPipeline( GLcontext *ctx )
+static void radeonWrapRunPipeline( struct gl_context *ctx )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
GLboolean has_material;
@@ -2221,7 +2221,7 @@ static void radeonWrapRunPipeline( GLcontext *ctx )
}
}
-static void radeonPolygonStipple( GLcontext *ctx, const GLubyte *mask )
+static void radeonPolygonStipple( struct gl_context *ctx, const GLubyte *mask )
{
r100ContextPtr r100 = R100_CONTEXT(ctx);
GLint i;
@@ -2242,7 +2242,7 @@ static void radeonPolygonStipple( GLcontext *ctx, const GLubyte *mask )
* Many of the ctx->Driver functions might have been initialized to
* software defaults in the earlier _mesa_init_driver_functions() call.
*/
-void radeonInitStateFuncs( GLcontext *ctx , GLboolean dri2 )
+void radeonInitStateFuncs( struct gl_context *ctx , GLboolean dri2 )
{
ctx->Driver.UpdateState = radeonInvalidateState;
ctx->Driver.LightingSpaceChange = radeonLightingSpaceChange;
diff --git a/src/mesa/drivers/dri/radeon/radeon_state.h b/src/mesa/drivers/dri/radeon/radeon_state.h
index c780cff0cfb..9a011e11b22 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state.h
+++ b/src/mesa/drivers/dri/radeon/radeon_state.h
@@ -40,20 +40,20 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "radeon_context.h"
extern void radeonInitState( r100ContextPtr rmesa );
-extern void radeonInitStateFuncs( GLcontext *ctx , GLboolean dri2);
+extern void radeonInitStateFuncs( struct gl_context *ctx , GLboolean dri2);
-extern void radeonUpdateMaterial( GLcontext *ctx );
+extern void radeonUpdateMaterial( struct gl_context *ctx );
-extern void radeonUpdateViewportOffset( GLcontext *ctx );
-extern void radeonUpdateWindow( GLcontext *ctx );
-extern void radeonUpdateDrawBuffer( GLcontext *ctx );
+extern void radeonUpdateViewportOffset( struct gl_context *ctx );
+extern void radeonUpdateWindow( struct gl_context *ctx );
+extern void radeonUpdateDrawBuffer( struct gl_context *ctx );
extern void radeonUploadTexMatrix( r100ContextPtr rmesa,
int unit, GLboolean swapcols );
-extern GLboolean radeonValidateState( GLcontext *ctx );
+extern GLboolean radeonValidateState( struct gl_context *ctx );
-extern void radeonFallback( GLcontext *ctx, GLuint bit, GLboolean mode );
+extern void radeonFallback( struct gl_context *ctx, GLuint bit, GLboolean mode );
#define FALLBACK( rmesa, bit, mode ) do { \
if ( 0 ) fprintf( stderr, "FALLBACK in %s: #%d=%d\n", \
__FUNCTION__, bit, mode ); \
diff --git a/src/mesa/drivers/dri/radeon/radeon_state_init.c b/src/mesa/drivers/dri/radeon/radeon_state_init.c
index 91718a47774..698efb145c0 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state_init.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state_init.c
@@ -195,13 +195,13 @@ static int cmdscl( int offset, int stride, int count )
}
#define CHECK( NM, FLAG, ADD ) \
-static int check_##NM( GLcontext *ctx, struct radeon_state_atom *atom ) \
+static int check_##NM( struct gl_context *ctx, struct radeon_state_atom *atom ) \
{ \
return FLAG ? atom->cmd_size + (ADD) : 0; \
}
#define TCL_CHECK( NM, FLAG, ADD ) \
-static int check_##NM( GLcontext *ctx, struct radeon_state_atom *atom ) \
+static int check_##NM( struct gl_context *ctx, struct radeon_state_atom *atom ) \
{ \
r100ContextPtr rmesa = R100_CONTEXT(ctx); \
return (!rmesa->radeon.TclFallback && (FLAG)) ? atom->cmd_size + (ADD) : 0; \
@@ -294,7 +294,7 @@ CHECK( txr2, (ctx->Texture.Unit[2]._ReallyEnabled & TEXTURE_RECT_BIT), 0 )
OUT_BATCH_TABLE((data), h.scalars.count); \
} while(0)
-static void scl_emit(GLcontext *ctx, struct radeon_state_atom *atom)
+static void scl_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r100ContextPtr r100 = R100_CONTEXT(ctx);
BATCH_LOCALS(&r100->radeon);
@@ -306,7 +306,7 @@ static void scl_emit(GLcontext *ctx, struct radeon_state_atom *atom)
}
-static void vec_emit(GLcontext *ctx, struct radeon_state_atom *atom)
+static void vec_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r100ContextPtr r100 = R100_CONTEXT(ctx);
BATCH_LOCALS(&r100->radeon);
@@ -318,7 +318,7 @@ static void vec_emit(GLcontext *ctx, struct radeon_state_atom *atom)
}
-static void lit_emit(GLcontext *ctx, struct radeon_state_atom *atom)
+static void lit_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r100ContextPtr r100 = R100_CONTEXT(ctx);
BATCH_LOCALS(&r100->radeon);
@@ -330,7 +330,7 @@ static void lit_emit(GLcontext *ctx, struct radeon_state_atom *atom)
END_BATCH();
}
-static void ctx_emit(GLcontext *ctx, struct radeon_state_atom *atom)
+static void ctx_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r100ContextPtr r100 = R100_CONTEXT(ctx);
BATCH_LOCALS(&r100->radeon);
@@ -395,7 +395,7 @@ static void ctx_emit(GLcontext *ctx, struct radeon_state_atom *atom)
END_BATCH();
}
-static int check_always_ctx( GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_always_ctx( struct gl_context *ctx, struct radeon_state_atom *atom)
{
r100ContextPtr r100 = R100_CONTEXT(ctx);
struct radeon_renderbuffer *rrb, *drb;
@@ -417,7 +417,7 @@ static int check_always_ctx( GLcontext *ctx, struct radeon_state_atom *atom)
return dwords;
}
-static void ctx_emit_cs(GLcontext *ctx, struct radeon_state_atom *atom)
+static void ctx_emit_cs(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r100ContextPtr r100 = R100_CONTEXT(ctx);
BATCH_LOCALS(&r100->radeon);
@@ -512,7 +512,7 @@ static void ctx_emit_cs(GLcontext *ctx, struct radeon_state_atom *atom)
END_BATCH();
}
-static void cube_emit(GLcontext *ctx, struct radeon_state_atom *atom)
+static void cube_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r100ContextPtr r100 = R100_CONTEXT(ctx);
BATCH_LOCALS(&r100->radeon);
@@ -540,7 +540,7 @@ static void cube_emit(GLcontext *ctx, struct radeon_state_atom *atom)
END_BATCH();
}
-static void cube_emit_cs(GLcontext *ctx, struct radeon_state_atom *atom)
+static void cube_emit_cs(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r100ContextPtr r100 = R100_CONTEXT(ctx);
BATCH_LOCALS(&r100->radeon);
@@ -576,7 +576,7 @@ static void cube_emit_cs(GLcontext *ctx, struct radeon_state_atom *atom)
END_BATCH();
}
-static void tex_emit(GLcontext *ctx, struct radeon_state_atom *atom)
+static void tex_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r100ContextPtr r100 = R100_CONTEXT(ctx);
BATCH_LOCALS(&r100->radeon);
@@ -611,7 +611,7 @@ static void tex_emit(GLcontext *ctx, struct radeon_state_atom *atom)
END_BATCH();
}
-static void tex_emit_cs(GLcontext *ctx, struct radeon_state_atom *atom)
+static void tex_emit_cs(struct gl_context *ctx, struct radeon_state_atom *atom)
{
r100ContextPtr r100 = R100_CONTEXT(ctx);
BATCH_LOCALS(&r100->radeon);
@@ -666,7 +666,7 @@ static void tex_emit_cs(GLcontext *ctx, struct radeon_state_atom *atom)
*/
void radeonInitState( r100ContextPtr rmesa )
{
- GLcontext *ctx = rmesa->radeon.glCtx;
+ struct gl_context *ctx = rmesa->radeon.glCtx;
GLuint i;
rmesa->radeon.state.color.clear = 0x00000000;
diff --git a/src/mesa/drivers/dri/radeon/radeon_swtcl.c b/src/mesa/drivers/dri/radeon/radeon_swtcl.c
index 29defe73a70..ff3506b2259 100644
--- a/src/mesa/drivers/dri/radeon/radeon_swtcl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_swtcl.c
@@ -87,7 +87,7 @@ static GLuint radeon_cp_vc_frmts[3][2] =
{ RADEON_CP_VC_FRMT_ST2, RADEON_CP_VC_FRMT_ST2 | RADEON_CP_VC_FRMT_Q2 },
};
-static void radeonSetVertexFormat( GLcontext *ctx )
+static void radeonSetVertexFormat( struct gl_context *ctx )
{
r100ContextPtr rmesa = R100_CONTEXT( ctx );
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -243,7 +243,7 @@ static void radeon_predict_emit_size( r100ContextPtr rmesa )
}
}
-static void radeonRenderStart( GLcontext *ctx )
+static void radeonRenderStart( struct gl_context *ctx )
{
r100ContextPtr rmesa = R100_CONTEXT( ctx );
@@ -260,7 +260,7 @@ static void radeonRenderStart( GLcontext *ctx )
* determine in advance whether or not the hardware can / should do the
* projection divide or Mesa should do it.
*/
-void radeonChooseVertexState( GLcontext *ctx )
+void radeonChooseVertexState( struct gl_context *ctx )
{
r100ContextPtr rmesa = R100_CONTEXT( ctx );
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -302,7 +302,7 @@ void radeonChooseVertexState( GLcontext *ctx )
}
}
-void r100_swtcl_flush(GLcontext *ctx, uint32_t current_offset)
+void r100_swtcl_flush(struct gl_context *ctx, uint32_t current_offset)
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
@@ -398,7 +398,7 @@ static void* radeon_alloc_verts( r100ContextPtr rmesa , GLuint nr, GLuint size )
/**********************************************************************/
-static GLboolean radeon_run_render( GLcontext *ctx,
+static GLboolean radeon_run_render( struct gl_context *ctx,
struct tnl_pipeline_stage *stage )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
@@ -412,6 +412,8 @@ static GLboolean radeon_run_render( GLcontext *ctx,
return GL_TRUE;
radeon_prepare_render(&rmesa->radeon);
+ if (rmesa->radeon.NewGLState)
+ radeonValidateState( ctx );
tnl->Driver.Render.Start( ctx );
@@ -467,9 +469,9 @@ static const GLuint reduced_hw_prim[GL_POLYGON+1] = {
RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_LIST
};
-static void radeonRasterPrimitive( GLcontext *ctx, GLuint hwprim );
-static void radeonRenderPrimitive( GLcontext *ctx, GLenum prim );
-static void radeonResetLineStipple( GLcontext *ctx );
+static void radeonRasterPrimitive( struct gl_context *ctx, GLuint hwprim );
+static void radeonRenderPrimitive( struct gl_context *ctx, GLenum prim );
+static void radeonResetLineStipple( struct gl_context *ctx );
/***********************************************************************
@@ -678,7 +680,7 @@ static void init_rast_tab( void )
/* Choose render functions */
/**********************************************************************/
-void radeonChooseRenderState( GLcontext *ctx )
+void radeonChooseRenderState( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
r100ContextPtr rmesa = R100_CONTEXT(ctx);
@@ -718,7 +720,7 @@ void radeonChooseRenderState( GLcontext *ctx )
/**********************************************************************/
-static void radeonRasterPrimitive( GLcontext *ctx, GLuint hwprim )
+static void radeonRasterPrimitive( struct gl_context *ctx, GLuint hwprim )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
@@ -728,7 +730,7 @@ static void radeonRasterPrimitive( GLcontext *ctx, GLuint hwprim )
}
}
-static void radeonRenderPrimitive( GLcontext *ctx, GLenum prim )
+static void radeonRenderPrimitive( struct gl_context *ctx, GLenum prim )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
rmesa->radeon.swtcl.render_primitive = prim;
@@ -736,11 +738,11 @@ static void radeonRenderPrimitive( GLcontext *ctx, GLenum prim )
radeonRasterPrimitive( ctx, reduced_hw_prim[prim] );
}
-static void radeonRenderFinish( GLcontext *ctx )
+static void radeonRenderFinish( struct gl_context *ctx )
{
}
-static void radeonResetLineStipple( GLcontext *ctx )
+static void radeonResetLineStipple( struct gl_context *ctx )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
RADEON_STATECHANGE( rmesa, lin );
@@ -774,7 +776,7 @@ static const char *getFallbackString(GLuint bit)
}
-void radeonFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
+void radeonFallback( struct gl_context *ctx, GLuint bit, GLboolean mode )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -831,7 +833,7 @@ void radeonFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
/* Initialization. */
/**********************************************************************/
-void radeonInitSwtcl( GLcontext *ctx )
+void radeonInitSwtcl( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
r100ContextPtr rmesa = R100_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/radeon/radeon_swtcl.h b/src/mesa/drivers/dri/radeon/radeon_swtcl.h
index da89158eeb9..ce2aa1e4c36 100644
--- a/src/mesa/drivers/dri/radeon/radeon_swtcl.h
+++ b/src/mesa/drivers/dri/radeon/radeon_swtcl.h
@@ -39,28 +39,28 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "swrast/swrast.h"
#include "radeon_context.h"
-extern void radeonInitSwtcl( GLcontext *ctx );
+extern void radeonInitSwtcl( struct gl_context *ctx );
-extern void radeonChooseRenderState( GLcontext *ctx );
-extern void radeonChooseVertexState( GLcontext *ctx );
+extern void radeonChooseRenderState( struct gl_context *ctx );
+extern void radeonChooseVertexState( struct gl_context *ctx );
-extern void radeonCheckTexSizes( GLcontext *ctx );
+extern void radeonCheckTexSizes( struct gl_context *ctx );
-extern void radeonBuildVertices( GLcontext *ctx, GLuint start, GLuint count,
+extern void radeonBuildVertices( struct gl_context *ctx, GLuint start, GLuint count,
GLuint newinputs );
extern void radeonPrintSetupFlags(char *msg, GLuint flags );
-extern void radeon_emit_indexed_verts( GLcontext *ctx,
+extern void radeon_emit_indexed_verts( struct gl_context *ctx,
GLuint start,
GLuint count );
-extern void radeon_translate_vertex( GLcontext *ctx,
+extern void radeon_translate_vertex( struct gl_context *ctx,
const radeonVertex *src,
SWvertex *dst );
-extern void radeon_print_vertex( GLcontext *ctx, const radeonVertex *v );
+extern void radeon_print_vertex( struct gl_context *ctx, const radeonVertex *v );
-extern void r100_swtcl_flush(GLcontext *ctx, uint32_t current_offset);
+extern void r100_swtcl_flush(struct gl_context *ctx, uint32_t current_offset);
#endif
diff --git a/src/mesa/drivers/dri/radeon/radeon_tcl.c b/src/mesa/drivers/dri/radeon/radeon_tcl.c
index 5e1718f9dfc..5d2e8f4870f 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tcl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tcl.c
@@ -164,7 +164,7 @@ static GLushort *radeonAllocElts( r100ContextPtr rmesa, GLuint nr )
* discrete and there are no intervening state changes. (Somewhat
* duplicates changes to DrawArrays code)
*/
-static void radeonEmitPrim( GLcontext *ctx,
+static void radeonEmitPrim( struct gl_context *ctx,
GLenum prim,
GLuint hwprim,
GLuint start,
@@ -228,7 +228,7 @@ static void radeonEmitPrim( GLcontext *ctx,
/* External entrypoints */
/**********************************************************************/
-void radeonEmitPrimitive( GLcontext *ctx,
+void radeonEmitPrimitive( struct gl_context *ctx,
GLuint first,
GLuint last,
GLuint flags )
@@ -236,7 +236,7 @@ void radeonEmitPrimitive( GLcontext *ctx,
tcl_render_tab_verts[flags&PRIM_MODE_MASK]( ctx, first, last, flags );
}
-void radeonEmitEltPrimitive( GLcontext *ctx,
+void radeonEmitEltPrimitive( struct gl_context *ctx,
GLuint first,
GLuint last,
GLuint flags )
@@ -244,7 +244,7 @@ void radeonEmitEltPrimitive( GLcontext *ctx,
tcl_render_tab_elts[flags&PRIM_MODE_MASK]( ctx, first, last, flags );
}
-void radeonTclPrimitive( GLcontext *ctx,
+void radeonTclPrimitive( struct gl_context *ctx,
GLenum prim,
int hw_prim )
{
@@ -253,6 +253,8 @@ void radeonTclPrimitive( GLcontext *ctx,
GLuint newprim = hw_prim | RADEON_CP_VC_CNTL_TCL_ENABLE;
radeon_prepare_render(&rmesa->radeon);
+ if (rmesa->radeon.NewGLState)
+ radeonValidateState( ctx );
if (newprim != rmesa->tcl.hw_primitive ||
!discrete_prim[hw_prim&0xf]) {
@@ -326,7 +328,7 @@ radeonInitStaticFogData( void )
* Fog blend factors are in the range [0,1].
*/
float
-radeonComputeFogBlendFactor( GLcontext *ctx, GLfloat fogcoord )
+radeonComputeFogBlendFactor( struct gl_context *ctx, GLfloat fogcoord )
{
GLfloat end = ctx->Fog.End;
GLfloat d, temp;
@@ -361,7 +363,7 @@ radeonComputeFogBlendFactor( GLcontext *ctx, GLfloat fogcoord )
* Predict total emit size for next rendering operation so there is no flush in middle of rendering
* Prediction has to aim towards the best possible value that is worse than worst case scenario
*/
-static GLuint radeonEnsureEmitSize( GLcontext * ctx , GLuint inputs )
+static GLuint radeonEnsureEmitSize( struct gl_context * ctx , GLuint inputs )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -432,7 +434,7 @@ static GLuint radeonEnsureEmitSize( GLcontext * ctx , GLuint inputs )
/* TCL render.
*/
-static GLboolean radeon_run_tcl_render( GLcontext *ctx,
+static GLboolean radeon_run_tcl_render( struct gl_context *ctx,
struct tnl_pipeline_stage *stage )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
@@ -529,7 +531,7 @@ const struct tnl_pipeline_stage _radeon_tcl_stage =
*/
-static void transition_to_swtnl( GLcontext *ctx )
+static void transition_to_swtnl( struct gl_context *ctx )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -558,7 +560,7 @@ static void transition_to_swtnl( GLcontext *ctx )
}
-static void transition_to_hwtnl( GLcontext *ctx )
+static void transition_to_hwtnl( struct gl_context *ctx )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -618,7 +620,7 @@ static char *getFallbackString(GLuint bit)
-void radeonTclFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
+void radeonTclFallback( struct gl_context *ctx, GLuint bit, GLboolean mode )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
GLuint oldfallback = rmesa->radeon.TclFallback;
diff --git a/src/mesa/drivers/dri/radeon/radeon_tcl.h b/src/mesa/drivers/dri/radeon/radeon_tcl.h
index dccbea5fdbd..cf19766b9f2 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tcl.h
+++ b/src/mesa/drivers/dri/radeon/radeon_tcl.h
@@ -38,16 +38,16 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "radeon_context.h"
-extern void radeonTclPrimitive( GLcontext *ctx, GLenum prim, int hw_prim );
-extern void radeonEmitEltPrimitive( GLcontext *ctx, GLuint first, GLuint last,
+extern void radeonTclPrimitive( struct gl_context *ctx, GLenum prim, int hw_prim );
+extern void radeonEmitEltPrimitive( struct gl_context *ctx, GLuint first, GLuint last,
GLuint flags );
-extern void radeonEmitPrimitive( GLcontext *ctx, GLuint first, GLuint last,
+extern void radeonEmitPrimitive( struct gl_context *ctx, GLuint first, GLuint last,
GLuint flags );
-extern void radeonTclFallback( GLcontext *ctx, GLuint bit, GLboolean mode );
+extern void radeonTclFallback( struct gl_context *ctx, GLuint bit, GLboolean mode );
extern void radeonInitStaticFogData( void );
-extern float radeonComputeFogBlendFactor( GLcontext *ctx, GLfloat fogcoord );
+extern float radeonComputeFogBlendFactor( struct gl_context *ctx, GLfloat fogcoord );
#define RADEON_TCL_FALLBACK_RASTER 0x1 /* rasterization */
#define RADEON_TCL_FALLBACK_UNFILLED 0x2 /* unfilled tris */
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex.c b/src/mesa/drivers/dri/radeon/radeon_tex.c
index c66e5d17b12..d5285e24cd5 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tex.c
@@ -253,7 +253,7 @@ static void radeonSetTexBorderColor( radeonTexObjPtr t, const GLfloat color[4] )
#define SCALED_FLOAT_TO_BYTE( x, scale ) \
(((GLuint)((255.0F / scale) * (x))) / 2)
-static void radeonTexEnv( GLcontext *ctx, GLenum target,
+static void radeonTexEnv( struct gl_context *ctx, GLenum target,
GLenum pname, const GLfloat *param )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
@@ -316,7 +316,7 @@ static void radeonTexEnv( GLcontext *ctx, GLenum target,
* next UpdateTextureState
*/
-static void radeonTexParameter( GLcontext *ctx, GLenum target,
+static void radeonTexParameter( struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj,
GLenum pname, const GLfloat *params )
{
@@ -354,7 +354,7 @@ static void radeonTexParameter( GLcontext *ctx, GLenum target,
}
}
-static void radeonDeleteTexture( GLcontext *ctx,
+static void radeonDeleteTexture( struct gl_context *ctx,
struct gl_texture_object *texObj )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
@@ -392,7 +392,7 @@ static void radeonDeleteTexture( GLcontext *ctx,
* Basically impossible to do this on the fly - just collect some
* basic info & do the checks from ValidateState().
*/
-static void radeonTexGen( GLcontext *ctx,
+static void radeonTexGen( struct gl_context *ctx,
GLenum coord,
GLenum pname,
const GLfloat *params )
@@ -409,7 +409,7 @@ static void radeonTexGen( GLcontext *ctx,
* texture object from the core mesa gl_texture_object. Not done at this time.
*/
static struct gl_texture_object *
-radeonNewTextureObject( GLcontext *ctx, GLuint name, GLenum target )
+radeonNewTextureObject( struct gl_context *ctx, GLuint name, GLenum target )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
radeonTexObj* t = CALLOC_STRUCT(radeon_tex_obj);
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex.h b/src/mesa/drivers/dri/radeon/radeon_tex.h
index 0113ffd3dac..05729f1e0b6 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex.h
+++ b/src/mesa/drivers/dri/radeon/radeon_tex.h
@@ -45,7 +45,7 @@ extern void radeonSetTexBuffer(__DRIcontext *pDRICtx, GLint target, __DRIdrawabl
extern void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_format,
__DRIdrawable *dPriv);
-extern void radeonUpdateTextureState( GLcontext *ctx );
+extern void radeonUpdateTextureState( struct gl_context *ctx );
extern int radeonUploadTexImages( r100ContextPtr rmesa, radeonTexObjPtr t,
GLuint face );
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex_copy.c b/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
index 4cb0bb60c85..f14dfa25d40 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
@@ -37,7 +37,7 @@
#include "radeon_mipmap_tree.h"
static GLboolean
-do_copy_texsubimage(GLcontext *ctx,
+do_copy_texsubimage(struct gl_context *ctx,
GLenum target, GLint level,
struct radeon_tex_obj *tobj,
radeon_texture_image *timg,
@@ -141,7 +141,7 @@ do_copy_texsubimage(GLcontext *ctx,
}
void
-radeonCopyTexImage2D(GLcontext *ctx, GLenum target, GLint level,
+radeonCopyTexImage2D(struct gl_context *ctx, GLenum target, GLint level,
GLenum internalFormat,
GLint x, GLint y, GLsizei width, GLsizei height,
GLint border)
@@ -196,7 +196,7 @@ fail:
}
void
-radeonCopyTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
+radeonCopyTexSubImage2D(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLint x, GLint y,
GLsizei width, GLsizei height)
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex_getimage.c b/src/mesa/drivers/dri/radeon/radeon_tex_getimage.c
index f878b48e5f9..4a73089ce19 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex_getimage.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tex_getimage.c
@@ -40,7 +40,7 @@
* then unmap it.
*/
static void
-radeon_get_tex_image(GLcontext * ctx, GLenum target, GLint level,
+radeon_get_tex_image(struct gl_context * ctx, GLenum target, GLint level,
GLenum format, GLenum type, GLvoid * pixels,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage, int compressed)
@@ -83,7 +83,7 @@ radeon_get_tex_image(GLcontext * ctx, GLenum target, GLint level,
}
void
-radeonGetTexImage(GLcontext * ctx, GLenum target, GLint level,
+radeonGetTexImage(struct gl_context * ctx, GLenum target, GLint level,
GLenum format, GLenum type, GLvoid * pixels,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage)
@@ -93,7 +93,7 @@ radeonGetTexImage(GLcontext * ctx, GLenum target, GLint level,
}
void
-radeonGetCompressedTexImage(GLcontext *ctx, GLenum target, GLint level,
+radeonGetCompressedTexImage(struct gl_context *ctx, GLenum target, GLint level,
GLvoid *pixels,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage)
diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c b/src/mesa/drivers/dri/radeon/radeon_texstate.c
index f852116deeb..dd8ecdd500a 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texstate.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texstate.c
@@ -260,7 +260,7 @@ do { \
* Texture unit state management
*/
-static GLboolean radeonUpdateTextureEnv( GLcontext *ctx, int unit )
+static GLboolean radeonUpdateTextureEnv( struct gl_context *ctx, int unit )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
@@ -885,7 +885,7 @@ static void set_texgen_matrix( r100ContextPtr rmesa,
/* Returns GL_FALSE if fallback required.
*/
-static GLboolean radeon_validate_texgen( GLcontext *ctx, GLuint unit )
+static GLboolean radeon_validate_texgen( struct gl_context *ctx, GLuint unit )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
@@ -1085,7 +1085,7 @@ static GLboolean setup_hardware_state(r100ContextPtr rmesa, radeonTexObj *t, int
return GL_TRUE;
}
-static GLboolean radeon_validate_texture(GLcontext *ctx, struct gl_texture_object *texObj, int unit)
+static GLboolean radeon_validate_texture(struct gl_context *ctx, struct gl_texture_object *texObj, int unit)
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
radeonTexObj *t = radeon_tex_obj(texObj);
@@ -1128,7 +1128,7 @@ static GLboolean radeon_validate_texture(GLcontext *ctx, struct gl_texture_objec
return !t->border_fallback;
}
-static GLboolean radeonUpdateTextureUnit( GLcontext *ctx, int unit )
+static GLboolean radeonUpdateTextureUnit( struct gl_context *ctx, int unit )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
@@ -1155,7 +1155,7 @@ static GLboolean radeonUpdateTextureUnit( GLcontext *ctx, int unit )
return GL_TRUE;
}
-void radeonUpdateTextureState( GLcontext *ctx )
+void radeonUpdateTextureState( struct gl_context *ctx )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
GLboolean ok;
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c
index d1ebd83550d..18ccb512d7a 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.c
@@ -76,7 +76,7 @@ void copy_rows(void* dst, GLuint dststride, const void* src, GLuint srcstride,
/**
* Allocate an empty texture image object.
*/
-struct gl_texture_image *radeonNewTextureImage(GLcontext *ctx)
+struct gl_texture_image *radeonNewTextureImage(struct gl_context *ctx)
{
return CALLOC(sizeof(radeon_texture_image));
}
@@ -84,7 +84,7 @@ struct gl_texture_image *radeonNewTextureImage(GLcontext *ctx)
/**
* Free memory associated with this texture image.
*/
-void radeonFreeTexImageData(GLcontext *ctx, struct gl_texture_image *timage)
+void radeonFreeTexImageData(struct gl_context *ctx, struct gl_texture_image *timage)
{
radeon_texture_image* image = get_radeon_texture_image(timage);
@@ -154,7 +154,7 @@ void radeon_teximage_unmap(radeon_texture_image *image)
}
}
-static void map_override(GLcontext *ctx, radeonTexObj *t)
+static void map_override(struct gl_context *ctx, radeonTexObj *t)
{
radeon_texture_image *img = get_radeon_texture_image(t->base.Image[0][0]);
@@ -163,7 +163,7 @@ static void map_override(GLcontext *ctx, radeonTexObj *t)
img->base.Data = t->bo->ptr;
}
-static void unmap_override(GLcontext *ctx, radeonTexObj *t)
+static void unmap_override(struct gl_context *ctx, radeonTexObj *t)
{
radeon_texture_image *img = get_radeon_texture_image(t->base.Image[0][0]);
@@ -175,7 +175,7 @@ static void unmap_override(GLcontext *ctx, radeonTexObj *t)
/**
* Map a validated texture for reading during software rendering.
*/
-void radeonMapTexture(GLcontext *ctx, struct gl_texture_object *texObj)
+void radeonMapTexture(struct gl_context *ctx, struct gl_texture_object *texObj)
{
radeonTexObj* t = radeon_tex_obj(texObj);
int face, level;
@@ -213,7 +213,7 @@ void radeonMapTexture(GLcontext *ctx, struct gl_texture_object *texObj)
}
}
-void radeonUnmapTexture(GLcontext *ctx, struct gl_texture_object *texObj)
+void radeonUnmapTexture(struct gl_context *ctx, struct gl_texture_object *texObj)
{
radeonTexObj* t = radeon_tex_obj(texObj);
int face, level;
@@ -241,7 +241,7 @@ void radeonUnmapTexture(GLcontext *ctx, struct gl_texture_object *texObj)
* This relies on internal details of _mesa_generate_mipmap, in particular
* the fact that the memory for recreated texture images is always freed.
*/
-static void radeon_generate_mipmap(GLcontext *ctx, GLenum target,
+static void radeon_generate_mipmap(struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj)
{
radeonTexObj* t = radeon_tex_obj(texObj);
@@ -273,7 +273,7 @@ static void radeon_generate_mipmap(GLcontext *ctx, GLenum target,
}
-void radeonGenerateMipmap(GLcontext* ctx, GLenum target, struct gl_texture_object *texObj)
+void radeonGenerateMipmap(struct gl_context* ctx, GLenum target, struct gl_texture_object *texObj)
{
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
struct radeon_bo *bo;
@@ -338,7 +338,7 @@ static gl_format radeonChoose8888TexFormat(radeonContextPtr rmesa,
return _dri_texformat_argb8888;
}
-gl_format radeonChooseTextureFormat_mesa(GLcontext * ctx,
+gl_format radeonChooseTextureFormat_mesa(struct gl_context * ctx,
GLint internalFormat,
GLenum format,
GLenum type)
@@ -347,7 +347,7 @@ gl_format radeonChooseTextureFormat_mesa(GLcontext * ctx,
type, 0);
}
-gl_format radeonChooseTextureFormat(GLcontext * ctx,
+gl_format radeonChooseTextureFormat(struct gl_context * ctx,
GLint internalFormat,
GLenum format,
GLenum type, GLboolean fbo)
@@ -641,7 +641,7 @@ static void teximage_assign_miptree(radeonContextPtr rmesa,
"%s Failed to allocate miptree.\n", __func__);
}
-static GLuint * allocate_image_offsets(GLcontext *ctx,
+static GLuint * allocate_image_offsets(struct gl_context *ctx,
unsigned alignedWidth,
unsigned height,
unsigned depth)
@@ -665,7 +665,7 @@ static GLuint * allocate_image_offsets(GLcontext *ctx,
/**
* Update a subregion of the given texture image.
*/
-static void radeon_store_teximage(GLcontext* ctx, int dims,
+static void radeon_store_teximage(struct gl_context* ctx, int dims,
GLint xoffset, GLint yoffset, GLint zoffset,
GLsizei width, GLsizei height, GLsizei depth,
GLsizei imageSize,
@@ -758,7 +758,7 @@ static void radeon_store_teximage(GLcontext* ctx, int dims,
* All glTexImage calls go through this function.
*/
static void radeon_teximage(
- GLcontext *ctx, int dims,
+ struct gl_context *ctx, int dims,
GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint depth,
@@ -833,7 +833,7 @@ static void radeon_teximage(
_mesa_unmap_teximage_pbo(ctx, packing);
}
-void radeonTexImage1D(GLcontext * ctx, GLenum target, GLint level,
+void radeonTexImage1D(struct gl_context * ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint border,
GLenum format, GLenum type, const GLvoid * pixels,
@@ -845,7 +845,7 @@ void radeonTexImage1D(GLcontext * ctx, GLenum target, GLint level,
0, format, type, pixels, packing, texObj, texImage, 0);
}
-void radeonTexImage2D(GLcontext * ctx, GLenum target, GLint level,
+void radeonTexImage2D(struct gl_context * ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint border,
GLenum format, GLenum type, const GLvoid * pixels,
@@ -858,7 +858,7 @@ void radeonTexImage2D(GLcontext * ctx, GLenum target, GLint level,
0, format, type, pixels, packing, texObj, texImage, 0);
}
-void radeonCompressedTexImage2D(GLcontext * ctx, GLenum target,
+void radeonCompressedTexImage2D(struct gl_context * ctx, GLenum target,
GLint level, GLint internalFormat,
GLint width, GLint height, GLint border,
GLsizei imageSize, const GLvoid * data,
@@ -869,7 +869,7 @@ void radeonCompressedTexImage2D(GLcontext * ctx, GLenum target,
imageSize, 0, 0, data, &ctx->Unpack, texObj, texImage, 1);
}
-void radeonTexImage3D(GLcontext * ctx, GLenum target, GLint level,
+void radeonTexImage3D(struct gl_context * ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint depth,
GLint border,
@@ -885,7 +885,7 @@ void radeonTexImage3D(GLcontext * ctx, GLenum target, GLint level,
/**
* All glTexSubImage calls go through this function.
*/
-static void radeon_texsubimage(GLcontext* ctx, int dims, GLenum target, int level,
+static void radeon_texsubimage(struct gl_context* ctx, int dims, GLenum target, int level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLsizei width, GLsizei height, GLsizei depth,
GLsizei imageSize,
@@ -939,7 +939,7 @@ static void radeon_texsubimage(GLcontext* ctx, int dims, GLenum target, int leve
_mesa_unmap_teximage_pbo(ctx, packing);
}
-void radeonTexSubImage1D(GLcontext * ctx, GLenum target, GLint level,
+void radeonTexSubImage1D(struct gl_context * ctx, GLenum target, GLint level,
GLint xoffset,
GLsizei width,
GLenum format, GLenum type,
@@ -952,7 +952,7 @@ void radeonTexSubImage1D(GLcontext * ctx, GLenum target, GLint level,
format, type, pixels, packing, texObj, texImage, 0);
}
-void radeonTexSubImage2D(GLcontext * ctx, GLenum target, GLint level,
+void radeonTexSubImage2D(struct gl_context * ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
@@ -966,7 +966,7 @@ void radeonTexSubImage2D(GLcontext * ctx, GLenum target, GLint level,
0);
}
-void radeonCompressedTexSubImage2D(GLcontext * ctx, GLenum target,
+void radeonCompressedTexSubImage2D(struct gl_context * ctx, GLenum target,
GLint level, GLint xoffset,
GLint yoffset, GLsizei width,
GLsizei height, GLenum format,
@@ -979,7 +979,7 @@ void radeonCompressedTexSubImage2D(GLcontext * ctx, GLenum target,
}
-void radeonTexSubImage3D(GLcontext * ctx, GLenum target, GLint level,
+void radeonTexSubImage3D(struct gl_context * ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLsizei width, GLsizei height, GLsizei depth,
GLenum format, GLenum type,
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.h b/src/mesa/drivers/dri/radeon/radeon_texture.h
index 4ce639ea34e..9138a7d5548 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.h
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.h
@@ -35,47 +35,47 @@
void copy_rows(void* dst, GLuint dststride, const void* src, GLuint srcstride,
GLuint numrows, GLuint rowsize);
-struct gl_texture_image *radeonNewTextureImage(GLcontext *ctx);
-void radeonFreeTexImageData(GLcontext *ctx, struct gl_texture_image *timage);
+struct gl_texture_image *radeonNewTextureImage(struct gl_context *ctx);
+void radeonFreeTexImageData(struct gl_context *ctx, struct gl_texture_image *timage);
void radeon_teximage_map(radeon_texture_image *image, GLboolean write_enable);
void radeon_teximage_unmap(radeon_texture_image *image);
-void radeonMapTexture(GLcontext *ctx, struct gl_texture_object *texObj);
-void radeonUnmapTexture(GLcontext *ctx, struct gl_texture_object *texObj);
-void radeonGenerateMipmap(GLcontext* ctx, GLenum target, struct gl_texture_object *texObj);
-int radeon_validate_texture_miptree(GLcontext * ctx, struct gl_texture_object *texObj);
+void radeonMapTexture(struct gl_context *ctx, struct gl_texture_object *texObj);
+void radeonUnmapTexture(struct gl_context *ctx, struct gl_texture_object *texObj);
+void radeonGenerateMipmap(struct gl_context* ctx, GLenum target, struct gl_texture_object *texObj);
+int radeon_validate_texture_miptree(struct gl_context * ctx, struct gl_texture_object *texObj);
-gl_format radeonChooseTextureFormat_mesa(GLcontext * ctx,
+gl_format radeonChooseTextureFormat_mesa(struct gl_context * ctx,
GLint internalFormat,
GLenum format,
GLenum type);
-gl_format radeonChooseTextureFormat(GLcontext * ctx,
+gl_format radeonChooseTextureFormat(struct gl_context * ctx,
GLint internalFormat,
GLenum format,
GLenum type, GLboolean fbo);
-void radeonTexImage1D(GLcontext * ctx, GLenum target, GLint level,
+void radeonTexImage1D(struct gl_context * ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint border,
GLenum format, GLenum type, const GLvoid * pixels,
const struct gl_pixelstore_attrib *packing,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage);
-void radeonTexImage2D(GLcontext * ctx, GLenum target, GLint level,
+void radeonTexImage2D(struct gl_context * ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint border,
GLenum format, GLenum type, const GLvoid * pixels,
const struct gl_pixelstore_attrib *packing,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage);
-void radeonCompressedTexImage2D(GLcontext * ctx, GLenum target,
+void radeonCompressedTexImage2D(struct gl_context * ctx, GLenum target,
GLint level, GLint internalFormat,
GLint width, GLint height, GLint border,
GLsizei imageSize, const GLvoid * data,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage);
-void radeonTexImage3D(GLcontext * ctx, GLenum target, GLint level,
+void radeonTexImage3D(struct gl_context * ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint depth,
GLint border,
@@ -83,7 +83,7 @@ void radeonTexImage3D(GLcontext * ctx, GLenum target, GLint level,
const struct gl_pixelstore_attrib *packing,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage);
-void radeonTexSubImage1D(GLcontext * ctx, GLenum target, GLint level,
+void radeonTexSubImage1D(struct gl_context * ctx, GLenum target, GLint level,
GLint xoffset,
GLsizei width,
GLenum format, GLenum type,
@@ -91,7 +91,7 @@ void radeonTexSubImage1D(GLcontext * ctx, GLenum target, GLint level,
const struct gl_pixelstore_attrib *packing,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage);
-void radeonTexSubImage2D(GLcontext * ctx, GLenum target, GLint level,
+void radeonTexSubImage2D(struct gl_context * ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
@@ -99,7 +99,7 @@ void radeonTexSubImage2D(GLcontext * ctx, GLenum target, GLint level,
const struct gl_pixelstore_attrib *packing,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage);
-void radeonCompressedTexSubImage2D(GLcontext * ctx, GLenum target,
+void radeonCompressedTexSubImage2D(struct gl_context * ctx, GLenum target,
GLint level, GLint xoffset,
GLint yoffset, GLsizei width,
GLsizei height, GLenum format,
@@ -107,7 +107,7 @@ void radeonCompressedTexSubImage2D(GLcontext * ctx, GLenum target,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage);
-void radeonTexSubImage3D(GLcontext * ctx, GLenum target, GLint level,
+void radeonTexSubImage3D(struct gl_context * ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLsizei width, GLsizei height, GLsizei depth,
GLenum format, GLenum type,
@@ -116,21 +116,21 @@ void radeonTexSubImage3D(GLcontext * ctx, GLenum target, GLint level,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage);
-void radeonGetTexImage(GLcontext * ctx, GLenum target, GLint level,
+void radeonGetTexImage(struct gl_context * ctx, GLenum target, GLint level,
GLenum format, GLenum type, GLvoid * pixels,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage);
-void radeonGetCompressedTexImage(GLcontext *ctx, GLenum target, GLint level,
+void radeonGetCompressedTexImage(struct gl_context *ctx, GLenum target, GLint level,
GLvoid *pixels,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage);
-void radeonCopyTexImage2D(GLcontext *ctx, GLenum target, GLint level,
+void radeonCopyTexImage2D(struct gl_context *ctx, GLenum target, GLint level,
GLenum internalFormat,
GLint x, GLint y, GLsizei width, GLsizei height,
GLint border);
-void radeonCopyTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
+void radeonCopyTexSubImage2D(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLint x, GLint y,
GLsizei width, GLsizei height);
diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c
index 45c1e56fe00..b3aaa0e504e 100644
--- a/src/mesa/drivers/dri/savage/savage_xmesa.c
+++ b/src/mesa/drivers/dri/savage/savage_xmesa.c
@@ -287,11 +287,11 @@ savageDestroyScreen(__DRIscreen *sPriv)
static GLboolean
savageCreateContext( gl_api api,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate )
{
- GLcontext *ctx, *shareCtx;
+ struct gl_context *ctx, *shareCtx;
savageContextPtr imesa;
__DRIscreen *sPriv = driContextPriv->driScreenPriv;
struct dd_function_table functions;
@@ -586,7 +586,7 @@ savageDestroyContext(__DRIcontext *driContextPriv)
static GLboolean
savageCreateBuffer( __DRIscreen *driScrnPriv,
__DRIdrawable *driDrawPriv,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
GLboolean isPixmap)
{
savageScreenPrivate *screen = (savageScreenPrivate *) driScrnPriv->private;
@@ -681,7 +681,7 @@ savageCreateBuffer( __DRIscreen *driScrnPriv,
static void
savageDestroyBuffer(__DRIdrawable *driDrawPriv)
{
- _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
+ _mesa_reference_framebuffer((struct gl_framebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
}
#if 0
@@ -789,9 +789,9 @@ savageMakeCurrent(__DRIcontext *driContextPriv,
savageContextPtr imesa
= (savageContextPtr) driContextPriv->driverPrivate;
struct gl_framebuffer *drawBuffer
- = (GLframebuffer *) driDrawPriv->driverPrivate;
+ = (struct gl_framebuffer *) driDrawPriv->driverPrivate;
struct gl_framebuffer *readBuffer
- = (GLframebuffer *) driReadPriv->driverPrivate;
+ = (struct gl_framebuffer *) driReadPriv->driverPrivate;
driRenderbuffer *frontRb = (driRenderbuffer *)
drawBuffer->Attachment[BUFFER_FRONT_LEFT].Renderbuffer;
driRenderbuffer *backRb = (driRenderbuffer *)
@@ -892,7 +892,7 @@ savageFillInModes( __DRIscreen *psp,
unsigned stencil_bits, GLboolean have_back_buffer )
{
__DRIconfig **configs;
- __GLcontextModes * m;
+ struct gl_config * m;
unsigned depth_buffer_factor;
unsigned back_buffer_factor;
GLenum fb_format;
@@ -968,7 +968,7 @@ savageFillInModes( __DRIscreen *psp,
*
* \todo maybe fold this into intelInitDriver
*
- * \return the __GLcontextModes supported by this driver
+ * \return the struct gl_config supported by this driver
*/
static const __DRIconfig **
savageInitScreen(__DRIscreen *psp)
diff --git a/src/mesa/drivers/dri/savage/savagecontext.h b/src/mesa/drivers/dri/savage/savagecontext.h
index ba1e6e1e1ad..75bec62fa84 100644
--- a/src/mesa/drivers/dri/savage/savagecontext.h
+++ b/src/mesa/drivers/dri/savage/savagecontext.h
@@ -148,7 +148,7 @@ struct savage_elt_t {
struct savage_context_t {
GLint refcount;
- GLcontext *glCtx;
+ struct gl_context *glCtx;
int lastTexHeap;
driTexHeap *textureHeaps[SAVAGE_NR_TEX_HEAPS];
@@ -226,7 +226,7 @@ struct savage_context_t {
/* DRI stuff */
GLuint bufferSize;
- GLframebuffer *glBuffer;
+ struct gl_framebuffer *glBuffer;
/* Two flags to keep track of fallbacks. */
GLuint Fallback;
diff --git a/src/mesa/drivers/dri/savage/savagedd.c b/src/mesa/drivers/dri/savage/savagedd.c
index bbf49aec272..3f8d7aafb08 100644
--- a/src/mesa/drivers/dri/savage/savagedd.c
+++ b/src/mesa/drivers/dri/savage/savagedd.c
@@ -45,7 +45,7 @@
***************************************/
-static const GLubyte *savageDDGetString( GLcontext *ctx, GLenum name )
+static const GLubyte *savageDDGetString( struct gl_context *ctx, GLenum name )
{
static char *cardNames[S3_LAST] = {
"Unknown",
@@ -79,7 +79,7 @@ static const GLubyte *savageDDGetString( GLcontext *ctx, GLenum name )
}
}
#if 0
-static GLint savageGetParameteri(const GLcontext *ctx, GLint param)
+static GLint savageGetParameteri(const struct gl_context *ctx, GLint param)
{
switch (param) {
case DD_HAVE_HARDWARE_FOG:
@@ -91,7 +91,7 @@ static GLint savageGetParameteri(const GLcontext *ctx, GLint param)
#endif
-void savageDDInitDriverFuncs( GLcontext *ctx )
+void savageDDInitDriverFuncs( struct gl_context *ctx )
{
ctx->Driver.GetString = savageDDGetString;
}
diff --git a/src/mesa/drivers/dri/savage/savagedd.h b/src/mesa/drivers/dri/savage/savagedd.h
index 698a8d5de92..c5261412999 100644
--- a/src/mesa/drivers/dri/savage/savagedd.h
+++ b/src/mesa/drivers/dri/savage/savagedd.h
@@ -28,5 +28,5 @@
#include "main/context.h"
-void savageDDInitDriverFuncs( GLcontext *ctx );
+void savageDDInitDriverFuncs( struct gl_context *ctx );
#endif
diff --git a/src/mesa/drivers/dri/savage/savageioctl.c b/src/mesa/drivers/dri/savage/savageioctl.c
index 9e181ce3be9..46bbb653b81 100644
--- a/src/mesa/drivers/dri/savage/savageioctl.c
+++ b/src/mesa/drivers/dri/savage/savageioctl.c
@@ -119,7 +119,7 @@ void savageGetDMABuffer( savageContextPtr imesa )
#if 0
/* Still keeping this around because it demonstrates page flipping and
* automatic z-clear. */
-static void savage_BCI_clear(GLcontext *ctx, drm_savage_clear_t *pclear)
+static void savage_BCI_clear(struct gl_context *ctx, drm_savage_clear_t *pclear)
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
int nbox = imesa->sarea->nbox;
@@ -325,7 +325,7 @@ static GLuint savageIntersectClipRects(drm_clip_rect_t *dest,
}
-static void savageDDClear( GLcontext *ctx, GLbitfield mask )
+static void savageDDClear( struct gl_context *ctx, GLbitfield mask )
{
savageContextPtr imesa = SAVAGE_CONTEXT( ctx );
GLuint colorMask, depthMask, clearColor, clearDepth, flags;
@@ -635,7 +635,7 @@ void savageFlushCmdBuf( savageContextPtr imesa, GLboolean discard )
}
-static void savageDDFlush( GLcontext *ctx )
+static void savageDDFlush( struct gl_context *ctx )
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
if (SAVAGE_DEBUG & DEBUG_VERBOSE_MSG)
@@ -644,7 +644,7 @@ static void savageDDFlush( GLcontext *ctx )
savageFlushCmdBuf(imesa, GL_FALSE);
}
-static void savageDDFinish( GLcontext *ctx )
+static void savageDDFinish( struct gl_context *ctx )
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
if (SAVAGE_DEBUG & DEBUG_VERBOSE_MSG)
@@ -654,7 +654,7 @@ static void savageDDFinish( GLcontext *ctx )
WAIT_IDLE_EMPTY(imesa);
}
-void savageDDInitIoctlFuncs( GLcontext *ctx )
+void savageDDInitIoctlFuncs( struct gl_context *ctx )
{
ctx->Driver.Clear = savageDDClear;
ctx->Driver.Flush = savageDDFlush;
diff --git a/src/mesa/drivers/dri/savage/savageioctl.h b/src/mesa/drivers/dri/savage/savageioctl.h
index e7e80816c10..7d34825c296 100644
--- a/src/mesa/drivers/dri/savage/savageioctl.h
+++ b/src/mesa/drivers/dri/savage/savageioctl.h
@@ -37,7 +37,7 @@ void savageWaitEvent( savageContextPtr imesa, unsigned int event);
void savageFlushCmdBufLocked( savageContextPtr imesa, GLboolean discard );
void savageFlushCmdBuf( savageContextPtr imesa, GLboolean discard );
-void savageDDInitIoctlFuncs( GLcontext *ctx );
+void savageDDInitIoctlFuncs( struct gl_context *ctx );
void savageSwapBuffers( __DRIdrawable *dPriv );
diff --git a/src/mesa/drivers/dri/savage/savagerender.c b/src/mesa/drivers/dri/savage/savagerender.c
index 2d9e80e29c4..8cc448ad4f7 100644
--- a/src/mesa/drivers/dri/savage/savagerender.c
+++ b/src/mesa/drivers/dri/savage/savagerender.c
@@ -142,7 +142,7 @@
/* Render pipeline stage */
/**********************************************************************/
-static GLboolean savage_run_render( GLcontext *ctx,
+static GLboolean savage_run_render( struct gl_context *ctx,
struct tnl_pipeline_stage *stage )
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
@@ -234,7 +234,7 @@ struct texnorm_stage_data {
#define TEXNORM_STAGE_DATA(stage) ((struct texnorm_stage_data *)stage->privatePtr)
-static GLboolean run_texnorm_stage( GLcontext *ctx,
+static GLboolean run_texnorm_stage( struct gl_context *ctx,
struct tnl_pipeline_stage *stage )
{
struct texnorm_stage_data *store = TEXNORM_STAGE_DATA(stage);
@@ -307,7 +307,7 @@ static GLboolean run_texnorm_stage( GLcontext *ctx,
/* Called the first time stage->run() is invoked.
*/
-static GLboolean alloc_texnorm_data( GLcontext *ctx,
+static GLboolean alloc_texnorm_data( struct gl_context *ctx,
struct tnl_pipeline_stage *stage )
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
@@ -325,7 +325,7 @@ static GLboolean alloc_texnorm_data( GLcontext *ctx,
return GL_TRUE;
}
-static void validate_texnorm( GLcontext *ctx,
+static void validate_texnorm( struct gl_context *ctx,
struct tnl_pipeline_stage *stage )
{
struct texnorm_stage_data *store = TEXNORM_STAGE_DATA(stage);
diff --git a/src/mesa/drivers/dri/savage/savagespan.c b/src/mesa/drivers/dri/savage/savagespan.c
index 0913dd1278c..8542f47fd92 100644
--- a/src/mesa/drivers/dri/savage/savagespan.c
+++ b/src/mesa/drivers/dri/savage/savagespan.c
@@ -187,7 +187,7 @@
* the frame buffer.
*/
static void
-savageCopyPixels( GLcontext *ctx,
+savageCopyPixels( struct gl_context *ctx,
GLint srcx, GLint srcy, GLsizei width, GLsizei height,
GLint destx, GLint desty,
GLenum type )
@@ -198,7 +198,7 @@ savageCopyPixels( GLcontext *ctx,
_swrast_CopyPixels(ctx, srcx, srcy, width, height, destx, desty, type);
}
static void
-savageDrawPixels( GLcontext *ctx,
+savageDrawPixels( struct gl_context *ctx,
GLint x, GLint y,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
@@ -211,7 +211,7 @@ savageDrawPixels( GLcontext *ctx,
_swrast_DrawPixels(ctx, x, y, width, height, format, type, packing, pixels);
}
static void
-savageReadPixels( GLcontext *ctx,
+savageReadPixels( struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *packing,
@@ -226,7 +226,7 @@ savageReadPixels( GLcontext *ctx,
/*
* Make sure the hardware is idle when span-rendering.
*/
-static void savageSpanRenderStart( GLcontext *ctx )
+static void savageSpanRenderStart( struct gl_context *ctx )
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
FLUSH_BATCH(imesa);
@@ -234,7 +234,7 @@ static void savageSpanRenderStart( GLcontext *ctx )
}
-void savageDDInitSpanFuncs( GLcontext *ctx )
+void savageDDInitSpanFuncs( struct gl_context *ctx )
{
struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference(ctx);
swdd->SpanRenderStart = savageSpanRenderStart;
@@ -251,7 +251,7 @@ void savageDDInitSpanFuncs( GLcontext *ctx )
* Plug in the Get/Put routines for the given driRenderbuffer.
*/
void
-savageSetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis,
+savageSetSpanFunctions(driRenderbuffer *drb, const struct gl_config *vis,
GLboolean float_depth)
{
if (drb->Base.Format == MESA_FORMAT_RGB565) {
diff --git a/src/mesa/drivers/dri/savage/savagespan.h b/src/mesa/drivers/dri/savage/savagespan.h
index 53a7f8b97c8..41d6f75cbbe 100644
--- a/src/mesa/drivers/dri/savage/savagespan.h
+++ b/src/mesa/drivers/dri/savage/savagespan.h
@@ -28,10 +28,10 @@
#include "drirenderbuffer.h"
-extern void savageDDInitSpanFuncs( GLcontext *ctx );
+extern void savageDDInitSpanFuncs( struct gl_context *ctx );
extern void
-savageSetSpanFunctions(driRenderbuffer *rb, const GLvisual *vis,
+savageSetSpanFunctions(driRenderbuffer *rb, const struct gl_config *vis,
GLboolean float_depth);
diff --git a/src/mesa/drivers/dri/savage/savagestate.c b/src/mesa/drivers/dri/savage/savagestate.c
index 84e1b525854..0906f85b1fa 100644
--- a/src/mesa/drivers/dri/savage/savagestate.c
+++ b/src/mesa/drivers/dri/savage/savagestate.c
@@ -73,8 +73,8 @@
#define S3D_TR 15
-static void savageBlendFunc_s4(GLcontext *);
-static void savageBlendFunc_s3d(GLcontext *);
+static void savageBlendFunc_s4(struct gl_context *);
+static void savageBlendFunc_s3d(struct gl_context *);
static INLINE GLuint savagePackColor(GLuint format,
GLubyte r, GLubyte g,
@@ -92,16 +92,16 @@ static INLINE GLuint savagePackColor(GLuint format,
}
-static void savageDDAlphaFunc_s4(GLcontext *ctx, GLenum func, GLfloat ref)
+static void savageDDAlphaFunc_s4(struct gl_context *ctx, GLenum func, GLfloat ref)
{
savageBlendFunc_s4(ctx);
}
-static void savageDDAlphaFunc_s3d(GLcontext *ctx, GLenum func, GLfloat ref)
+static void savageDDAlphaFunc_s3d(struct gl_context *ctx, GLenum func, GLfloat ref)
{
savageBlendFunc_s3d(ctx);
}
-static void savageDDBlendEquationSeparate(GLcontext *ctx,
+static void savageDDBlendEquationSeparate(struct gl_context *ctx,
GLenum modeRGB, GLenum modeA)
{
assert( modeRGB == modeA );
@@ -119,7 +119,7 @@ static void savageDDBlendEquationSeparate(GLcontext *ctx,
}
-static void savageBlendFunc_s4(GLcontext *ctx)
+static void savageBlendFunc_s4(struct gl_context *ctx)
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
uint32_t drawLocalCtrl = imesa->regs.s4.drawLocalCtrl.ui;
@@ -294,7 +294,7 @@ static void savageBlendFunc_s4(GLcontext *ctx)
drawCtrl1 != imesa->regs.s4.drawCtrl1.ui)
imesa->dirty |= SAVAGE_UPLOAD_GLOBAL;
}
-static void savageBlendFunc_s3d(GLcontext *ctx)
+static void savageBlendFunc_s3d(struct gl_context *ctx)
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
uint32_t drawCtrl = imesa->regs.s3d.drawCtrl.ui;
@@ -465,14 +465,14 @@ static void savageBlendFunc_s3d(GLcontext *ctx)
imesa->dirty |= SAVAGE_UPLOAD_LOCAL;
}
-static void savageDDBlendFuncSeparate_s4( GLcontext *ctx, GLenum sfactorRGB,
+static void savageDDBlendFuncSeparate_s4( struct gl_context *ctx, GLenum sfactorRGB,
GLenum dfactorRGB, GLenum sfactorA,
GLenum dfactorA )
{
assert (dfactorRGB == dfactorA && sfactorRGB == sfactorA);
savageBlendFunc_s4( ctx );
}
-static void savageDDBlendFuncSeparate_s3d( GLcontext *ctx, GLenum sfactorRGB,
+static void savageDDBlendFuncSeparate_s3d( struct gl_context *ctx, GLenum sfactorRGB,
GLenum dfactorRGB, GLenum sfactorA,
GLenum dfactorA )
{
@@ -482,7 +482,7 @@ static void savageDDBlendFuncSeparate_s3d( GLcontext *ctx, GLenum sfactorRGB,
-static void savageDDDepthFunc_s4(GLcontext *ctx, GLenum func)
+static void savageDDDepthFunc_s4(struct gl_context *ctx, GLenum func)
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
ZCmpFunc zmode;
@@ -546,7 +546,7 @@ static void savageDDDepthFunc_s4(GLcontext *ctx, GLenum func)
zWatermarks != imesa->regs.s4.zWatermarks.ui)
imesa->dirty |= SAVAGE_UPLOAD_GLOBAL;
}
-static void savageDDDepthFunc_s3d(GLcontext *ctx, GLenum func)
+static void savageDDDepthFunc_s3d(struct gl_context *ctx, GLenum func)
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
ZCmpFunc zmode;
@@ -600,11 +600,11 @@ static void savageDDDepthFunc_s3d(GLcontext *ctx, GLenum func)
imesa->dirty |= SAVAGE_UPLOAD_GLOBAL;
}
-static void savageDDDepthMask_s4(GLcontext *ctx, GLboolean flag)
+static void savageDDDepthMask_s4(struct gl_context *ctx, GLboolean flag)
{
savageDDDepthFunc_s4(ctx,ctx->Depth.Func);
}
-static void savageDDDepthMask_s3d(GLcontext *ctx, GLboolean flag)
+static void savageDDDepthMask_s3d(struct gl_context *ctx, GLboolean flag)
{
savageDDDepthFunc_s3d(ctx,ctx->Depth.Func);
}
@@ -617,7 +617,7 @@ static void savageDDDepthMask_s3d(GLcontext *ctx, GLboolean flag)
*/
-static void savageDDScissor( GLcontext *ctx, GLint x, GLint y,
+static void savageDDScissor( struct gl_context *ctx, GLint x, GLint y,
GLsizei w, GLsizei h )
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
@@ -635,7 +635,7 @@ static void savageDDScissor( GLcontext *ctx, GLint x, GLint y,
-static void savageDDDrawBuffer(GLcontext *ctx, GLenum mode )
+static void savageDDDrawBuffer(struct gl_context *ctx, GLenum mode )
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
uint32_t destCtrl = imesa->regs.s4.destCtrl.ui;
@@ -667,13 +667,13 @@ static void savageDDDrawBuffer(GLcontext *ctx, GLenum mode )
imesa->dirty |= SAVAGE_UPLOAD_GLOBAL;
}
-static void savageDDReadBuffer(GLcontext *ctx, GLenum mode )
+static void savageDDReadBuffer(struct gl_context *ctx, GLenum mode )
{
/* nothing, until we implement h/w glRead/CopyPixels or CopyTexImage */
}
#if 0
-static void savageDDSetColor(GLcontext *ctx,
+static void savageDDSetColor(struct gl_context *ctx,
GLubyte r, GLubyte g,
GLubyte b, GLubyte a )
{
@@ -686,7 +686,7 @@ static void savageDDSetColor(GLcontext *ctx,
* Window position and viewport transformation
*/
-void savageCalcViewport( GLcontext *ctx )
+void savageCalcViewport( struct gl_context *ctx )
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
const GLfloat *v = ctx->Viewport._WindowMap.m;
@@ -712,14 +712,14 @@ void savageCalcViewport( GLcontext *ctx )
imesa->SetupNewInputs = ~0;
}
-static void savageViewport( GLcontext *ctx,
+static void savageViewport( struct gl_context *ctx,
GLint x, GLint y,
GLsizei width, GLsizei height )
{
savageCalcViewport( ctx );
}
-static void savageDepthRange( GLcontext *ctx,
+static void savageDepthRange( struct gl_context *ctx,
GLclampd nearval, GLclampd farval )
{
savageCalcViewport( ctx );
@@ -730,7 +730,7 @@ static void savageDepthRange( GLcontext *ctx,
* Miscellaneous
*/
-static void savageDDClearColor(GLcontext *ctx,
+static void savageDDClearColor(struct gl_context *ctx,
const GLfloat color[4] )
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
@@ -746,7 +746,7 @@ static void savageDDClearColor(GLcontext *ctx,
/* Fallback to swrast for select and feedback.
*/
-static void savageRenderMode( GLcontext *ctx, GLenum mode )
+static void savageRenderMode( struct gl_context *ctx, GLenum mode )
{
FALLBACK( ctx, SAVAGE_FALLBACK_RENDERMODE, (mode != GL_RENDER) );
}
@@ -758,7 +758,7 @@ static void savageRenderMode( GLcontext *ctx, GLenum mode )
* Culling - the savage isn't quite as clean here as the rest of
* its interfaces, but it's not bad.
*/
-static void savageDDCullFaceFrontFace(GLcontext *ctx, GLenum unused)
+static void savageDDCullFaceFrontFace(struct gl_context *ctx, GLenum unused)
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
GLuint cullMode=imesa->LcsCullMode;
@@ -793,7 +793,7 @@ static void savageDDCullFaceFrontFace(GLcontext *ctx, GLenum unused)
}
#endif /* end #if HW_CULL */
-static void savageUpdateCull( GLcontext *ctx )
+static void savageUpdateCull( struct gl_context *ctx )
{
#if HW_CULL
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
@@ -829,7 +829,7 @@ static void savageUpdateCull( GLcontext *ctx )
* to have any effect. If only some channels are masked we need a
* software fallback on all chips.
*/
-static void savageDDColorMask_s4(GLcontext *ctx,
+static void savageDDColorMask_s4(struct gl_context *ctx,
GLboolean r, GLboolean g,
GLboolean b, GLboolean a )
{
@@ -855,7 +855,7 @@ static void savageDDColorMask_s4(GLcontext *ctx,
imesa->dirty |= SAVAGE_UPLOAD_LOCAL;
}
}
-static void savageDDColorMask_s3d(GLcontext *ctx,
+static void savageDDColorMask_s3d(struct gl_context *ctx,
GLboolean r, GLboolean g,
GLboolean b, GLboolean a )
{
@@ -865,7 +865,7 @@ static void savageDDColorMask_s3d(GLcontext *ctx,
FALLBACK (ctx, SAVAGE_FALLBACK_COLORMASK, !(r && g && b));
}
-static void savageUpdateSpecular_s4(GLcontext *ctx) {
+static void savageUpdateSpecular_s4(struct gl_context *ctx) {
savageContextPtr imesa = SAVAGE_CONTEXT( ctx );
uint32_t drawLocalCtrl = imesa->regs.s4.drawLocalCtrl.ui;
@@ -879,7 +879,7 @@ static void savageUpdateSpecular_s4(GLcontext *ctx) {
imesa->dirty |= SAVAGE_UPLOAD_LOCAL;
}
-static void savageUpdateSpecular_s3d(GLcontext *ctx) {
+static void savageUpdateSpecular_s3d(struct gl_context *ctx) {
savageContextPtr imesa = SAVAGE_CONTEXT( ctx );
uint32_t drawCtrl = imesa->regs.s3d.drawCtrl.ui;
@@ -893,18 +893,18 @@ static void savageUpdateSpecular_s3d(GLcontext *ctx) {
imesa->dirty |= SAVAGE_UPLOAD_LOCAL;
}
-static void savageDDLightModelfv_s4(GLcontext *ctx, GLenum pname,
+static void savageDDLightModelfv_s4(struct gl_context *ctx, GLenum pname,
const GLfloat *param)
{
savageUpdateSpecular_s4 (ctx);
}
-static void savageDDLightModelfv_s3d(GLcontext *ctx, GLenum pname,
+static void savageDDLightModelfv_s3d(struct gl_context *ctx, GLenum pname,
const GLfloat *param)
{
savageUpdateSpecular_s3d (ctx);
}
-static void savageDDShadeModel_s4(GLcontext *ctx, GLuint mod)
+static void savageDDShadeModel_s4(struct gl_context *ctx, GLuint mod)
{
savageContextPtr imesa = SAVAGE_CONTEXT( ctx );
uint32_t drawLocalCtrl = imesa->regs.s4.drawLocalCtrl.ui;
@@ -921,7 +921,7 @@ static void savageDDShadeModel_s4(GLcontext *ctx, GLuint mod)
if (drawLocalCtrl != imesa->regs.s4.drawLocalCtrl.ui)
imesa->dirty |= SAVAGE_UPLOAD_LOCAL;
}
-static void savageDDShadeModel_s3d(GLcontext *ctx, GLuint mod)
+static void savageDDShadeModel_s3d(struct gl_context *ctx, GLuint mod)
{
savageContextPtr imesa = SAVAGE_CONTEXT( ctx );
uint32_t drawCtrl = imesa->regs.s3d.drawCtrl.ui;
@@ -946,7 +946,7 @@ static void savageDDShadeModel_s3d(GLcontext *ctx, GLuint mod)
* on savage3d and savage4. No need for two separate functions.
*/
-static void savageDDFogfv(GLcontext *ctx, GLenum pname, const GLfloat *param)
+static void savageDDFogfv(struct gl_context *ctx, GLenum pname, const GLfloat *param)
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
GLuint fogClr;
@@ -977,7 +977,7 @@ static void savageDDFogfv(GLcontext *ctx, GLenum pname, const GLfloat *param)
static void
-savageDDStencilFuncSeparate(GLcontext *ctx, GLenum face, GLenum func,
+savageDDStencilFuncSeparate(struct gl_context *ctx, GLenum face, GLenum func,
GLint ref, GLuint mask)
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
@@ -1010,7 +1010,7 @@ savageDDStencilFuncSeparate(GLcontext *ctx, GLenum face, GLenum func,
}
static void
-savageDDStencilMaskSeparate(GLcontext *ctx, GLenum face, GLuint mask)
+savageDDStencilMaskSeparate(struct gl_context *ctx, GLenum face, GLuint mask)
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
@@ -1039,7 +1039,7 @@ static unsigned get_stencil_op_value( GLenum op )
}
static void
-savageDDStencilOpSeparate(GLcontext *ctx, GLenum face, GLenum fail,
+savageDDStencilOpSeparate(struct gl_context *ctx, GLenum face, GLenum fail,
GLenum zfail, GLenum zpass)
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
@@ -1057,7 +1057,7 @@ savageDDStencilOpSeparate(GLcontext *ctx, GLenum face, GLenum fail,
/* =============================================================
*/
-static void savageDDEnable_s4(GLcontext *ctx, GLenum cap, GLboolean state)
+static void savageDDEnable_s4(struct gl_context *ctx, GLenum cap, GLboolean state)
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
@@ -1148,7 +1148,7 @@ static void savageDDEnable_s4(GLcontext *ctx, GLenum cap, GLboolean state)
;
}
}
-static void savageDDEnable_s3d(GLcontext *ctx, GLenum cap, GLboolean state)
+static void savageDDEnable_s3d(struct gl_context *ctx, GLenum cap, GLboolean state)
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
@@ -1227,7 +1227,7 @@ static void savageDDEnable_s3d(GLcontext *ctx, GLenum cap, GLboolean state)
}
}
-void savageDDUpdateHwState( GLcontext *ctx )
+void savageDDUpdateHwState( struct gl_context *ctx )
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
@@ -1671,7 +1671,7 @@ void savageDDInitState( savageContextPtr imesa ) {
NEW_TEXTURE_MATRIX|\
NEW_USER_CLIP|NEW_CLIENT_STATE))
-static void savageDDInvalidateState( GLcontext *ctx, GLuint new_state )
+static void savageDDInvalidateState( struct gl_context *ctx, GLuint new_state )
{
_swrast_InvalidateState( ctx, new_state );
_swsetup_InvalidateState( ctx, new_state );
@@ -1681,7 +1681,7 @@ static void savageDDInvalidateState( GLcontext *ctx, GLuint new_state )
}
-void savageDDInitStateFuncs(GLcontext *ctx)
+void savageDDInitStateFuncs(struct gl_context *ctx)
{
ctx->Driver.UpdateState = savageDDInvalidateState;
ctx->Driver.BlendEquationSeparate = savageDDBlendEquationSeparate;
diff --git a/src/mesa/drivers/dri/savage/savagestate.h b/src/mesa/drivers/dri/savage/savagestate.h
index 5fe718d7a65..dca4fd0c01d 100644
--- a/src/mesa/drivers/dri/savage/savagestate.h
+++ b/src/mesa/drivers/dri/savage/savagestate.h
@@ -28,14 +28,14 @@
#include "savagecontext.h"
-void savageCalcViewport( GLcontext *ctx );
+void savageCalcViewport( struct gl_context *ctx );
void savageEmitOldState( savageContextPtr imesa );
void savageEmitChangedState( savageContextPtr imesa );
-extern void savageDDUpdateHwState( GLcontext *ctx );
+extern void savageDDUpdateHwState( struct gl_context *ctx );
extern void savageDDInitState( savageContextPtr imesa );
-extern void savageDDInitStateFuncs( GLcontext *ctx );
-extern void savageDDRenderStart(GLcontext *ctx);
-extern void savageDDRenderEnd(GLcontext *ctx);
+extern void savageDDInitStateFuncs( struct gl_context *ctx );
+extern void savageDDRenderStart(struct gl_context *ctx);
+extern void savageDDRenderEnd(struct gl_context *ctx);
#endif
diff --git a/src/mesa/drivers/dri/savage/savagetex.c b/src/mesa/drivers/dri/savage/savagetex.c
index 89090da5c63..3aece732c99 100644
--- a/src/mesa/drivers/dri/savage/savagetex.c
+++ b/src/mesa/drivers/dri/savage/savagetex.c
@@ -649,7 +649,7 @@ _savage_texstore_a1118888(TEXSTORE_PARAMS)
/* Called by the _mesa_store_teximage[123]d() functions. */
static gl_format
-savageChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
+savageChooseTextureFormat( struct gl_context *ctx, GLint internalFormat,
GLenum format, GLenum type )
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
@@ -1148,7 +1148,7 @@ savage4_set_filter_mode( savageContextPtr imesa, unsigned unit,
}
-static void savageUpdateTex0State_s4( GLcontext *ctx )
+static void savageUpdateTex0State_s4( struct gl_context *ctx )
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
struct gl_texture_object *tObj;
@@ -1392,7 +1392,7 @@ static void savageUpdateTex0State_s4( GLcontext *ctx )
return;
}
-static void savageUpdateTex1State_s4( GLcontext *ctx )
+static void savageUpdateTex1State_s4( struct gl_context *ctx )
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
struct gl_texture_object *tObj;
@@ -1575,7 +1575,7 @@ static void savageUpdateTex1State_s4( GLcontext *ctx )
if(t->base.heap->heapId == SAVAGE_AGP_HEAP)
imesa->regs.s4.texAddr[1].ui |= 0x1;
}
-static void savageUpdateTexState_s3d( GLcontext *ctx )
+static void savageUpdateTexState_s3d( struct gl_context *ctx )
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
struct gl_texture_object *tObj;
@@ -1746,7 +1746,7 @@ static void savageTimestampTextures( savageContextPtr imesa )
}
-static void savageUpdateTextureState_s4( GLcontext *ctx )
+static void savageUpdateTextureState_s4( struct gl_context *ctx )
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
@@ -1771,7 +1771,7 @@ static void savageUpdateTextureState_s4( GLcontext *ctx )
imesa->dirty |= (SAVAGE_UPLOAD_TEX0 |
SAVAGE_UPLOAD_TEX1);
}
-static void savageUpdateTextureState_s3d( GLcontext *ctx )
+static void savageUpdateTextureState_s3d( struct gl_context *ctx )
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
@@ -1789,7 +1789,7 @@ static void savageUpdateTextureState_s3d( GLcontext *ctx )
savageUpdateTexState_s3d( ctx );
imesa->dirty |= (SAVAGE_UPLOAD_TEX0);
}
-void savageUpdateTextureState( GLcontext *ctx)
+void savageUpdateTextureState( struct gl_context *ctx)
{
savageContextPtr imesa = SAVAGE_CONTEXT( ctx );
FALLBACK (ctx, SAVAGE_FALLBACK_TEXTURE, GL_FALSE);
@@ -1806,7 +1806,7 @@ void savageUpdateTextureState( GLcontext *ctx)
* DRIVER functions
*****************************************/
-static void savageTexEnv( GLcontext *ctx, GLenum target,
+static void savageTexEnv( struct gl_context *ctx, GLenum target,
GLenum pname, const GLfloat *param )
{
savageContextPtr imesa = SAVAGE_CONTEXT( ctx );
@@ -1847,7 +1847,7 @@ static void savageTexImageChanged (savageTexObjPtr t) {
}
}
-static void savageTexImage1D( GLcontext *ctx, GLenum target, GLint level,
+static void savageTexImage1D( struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -1872,7 +1872,7 @@ static void savageTexImage1D( GLcontext *ctx, GLenum target, GLint level,
SAVAGE_CONTEXT(ctx)->new_state |= SAVAGE_NEW_TEXTURE;
}
-static void savageTexSubImage1D( GLcontext *ctx,
+static void savageTexSubImage1D( struct gl_context *ctx,
GLenum target,
GLint level,
GLint xoffset,
@@ -1904,7 +1904,7 @@ static void savageTexSubImage1D( GLcontext *ctx,
SAVAGE_CONTEXT(ctx)->new_state |= SAVAGE_NEW_TEXTURE;
}
-static void savageTexImage2D( GLcontext *ctx, GLenum target, GLint level,
+static void savageTexImage2D( struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -1929,7 +1929,7 @@ static void savageTexImage2D( GLcontext *ctx, GLenum target, GLint level,
SAVAGE_CONTEXT(ctx)->new_state |= SAVAGE_NEW_TEXTURE;
}
-static void savageTexSubImage2D( GLcontext *ctx,
+static void savageTexSubImage2D( struct gl_context *ctx,
GLenum target,
GLint level,
GLint xoffset, GLint yoffset,
@@ -1962,7 +1962,7 @@ static void savageTexSubImage2D( GLcontext *ctx,
}
static void
-savageCompressedTexImage2D( GLcontext *ctx, GLenum target, GLint level,
+savageCompressedTexImage2D( struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint border,
GLsizei imageSize, const GLvoid *data,
@@ -1987,7 +1987,7 @@ savageCompressedTexImage2D( GLcontext *ctx, GLenum target, GLint level,
}
static void
-savageCompressedTexSubImage2D( GLcontext *ctx,
+savageCompressedTexSubImage2D( struct gl_context *ctx,
GLenum target,
GLint level,
GLint xoffset, GLint yoffset,
@@ -2018,7 +2018,7 @@ savageCompressedTexSubImage2D( GLcontext *ctx,
SAVAGE_CONTEXT(ctx)->new_state |= SAVAGE_NEW_TEXTURE;
}
-static void savageTexParameter( GLcontext *ctx, GLenum target,
+static void savageTexParameter( struct gl_context *ctx, GLenum target,
struct gl_texture_object *tObj,
GLenum pname, const GLfloat *params )
{
@@ -2050,7 +2050,7 @@ static void savageTexParameter( GLcontext *ctx, GLenum target,
imesa->new_state |= SAVAGE_NEW_TEXTURE;
}
-static void savageBindTexture( GLcontext *ctx, GLenum target,
+static void savageBindTexture( struct gl_context *ctx, GLenum target,
struct gl_texture_object *tObj )
{
savageContextPtr imesa = SAVAGE_CONTEXT( ctx );
@@ -2061,7 +2061,7 @@ static void savageBindTexture( GLcontext *ctx, GLenum target,
imesa->new_state |= SAVAGE_NEW_TEXTURE;
}
-static void savageDeleteTexture( GLcontext *ctx, struct gl_texture_object *tObj )
+static void savageDeleteTexture( struct gl_context *ctx, struct gl_texture_object *tObj )
{
driTextureObject *t = (driTextureObject *)tObj->DriverData;
savageContextPtr imesa = SAVAGE_CONTEXT( ctx );
@@ -2078,7 +2078,7 @@ static void savageDeleteTexture( GLcontext *ctx, struct gl_texture_object *tObj
static struct gl_texture_object *
-savageNewTextureObject( GLcontext *ctx, GLuint name, GLenum target )
+savageNewTextureObject( struct gl_context *ctx, GLuint name, GLenum target )
{
struct gl_texture_object *obj;
obj = _mesa_new_texture_object(ctx, name, target);
diff --git a/src/mesa/drivers/dri/savage/savagetex.h b/src/mesa/drivers/dri/savage/savagetex.h
index e5f8a80f85d..6108c1aade9 100644
--- a/src/mesa/drivers/dri/savage/savagetex.h
+++ b/src/mesa/drivers/dri/savage/savagetex.h
@@ -75,7 +75,7 @@ typedef struct {
#define __HWParseTexEnvCombine(imesa, flag0, TexCtrl, TexBlendCtrl)
-void savageUpdateTextureState( GLcontext *ctx );
+void savageUpdateTextureState( struct gl_context *ctx );
void savageDDInitTextureFuncs( struct dd_function_table *functions );
void savageDestroyTexObj( savageContextPtr imesa, savageTexObjPtr t );
diff --git a/src/mesa/drivers/dri/savage/savagetris.c b/src/mesa/drivers/dri/savage/savagetris.c
index 0050485e313..79a951147f9 100644
--- a/src/mesa/drivers/dri/savage/savagetris.c
+++ b/src/mesa/drivers/dri/savage/savagetris.c
@@ -53,8 +53,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "savagetex.h"
#include "savageioctl.h"
-static void savageRasterPrimitive( GLcontext *ctx, GLuint prim );
-static void savageRenderPrimitive( GLcontext *ctx, GLenum prim );
+static void savageRasterPrimitive( struct gl_context *ctx, GLuint prim );
+static void savageRenderPrimitive( struct gl_context *ctx, GLenum prim );
static GLenum reduced_prim[GL_POLYGON+1] = {
@@ -562,7 +562,7 @@ savage_fallback_tri( savageContextPtr imesa,
savageVertexPtr v1,
savageVertexPtr v2 )
{
- GLcontext *ctx = imesa->glCtx;
+ struct gl_context *ctx = imesa->glCtx;
SWvertex v[3];
FLUSH_BATCH(imesa);
WAIT_IDLE_EMPTY(imesa);
@@ -578,7 +578,7 @@ savage_fallback_line( savageContextPtr imesa,
savageVertexPtr v0,
savageVertexPtr v1 )
{
- GLcontext *ctx = imesa->glCtx;
+ struct gl_context *ctx = imesa->glCtx;
SWvertex v[2];
FLUSH_BATCH(imesa);
WAIT_IDLE_EMPTY(imesa);
@@ -592,7 +592,7 @@ static void
savage_fallback_point( savageContextPtr imesa,
savageVertexPtr v0 )
{
- GLcontext *ctx = imesa->glCtx;
+ struct gl_context *ctx = imesa->glCtx;
SWvertex v[1];
FLUSH_BATCH(imesa);
WAIT_IDLE_EMPTY(imesa);
@@ -645,7 +645,7 @@ savage_fallback_point( savageContextPtr imesa,
/* Render clipped primitives */
/**********************************************************************/
-static void savageRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
+static void savageRenderClippedPoly( struct gl_context *ctx, const GLuint *elts,
GLuint n )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -661,13 +661,13 @@ static void savageRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
}
}
-static void savageRenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj )
+static void savageRenderClippedLine( struct gl_context *ctx, GLuint ii, GLuint jj )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
tnl->Driver.Render.Line( ctx, ii, jj );
}
/*
-static void savageFastRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
+static void savageFastRenderClippedPoly( struct gl_context *ctx, const GLuint *elts,
GLuint n )
{
r128ContextPtr rmesa = R128_CONTEXT( ctx );
@@ -711,7 +711,7 @@ static void savageFastRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
#define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET|DD_TRI_UNFILLED)
-static void savageChooseRenderState(GLcontext *ctx)
+static void savageChooseRenderState(struct gl_context *ctx)
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
GLuint flags = ctx->_TriangleCaps;
@@ -781,7 +781,7 @@ static void savageChooseRenderState(GLcontext *ctx)
/* Validate state at pipeline start */
/**********************************************************************/
-static void savageRunPipeline( GLcontext *ctx )
+static void savageRunPipeline( struct gl_context *ctx )
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
@@ -829,7 +829,7 @@ static void savageRunPipeline( GLcontext *ctx )
* primitives.
*/
-static void savageRasterPrimitive( GLcontext *ctx, GLuint prim )
+static void savageRasterPrimitive( struct gl_context *ctx, GLuint prim )
{
savageContextPtr imesa = SAVAGE_CONTEXT( ctx );
@@ -851,7 +851,7 @@ static void savageRasterPrimitive( GLcontext *ctx, GLuint prim )
#endif
}
-static void savageRenderPrimitive( GLcontext *ctx, GLenum prim )
+static void savageRenderPrimitive( struct gl_context *ctx, GLenum prim )
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
GLuint rprim = reduced_prim[prim];
@@ -870,7 +870,7 @@ static void savageRenderPrimitive( GLcontext *ctx, GLenum prim )
* them. Fallback to swrast we can't. Returns GL_TRUE if projective
* texture coordinates must be faked, GL_FALSE otherwise.
*/
-static GLboolean savageCheckPTexHack( GLcontext *ctx )
+static GLboolean savageCheckPTexHack( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
@@ -933,7 +933,7 @@ do { \
#define SAVAGE_EMIT_ST1 0x0300
-static INLINE GLuint savageChooseVertexFormat_s3d( GLcontext *ctx )
+static INLINE GLuint savageChooseVertexFormat_s3d( struct gl_context *ctx )
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -996,7 +996,7 @@ static INLINE GLuint savageChooseVertexFormat_s3d( GLcontext *ctx )
}
-static INLINE GLuint savageChooseVertexFormat_s4( GLcontext *ctx )
+static INLINE GLuint savageChooseVertexFormat_s4( struct gl_context *ctx )
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -1121,7 +1121,7 @@ static INLINE GLuint savageChooseVertexFormat_s4( GLcontext *ctx )
}
-static void savageRenderStart( GLcontext *ctx )
+static void savageRenderStart( struct gl_context *ctx )
{
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -1199,7 +1199,7 @@ static void savageRenderStart( GLcontext *ctx )
}
}
-static void savageRenderFinish( GLcontext *ctx )
+static void savageRenderFinish( struct gl_context *ctx )
{
/* Flush the last primitive now, before any state is changed. */
savageFlushVertices(SAVAGE_CONTEXT(ctx));
@@ -1227,7 +1227,7 @@ static const char * const fallbackStrings[] = {
"Projective texture",
};
-void savageFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
+void savageFallback( struct gl_context *ctx, GLuint bit, GLboolean mode )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
savageContextPtr imesa = SAVAGE_CONTEXT(ctx);
@@ -1279,7 +1279,7 @@ void savageFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
/* Initialization. */
/**********************************************************************/
-void savageInitTriFuncs( GLcontext *ctx )
+void savageInitTriFuncs( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
static int firsttime = 1;
diff --git a/src/mesa/drivers/dri/savage/savagetris.h b/src/mesa/drivers/dri/savage/savagetris.h
index a2a9375ed54..5dcae78f760 100644
--- a/src/mesa/drivers/dri/savage/savagetris.h
+++ b/src/mesa/drivers/dri/savage/savagetris.h
@@ -38,10 +38,10 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/mtypes.h"
-extern void savageInitTriFuncs( GLcontext *ctx );
+extern void savageInitTriFuncs( struct gl_context *ctx );
-extern void savageFallback( GLcontext *ctx, GLuint bit, GLboolean mode );
+extern void savageFallback( struct gl_context *ctx, GLuint bit, GLboolean mode );
#define FALLBACK( ctx, bit, mode ) savageFallback( ctx, bit, mode )
diff --git a/src/mesa/drivers/dri/sis/sis6326_clear.c b/src/mesa/drivers/dri/sis/sis6326_clear.c
index d46ecc9cd27..fba6c7f2d7d 100644
--- a/src/mesa/drivers/dri/sis/sis6326_clear.c
+++ b/src/mesa/drivers/dri/sis/sis6326_clear.c
@@ -34,11 +34,11 @@
#include "swrast/swrast.h"
#include "main/macros.h"
-static void sis_clear_front_buffer(GLcontext *ctx, GLenum mask, GLint x,
+static void sis_clear_front_buffer(struct gl_context *ctx, GLenum mask, GLint x,
GLint y, GLint width, GLint height);
-static void sis_clear_back_buffer(GLcontext *ctx, GLenum mask, GLint x,
+static void sis_clear_back_buffer(struct gl_context *ctx, GLenum mask, GLint x,
GLint y, GLint width, GLint height);
-static void sis_clear_z_buffer(GLcontext * ctx, GLbitfield mask, GLint x,
+static void sis_clear_z_buffer(struct gl_context * ctx, GLbitfield mask, GLint x,
GLint y, GLint width, GLint height );
static void
@@ -69,7 +69,7 @@ sis6326UpdateZPattern(sisContextPtr smesa, GLclampd z)
}
void
-sis6326DDClear(GLcontext *ctx, GLbitfield mask)
+sis6326DDClear(struct gl_context *ctx, GLbitfield mask)
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
GLint x1, y1, width1, height1;
@@ -114,7 +114,7 @@ sis6326DDClear(GLcontext *ctx, GLbitfield mask)
void
-sis6326DDClearColor(GLcontext *ctx, const GLfloat color[4])
+sis6326DDClearColor(struct gl_context *ctx, const GLfloat color[4])
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
GLubyte c[4];
@@ -128,7 +128,7 @@ sis6326DDClearColor(GLcontext *ctx, const GLfloat color[4])
}
void
-sis6326DDClearDepth(GLcontext *ctx, GLclampd d)
+sis6326DDClearDepth(struct gl_context *ctx, GLclampd d)
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -136,7 +136,7 @@ sis6326DDClearDepth(GLcontext *ctx, GLclampd d)
}
static void
-sis_clear_back_buffer(GLcontext *ctx, GLenum mask, GLint x, GLint y,
+sis_clear_back_buffer(struct gl_context *ctx, GLenum mask, GLint x, GLint y,
GLint width, GLint height)
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -160,7 +160,7 @@ sis_clear_back_buffer(GLcontext *ctx, GLenum mask, GLint x, GLint y,
}
static void
-sis_clear_front_buffer(GLcontext *ctx, GLenum mask, GLint x, GLint y,
+sis_clear_front_buffer(struct gl_context *ctx, GLenum mask, GLint x, GLint y,
GLint width, GLint height)
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -211,7 +211,7 @@ sis_clear_front_buffer(GLcontext *ctx, GLenum mask, GLint x, GLint y,
}
static void
-sis_clear_z_buffer(GLcontext * ctx, GLbitfield mask, GLint x, GLint y,
+sis_clear_z_buffer(struct gl_context * ctx, GLbitfield mask, GLint x, GLint y,
GLint width, GLint height)
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/sis/sis6326_state.c b/src/mesa/drivers/dri/sis/sis6326_state.c
index 52008c7ea32..9708f639124 100644
--- a/src/mesa/drivers/dri/sis/sis6326_state.c
+++ b/src/mesa/drivers/dri/sis/sis6326_state.c
@@ -46,7 +46,7 @@
*/
static void
-sis6326DDAlphaFunc( GLcontext *ctx, GLenum func, GLfloat ref )
+sis6326DDAlphaFunc( struct gl_context *ctx, GLenum func, GLfloat ref )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
GLubyte refbyte;
@@ -91,7 +91,7 @@ sis6326DDAlphaFunc( GLcontext *ctx, GLenum func, GLfloat ref )
}
static void
-sis6326DDBlendFuncSeparate( GLcontext *ctx,
+sis6326DDBlendFuncSeparate( struct gl_context *ctx,
GLenum sfactorRGB, GLenum dfactorRGB,
GLenum sfactorA, GLenum dfactorA )
{
@@ -172,7 +172,7 @@ sis6326DDBlendFuncSeparate( GLcontext *ctx,
*/
static void
-sis6326DDDepthFunc( GLcontext *ctx, GLenum func )
+sis6326DDDepthFunc( struct gl_context *ctx, GLenum func )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
__GLSiSHardware *prev = &smesa->prev;
@@ -214,7 +214,7 @@ sis6326DDDepthFunc( GLcontext *ctx, GLenum func )
}
static void
-sis6326DDDepthMask( GLcontext *ctx, GLboolean flag )
+sis6326DDDepthMask( struct gl_context *ctx, GLboolean flag )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
__GLSiSHardware *current = &smesa->current;
@@ -230,7 +230,7 @@ sis6326DDDepthMask( GLcontext *ctx, GLboolean flag )
*/
static void
-sis6326DDFogfv( GLcontext *ctx, GLenum pname, const GLfloat *params )
+sis6326DDFogfv( struct gl_context *ctx, GLenum pname, const GLfloat *params )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
__GLSiSHardware *current = &smesa->current;
@@ -258,7 +258,7 @@ sis6326DDFogfv( GLcontext *ctx, GLenum pname, const GLfloat *params )
*/
void
-sis6326UpdateClipping(GLcontext *ctx)
+sis6326UpdateClipping(struct gl_context *ctx)
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -300,7 +300,7 @@ sis6326UpdateClipping(GLcontext *ctx)
}
static void
-sis6326DDScissor( GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h )
+sis6326DDScissor( struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h )
{
if (ctx->Scissor.Enabled)
sis6326UpdateClipping( ctx );
@@ -311,20 +311,20 @@ sis6326DDScissor( GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h )
*/
static void
-sis6326UpdateCull( GLcontext *ctx )
+sis6326UpdateCull( struct gl_context *ctx )
{
/* XXX culling */
}
static void
-sis6326DDCullFace( GLcontext *ctx, GLenum mode )
+sis6326DDCullFace( struct gl_context *ctx, GLenum mode )
{
sis6326UpdateCull( ctx );
}
static void
-sis6326DDFrontFace( GLcontext *ctx, GLenum mode )
+sis6326DDFrontFace( struct gl_context *ctx, GLenum mode )
{
sis6326UpdateCull( ctx );
}
@@ -333,7 +333,7 @@ sis6326DDFrontFace( GLcontext *ctx, GLenum mode )
* Masks
*/
-static void sis6326DDColorMask( GLcontext *ctx,
+static void sis6326DDColorMask( struct gl_context *ctx,
GLboolean r, GLboolean g,
GLboolean b, GLboolean a )
{
@@ -350,7 +350,7 @@ static void sis6326DDColorMask( GLcontext *ctx,
* Rendering attributes
*/
-static void sis6326UpdateSpecular(GLcontext *ctx)
+static void sis6326UpdateSpecular(struct gl_context *ctx)
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
__GLSiSHardware *current = &smesa->current;
@@ -361,14 +361,14 @@ static void sis6326UpdateSpecular(GLcontext *ctx)
current->hwCapEnable &= ~S_ENABLE_Specular;
}
-static void sis6326DDLightModelfv(GLcontext *ctx, GLenum pname,
+static void sis6326DDLightModelfv(struct gl_context *ctx, GLenum pname,
const GLfloat *param)
{
if (pname == GL_LIGHT_MODEL_COLOR_CONTROL) {
sis6326UpdateSpecular(ctx);
}
}
-static void sis6326DDShadeModel( GLcontext *ctx, GLenum mode )
+static void sis6326DDShadeModel( struct gl_context *ctx, GLenum mode )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -384,7 +384,7 @@ static void sis6326DDShadeModel( GLcontext *ctx, GLenum mode )
* Viewport
*/
-static void sis6326CalcViewport( GLcontext *ctx )
+static void sis6326CalcViewport( struct gl_context *ctx )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
const GLfloat *v = ctx->Viewport._WindowMap.m;
@@ -400,14 +400,14 @@ static void sis6326CalcViewport( GLcontext *ctx )
m[MAT_TZ] = v[MAT_TZ] * smesa->depth_scale;
}
-static void sis6326DDViewport( GLcontext *ctx,
+static void sis6326DDViewport( struct gl_context *ctx,
GLint x, GLint y,
GLsizei width, GLsizei height )
{
sis6326CalcViewport( ctx );
}
-static void sis6326DDDepthRange( GLcontext *ctx,
+static void sis6326DDDepthRange( struct gl_context *ctx,
GLclampd nearval, GLclampd farval )
{
sis6326CalcViewport( ctx );
@@ -418,7 +418,7 @@ static void sis6326DDDepthRange( GLcontext *ctx,
*/
static void
-sis6326DDLogicOpCode( GLcontext *ctx, GLenum opcode )
+sis6326DDLogicOpCode( struct gl_context *ctx, GLenum opcode )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -487,7 +487,7 @@ sis6326DDLogicOpCode( GLcontext *ctx, GLenum opcode )
}
}
-void sis6326DDDrawBuffer( GLcontext *ctx, GLenum mode )
+void sis6326DDDrawBuffer( struct gl_context *ctx, GLenum mode )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -544,7 +544,7 @@ void sis6326DDDrawBuffer( GLcontext *ctx, GLenum mode )
*/
static void
-sis6326DDEnable( GLcontext *ctx, GLenum cap, GLboolean state )
+sis6326DDEnable( struct gl_context *ctx, GLenum cap, GLboolean state )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -617,7 +617,7 @@ sis6326DDEnable( GLcontext *ctx, GLenum cap, GLboolean state )
/* Called before beginning of rendering. */
void
-sis6326UpdateHWState( GLcontext *ctx )
+sis6326UpdateHWState( struct gl_context *ctx )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
__GLSiSHardware *prev = &smesa->prev;
@@ -639,7 +639,7 @@ sis6326UpdateHWState( GLcontext *ctx )
}
static void
-sis6326DDInvalidateState( GLcontext *ctx, GLuint new_state )
+sis6326DDInvalidateState( struct gl_context *ctx, GLuint new_state )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -656,7 +656,7 @@ void sis6326DDInitState( sisContextPtr smesa )
{
__GLSiSHardware *prev = &smesa->prev;
__GLSiSHardware *current = &smesa->current;
- GLcontext *ctx = smesa->glCtx;
+ struct gl_context *ctx = smesa->glCtx;
/* add Texture Perspective Enable */
current->hwCapEnable = S_ENABLE_TextureCache |
@@ -708,7 +708,7 @@ void sis6326DDInitState( sisContextPtr smesa )
/* Initialize the driver's state functions.
*/
-void sis6326DDInitStateFuncs( GLcontext *ctx )
+void sis6326DDInitStateFuncs( struct gl_context *ctx )
{
ctx->Driver.UpdateState = sis6326DDInvalidateState;
diff --git a/src/mesa/drivers/dri/sis/sis_clear.c b/src/mesa/drivers/dri/sis/sis_clear.c
index d358ef62dc7..a5d870469da 100644
--- a/src/mesa/drivers/dri/sis/sis_clear.c
+++ b/src/mesa/drivers/dri/sis/sis_clear.c
@@ -38,12 +38,12 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "swrast/swrast.h"
#include "main/macros.h"
-static GLbitfield sis_3D_Clear( GLcontext * ctx, GLbitfield mask,
+static GLbitfield sis_3D_Clear( struct gl_context * ctx, GLbitfield mask,
GLint x, GLint y, GLint width,
GLint height );
-static void sis_clear_color_buffer( GLcontext *ctx, GLenum mask, GLint x,
+static void sis_clear_color_buffer( struct gl_context *ctx, GLenum mask, GLint x,
GLint y, GLint width, GLint height );
-static void sis_clear_z_stencil_buffer( GLcontext * ctx,
+static void sis_clear_z_stencil_buffer( struct gl_context * ctx,
GLbitfield mask, GLint x,
GLint y, GLint width,
GLint height );
@@ -94,7 +94,7 @@ sisUpdateZStencilPattern( sisContextPtr smesa, GLclampd z, GLint stencil )
}
void
-sisDDClear( GLcontext * ctx, GLbitfield mask )
+sisDDClear( struct gl_context * ctx, GLbitfield mask )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -148,7 +148,7 @@ sisDDClear( GLcontext * ctx, GLbitfield mask )
void
-sisDDClearColor( GLcontext * ctx, const GLfloat color[4] )
+sisDDClearColor( struct gl_context * ctx, const GLfloat color[4] )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
GLubyte c[4];
@@ -162,7 +162,7 @@ sisDDClearColor( GLcontext * ctx, const GLfloat color[4] )
}
void
-sisDDClearDepth( GLcontext * ctx, GLclampd d )
+sisDDClearDepth( struct gl_context * ctx, GLclampd d )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -170,7 +170,7 @@ sisDDClearDepth( GLcontext * ctx, GLclampd d )
}
void
-sisDDClearStencil( GLcontext * ctx, GLint s )
+sisDDClearStencil( struct gl_context * ctx, GLint s )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -178,7 +178,7 @@ sisDDClearStencil( GLcontext * ctx, GLint s )
}
static GLbitfield
-sis_3D_Clear( GLcontext * ctx, GLbitfield mask,
+sis_3D_Clear( struct gl_context * ctx, GLbitfield mask,
GLint x, GLint y, GLint width, GLint height )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -323,7 +323,7 @@ sis_3D_Clear( GLcontext * ctx, GLbitfield mask,
}
static void
-sis_clear_color_buffer( GLcontext *ctx, GLenum mask, GLint x, GLint y,
+sis_clear_color_buffer( struct gl_context *ctx, GLenum mask, GLint x, GLint y,
GLint width, GLint height )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -389,7 +389,7 @@ sis_clear_color_buffer( GLcontext *ctx, GLenum mask, GLint x, GLint y,
}
static void
-sis_clear_z_stencil_buffer( GLcontext * ctx, GLbitfield mask,
+sis_clear_z_stencil_buffer( struct gl_context * ctx, GLbitfield mask,
GLint x, GLint y, GLint width, GLint height )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/sis/sis_context.c b/src/mesa/drivers/dri/sis/sis_context.c
index 85f26a08b7f..c5a9fdfb2a0 100644
--- a/src/mesa/drivers/dri/sis/sis_context.c
+++ b/src/mesa/drivers/dri/sis/sis_context.c
@@ -147,7 +147,7 @@ WaitingFor3dIdle(sisContextPtr smesa, int wLen)
}
}
-void sisReAllocateBuffers(GLcontext *ctx, GLframebuffer *drawbuffer,
+void sisReAllocateBuffers(struct gl_context *ctx, struct gl_framebuffer *drawbuffer,
GLuint width, GLuint height)
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -159,11 +159,11 @@ void sisReAllocateBuffers(GLcontext *ctx, GLframebuffer *drawbuffer,
GLboolean
sisCreateContext( gl_api api,
- const __GLcontextModes *glVisual,
+ const struct gl_config *glVisual,
__DRIcontext *driContextPriv,
void *sharedContextPrivate )
{
- GLcontext *ctx, *shareCtx;
+ struct gl_context *ctx, *shareCtx;
__DRIscreen *sPriv = driContextPriv->driScreenPriv;
sisContextPtr smesa;
sisScreenPtr sisScreen;
@@ -381,8 +381,8 @@ sisMakeCurrent( __DRIcontext *driContextPriv,
newSisCtx->driDrawable = driDrawPriv;
- drawBuffer = (GLframebuffer *)driDrawPriv->driverPrivate;
- readBuffer = (GLframebuffer *)driReadPriv->driverPrivate;
+ drawBuffer = (struct gl_framebuffer *)driDrawPriv->driverPrivate;
+ readBuffer = (struct gl_framebuffer *)driReadPriv->driverPrivate;
_mesa_make_current( newSisCtx->glCtx, drawBuffer, readBuffer );
diff --git a/src/mesa/drivers/dri/sis/sis_context.h b/src/mesa/drivers/dri/sis/sis_context.h
index 132cee33ee3..a82a659431e 100644
--- a/src/mesa/drivers/dri/sis/sis_context.h
+++ b/src/mesa/drivers/dri/sis/sis_context.h
@@ -256,7 +256,7 @@ struct sis_renderbuffer {
struct sis_context
{
/* This must be first in this structure */
- GLcontext *glCtx;
+ struct gl_context *glCtx;
/* Vertex state */
GLuint vertex_size;
@@ -439,12 +439,12 @@ enum _sis_verbose {
};
extern GLboolean sisCreateContext( gl_api api,
- const __GLcontextModes *glVisual,
+ const struct gl_config *glVisual,
__DRIcontext *driContextPriv,
void *sharedContextPrivate );
extern void sisDestroyContext( __DRIcontext * );
-void sisReAllocateBuffers(GLcontext *ctx, GLframebuffer *drawbuffer,
+void sisReAllocateBuffers(struct gl_context *ctx, struct gl_framebuffer *drawbuffer,
GLuint width, GLuint height);
extern GLboolean sisMakeCurrent( __DRIcontext *driContextPriv,
diff --git a/src/mesa/drivers/dri/sis/sis_dd.c b/src/mesa/drivers/dri/sis/sis_dd.c
index fe4ade85920..90e894b842c 100644
--- a/src/mesa/drivers/dri/sis/sis_dd.c
+++ b/src/mesa/drivers/dri/sis/sis_dd.c
@@ -50,7 +50,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
/* Return the width and height of the given buffer.
*/
static void
-sisGetBufferSize( GLframebuffer *buffer,
+sisGetBufferSize( struct gl_framebuffer *buffer,
GLuint *width, GLuint *height )
{
GET_CURRENT_CONTEXT(ctx);
@@ -65,7 +65,7 @@ sisGetBufferSize( GLframebuffer *buffer,
/* Return various strings for glGetString().
*/
static const GLubyte *
-sisGetString( GLcontext *ctx, GLenum name )
+sisGetString( struct gl_context *ctx, GLenum name )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
static char buffer[128];
@@ -90,7 +90,7 @@ sisGetString( GLcontext *ctx, GLenum name )
/* Send all commands to the hardware.
*/
static void
-sisFlush( GLcontext *ctx )
+sisFlush( struct gl_context *ctx )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -101,7 +101,7 @@ sisFlush( GLcontext *ctx )
* completed processing.
*/
static void
-sisFinish( GLcontext *ctx )
+sisFinish( struct gl_context *ctx )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -118,7 +118,7 @@ sisDeleteRenderbuffer(struct gl_renderbuffer *rb)
}
static GLboolean
-sisRenderbufferStorage(GLcontext *ctx, struct gl_renderbuffer *rb,
+sisRenderbufferStorage(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLenum internalFormat, GLuint width, GLuint height)
{
rb->Width = width;
diff --git a/src/mesa/drivers/dri/sis/sis_fog.c b/src/mesa/drivers/dri/sis/sis_fog.c
index 6c774e010eb..a9b84654a3d 100644
--- a/src/mesa/drivers/dri/sis/sis_fog.c
+++ b/src/mesa/drivers/dri/sis/sis_fog.c
@@ -40,7 +40,7 @@ static GLint convertFtToFogFt( GLfloat dwInValue );
static GLint doFPtoFixedNoRound( GLfloat dwInValue, int nFraction );
void
-sisDDFogfv( GLcontext *ctx, GLenum pname, const GLfloat *params )
+sisDDFogfv( struct gl_context *ctx, GLenum pname, const GLfloat *params )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
__GLSiSHardware *prev = &smesa->prev;
diff --git a/src/mesa/drivers/dri/sis/sis_screen.c b/src/mesa/drivers/dri/sis/sis_screen.c
index 80fb455ec75..75f6fcf2116 100644
--- a/src/mesa/drivers/dri/sis/sis_screen.c
+++ b/src/mesa/drivers/dri/sis/sis_screen.c
@@ -193,7 +193,7 @@ sisDestroyScreen( __DRIscreen *sPriv )
static GLboolean
sisCreateBuffer( __DRIscreen *driScrnPriv,
__DRIdrawable *driDrawPriv,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
GLboolean isPixmap )
{
/*sisScreenPtr screen = (sisScreenPtr) driScrnPriv->private;*/
@@ -220,7 +220,7 @@ sisCreateBuffer( __DRIscreen *driScrnPriv,
static void
sisDestroyBuffer(__DRIdrawable *driDrawPriv)
{
- _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
+ _mesa_reference_framebuffer((struct gl_framebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
}
static void sisCopyBuffer( __DRIdrawable *dPriv )
@@ -262,7 +262,7 @@ sisSwapBuffers(__DRIdrawable *dPriv)
{
if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) {
sisContextPtr smesa = (sisContextPtr) dPriv->driContextPriv->driverPrivate;
- GLcontext *ctx = smesa->glCtx;
+ struct gl_context *ctx = smesa->glCtx;
if (ctx->Visual.doubleBufferMode) {
_mesa_notifySwapBuffers( ctx ); /* flush pending rendering comands */
@@ -280,7 +280,7 @@ sisSwapBuffers(__DRIdrawable *dPriv)
*
* \todo maybe fold this into intelInitDriver
*
- * \return the __GLcontextModes supported by this driver
+ * \return the struct gl_config supported by this driver
*/
static const __DRIconfig **
sisInitScreen(__DRIscreen *psp)
diff --git a/src/mesa/drivers/dri/sis/sis_span.c b/src/mesa/drivers/dri/sis/sis_span.c
index 008b00160e8..01c1fc428da 100644
--- a/src/mesa/drivers/dri/sis/sis_span.c
+++ b/src/mesa/drivers/dri/sis/sis_span.c
@@ -143,7 +143,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
-void sisSpanRenderStart( GLcontext *ctx )
+void sisSpanRenderStart( struct gl_context *ctx )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -152,7 +152,7 @@ void sisSpanRenderStart( GLcontext *ctx )
WaitEngIdle( smesa );
}
-void sisSpanRenderFinish( GLcontext *ctx )
+void sisSpanRenderFinish( struct gl_context *ctx )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -161,7 +161,7 @@ void sisSpanRenderFinish( GLcontext *ctx )
}
void
-sisDDInitSpanFuncs( GLcontext *ctx )
+sisDDInitSpanFuncs( struct gl_context *ctx )
{
struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference(ctx);
swdd->SpanRenderStart = sisSpanRenderStart;
@@ -174,7 +174,7 @@ sisDDInitSpanFuncs( GLcontext *ctx )
* Plug in the Get/Put routines for the given driRenderbuffer.
*/
void
-sisSetSpanFunctions(struct sis_renderbuffer *srb, const GLvisual *vis)
+sisSetSpanFunctions(struct sis_renderbuffer *srb, const struct gl_config *vis)
{
if (srb->Base.Format == MESA_FORMAT_RGB565) {
sisInitPointers_RGB565( &srb->Base );
diff --git a/src/mesa/drivers/dri/sis/sis_span.h b/src/mesa/drivers/dri/sis/sis_span.h
index a1f817c44c2..cbe4bbdc551 100644
--- a/src/mesa/drivers/dri/sis/sis_span.h
+++ b/src/mesa/drivers/dri/sis/sis_span.h
@@ -34,12 +34,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "drirenderbuffer.h"
-extern void sisSpanRenderStart( GLcontext *ctx );
-extern void sisSpanRenderFinish( GLcontext *ctx );
+extern void sisSpanRenderStart( struct gl_context *ctx );
+extern void sisSpanRenderFinish( struct gl_context *ctx );
-extern void sisDDInitSpanFuncs( GLcontext *ctx );
+extern void sisDDInitSpanFuncs( struct gl_context *ctx );
extern void
-sisSetSpanFunctions(struct sis_renderbuffer *srb, const GLvisual *vis);
+sisSetSpanFunctions(struct sis_renderbuffer *srb, const struct gl_config *vis);
#endif
diff --git a/src/mesa/drivers/dri/sis/sis_state.c b/src/mesa/drivers/dri/sis/sis_state.c
index 6173231a82e..e53c326441b 100644
--- a/src/mesa/drivers/dri/sis/sis_state.c
+++ b/src/mesa/drivers/dri/sis/sis_state.c
@@ -49,7 +49,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
static void
-sisDDAlphaFunc( GLcontext * ctx, GLenum func, GLfloat ref )
+sisDDAlphaFunc( struct gl_context * ctx, GLenum func, GLfloat ref )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
GLubyte refbyte;
@@ -94,7 +94,7 @@ sisDDAlphaFunc( GLcontext * ctx, GLenum func, GLfloat ref )
}
static void
-sisDDBlendFuncSeparate( GLcontext *ctx,
+sisDDBlendFuncSeparate( struct gl_context *ctx,
GLenum sfactorRGB, GLenum dfactorRGB,
GLenum sfactorA, GLenum dfactorA )
{
@@ -193,7 +193,7 @@ sisDDBlendFuncSeparate( GLcontext *ctx,
*/
static void
-sisDDDepthFunc( GLcontext * ctx, GLenum func )
+sisDDDepthFunc( struct gl_context * ctx, GLenum func )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
__GLSiSHardware *prev = &smesa->prev;
@@ -235,7 +235,7 @@ sisDDDepthFunc( GLcontext * ctx, GLenum func )
}
void
-sisDDDepthMask( GLcontext * ctx, GLboolean flag )
+sisDDDepthMask( struct gl_context * ctx, GLboolean flag )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
__GLSiSHardware *prev = &smesa->prev;
@@ -277,7 +277,7 @@ sisDDDepthMask( GLcontext * ctx, GLboolean flag )
*/
void
-sisUpdateClipping( GLcontext *ctx )
+sisUpdateClipping( struct gl_context *ctx )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -324,7 +324,7 @@ sisUpdateClipping( GLcontext *ctx )
}
static void
-sisDDScissor( GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h )
+sisDDScissor( struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h )
{
if (ctx->Scissor.Enabled)
sisUpdateClipping( ctx );
@@ -335,7 +335,7 @@ sisDDScissor( GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h )
*/
static void
-sisUpdateCull( GLcontext *ctx )
+sisUpdateCull( struct gl_context *ctx )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
GLint cullflag, frontface;
@@ -356,13 +356,13 @@ sisUpdateCull( GLcontext *ctx )
static void
-sisDDCullFace( GLcontext *ctx, GLenum mode )
+sisDDCullFace( struct gl_context *ctx, GLenum mode )
{
sisUpdateCull( ctx );
}
static void
-sisDDFrontFace( GLcontext *ctx, GLenum mode )
+sisDDFrontFace( struct gl_context *ctx, GLenum mode )
{
sisUpdateCull( ctx );
}
@@ -371,7 +371,7 @@ sisDDFrontFace( GLcontext *ctx, GLenum mode )
* Masks
*/
-static void sisDDColorMask( GLcontext *ctx,
+static void sisDDColorMask( struct gl_context *ctx,
GLboolean r, GLboolean g,
GLboolean b, GLboolean a )
{
@@ -402,7 +402,7 @@ static void sisDDColorMask( GLcontext *ctx,
* Rendering attributes
*/
-static void sisUpdateSpecular(GLcontext *ctx)
+static void sisUpdateSpecular(struct gl_context *ctx)
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
__GLSiSHardware *current = &smesa->current;
@@ -413,7 +413,7 @@ static void sisUpdateSpecular(GLcontext *ctx)
current->hwCapEnable &= ~MASK_SpecularEnable;
}
-static void sisDDLightModelfv(GLcontext *ctx, GLenum pname,
+static void sisDDLightModelfv(struct gl_context *ctx, GLenum pname,
const GLfloat *param)
{
if (pname == GL_LIGHT_MODEL_COLOR_CONTROL) {
@@ -421,7 +421,7 @@ static void sisDDLightModelfv(GLcontext *ctx, GLenum pname,
}
}
-static void sisDDShadeModel( GLcontext *ctx, GLenum mode )
+static void sisDDShadeModel( struct gl_context *ctx, GLenum mode )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -437,7 +437,7 @@ static void sisDDShadeModel( GLcontext *ctx, GLenum mode )
* Viewport
*/
-static void sisCalcViewport( GLcontext *ctx )
+static void sisCalcViewport( struct gl_context *ctx )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
const GLfloat *v = ctx->Viewport._WindowMap.m;
@@ -453,14 +453,14 @@ static void sisCalcViewport( GLcontext *ctx )
m[MAT_TZ] = v[MAT_TZ] * smesa->depth_scale;
}
-static void sisDDViewport( GLcontext *ctx,
+static void sisDDViewport( struct gl_context *ctx,
GLint x, GLint y,
GLsizei width, GLsizei height )
{
sisCalcViewport( ctx );
}
-static void sisDDDepthRange( GLcontext *ctx,
+static void sisDDDepthRange( struct gl_context *ctx,
GLclampd nearval, GLclampd farval )
{
sisCalcViewport( ctx );
@@ -471,7 +471,7 @@ static void sisDDDepthRange( GLcontext *ctx,
*/
static void
-sisDDLogicOpCode( GLcontext *ctx, GLenum opcode )
+sisDDLogicOpCode( struct gl_context *ctx, GLenum opcode )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -537,7 +537,7 @@ sisDDLogicOpCode( GLcontext *ctx, GLenum opcode )
}
}
-void sisDDDrawBuffer( GLcontext *ctx, GLenum mode )
+void sisDDDrawBuffer( struct gl_context *ctx, GLenum mode )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
__GLSiSHardware *prev = &smesa->prev;
@@ -589,7 +589,7 @@ void sisDDDrawBuffer( GLcontext *ctx, GLenum mode )
*/
static void
-sisDDEnable( GLcontext * ctx, GLenum cap, GLboolean state )
+sisDDEnable( struct gl_context * ctx, GLenum cap, GLboolean state )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -672,7 +672,7 @@ sisDDEnable( GLcontext * ctx, GLenum cap, GLboolean state )
/* Called before beginning of rendering. */
void
-sisUpdateHWState( GLcontext *ctx )
+sisUpdateHWState( struct gl_context *ctx )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
__GLSiSHardware *prev = &smesa->prev;
@@ -698,7 +698,7 @@ sisUpdateHWState( GLcontext *ctx )
}
static void
-sisDDInvalidateState( GLcontext *ctx, GLuint new_state )
+sisDDInvalidateState( struct gl_context *ctx, GLuint new_state )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -715,7 +715,7 @@ void sisDDInitState( sisContextPtr smesa )
{
__GLSiSHardware *current = &smesa->current;
__GLSiSHardware *prev = &(smesa->prev);
- GLcontext *ctx = smesa->glCtx;
+ struct gl_context *ctx = smesa->glCtx;
/* add Texture Perspective Enable */
prev->hwCapEnable = MASK_FogPerspectiveEnable | MASK_TextureCacheEnable |
@@ -826,7 +826,7 @@ void sisDDInitState( sisContextPtr smesa )
/* Initialize the driver's state functions.
*/
-void sisDDInitStateFuncs( GLcontext *ctx )
+void sisDDInitStateFuncs( struct gl_context *ctx )
{
ctx->Driver.UpdateState = sisDDInvalidateState;
diff --git a/src/mesa/drivers/dri/sis/sis_state.h b/src/mesa/drivers/dri/sis/sis_state.h
index 2d0ea9c5fb8..dcade4a9796 100644
--- a/src/mesa/drivers/dri/sis/sis_state.h
+++ b/src/mesa/drivers/dri/sis/sis_state.h
@@ -34,35 +34,35 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "sis_context.h"
/* sis6326_clear.c */
-extern void sis6326DDClear( GLcontext *ctx, GLbitfield mask );
-extern void sis6326DDClearColor( GLcontext * ctx, const GLfloat color[4] );
-extern void sis6326DDClearDepth( GLcontext * ctx, GLclampd d );
+extern void sis6326DDClear( struct gl_context *ctx, GLbitfield mask );
+extern void sis6326DDClearColor( struct gl_context * ctx, const GLfloat color[4] );
+extern void sis6326DDClearDepth( struct gl_context * ctx, GLclampd d );
extern void sis6326UpdateZPattern(sisContextPtr smesa, GLclampd z);
/* sis_clear.c */
-extern void sisDDClear( GLcontext *ctx, GLbitfield mask );
-extern void sisDDClearColor( GLcontext * ctx, const GLfloat color[4] );
-extern void sisDDClearDepth( GLcontext * ctx, GLclampd d );
-extern void sisDDClearStencil( GLcontext * ctx, GLint s );
+extern void sisDDClear( struct gl_context *ctx, GLbitfield mask );
+extern void sisDDClearColor( struct gl_context * ctx, const GLfloat color[4] );
+extern void sisDDClearDepth( struct gl_context * ctx, GLclampd d );
+extern void sisDDClearStencil( struct gl_context * ctx, GLint s );
extern void sisUpdateZStencilPattern( sisContextPtr smesa, GLclampd z,
int stencil );
/* sis_fog.c */
-extern void sisDDFogfv( GLcontext * ctx, GLenum pname, const GLfloat * params );
+extern void sisDDFogfv( struct gl_context * ctx, GLenum pname, const GLfloat * params );
/* sis6326_state.c */
extern void sis6326DDInitState( sisContextPtr smesa );
-extern void sis6326DDInitStateFuncs( GLcontext *ctx );
-extern void sis6326UpdateClipping( GLcontext * gc );
-extern void sis6326DDDrawBuffer( GLcontext *ctx, GLenum mode );
-extern void sis6326UpdateHWState( GLcontext *ctx );
+extern void sis6326DDInitStateFuncs( struct gl_context *ctx );
+extern void sis6326UpdateClipping( struct gl_context * gc );
+extern void sis6326DDDrawBuffer( struct gl_context *ctx, GLenum mode );
+extern void sis6326UpdateHWState( struct gl_context *ctx );
/* sis_state.c */
extern void sisDDInitState( sisContextPtr smesa );
-extern void sisDDInitStateFuncs( GLcontext *ctx );
-extern void sisDDDepthMask( GLcontext * ctx, GLboolean flag );
-extern void sisUpdateClipping( GLcontext * gc );
-extern void sisDDDrawBuffer( GLcontext *ctx, GLenum mode );
-extern void sisUpdateHWState( GLcontext *ctx );
+extern void sisDDInitStateFuncs( struct gl_context *ctx );
+extern void sisDDDepthMask( struct gl_context * ctx, GLboolean flag );
+extern void sisUpdateClipping( struct gl_context * gc );
+extern void sisDDDrawBuffer( struct gl_context *ctx, GLenum mode );
+extern void sisUpdateHWState( struct gl_context *ctx );
#endif
diff --git a/src/mesa/drivers/dri/sis/sis_stencil.c b/src/mesa/drivers/dri/sis/sis_stencil.c
index 55c0440ebae..92eb08f31fb 100644
--- a/src/mesa/drivers/dri/sis/sis_stencil.c
+++ b/src/mesa/drivers/dri/sis/sis_stencil.c
@@ -36,7 +36,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "sis_stencil.h"
static void
-sisDDStencilFuncSeparate( GLcontext * ctx, GLenum face,
+sisDDStencilFuncSeparate( struct gl_context * ctx, GLenum face,
GLenum func, GLint ref, GLuint mask )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -85,7 +85,7 @@ sisDDStencilFuncSeparate( GLcontext * ctx, GLenum face,
}
static void
-sisDDStencilMaskSeparate( GLcontext * ctx, GLenum face, GLuint mask )
+sisDDStencilMaskSeparate( struct gl_context * ctx, GLenum face, GLuint mask )
{
if (!ctx->Visual.stencilBits)
return;
@@ -95,7 +95,7 @@ sisDDStencilMaskSeparate( GLcontext * ctx, GLenum face, GLuint mask )
}
static void
-sisDDStencilOpSeparate( GLcontext * ctx, GLenum face, GLenum fail,
+sisDDStencilOpSeparate( struct gl_context * ctx, GLenum face, GLenum fail,
GLenum zfail, GLenum zpass )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -197,7 +197,7 @@ sisDDStencilOpSeparate( GLcontext * ctx, GLenum face, GLenum fail,
}
void
-sisDDInitStencilFuncs( GLcontext *ctx )
+sisDDInitStencilFuncs( struct gl_context *ctx )
{
ctx->Driver.StencilFuncSeparate = sisDDStencilFuncSeparate;
ctx->Driver.StencilMaskSeparate = sisDDStencilMaskSeparate;
diff --git a/src/mesa/drivers/dri/sis/sis_stencil.h b/src/mesa/drivers/dri/sis/sis_stencil.h
index 6b556c43781..9d061e87fd7 100644
--- a/src/mesa/drivers/dri/sis/sis_stencil.h
+++ b/src/mesa/drivers/dri/sis/sis_stencil.h
@@ -31,6 +31,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef __SIS_STENCIL_H__
#define __SIS_STENCIL_H__
-extern void sisDDInitStencilFuncs( GLcontext *ctx );
+extern void sisDDInitStencilFuncs( struct gl_context *ctx );
#endif
diff --git a/src/mesa/drivers/dri/sis/sis_tex.c b/src/mesa/drivers/dri/sis/sis_tex.c
index 31709c3af6e..bb4896d9bdf 100644
--- a/src/mesa/drivers/dri/sis/sis_tex.c
+++ b/src/mesa/drivers/dri/sis/sis_tex.c
@@ -152,7 +152,7 @@ sisFreeTexImage( sisContextPtr smesa, sisTexObjPtr t, int level )
}
static void
-sisTexEnv( GLcontext *ctx, GLenum target, GLenum pname, const GLfloat *param )
+sisTexEnv( struct gl_context *ctx, GLenum target, GLenum pname, const GLfloat *param )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -160,7 +160,7 @@ sisTexEnv( GLcontext *ctx, GLenum target, GLenum pname, const GLfloat *param )
}
static void
-sisTexParameter( GLcontext *ctx, GLenum target,
+sisTexParameter( struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj, GLenum pname,
const GLfloat *params )
{
@@ -170,7 +170,7 @@ sisTexParameter( GLcontext *ctx, GLenum target,
}
static void
-sisBindTexture( GLcontext *ctx, GLenum target,
+sisBindTexture( struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -194,7 +194,7 @@ sisBindTexture( GLcontext *ctx, GLenum target,
}
static void
-sisDeleteTexture( GLcontext * ctx, struct gl_texture_object *texObj )
+sisDeleteTexture( struct gl_context * ctx, struct gl_texture_object *texObj )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
sisTexObjPtr t;
@@ -220,14 +220,14 @@ sisDeleteTexture( GLcontext * ctx, struct gl_texture_object *texObj )
_mesa_delete_texture_object(ctx, texObj);
}
-static GLboolean sisIsTextureResident( GLcontext * ctx,
+static GLboolean sisIsTextureResident( struct gl_context * ctx,
struct gl_texture_object *texObj )
{
return (texObj->DriverData != NULL);
}
static gl_format
-sisChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
+sisChooseTextureFormat( struct gl_context *ctx, GLint internalFormat,
GLenum format, GLenum type )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -352,7 +352,7 @@ sisChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
}
}
-static void sisTexImage1D( GLcontext *ctx, GLenum target, GLint level,
+static void sisTexImage1D( struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -389,7 +389,7 @@ static void sisTexImage1D( GLcontext *ctx, GLenum target, GLint level,
}
-static void sisTexSubImage1D( GLcontext *ctx,
+static void sisTexSubImage1D( struct gl_context *ctx,
GLenum target,
GLint level,
GLint xoffset,
@@ -439,7 +439,7 @@ static void sisTexSubImage1D( GLcontext *ctx,
smesa->TexStates[ctx->Texture.CurrentUnit] |= NEW_TEXTURING;
}
-static void sisTexImage2D( GLcontext *ctx, GLenum target, GLint level,
+static void sisTexImage2D( struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -475,7 +475,7 @@ static void sisTexImage2D( GLcontext *ctx, GLenum target, GLint level,
smesa->TexStates[ctx->Texture.CurrentUnit] |= NEW_TEXTURING;
}
-static void sisTexSubImage2D( GLcontext *ctx,
+static void sisTexSubImage2D( struct gl_context *ctx,
GLenum target,
GLint level,
GLint xoffset, GLint yoffset,
@@ -544,7 +544,7 @@ static void sisTexSubImage2D( GLcontext *ctx,
* texture object from the core mesa gl_texture_object. Not done at this time.
*/
static struct gl_texture_object *
-sisNewTextureObject( GLcontext *ctx, GLuint name, GLenum target )
+sisNewTextureObject( struct gl_context *ctx, GLuint name, GLenum target )
{
struct gl_texture_object *obj;
obj = _mesa_new_texture_object(ctx, name, target);
diff --git a/src/mesa/drivers/dri/sis/sis_tex.h b/src/mesa/drivers/dri/sis/sis_tex.h
index c499e80e86d..f467b7dca9e 100644
--- a/src/mesa/drivers/dri/sis/sis_tex.h
+++ b/src/mesa/drivers/dri/sis/sis_tex.h
@@ -32,6 +32,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define __SIS_TEX_H__
extern void sisInitTextureFuncs( struct dd_function_table *table );
-extern void sisUpdateTextureState( GLcontext *ctx );
+extern void sisUpdateTextureState( struct gl_context *ctx );
#endif /* __SIS_TEX_H__ */
diff --git a/src/mesa/drivers/dri/sis/sis_texstate.c b/src/mesa/drivers/dri/sis/sis_texstate.c
index 7b0eebd066f..daec2393211 100644
--- a/src/mesa/drivers/dri/sis/sis_texstate.c
+++ b/src/mesa/drivers/dri/sis/sis_texstate.c
@@ -46,7 +46,7 @@ static GLint TransferTexturePitch (GLint dwPitch);
/* Handle texenv stuff, called from validate_texture (renderstart) */
static void
-sis_set_texture_env0( GLcontext *ctx, struct gl_texture_object *texObj,
+sis_set_texture_env0( struct gl_context *ctx, struct gl_texture_object *texObj,
int unit )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -182,7 +182,7 @@ sis_set_texture_env0( GLcontext *ctx, struct gl_texture_object *texObj,
/* Handle texenv stuff, called from validate_texture (renderstart) */
static void
-sis_set_texture_env1( GLcontext *ctx, struct gl_texture_object *texObj,
+sis_set_texture_env1( struct gl_context *ctx, struct gl_texture_object *texObj,
int unit)
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -318,7 +318,7 @@ sis_set_texture_env1( GLcontext *ctx, struct gl_texture_object *texObj,
/* Returns 0 if a software fallback is necessary */
static GLboolean
-sis_set_texobj_parm( GLcontext *ctx, struct gl_texture_object *texObj,
+sis_set_texobj_parm( struct gl_context *ctx, struct gl_texture_object *texObj,
int hw_unit )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -583,7 +583,7 @@ sis_set_texobj_parm( GLcontext *ctx, struct gl_texture_object *texObj,
/* Disable a texture unit, called from validate_texture */
static void
-sis_reset_texture_env (GLcontext *ctx, int hw_unit)
+sis_reset_texture_env (struct gl_context *ctx, int hw_unit)
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -620,7 +620,7 @@ sis_reset_texture_env (GLcontext *ctx, int hw_unit)
}
}
-static void updateTextureUnit( GLcontext *ctx, int unit )
+static void updateTextureUnit( struct gl_context *ctx, int unit )
{
sisContextPtr smesa = SIS_CONTEXT( ctx );
const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
@@ -656,7 +656,7 @@ static void updateTextureUnit( GLcontext *ctx, int unit )
}
-void sisUpdateTextureState( GLcontext *ctx )
+void sisUpdateTextureState( struct gl_context *ctx )
{
sisContextPtr smesa = SIS_CONTEXT( ctx );
int i;
diff --git a/src/mesa/drivers/dri/sis/sis_tris.c b/src/mesa/drivers/dri/sis/sis_tris.c
index d109a8c41e9..8db593fb9c7 100644
--- a/src/mesa/drivers/dri/sis/sis_tris.c
+++ b/src/mesa/drivers/dri/sis/sis_tris.c
@@ -92,8 +92,8 @@ static const GLuint hw_prim_agp_shade[OP_3D_TRIANGLE_DRAW+1] = {
MASK_PsShadingFlatC
};
-static void sisRasterPrimitive( GLcontext *ctx, GLuint hwprim );
-static void sisRenderPrimitive( GLcontext *ctx, GLenum prim );
+static void sisRasterPrimitive( struct gl_context *ctx, GLuint hwprim );
+static void sisRenderPrimitive( struct gl_context *ctx, GLenum prim );
/***********************************************************************
* Emit primitives as inline vertices *
@@ -556,7 +556,7 @@ sis_fallback_tri( sisContextPtr smesa,
sisVertex *v1,
sisVertex *v2 )
{
- GLcontext *ctx = smesa->glCtx;
+ struct gl_context *ctx = smesa->glCtx;
SWvertex v[3];
_swsetup_Translate( ctx, v0, &v[0] );
_swsetup_Translate( ctx, v1, &v[1] );
@@ -573,7 +573,7 @@ sis_fallback_line( sisContextPtr smesa,
sisVertex *v0,
sisVertex *v1 )
{
- GLcontext *ctx = smesa->glCtx;
+ struct gl_context *ctx = smesa->glCtx;
SWvertex v[2];
_swsetup_Translate( ctx, v0, &v[0] );
_swsetup_Translate( ctx, v1, &v[1] );
@@ -588,7 +588,7 @@ static void
sis_fallback_point( sisContextPtr smesa,
sisVertex *v0 )
{
- GLcontext *ctx = smesa->glCtx;
+ struct gl_context *ctx = smesa->glCtx;
SWvertex v[1];
_swsetup_Translate( ctx, v0, &v[0] );
sisSpanRenderStart( ctx );
@@ -643,7 +643,7 @@ sis_fallback_point( sisContextPtr smesa,
#define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET|DD_TRI_UNFILLED)
#define _SIS_NEW_RENDER_STATE (ANY_RASTER_FLAGS | ANY_FALLBACK_FLAGS)
-static void sisChooseRenderState(GLcontext *ctx)
+static void sisChooseRenderState(struct gl_context *ctx)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
sisContextPtr smesa = SIS_CONTEXT( ctx );
@@ -701,7 +701,7 @@ static void sisChooseRenderState(GLcontext *ctx)
/**********************************************************************/
/* Multipass rendering for front buffering */
/**********************************************************************/
-static GLboolean multipass_cliprect( GLcontext *ctx, GLuint pass )
+static GLboolean multipass_cliprect( struct gl_context *ctx, GLuint pass )
{
sisContextPtr smesa = SIS_CONTEXT( ctx );
@@ -743,7 +743,7 @@ static GLboolean multipass_cliprect( GLcontext *ctx, GLuint pass )
/* Validate state at pipeline start */
/**********************************************************************/
-static void sisRunPipeline( GLcontext *ctx )
+static void sisRunPipeline( struct gl_context *ctx )
{
sisContextPtr smesa = SIS_CONTEXT( ctx );
@@ -776,7 +776,7 @@ static void sisRunPipeline( GLcontext *ctx )
* and lines, points and bitmaps.
*/
-static void sisRasterPrimitive( GLcontext *ctx, GLuint hwprim )
+static void sisRasterPrimitive( struct gl_context *ctx, GLuint hwprim )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
if (smesa->hw_primitive != hwprim) {
@@ -810,7 +810,7 @@ static void sisRasterPrimitive( GLcontext *ctx, GLuint hwprim )
}
}
-static void sisRenderPrimitive( GLcontext *ctx, GLenum prim )
+static void sisRenderPrimitive( struct gl_context *ctx, GLenum prim )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -836,7 +836,7 @@ do { \
smesa->vertex_attr_count++; \
} while (0)
-static void sisRenderStart( GLcontext *ctx )
+static void sisRenderStart( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -927,7 +927,7 @@ static void sisRenderStart( GLcontext *ctx )
}
}
-static void sisRenderFinish( GLcontext *ctx )
+static void sisRenderFinish( struct gl_context *ctx )
{
}
@@ -1039,7 +1039,7 @@ static const char *getFallbackString(GLuint bit)
return fallbackStrings[i];
}
-void sisFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
+void sisFallback( struct gl_context *ctx, GLuint bit, GLboolean mode )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
sisContextPtr smesa = SIS_CONTEXT(ctx);
@@ -1090,7 +1090,7 @@ void sisFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
/* Initialization. */
/**********************************************************************/
-void sisInitTriFuncs( GLcontext *ctx )
+void sisInitTriFuncs( struct gl_context *ctx )
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/sis/sis_tris.h b/src/mesa/drivers/dri/sis/sis_tris.h
index b34fe8c7c98..d454090607b 100644
--- a/src/mesa/drivers/dri/sis/sis_tris.h
+++ b/src/mesa/drivers/dri/sis/sis_tris.h
@@ -34,10 +34,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "sis_lock.h"
#include "main/mtypes.h"
-extern void sisInitTriFuncs( GLcontext *ctx );
+extern void sisInitTriFuncs( struct gl_context *ctx );
extern void sisFlushPrims( sisContextPtr smesa );
extern void sisFlushPrimsLocked( sisContextPtr smesa );
-extern void sisFallback( GLcontext *ctx, GLuint bit, GLboolean mode );
+extern void sisFallback( struct gl_context *ctx, GLuint bit, GLboolean mode );
#define FALLBACK( smesa, bit, mode ) sisFallback( smesa->glCtx, bit, mode )
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index ff53ffd0deb..52ba3acf658 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -225,7 +225,7 @@ dri_destroy_screen(__DRIscreen * sPriv)
*/
static GLuint
-choose_pixel_format(const GLvisual *v)
+choose_pixel_format(const struct gl_config *v)
{
int depth = v->rgbBits;
@@ -273,7 +273,7 @@ bytes_per_line(unsigned pitch_bits, unsigned mul)
}
static GLboolean
-swrast_alloc_front_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
+swrast_alloc_front_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLenum internalFormat, GLuint width, GLuint height)
{
struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
@@ -290,7 +290,7 @@ swrast_alloc_front_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
}
static GLboolean
-swrast_alloc_back_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
+swrast_alloc_back_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLenum internalFormat, GLuint width, GLuint height)
{
struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
@@ -307,7 +307,7 @@ swrast_alloc_back_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
}
static struct swrast_renderbuffer *
-swrast_new_renderbuffer(const GLvisual *visual, GLboolean front)
+swrast_new_renderbuffer(const struct gl_config *visual, GLboolean front)
{
struct swrast_renderbuffer *xrb = calloc(1, sizeof *xrb);
GLuint pixel_format;
@@ -370,10 +370,10 @@ swrast_new_renderbuffer(const GLvisual *visual, GLboolean front)
static GLboolean
dri_create_buffer(__DRIscreen * sPriv,
__DRIdrawable * dPriv,
- const __GLcontextModes * visual, GLboolean isPixmap)
+ const struct gl_config * visual, GLboolean isPixmap)
{
struct dri_drawable *drawable = NULL;
- GLframebuffer *fb;
+ struct gl_framebuffer *fb;
struct swrast_renderbuffer *frontrb, *backrb;
TRACE;
@@ -432,7 +432,7 @@ dri_destroy_buffer(__DRIdrawable * dPriv)
if (dPriv) {
struct dri_drawable *drawable = dri_drawable(dPriv);
- GLframebuffer *fb;
+ struct gl_framebuffer *fb;
free(drawable->row);
@@ -451,7 +451,7 @@ dri_swap_buffers(__DRIdrawable * dPriv)
GET_CURRENT_CONTEXT(ctx);
struct dri_drawable *drawable = dri_drawable(dPriv);
- GLframebuffer *fb;
+ struct gl_framebuffer *fb;
struct swrast_renderbuffer *frontrb, *backrb;
TRACE;
@@ -487,7 +487,7 @@ dri_swap_buffers(__DRIdrawable * dPriv)
*/
static void
-get_window_size( GLframebuffer *fb, GLsizei *w, GLsizei *h )
+get_window_size( struct gl_framebuffer *fb, GLsizei *w, GLsizei *h )
{
__DRIdrawable *dPriv = swrast_drawable(fb)->dPriv;
__DRIscreen *sPriv = dPriv->driScreenPriv;
@@ -499,7 +499,7 @@ get_window_size( GLframebuffer *fb, GLsizei *w, GLsizei *h )
}
static void
-swrast_check_and_update_window_size( GLcontext *ctx, GLframebuffer *fb )
+swrast_check_and_update_window_size( struct gl_context *ctx, struct gl_framebuffer *fb )
{
GLsizei width, height;
@@ -510,7 +510,7 @@ swrast_check_and_update_window_size( GLcontext *ctx, GLframebuffer *fb )
}
static const GLubyte *
-get_string(GLcontext *ctx, GLenum pname)
+get_string(struct gl_context *ctx, GLenum pname)
{
(void) ctx;
switch (pname) {
@@ -524,7 +524,7 @@ get_string(GLcontext *ctx, GLenum pname)
}
static void
-update_state( GLcontext *ctx, GLuint new_state )
+update_state( struct gl_context *ctx, GLuint new_state )
{
/* not much to do here - pass it on */
_swrast_InvalidateState( ctx, new_state );
@@ -534,16 +534,16 @@ update_state( GLcontext *ctx, GLuint new_state )
}
static void
-viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
+viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
{
- GLframebuffer *draw = ctx->WinSysDrawBuffer;
- GLframebuffer *read = ctx->WinSysReadBuffer;
+ struct gl_framebuffer *draw = ctx->WinSysDrawBuffer;
+ struct gl_framebuffer *read = ctx->WinSysReadBuffer;
swrast_check_and_update_window_size(ctx, draw);
swrast_check_and_update_window_size(ctx, read);
}
-static gl_format swrastChooseTextureFormat(GLcontext * ctx,
+static gl_format swrastChooseTextureFormat(struct gl_context * ctx,
GLint internalFormat,
GLenum format,
GLenum type)
@@ -570,13 +570,13 @@ swrast_init_driver_functions(struct dd_function_table *driver)
static GLboolean
dri_create_context(gl_api api,
- const __GLcontextModes * visual,
+ const struct gl_config * visual,
__DRIcontext * cPriv, void *sharedContextPrivate)
{
struct dri_context *ctx = NULL;
struct dri_context *share = (struct dri_context *)sharedContextPrivate;
- GLcontext *mesaCtx = NULL;
- GLcontext *sharedCtx = NULL;
+ struct gl_context *mesaCtx = NULL;
+ struct gl_context *sharedCtx = NULL;
struct dd_function_table functions;
TRACE;
@@ -646,7 +646,7 @@ dri_destroy_context(__DRIcontext * cPriv)
if (cPriv) {
struct dri_context *ctx = dri_context(cPriv);
- GLcontext *mesaCtx;
+ struct gl_context *mesaCtx;
mesaCtx = &ctx->Base;
@@ -664,9 +664,9 @@ dri_make_current(__DRIcontext * cPriv,
__DRIdrawable * driDrawPriv,
__DRIdrawable * driReadPriv)
{
- GLcontext *mesaCtx;
- GLframebuffer *mesaDraw;
- GLframebuffer *mesaRead;
+ struct gl_context *mesaCtx;
+ struct gl_framebuffer *mesaDraw;
+ struct gl_framebuffer *mesaRead;
TRACE;
if (cPriv) {
diff --git a/src/mesa/drivers/dri/swrast/swrast_priv.h b/src/mesa/drivers/dri/swrast/swrast_priv.h
index 6679061a983..bdb52ef26f1 100644
--- a/src/mesa/drivers/dri/swrast/swrast_priv.h
+++ b/src/mesa/drivers/dri/swrast/swrast_priv.h
@@ -58,7 +58,7 @@
struct dri_context
{
/* mesa, base class, must be first */
- GLcontext Base;
+ struct gl_context Base;
/* dri */
__DRIcontext *cPriv;
@@ -71,7 +71,7 @@ dri_context(__DRIcontext * driContextPriv)
}
static INLINE struct dri_context *
-swrast_context(GLcontext *ctx)
+swrast_context(struct gl_context *ctx)
{
return (struct dri_context *) ctx;
}
@@ -79,7 +79,7 @@ swrast_context(GLcontext *ctx)
struct dri_drawable
{
/* mesa, base class, must be first */
- GLframebuffer Base;
+ struct gl_framebuffer Base;
/* dri */
__DRIdrawable *dPriv;
@@ -95,7 +95,7 @@ dri_drawable(__DRIdrawable * driDrawPriv)
}
static INLINE struct dri_drawable *
-swrast_drawable(GLframebuffer *fb)
+swrast_drawable(struct gl_framebuffer *fb)
{
return (struct dri_drawable *) fb;
}
diff --git a/src/mesa/drivers/dri/swrast/swrast_spantemp.h b/src/mesa/drivers/dri/swrast/swrast_spantemp.h
index 1e9405eebfb..69f8d9f2404 100644
--- a/src/mesa/drivers/dri/swrast/swrast_spantemp.h
+++ b/src/mesa/drivers/dri/swrast/swrast_spantemp.h
@@ -37,7 +37,7 @@
#define _SWRAST_SPANTEMP_ONCE
static INLINE void
-PUT_PIXEL( GLcontext *glCtx, GLint x, GLint y, GLvoid *p )
+PUT_PIXEL( struct gl_context *glCtx, GLint x, GLint y, GLvoid *p )
{
__DRIcontext *ctx = swrast_context(glCtx)->cPriv;
__DRIdrawable *draw = swrast_drawable(glCtx->DrawBuffer)->dPriv;
@@ -51,7 +51,7 @@ PUT_PIXEL( GLcontext *glCtx, GLint x, GLint y, GLvoid *p )
static INLINE void
-GET_PIXEL( GLcontext *glCtx, GLint x, GLint y, GLubyte *p )
+GET_PIXEL( struct gl_context *glCtx, GLint x, GLint y, GLubyte *p )
{
__DRIcontext *ctx = swrast_context(glCtx)->cPriv;
__DRIdrawable *read = swrast_drawable(glCtx->ReadBuffer)->dPriv;
@@ -63,7 +63,7 @@ GET_PIXEL( GLcontext *glCtx, GLint x, GLint y, GLubyte *p )
}
static INLINE void
-PUT_ROW( GLcontext *glCtx, GLint x, GLint y, GLuint n, char *row )
+PUT_ROW( struct gl_context *glCtx, GLint x, GLint y, GLuint n, char *row )
{
__DRIcontext *ctx = swrast_context(glCtx)->cPriv;
__DRIdrawable *draw = swrast_drawable(glCtx->DrawBuffer)->dPriv;
@@ -76,7 +76,7 @@ PUT_ROW( GLcontext *glCtx, GLint x, GLint y, GLuint n, char *row )
}
static INLINE void
-GET_ROW( GLcontext *glCtx, GLint x, GLint y, GLuint n, char *row )
+GET_ROW( struct gl_context *glCtx, GLint x, GLint y, GLuint n, char *row )
{
__DRIcontext *ctx = swrast_context(glCtx)->cPriv;
__DRIdrawable *read = swrast_drawable(glCtx->ReadBuffer)->dPriv;
@@ -118,7 +118,7 @@ GET_ROW( GLcontext *glCtx, GLint x, GLint y, GLuint n, char *row )
static void
-NAME(get_row)( GLcontext *ctx, struct gl_renderbuffer *rb,
+NAME(get_row)( struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, GLint x, GLint y, void *values )
{
#ifdef SPAN_VARS
@@ -138,7 +138,7 @@ NAME(get_row)( GLcontext *ctx, struct gl_renderbuffer *rb,
static void
-NAME(get_values)( GLcontext *ctx, struct gl_renderbuffer *rb,
+NAME(get_values)( struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, const GLint x[], const GLint y[], void *values )
{
#ifdef SPAN_VARS
@@ -156,7 +156,7 @@ NAME(get_values)( GLcontext *ctx, struct gl_renderbuffer *rb,
static void
-NAME(put_row)( GLcontext *ctx, struct gl_renderbuffer *rb,
+NAME(put_row)( struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, GLint x, GLint y,
const void *values, const GLubyte mask[] )
{
@@ -189,7 +189,7 @@ NAME(put_row)( GLcontext *ctx, struct gl_renderbuffer *rb,
static void
-NAME(put_row_rgb)( GLcontext *ctx, struct gl_renderbuffer *rb,
+NAME(put_row_rgb)( struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, GLint x, GLint y,
const void *values, const GLubyte mask[] )
{
@@ -230,7 +230,7 @@ NAME(put_row_rgb)( GLcontext *ctx, struct gl_renderbuffer *rb,
static void
-NAME(put_mono_row)( GLcontext *ctx, struct gl_renderbuffer *rb,
+NAME(put_mono_row)( struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, GLint x, GLint y,
const void *value, const GLubyte mask[] )
{
@@ -263,7 +263,7 @@ NAME(put_mono_row)( GLcontext *ctx, struct gl_renderbuffer *rb,
static void
-NAME(put_values)( GLcontext *ctx, struct gl_renderbuffer *rb,
+NAME(put_values)( struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, const GLint x[], const GLint y[],
const void *values, const GLubyte mask[] )
{
@@ -286,7 +286,7 @@ NAME(put_values)( GLcontext *ctx, struct gl_renderbuffer *rb,
static void
-NAME(put_mono_values)( GLcontext *ctx, struct gl_renderbuffer *rb,
+NAME(put_mono_values)( struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, const GLint x[], const GLint y[],
const void *value, const GLubyte mask[] )
{
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_context.c b/src/mesa/drivers/dri/tdfx/tdfx_context.c
index 6f1e8bfc498..63dfa5ae746 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_context.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_context.c
@@ -124,7 +124,7 @@ static const struct dri_extension napalm_extensions[] =
/*
* Enable/Disable the extensions for this context.
*/
-static void tdfxDDInitExtensions( GLcontext *ctx )
+static void tdfxDDInitExtensions( struct gl_context *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -163,12 +163,12 @@ static const struct dri_debug_control debug_control[] =
};
GLboolean tdfxCreateContext( gl_api api,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate )
{
tdfxContextPtr fxMesa;
- GLcontext *ctx, *shareCtx;
+ struct gl_context *ctx, *shareCtx;
__DRIscreen *sPriv = driContextPriv->driScreenPriv;
tdfxScreenPrivate *fxScreen = (tdfxScreenPrivate *) sPriv->private;
TDFXSAREAPriv *saPriv = (TDFXSAREAPriv *) ((char *) sPriv->pSAREA +
@@ -635,7 +635,7 @@ tdfxMakeCurrent( __DRIcontext *driContextPriv,
if ( driContextPriv ) {
tdfxContextPtr newFx = (tdfxContextPtr) driContextPriv->driverPrivate;
- GLcontext *newCtx = newFx->glCtx;
+ struct gl_context *newCtx = newFx->glCtx;
GET_CURRENT_CONTEXT(curCtx);
if ((newFx->driDrawable != driDrawPriv)
@@ -651,8 +651,8 @@ tdfxMakeCurrent( __DRIcontext *driContextPriv,
* dispatch is set correctly.
*/
_mesa_make_current( newCtx,
- (GLframebuffer *) driDrawPriv->driverPrivate,
- (GLframebuffer *) driReadPriv->driverPrivate );
+ (struct gl_framebuffer *) driDrawPriv->driverPrivate,
+ (struct gl_framebuffer *) driReadPriv->driverPrivate );
return GL_TRUE;
}
/* [dBorca] tunnel2 requires this */
@@ -689,8 +689,8 @@ tdfxMakeCurrent( __DRIcontext *driContextPriv,
}
_mesa_make_current( newCtx,
- (GLframebuffer *) driDrawPriv->driverPrivate,
- (GLframebuffer *) driReadPriv->driverPrivate );
+ (struct gl_framebuffer *) driDrawPriv->driverPrivate,
+ (struct gl_framebuffer *) driReadPriv->driverPrivate );
} else {
_mesa_make_current( NULL, NULL, NULL );
}
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_context.h b/src/mesa/drivers/dri/tdfx/tdfx_context.h
index 29b0876f9f9..fb38419dcdd 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_context.h
+++ b/src/mesa/drivers/dri/tdfx/tdfx_context.h
@@ -810,7 +810,7 @@ typedef void (*tdfx_point_func)( tdfxContextPtr, tdfxVertex * );
struct tdfx_context {
/* Set once and never changed:
*/
- GLcontext *glCtx; /* The core Mesa context */
+ struct gl_context *glCtx; /* The core Mesa context */
GLuint new_gl_state;
GLuint new_state;
@@ -938,7 +938,7 @@ struct tdfx_context {
extern GLboolean
tdfxCreateContext( gl_api api,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate );
@@ -957,10 +957,10 @@ extern GLboolean
tdfxInitGlide( tdfxContextPtr tmesa );
extern void
-FX_grColorMaskv(GLcontext *ctx, const GLboolean rgba[4]);
+FX_grColorMaskv(struct gl_context *ctx, const GLboolean rgba[4]);
extern void
-FX_grColorMaskv_NoLock(GLcontext *ctx, const GLboolean rgba[4]);
+FX_grColorMaskv_NoLock(struct gl_context *ctx, const GLboolean rgba[4]);
/* Color packing utilities
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_dd.c b/src/mesa/drivers/dri/tdfx/tdfx_dd.c
index 2cbbeb81141..d60931ad7fd 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_dd.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_dd.c
@@ -54,7 +54,7 @@ const GLboolean true4[4] = { GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE };
* checks for this rather than doing a glGet(GL_MAX_TEXTURE_SIZE).
* Why?
*/
-static const GLubyte *tdfxDDGetString( GLcontext *ctx, GLenum name )
+static const GLubyte *tdfxDDGetString( struct gl_context *ctx, GLenum name )
{
tdfxContextPtr fxMesa = (tdfxContextPtr) ctx->DriverCtx;
@@ -103,7 +103,7 @@ static const GLubyte *tdfxDDGetString( GLcontext *ctx, GLenum name )
static void
-tdfxBeginQuery(GLcontext *ctx, struct gl_query_object *q)
+tdfxBeginQuery(struct gl_context *ctx, struct gl_query_object *q)
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -119,7 +119,7 @@ tdfxBeginQuery(GLcontext *ctx, struct gl_query_object *q)
static void
-tdfxEndQuery(GLcontext *ctx, struct gl_query_object *q)
+tdfxEndQuery(struct gl_context *ctx, struct gl_query_object *q)
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
FxI32 total_pixels;
@@ -157,7 +157,7 @@ tdfxEndQuery(GLcontext *ctx, struct gl_query_object *q)
(vis->blueBits == b) && \
(vis->alphaBits == a))
-void tdfxDDInitDriverFuncs( const __GLcontextModes *visual,
+void tdfxDDInitDriverFuncs( const struct gl_config *visual,
struct dd_function_table *functions )
{
if ( MESA_VERBOSE & VERBOSE_DRIVER ) {
@@ -187,7 +187,7 @@ void tdfxDDInitDriverFuncs( const __GLcontextModes *visual,
*/
void
-FX_grColorMaskv(GLcontext *ctx, const GLboolean rgba[4])
+FX_grColorMaskv(struct gl_context *ctx, const GLboolean rgba[4])
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
LOCK_HARDWARE(fxMesa);
@@ -207,7 +207,7 @@ FX_grColorMaskv(GLcontext *ctx, const GLboolean rgba[4])
}
void
-FX_grColorMaskv_NoLock(GLcontext *ctx, const GLboolean rgba[4])
+FX_grColorMaskv_NoLock(struct gl_context *ctx, const GLboolean rgba[4])
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
if (ctx->Visual.redBits == 8) {
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_dd.h b/src/mesa/drivers/dri/tdfx/tdfx_dd.h
index f419c8426af..d68e1ece1bd 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_dd.h
+++ b/src/mesa/drivers/dri/tdfx/tdfx_dd.h
@@ -38,7 +38,7 @@
#include "main/context.h"
-extern void tdfxDDInitDriverFuncs( const __GLcontextModes *visual,
+extern void tdfxDDInitDriverFuncs( const struct gl_config *visual,
struct dd_function_table *functions );
#endif
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_pixels.c b/src/mesa/drivers/dri/tdfx/tdfx_pixels.c
index 5a7184056dc..bbbd0d5740f 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_pixels.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_pixels.c
@@ -153,7 +153,7 @@ inClipRects_Region(tdfxContextPtr fxMesa, int x, int y, int width, int height)
#if 0
GLboolean
-tdfx_bitmap_R5G6B5(GLcontext * ctx, GLint px, GLint py,
+tdfx_bitmap_R5G6B5(struct gl_context * ctx, GLint px, GLint py,
GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack,
const GLubyte * bitmap)
@@ -317,7 +317,7 @@ tdfx_bitmap_R5G6B5(GLcontext * ctx, GLint px, GLint py,
#if 0
GLboolean
-tdfx_bitmap_R8G8B8A8(GLcontext * ctx, GLint px, GLint py,
+tdfx_bitmap_R8G8B8A8(struct gl_context * ctx, GLint px, GLint py,
GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack,
const GLubyte * bitmap)
@@ -475,7 +475,7 @@ tdfx_bitmap_R8G8B8A8(GLcontext * ctx, GLint px, GLint py,
#endif
void
-tdfx_readpixels_R5G6B5(GLcontext * ctx, GLint x, GLint y,
+tdfx_readpixels_R5G6B5(struct gl_context * ctx, GLint x, GLint y,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *packing,
@@ -532,7 +532,7 @@ tdfx_readpixels_R5G6B5(GLcontext * ctx, GLint x, GLint y,
}
void
-tdfx_readpixels_R8G8B8A8(GLcontext * ctx, GLint x, GLint y,
+tdfx_readpixels_R8G8B8A8(struct gl_context * ctx, GLint x, GLint y,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *packing,
@@ -591,7 +591,7 @@ tdfx_readpixels_R8G8B8A8(GLcontext * ctx, GLint x, GLint y,
}
void
-tdfx_drawpixels_R8G8B8A8(GLcontext * ctx, GLint x, GLint y,
+tdfx_drawpixels_R8G8B8A8(struct gl_context * ctx, GLint x, GLint y,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *unpack,
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_pixels.h b/src/mesa/drivers/dri/tdfx/tdfx_pixels.h
index f5e5427653e..f4cc20fd625 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_pixels.h
+++ b/src/mesa/drivers/dri/tdfx/tdfx_pixels.h
@@ -41,33 +41,33 @@
#include "main/context.h"
extern void
-tdfx_bitmap_R5G6B5( GLcontext *ctx, GLint px, GLint py,
+tdfx_bitmap_R5G6B5( struct gl_context *ctx, GLint px, GLint py,
GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack,
const GLubyte *bitmap );
extern void
-tdfx_bitmap_R8G8B8A8( GLcontext *ctx, GLint px, GLint py,
+tdfx_bitmap_R8G8B8A8( struct gl_context *ctx, GLint px, GLint py,
GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack,
const GLubyte *bitmap );
extern void
-tdfx_readpixels_R5G6B5( GLcontext *ctx, GLint x, GLint y,
+tdfx_readpixels_R5G6B5( struct gl_context *ctx, GLint x, GLint y,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *packing,
GLvoid *dstImage );
extern void
-tdfx_readpixels_R8G8B8A8( GLcontext *ctx, GLint x, GLint y,
+tdfx_readpixels_R8G8B8A8( struct gl_context *ctx, GLint x, GLint y,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *packing,
GLvoid *dstImage );
extern void
-tdfx_drawpixels_R8G8B8A8( GLcontext *ctx, GLint x, GLint y,
+tdfx_drawpixels_R8G8B8A8( struct gl_context *ctx, GLint x, GLint y,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *unpack,
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_render.c b/src/mesa/drivers/dri/tdfx/tdfx_render.c
index 979bcd45140..f0837567877 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_render.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_render.c
@@ -45,7 +45,7 @@
/* Clear the color and/or depth buffers.
*/
-static void tdfxClear( GLcontext *ctx, GLbitfield mask )
+static void tdfxClear( struct gl_context *ctx, GLbitfield mask )
{
tdfxContextPtr fxMesa = (tdfxContextPtr) ctx->DriverCtx;
GLbitfield softwareMask = mask & (BUFFER_BIT_ACCUM);
@@ -314,7 +314,7 @@ static void tdfxClear( GLcontext *ctx, GLbitfield mask )
-static void tdfxFinish( GLcontext *ctx )
+static void tdfxFinish( struct gl_context *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -325,7 +325,7 @@ static void tdfxFinish( GLcontext *ctx )
UNLOCK_HARDWARE( fxMesa );
}
-static void tdfxFlush( GLcontext *ctx )
+static void tdfxFlush( struct gl_context *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -528,7 +528,7 @@ static void uploadTextureSource( tdfxContextPtr fxMesa )
static void uploadTextureImages( tdfxContextPtr fxMesa )
{
- GLcontext *ctx = fxMesa->glCtx;
+ struct gl_context *ctx = fxMesa->glCtx;
int unit;
for (unit = 0; unit < TDFX_NUM_TMU; unit++) {
if (ctx->Texture.Unit[unit]._ReallyEnabled & (TEXTURE_1D_BIT|TEXTURE_2D_BIT)) {
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_screen.c b/src/mesa/drivers/dri/tdfx/tdfx_screen.c
index 26de09503ad..084560ff87d 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_screen.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.c
@@ -155,7 +155,7 @@ tdfxInitDriver( __DRIscreen *sPriv )
static GLboolean
tdfxCreateBuffer( __DRIscreen *driScrnPriv,
__DRIdrawable *driDrawPriv,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
GLboolean isPixmap )
{
tdfxScreenPrivate *screen = (tdfxScreenPrivate *) driScrnPriv->private;
@@ -227,7 +227,7 @@ tdfxCreateBuffer( __DRIscreen *driScrnPriv,
static void
tdfxDestroyBuffer(__DRIdrawable *driDrawPriv)
{
- _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
+ _mesa_reference_framebuffer((struct gl_framebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
}
@@ -237,13 +237,13 @@ tdfxSwapBuffers( __DRIdrawable *driDrawPriv )
{
GET_CURRENT_CONTEXT(ctx);
tdfxContextPtr fxMesa = 0;
- GLframebuffer *mesaBuffer;
+ struct gl_framebuffer *mesaBuffer;
if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) {
fprintf( stderr, "%s( %p )\n", __FUNCTION__, (void *)driDrawPriv );
}
- mesaBuffer = (GLframebuffer *) driDrawPriv->driverPrivate;
+ mesaBuffer = (struct gl_framebuffer *) driDrawPriv->driverPrivate;
if ( !mesaBuffer->Visual.doubleBufferMode )
return; /* can't swap a single-buffered window */
@@ -394,7 +394,7 @@ tdfxFillInModes(__DRIscreen *psp,
*
* \todo maybe fold this into intelInitDriver
*
- * \return the __GLcontextModes supported by this driver
+ * \return the struct gl_config supported by this driver
*/
static const __DRIconfig **
tdfxInitScreen(__DRIscreen *psp)
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_span.c b/src/mesa/drivers/dri/tdfx/tdfx_span.c
index 3879d506ee1..12524e2316a 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_span.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_span.c
@@ -582,7 +582,7 @@ GetFbParams(tdfxContextPtr fxMesa,
static void
-tdfxDDWriteDepthSpan(GLcontext * ctx, struct gl_renderbuffer *rb,
+tdfxDDWriteDepthSpan(struct gl_context * ctx, struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y, const void *values,
const GLubyte mask[])
{
@@ -819,7 +819,7 @@ tdfxDDWriteDepthSpan(GLcontext * ctx, struct gl_renderbuffer *rb,
}
static void
-tdfxDDWriteMonoDepthSpan(GLcontext * ctx, struct gl_renderbuffer *rb,
+tdfxDDWriteMonoDepthSpan(struct gl_context * ctx, struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y, const void *value,
const GLubyte mask[])
{
@@ -833,7 +833,7 @@ tdfxDDWriteMonoDepthSpan(GLcontext * ctx, struct gl_renderbuffer *rb,
static void
-tdfxDDReadDepthSpan(GLcontext * ctx, struct gl_renderbuffer *rb,
+tdfxDDReadDepthSpan(struct gl_context * ctx, struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y, void *values)
{
GLuint *depth = (GLuint *) values;
@@ -937,7 +937,7 @@ tdfxDDReadDepthSpan(GLcontext * ctx, struct gl_renderbuffer *rb,
static void
-tdfxDDWriteDepthPixels(GLcontext * ctx, struct gl_renderbuffer *rb,
+tdfxDDWriteDepthPixels(struct gl_context * ctx, struct gl_renderbuffer *rb,
GLuint n, const GLint x[], const GLint y[],
const void *values, const GLubyte mask[])
{
@@ -1020,7 +1020,7 @@ tdfxDDWriteDepthPixels(GLcontext * ctx, struct gl_renderbuffer *rb,
static void
-tdfxDDReadDepthPixels(GLcontext * ctx, struct gl_renderbuffer *rb, GLuint n,
+tdfxDDReadDepthPixels(struct gl_context * ctx, struct gl_renderbuffer *rb, GLuint n,
const GLint x[], const GLint y[], void *values)
{
GLuint *depth = (GLuint *) values;
@@ -1107,7 +1107,7 @@ tdfxDDReadDepthPixels(GLcontext * ctx, struct gl_renderbuffer *rb, GLuint n,
#define BUILD_ZS(z, s) (((s) << 24) | (z))
static void
-write_stencil_span(GLcontext * ctx, struct gl_renderbuffer *rb,
+write_stencil_span(struct gl_context * ctx, struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const void *values, const GLubyte mask[])
{
@@ -1166,7 +1166,7 @@ write_stencil_span(GLcontext * ctx, struct gl_renderbuffer *rb,
static void
-write_mono_stencil_span(GLcontext * ctx, struct gl_renderbuffer *rb,
+write_mono_stencil_span(struct gl_context * ctx, struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const void *value, const GLubyte mask[])
{
@@ -1180,7 +1180,7 @@ write_mono_stencil_span(GLcontext * ctx, struct gl_renderbuffer *rb,
static void
-read_stencil_span(GLcontext * ctx, struct gl_renderbuffer *rb,
+read_stencil_span(struct gl_context * ctx, struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
void *values)
{
@@ -1232,7 +1232,7 @@ read_stencil_span(GLcontext * ctx, struct gl_renderbuffer *rb,
static void
-write_stencil_pixels(GLcontext * ctx, struct gl_renderbuffer *rb,
+write_stencil_pixels(struct gl_context * ctx, struct gl_renderbuffer *rb,
GLuint n, const GLint x[], const GLint y[],
const void *values, const GLubyte mask[])
{
@@ -1271,7 +1271,7 @@ write_stencil_pixels(GLcontext * ctx, struct gl_renderbuffer *rb,
static void
-read_stencil_pixels(GLcontext * ctx, struct gl_renderbuffer *rb,
+read_stencil_pixels(struct gl_context * ctx, struct gl_renderbuffer *rb,
GLuint n, const GLint x[], const GLint y[],
void *values)
{
@@ -1318,13 +1318,13 @@ read_stencil_pixels(GLcontext * ctx, struct gl_renderbuffer *rb,
/**********************************************************************/
-static void tdfxSpanRenderStart( GLcontext *ctx )
+static void tdfxSpanRenderStart( struct gl_context *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
LOCK_HARDWARE(fxMesa);
}
-static void tdfxSpanRenderFinish( GLcontext *ctx )
+static void tdfxSpanRenderFinish( struct gl_context *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
_swrast_flush( ctx );
@@ -1335,7 +1335,7 @@ static void tdfxSpanRenderFinish( GLcontext *ctx )
/* Initialize swrast device driver */
/**********************************************************************/
-void tdfxDDInitSpanFuncs( GLcontext *ctx )
+void tdfxDDInitSpanFuncs( struct gl_context *ctx )
{
struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference( ctx );
swdd->SpanRenderStart = tdfxSpanRenderStart;
@@ -1348,7 +1348,7 @@ void tdfxDDInitSpanFuncs( GLcontext *ctx )
* Plug in the Get/Put routines for the given driRenderbuffer.
*/
void
-tdfxSetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis)
+tdfxSetSpanFunctions(driRenderbuffer *drb, const struct gl_config *vis)
{
if (drb->Base.InternalFormat == GL_RGBA) {
if (vis->redBits == 5 && vis->greenBits == 6 && vis->blueBits == 5) {
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_span.h b/src/mesa/drivers/dri/tdfx/tdfx_span.h
index 6973f8d1407..ae3d074a582 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_span.h
+++ b/src/mesa/drivers/dri/tdfx/tdfx_span.h
@@ -40,9 +40,9 @@
#include "main/context.h"
#include "drirenderbuffer.h"
-extern void tdfxDDInitSpanFuncs( GLcontext *ctx );
+extern void tdfxDDInitSpanFuncs( struct gl_context *ctx );
extern void
-tdfxSetSpanFunctions(driRenderbuffer *rb, const GLvisual *vis);
+tdfxSetSpanFunctions(driRenderbuffer *rb, const struct gl_config *vis);
#endif
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_state.c b/src/mesa/drivers/dri/tdfx/tdfx_state.c
index dcbc7647f29..3f6822d4574 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_state.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_state.c
@@ -60,7 +60,7 @@
* Alpha blending
*/
-static void tdfxUpdateAlphaMode( GLcontext *ctx )
+static void tdfxUpdateAlphaMode( struct gl_context *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
GrCmpFnc_t func;
@@ -283,7 +283,7 @@ static void tdfxUpdateAlphaMode( GLcontext *ctx )
}
}
-static void tdfxDDAlphaFunc( GLcontext *ctx, GLenum func, GLfloat ref )
+static void tdfxDDAlphaFunc( struct gl_context *ctx, GLenum func, GLfloat ref )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );
@@ -291,7 +291,7 @@ static void tdfxDDAlphaFunc( GLcontext *ctx, GLenum func, GLfloat ref )
fxMesa->new_state |= TDFX_NEW_ALPHA;
}
-static void tdfxDDBlendEquationSeparate( GLcontext *ctx,
+static void tdfxDDBlendEquationSeparate( struct gl_context *ctx,
GLenum modeRGB, GLenum modeA )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );
@@ -301,7 +301,7 @@ static void tdfxDDBlendEquationSeparate( GLcontext *ctx,
fxMesa->new_state |= TDFX_NEW_ALPHA;
}
-static void tdfxDDBlendFuncSeparate( GLcontext *ctx,
+static void tdfxDDBlendFuncSeparate( struct gl_context *ctx,
GLenum sfactorRGB, GLenum dfactorRGB,
GLenum sfactorA, GLenum dfactorA )
{
@@ -321,7 +321,7 @@ static void tdfxDDBlendFuncSeparate( GLcontext *ctx,
* Stipple
*/
-void tdfxUpdateStipple( GLcontext *ctx )
+void tdfxUpdateStipple( struct gl_context *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );
GrStippleMode_t mode = GR_STIPPLE_DISABLE;
@@ -347,7 +347,7 @@ void tdfxUpdateStipple( GLcontext *ctx )
* Depth testing
*/
-static void tdfxUpdateZMode( GLcontext *ctx )
+static void tdfxUpdateZMode( struct gl_context *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );
GrCmpFnc_t func;
@@ -386,7 +386,7 @@ static void tdfxUpdateZMode( GLcontext *ctx )
}
}
-static void tdfxDDDepthFunc( GLcontext *ctx, GLenum func )
+static void tdfxDDDepthFunc( struct gl_context *ctx, GLenum func )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );
@@ -394,7 +394,7 @@ static void tdfxDDDepthFunc( GLcontext *ctx, GLenum func )
fxMesa->new_state |= TDFX_NEW_DEPTH;
}
-static void tdfxDDDepthMask( GLcontext *ctx, GLboolean flag )
+static void tdfxDDDepthMask( struct gl_context *ctx, GLboolean flag )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );
@@ -402,7 +402,7 @@ static void tdfxDDDepthMask( GLcontext *ctx, GLboolean flag )
fxMesa->new_state |= TDFX_NEW_DEPTH;
}
-static void tdfxDDClearDepth( GLcontext *ctx, GLclampd d )
+static void tdfxDDClearDepth( struct gl_context *ctx, GLclampd d )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );
@@ -445,7 +445,7 @@ static GrStencil_t convertGLStencilOp( GLenum op )
}
-static void tdfxUpdateStencil( GLcontext *ctx )
+static void tdfxUpdateStencil( struct gl_context *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -470,7 +470,7 @@ static void tdfxUpdateStencil( GLcontext *ctx )
static void
-tdfxDDStencilFuncSeparate( GLcontext *ctx, GLenum face, GLenum func,
+tdfxDDStencilFuncSeparate( struct gl_context *ctx, GLenum face, GLenum func,
GLint ref, GLuint mask )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -480,7 +480,7 @@ tdfxDDStencilFuncSeparate( GLcontext *ctx, GLenum face, GLenum func,
}
static void
-tdfxDDStencilMaskSeparate( GLcontext *ctx, GLenum face, GLuint mask )
+tdfxDDStencilMaskSeparate( struct gl_context *ctx, GLenum face, GLuint mask )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -489,7 +489,7 @@ tdfxDDStencilMaskSeparate( GLcontext *ctx, GLenum face, GLuint mask )
}
static void
-tdfxDDStencilOpSeparate( GLcontext *ctx, GLenum face, GLenum sfail,
+tdfxDDStencilOpSeparate( struct gl_context *ctx, GLenum face, GLenum sfail,
GLenum zfail, GLenum zpass )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -503,7 +503,7 @@ tdfxDDStencilOpSeparate( GLcontext *ctx, GLenum face, GLenum sfail,
* Fog - orthographic fog still not working
*/
-static void tdfxUpdateFogAttrib( GLcontext *ctx )
+static void tdfxUpdateFogAttrib( struct gl_context *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
GrFogMode_t mode;
@@ -562,7 +562,7 @@ static void tdfxUpdateFogAttrib( GLcontext *ctx )
}
}
-static void tdfxDDFogfv( GLcontext *ctx, GLenum pname, const GLfloat *param )
+static void tdfxDDFogfv( struct gl_context *ctx, GLenum pname, const GLfloat *param )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -614,7 +614,7 @@ static int intersect_rect( drm_clip_rect_t *out,
* Examine XF86 cliprect list and scissor state to recompute our
* cliprect list.
*/
-void tdfxUpdateClipping( GLcontext *ctx )
+void tdfxUpdateClipping( struct gl_context *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
__DRIdrawable *dPriv = fxMesa->driDrawable;
@@ -695,7 +695,7 @@ void tdfxUpdateClipping( GLcontext *ctx )
* Culling
*/
-void tdfxUpdateCull( GLcontext *ctx )
+void tdfxUpdateCull( struct gl_context *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
GrCullMode_t mode = GR_CULL_DISABLE;
@@ -737,7 +737,7 @@ void tdfxUpdateCull( GLcontext *ctx )
}
}
-static void tdfxDDCullFace( GLcontext *ctx, GLenum mode )
+static void tdfxDDCullFace( struct gl_context *ctx, GLenum mode )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );
@@ -745,7 +745,7 @@ static void tdfxDDCullFace( GLcontext *ctx, GLenum mode )
fxMesa->new_state |= TDFX_NEW_CULL;
}
-static void tdfxDDFrontFace( GLcontext *ctx, GLenum mode )
+static void tdfxDDFrontFace( struct gl_context *ctx, GLenum mode )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );
@@ -758,7 +758,7 @@ static void tdfxDDFrontFace( GLcontext *ctx, GLenum mode )
* Line drawing.
*/
-static void tdfxUpdateLine( GLcontext *ctx )
+static void tdfxUpdateLine( struct gl_context *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );
@@ -771,7 +771,7 @@ static void tdfxUpdateLine( GLcontext *ctx )
}
-static void tdfxDDLineWidth( GLcontext *ctx, GLfloat width )
+static void tdfxDDLineWidth( struct gl_context *ctx, GLfloat width )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );
FLUSH_BATCH( fxMesa );
@@ -783,7 +783,7 @@ static void tdfxDDLineWidth( GLcontext *ctx, GLfloat width )
* Color Attributes
*/
-static void tdfxDDColorMask( GLcontext *ctx,
+static void tdfxDDColorMask( struct gl_context *ctx,
GLboolean r, GLboolean g,
GLboolean b, GLboolean a )
{
@@ -810,7 +810,7 @@ static void tdfxDDColorMask( GLcontext *ctx,
}
-static void tdfxDDClearColor( GLcontext *ctx,
+static void tdfxDDClearColor( struct gl_context *ctx,
const GLfloat color[4] )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -829,7 +829,7 @@ static void tdfxDDClearColor( GLcontext *ctx,
* Light Model
*/
-static void tdfxDDLightModelfv( GLcontext *ctx, GLenum pname,
+static void tdfxDDLightModelfv( struct gl_context *ctx, GLenum pname,
const GLfloat *param )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -841,7 +841,7 @@ static void tdfxDDLightModelfv( GLcontext *ctx, GLenum pname,
}
}
-static void tdfxDDShadeModel( GLcontext *ctx, GLenum mode )
+static void tdfxDDShadeModel( struct gl_context *ctx, GLenum mode )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -856,7 +856,7 @@ static void tdfxDDShadeModel( GLcontext *ctx, GLenum mode )
*/
static void
-tdfxDDScissor(GLcontext * ctx, GLint x, GLint y, GLsizei w, GLsizei h)
+tdfxDDScissor(struct gl_context * ctx, GLint x, GLint y, GLsizei w, GLsizei h)
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
FLUSH_BATCH( fxMesa );
@@ -867,7 +867,7 @@ tdfxDDScissor(GLcontext * ctx, GLint x, GLint y, GLsizei w, GLsizei h)
* Render
*/
-static void tdfxUpdateRenderAttrib( GLcontext *ctx )
+static void tdfxUpdateRenderAttrib( struct gl_context *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
FLUSH_BATCH( fxMesa );
@@ -878,7 +878,7 @@ static void tdfxUpdateRenderAttrib( GLcontext *ctx )
* Viewport
*/
-void tdfxUpdateViewport( GLcontext *ctx )
+void tdfxUpdateViewport( struct gl_context *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
const GLfloat *v = ctx->Viewport._WindowMap.m;
@@ -895,7 +895,7 @@ void tdfxUpdateViewport( GLcontext *ctx )
}
-static void tdfxDDViewport( GLcontext *ctx, GLint x, GLint y,
+static void tdfxDDViewport( struct gl_context *ctx, GLint x, GLint y,
GLsizei w, GLsizei h )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -904,7 +904,7 @@ static void tdfxDDViewport( GLcontext *ctx, GLint x, GLint y,
}
-static void tdfxDDDepthRange( GLcontext *ctx, GLclampd nearVal, GLclampd farVal )
+static void tdfxDDDepthRange( struct gl_context *ctx, GLclampd nearVal, GLclampd farVal )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
FLUSH_BATCH( fxMesa );
@@ -916,7 +916,7 @@ static void tdfxDDDepthRange( GLcontext *ctx, GLclampd nearVal, GLclampd farVal
* State enable/disable
*/
-static void tdfxDDEnable( GLcontext *ctx, GLenum cap, GLboolean state )
+static void tdfxDDEnable( struct gl_context *ctx, GLenum cap, GLboolean state )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );
@@ -1017,7 +1017,7 @@ static void tdfxDDEnable( GLcontext *ctx, GLenum cap, GLboolean state )
/* Set the buffer used for drawing */
/* XXX support for separate read/draw buffers hasn't been tested */
-static void tdfxDDDrawBuffer( GLcontext *ctx, GLenum mode )
+static void tdfxDDDrawBuffer( struct gl_context *ctx, GLenum mode )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -1054,7 +1054,7 @@ static void tdfxDDDrawBuffer( GLcontext *ctx, GLenum mode )
}
-static void tdfxDDReadBuffer( GLcontext *ctx, GLenum mode )
+static void tdfxDDReadBuffer( struct gl_context *ctx, GLenum mode )
{
/* XXX ??? */
}
@@ -1064,7 +1064,7 @@ static void tdfxDDReadBuffer( GLcontext *ctx, GLenum mode )
* Polygon stipple
*/
-static void tdfxDDPolygonStipple( GLcontext *ctx, const GLubyte *mask )
+static void tdfxDDPolygonStipple( struct gl_context *ctx, const GLubyte *mask )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
const GLubyte *m = mask;
@@ -1119,7 +1119,7 @@ static void tdfxDDPolygonStipple( GLcontext *ctx, const GLubyte *mask )
-static void tdfxDDRenderMode( GLcontext *ctx, GLenum mode )
+static void tdfxDDRenderMode( struct gl_context *ctx, GLenum mode )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
FALLBACK( fxMesa, TDFX_FALLBACK_RENDER_MODE, (mode != GL_RENDER) );
@@ -1150,7 +1150,7 @@ static void tdfxDDPrintState( const char *msg, GLuint flags )
-void tdfxDDUpdateHwState( GLcontext *ctx )
+void tdfxDDUpdateHwState( struct gl_context *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
int new_state = fxMesa->new_state;
@@ -1226,7 +1226,7 @@ void tdfxDDUpdateHwState( GLcontext *ctx )
}
-static void tdfxDDInvalidateState( GLcontext *ctx, GLuint new_state )
+static void tdfxDDInvalidateState( struct gl_context *ctx, GLuint new_state )
{
_swrast_InvalidateState( ctx, new_state );
_swsetup_InvalidateState( ctx, new_state );
@@ -1242,7 +1242,7 @@ static void tdfxDDInvalidateState( GLcontext *ctx, GLuint new_state )
*/
void tdfxInitState( tdfxContextPtr fxMesa )
{
- GLcontext *ctx = fxMesa->glCtx;
+ struct gl_context *ctx = fxMesa->glCtx;
GLint i;
fxMesa->ColorCombine.Function = GR_COMBINE_FUNCTION_LOCAL;
@@ -1390,7 +1390,7 @@ void tdfxInitState( tdfxContextPtr fxMesa )
-void tdfxDDInitStateFuncs( GLcontext *ctx )
+void tdfxDDInitStateFuncs( struct gl_context *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_state.h b/src/mesa/drivers/dri/tdfx/tdfx_state.h
index 4880b990fcd..2e96fcbeb5d 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_state.h
+++ b/src/mesa/drivers/dri/tdfx/tdfx_state.h
@@ -40,21 +40,21 @@
#include "main/context.h"
#include "tdfx_context.h"
-extern void tdfxDDInitStateFuncs( GLcontext *ctx );
+extern void tdfxDDInitStateFuncs( struct gl_context *ctx );
-extern void tdfxDDUpdateHwState( GLcontext *ctx );
+extern void tdfxDDUpdateHwState( struct gl_context *ctx );
extern void tdfxInitState( tdfxContextPtr fxMesa );
-extern void tdfxUpdateClipping( GLcontext *ctx );
+extern void tdfxUpdateClipping( struct gl_context *ctx );
-extern void tdfxFallback( GLcontext *ctx, GLuint bit, GLboolean mode );
+extern void tdfxFallback( struct gl_context *ctx, GLuint bit, GLboolean mode );
#define FALLBACK( rmesa, bit, mode ) tdfxFallback( rmesa->glCtx, bit, mode )
-extern void tdfxUpdateCull( GLcontext *ctx );
-extern void tdfxUpdateStipple( GLcontext *ctx );
-extern void tdfxUpdateViewport( GLcontext *ctx );
+extern void tdfxUpdateCull( struct gl_context *ctx );
+extern void tdfxUpdateStipple( struct gl_context *ctx );
+extern void tdfxUpdateViewport( struct gl_context *ctx );
#endif
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_tex.c b/src/mesa/drivers/dri/tdfx/tdfx_tex.c
index 1c51452c104..0326b847cb8 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_tex.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_tex.c
@@ -52,7 +52,7 @@
/* no borders! can't halve 1x1! (stride > width * comp) not allowed */
static void
-_mesa_halve2x2_teximage2d ( GLcontext *ctx,
+_mesa_halve2x2_teximage2d ( struct gl_context *ctx,
struct gl_texture_image *texImage,
GLuint bytesPerPixel,
GLint srcWidth, GLint srcHeight,
@@ -176,7 +176,7 @@ logbase2(int n)
static void
-tdfxGenerateMipmap(GLcontext *ctx, GLenum target,
+tdfxGenerateMipmap(struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj)
{
GLint mipWidth, mipHeight;
@@ -242,7 +242,7 @@ tdfxGenerateMipmap(GLcontext *ctx, GLenum target,
* 32 32 GR_LOD_LOG2_32 (=5) GR_ASPECT_LOG2_1x1 (=0)
*/
static void
-tdfxTexGetInfo(const GLcontext *ctx, int w, int h,
+tdfxTexGetInfo(const struct gl_context *ctx, int w, int h,
GrLOD_t *lodlevel, GrAspectRatio_t *aspectratio,
float *sscale, float *tscale,
int *wscale, int *hscale)
@@ -307,7 +307,7 @@ tdfxTexGetInfo(const GLcontext *ctx, int w, int h,
* We need to call this when a texture object's minification filter
* or texture image sizes change.
*/
-static void RevalidateTexture(GLcontext *ctx, struct gl_texture_object *tObj)
+static void RevalidateTexture(struct gl_context *ctx, struct gl_texture_object *tObj)
{
tdfxTexInfo *ti = TDFX_TEXTURE_DATA(tObj);
GLint minl, maxl;
@@ -390,7 +390,7 @@ fxAllocTexObjData(tdfxContextPtr fxMesa)
* Called via glBindTexture.
*/
static void
-tdfxBindTexture(GLcontext * ctx, GLenum target,
+tdfxBindTexture(struct gl_context * ctx, GLenum target,
struct gl_texture_object *tObj)
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -419,7 +419,7 @@ tdfxBindTexture(GLcontext * ctx, GLenum target,
* Called via glTexEnv.
*/
static void
-tdfxTexEnv(GLcontext * ctx, GLenum target, GLenum pname,
+tdfxTexEnv(struct gl_context * ctx, GLenum target, GLenum pname,
const GLfloat * param)
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -445,7 +445,7 @@ tdfxTexEnv(GLcontext * ctx, GLenum target, GLenum pname,
* Called via glTexParameter.
*/
static void
-tdfxTexParameter(GLcontext * ctx, GLenum target,
+tdfxTexParameter(struct gl_context * ctx, GLenum target,
struct gl_texture_object *tObj,
GLenum pname, const GLfloat * params)
{
@@ -610,7 +610,7 @@ tdfxTexParameter(GLcontext * ctx, GLenum target,
* Here, we delete the Glide data associated with the texture.
*/
static void
-tdfxDeleteTexture(GLcontext * ctx, struct gl_texture_object *tObj)
+tdfxDeleteTexture(struct gl_context * ctx, struct gl_texture_object *tObj)
{
if (ctx && ctx->DriverCtx) {
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -626,7 +626,7 @@ tdfxDeleteTexture(GLcontext * ctx, struct gl_texture_object *tObj)
* Return true if texture is resident, false otherwise.
*/
static GLboolean
-tdfxIsTextureResident(GLcontext *ctx, struct gl_texture_object *tObj)
+tdfxIsTextureResident(struct gl_context *ctx, struct gl_texture_object *tObj)
{
tdfxTexInfo *ti = TDFX_TEXTURE_DATA(tObj);
return (GLboolean) (ti && ti->isInTM);
@@ -707,7 +707,7 @@ convertPalette(FxU32 data[256], const struct gl_color_table *table)
static void
-tdfxUpdateTexturePalette(GLcontext * ctx, struct gl_texture_object *tObj)
+tdfxUpdateTexturePalette(struct gl_context * ctx, struct gl_texture_object *tObj)
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -760,7 +760,7 @@ fxTexusError(const char *string, FxBool fatal)
static gl_format
-tdfxChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
+tdfxChooseTextureFormat( struct gl_context *ctx, GLint internalFormat,
GLenum srcFormat, GLenum srcType )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -1216,7 +1216,7 @@ fxFetchFunction(GLint mesaFormat)
static GLboolean
-adjust2DRatio (GLcontext *ctx,
+adjust2DRatio (struct gl_context *ctx,
GLint xoffset, GLint yoffset,
GLint width, GLint height,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -1302,7 +1302,7 @@ adjust2DRatio (GLcontext *ctx,
static void
-tdfxTexImage2D(GLcontext *ctx, GLenum target, GLint level,
+tdfxTexImage2D(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat, GLint width, GLint height, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
const struct gl_pixelstore_attrib *packing,
@@ -1454,7 +1454,7 @@ tdfxTexImage2D(GLcontext *ctx, GLenum target, GLint level,
static void
-tdfxTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
+tdfxTexSubImage2D(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
@@ -1521,7 +1521,7 @@ tdfxTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
static void
-tdfxTexImage1D(GLcontext *ctx, GLenum target, GLint level,
+tdfxTexImage1D(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat, GLint width, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
const struct gl_pixelstore_attrib *packing,
@@ -1537,7 +1537,7 @@ tdfxTexImage1D(GLcontext *ctx, GLenum target, GLint level,
}
static void
-tdfxTexSubImage1D(GLcontext *ctx, GLenum target, GLint level,
+tdfxTexSubImage1D(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset,
GLsizei width,
GLenum format, GLenum type,
@@ -1561,7 +1561,7 @@ tdfxTexSubImage1D(GLcontext *ctx, GLenum target, GLint level,
/**********************************************************************/
static void
-tdfxCompressedTexImage2D (GLcontext *ctx, GLenum target,
+tdfxCompressedTexImage2D (struct gl_context *ctx, GLenum target,
GLint level, GLint internalFormat,
GLsizei width, GLsizei height, GLint border,
GLsizei imageSize, const GLvoid *data,
@@ -1671,7 +1671,7 @@ tdfxCompressedTexImage2D (GLcontext *ctx, GLenum target,
static void
-tdfxCompressedTexSubImage2D( GLcontext *ctx, GLenum target,
+tdfxCompressedTexSubImage2D( struct gl_context *ctx, GLenum target,
GLint level, GLint xoffset,
GLint yoffset, GLsizei width,
GLint height, GLenum format,
@@ -1752,7 +1752,7 @@ PrintTexture(int w, int h, int c, const GLubyte * data)
GLboolean
-tdfxTestProxyTexImage(GLcontext *ctx, GLenum target,
+tdfxTestProxyTexImage(struct gl_context *ctx, GLenum target,
GLint level, GLint internalFormat,
GLenum format, GLenum type,
GLint width, GLint height,
@@ -1840,7 +1840,7 @@ tdfxTestProxyTexImage(GLcontext *ctx, GLenum target,
* texture object from the core mesa gl_texture_object. Not done at this time.
*/
static struct gl_texture_object *
-tdfxNewTextureObject( GLcontext *ctx, GLuint name, GLenum target )
+tdfxNewTextureObject( struct gl_context *ctx, GLuint name, GLenum target )
{
struct gl_texture_object *obj;
obj = _mesa_new_texture_object(ctx, name, target);
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_tex.h b/src/mesa/drivers/dri/tdfx/tdfx_tex.h
index a445935a018..26885fae3e3 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_tex.h
+++ b/src/mesa/drivers/dri/tdfx/tdfx_tex.h
@@ -47,47 +47,47 @@
extern void
-tdfxTexValidate(GLcontext * ctx, struct gl_texture_object *tObj);
+tdfxTexValidate(struct gl_context * ctx, struct gl_texture_object *tObj);
#if 000 /* DEAD? */
extern void
-fxDDTexUseGlobalPalette(GLcontext * ctx, GLboolean state);
+fxDDTexUseGlobalPalette(struct gl_context * ctx, GLboolean state);
#endif
extern GLboolean
-tdfxTestProxyTexImage(GLcontext *ctx, GLenum target,
+tdfxTestProxyTexImage(struct gl_context *ctx, GLenum target,
GLint level, GLint internalFormat,
GLenum format, GLenum type,
GLint width, GLint height,
GLint depth, GLint border);
extern GLvoid *
-tdfxDDGetTexImage(GLcontext * ctx, GLenum target, GLint level,
+tdfxDDGetTexImage(struct gl_context * ctx, GLenum target, GLint level,
const struct gl_texture_object *texObj,
GLenum * formatOut, GLenum * typeOut,
GLboolean * freeImageOut);
extern void
-tdfxDDGetCompressedTexImage( GLcontext *ctx, GLenum target,
+tdfxDDGetCompressedTexImage( struct gl_context *ctx, GLenum target,
GLint lod, void *image,
const struct gl_texture_object *texObj,
struct gl_texture_image *texImage );
extern GLint
-tdfxSpecificCompressedTexFormat(GLcontext *ctx,
+tdfxSpecificCompressedTexFormat(struct gl_context *ctx,
GLint internalFormat,
GLint numDimensions);
extern GLint
-tdfxBaseCompressedTexFormat(GLcontext *ctx,
+tdfxBaseCompressedTexFormat(struct gl_context *ctx,
GLint internalFormat);
extern GLboolean
-tdfxDDIsCompressedFormat(GLcontext *ctx, GLint internalFormat);
+tdfxDDIsCompressedFormat(struct gl_context *ctx, GLint internalFormat);
extern GLsizei
-tdfxDDCompressedImageSize(GLcontext *ctx,
+tdfxDDCompressedImageSize(struct gl_context *ctx,
GLenum intFormat,
GLuint numDimensions,
GLuint width,
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_texman.c b/src/mesa/drivers/dri/tdfx/tdfx_texman.c
index 726cc58a10b..1160ae2d0bc 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_texman.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_texman.c
@@ -744,7 +744,7 @@ tdfxTMDownloadTexture(tdfxContextPtr fxMesa, struct gl_texture_object *tObj)
void
-tdfxTMReloadMipMapLevel(GLcontext *ctx, struct gl_texture_object *tObj,
+tdfxTMReloadMipMapLevel(struct gl_context *ctx, struct gl_texture_object *tObj,
GLint level)
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -917,6 +917,7 @@ tdfxTMMoveOutTM_NoLock( tdfxContextPtr fxMesa, struct gl_texture_object *tObj )
case TDFX_TMU_SPLIT:
case TDFX_TMU_BOTH:
assert(!shared->umaTexMemory);
+ (void) shared;
RemoveRange_NoLock(fxMesa, TDFX_TMU0, ti->tm[TDFX_TMU0]);
RemoveRange_NoLock(fxMesa, TDFX_TMU1, ti->tm[TDFX_TMU1]);
break;
@@ -963,7 +964,7 @@ tdfxTMFreeTexture(tdfxContextPtr fxMesa, struct gl_texture_object *tObj)
*/
void tdfxTMRestoreTextures_NoLock( tdfxContextPtr fxMesa )
{
- GLcontext *ctx = fxMesa->glCtx;
+ struct gl_context *ctx = fxMesa->glCtx;
struct _mesa_HashTable *textures = fxMesa->glCtx->Shared->TexObjects;
GLuint id;
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_texman.h b/src/mesa/drivers/dri/tdfx/tdfx_texman.h
index a9af4cb7c56..87bdc3fea93 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_texman.h
+++ b/src/mesa/drivers/dri/tdfx/tdfx_texman.h
@@ -48,7 +48,7 @@ extern void tdfxTMClose( tdfxContextPtr fxMesa );
extern void tdfxTMDownloadTexture(tdfxContextPtr fxMesa,
struct gl_texture_object *tObj);
-extern void tdfxTMReloadMipMapLevel( GLcontext *ctx,
+extern void tdfxTMReloadMipMapLevel( struct gl_context *ctx,
struct gl_texture_object *tObj,
GLint level );
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_texstate.c b/src/mesa/drivers/dri/tdfx/tdfx_texstate.c
index b04f48c7a77..227f36be65d 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_texstate.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_texstate.c
@@ -160,7 +160,7 @@
* If we fail, we'll have to use software rendering.
*/
static GLboolean
-SetupTexEnvNapalm(GLcontext *ctx, GLboolean useIteratedRGBA,
+SetupTexEnvNapalm(struct gl_context *ctx, GLboolean useIteratedRGBA,
const struct gl_texture_unit *texUnit, GLenum baseFormat,
struct tdfx_texcombine_ext *env)
{
@@ -838,7 +838,7 @@ SetupTexEnvNapalm(GLcontext *ctx, GLboolean useIteratedRGBA,
* If failure, we'll use software rendering.
*/
static GLboolean
-SetupSingleTexEnvVoodoo3(GLcontext *ctx, int unit,
+SetupSingleTexEnvVoodoo3(struct gl_context *ctx, int unit,
GLenum envMode, GLenum baseFormat)
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -1047,7 +1047,7 @@ SetupSingleTexEnvVoodoo3(GLcontext *ctx, int unit,
* If failure, we'll use software rendering.
*/
static GLboolean
-SetupDoubleTexEnvVoodoo3(GLcontext *ctx, int tmu0,
+SetupDoubleTexEnvVoodoo3(struct gl_context *ctx, int tmu0,
GLenum envMode0, GLenum baseFormat0,
GLenum envMode1, GLenum baseFormat1)
{
@@ -1362,7 +1362,7 @@ setupSingleTMU(tdfxContextPtr fxMesa, struct gl_texture_object *tObj)
{
struct tdfxSharedState *shared = (struct tdfxSharedState *) fxMesa->glCtx->Shared->DriverData;
tdfxTexInfo *ti = TDFX_TEXTURE_DATA(tObj);
- const GLcontext *ctx = fxMesa->glCtx;
+ const struct gl_context *ctx = fxMesa->glCtx;
/* Make sure we're not loaded incorrectly */
if (ti->isInTM && !shared->umaTexMemory) {
@@ -1571,7 +1571,7 @@ selectSingleTMUSrc(tdfxContextPtr fxMesa, GLint tmu, FxBool LODblend)
#if 0
static void print_state(tdfxContextPtr fxMesa)
{
- GLcontext *ctx = fxMesa->glCtx;
+ struct gl_context *ctx = fxMesa->glCtx;
struct gl_texture_object *tObj0 = ctx->Texture.Unit[0]._Current;
struct gl_texture_object *tObj1 = ctx->Texture.Unit[1]._Current;
GLenum base0 = tObj0->Image[0][tObj0->BaseLevel] ? tObj0->Image[0][tObj0->BaseLevel]->Format : 99;
@@ -1599,7 +1599,7 @@ static void print_state(tdfxContextPtr fxMesa)
* Input: ctx - the context
* unit - the OpenGL texture unit to use.
*/
-static void setupTextureSingleTMU(GLcontext * ctx, GLuint unit)
+static void setupTextureSingleTMU(struct gl_context * ctx, GLuint unit)
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
tdfxTexInfo *ti;
@@ -1715,7 +1715,7 @@ setupDoubleTMU(tdfxContextPtr fxMesa,
const struct gl_shared_state *mesaShared = fxMesa->glCtx->Shared;
const struct tdfxSharedState *shared = (struct tdfxSharedState *) mesaShared->DriverData;
- const GLcontext *ctx = fxMesa->glCtx;
+ const struct gl_context *ctx = fxMesa->glCtx;
tdfxTexInfo *ti0 = TDFX_TEXTURE_DATA(tObj0);
tdfxTexInfo *ti1 = TDFX_TEXTURE_DATA(tObj1);
GLuint tstate = 0;
@@ -1914,7 +1914,7 @@ setupDoubleTMU(tdfxContextPtr fxMesa,
#undef T1_IN_TMU1
}
-static void setupTextureDoubleTMU(GLcontext * ctx)
+static void setupTextureDoubleTMU(struct gl_context * ctx)
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
struct gl_texture_object *tObj0 = ctx->Texture.Unit[1]._Current;
@@ -2019,7 +2019,7 @@ static void setupTextureDoubleTMU(GLcontext * ctx)
void
-tdfxUpdateTextureState( GLcontext *ctx )
+tdfxUpdateTextureState( struct gl_context *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -2108,7 +2108,7 @@ tdfxUpdateTextureState( GLcontext *ctx )
* This is very common in Quake3.
*/
void
-tdfxUpdateTextureBinding( GLcontext *ctx )
+tdfxUpdateTextureBinding( struct gl_context *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
struct gl_texture_object *tObj0 = ctx->Texture.Unit[0]._Current;
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_texstate.h b/src/mesa/drivers/dri/tdfx/tdfx_texstate.h
index 0c5c4101cad..92ac3a37eb9 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_texstate.h
+++ b/src/mesa/drivers/dri/tdfx/tdfx_texstate.h
@@ -37,7 +37,7 @@
#ifndef __TDFX_TEXSTATE_H__
#define __TDFX_TEXSTATE_H__
-extern void tdfxUpdateTextureState( GLcontext *ctx );
-extern void tdfxUpdateTextureBinding( GLcontext *ctx );
+extern void tdfxUpdateTextureState( struct gl_context *ctx );
+extern void tdfxUpdateTextureBinding( struct gl_context *ctx );
#endif
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_tris.c b/src/mesa/drivers/dri/tdfx/tdfx_tris.c
index d65833c20b0..1f8cf6cde19 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_tris.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_tris.c
@@ -49,8 +49,8 @@
#include "tdfx_render.h"
-static void tdfxRasterPrimitive( GLcontext *ctx, GLenum prim );
-static void tdfxRenderPrimitive( GLcontext *ctx, GLenum prim );
+static void tdfxRasterPrimitive( struct gl_context *ctx, GLenum prim );
+static void tdfxRenderPrimitive( struct gl_context *ctx, GLenum prim );
static GLenum reduced_prim[GL_POLYGON+1] = {
GL_POINTS,
@@ -136,7 +136,7 @@ do { \
* primitives.
*/
static void
-tdfx_translate_vertex( GLcontext *ctx, const tdfxVertex *src, SWvertex *dst)
+tdfx_translate_vertex( struct gl_context *ctx, const tdfxVertex *src, SWvertex *dst)
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -193,7 +193,7 @@ tdfx_fallback_tri( tdfxContextPtr fxMesa,
tdfxVertex *v1,
tdfxVertex *v2 )
{
- GLcontext *ctx = fxMesa->glCtx;
+ struct gl_context *ctx = fxMesa->glCtx;
SWvertex v[3];
tdfx_translate_vertex( ctx, v0, &v[0] );
tdfx_translate_vertex( ctx, v1, &v[1] );
@@ -207,7 +207,7 @@ tdfx_fallback_line( tdfxContextPtr fxMesa,
tdfxVertex *v0,
tdfxVertex *v1 )
{
- GLcontext *ctx = fxMesa->glCtx;
+ struct gl_context *ctx = fxMesa->glCtx;
SWvertex v[2];
tdfx_translate_vertex( ctx, v0, &v[0] );
tdfx_translate_vertex( ctx, v1, &v[1] );
@@ -219,7 +219,7 @@ static void
tdfx_fallback_point( tdfxContextPtr fxMesa,
tdfxVertex *v0 )
{
- GLcontext *ctx = fxMesa->glCtx;
+ struct gl_context *ctx = fxMesa->glCtx;
SWvertex v[1];
tdfx_translate_vertex( ctx, v0, &v[0] );
_swrast_Point( ctx, &v[0] );
@@ -229,7 +229,7 @@ tdfx_fallback_point( tdfxContextPtr fxMesa,
* Functions to draw basic primitives *
***********************************************************************/
-static void tdfx_print_vertex( GLcontext *ctx, const tdfxVertex *v )
+static void tdfx_print_vertex( struct gl_context *ctx, const tdfxVertex *v )
{
tdfxContextPtr tmesa = TDFX_CONTEXT( ctx );
@@ -557,7 +557,7 @@ static void init_rast_tab( void )
*/
#define INIT(x) tdfxRenderPrimitive( ctx, x )
-static void tdfx_render_vb_points( GLcontext *ctx,
+static void tdfx_render_vb_points( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -584,7 +584,7 @@ static void tdfx_render_vb_points( GLcontext *ctx,
}
}
-static void tdfx_render_vb_line_strip( GLcontext *ctx,
+static void tdfx_render_vb_line_strip( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -612,7 +612,7 @@ static void tdfx_render_vb_line_strip( GLcontext *ctx,
}
}
-static void tdfx_render_vb_line_loop( GLcontext *ctx,
+static void tdfx_render_vb_line_loop( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -649,7 +649,7 @@ static void tdfx_render_vb_line_loop( GLcontext *ctx,
}
}
-static void tdfx_render_vb_lines( GLcontext *ctx,
+static void tdfx_render_vb_lines( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -677,7 +677,7 @@ static void tdfx_render_vb_lines( GLcontext *ctx,
}
}
-static void tdfx_render_vb_triangles( GLcontext *ctx,
+static void tdfx_render_vb_triangles( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -708,7 +708,7 @@ static void tdfx_render_vb_triangles( GLcontext *ctx,
}
-static void tdfx_render_vb_tri_strip( GLcontext *ctx,
+static void tdfx_render_vb_tri_strip( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -730,7 +730,7 @@ static void tdfx_render_vb_tri_strip( GLcontext *ctx,
}
-static void tdfx_render_vb_tri_fan( GLcontext *ctx,
+static void tdfx_render_vb_tri_fan( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -745,7 +745,7 @@ static void tdfx_render_vb_tri_fan( GLcontext *ctx,
fxVB + start, sizeof(tdfxVertex) );
}
-static void tdfx_render_vb_quads( GLcontext *ctx,
+static void tdfx_render_vb_quads( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -771,7 +771,7 @@ static void tdfx_render_vb_quads( GLcontext *ctx,
}
}
-static void tdfx_render_vb_quad_strip( GLcontext *ctx,
+static void tdfx_render_vb_quad_strip( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -788,7 +788,7 @@ static void tdfx_render_vb_quad_strip( GLcontext *ctx,
count-start, fxVB + start, sizeof(tdfxVertex));
}
-static void tdfx_render_vb_poly( GLcontext *ctx,
+static void tdfx_render_vb_poly( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -803,7 +803,7 @@ static void tdfx_render_vb_poly( GLcontext *ctx,
fxVB + start, sizeof(tdfxVertex));
}
-static void tdfx_render_vb_noop( GLcontext *ctx,
+static void tdfx_render_vb_noop( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -811,7 +811,7 @@ static void tdfx_render_vb_noop( GLcontext *ctx,
(void) (ctx && start && count && flags);
}
-static void (*tdfx_render_tab_verts[GL_POLYGON+2])(GLcontext *,
+static void (*tdfx_render_tab_verts[GL_POLYGON+2])(struct gl_context *,
GLuint,
GLuint,
GLuint) =
@@ -897,7 +897,7 @@ static void (*tdfx_render_tab_verts[GL_POLYGON+2])(GLcontext *,
-static void tdfxRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
+static void tdfxRenderClippedPoly( struct gl_context *ctx, const GLuint *elts,
GLuint n )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -920,13 +920,13 @@ static void tdfxRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
tnl->Driver.Render.PrimitiveNotify( ctx, prim );
}
-static void tdfxRenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj )
+static void tdfxRenderClippedLine( struct gl_context *ctx, GLuint ii, GLuint jj )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
tnl->Driver.Render.Line( ctx, ii, jj );
}
-static void tdfxFastRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
+static void tdfxFastRenderClippedPoly( struct gl_context *ctx, const GLuint *elts,
GLuint n )
{
int i;
@@ -974,7 +974,7 @@ static void tdfxFastRenderClippedPoly( GLcontext *ctx, const GLuint *elts,
_NEW_POLYGONSTIPPLE)
-static void tdfxChooseRenderState(GLcontext *ctx)
+static void tdfxChooseRenderState(struct gl_context *ctx)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -1061,7 +1061,7 @@ static void tdfxChooseRenderState(GLcontext *ctx)
* TODO: Use single back-buffer cliprect where possible.
* NOTE: <pass> starts at 1, not zero!
*/
-static GLboolean multipass_cliprect( GLcontext *ctx, GLuint pass )
+static GLboolean multipass_cliprect( struct gl_context *ctx, GLuint pass )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
if (pass >= fxMesa->numClipRects)
@@ -1081,7 +1081,7 @@ static GLboolean multipass_cliprect( GLcontext *ctx, GLuint pass )
/* Runtime render state and callbacks */
/**********************************************************************/
-static void tdfxRunPipeline( GLcontext *ctx )
+static void tdfxRunPipeline( struct gl_context *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -1103,7 +1103,7 @@ static void tdfxRunPipeline( GLcontext *ctx )
}
-static void tdfxRenderStart( GLcontext *ctx )
+static void tdfxRenderStart( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -1138,7 +1138,7 @@ static void tdfxRenderStart( GLcontext *ctx )
/* Always called between RenderStart and RenderFinish --> We already
* hold the lock.
*/
-static void tdfxRasterPrimitive( GLcontext *ctx, GLenum prim )
+static void tdfxRasterPrimitive( struct gl_context *ctx, GLenum prim )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );
@@ -1170,7 +1170,7 @@ static void tdfxRasterPrimitive( GLcontext *ctx, GLenum prim )
* which renders strips as strips, the equivalent calculations are
* performed in tdfx_render.c.
*/
-static void tdfxRenderPrimitive( GLcontext *ctx, GLenum prim )
+static void tdfxRenderPrimitive( struct gl_context *ctx, GLenum prim )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
GLuint rprim = reduced_prim[prim];
@@ -1185,7 +1185,7 @@ static void tdfxRenderPrimitive( GLcontext *ctx, GLenum prim )
}
}
-static void tdfxRenderFinish( GLcontext *ctx )
+static void tdfxRenderFinish( struct gl_context *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -1227,7 +1227,7 @@ static char *getFallbackString(GLuint bit)
}
-void tdfxFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
+void tdfxFallback( struct gl_context *ctx, GLuint bit, GLboolean mode )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -1266,7 +1266,7 @@ void tdfxFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
}
-void tdfxDDInitTriFuncs( GLcontext *ctx )
+void tdfxDDInitTriFuncs( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_tris.h b/src/mesa/drivers/dri/tdfx/tdfx_tris.h
index ec48a486927..421b8e1c0d7 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_tris.h
+++ b/src/mesa/drivers/dri/tdfx/tdfx_tris.h
@@ -35,7 +35,7 @@
#include "main/mtypes.h"
-extern void tdfxDDInitTriFuncs( GLcontext *ctx );
+extern void tdfxDDInitTriFuncs( struct gl_context *ctx );
#endif
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_vb.c b/src/mesa/drivers/dri/tdfx/tdfx_vb.c
index 546d89aa846..dafb6eccd99 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_vb.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_vb.c
@@ -33,7 +33,7 @@
#include "tdfx_vb.h"
#include "tdfx_render.h"
-static void copy_pv( GLcontext *ctx, GLuint edst, GLuint esrc )
+static void copy_pv( struct gl_context *ctx, GLuint edst, GLuint esrc )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );
tdfxVertex *dst = fxMesa->verts + edst;
@@ -42,10 +42,10 @@ static void copy_pv( GLcontext *ctx, GLuint edst, GLuint esrc )
}
static struct {
- void (*emit)( GLcontext *, GLuint, GLuint, void * );
+ void (*emit)( struct gl_context *, GLuint, GLuint, void * );
tnl_interp_func interp;
tnl_copy_pv_func copy_pv;
- GLboolean (*check_tex_sizes)( GLcontext *ctx );
+ GLboolean (*check_tex_sizes)( struct gl_context *ctx );
GLuint vertex_format;
} setup_tab[TDFX_MAX_SETUP];
@@ -55,7 +55,7 @@ static struct {
#define GET_COLOR(ptr, idx) ((ptr)->data[idx])
-static void interp_extras( GLcontext *ctx,
+static void interp_extras( struct gl_context *ctx,
GLfloat t,
GLuint dst, GLuint out, GLuint in,
GLboolean force_boundary )
@@ -79,7 +79,7 @@ static void interp_extras( GLcontext *ctx,
force_boundary);
}
-static void copy_pv_extras( GLcontext *ctx, GLuint dst, GLuint src )
+static void copy_pv_extras( struct gl_context *ctx, GLuint dst, GLuint src )
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
@@ -204,7 +204,7 @@ void tdfxPrintSetupFlags(char *msg, GLuint flags )
-void tdfxCheckTexSizes( GLcontext *ctx )
+void tdfxCheckTexSizes( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );
@@ -234,7 +234,7 @@ void tdfxCheckTexSizes( GLcontext *ctx )
}
-void tdfxBuildVertices( GLcontext *ctx, GLuint start, GLuint end,
+void tdfxBuildVertices( struct gl_context *ctx, GLuint start, GLuint end,
GLuint newinputs )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );
@@ -275,7 +275,7 @@ void tdfxBuildVertices( GLcontext *ctx, GLuint start, GLuint end,
}
-void tdfxChooseVertexState( GLcontext *ctx )
+void tdfxChooseVertexState( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx );
@@ -321,7 +321,7 @@ void tdfxChooseVertexState( GLcontext *ctx )
-void tdfxInitVB( GLcontext *ctx )
+void tdfxInitVB( struct gl_context *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
GLuint size = TNL_CONTEXT(ctx)->vb.Size;
@@ -337,7 +337,7 @@ void tdfxInitVB( GLcontext *ctx )
}
-void tdfxFreeVB( GLcontext *ctx )
+void tdfxFreeVB( struct gl_context *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
if (fxMesa->verts) {
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_vb.h b/src/mesa/drivers/dri/tdfx/tdfx_vb.h
index 1e190e85f64..238a076d87a 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_vb.h
+++ b/src/mesa/drivers/dri/tdfx/tdfx_vb.h
@@ -48,21 +48,21 @@
_NEW_FOG)
-extern void tdfxValidateBuildProjVerts(GLcontext *ctx,
+extern void tdfxValidateBuildProjVerts(struct gl_context *ctx,
GLuint start, GLuint count,
GLuint newinputs );
extern void tdfxPrintSetupFlags(char *msg, GLuint flags );
-extern void tdfxInitVB( GLcontext *ctx );
+extern void tdfxInitVB( struct gl_context *ctx );
-extern void tdfxFreeVB( GLcontext *ctx );
+extern void tdfxFreeVB( struct gl_context *ctx );
-extern void tdfxCheckTexSizes( GLcontext *ctx );
+extern void tdfxCheckTexSizes( struct gl_context *ctx );
-extern void tdfxChooseVertexState( GLcontext *ctx );
+extern void tdfxChooseVertexState( struct gl_context *ctx );
-extern void tdfxBuildVertices( GLcontext *ctx, GLuint start, GLuint end,
+extern void tdfxBuildVertices( struct gl_context *ctx, GLuint start, GLuint end,
GLuint newinputs );
#endif
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_vbtmp.h b/src/mesa/drivers/dri/tdfx/tdfx_vbtmp.h
index 19baf7d0d25..c593ce05eae 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_vbtmp.h
+++ b/src/mesa/drivers/dri/tdfx/tdfx_vbtmp.h
@@ -33,7 +33,7 @@
#define VIEWPORT_Z(dst,z) dst = s[10] * z + s[14]
-static void TAG(emit)( GLcontext *ctx,
+static void TAG(emit)( struct gl_context *ctx,
GLuint start, GLuint end,
void *dest )
{
@@ -157,7 +157,7 @@ static void TAG(emit)( GLcontext *ctx,
}
-static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
+static GLboolean TAG(check_tex_sizes)( struct gl_context *ctx )
{
/* fprintf(stderr, "%s\n", __FUNCTION__); */
@@ -183,7 +183,7 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
}
-static void TAG(interp)( GLcontext *ctx,
+static void TAG(interp)( struct gl_context *ctx,
GLfloat t,
GLuint edst, GLuint eout, GLuint ein,
GLboolean force_boundary )
diff --git a/src/mesa/drivers/dri/unichrome/via_context.c b/src/mesa/drivers/dri/unichrome/via_context.c
index 4298c948551..963609bde4a 100644
--- a/src/mesa/drivers/dri/unichrome/via_context.c
+++ b/src/mesa/drivers/dri/unichrome/via_context.c
@@ -77,7 +77,7 @@ GLuint VIA_DEBUG = 0;
*
* \sa glGetString
*/
-static const GLubyte *viaGetString(GLcontext *ctx, GLenum name)
+static const GLubyte *viaGetString(struct gl_context *ctx, GLenum name)
{
static char buffer[128];
unsigned offset;
@@ -133,7 +133,7 @@ viaDeleteRenderbuffer(struct gl_renderbuffer *rb)
}
static GLboolean
-viaRenderbufferStorage(GLcontext *ctx, struct gl_renderbuffer *rb,
+viaRenderbufferStorage(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLenum internalFormat, GLuint width, GLuint height)
{
rb->Width = width;
@@ -352,7 +352,7 @@ calculate_buffer_parameters(struct via_context *vmesa,
}
-void viaReAllocateBuffers(GLcontext *ctx, GLframebuffer *drawbuffer,
+void viaReAllocateBuffers(struct gl_context *ctx, struct gl_framebuffer *drawbuffer,
GLuint width, GLuint height)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
@@ -457,11 +457,11 @@ FreeBuffer(struct via_context *vmesa)
GLboolean
viaCreateContext(gl_api api,
- const __GLcontextModes *visual,
+ const struct gl_config *visual,
__DRIcontext *driContextPriv,
void *sharedContextPrivate)
{
- GLcontext *ctx, *shareCtx;
+ struct gl_context *ctx, *shareCtx;
struct via_context *vmesa;
__DRIscreen *sPriv = driContextPriv->driScreenPriv;
viaScreenPrivate *viaScreen = (viaScreenPrivate *)sPriv->private;
@@ -830,11 +830,11 @@ viaMakeCurrent(__DRIcontext *driContextPriv,
if (driContextPriv) {
struct via_context *vmesa =
(struct via_context *)driContextPriv->driverPrivate;
- GLcontext *ctx = vmesa->glCtx;
+ struct gl_context *ctx = vmesa->glCtx;
struct gl_framebuffer *drawBuffer, *readBuffer;
- drawBuffer = (GLframebuffer *)driDrawPriv->driverPrivate;
- readBuffer = (GLframebuffer *)driReadPriv->driverPrivate;
+ drawBuffer = (struct gl_framebuffer *)driDrawPriv->driverPrivate;
+ readBuffer = (struct gl_framebuffer *)driReadPriv->driverPrivate;
if ((vmesa->driDrawable != driDrawPriv)
|| (vmesa->driReadable != driReadPriv)) {
@@ -935,7 +935,7 @@ viaSwapBuffers(__DRIdrawable *drawablePrivate)
dPriv->driContextPriv->driverPrivate) {
struct via_context *vmesa =
(struct via_context *)dPriv->driContextPriv->driverPrivate;
- GLcontext *ctx = vmesa->glCtx;
+ struct gl_context *ctx = vmesa->glCtx;
_mesa_notifySwapBuffers(ctx);
diff --git a/src/mesa/drivers/dri/unichrome/via_context.h b/src/mesa/drivers/dri/unichrome/via_context.h
index 4e1ab3a6ca7..660e7714072 100644
--- a/src/mesa/drivers/dri/unichrome/via_context.h
+++ b/src/mesa/drivers/dri/unichrome/via_context.h
@@ -153,8 +153,8 @@ struct via_texture_object {
struct via_context {
GLint refcount;
- GLcontext *glCtx;
- GLcontext *shareCtx;
+ struct gl_context *glCtx;
+ struct gl_context *shareCtx;
/* XXX These don't belong here. They should be per-drawable state. */
struct via_renderbuffer front;
@@ -394,7 +394,7 @@ extern void viaEmitHwStateLocked(struct via_context *vmesa);
extern void viaEmitScissorValues(struct via_context *vmesa, int box_nr, int emit);
extern void viaXMesaSetBackClipRects(struct via_context *vmesa);
extern void viaXMesaSetFrontClipRects(struct via_context *vmesa);
-extern void viaReAllocateBuffers(GLcontext *ctx, GLframebuffer *drawbuffer, GLuint width, GLuint height);
+extern void viaReAllocateBuffers(struct gl_context *ctx, struct gl_framebuffer *drawbuffer, GLuint width, GLuint height);
extern void viaXMesaWindowMoved(struct via_context *vmesa);
extern GLboolean viaTexCombineState(struct via_context *vmesa,
diff --git a/src/mesa/drivers/dri/unichrome/via_ioctl.c b/src/mesa/drivers/dri/unichrome/via_ioctl.c
index 25aad1b204e..116adda18ea 100644
--- a/src/mesa/drivers/dri/unichrome/via_ioctl.c
+++ b/src/mesa/drivers/dri/unichrome/via_ioctl.c
@@ -201,7 +201,7 @@ static void viaFillBuffer(struct via_context *vmesa,
-static void viaClear(GLcontext *ctx, GLbitfield mask)
+static void viaClear(struct gl_context *ctx, GLbitfield mask)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
__DRIdrawable *dPriv = vmesa->driDrawable;
@@ -951,25 +951,25 @@ void viaFlushDma(struct via_context *vmesa)
}
}
-static void viaFlush(GLcontext *ctx)
+static void viaFlush(struct gl_context *ctx)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
VIA_FLUSH_DMA(vmesa);
}
-static void viaFinish(GLcontext *ctx)
+static void viaFinish(struct gl_context *ctx)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
VIA_FLUSH_DMA(vmesa);
viaWaitIdle(vmesa, GL_FALSE);
}
-static void viaClearStencil(GLcontext *ctx, int s)
+static void viaClearStencil(struct gl_context *ctx, int s)
{
return;
}
-void viaInitIoctlFuncs(GLcontext *ctx)
+void viaInitIoctlFuncs(struct gl_context *ctx)
{
ctx->Driver.Flush = viaFlush;
ctx->Driver.Clear = viaClear;
diff --git a/src/mesa/drivers/dri/unichrome/via_ioctl.h b/src/mesa/drivers/dri/unichrome/via_ioctl.h
index c6b32cf0853..03df789b52c 100644
--- a/src/mesa/drivers/dri/unichrome/via_ioctl.h
+++ b/src/mesa/drivers/dri/unichrome/via_ioctl.h
@@ -32,7 +32,7 @@ void viaFinishPrimitive(struct via_context *vmesa);
void viaFlushDma(struct via_context *vmesa);
void viaFlushDmaLocked(struct via_context *vmesa, GLuint flags);
-void viaInitIoctlFuncs(GLcontext *ctx);
+void viaInitIoctlFuncs(struct gl_context *ctx);
void viaCopyBuffer(__DRIdrawable *dpriv);
void viaPageFlip(__DRIdrawable *dpriv);
void viaCheckDma(struct via_context *vmesa, GLuint bytes);
diff --git a/src/mesa/drivers/dri/unichrome/via_render.c b/src/mesa/drivers/dri/unichrome/via_render.c
index 4351f119555..10e2b4eaddf 100644
--- a/src/mesa/drivers/dri/unichrome/via_render.c
+++ b/src/mesa/drivers/dri/unichrome/via_render.c
@@ -86,7 +86,7 @@
/**********************************************************************/
/* Fast Render pipeline stage */
/**********************************************************************/
-static GLboolean via_run_fastrender(GLcontext *ctx,
+static GLboolean via_run_fastrender(struct gl_context *ctx,
struct tnl_pipeline_stage *stage)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c
index 4b3e9d5a38f..9ea656cf023 100644
--- a/src/mesa/drivers/dri/unichrome/via_screen.c
+++ b/src/mesa/drivers/dri/unichrome/via_screen.c
@@ -200,7 +200,7 @@ viaDestroyScreen(__DRIscreen *sPriv)
static GLboolean
viaCreateBuffer(__DRIscreen *driScrnPriv,
__DRIdrawable *driDrawPriv,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
GLboolean isPixmap)
{
#if 0
@@ -311,7 +311,7 @@ viaCreateBuffer(__DRIscreen *driScrnPriv,
static void
viaDestroyBuffer(__DRIdrawable *driDrawPriv)
{
- _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
+ _mesa_reference_framebuffer((struct gl_framebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
}
static const __DRIconfig **
@@ -369,7 +369,7 @@ viaFillInModes( __DRIscreen *psp,
*
* \todo maybe fold this into intelInitDriver
*
- * \return the __GLcontextModes supported by this driver
+ * \return the struct gl_config supported by this driver
*/
static const __DRIconfig **
viaInitScreen(__DRIscreen *psp)
diff --git a/src/mesa/drivers/dri/unichrome/via_screen.h b/src/mesa/drivers/dri/unichrome/via_screen.h
index 51df0ce4eb4..292646dabde 100644
--- a/src/mesa/drivers/dri/unichrome/via_screen.h
+++ b/src/mesa/drivers/dri/unichrome/via_screen.h
@@ -77,7 +77,7 @@ typedef struct {
extern GLboolean
viaCreateContext(gl_api api,
- const __GLcontextModes *mesaVis,
+ const struct gl_config *mesaVis,
__DRIcontext *driContextPriv,
void *sharedContextPrivate);
diff --git a/src/mesa/drivers/dri/unichrome/via_span.c b/src/mesa/drivers/dri/unichrome/via_span.c
index fa3cbf7a79e..4ca584261bc 100644
--- a/src/mesa/drivers/dri/unichrome/via_span.c
+++ b/src/mesa/drivers/dri/unichrome/via_span.c
@@ -149,21 +149,21 @@
/* Move locking out to get reasonable span performance.
*/
-void viaSpanRenderStart( GLcontext *ctx )
+void viaSpanRenderStart( struct gl_context *ctx )
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
viaWaitIdle(vmesa, GL_FALSE);
LOCK_HARDWARE(vmesa);
}
-void viaSpanRenderFinish( GLcontext *ctx )
+void viaSpanRenderFinish( struct gl_context *ctx )
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
_swrast_flush( ctx );
UNLOCK_HARDWARE( vmesa );
}
-void viaInitSpanFuncs(GLcontext *ctx)
+void viaInitSpanFuncs(struct gl_context *ctx)
{
struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference(ctx);
swdd->SpanRenderStart = viaSpanRenderStart;
@@ -176,7 +176,7 @@ void viaInitSpanFuncs(GLcontext *ctx)
* Plug in the Get/Put routines for the given driRenderbuffer.
*/
void
-viaSetSpanFunctions(struct via_renderbuffer *vrb, const GLvisual *vis)
+viaSetSpanFunctions(struct via_renderbuffer *vrb, const struct gl_config *vis)
{
if (vrb->Base.Format == MESA_FORMAT_RGB565) {
viaInitPointers_565(&vrb->Base);
diff --git a/src/mesa/drivers/dri/unichrome/via_span.h b/src/mesa/drivers/dri/unichrome/via_span.h
index 3dca0d56619..b7abf685382 100644
--- a/src/mesa/drivers/dri/unichrome/via_span.h
+++ b/src/mesa/drivers/dri/unichrome/via_span.h
@@ -25,11 +25,11 @@
#ifndef _VIA_SPAN_H
#define _VIA_SPAN_H
-extern void viaInitSpanFuncs(GLcontext *ctx);
-extern void viaSpanRenderStart( GLcontext *ctx );
-extern void viaSpanRenderFinish( GLcontext *ctx );
+extern void viaInitSpanFuncs(struct gl_context *ctx);
+extern void viaSpanRenderStart( struct gl_context *ctx );
+extern void viaSpanRenderFinish( struct gl_context *ctx );
extern void
-viaSetSpanFunctions(struct via_renderbuffer *vrb, const GLvisual *vis);
+viaSetSpanFunctions(struct via_renderbuffer *vrb, const struct gl_config *vis);
#endif
diff --git a/src/mesa/drivers/dri/unichrome/via_state.c b/src/mesa/drivers/dri/unichrome/via_state.c
index f7029b94928..033352188d4 100644
--- a/src/mesa/drivers/dri/unichrome/via_state.c
+++ b/src/mesa/drivers/dri/unichrome/via_state.c
@@ -78,7 +78,7 @@ static GLuint viaComputeLodBias(GLfloat bias)
void viaEmitState(struct via_context *vmesa)
{
- GLcontext *ctx = vmesa->glCtx;
+ struct gl_context *ctx = vmesa->glCtx;
GLuint i = 0;
GLuint j = 0;
RING_VARS;
@@ -523,7 +523,7 @@ static INLINE GLuint viaPackColor(GLuint bpp,
}
}
-static void viaBlendEquationSeparate(GLcontext *ctx,
+static void viaBlendEquationSeparate(struct gl_context *ctx,
GLenum rgbMode,
GLenum aMode)
{
@@ -545,7 +545,7 @@ static void viaBlendEquationSeparate(GLcontext *ctx,
ctx->Color.LogicOp != GL_COPY));
}
-static void viaBlendFunc(GLcontext *ctx, GLenum sfactor, GLenum dfactor)
+static void viaBlendFunc(struct gl_context *ctx, GLenum sfactor, GLenum dfactor)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
GLboolean fallback = GL_FALSE;
@@ -580,7 +580,7 @@ static void viaBlendFunc(GLcontext *ctx, GLenum sfactor, GLenum dfactor)
/* Shouldn't be called as the extension is disabled.
*/
-static void viaBlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB,
+static void viaBlendFuncSeparate(struct gl_context *ctx, GLenum sfactorRGB,
GLenum dfactorRGB, GLenum sfactorA,
GLenum dfactorA)
{
@@ -597,7 +597,7 @@ static void viaBlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB,
/* =============================================================
* Hardware clipping
*/
-static void viaScissor(GLcontext *ctx, GLint x, GLint y,
+static void viaScissor(struct gl_context *ctx, GLint x, GLint y,
GLsizei w, GLsizei h)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
@@ -619,7 +619,7 @@ static void viaScissor(GLcontext *ctx, GLint x, GLint y,
vmesa->scissorRect.y2 = vmesa->driDrawable->h - y;
}
-static void viaEnable(GLcontext *ctx, GLenum cap, GLboolean state)
+static void viaEnable(struct gl_context *ctx, GLenum cap, GLboolean state)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
@@ -637,13 +637,13 @@ static void viaEnable(GLcontext *ctx, GLenum cap, GLboolean state)
/* Fallback to swrast for select and feedback.
*/
-static void viaRenderMode(GLcontext *ctx, GLenum mode)
+static void viaRenderMode(struct gl_context *ctx, GLenum mode)
{
FALLBACK(VIA_CONTEXT(ctx), VIA_FALLBACK_RENDERMODE, (mode != GL_RENDER));
}
-static void viaDrawBuffer(GLcontext *ctx, GLenum mode)
+static void viaDrawBuffer(struct gl_context *ctx, GLenum mode)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
@@ -678,7 +678,7 @@ static void viaDrawBuffer(GLcontext *ctx, GLenum mode)
viaXMesaWindowMoved(vmesa);
}
-static void viaClearColor(GLcontext *ctx, const GLfloat color[4])
+static void viaClearColor(struct gl_context *ctx, const GLfloat color[4])
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
GLubyte pcolor[4];
@@ -696,7 +696,7 @@ static void viaClearColor(GLcontext *ctx, const GLfloat color[4])
#define WRITEMASK_GREEN_SHIFT 29
#define WRITEMASK_BLUE_SHIFT 28
-static void viaColorMask(GLcontext *ctx,
+static void viaColorMask(struct gl_context *ctx,
GLboolean r, GLboolean g,
GLboolean b, GLboolean a)
{
@@ -716,7 +716,7 @@ static void viaColorMask(GLcontext *ctx,
/* This hardware just isn't capable of private back buffers without
* glitches and/or a hefty locking scheme.
*/
-void viaCalcViewport(GLcontext *ctx)
+void viaCalcViewport(struct gl_context *ctx)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
__DRIdrawable *dPriv = vmesa->driDrawable;
@@ -733,20 +733,20 @@ void viaCalcViewport(GLcontext *ctx)
m[MAT_TZ] = v[MAT_TZ] * (1.0 / vmesa->depth_max);
}
-static void viaViewport(GLcontext *ctx,
+static void viaViewport(struct gl_context *ctx,
GLint x, GLint y,
GLsizei width, GLsizei height)
{
viaCalcViewport(ctx);
}
-static void viaDepthRange(GLcontext *ctx,
+static void viaDepthRange(struct gl_context *ctx,
GLclampd nearval, GLclampd farval)
{
viaCalcViewport(ctx);
}
-void viaInitState(GLcontext *ctx)
+void viaInitState(struct gl_context *ctx)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
@@ -865,7 +865,7 @@ get_minmag_filter( GLenum min, GLenum mag )
}
-static GLboolean viaChooseTextureState(GLcontext *ctx)
+static GLboolean viaChooseTextureState(struct gl_context *ctx)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
struct gl_texture_unit *texUnit0 = &ctx->Texture.Unit[0];
@@ -950,7 +950,7 @@ static GLboolean viaChooseTextureState(GLcontext *ctx)
return GL_TRUE;
}
-static void viaChooseColorState(GLcontext *ctx)
+static void viaChooseColorState(struct gl_context *ctx)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
GLenum s = ctx->Color.BlendSrcRGB;
@@ -1246,7 +1246,7 @@ static void viaChooseColorState(GLcontext *ctx)
vmesa->regEnable &= ~HC_HenAW_MASK;
}
-static void viaChooseFogState(GLcontext *ctx)
+static void viaChooseFogState(struct gl_context *ctx)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
@@ -1271,7 +1271,7 @@ static void viaChooseFogState(GLcontext *ctx)
}
}
-static void viaChooseDepthState(GLcontext *ctx)
+static void viaChooseDepthState(struct gl_context *ctx)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
if (ctx->Depth.Test) {
@@ -1295,7 +1295,7 @@ static void viaChooseDepthState(GLcontext *ctx)
}
}
-static void viaChooseLineState(GLcontext *ctx)
+static void viaChooseLineState(struct gl_context *ctx)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
@@ -1309,7 +1309,7 @@ static void viaChooseLineState(GLcontext *ctx)
}
}
-static void viaChoosePolygonState(GLcontext *ctx)
+static void viaChoosePolygonState(struct gl_context *ctx)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
@@ -1335,7 +1335,7 @@ static void viaChoosePolygonState(GLcontext *ctx)
}
}
-static void viaChooseStencilState(GLcontext *ctx)
+static void viaChooseStencilState(struct gl_context *ctx)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
@@ -1421,7 +1421,7 @@ static void viaChooseStencilState(GLcontext *ctx)
-static void viaChooseTriangle(GLcontext *ctx)
+static void viaChooseTriangle(struct gl_context *ctx)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
@@ -1445,7 +1445,7 @@ static void viaChooseTriangle(GLcontext *ctx)
}
}
-void viaValidateState( GLcontext *ctx )
+void viaValidateState( struct gl_context *ctx )
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
@@ -1492,7 +1492,7 @@ void viaValidateState( GLcontext *ctx )
vmesa->newState = 0;
}
-static void viaInvalidateState(GLcontext *ctx, GLuint newState)
+static void viaInvalidateState(struct gl_context *ctx, GLuint newState)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
@@ -1505,7 +1505,7 @@ static void viaInvalidateState(GLcontext *ctx, GLuint newState)
_tnl_InvalidateState(ctx, newState);
}
-void viaInitStateFuncs(GLcontext *ctx)
+void viaInitStateFuncs(struct gl_context *ctx)
{
/* Callbacks for internal Mesa events.
*/
diff --git a/src/mesa/drivers/dri/unichrome/via_state.h b/src/mesa/drivers/dri/unichrome/via_state.h
index 065ec57d331..8a237055201 100644
--- a/src/mesa/drivers/dri/unichrome/via_state.h
+++ b/src/mesa/drivers/dri/unichrome/via_state.h
@@ -27,10 +27,10 @@
#include "via_context.h"
-extern void viaInitState(GLcontext *ctx);
-extern void viaInitStateFuncs(GLcontext *ctx);
-extern void viaCalcViewport(GLcontext *ctx);
-extern void viaValidateState(GLcontext *ctx);
+extern void viaInitState(struct gl_context *ctx);
+extern void viaInitStateFuncs(struct gl_context *ctx);
+extern void viaCalcViewport(struct gl_context *ctx);
+extern void viaValidateState(struct gl_context *ctx);
extern void viaEmitState(struct via_context *vmesa);
extern void viaFallback(struct via_context *vmesa, GLuint bit, GLboolean mode);
diff --git a/src/mesa/drivers/dri/unichrome/via_tex.c b/src/mesa/drivers/dri/unichrome/via_tex.c
index 49426fef8d7..18fb8f33b9f 100644
--- a/src/mesa/drivers/dri/unichrome/via_tex.c
+++ b/src/mesa/drivers/dri/unichrome/via_tex.c
@@ -45,7 +45,7 @@
#include "via_3d_reg.h"
static gl_format
-viaChooseTexFormat( GLcontext *ctx, GLint internalFormat,
+viaChooseTexFormat( struct gl_context *ctx, GLint internalFormat,
GLenum format, GLenum type )
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
@@ -437,7 +437,7 @@ GLboolean viaSwapOutWork( struct via_context *vmesa )
/* Basically, just collect the image dimensions and addresses for each
* image and update the texture object state accordingly.
*/
-static GLboolean viaSetTexImages(GLcontext *ctx,
+static GLboolean viaSetTexImages(struct gl_context *ctx,
struct gl_texture_object *texObj)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
@@ -624,7 +624,7 @@ static GLboolean viaSetTexImages(GLcontext *ctx,
}
-GLboolean viaUpdateTextureState( GLcontext *ctx )
+GLboolean viaUpdateTextureState( struct gl_context *ctx )
{
struct gl_texture_unit *texUnit = ctx->Texture.Unit;
GLuint i;
@@ -651,7 +651,7 @@ GLboolean viaUpdateTextureState( GLcontext *ctx )
-static void viaTexImage(GLcontext *ctx,
+static void viaTexImage(struct gl_context *ctx,
GLint dims,
GLenum target, GLint level,
GLint internalFormat,
@@ -798,7 +798,7 @@ static void viaTexImage(GLcontext *ctx,
_mesa_unmap_teximage_pbo(ctx, packing);
}
-static void viaTexImage2D(GLcontext *ctx,
+static void viaTexImage2D(struct gl_context *ctx,
GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint border,
@@ -813,7 +813,7 @@ static void viaTexImage2D(GLcontext *ctx,
packing, texObj, texImage );
}
-static void viaTexSubImage2D(GLcontext *ctx,
+static void viaTexSubImage2D(struct gl_context *ctx,
GLenum target,
GLint level,
GLint xoffset, GLint yoffset,
@@ -834,7 +834,7 @@ static void viaTexSubImage2D(GLcontext *ctx,
texImage);
}
-static void viaTexImage1D(GLcontext *ctx,
+static void viaTexImage1D(struct gl_context *ctx,
GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint border,
@@ -849,7 +849,7 @@ static void viaTexImage1D(GLcontext *ctx,
packing, texObj, texImage );
}
-static void viaTexSubImage1D(GLcontext *ctx,
+static void viaTexSubImage1D(struct gl_context *ctx,
GLenum target,
GLint level,
GLint xoffset,
@@ -872,7 +872,7 @@ static void viaTexSubImage1D(GLcontext *ctx,
-static GLboolean viaIsTextureResident(GLcontext *ctx,
+static GLboolean viaIsTextureResident(struct gl_context *ctx,
struct gl_texture_object *texObj)
{
struct via_texture_object *viaObj =
@@ -884,14 +884,14 @@ static GLboolean viaIsTextureResident(GLcontext *ctx,
-static struct gl_texture_image *viaNewTextureImage( GLcontext *ctx )
+static struct gl_texture_image *viaNewTextureImage( struct gl_context *ctx )
{
(void) ctx;
return (struct gl_texture_image *)CALLOC_STRUCT(via_texture_image);
}
-static struct gl_texture_object *viaNewTextureObject( GLcontext *ctx,
+static struct gl_texture_object *viaNewTextureObject( struct gl_context *ctx,
GLuint name,
GLenum target )
{
@@ -906,7 +906,7 @@ static struct gl_texture_object *viaNewTextureObject( GLcontext *ctx,
}
-static void viaFreeTextureImageData( GLcontext *ctx,
+static void viaFreeTextureImageData( struct gl_context *ctx,
struct gl_texture_image *texImage )
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/unichrome/via_tex.h b/src/mesa/drivers/dri/unichrome/via_tex.h
index 25eeee32f3d..9495c956b5a 100644
--- a/src/mesa/drivers/dri/unichrome/via_tex.h
+++ b/src/mesa/drivers/dri/unichrome/via_tex.h
@@ -30,7 +30,7 @@
struct via_context;
-GLboolean viaUpdateTextureState(GLcontext *ctx);
+GLboolean viaUpdateTextureState(struct gl_context *ctx);
void viaInitTextureFuncs(struct dd_function_table * functions);
GLboolean viaSwapOutWork( struct via_context *vmesa );
diff --git a/src/mesa/drivers/dri/unichrome/via_tris.c b/src/mesa/drivers/dri/unichrome/via_tris.c
index be3c9a770ff..51f6af9228a 100644
--- a/src/mesa/drivers/dri/unichrome/via_tris.c
+++ b/src/mesa/drivers/dri/unichrome/via_tris.c
@@ -490,7 +490,7 @@ via_fallback_tri(struct via_context *vmesa,
viaVertex *v1,
viaVertex *v2)
{
- GLcontext *ctx = vmesa->glCtx;
+ struct gl_context *ctx = vmesa->glCtx;
SWvertex v[3];
_swsetup_Translate(ctx, v0, &v[0]);
_swsetup_Translate(ctx, v1, &v[1]);
@@ -506,7 +506,7 @@ via_fallback_line(struct via_context *vmesa,
viaVertex *v0,
viaVertex *v1)
{
- GLcontext *ctx = vmesa->glCtx;
+ struct gl_context *ctx = vmesa->glCtx;
SWvertex v[2];
_swsetup_Translate(ctx, v0, &v[0]);
_swsetup_Translate(ctx, v1, &v[1]);
@@ -520,7 +520,7 @@ static void
via_fallback_point(struct via_context *vmesa,
viaVertex *v0)
{
- GLcontext *ctx = vmesa->glCtx;
+ struct gl_context *ctx = vmesa->glCtx;
SWvertex v[1];
_swsetup_Translate(ctx, v0, &v[0]);
viaSpanRenderStart( ctx );
@@ -528,7 +528,7 @@ via_fallback_point(struct via_context *vmesa,
viaSpanRenderFinish( ctx );
}
-static void viaResetLineStipple( GLcontext *ctx )
+static void viaResetLineStipple( struct gl_context *ctx )
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
vmesa->regCmdB |= HC_HLPrst_MASK;
@@ -578,7 +578,7 @@ static void viaResetLineStipple( GLcontext *ctx )
-static void viaRenderClippedPoly(GLcontext *ctx, const GLuint *elts,
+static void viaRenderClippedPoly(struct gl_context *ctx, const GLuint *elts,
GLuint n)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -602,13 +602,13 @@ static void viaRenderClippedPoly(GLcontext *ctx, const GLuint *elts,
tnl->Driver.Render.PrimitiveNotify( ctx, prim );
}
-static void viaRenderClippedLine(GLcontext *ctx, GLuint ii, GLuint jj)
+static void viaRenderClippedLine(struct gl_context *ctx, GLuint ii, GLuint jj)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
tnl->Driver.Render.Line(ctx, ii, jj);
}
-static void viaFastRenderClippedPoly(GLcontext *ctx, const GLuint *elts,
+static void viaFastRenderClippedPoly(struct gl_context *ctx, const GLuint *elts,
GLuint n)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
@@ -645,7 +645,7 @@ static void viaFastRenderClippedPoly(GLcontext *ctx, const GLuint *elts,
_NEW_POLYGONSTIPPLE)
-static void viaChooseRenderState(GLcontext *ctx)
+static void viaChooseRenderState(struct gl_context *ctx)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct via_context *vmesa = VIA_CONTEXT(ctx);
@@ -739,7 +739,7 @@ do { \
-static void viaChooseVertexState( GLcontext *ctx )
+static void viaChooseVertexState( struct gl_context *ctx )
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -822,7 +822,7 @@ static void viaChooseVertexState( GLcontext *ctx )
* them. Fallback to swrast if we can't. Returns GL_TRUE if projective
* texture coordinates must be faked, GL_FALSE otherwise.
*/
-static GLboolean viaCheckPTexHack( GLcontext *ctx )
+static GLboolean viaCheckPTexHack( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
@@ -853,7 +853,7 @@ static GLboolean viaCheckPTexHack( GLcontext *ctx )
/**********************************************************************/
-static void viaRenderStart(GLcontext *ctx)
+static void viaRenderStart(struct gl_context *ctx)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -888,7 +888,7 @@ static void viaRenderStart(GLcontext *ctx)
VB->AttribPtr[VERT_ATTRIB_POS] = VB->NdcPtr;
}
-static void viaRenderFinish(GLcontext *ctx)
+static void viaRenderFinish(struct gl_context *ctx)
{
VIA_FINISH_PRIM(VIA_CONTEXT(ctx));
}
@@ -897,7 +897,7 @@ static void viaRenderFinish(GLcontext *ctx)
/* System to flush dma and emit state changes based on the rasterized
* primitive.
*/
-void viaRasterPrimitive(GLcontext *ctx,
+void viaRasterPrimitive(struct gl_context *ctx,
GLenum glprim,
GLenum hwprim)
{
@@ -1035,7 +1035,7 @@ void viaRasterPrimitive(GLcontext *ctx,
/* Callback for mesa:
*/
-static void viaRenderPrimitive( GLcontext *ctx, GLuint prim )
+static void viaRenderPrimitive( struct gl_context *ctx, GLuint prim )
{
viaRasterPrimitive( ctx, prim, hwPrim[prim] );
}
@@ -1103,7 +1103,7 @@ void viaFinishPrimitive(struct via_context *vmesa)
void viaFallback(struct via_context *vmesa, GLuint bit, GLboolean mode)
{
- GLcontext *ctx = vmesa->glCtx;
+ struct gl_context *ctx = vmesa->glCtx;
TNLcontext *tnl = TNL_CONTEXT(ctx);
GLuint oldfallback = vmesa->Fallback;
@@ -1148,7 +1148,7 @@ void viaFallback(struct via_context *vmesa, GLuint bit, GLboolean mode)
}
}
-static void viaRunPipeline( GLcontext *ctx )
+static void viaRunPipeline( struct gl_context *ctx )
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
@@ -1166,7 +1166,7 @@ static void viaRunPipeline( GLcontext *ctx )
/**********************************************************************/
-void viaInitTriFuncs(GLcontext *ctx)
+void viaInitTriFuncs(struct gl_context *ctx)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/unichrome/via_tris.h b/src/mesa/drivers/dri/unichrome/via_tris.h
index bc6ef4e4eba..4bc83fc6242 100644
--- a/src/mesa/drivers/dri/unichrome/via_tris.h
+++ b/src/mesa/drivers/dri/unichrome/via_tris.h
@@ -28,8 +28,8 @@
#include "main/mtypes.h"
extern void viaPrintRenderState(const char *msg, GLuint state);
-extern void viaInitTriFuncs(GLcontext *ctx);
-extern void viaRasterPrimitive(GLcontext *ctx, GLenum rPrim, GLuint hwPrim);
-extern void viaRasterPrimitiveFinish(GLcontext *ctx);
+extern void viaInitTriFuncs(struct gl_context *ctx);
+extern void viaRasterPrimitive(struct gl_context *ctx, GLenum rPrim, GLuint hwPrim);
+extern void viaRasterPrimitiveFinish(struct gl_context *ctx);
#endif
diff --git a/src/mesa/drivers/fbdev/glfbdev.c b/src/mesa/drivers/fbdev/glfbdev.c
index 2ad52d89fc0..5195bca97fa 100644
--- a/src/mesa/drivers/fbdev/glfbdev.c
+++ b/src/mesa/drivers/fbdev/glfbdev.c
@@ -73,20 +73,20 @@
/**
- * Derived from Mesa's GLvisual class.
+ * Derived from Mesa's struct gl_config class.
*/
struct GLFBDevVisualRec {
- GLvisual glvisual; /* base class */
+ struct gl_config glvisual; /* base class */
struct fb_fix_screeninfo fix;
struct fb_var_screeninfo var;
int pixelFormat;
};
/**
- * Derived from Mesa's GLframebuffer class.
+ * Derived from Mesa's struct gl_framebuffer class.
*/
struct GLFBDevBufferRec {
- GLframebuffer glframebuffer; /* base class */
+ struct gl_framebuffer glframebuffer; /* base class */
GLFBDevVisualPtr visual;
struct fb_fix_screeninfo fix;
struct fb_var_screeninfo var;
@@ -95,10 +95,10 @@ struct GLFBDevBufferRec {
};
/**
- * Derived from Mesa's GLcontext class.
+ * Derived from Mesa's struct gl_context class.
*/
struct GLFBDevContextRec {
- GLcontext glcontext; /* base class */
+ struct gl_context glcontext; /* base class */
GLFBDevVisualPtr visual;
GLFBDevBufferPtr drawBuffer;
GLFBDevBufferPtr readBuffer;
@@ -122,7 +122,7 @@ struct GLFBDevRenderbufferRec {
static const GLubyte *
-get_string(GLcontext *ctx, GLenum pname)
+get_string(struct gl_context *ctx, GLenum pname)
{
(void) ctx;
switch (pname) {
@@ -135,7 +135,7 @@ get_string(GLcontext *ctx, GLenum pname)
static void
-update_state( GLcontext *ctx, GLuint new_state )
+update_state( struct gl_context *ctx, GLuint new_state )
{
/* not much to do here - pass it on */
_swrast_InvalidateState( ctx, new_state );
@@ -146,7 +146,7 @@ update_state( GLcontext *ctx, GLuint new_state )
static void
-get_buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height )
+get_buffer_size( struct gl_framebuffer *buffer, GLuint *width, GLuint *height )
{
const GLFBDevBufferPtr fbdevbuffer = (GLFBDevBufferPtr) buffer;
*width = fbdevbuffer->var.xres;
@@ -159,10 +159,10 @@ get_buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height )
* framebuffer size has changed (and update corresponding state).
*/
static void
-viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
+viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
{
GLuint newWidth, newHeight;
- GLframebuffer *buffer;
+ struct gl_framebuffer *buffer;
buffer = ctx->WinSysDrawBuffer;
get_buffer_size( buffer, &newWidth, &newHeight );
@@ -463,7 +463,7 @@ delete_renderbuffer(struct gl_renderbuffer *rb)
static GLboolean
-renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
+renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLenum internalFormat, GLuint width, GLuint height)
{
/* no-op: the renderbuffer storage is allocated just once when it's
@@ -706,7 +706,7 @@ GLFBDevContextPtr
glFBDevCreateContext( const GLFBDevVisualPtr visual, GLFBDevContextPtr share )
{
GLFBDevContextPtr ctx;
- GLcontext *glctx;
+ struct gl_context *glctx;
struct dd_function_table functions;
ASSERT(visual);
@@ -732,7 +732,7 @@ glFBDevCreateContext( const GLFBDevVisualPtr visual, GLFBDevContextPtr share )
ctx->visual = visual;
/* Create module contexts */
- glctx = (GLcontext *) &ctx->glcontext;
+ glctx = (struct gl_context *) &ctx->glcontext;
_swrast_CreateContext( glctx );
_vbo_CreateContext( glctx );
_tnl_CreateContext( glctx );
@@ -762,7 +762,7 @@ glFBDevDestroyContext( GLFBDevContextPtr context )
GLFBDevContextPtr fbdevctx = glFBDevGetCurrentContext();
if (context) {
- GLcontext *mesaCtx = &context->glcontext;
+ struct gl_context *mesaCtx = &context->glcontext;
_swsetup_DestroyContext( mesaCtx );
_swrast_DestroyContext( mesaCtx );
diff --git a/src/mesa/drivers/osmesa/Makefile b/src/mesa/drivers/osmesa/Makefile
index 39ab09af805..50dd4526e19 100644
--- a/src/mesa/drivers/osmesa/Makefile
+++ b/src/mesa/drivers/osmesa/Makefile
@@ -40,7 +40,7 @@ $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OBJECTS) $(CORE_MESA)
-major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
-install $(TOP)/$(LIB_DIR) -cplusplus $(MKLIB_OPTIONS) \
-id $(INSTALL_LIB_DIR)/lib$(OSMESA_LIB).$(MESA_MAJOR).dylib \
- $(OSMESA_LIB_DEPS) $(OBJECTS) $(CORE_MESA)
+ $(OSMESA_LIB_DEPS) $(OBJECTS) $(CORE_MESA) $(TALLOC_LIBS)
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index 93d0e8568a1..37dc35cbedd 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -57,14 +57,14 @@
/**
- * OSMesa rendering context, derived from core Mesa GLcontext.
+ * OSMesa rendering context, derived from core Mesa struct gl_context.
*/
struct osmesa_context
{
- GLcontext mesa; /*< Base class - this must be first */
- GLvisual *gl_visual; /*< Describes the buffers */
+ struct gl_context mesa; /*< Base class - this must be first */
+ struct gl_config *gl_visual; /*< Describes the buffers */
struct gl_renderbuffer *rb; /*< The user's colorbuffer */
- GLframebuffer *gl_buffer; /*< The framebuffer, containing user's rb */
+ struct gl_framebuffer *gl_buffer; /*< The framebuffer, containing user's rb */
GLenum format; /*< User-specified context format */
GLint userRowLength; /*< user-specified number of pixels per row */
GLint rInd, gInd, bInd, aInd;/*< index offsets for RGBA formats */
@@ -75,7 +75,7 @@ struct osmesa_context
static INLINE OSMesaContext
-OSMESA_CONTEXT(GLcontext *ctx)
+OSMESA_CONTEXT(struct gl_context *ctx)
{
/* Just cast, since we're using structure containment */
return (OSMesaContext) ctx;
@@ -88,7 +88,7 @@ OSMESA_CONTEXT(GLcontext *ctx)
static const GLubyte *
-get_string( GLcontext *ctx, GLenum name )
+get_string( struct gl_context *ctx, GLenum name )
{
(void) ctx;
switch (name) {
@@ -107,7 +107,7 @@ get_string( GLcontext *ctx, GLenum name )
static void
-osmesa_update_state( GLcontext *ctx, GLuint new_state )
+osmesa_update_state( struct gl_context *ctx, GLuint new_state )
{
/* easy - just propogate */
_swrast_InvalidateState( ctx, new_state );
@@ -557,7 +557,7 @@ do { \
* function. Otherwise, return NULL.
*/
static swrast_line_func
-osmesa_choose_line_function( GLcontext *ctx )
+osmesa_choose_line_function( struct gl_context *ctx )
{
const OSMesaContext osmesa = OSMESA_CONTEXT(ctx);
const SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -668,7 +668,7 @@ osmesa_choose_line_function( GLcontext *ctx )
* Return pointer to an optimized triangle function if possible.
*/
static swrast_tri_func
-osmesa_choose_triangle_function( GLcontext *ctx )
+osmesa_choose_triangle_function( struct gl_context *ctx )
{
const OSMesaContext osmesa = OSMESA_CONTEXT(ctx);
const SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -708,7 +708,7 @@ osmesa_choose_triangle_function( GLcontext *ctx )
* standard swrast functions.
*/
static void
-osmesa_choose_triangle( GLcontext *ctx )
+osmesa_choose_triangle( struct gl_context *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -718,7 +718,7 @@ osmesa_choose_triangle( GLcontext *ctx )
}
static void
-osmesa_choose_line( GLcontext *ctx )
+osmesa_choose_line( struct gl_context *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -806,7 +806,7 @@ osmesa_delete_renderbuffer(struct gl_renderbuffer *rb)
* Just set up all the gl_renderbuffer methods.
*/
static GLboolean
-osmesa_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
+osmesa_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLenum internalFormat, GLuint width, GLuint height)
{
const OSMesaContext osmesa = OSMESA_CONTEXT(ctx);
@@ -994,7 +994,7 @@ osmesa_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
* Allocate a new renderbuffer to describe the user-provided color buffer.
*/
static struct gl_renderbuffer *
-new_osmesa_renderbuffer(GLcontext *ctx, GLenum format, GLenum type)
+new_osmesa_renderbuffer(struct gl_context *ctx, GLenum format, GLenum type)
{
const GLuint name = 0;
struct gl_renderbuffer *rb = _mesa_new_renderbuffer(ctx, name);
@@ -1157,7 +1157,7 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
if (!_mesa_initialize_context(&osmesa->mesa,
osmesa->gl_visual,
sharelist ? &sharelist->mesa
- : (GLcontext *) NULL,
+ : (struct gl_context *) NULL,
&functions, (void *) osmesa)) {
_mesa_destroy_visual( osmesa->gl_visual );
free(osmesa);
@@ -1202,7 +1202,7 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
/* Initialize the software rasterizer and helper modules. */
{
- GLcontext *ctx = &osmesa->mesa;
+ struct gl_context *ctx = &osmesa->mesa;
SWcontext *swrast;
TNLcontext *tnl;
@@ -1367,7 +1367,7 @@ OSMesaMakeCurrent( OSMesaContext osmesa, void *buffer, GLenum type,
GLAPI OSMesaContext GLAPIENTRY
OSMesaGetCurrentContext( void )
{
- GLcontext *ctx = _mesa_get_current_context();
+ struct gl_context *ctx = _mesa_get_current_context();
if (ctx)
return (OSMesaContext) ctx;
else
diff --git a/src/mesa/drivers/windows/gdi/wmesa.c b/src/mesa/drivers/windows/gdi/wmesa.c
index 22b0c46b4f7..833e2526f3c 100644
--- a/src/mesa/drivers/windows/gdi/wmesa.c
+++ b/src/mesa/drivers/windows/gdi/wmesa.c
@@ -30,7 +30,7 @@ static WMesaFramebuffer FirstFramebuffer = NULL;
* given HDC (Window handle).
*/
WMesaFramebuffer
-wmesa_new_framebuffer(HDC hdc, GLvisual *visual)
+wmesa_new_framebuffer(HDC hdc, struct gl_config *visual)
{
WMesaFramebuffer pwfb
= (WMesaFramebuffer) malloc(sizeof(struct wmesa_framebuffer));
@@ -83,18 +83,18 @@ wmesa_lookup_framebuffer(HDC hdc)
/**
- * Given a GLframebuffer, return the corresponding WMesaFramebuffer.
+ * Given a struct gl_framebuffer, return the corresponding WMesaFramebuffer.
*/
-static WMesaFramebuffer wmesa_framebuffer(GLframebuffer *fb)
+static WMesaFramebuffer wmesa_framebuffer(struct gl_framebuffer *fb)
{
return (WMesaFramebuffer) fb;
}
/**
- * Given a GLcontext, return the corresponding WMesaContext.
+ * Given a struct gl_context, return the corresponding WMesaContext.
*/
-static WMesaContext wmesa_context(const GLcontext *ctx)
+static WMesaContext wmesa_context(const struct gl_context *ctx)
{
return (WMesaContext) ctx;
}
@@ -104,7 +104,7 @@ static WMesaContext wmesa_context(const GLcontext *ctx)
* Every driver should implement a GetString function in order to
* return a meaningful GL_RENDERER string.
*/
-static const GLubyte *wmesa_get_string(GLcontext *ctx, GLenum name)
+static const GLubyte *wmesa_get_string(struct gl_context *ctx, GLenum name)
{
return (name == GL_RENDERER) ?
(GLubyte *) "Mesa Windows GDI Driver" : NULL;
@@ -217,14 +217,14 @@ get_window_size(HDC hdc, GLuint *width, GLuint *height)
static void
-wmesa_get_buffer_size(GLframebuffer *buffer, GLuint *width, GLuint *height)
+wmesa_get_buffer_size(struct gl_framebuffer *buffer, GLuint *width, GLuint *height)
{
WMesaFramebuffer pwfb = wmesa_framebuffer(buffer);
get_window_size(pwfb->hDC, width, height);
}
-static void wmesa_flush(GLcontext *ctx)
+static void wmesa_flush(struct gl_context *ctx)
{
WMesaContext pwc = wmesa_context(ctx);
WMesaFramebuffer pwfb = wmesa_framebuffer(ctx->WinSysDrawBuffer);
@@ -250,7 +250,7 @@ static void wmesa_flush(GLcontext *ctx)
/*
* Set the color used to clear the color buffer.
*/
-static void clear_color(GLcontext *ctx, const GLfloat color[4])
+static void clear_color(struct gl_context *ctx, const GLfloat color[4])
{
WMesaContext pwc = wmesa_context(ctx);
WMesaFramebuffer pwfb = wmesa_framebuffer(ctx->DrawBuffer);
@@ -277,7 +277,7 @@ static void clear_color(GLcontext *ctx, const GLfloat color[4])
* Clearing of the other non-color buffers is left to the swrast.
*/
-static void clear(GLcontext *ctx, GLbitfield mask)
+static void clear(struct gl_context *ctx, GLbitfield mask)
{
#define FLIP(Y) (ctx->DrawBuffer->Height - (Y) - 1)
const GLint x = ctx->DrawBuffer->_Xmin;
@@ -447,7 +447,7 @@ static void clear(GLcontext *ctx, GLbitfield mask)
**/
/* Write a horizontal span of RGBA color pixels with a boolean mask. */
-static void write_rgba_span_front(const GLcontext *ctx,
+static void write_rgba_span_front(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const GLubyte rgba[][4],
@@ -534,7 +534,7 @@ static void write_rgba_span_front(const GLcontext *ctx,
}
/* Write a horizontal span of RGB color pixels with a boolean mask. */
-static void write_rgb_span_front(const GLcontext *ctx,
+static void write_rgb_span_front(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const GLubyte rgb[][3],
@@ -563,7 +563,7 @@ static void write_rgb_span_front(const GLcontext *ctx,
* Write a horizontal span of pixels with a boolean mask. The current color
* is used for all pixels.
*/
-static void write_mono_rgba_span_front(const GLcontext *ctx,
+static void write_mono_rgba_span_front(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const GLchan color[4],
@@ -588,7 +588,7 @@ static void write_mono_rgba_span_front(const GLcontext *ctx,
}
/* Write an array of RGBA pixels with a boolean mask. */
-static void write_rgba_pixels_front(const GLcontext *ctx,
+static void write_rgba_pixels_front(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n,
const GLint x[], const GLint y[],
@@ -611,7 +611,7 @@ static void write_rgba_pixels_front(const GLcontext *ctx,
* Write an array of pixels with a boolean mask. The current color
* is used for all pixels.
*/
-static void write_mono_rgba_pixels_front(const GLcontext *ctx,
+static void write_mono_rgba_pixels_front(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n,
const GLint x[], const GLint y[],
@@ -629,7 +629,7 @@ static void write_mono_rgba_pixels_front(const GLcontext *ctx,
}
/* Read a horizontal span of color pixels. */
-static void read_rgba_span_front(const GLcontext *ctx,
+static void read_rgba_span_front(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
GLubyte rgba[][4] )
@@ -649,7 +649,7 @@ static void read_rgba_span_front(const GLcontext *ctx,
/* Read an array of color pixels. */
-static void read_rgba_pixels_front(const GLcontext *ctx,
+static void read_rgba_pixels_front(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, const GLint x[], const GLint y[],
GLubyte rgba[][4])
@@ -678,7 +678,7 @@ LPDWORD lpdw = ((LPDWORD)((pwc)->pbPixels + (pwc)->ScanWidth * (y)) + (x)); \
/* Write a horizontal span of RGBA color pixels with a boolean mask. */
-static void write_rgba_span_32(const GLcontext *ctx,
+static void write_rgba_span_32(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const GLubyte rgba[][4],
@@ -708,7 +708,7 @@ static void write_rgba_span_32(const GLcontext *ctx,
/* Write a horizontal span of RGB color pixels with a boolean mask. */
-static void write_rgb_span_32(const GLcontext *ctx,
+static void write_rgb_span_32(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const GLubyte rgb[][3],
@@ -740,7 +740,7 @@ static void write_rgb_span_32(const GLcontext *ctx,
* Write a horizontal span of pixels with a boolean mask. The current color
* is used for all pixels.
*/
-static void write_mono_rgba_span_32(const GLcontext *ctx,
+static void write_mono_rgba_span_32(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const GLchan color[4],
@@ -766,7 +766,7 @@ static void write_mono_rgba_span_32(const GLcontext *ctx,
}
/* Write an array of RGBA pixels with a boolean mask. */
-static void write_rgba_pixels_32(const GLcontext *ctx,
+static void write_rgba_pixels_32(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, const GLint x[], const GLint y[],
const GLubyte rgba[][4],
@@ -785,7 +785,7 @@ static void write_rgba_pixels_32(const GLcontext *ctx,
* Write an array of pixels with a boolean mask. The current color
* is used for all pixels.
*/
-static void write_mono_rgba_pixels_32(const GLcontext *ctx,
+static void write_mono_rgba_pixels_32(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n,
const GLint x[], const GLint y[],
@@ -802,7 +802,7 @@ static void write_mono_rgba_pixels_32(const GLcontext *ctx,
}
/* Read a horizontal span of color pixels. */
-static void read_rgba_span_32(const GLcontext *ctx,
+static void read_rgba_span_32(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
GLubyte rgba[][4] )
@@ -826,7 +826,7 @@ static void read_rgba_span_32(const GLcontext *ctx,
/* Read an array of color pixels. */
-static void read_rgba_pixels_32(const GLcontext *ctx,
+static void read_rgba_pixels_32(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, const GLint x[], const GLint y[],
GLubyte rgba[][4])
@@ -860,7 +860,7 @@ lpb[1] = (g); \
lpb[2] = (r); }
/* Write a horizontal span of RGBA color pixels with a boolean mask. */
-static void write_rgba_span_24(const GLcontext *ctx,
+static void write_rgba_span_24(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const GLubyte rgba[][4],
@@ -894,7 +894,7 @@ static void write_rgba_span_24(const GLcontext *ctx,
/* Write a horizontal span of RGB color pixels with a boolean mask. */
-static void write_rgb_span_24(const GLcontext *ctx,
+static void write_rgb_span_24(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const GLubyte rgb[][3],
@@ -930,7 +930,7 @@ static void write_rgb_span_24(const GLcontext *ctx,
* Write a horizontal span of pixels with a boolean mask. The current color
* is used for all pixels.
*/
-static void write_mono_rgba_span_24(const GLcontext *ctx,
+static void write_mono_rgba_span_24(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const GLchan color[4],
@@ -959,7 +959,7 @@ static void write_mono_rgba_span_24(const GLcontext *ctx,
}
/* Write an array of RGBA pixels with a boolean mask. */
-static void write_rgba_pixels_24(const GLcontext *ctx,
+static void write_rgba_pixels_24(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, const GLint x[], const GLint y[],
const GLubyte rgba[][4],
@@ -978,7 +978,7 @@ static void write_rgba_pixels_24(const GLcontext *ctx,
* Write an array of pixels with a boolean mask. The current color
* is used for all pixels.
*/
-static void write_mono_rgba_pixels_24(const GLcontext *ctx,
+static void write_mono_rgba_pixels_24(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n,
const GLint x[], const GLint y[],
@@ -995,7 +995,7 @@ static void write_mono_rgba_pixels_24(const GLcontext *ctx,
}
/* Read a horizontal span of color pixels. */
-static void read_rgba_span_24(const GLcontext *ctx,
+static void read_rgba_span_24(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
GLubyte rgba[][4] )
@@ -1017,7 +1017,7 @@ static void read_rgba_span_24(const GLcontext *ctx,
/* Read an array of color pixels. */
-static void read_rgba_pixels_24(const GLcontext *ctx,
+static void read_rgba_pixels_24(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, const GLint x[], const GLint y[],
GLubyte rgba[][4])
@@ -1049,7 +1049,7 @@ LPWORD lpw = ((LPWORD)((pwc)->pbPixels + (pwc)->ScanWidth * (y)) + (x)); \
/* Write a horizontal span of RGBA color pixels with a boolean mask. */
-static void write_rgba_span_16(const GLcontext *ctx,
+static void write_rgba_span_16(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const GLubyte rgba[][4],
@@ -1079,7 +1079,7 @@ static void write_rgba_span_16(const GLcontext *ctx,
/* Write a horizontal span of RGB color pixels with a boolean mask. */
-static void write_rgb_span_16(const GLcontext *ctx,
+static void write_rgb_span_16(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const GLubyte rgb[][3],
@@ -1111,7 +1111,7 @@ static void write_rgb_span_16(const GLcontext *ctx,
* Write a horizontal span of pixels with a boolean mask. The current color
* is used for all pixels.
*/
-static void write_mono_rgba_span_16(const GLcontext *ctx,
+static void write_mono_rgba_span_16(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
const GLchan color[4],
@@ -1138,7 +1138,7 @@ static void write_mono_rgba_span_16(const GLcontext *ctx,
}
/* Write an array of RGBA pixels with a boolean mask. */
-static void write_rgba_pixels_16(const GLcontext *ctx,
+static void write_rgba_pixels_16(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, const GLint x[], const GLint y[],
const GLubyte rgba[][4],
@@ -1158,7 +1158,7 @@ static void write_rgba_pixels_16(const GLcontext *ctx,
* Write an array of pixels with a boolean mask. The current color
* is used for all pixels.
*/
-static void write_mono_rgba_pixels_16(const GLcontext *ctx,
+static void write_mono_rgba_pixels_16(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n,
const GLint x[], const GLint y[],
@@ -1176,7 +1176,7 @@ static void write_mono_rgba_pixels_16(const GLcontext *ctx,
}
/* Read a horizontal span of color pixels. */
-static void read_rgba_span_16(const GLcontext *ctx,
+static void read_rgba_span_16(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
GLubyte rgba[][4] )
@@ -1200,7 +1200,7 @@ static void read_rgba_span_16(const GLcontext *ctx,
/* Read an array of color pixels. */
-static void read_rgba_pixels_16(const GLcontext *ctx,
+static void read_rgba_pixels_16(const struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLuint n, const GLint x[], const GLint y[],
GLubyte rgba[][4])
@@ -1244,7 +1244,7 @@ wmesa_delete_renderbuffer(struct gl_renderbuffer *rb)
* has changed. Do whatever's needed to cope with that.
*/
static GLboolean
-wmesa_renderbuffer_storage(GLcontext *ctx,
+wmesa_renderbuffer_storage(struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLenum internalFormat,
GLuint width,
@@ -1320,7 +1320,7 @@ void wmesa_set_renderbuffer_funcs(struct gl_renderbuffer *rb, int pixelformat,
* Resize the front/back colorbuffers to match the latest window size.
*/
static void
-wmesa_resize_buffers(GLcontext *ctx, GLframebuffer *buffer,
+wmesa_resize_buffers(struct gl_context *ctx, struct gl_framebuffer *buffer,
GLuint width, GLuint height)
{
WMesaContext pwc = wmesa_context(ctx);
@@ -1348,7 +1348,7 @@ wmesa_resize_buffers(GLcontext *ctx, GLframebuffer *buffer,
* we get the viewport set correctly, even if the app does not call
* glViewport and relies on the defaults.
*/
-static void wmesa_viewport(GLcontext *ctx,
+static void wmesa_viewport(struct gl_context *ctx,
GLint x, GLint y,
GLsizei width, GLsizei height)
{
@@ -1371,7 +1371,7 @@ static void wmesa_viewport(GLcontext *ctx,
* Called when the driver should update it's state, based on the new_state
* flags.
*/
-static void wmesa_update_state(GLcontext *ctx, GLuint new_state)
+static void wmesa_update_state(struct gl_context *ctx, GLuint new_state)
{
_swrast_InvalidateState(ctx, new_state);
_swsetup_InvalidateState(ctx, new_state);
@@ -1403,8 +1403,8 @@ WMesaContext WMesaCreateContext(HDC hDC,
WMesaContext c;
struct dd_function_table functions;
GLint red_bits, green_bits, blue_bits, alpha_bits;
- GLcontext *ctx;
- GLvisual *visual;
+ struct gl_context *ctx;
+ struct gl_config *visual;
(void) Pal;
@@ -1511,7 +1511,7 @@ WMesaContext WMesaCreateContext(HDC hDC,
void WMesaDestroyContext( WMesaContext pwc )
{
- GLcontext *ctx = &pwc->gl_ctx;
+ struct gl_context *ctx = &pwc->gl_ctx;
WMesaFramebuffer pwfb;
GET_CURRENT_CONTEXT(cur_ctx);
@@ -1586,7 +1586,7 @@ void WMesaMakeCurrent(WMesaContext c, HDC hdc)
/* Lazy creation of framebuffers */
if (c && !pwfb && hdc) {
struct gl_renderbuffer *rb;
- GLvisual *visual = &c->gl_ctx.Visual;
+ struct gl_config *visual = &c->gl_ctx.Visual;
GLuint width, height;
get_window_size(hdc, &width, &height);
diff --git a/src/mesa/drivers/windows/gdi/wmesadef.h b/src/mesa/drivers/windows/gdi/wmesadef.h
index 1c0e2451114..a73609b007a 100644
--- a/src/mesa/drivers/windows/gdi/wmesadef.h
+++ b/src/mesa/drivers/windows/gdi/wmesadef.h
@@ -7,10 +7,10 @@
/**
- * The Windows Mesa rendering context, derived from GLcontext.
+ * The Windows Mesa rendering context, derived from struct gl_context.
*/
struct wmesa_context {
- GLcontext gl_ctx; /* The core GL/Mesa context */
+ struct gl_context gl_ctx; /* The core GL/Mesa context */
HDC hDC;
COLORREF clearColorRef;
HPEN clearPen;
diff --git a/src/mesa/drivers/windows/gldirect/dglcontext.c b/src/mesa/drivers/windows/gldirect/dglcontext.c
index a420b36ffb4..10ea0578506 100644
--- a/src/mesa/drivers/windows/gldirect/dglcontext.c
+++ b/src/mesa/drivers/windows/gldirect/dglcontext.c
@@ -42,8 +42,8 @@
#ifdef _USE_GLD3_WGL
#include "gld_driver.h"
-extern void _gld_mesa_warning(GLcontext *, char *);
-extern void _gld_mesa_fatal(GLcontext *, char *);
+extern void _gld_mesa_warning(struct gl_context *, char *);
+extern void _gld_mesa_fatal(struct gl_context *, char *);
#endif // _USE_GLD3_WGL
// TODO: Clean out old DX6-specific code from GLD 2.x CAD driver
diff --git a/src/mesa/drivers/windows/gldirect/dglcontext.h b/src/mesa/drivers/windows/gldirect/dglcontext.h
index 5c433b857ef..ce04603c191 100644
--- a/src/mesa/drivers/windows/gldirect/dglcontext.h
+++ b/src/mesa/drivers/windows/gldirect/dglcontext.h
@@ -87,9 +87,9 @@ typedef struct {
void *glPriv;
// Mesa vars:
- GLcontext *glCtx; // The core Mesa context
- GLvisual *glVis; // Describes the color buffer
- GLframebuffer *glBuffer; // Ancillary buffers
+ struct gl_context *glCtx; // The core Mesa context
+ struct gl_config *glVis; // Describes the color buffer
+ struct gl_framebuffer *glBuffer; // Ancillary buffers
GLuint ClearIndex;
GLuint CurrentIndex;
@@ -135,9 +135,9 @@ typedef struct {
//
// Mesa context vars:
//
- GLcontext *glCtx; // The core Mesa context
- GLvisual *glVis; // Describes the color buffer
- GLframebuffer *glBuffer; // Ancillary buffers
+ struct gl_context *glCtx; // The core Mesa context
+ struct gl_config *glVis; // Describes the color buffer
+ struct gl_framebuffer *glBuffer; // Ancillary buffers
GLuint ClearIndex;
GLuint CurrentIndex;
diff --git a/src/mesa/drivers/windows/gldirect/dglwgl.c b/src/mesa/drivers/windows/gldirect/dglwgl.c
index 74ecb01a5b0..c46cfe162f9 100644
--- a/src/mesa/drivers/windows/gldirect/dglwgl.c
+++ b/src/mesa/drivers/windows/gldirect/dglwgl.c
@@ -874,8 +874,8 @@ BOOL APIENTRY _GLD_WGL_EXPORT(SetPixelFormat)(
// Copied from GLD2.x. KeithH
//
static GLboolean _gldShareLists(
- GLcontext *ctx1,
- GLcontext *ctx2)
+ struct gl_context *ctx1,
+ struct gl_context *ctx2)
{
/* Sanity check context pointers */
if (ctx1 == NULL || ctx2 == NULL)
@@ -955,7 +955,7 @@ BOOL APIENTRY _GLD_WGL_EXPORT(SwapLayerBuffers)(
// either MESA glViewport() or GLD wglMakeCurrent().
BOOL dglWglResizeBuffers(
- GLcontext *ctx,
+ struct gl_context *ctx,
BOOL bDefaultDriver)
{
DGL_ctx *dgl = NULL;
diff --git a/src/mesa/drivers/windows/gldirect/dglwgl.h b/src/mesa/drivers/windows/gldirect/dglwgl.h
index aac04103335..3e7e5892ca5 100644
--- a/src/mesa/drivers/windows/gldirect/dglwgl.h
+++ b/src/mesa/drivers/windows/gldirect/dglwgl.h
@@ -118,7 +118,7 @@ BOOL APIENTRY DGL_UseFontOutlinesA(HDC a, DWORD b, DWORD c, DWORD d, FLOAT e, FL
BOOL APIENTRY DGL_UseFontOutlinesW(HDC a, DWORD b, DWORD c, DWORD d, FLOAT e, FLOAT f, int g, LPGLYPHMETRICSFLOAT h);
#endif //_USE_GLD3_WGL
-BOOL dglWglResizeBuffers(GLcontext *ctx, BOOL bDefaultDriver);
+BOOL dglWglResizeBuffers(struct gl_context *ctx, BOOL bDefaultDriver);
#ifdef __cplusplus
}
diff --git a/src/mesa/drivers/windows/gldirect/dx7/gld_driver_dx7.c b/src/mesa/drivers/windows/gldirect/dx7/gld_driver_dx7.c
index 7b202dfda70..1c43a38557d 100644
--- a/src/mesa/drivers/windows/gldirect/dx7/gld_driver_dx7.c
+++ b/src/mesa/drivers/windows/gldirect/dx7/gld_driver_dx7.c
@@ -69,7 +69,7 @@ const float _fPersp_33 = 1.6f;
//---------------------------------------------------------------------------
void _gld_mesa_warning(
- __GLcontext *gc,
+ __struct gl_context *gc,
char *str)
{
// Intercept Mesa's internal warning mechanism
@@ -79,7 +79,7 @@ void _gld_mesa_warning(
//---------------------------------------------------------------------------
void _gld_mesa_fatal(
- __GLcontext *gc,
+ __struct gl_context *gc,
char *str)
{
// Intercept Mesa's internal fatal-message mechanism
@@ -199,7 +199,7 @@ D3DBLEND _gldConvertBlendFunc(
//---------------------------------------------------------------------------
void gld_Noop_DX7(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
#ifdef _DEBUG
gldLogMessage(GLDLOG_ERROR, "gld_Noop called!\n");
@@ -209,7 +209,7 @@ void gld_Noop_DX7(
//---------------------------------------------------------------------------
void gld_Error_DX7(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
#ifdef _DEBUG
// Quite useless.
@@ -222,7 +222,7 @@ void gld_Error_DX7(
//---------------------------------------------------------------------------
static GLboolean gld_set_draw_buffer_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum mode)
{
(void) ctx;
@@ -237,8 +237,8 @@ static GLboolean gld_set_draw_buffer_DX7(
//---------------------------------------------------------------------------
static void gld_set_read_buffer_DX7(
- GLcontext *ctx,
- GLframebuffer *buffer,
+ struct gl_context *ctx,
+ struct gl_framebuffer *buffer,
GLenum mode)
{
/* separate read buffer not supported */
@@ -251,7 +251,7 @@ static void gld_set_read_buffer_DX7(
//---------------------------------------------------------------------------
void gld_Clear_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLbitfield mask,
GLboolean all,
GLint x,
@@ -342,8 +342,8 @@ void gld_Clear_DX7(
// Mesa 5: Parameter change
static void gld_buffer_size_DX7(
-// GLcontext *ctx,
- GLframebuffer *fb,
+// struct gl_context *ctx,
+ struct gl_framebuffer *fb,
GLuint *width,
GLuint *height)
{
@@ -356,14 +356,14 @@ static void gld_buffer_size_DX7(
//---------------------------------------------------------------------------
static void gld_Finish_DX7(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
}
//---------------------------------------------------------------------------
static void gld_Flush_DX7(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gld = GLD_GET_CONTEXT(ctx);
@@ -379,7 +379,7 @@ static void gld_Flush_DX7(
//---------------------------------------------------------------------------
void gld_NEW_STENCIL(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx7 *gld = GLD_GET_DX7_DRIVER(gldCtx);
@@ -404,7 +404,7 @@ void gld_NEW_STENCIL(
//---------------------------------------------------------------------------
void gld_NEW_COLOR(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx7 *gld = GLD_GET_DX7_DRIVER(gldCtx);
@@ -438,7 +438,7 @@ void gld_NEW_COLOR(
//---------------------------------------------------------------------------
void gld_NEW_DEPTH(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx7 *gld = GLD_GET_DX7_DRIVER(gldCtx);
@@ -451,7 +451,7 @@ void gld_NEW_DEPTH(
//---------------------------------------------------------------------------
void gld_NEW_POLYGON(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx7 *gld = GLD_GET_DX7_DRIVER(gldCtx);
@@ -516,7 +516,7 @@ void gld_NEW_POLYGON(
//---------------------------------------------------------------------------
void gld_NEW_FOG(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx7 *gld = GLD_GET_DX7_DRIVER(gldCtx);
@@ -571,7 +571,7 @@ void gld_NEW_FOG(
//---------------------------------------------------------------------------
void gld_NEW_LIGHT(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx7 *gld = GLD_GET_DX7_DRIVER(gldCtx);
@@ -591,7 +591,7 @@ void gld_NEW_LIGHT(
//---------------------------------------------------------------------------
void gld_NEW_MODELVIEW(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx7 *gld = GLD_GET_DX7_DRIVER(gldCtx);
@@ -639,7 +639,7 @@ void gld_NEW_MODELVIEW(
//---------------------------------------------------------------------------
void gld_NEW_PROJECTION(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx7 *gld = GLD_GET_DX7_DRIVER(gldCtx);
@@ -718,7 +718,7 @@ void gldOrthoHook_DX7(
//---------------------------------------------------------------------------
void gld_NEW_VIEWPORT(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx7 *gld = GLD_GET_DX7_DRIVER(gldCtx);
@@ -760,7 +760,7 @@ void gld_NEW_VIEWPORT(
//---------------------------------------------------------------------------
__inline BOOL _gldAnyEvalEnabled(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
struct gl_eval_attrib *eval = &ctx->Eval;
@@ -792,7 +792,7 @@ __inline BOOL _gldAnyEvalEnabled(
//---------------------------------------------------------------------------
BOOL _gldChooseInternalPipeline(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLD_driver_dx7 *gld)
{
// return TRUE; // DEBUGGING: ALWAYS USE MESA
@@ -856,7 +856,7 @@ BOOL _gldChooseInternalPipeline(
//---------------------------------------------------------------------------
void gld_update_state_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint new_state)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
@@ -991,7 +991,7 @@ void gld_update_state_DX7(
//---------------------------------------------------------------------------
void gld_Viewport_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLint x,
GLint y,
GLsizei w,
@@ -1053,12 +1053,12 @@ void gld_Viewport_DX7(
//---------------------------------------------------------------------------
-extern BOOL dglWglResizeBuffers(GLcontext *ctx, BOOL bDefaultDriver);
+extern BOOL dglWglResizeBuffers(struct gl_context *ctx, BOOL bDefaultDriver);
// Mesa 5: Parameter change
void gldResizeBuffers_DX7(
-// GLcontext *ctx)
- GLframebuffer *fb)
+// struct gl_context *ctx)
+ struct gl_framebuffer *fb)
{
GET_CURRENT_CONTEXT(ctx);
dglWglResizeBuffers(ctx, TRUE);
@@ -1069,7 +1069,7 @@ void gldResizeBuffers_DX7(
// This is only for debugging.
// To use, plug into ctx->Driver.Enable pointer below.
void gld_Enable(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum e,
GLboolean b)
{
@@ -1082,10 +1082,10 @@ void gld_Enable(
// Driver pointer setup
//---------------------------------------------------------------------------
-extern const GLubyte* _gldGetStringGeneric(GLcontext*, GLenum);
+extern const GLubyte* _gldGetStringGeneric(struct gl_context*, GLenum);
void gldSetupDriverPointers_DX7(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx7 *gld = GLD_GET_DX7_DRIVER(gldCtx);
diff --git a/src/mesa/drivers/windows/gldirect/dx7/gld_dx7.h b/src/mesa/drivers/windows/gldirect/dx7/gld_dx7.h
index b5a491e41b1..2e1d1365686 100644
--- a/src/mesa/drivers/windows/gldirect/dx7/gld_dx7.h
+++ b/src/mesa/drivers/windows/gldirect/dx7/gld_dx7.h
@@ -225,68 +225,68 @@ typedef struct {
//---------------------------------------------------------------------------
PROC gldGetProcAddress_DX7(LPCSTR a);
-void gldEnableExtensions_DX7(GLcontext *ctx);
-void gldInstallPipeline_DX7(GLcontext *ctx);
-void gldSetupDriverPointers_DX7(GLcontext *ctx);
-void gldResizeBuffers_DX7(GLframebuffer *fb);
+void gldEnableExtensions_DX7(struct gl_context *ctx);
+void gldInstallPipeline_DX7(struct gl_context *ctx);
+void gldSetupDriverPointers_DX7(struct gl_context *ctx);
+void gldResizeBuffers_DX7(struct gl_framebuffer *fb);
// Texture functions
-void gldCopyTexImage1D_DX7(GLcontext *ctx, GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border);
-void gldCopyTexImage2D_DX7(GLcontext *ctx, GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-void gldCopyTexSubImage1D_DX7(GLcontext *ctx, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width );
-void gldCopyTexSubImage2D_DX7(GLcontext *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height );
-void gldCopyTexSubImage3D_DX7(GLcontext *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height );
-
-void gld_NEW_TEXTURE_DX7(GLcontext *ctx);
-void gld_DrawPixels_DX7(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, const struct gl_pixelstore_attrib *unpack, const GLvoid *pixels);
-void gld_ReadPixels_DX7(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, const struct gl_pixelstore_attrib *unpack, GLvoid *dest);
-void gld_CopyPixels_DX7(GLcontext *ctx, GLint srcx, GLint srcy, GLsizei width, GLsizei height, GLint dstx, GLint dsty, GLenum type);
-void gld_Bitmap_DX7(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, const struct gl_pixelstore_attrib *unpack, const GLubyte *bitmap);
-const struct gl_texture_format* gld_ChooseTextureFormat_DX7(GLcontext *ctx, GLint internalFormat, GLenum srcFormat, GLenum srcType);
-void gld_TexImage2D_DX7(GLcontext *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint height, GLint border, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *tObj, struct gl_texture_image *texImage);
-void gld_TexImage1D_DX7(GLcontext *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint border, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *texObj, struct gl_texture_image *texImage );
-void gld_TexSubImage2D_DX7( GLcontext *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *texObj, struct gl_texture_image *texImage );
-void gld_TexSubImage1D_DX7(GLcontext *ctx, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *texObj, struct gl_texture_image *texImage);
-void gld_DeleteTexture_DX7(GLcontext *ctx, struct gl_texture_object *tObj);
-void gld_ResetLineStipple_DX7(GLcontext *ctx);
+void gldCopyTexImage1D_DX7(struct gl_context *ctx, GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border);
+void gldCopyTexImage2D_DX7(struct gl_context *ctx, GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+void gldCopyTexSubImage1D_DX7(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width );
+void gldCopyTexSubImage2D_DX7(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height );
+void gldCopyTexSubImage3D_DX7(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height );
+
+void gld_NEW_TEXTURE_DX7(struct gl_context *ctx);
+void gld_DrawPixels_DX7(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, const struct gl_pixelstore_attrib *unpack, const GLvoid *pixels);
+void gld_ReadPixels_DX7(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, const struct gl_pixelstore_attrib *unpack, GLvoid *dest);
+void gld_CopyPixels_DX7(struct gl_context *ctx, GLint srcx, GLint srcy, GLsizei width, GLsizei height, GLint dstx, GLint dsty, GLenum type);
+void gld_Bitmap_DX7(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height, const struct gl_pixelstore_attrib *unpack, const GLubyte *bitmap);
+const struct gl_texture_format* gld_ChooseTextureFormat_DX7(struct gl_context *ctx, GLint internalFormat, GLenum srcFormat, GLenum srcType);
+void gld_TexImage2D_DX7(struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint height, GLint border, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *tObj, struct gl_texture_image *texImage);
+void gld_TexImage1D_DX7(struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint border, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *texObj, struct gl_texture_image *texImage );
+void gld_TexSubImage2D_DX7( struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *texObj, struct gl_texture_image *texImage );
+void gld_TexSubImage1D_DX7(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *texObj, struct gl_texture_image *texImage);
+void gld_DeleteTexture_DX7(struct gl_context *ctx, struct gl_texture_object *tObj);
+void gld_ResetLineStipple_DX7(struct gl_context *ctx);
// 2D primitive functions
-void gld_Points2D_DX7(GLcontext *ctx, GLuint first, GLuint last);
+void gld_Points2D_DX7(struct gl_context *ctx, GLuint first, GLuint last);
-void gld_Line2DFlat_DX7(GLcontext *ctx, GLuint v0, GLuint v1);
-void gld_Line2DSmooth_DX7(GLcontext *ctx, GLuint v0, GLuint v1);
+void gld_Line2DFlat_DX7(struct gl_context *ctx, GLuint v0, GLuint v1);
+void gld_Line2DSmooth_DX7(struct gl_context *ctx, GLuint v0, GLuint v1);
-void gld_Triangle2DFlat_DX7(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2);
-void gld_Triangle2DSmooth_DX7(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2);
-void gld_Triangle2DFlatExtras_DX7(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2);
-void gld_Triangle2DSmoothExtras_DX7(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2);
+void gld_Triangle2DFlat_DX7(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2);
+void gld_Triangle2DSmooth_DX7(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2);
+void gld_Triangle2DFlatExtras_DX7(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2);
+void gld_Triangle2DSmoothExtras_DX7(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2);
-void gld_Quad2DFlat_DX7(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-void gld_Quad2DSmooth_DX7(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-void gld_Quad2DFlatExtras_DX7(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-void gld_Quad2DSmoothExtras_DX7(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void gld_Quad2DFlat_DX7(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void gld_Quad2DSmooth_DX7(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void gld_Quad2DFlatExtras_DX7(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void gld_Quad2DSmoothExtras_DX7(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
// 3D primitive functions
-void gld_Points3D_DX7(GLcontext *ctx, GLuint first, GLuint last);
-void gld_Line3DFlat_DX7(GLcontext *ctx, GLuint v0, GLuint v1);
-void gld_Triangle3DFlat_DX7(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2);
-void gld_Quad3DFlat_DX7(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-void gld_Line3DSmooth_DX7(GLcontext *ctx, GLuint v0, GLuint v1);
-void gld_Triangle3DSmooth_DX7(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2);
-void gld_Quad3DSmooth_DX7(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void gld_Points3D_DX7(struct gl_context *ctx, GLuint first, GLuint last);
+void gld_Line3DFlat_DX7(struct gl_context *ctx, GLuint v0, GLuint v1);
+void gld_Triangle3DFlat_DX7(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2);
+void gld_Quad3DFlat_DX7(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void gld_Line3DSmooth_DX7(struct gl_context *ctx, GLuint v0, GLuint v1);
+void gld_Triangle3DSmooth_DX7(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2);
+void gld_Quad3DSmooth_DX7(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
// Primitive functions for Two-sided-lighting Vertex Shader
-void gld_Points2DTwoside_DX7(GLcontext *ctx, GLuint first, GLuint last);
-void gld_Line2DFlatTwoside_DX7(GLcontext *ctx, GLuint v0, GLuint v1);
-void gld_Line2DSmoothTwoside_DX7(GLcontext *ctx, GLuint v0, GLuint v1);
-void gld_Triangle2DFlatTwoside_DX7(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2);
-void gld_Triangle2DSmoothTwoside_DX7(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2);
-void gld_Quad2DFlatTwoside_DX7(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-void gld_Quad2DSmoothTwoside_DX7(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void gld_Points2DTwoside_DX7(struct gl_context *ctx, GLuint first, GLuint last);
+void gld_Line2DFlatTwoside_DX7(struct gl_context *ctx, GLuint v0, GLuint v1);
+void gld_Line2DSmoothTwoside_DX7(struct gl_context *ctx, GLuint v0, GLuint v1);
+void gld_Triangle2DFlatTwoside_DX7(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2);
+void gld_Triangle2DSmoothTwoside_DX7(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2);
+void gld_Quad2DFlatTwoside_DX7(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void gld_Quad2DSmoothTwoside_DX7(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
#endif
diff --git a/src/mesa/drivers/windows/gldirect/dx7/gld_ext_dx7.c b/src/mesa/drivers/windows/gldirect/dx7/gld_ext_dx7.c
index ba60980bbe8..4ed3c3ca052 100644
--- a/src/mesa/drivers/windows/gldirect/dx7/gld_ext_dx7.c
+++ b/src/mesa/drivers/windows/gldirect/dx7/gld_ext_dx7.c
@@ -69,7 +69,7 @@
#include "extensions.h"
// For some reason this is not defined in an above header...
-extern void _mesa_enable_imaging_extensions(GLcontext *ctx);
+extern void _mesa_enable_imaging_extensions(struct gl_context *ctx);
//---------------------------------------------------------------------------
// Hack for the SGIS_multitexture extension that was removed from Mesa
@@ -281,7 +281,7 @@ PROC gldGetProcAddress_DX(
//---------------------------------------------------------------------------
void gldEnableExtensions_DX7(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLuint i;
diff --git a/src/mesa/drivers/windows/gldirect/dx7/gld_pipeline_dx7.c b/src/mesa/drivers/windows/gldirect/dx7/gld_pipeline_dx7.c
index 9ccec69b98a..b801542736c 100644
--- a/src/mesa/drivers/windows/gldirect/dx7/gld_pipeline_dx7.c
+++ b/src/mesa/drivers/windows/gldirect/dx7/gld_pipeline_dx7.c
@@ -65,7 +65,7 @@ static const struct tnl_pipeline_stage *gld_pipeline[] = {
//---------------------------------------------------------------------------
void gldInstallPipeline_DX7(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
// Remove any existing pipeline stages,
// then install GLDirect pipeline stages.
diff --git a/src/mesa/drivers/windows/gldirect/dx7/gld_primitive_dx7.c b/src/mesa/drivers/windows/gldirect/dx7/gld_primitive_dx7.c
index 0b373814fee..7fc50004de8 100644
--- a/src/mesa/drivers/windows/gldirect/dx7/gld_primitive_dx7.c
+++ b/src/mesa/drivers/windows/gldirect/dx7/gld_primitive_dx7.c
@@ -277,7 +277,7 @@
//---------------------------------------------------------------------------
__inline DWORD _gldComputeFog(
- GLcontext *ctx,
+ struct gl_context *ctx,
SWvertex *swv)
{
// Full fog calculation.
@@ -300,7 +300,7 @@ __inline DWORD _gldComputeFog(
//---------------------------------------------------------------------------
void gld_ResetLineStipple_DX7(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
// TODO: Fake stipple with a 32x32 texture.
}
@@ -310,7 +310,7 @@ void gld_ResetLineStipple_DX7(
//---------------------------------------------------------------------------
void gld_Points2D_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint first,
GLuint last)
{
@@ -358,7 +358,7 @@ void gld_Points2D_DX7(
//---------------------------------------------------------------------------
void gld_Line2DFlat_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1)
{
@@ -391,7 +391,7 @@ void gld_Line2DFlat_DX7(
//---------------------------------------------------------------------------
void gld_Line2DSmooth_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1)
{
@@ -422,7 +422,7 @@ void gld_Line2DSmooth_DX7(
//---------------------------------------------------------------------------
void gld_Triangle2DFlat_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2)
@@ -461,7 +461,7 @@ void gld_Triangle2DFlat_DX7(
//---------------------------------------------------------------------------
void gld_Triangle2DSmooth_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2)
@@ -500,7 +500,7 @@ void gld_Triangle2DSmooth_DX7(
//---------------------------------------------------------------------------
void gld_Triangle2DFlatExtras_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2)
@@ -549,7 +549,7 @@ void gld_Triangle2DFlatExtras_DX7(
//---------------------------------------------------------------------------
void gld_Triangle2DSmoothExtras_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2)
@@ -589,7 +589,7 @@ void gld_Triangle2DSmoothExtras_DX7(
//---------------------------------------------------------------------------
void gld_Quad2DFlat_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2,
@@ -653,7 +653,7 @@ void gld_Quad2DFlat_DX7(
//---------------------------------------------------------------------------
void gld_Quad2DSmooth_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2,
@@ -716,7 +716,7 @@ void gld_Quad2DSmooth_DX7(
//---------------------------------------------------------------------------
void gld_Quad2DFlatExtras_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2,
@@ -793,7 +793,7 @@ void gld_Quad2DFlatExtras_DX7(
//---------------------------------------------------------------------------
void gld_Quad2DSmoothExtras_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2,
@@ -860,7 +860,7 @@ void gld_Quad2DSmoothExtras_DX7(
//---------------------------------------------------------------------------
void gld_Points3D_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint first,
GLuint last)
{
@@ -913,7 +913,7 @@ void gld_Points3D_DX7(
//---------------------------------------------------------------------------
void gld_Line3DFlat_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1)
{
@@ -939,7 +939,7 @@ void gld_Line3DFlat_DX7(
//---------------------------------------------------------------------------
void gld_Line3DSmooth_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1)
{
@@ -966,7 +966,7 @@ void gld_Line3DSmooth_DX7(
//---------------------------------------------------------------------------
void gld_Triangle3DFlat_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2)
@@ -999,7 +999,7 @@ void gld_Triangle3DFlat_DX7(
//---------------------------------------------------------------------------
void gld_Triangle3DSmooth_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2)
@@ -1033,7 +1033,7 @@ void gld_Triangle3DSmooth_DX7(
//---------------------------------------------------------------------------
void gld_Quad3DFlat_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2,
@@ -1085,7 +1085,7 @@ void gld_Quad3DFlat_DX7(
//---------------------------------------------------------------------------
void gld_Quad3DSmooth_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2,
@@ -1139,34 +1139,34 @@ void gld_Quad3DSmooth_DX7(
/*
-void gld_Points2DTwoside_DX8(GLcontext *ctx, GLuint first, GLuint last)
+void gld_Points2DTwoside_DX8(struct gl_context *ctx, GLuint first, GLuint last)
{
// NOTE: Two-sided lighting does not apply to Points
}
//---------------------------------------------------------------------------
-void gld_Line2DFlatTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1)
+void gld_Line2DFlatTwoside_DX8(struct gl_context *ctx, GLuint v0, GLuint v1)
{
// NOTE: Two-sided lighting does not apply to Lines
}
//---------------------------------------------------------------------------
-void gld_Line2DSmoothTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1)
+void gld_Line2DSmoothTwoside_DX8(struct gl_context *ctx, GLuint v0, GLuint v1)
{
// NOTE: Two-sided lighting does not apply to Lines
}
//---------------------------------------------------------------------------
-void gld_Triangle2DFlatTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2)
+void gld_Triangle2DFlatTwoside_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2)
{
}
//---------------------------------------------------------------------------
-void gld_Triangle2DSmoothTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2)
+void gld_Triangle2DSmoothTwoside_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx8 *gld = GLD_GET_DX8_DRIVER(gldCtx);
@@ -1231,7 +1231,7 @@ void gld_Triangle2DSmoothTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuin
//---------------------------------------------------------------------------
-void gld_Quad2DFlatTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
+void gld_Quad2DFlatTwoside_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx8 *gld = GLD_GET_DX8_DRIVER(gldCtx);
@@ -1338,7 +1338,7 @@ void gld_Quad2DFlatTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2,
//---------------------------------------------------------------------------
-void gld_Quad2DSmoothTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
+void gld_Quad2DSmoothTwoside_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx8 *gld = GLD_GET_DX8_DRIVER(gldCtx);
diff --git a/src/mesa/drivers/windows/gldirect/dx7/gld_texture_dx7.c b/src/mesa/drivers/windows/gldirect/dx7/gld_texture_dx7.c
index bbe673516d6..74c3b0d344b 100644
--- a/src/mesa/drivers/windows/gldirect/dx7/gld_texture_dx7.c
+++ b/src/mesa/drivers/windows/gldirect/dx7/gld_texture_dx7.c
@@ -817,7 +817,7 @@ void _gldClearSurface(
//---------------------------------------------------------------------------
void gldCopyTexImage1D_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum target, GLint level,
GLenum internalFormat,
GLint x, GLint y,
@@ -829,7 +829,7 @@ void gldCopyTexImage1D_DX7(
//---------------------------------------------------------------------------
void gldCopyTexImage2D_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum target,
GLint level,
GLenum internalFormat,
@@ -845,7 +845,7 @@ void gldCopyTexImage2D_DX7(
//---------------------------------------------------------------------------
void gldCopyTexSubImage1D_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum target, GLint level,
GLint xoffset, GLint x, GLint y, GLsizei width )
{
@@ -855,7 +855,7 @@ void gldCopyTexSubImage1D_DX7(
//---------------------------------------------------------------------------
void gldCopyTexSubImage2D_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum target,
GLint level,
GLint xoffset,
@@ -871,7 +871,7 @@ void gldCopyTexSubImage2D_DX7(
//---------------------------------------------------------------------------
void gldCopyTexSubImage3D_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum target,
GLint level,
GLint xoffset,
@@ -903,7 +903,7 @@ typedef struct {
//---------------------------------------------------------------------------
HRESULT _gldDrawPixels(
- GLcontext *ctx,
+ struct gl_context *ctx,
BOOL bChromakey, // Alpha test for glBitmap() images
GLint x, // GL x position
GLint y, // GL y position (needs flipping)
@@ -1009,7 +1009,7 @@ HRESULT _gldDrawPixels(
//---------------------------------------------------------------------------
void gld_DrawPixels_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *unpack,
@@ -1086,7 +1086,7 @@ void gld_DrawPixels_DX7(
//---------------------------------------------------------------------------
void gld_ReadPixels_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *pack,
@@ -1241,7 +1241,7 @@ gld_ReadPixels_DX7_return:
//---------------------------------------------------------------------------
void gld_CopyPixels_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLint srcx,
GLint srcy,
GLsizei width,
@@ -1330,7 +1330,7 @@ void gld_CopyPixels_DX7(
//---------------------------------------------------------------------------
void gld_Bitmap_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLint x,
GLint y,
GLsizei width,
@@ -1475,7 +1475,7 @@ void gld_Bitmap_DX7(
//---------------------------------------------------------------------------
void _gldAllocateTexture(
- GLcontext *ctx,
+ struct gl_context *ctx,
struct gl_texture_object *tObj,
struct gl_texture_image *texImage)
{
@@ -1533,7 +1533,7 @@ void _gldAllocateTexture(
//---------------------------------------------------------------------------
const struct gl_texture_format* gld_ChooseTextureFormat_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLint internalFormat,
GLenum srcFormat,
GLenum srcType)
@@ -1622,7 +1622,7 @@ const struct gl_texture_format* gld_ChooseTextureFormat_DX7(
/*
// Safer(?), slower version.
void gld_TexImage2D_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum target,
GLint level,
GLint internalFormat,
@@ -1700,7 +1700,7 @@ void gld_TexImage2D_DX7(
// Faster, more efficient version.
// Copies subimage straight to dest texture
void gld_TexImage2D_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum target,
GLint level,
GLint internalFormat,
@@ -1792,7 +1792,7 @@ void gld_TexImage2D_DX7(
//---------------------------------------------------------------------------
-void gld_TexImage1D_DX7(GLcontext *ctx, GLenum target, GLint level,
+void gld_TexImage1D_DX7(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -1807,7 +1807,7 @@ void gld_TexImage1D_DX7(GLcontext *ctx, GLenum target, GLint level,
//---------------------------------------------------------------------------
/*
-void gld_TexSubImage2D( GLcontext *ctx, GLenum target, GLint level,
+void gld_TexSubImage2D( struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
@@ -1883,7 +1883,7 @@ void gld_TexSubImage2D( GLcontext *ctx, GLenum target, GLint level,
// Faster, more efficient version.
// Copies subimage straight to dest texture
-void gld_TexSubImage2D_DX7( GLcontext *ctx, GLenum target, GLint level,
+void gld_TexSubImage2D_DX7( struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
@@ -1963,7 +1963,7 @@ void gld_TexSubImage2D_DX7( GLcontext *ctx, GLenum target, GLint level,
//---------------------------------------------------------------------------
-void gld_TexSubImage1D_DX7( GLcontext *ctx, GLenum target, GLint level,
+void gld_TexSubImage1D_DX7( struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLsizei width,
GLenum format, GLenum type,
const GLvoid *pixels,
@@ -1977,7 +1977,7 @@ void gld_TexSubImage1D_DX7( GLcontext *ctx, GLenum target, GLint level,
//---------------------------------------------------------------------------
void gld_DeleteTexture_DX7(
- GLcontext *ctx,
+ struct gl_context *ctx,
struct gl_texture_object *tObj)
{
GLD_context *gld = (GLD_context*)(ctx->DriverCtx);
@@ -2036,7 +2036,7 @@ __inline void _gldSetAlphaOps(
//---------------------------------------------------------------------------
void gldUpdateTextureUnit(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint unit,
BOOL bPassThrough)
{
@@ -2145,7 +2145,7 @@ void gldUpdateTextureUnit(
//---------------------------------------------------------------------------
void gld_NEW_TEXTURE_DX7(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
// TODO: Support for three (ATI Radeon) or more (nVidia GeForce3) texture units
diff --git a/src/mesa/drivers/windows/gldirect/dx7/gld_vb_d3d_render_dx7.c b/src/mesa/drivers/windows/gldirect/dx7/gld_vb_d3d_render_dx7.c
index c39775cad32..0a1b9479ef7 100644
--- a/src/mesa/drivers/windows/gldirect/dx7/gld_vb_d3d_render_dx7.c
+++ b/src/mesa/drivers/windows/gldirect/dx7/gld_vb_d3d_render_dx7.c
@@ -61,7 +61,7 @@
//---------------------------------------------------------------------------
/*
__inline void _gldSetVertexShaderConstants(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLD_driver_dx8 *gld)
{
D3DXMATRIX mat, matView, matProj;
@@ -116,7 +116,7 @@ __inline void _gldSetVertexShaderConstants(
//---------------------------------------------------------------------------
static GLboolean gld_d3d_render_stage_run(
- GLcontext *ctx,
+ struct gl_context *ctx,
struct tnl_pipeline_stage *stage)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
diff --git a/src/mesa/drivers/windows/gldirect/dx7/gld_vb_mesa_render_dx7.c b/src/mesa/drivers/windows/gldirect/dx7/gld_vb_mesa_render_dx7.c
index 72e5e1308cc..a8356c0a20e 100644
--- a/src/mesa/drivers/windows/gldirect/dx7/gld_vb_mesa_render_dx7.c
+++ b/src/mesa/drivers/windows/gldirect/dx7/gld_vb_mesa_render_dx7.c
@@ -167,7 +167,7 @@ do { \
/* TODO: do this for all primitives, verts and elts:
*/
-static void clip_elt_triangles( GLcontext *ctx,
+static void clip_elt_triangles( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -255,7 +255,7 @@ static void clip_elt_triangles( GLcontext *ctx,
/* Helper functions for drivers */
/**********************************************************************/
/*
-void _tnl_RenderClippedPolygon( GLcontext *ctx, const GLuint *elts, GLuint n )
+void _tnl_RenderClippedPolygon( struct gl_context *ctx, const GLuint *elts, GLuint n )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
@@ -266,7 +266,7 @@ void _tnl_RenderClippedPolygon( GLcontext *ctx, const GLuint *elts, GLuint n )
VB->Elts = tmp;
}
-void _tnl_RenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj )
+void _tnl_RenderClippedLine( struct gl_context *ctx, GLuint ii, GLuint jj )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
tnl->Driver.Render.Line( ctx, ii, jj );
@@ -306,7 +306,7 @@ tnl_quad_func _gldSetupQuad[4] = {
//---------------------------------------------------------------------------
static GLboolean _gld_mesa_render_stage_run(
- GLcontext *ctx,
+ struct gl_context *ctx,
struct tnl_pipeline_stage *stage)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
diff --git a/src/mesa/drivers/windows/gldirect/dx7/gld_wgl_dx7.c b/src/mesa/drivers/windows/gldirect/dx7/gld_wgl_dx7.c
index fa44a952a09..0d860dbe1aa 100644
--- a/src/mesa/drivers/windows/gldirect/dx7/gld_wgl_dx7.c
+++ b/src/mesa/drivers/windows/gldirect/dx7/gld_wgl_dx7.c
@@ -57,8 +57,8 @@ extern int nContextError;
#define DDLOG_CRITICAL_OR_WARN DDLOG_CRITICAL
-extern void _gld_mesa_warning(GLcontext *, char *);
-extern void _gld_mesa_fatal(GLcontext *, char *);
+extern void _gld_mesa_warning(struct gl_context *, char *);
+extern void _gld_mesa_fatal(struct gl_context *, char *);
//---------------------------------------------------------------------------
@@ -243,7 +243,7 @@ void _gldDestroyPrimitiveBuffer(
//---------------------------------------------------------------------------
HRESULT _gldCreatePrimitiveBuffer(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLD_driver_dx7 *lpCtx,
GLD_pb_dx7 *gldVB)
{
diff --git a/src/mesa/drivers/windows/gldirect/dx8/gld_driver_dx8.c b/src/mesa/drivers/windows/gldirect/dx8/gld_driver_dx8.c
index 7eeb9db2d15..c4c2e0b5676 100644
--- a/src/mesa/drivers/windows/gldirect/dx8/gld_driver_dx8.c
+++ b/src/mesa/drivers/windows/gldirect/dx8/gld_driver_dx8.c
@@ -69,7 +69,7 @@ const float _fPersp_33 = 1.6f;
//---------------------------------------------------------------------------
void _gld_mesa_warning(
- __GLcontext *gc,
+ __struct gl_context *gc,
char *str)
{
// Intercept Mesa's internal warning mechanism
@@ -79,7 +79,7 @@ void _gld_mesa_warning(
//---------------------------------------------------------------------------
void _gld_mesa_fatal(
- __GLcontext *gc,
+ __struct gl_context *gc,
char *str)
{
// Intercept Mesa's internal fatal-message mechanism
@@ -199,7 +199,7 @@ D3DBLEND _gldConvertBlendFunc(
//---------------------------------------------------------------------------
void gld_Noop_DX8(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
#ifdef _DEBUG
gldLogMessage(GLDLOG_ERROR, "gld_Noop called!\n");
@@ -209,7 +209,7 @@ void gld_Noop_DX8(
//---------------------------------------------------------------------------
void gld_Error_DX8(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
#ifdef _DEBUG
// Quite useless.
@@ -222,7 +222,7 @@ void gld_Error_DX8(
//---------------------------------------------------------------------------
static GLboolean gld_set_draw_buffer_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum mode)
{
(void) ctx;
@@ -237,8 +237,8 @@ static GLboolean gld_set_draw_buffer_DX8(
//---------------------------------------------------------------------------
static void gld_set_read_buffer_DX8(
- GLcontext *ctx,
- GLframebuffer *buffer,
+ struct gl_context *ctx,
+ struct gl_framebuffer *buffer,
GLenum mode)
{
/* separate read buffer not supported */
@@ -251,7 +251,7 @@ static void gld_set_read_buffer_DX8(
//---------------------------------------------------------------------------
void gld_Clear_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLbitfield mask,
GLboolean all,
GLint x,
@@ -342,8 +342,8 @@ void gld_Clear_DX8(
// Mesa 5: Parameter change
static void gld_buffer_size_DX8(
-// GLcontext *ctx,
- GLframebuffer *fb,
+// struct gl_context *ctx,
+ struct gl_framebuffer *fb,
GLuint *width,
GLuint *height)
{
@@ -356,14 +356,14 @@ static void gld_buffer_size_DX8(
//---------------------------------------------------------------------------
static void gld_Finish_DX8(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
}
//---------------------------------------------------------------------------
static void gld_Flush_DX8(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gld = GLD_GET_CONTEXT(ctx);
@@ -379,7 +379,7 @@ static void gld_Flush_DX8(
//---------------------------------------------------------------------------
void gld_NEW_STENCIL(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx8 *gld = GLD_GET_DX8_DRIVER(gldCtx);
@@ -404,7 +404,7 @@ void gld_NEW_STENCIL(
//---------------------------------------------------------------------------
void gld_NEW_COLOR(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx8 *gld = GLD_GET_DX8_DRIVER(gldCtx);
@@ -436,7 +436,7 @@ void gld_NEW_COLOR(
//---------------------------------------------------------------------------
void gld_NEW_DEPTH(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx8 *gld = GLD_GET_DX8_DRIVER(gldCtx);
@@ -449,7 +449,7 @@ void gld_NEW_DEPTH(
//---------------------------------------------------------------------------
void gld_NEW_POLYGON(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx8 *gld = GLD_GET_DX8_DRIVER(gldCtx);
@@ -514,7 +514,7 @@ void gld_NEW_POLYGON(
//---------------------------------------------------------------------------
void gld_NEW_FOG(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx8 *gld = GLD_GET_DX8_DRIVER(gldCtx);
@@ -569,7 +569,7 @@ void gld_NEW_FOG(
//---------------------------------------------------------------------------
void gld_NEW_LIGHT(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx8 *gld = GLD_GET_DX8_DRIVER(gldCtx);
@@ -589,7 +589,7 @@ void gld_NEW_LIGHT(
//---------------------------------------------------------------------------
void gld_NEW_MODELVIEW(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx8 *gld = GLD_GET_DX8_DRIVER(gldCtx);
@@ -621,7 +621,7 @@ void gld_NEW_MODELVIEW(
//---------------------------------------------------------------------------
void gld_NEW_PROJECTION(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx8 *gld = GLD_GET_DX8_DRIVER(gldCtx);
@@ -700,7 +700,7 @@ void gldOrthoHook_DX8(
//---------------------------------------------------------------------------
void gld_NEW_VIEWPORT(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx8 *gld = GLD_GET_DX8_DRIVER(gldCtx);
@@ -742,7 +742,7 @@ void gld_NEW_VIEWPORT(
//---------------------------------------------------------------------------
__inline BOOL _gldAnyEvalEnabled(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
struct gl_eval_attrib *eval = &ctx->Eval;
@@ -774,7 +774,7 @@ __inline BOOL _gldAnyEvalEnabled(
//---------------------------------------------------------------------------
BOOL _gldChooseInternalPipeline(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLD_driver_dx8 *gld)
{
// return TRUE; // DEBUGGING: ALWAYS USE MESA
@@ -838,7 +838,7 @@ BOOL _gldChooseInternalPipeline(
//---------------------------------------------------------------------------
void gld_update_state_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint new_state)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
@@ -971,7 +971,7 @@ void gld_update_state_DX8(
//---------------------------------------------------------------------------
void gld_Viewport_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLint x,
GLint y,
GLsizei w,
@@ -1033,12 +1033,12 @@ void gld_Viewport_DX8(
//---------------------------------------------------------------------------
-extern BOOL dglWglResizeBuffers(GLcontext *ctx, BOOL bDefaultDriver);
+extern BOOL dglWglResizeBuffers(struct gl_context *ctx, BOOL bDefaultDriver);
// Mesa 5: Parameter change
void gldResizeBuffers_DX8(
-// GLcontext *ctx)
- GLframebuffer *fb)
+// struct gl_context *ctx)
+ struct gl_framebuffer *fb)
{
GET_CURRENT_CONTEXT(ctx);
dglWglResizeBuffers(ctx, TRUE);
@@ -1049,7 +1049,7 @@ void gldResizeBuffers_DX8(
// This is only for debugging.
// To use, plug into ctx->Driver.Enable pointer below.
void gld_Enable(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum e,
GLboolean b)
{
@@ -1062,10 +1062,10 @@ void gld_Enable(
// Driver pointer setup
//---------------------------------------------------------------------------
-extern const GLubyte* _gldGetStringGeneric(GLcontext*, GLenum);
+extern const GLubyte* _gldGetStringGeneric(struct gl_context*, GLenum);
void gldSetupDriverPointers_DX8(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx8 *gld = GLD_GET_DX8_DRIVER(gldCtx);
diff --git a/src/mesa/drivers/windows/gldirect/dx8/gld_dx8.h b/src/mesa/drivers/windows/gldirect/dx8/gld_dx8.h
index 7efec7cae80..b207ecc788f 100644
--- a/src/mesa/drivers/windows/gldirect/dx8/gld_dx8.h
+++ b/src/mesa/drivers/windows/gldirect/dx8/gld_dx8.h
@@ -256,69 +256,69 @@ typedef struct {
//---------------------------------------------------------------------------
PROC gldGetProcAddress_DX8(LPCSTR a);
-void gldEnableExtensions_DX8(GLcontext *ctx);
-void gldInstallPipeline_DX8(GLcontext *ctx);
-void gldSetupDriverPointers_DX8(GLcontext *ctx);
-//void gldResizeBuffers_DX8(GLcontext *ctx);
-void gldResizeBuffers_DX8(GLframebuffer *fb);
+void gldEnableExtensions_DX8(struct gl_context *ctx);
+void gldInstallPipeline_DX8(struct gl_context *ctx);
+void gldSetupDriverPointers_DX8(struct gl_context *ctx);
+//void gldResizeBuffers_DX8(struct gl_context *ctx);
+void gldResizeBuffers_DX8(struct gl_framebuffer *fb);
// Texture functions
-void gldCopyTexImage1D_DX8(GLcontext *ctx, GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border);
-void gldCopyTexImage2D_DX8(GLcontext *ctx, GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-void gldCopyTexSubImage1D_DX8(GLcontext *ctx, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width );
-void gldCopyTexSubImage2D_DX8(GLcontext *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height );
-void gldCopyTexSubImage3D_DX8(GLcontext *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height );
-
-void gld_NEW_TEXTURE_DX8(GLcontext *ctx);
-void gld_DrawPixels_DX8(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, const struct gl_pixelstore_attrib *unpack, const GLvoid *pixels);
-void gld_ReadPixels_DX8(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, const struct gl_pixelstore_attrib *unpack, GLvoid *dest);
-void gld_CopyPixels_DX8(GLcontext *ctx, GLint srcx, GLint srcy, GLsizei width, GLsizei height, GLint dstx, GLint dsty, GLenum type);
-void gld_Bitmap_DX8(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, const struct gl_pixelstore_attrib *unpack, const GLubyte *bitmap);
-const struct gl_texture_format* gld_ChooseTextureFormat_DX8(GLcontext *ctx, GLint internalFormat, GLenum srcFormat, GLenum srcType);
-void gld_TexImage2D_DX8(GLcontext *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint height, GLint border, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *tObj, struct gl_texture_image *texImage);
-void gld_TexImage1D_DX8(GLcontext *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint border, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *texObj, struct gl_texture_image *texImage );
-void gld_TexSubImage2D_DX8( GLcontext *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *texObj, struct gl_texture_image *texImage );
-void gld_TexSubImage1D_DX8(GLcontext *ctx, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *texObj, struct gl_texture_image *texImage);
-void gld_DeleteTexture_DX8(GLcontext *ctx, struct gl_texture_object *tObj);
-void gld_ResetLineStipple_DX8(GLcontext *ctx);
+void gldCopyTexImage1D_DX8(struct gl_context *ctx, GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border);
+void gldCopyTexImage2D_DX8(struct gl_context *ctx, GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+void gldCopyTexSubImage1D_DX8(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width );
+void gldCopyTexSubImage2D_DX8(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height );
+void gldCopyTexSubImage3D_DX8(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height );
+
+void gld_NEW_TEXTURE_DX8(struct gl_context *ctx);
+void gld_DrawPixels_DX8(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, const struct gl_pixelstore_attrib *unpack, const GLvoid *pixels);
+void gld_ReadPixels_DX8(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, const struct gl_pixelstore_attrib *unpack, GLvoid *dest);
+void gld_CopyPixels_DX8(struct gl_context *ctx, GLint srcx, GLint srcy, GLsizei width, GLsizei height, GLint dstx, GLint dsty, GLenum type);
+void gld_Bitmap_DX8(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height, const struct gl_pixelstore_attrib *unpack, const GLubyte *bitmap);
+const struct gl_texture_format* gld_ChooseTextureFormat_DX8(struct gl_context *ctx, GLint internalFormat, GLenum srcFormat, GLenum srcType);
+void gld_TexImage2D_DX8(struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint height, GLint border, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *tObj, struct gl_texture_image *texImage);
+void gld_TexImage1D_DX8(struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint border, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *texObj, struct gl_texture_image *texImage );
+void gld_TexSubImage2D_DX8( struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *texObj, struct gl_texture_image *texImage );
+void gld_TexSubImage1D_DX8(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *texObj, struct gl_texture_image *texImage);
+void gld_DeleteTexture_DX8(struct gl_context *ctx, struct gl_texture_object *tObj);
+void gld_ResetLineStipple_DX8(struct gl_context *ctx);
// 2D primitive functions
-void gld_Points2D_DX8(GLcontext *ctx, GLuint first, GLuint last);
+void gld_Points2D_DX8(struct gl_context *ctx, GLuint first, GLuint last);
-void gld_Line2DFlat_DX8(GLcontext *ctx, GLuint v0, GLuint v1);
-void gld_Line2DSmooth_DX8(GLcontext *ctx, GLuint v0, GLuint v1);
+void gld_Line2DFlat_DX8(struct gl_context *ctx, GLuint v0, GLuint v1);
+void gld_Line2DSmooth_DX8(struct gl_context *ctx, GLuint v0, GLuint v1);
-void gld_Triangle2DFlat_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2);
-void gld_Triangle2DSmooth_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2);
-void gld_Triangle2DFlatExtras_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2);
-void gld_Triangle2DSmoothExtras_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2);
+void gld_Triangle2DFlat_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2);
+void gld_Triangle2DSmooth_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2);
+void gld_Triangle2DFlatExtras_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2);
+void gld_Triangle2DSmoothExtras_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2);
-void gld_Quad2DFlat_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-void gld_Quad2DSmooth_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-void gld_Quad2DFlatExtras_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-void gld_Quad2DSmoothExtras_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void gld_Quad2DFlat_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void gld_Quad2DSmooth_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void gld_Quad2DFlatExtras_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void gld_Quad2DSmoothExtras_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
// 3D primitive functions
-void gld_Points3D_DX8(GLcontext *ctx, GLuint first, GLuint last);
-void gld_Line3DFlat_DX8(GLcontext *ctx, GLuint v0, GLuint v1);
-void gld_Triangle3DFlat_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2);
-void gld_Quad3DFlat_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-void gld_Line3DSmooth_DX8(GLcontext *ctx, GLuint v0, GLuint v1);
-void gld_Triangle3DSmooth_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2);
-void gld_Quad3DSmooth_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void gld_Points3D_DX8(struct gl_context *ctx, GLuint first, GLuint last);
+void gld_Line3DFlat_DX8(struct gl_context *ctx, GLuint v0, GLuint v1);
+void gld_Triangle3DFlat_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2);
+void gld_Quad3DFlat_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void gld_Line3DSmooth_DX8(struct gl_context *ctx, GLuint v0, GLuint v1);
+void gld_Triangle3DSmooth_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2);
+void gld_Quad3DSmooth_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
// Primitive functions for Two-sided-lighting Vertex Shader
-void gld_Points2DTwoside_DX8(GLcontext *ctx, GLuint first, GLuint last);
-void gld_Line2DFlatTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1);
-void gld_Line2DSmoothTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1);
-void gld_Triangle2DFlatTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2);
-void gld_Triangle2DSmoothTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2);
-void gld_Quad2DFlatTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-void gld_Quad2DSmoothTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void gld_Points2DTwoside_DX8(struct gl_context *ctx, GLuint first, GLuint last);
+void gld_Line2DFlatTwoside_DX8(struct gl_context *ctx, GLuint v0, GLuint v1);
+void gld_Line2DSmoothTwoside_DX8(struct gl_context *ctx, GLuint v0, GLuint v1);
+void gld_Triangle2DFlatTwoside_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2);
+void gld_Triangle2DSmoothTwoside_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2);
+void gld_Quad2DFlatTwoside_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void gld_Quad2DSmoothTwoside_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
#endif
diff --git a/src/mesa/drivers/windows/gldirect/dx8/gld_ext_dx8.c b/src/mesa/drivers/windows/gldirect/dx8/gld_ext_dx8.c
index b51bba9b3ca..92189458054 100644
--- a/src/mesa/drivers/windows/gldirect/dx8/gld_ext_dx8.c
+++ b/src/mesa/drivers/windows/gldirect/dx8/gld_ext_dx8.c
@@ -69,7 +69,7 @@
#include "extensions.h"
// For some reason this is not defined in an above header...
-extern void _mesa_enable_imaging_extensions(GLcontext *ctx);
+extern void _mesa_enable_imaging_extensions(struct gl_context *ctx);
//---------------------------------------------------------------------------
// Hack for the SGIS_multitexture extension that was removed from Mesa
@@ -281,7 +281,7 @@ PROC gldGetProcAddress_DX(
//---------------------------------------------------------------------------
void gldEnableExtensions_DX8(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLuint i;
diff --git a/src/mesa/drivers/windows/gldirect/dx8/gld_pipeline_dx8.c b/src/mesa/drivers/windows/gldirect/dx8/gld_pipeline_dx8.c
index 2baea57443c..9113d703454 100644
--- a/src/mesa/drivers/windows/gldirect/dx8/gld_pipeline_dx8.c
+++ b/src/mesa/drivers/windows/gldirect/dx8/gld_pipeline_dx8.c
@@ -65,7 +65,7 @@ static const struct tnl_pipeline_stage *gld_pipeline[] = {
//---------------------------------------------------------------------------
void gldInstallPipeline_DX8(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
// Remove any existing pipeline stages,
// then install GLDirect pipeline stages.
diff --git a/src/mesa/drivers/windows/gldirect/dx8/gld_primitive_dx8.c b/src/mesa/drivers/windows/gldirect/dx8/gld_primitive_dx8.c
index 990922580aa..5b9dac09c6d 100644
--- a/src/mesa/drivers/windows/gldirect/dx8/gld_primitive_dx8.c
+++ b/src/mesa/drivers/windows/gldirect/dx8/gld_primitive_dx8.c
@@ -277,7 +277,7 @@
//---------------------------------------------------------------------------
__inline DWORD _gldComputeFog(
- GLcontext *ctx,
+ struct gl_context *ctx,
SWvertex *swv)
{
// Full fog calculation.
@@ -300,7 +300,7 @@ __inline DWORD _gldComputeFog(
//---------------------------------------------------------------------------
void gld_ResetLineStipple_DX8(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
// TODO: Fake stipple with a 32x32 texture.
}
@@ -310,7 +310,7 @@ void gld_ResetLineStipple_DX8(
//---------------------------------------------------------------------------
void gld_Points2D_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint first,
GLuint last)
{
@@ -357,7 +357,7 @@ void gld_Points2D_DX8(
//---------------------------------------------------------------------------
void gld_Line2DFlat_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1)
{
@@ -390,7 +390,7 @@ void gld_Line2DFlat_DX8(
//---------------------------------------------------------------------------
void gld_Line2DSmooth_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1)
{
@@ -421,7 +421,7 @@ void gld_Line2DSmooth_DX8(
//---------------------------------------------------------------------------
void gld_Triangle2DFlat_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2)
@@ -460,7 +460,7 @@ void gld_Triangle2DFlat_DX8(
//---------------------------------------------------------------------------
void gld_Triangle2DSmooth_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2)
@@ -499,7 +499,7 @@ void gld_Triangle2DSmooth_DX8(
//---------------------------------------------------------------------------
void gld_Triangle2DFlatExtras_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2)
@@ -548,7 +548,7 @@ void gld_Triangle2DFlatExtras_DX8(
//---------------------------------------------------------------------------
void gld_Triangle2DSmoothExtras_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2)
@@ -588,7 +588,7 @@ void gld_Triangle2DSmoothExtras_DX8(
//---------------------------------------------------------------------------
void gld_Quad2DFlat_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2,
@@ -652,7 +652,7 @@ void gld_Quad2DFlat_DX8(
//---------------------------------------------------------------------------
void gld_Quad2DSmooth_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2,
@@ -715,7 +715,7 @@ void gld_Quad2DSmooth_DX8(
//---------------------------------------------------------------------------
void gld_Quad2DFlatExtras_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2,
@@ -792,7 +792,7 @@ void gld_Quad2DFlatExtras_DX8(
//---------------------------------------------------------------------------
void gld_Quad2DSmoothExtras_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2,
@@ -859,7 +859,7 @@ void gld_Quad2DSmoothExtras_DX8(
//---------------------------------------------------------------------------
void gld_Points3D_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint first,
GLuint last)
{
@@ -911,7 +911,7 @@ void gld_Points3D_DX8(
//---------------------------------------------------------------------------
void gld_Line3DFlat_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1)
{
@@ -937,7 +937,7 @@ void gld_Line3DFlat_DX8(
//---------------------------------------------------------------------------
void gld_Line3DSmooth_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1)
{
@@ -964,7 +964,7 @@ void gld_Line3DSmooth_DX8(
//---------------------------------------------------------------------------
void gld_Triangle3DFlat_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2)
@@ -997,7 +997,7 @@ void gld_Triangle3DFlat_DX8(
//---------------------------------------------------------------------------
void gld_Triangle3DSmooth_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2)
@@ -1031,7 +1031,7 @@ void gld_Triangle3DSmooth_DX8(
//---------------------------------------------------------------------------
void gld_Quad3DFlat_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2,
@@ -1083,7 +1083,7 @@ void gld_Quad3DFlat_DX8(
//---------------------------------------------------------------------------
void gld_Quad3DSmooth_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2,
@@ -1137,34 +1137,34 @@ void gld_Quad3DSmooth_DX8(
/*
-void gld_Points2DTwoside_DX8(GLcontext *ctx, GLuint first, GLuint last)
+void gld_Points2DTwoside_DX8(struct gl_context *ctx, GLuint first, GLuint last)
{
// NOTE: Two-sided lighting does not apply to Points
}
//---------------------------------------------------------------------------
-void gld_Line2DFlatTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1)
+void gld_Line2DFlatTwoside_DX8(struct gl_context *ctx, GLuint v0, GLuint v1)
{
// NOTE: Two-sided lighting does not apply to Lines
}
//---------------------------------------------------------------------------
-void gld_Line2DSmoothTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1)
+void gld_Line2DSmoothTwoside_DX8(struct gl_context *ctx, GLuint v0, GLuint v1)
{
// NOTE: Two-sided lighting does not apply to Lines
}
//---------------------------------------------------------------------------
-void gld_Triangle2DFlatTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2)
+void gld_Triangle2DFlatTwoside_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2)
{
}
//---------------------------------------------------------------------------
-void gld_Triangle2DSmoothTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2)
+void gld_Triangle2DSmoothTwoside_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx8 *gld = GLD_GET_DX8_DRIVER(gldCtx);
@@ -1229,7 +1229,7 @@ void gld_Triangle2DSmoothTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuin
//---------------------------------------------------------------------------
-void gld_Quad2DFlatTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
+void gld_Quad2DFlatTwoside_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx8 *gld = GLD_GET_DX8_DRIVER(gldCtx);
@@ -1336,7 +1336,7 @@ void gld_Quad2DFlatTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2,
//---------------------------------------------------------------------------
-void gld_Quad2DSmoothTwoside_DX8(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
+void gld_Quad2DSmoothTwoside_DX8(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx8 *gld = GLD_GET_DX8_DRIVER(gldCtx);
diff --git a/src/mesa/drivers/windows/gldirect/dx8/gld_texture_dx8.c b/src/mesa/drivers/windows/gldirect/dx8/gld_texture_dx8.c
index f24b3cfb74d..6ea670a88a0 100644
--- a/src/mesa/drivers/windows/gldirect/dx8/gld_texture_dx8.c
+++ b/src/mesa/drivers/windows/gldirect/dx8/gld_texture_dx8.c
@@ -760,7 +760,7 @@ const struct gl_texture_format* _gldMesaFormatForD3DFormat(
//---------------------------------------------------------------------------
void gldCopyTexImage1D_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum target, GLint level,
GLenum internalFormat,
GLint x, GLint y,
@@ -772,7 +772,7 @@ void gldCopyTexImage1D_DX8(
//---------------------------------------------------------------------------
void gldCopyTexImage2D_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum target,
GLint level,
GLenum internalFormat,
@@ -788,7 +788,7 @@ void gldCopyTexImage2D_DX8(
//---------------------------------------------------------------------------
void gldCopyTexSubImage1D_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum target, GLint level,
GLint xoffset, GLint x, GLint y, GLsizei width )
{
@@ -798,7 +798,7 @@ void gldCopyTexSubImage1D_DX8(
//---------------------------------------------------------------------------
void gldCopyTexSubImage2D_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum target,
GLint level,
GLint xoffset,
@@ -814,7 +814,7 @@ void gldCopyTexSubImage2D_DX8(
//---------------------------------------------------------------------------
void gldCopyTexSubImage3D_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum target,
GLint level,
GLint xoffset,
@@ -846,7 +846,7 @@ typedef struct {
//---------------------------------------------------------------------------
HRESULT _gldDrawPixels(
- GLcontext *ctx,
+ struct gl_context *ctx,
BOOL bChromakey, // Alpha test for glBitmap() images
GLint x, // GL x position
GLint y, // GL y position (needs flipping)
@@ -982,7 +982,7 @@ HRESULT _gldDrawPixels(
//---------------------------------------------------------------------------
void gld_DrawPixels_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *unpack,
@@ -1045,7 +1045,7 @@ void gld_DrawPixels_DX8(
//---------------------------------------------------------------------------
void gld_ReadPixels_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *pack,
@@ -1198,7 +1198,7 @@ gld_ReadPixels_DX8_return:
//---------------------------------------------------------------------------
void gld_CopyPixels_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLint srcx,
GLint srcy,
GLsizei width,
@@ -1284,7 +1284,7 @@ void gld_CopyPixels_DX8(
//---------------------------------------------------------------------------
void gld_Bitmap_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLint x,
GLint y,
GLsizei width,
@@ -1389,7 +1389,7 @@ void gld_Bitmap_DX8(
//---------------------------------------------------------------------------
void _gldAllocateTexture(
- GLcontext *ctx,
+ struct gl_context *ctx,
struct gl_texture_object *tObj,
struct gl_texture_image *texImage)
{
@@ -1435,7 +1435,7 @@ void _gldAllocateTexture(
//---------------------------------------------------------------------------
const struct gl_texture_format* gld_ChooseTextureFormat_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLint internalFormat,
GLenum srcFormat,
GLenum srcType)
@@ -1524,7 +1524,7 @@ const struct gl_texture_format* gld_ChooseTextureFormat_DX8(
/*
// Safer(?), slower version.
void gld_TexImage2D_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum target,
GLint level,
GLint internalFormat,
@@ -1602,7 +1602,7 @@ void gld_TexImage2D_DX8(
// Faster, more efficient version.
// Copies subimage straight to dest texture
void gld_TexImage2D_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum target,
GLint level,
GLint internalFormat,
@@ -1676,7 +1676,7 @@ void gld_TexImage2D_DX8(
//---------------------------------------------------------------------------
-void gld_TexImage1D_DX8(GLcontext *ctx, GLenum target, GLint level,
+void gld_TexImage1D_DX8(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -1691,7 +1691,7 @@ void gld_TexImage1D_DX8(GLcontext *ctx, GLenum target, GLint level,
//---------------------------------------------------------------------------
/*
-void gld_TexSubImage2D( GLcontext *ctx, GLenum target, GLint level,
+void gld_TexSubImage2D( struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
@@ -1767,7 +1767,7 @@ void gld_TexSubImage2D( GLcontext *ctx, GLenum target, GLint level,
// Faster, more efficient version.
// Copies subimage straight to dest texture
-void gld_TexSubImage2D_DX8( GLcontext *ctx, GLenum target, GLint level,
+void gld_TexSubImage2D_DX8( struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
@@ -1828,7 +1828,7 @@ void gld_TexSubImage2D_DX8( GLcontext *ctx, GLenum target, GLint level,
//---------------------------------------------------------------------------
-void gld_TexSubImage1D_DX8( GLcontext *ctx, GLenum target, GLint level,
+void gld_TexSubImage1D_DX8( struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLsizei width,
GLenum format, GLenum type,
const GLvoid *pixels,
@@ -1842,7 +1842,7 @@ void gld_TexSubImage1D_DX8( GLcontext *ctx, GLenum target, GLint level,
//---------------------------------------------------------------------------
void gld_DeleteTexture_DX8(
- GLcontext *ctx,
+ struct gl_context *ctx,
struct gl_texture_object *tObj)
{
GLD_context *gld = (GLD_context*)(ctx->DriverCtx);
@@ -1894,7 +1894,7 @@ __inline void _gldSetAlphaOps(
//---------------------------------------------------------------------------
void gldUpdateTextureUnit(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint unit,
BOOL bPassThrough)
{
@@ -1994,7 +1994,7 @@ void gldUpdateTextureUnit(
//---------------------------------------------------------------------------
void gld_NEW_TEXTURE_DX8(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
// TODO: Support for three (ATI Radeon) or more (nVidia GeForce3) texture units
diff --git a/src/mesa/drivers/windows/gldirect/dx8/gld_vb_d3d_render_dx8.c b/src/mesa/drivers/windows/gldirect/dx8/gld_vb_d3d_render_dx8.c
index 265c81fb4a4..983df9bc097 100644
--- a/src/mesa/drivers/windows/gldirect/dx8/gld_vb_d3d_render_dx8.c
+++ b/src/mesa/drivers/windows/gldirect/dx8/gld_vb_d3d_render_dx8.c
@@ -61,7 +61,7 @@
//---------------------------------------------------------------------------
__inline void _gldSetVertexShaderConstants(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLD_driver_dx8 *gld)
{
D3DXMATRIX mat, matView, matProj;
@@ -116,7 +116,7 @@ __inline void _gldSetVertexShaderConstants(
//---------------------------------------------------------------------------
static GLboolean gld_d3d_render_stage_run(
- GLcontext *ctx,
+ struct gl_context *ctx,
struct tnl_pipeline_stage *stage)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
diff --git a/src/mesa/drivers/windows/gldirect/dx8/gld_vb_mesa_render_dx8.c b/src/mesa/drivers/windows/gldirect/dx8/gld_vb_mesa_render_dx8.c
index 9ab562010ce..19ffc72c814 100644
--- a/src/mesa/drivers/windows/gldirect/dx8/gld_vb_mesa_render_dx8.c
+++ b/src/mesa/drivers/windows/gldirect/dx8/gld_vb_mesa_render_dx8.c
@@ -167,7 +167,7 @@ do { \
/* TODO: do this for all primitives, verts and elts:
*/
-static void clip_elt_triangles( GLcontext *ctx,
+static void clip_elt_triangles( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -255,7 +255,7 @@ static void clip_elt_triangles( GLcontext *ctx,
/* Helper functions for drivers */
/**********************************************************************/
/*
-void _tnl_RenderClippedPolygon( GLcontext *ctx, const GLuint *elts, GLuint n )
+void _tnl_RenderClippedPolygon( struct gl_context *ctx, const GLuint *elts, GLuint n )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
@@ -266,7 +266,7 @@ void _tnl_RenderClippedPolygon( GLcontext *ctx, const GLuint *elts, GLuint n )
VB->Elts = tmp;
}
-void _tnl_RenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj )
+void _tnl_RenderClippedLine( struct gl_context *ctx, GLuint ii, GLuint jj )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
tnl->Driver.Render.Line( ctx, ii, jj );
@@ -306,7 +306,7 @@ tnl_quad_func _gldSetupQuad[4] = {
//---------------------------------------------------------------------------
static GLboolean _gld_mesa_render_stage_run(
- GLcontext *ctx,
+ struct gl_context *ctx,
struct tnl_pipeline_stage *stage)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
diff --git a/src/mesa/drivers/windows/gldirect/dx8/gld_wgl_dx8.c b/src/mesa/drivers/windows/gldirect/dx8/gld_wgl_dx8.c
index 011d810e975..73c76c7d4bf 100644
--- a/src/mesa/drivers/windows/gldirect/dx8/gld_wgl_dx8.c
+++ b/src/mesa/drivers/windows/gldirect/dx8/gld_wgl_dx8.c
@@ -54,8 +54,8 @@ extern int nContextError;
#define DDLOG_CRITICAL_OR_WARN DDLOG_CRITICAL
-extern void _gld_mesa_warning(GLcontext *, char *);
-extern void _gld_mesa_fatal(GLcontext *, char *);
+extern void _gld_mesa_warning(struct gl_context *, char *);
+extern void _gld_mesa_fatal(struct gl_context *, char *);
//---------------------------------------------------------------------------
@@ -233,7 +233,7 @@ void _gldDestroyPrimitiveBuffer(
//---------------------------------------------------------------------------
HRESULT _gldCreatePrimitiveBuffer(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLD_driver_dx8 *lpCtx,
GLD_pb_dx8 *gldVB)
{
diff --git a/src/mesa/drivers/windows/gldirect/dx9/gld_driver_dx9.c b/src/mesa/drivers/windows/gldirect/dx9/gld_driver_dx9.c
index 0558462dea0..aab70852016 100644
--- a/src/mesa/drivers/windows/gldirect/dx9/gld_driver_dx9.c
+++ b/src/mesa/drivers/windows/gldirect/dx9/gld_driver_dx9.c
@@ -69,7 +69,7 @@ const float _fPersp_33 = 1.6f;
//---------------------------------------------------------------------------
void _gld_mesa_warning(
- __GLcontext *gc,
+ __struct gl_context *gc,
char *str)
{
// Intercept Mesa's internal warning mechanism
@@ -79,7 +79,7 @@ void _gld_mesa_warning(
//---------------------------------------------------------------------------
void _gld_mesa_fatal(
- __GLcontext *gc,
+ __struct gl_context *gc,
char *str)
{
// Intercept Mesa's internal fatal-message mechanism
@@ -199,7 +199,7 @@ D3DBLEND _gldConvertBlendFunc(
//---------------------------------------------------------------------------
void gld_Noop_DX9(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
#ifdef _DEBUG
gldLogMessage(GLDLOG_ERROR, "gld_Noop called!\n");
@@ -209,7 +209,7 @@ void gld_Noop_DX9(
//---------------------------------------------------------------------------
void gld_Error_DX9(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
#ifdef _DEBUG
// Quite useless.
@@ -222,7 +222,7 @@ void gld_Error_DX9(
//---------------------------------------------------------------------------
static GLboolean gld_set_draw_buffer_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum mode)
{
(void) ctx;
@@ -237,8 +237,8 @@ static GLboolean gld_set_draw_buffer_DX9(
//---------------------------------------------------------------------------
static void gld_set_read_buffer_DX9(
- GLcontext *ctx,
- GLframebuffer *buffer,
+ struct gl_context *ctx,
+ struct gl_framebuffer *buffer,
GLenum mode)
{
/* separate read buffer not supported */
@@ -251,7 +251,7 @@ static void gld_set_read_buffer_DX9(
//---------------------------------------------------------------------------
void gld_Clear_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLbitfield mask,
GLboolean all,
GLint x,
@@ -340,8 +340,8 @@ void gld_Clear_DX9(
// Mesa 5: Parameter change
static void gld_buffer_size_DX9(
-// GLcontext *ctx,
- GLframebuffer *fb,
+// struct gl_context *ctx,
+ struct gl_framebuffer *fb,
GLuint *width,
GLuint *height)
{
@@ -354,14 +354,14 @@ static void gld_buffer_size_DX9(
//---------------------------------------------------------------------------
static void gld_Finish_DX9(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
}
//---------------------------------------------------------------------------
static void gld_Flush_DX9(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gld = GLD_GET_CONTEXT(ctx);
@@ -377,7 +377,7 @@ static void gld_Flush_DX9(
//---------------------------------------------------------------------------
void gld_NEW_STENCIL(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx9 *gld = GLD_GET_DX9_DRIVER(gldCtx);
@@ -402,7 +402,7 @@ void gld_NEW_STENCIL(
//---------------------------------------------------------------------------
void gld_NEW_COLOR(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx9 *gld = GLD_GET_DX9_DRIVER(gldCtx);
@@ -434,7 +434,7 @@ void gld_NEW_COLOR(
//---------------------------------------------------------------------------
void gld_NEW_DEPTH(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx9 *gld = GLD_GET_DX9_DRIVER(gldCtx);
@@ -447,7 +447,7 @@ void gld_NEW_DEPTH(
//---------------------------------------------------------------------------
void gld_NEW_POLYGON(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx9 *gld = GLD_GET_DX9_DRIVER(gldCtx);
@@ -513,7 +513,7 @@ void gld_NEW_POLYGON(
//---------------------------------------------------------------------------
void gld_NEW_FOG(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx9 *gld = GLD_GET_DX9_DRIVER(gldCtx);
@@ -568,7 +568,7 @@ void gld_NEW_FOG(
//---------------------------------------------------------------------------
void gld_NEW_LIGHT(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx9 *gld = GLD_GET_DX9_DRIVER(gldCtx);
@@ -588,7 +588,7 @@ void gld_NEW_LIGHT(
//---------------------------------------------------------------------------
void gld_NEW_MODELVIEW(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx9 *gld = GLD_GET_DX9_DRIVER(gldCtx);
@@ -620,7 +620,7 @@ void gld_NEW_MODELVIEW(
//---------------------------------------------------------------------------
void gld_NEW_PROJECTION(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx9 *gld = GLD_GET_DX9_DRIVER(gldCtx);
@@ -699,7 +699,7 @@ void gldOrthoHook_DX9(
//---------------------------------------------------------------------------
void gld_NEW_VIEWPORT(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx9 *gld = GLD_GET_DX9_DRIVER(gldCtx);
@@ -741,7 +741,7 @@ void gld_NEW_VIEWPORT(
//---------------------------------------------------------------------------
void gld_NEW_SCISSOR(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx9 *gld = GLD_GET_DX9_DRIVER(gldCtx);
@@ -768,7 +768,7 @@ void gld_NEW_SCISSOR(
//---------------------------------------------------------------------------
__inline BOOL _gldAnyEvalEnabled(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
struct gl_eval_attrib *eval = &ctx->Eval;
@@ -800,7 +800,7 @@ __inline BOOL _gldAnyEvalEnabled(
//---------------------------------------------------------------------------
BOOL _gldChooseInternalPipeline(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLD_driver_dx9 *gld)
{
// return TRUE; // DEBUGGING: ALWAYS USE MESA
@@ -864,7 +864,7 @@ BOOL _gldChooseInternalPipeline(
//---------------------------------------------------------------------------
void gld_update_state_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint new_state)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
@@ -1001,7 +1001,7 @@ void gld_update_state_DX9(
//---------------------------------------------------------------------------
void gld_Viewport_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLint x,
GLint y,
GLsizei w,
@@ -1063,12 +1063,12 @@ void gld_Viewport_DX9(
//---------------------------------------------------------------------------
-extern BOOL dglWglResizeBuffers(GLcontext *ctx, BOOL bDefaultDriver);
+extern BOOL dglWglResizeBuffers(struct gl_context *ctx, BOOL bDefaultDriver);
// Mesa 5: Parameter change
void gldResizeBuffers_DX9(
-// GLcontext *ctx)
- GLframebuffer *fb)
+// struct gl_context *ctx)
+ struct gl_framebuffer *fb)
{
GET_CURRENT_CONTEXT(ctx);
dglWglResizeBuffers(ctx, TRUE);
@@ -1079,7 +1079,7 @@ void gldResizeBuffers_DX9(
// This is only for debugging.
// To use, plug into ctx->Driver.Enable pointer below.
void gld_Enable(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum e,
GLboolean b)
{
@@ -1092,10 +1092,10 @@ void gld_Enable(
// Driver pointer setup
//---------------------------------------------------------------------------
-extern const GLubyte* _gldGetStringGeneric(GLcontext*, GLenum);
+extern const GLubyte* _gldGetStringGeneric(struct gl_context*, GLenum);
void gldSetupDriverPointers_DX9(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx9 *gld = GLD_GET_DX9_DRIVER(gldCtx);
diff --git a/src/mesa/drivers/windows/gldirect/dx9/gld_dx9.h b/src/mesa/drivers/windows/gldirect/dx9/gld_dx9.h
index aec40ac9dd1..67601da7fb6 100644
--- a/src/mesa/drivers/windows/gldirect/dx9/gld_dx9.h
+++ b/src/mesa/drivers/windows/gldirect/dx9/gld_dx9.h
@@ -259,69 +259,69 @@ typedef struct {
//---------------------------------------------------------------------------
PROC gldGetProcAddress_DX9(LPCSTR a);
-void gldEnableExtensions_DX9(GLcontext *ctx);
-void gldInstallPipeline_DX9(GLcontext *ctx);
-void gldSetupDriverPointers_DX9(GLcontext *ctx);
-//void gldResizeBuffers_DX9(GLcontext *ctx);
-void gldResizeBuffers_DX9(GLframebuffer *fb);
+void gldEnableExtensions_DX9(struct gl_context *ctx);
+void gldInstallPipeline_DX9(struct gl_context *ctx);
+void gldSetupDriverPointers_DX9(struct gl_context *ctx);
+//void gldResizeBuffers_DX9(struct gl_context *ctx);
+void gldResizeBuffers_DX9(struct gl_framebuffer *fb);
// Texture functions
-void gldCopyTexImage1D_DX9(GLcontext *ctx, GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border);
-void gldCopyTexImage2D_DX9(GLcontext *ctx, GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-void gldCopyTexSubImage1D_DX9(GLcontext *ctx, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width );
-void gldCopyTexSubImage2D_DX9(GLcontext *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height );
-void gldCopyTexSubImage3D_DX9(GLcontext *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height );
-
-void gld_NEW_TEXTURE_DX9(GLcontext *ctx);
-void gld_DrawPixels_DX9(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, const struct gl_pixelstore_attrib *unpack, const GLvoid *pixels);
-void gld_ReadPixels_DX9(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, const struct gl_pixelstore_attrib *unpack, GLvoid *dest);
-void gld_CopyPixels_DX9(GLcontext *ctx, GLint srcx, GLint srcy, GLsizei width, GLsizei height, GLint dstx, GLint dsty, GLenum type);
-void gld_Bitmap_DX9(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, const struct gl_pixelstore_attrib *unpack, const GLubyte *bitmap);
-const struct gl_texture_format* gld_ChooseTextureFormat_DX9(GLcontext *ctx, GLint internalFormat, GLenum srcFormat, GLenum srcType);
-void gld_TexImage2D_DX9(GLcontext *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint height, GLint border, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *tObj, struct gl_texture_image *texImage);
-void gld_TexImage1D_DX9(GLcontext *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint border, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *texObj, struct gl_texture_image *texImage );
-void gld_TexSubImage2D_DX9( GLcontext *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *texObj, struct gl_texture_image *texImage );
-void gld_TexSubImage1D_DX9(GLcontext *ctx, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *texObj, struct gl_texture_image *texImage);
-void gld_DeleteTexture_DX9(GLcontext *ctx, struct gl_texture_object *tObj);
-void gld_ResetLineStipple_DX9(GLcontext *ctx);
+void gldCopyTexImage1D_DX9(struct gl_context *ctx, GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border);
+void gldCopyTexImage2D_DX9(struct gl_context *ctx, GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+void gldCopyTexSubImage1D_DX9(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width );
+void gldCopyTexSubImage2D_DX9(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height );
+void gldCopyTexSubImage3D_DX9(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height );
+
+void gld_NEW_TEXTURE_DX9(struct gl_context *ctx);
+void gld_DrawPixels_DX9(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, const struct gl_pixelstore_attrib *unpack, const GLvoid *pixels);
+void gld_ReadPixels_DX9(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, const struct gl_pixelstore_attrib *unpack, GLvoid *dest);
+void gld_CopyPixels_DX9(struct gl_context *ctx, GLint srcx, GLint srcy, GLsizei width, GLsizei height, GLint dstx, GLint dsty, GLenum type);
+void gld_Bitmap_DX9(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height, const struct gl_pixelstore_attrib *unpack, const GLubyte *bitmap);
+const struct gl_texture_format* gld_ChooseTextureFormat_DX9(struct gl_context *ctx, GLint internalFormat, GLenum srcFormat, GLenum srcType);
+void gld_TexImage2D_DX9(struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint height, GLint border, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *tObj, struct gl_texture_image *texImage);
+void gld_TexImage1D_DX9(struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint border, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *texObj, struct gl_texture_image *texImage );
+void gld_TexSubImage2D_DX9( struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *texObj, struct gl_texture_image *texImage );
+void gld_TexSubImage1D_DX9(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, struct gl_texture_object *texObj, struct gl_texture_image *texImage);
+void gld_DeleteTexture_DX9(struct gl_context *ctx, struct gl_texture_object *tObj);
+void gld_ResetLineStipple_DX9(struct gl_context *ctx);
// 2D primitive functions
-void gld_Points2D_DX9(GLcontext *ctx, GLuint first, GLuint last);
+void gld_Points2D_DX9(struct gl_context *ctx, GLuint first, GLuint last);
-void gld_Line2DFlat_DX9(GLcontext *ctx, GLuint v0, GLuint v1);
-void gld_Line2DSmooth_DX9(GLcontext *ctx, GLuint v0, GLuint v1);
+void gld_Line2DFlat_DX9(struct gl_context *ctx, GLuint v0, GLuint v1);
+void gld_Line2DSmooth_DX9(struct gl_context *ctx, GLuint v0, GLuint v1);
-void gld_Triangle2DFlat_DX9(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2);
-void gld_Triangle2DSmooth_DX9(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2);
-void gld_Triangle2DFlatExtras_DX9(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2);
-void gld_Triangle2DSmoothExtras_DX9(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2);
+void gld_Triangle2DFlat_DX9(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2);
+void gld_Triangle2DSmooth_DX9(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2);
+void gld_Triangle2DFlatExtras_DX9(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2);
+void gld_Triangle2DSmoothExtras_DX9(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2);
-void gld_Quad2DFlat_DX9(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-void gld_Quad2DSmooth_DX9(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-void gld_Quad2DFlatExtras_DX9(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-void gld_Quad2DSmoothExtras_DX9(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void gld_Quad2DFlat_DX9(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void gld_Quad2DSmooth_DX9(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void gld_Quad2DFlatExtras_DX9(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void gld_Quad2DSmoothExtras_DX9(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
// 3D primitive functions
-void gld_Points3D_DX9(GLcontext *ctx, GLuint first, GLuint last);
-void gld_Line3DFlat_DX9(GLcontext *ctx, GLuint v0, GLuint v1);
-void gld_Triangle3DFlat_DX9(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2);
-void gld_Quad3DFlat_DX9(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-void gld_Line3DSmooth_DX9(GLcontext *ctx, GLuint v0, GLuint v1);
-void gld_Triangle3DSmooth_DX9(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2);
-void gld_Quad3DSmooth_DX9(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void gld_Points3D_DX9(struct gl_context *ctx, GLuint first, GLuint last);
+void gld_Line3DFlat_DX9(struct gl_context *ctx, GLuint v0, GLuint v1);
+void gld_Triangle3DFlat_DX9(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2);
+void gld_Quad3DFlat_DX9(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void gld_Line3DSmooth_DX9(struct gl_context *ctx, GLuint v0, GLuint v1);
+void gld_Triangle3DSmooth_DX9(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2);
+void gld_Quad3DSmooth_DX9(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
// Primitive functions for Two-sided-lighting Vertex Shader
-void gld_Points2DTwoside_DX9(GLcontext *ctx, GLuint first, GLuint last);
-void gld_Line2DFlatTwoside_DX9(GLcontext *ctx, GLuint v0, GLuint v1);
-void gld_Line2DSmoothTwoside_DX9(GLcontext *ctx, GLuint v0, GLuint v1);
-void gld_Triangle2DFlatTwoside_DX9(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2);
-void gld_Triangle2DSmoothTwoside_DX9(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2);
-void gld_Quad2DFlatTwoside_DX9(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-void gld_Quad2DSmoothTwoside_DX9(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void gld_Points2DTwoside_DX9(struct gl_context *ctx, GLuint first, GLuint last);
+void gld_Line2DFlatTwoside_DX9(struct gl_context *ctx, GLuint v0, GLuint v1);
+void gld_Line2DSmoothTwoside_DX9(struct gl_context *ctx, GLuint v0, GLuint v1);
+void gld_Triangle2DFlatTwoside_DX9(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2);
+void gld_Triangle2DSmoothTwoside_DX9(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2);
+void gld_Quad2DFlatTwoside_DX9(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void gld_Quad2DSmoothTwoside_DX9(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
#endif
diff --git a/src/mesa/drivers/windows/gldirect/dx9/gld_ext_dx9.c b/src/mesa/drivers/windows/gldirect/dx9/gld_ext_dx9.c
index e8c73a6ff80..667c59c4917 100644
--- a/src/mesa/drivers/windows/gldirect/dx9/gld_ext_dx9.c
+++ b/src/mesa/drivers/windows/gldirect/dx9/gld_ext_dx9.c
@@ -69,7 +69,7 @@
#include "extensions.h"
// For some reason this is not defined in an above header...
-extern void _mesa_enable_imaging_extensions(GLcontext *ctx);
+extern void _mesa_enable_imaging_extensions(struct gl_context *ctx);
//---------------------------------------------------------------------------
// Hack for the SGIS_multitexture extension that was removed from Mesa
@@ -281,7 +281,7 @@ PROC gldGetProcAddress_DX(
//---------------------------------------------------------------------------
void gldEnableExtensions_DX9(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
GLuint i;
diff --git a/src/mesa/drivers/windows/gldirect/dx9/gld_pipeline_dx9.c b/src/mesa/drivers/windows/gldirect/dx9/gld_pipeline_dx9.c
index 2b272aa6281..f9abbdbdfed 100644
--- a/src/mesa/drivers/windows/gldirect/dx9/gld_pipeline_dx9.c
+++ b/src/mesa/drivers/windows/gldirect/dx9/gld_pipeline_dx9.c
@@ -65,7 +65,7 @@ static const struct tnl_pipeline_stage *gld_pipeline[] = {
//---------------------------------------------------------------------------
void gldInstallPipeline_DX9(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
// Remove any existing pipeline stages,
// then install GLDirect pipeline stages.
diff --git a/src/mesa/drivers/windows/gldirect/dx9/gld_primitive_dx9.c b/src/mesa/drivers/windows/gldirect/dx9/gld_primitive_dx9.c
index fd4dd4ed751..99edd26e9d2 100644
--- a/src/mesa/drivers/windows/gldirect/dx9/gld_primitive_dx9.c
+++ b/src/mesa/drivers/windows/gldirect/dx9/gld_primitive_dx9.c
@@ -277,7 +277,7 @@
//---------------------------------------------------------------------------
__inline DWORD _gldComputeFog(
- GLcontext *ctx,
+ struct gl_context *ctx,
SWvertex *swv)
{
// Full fog calculation.
@@ -300,7 +300,7 @@ __inline DWORD _gldComputeFog(
//---------------------------------------------------------------------------
void gld_ResetLineStipple_DX9(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
// TODO: Fake stipple with a 32x32 texture.
}
@@ -310,7 +310,7 @@ void gld_ResetLineStipple_DX9(
//---------------------------------------------------------------------------
void gld_Points2D_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint first,
GLuint last)
{
@@ -357,7 +357,7 @@ void gld_Points2D_DX9(
//---------------------------------------------------------------------------
void gld_Line2DFlat_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1)
{
@@ -390,7 +390,7 @@ void gld_Line2DFlat_DX9(
//---------------------------------------------------------------------------
void gld_Line2DSmooth_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1)
{
@@ -421,7 +421,7 @@ void gld_Line2DSmooth_DX9(
//---------------------------------------------------------------------------
void gld_Triangle2DFlat_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2)
@@ -460,7 +460,7 @@ void gld_Triangle2DFlat_DX9(
//---------------------------------------------------------------------------
void gld_Triangle2DSmooth_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2)
@@ -499,7 +499,7 @@ void gld_Triangle2DSmooth_DX9(
//---------------------------------------------------------------------------
void gld_Triangle2DFlatExtras_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2)
@@ -548,7 +548,7 @@ void gld_Triangle2DFlatExtras_DX9(
//---------------------------------------------------------------------------
void gld_Triangle2DSmoothExtras_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2)
@@ -588,7 +588,7 @@ void gld_Triangle2DSmoothExtras_DX9(
//---------------------------------------------------------------------------
void gld_Quad2DFlat_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2,
@@ -652,7 +652,7 @@ void gld_Quad2DFlat_DX9(
//---------------------------------------------------------------------------
void gld_Quad2DSmooth_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2,
@@ -715,7 +715,7 @@ void gld_Quad2DSmooth_DX9(
//---------------------------------------------------------------------------
void gld_Quad2DFlatExtras_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2,
@@ -792,7 +792,7 @@ void gld_Quad2DFlatExtras_DX9(
//---------------------------------------------------------------------------
void gld_Quad2DSmoothExtras_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2,
@@ -859,7 +859,7 @@ void gld_Quad2DSmoothExtras_DX9(
//---------------------------------------------------------------------------
void gld_Points3D_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint first,
GLuint last)
{
@@ -911,7 +911,7 @@ void gld_Points3D_DX9(
//---------------------------------------------------------------------------
void gld_Line3DFlat_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1)
{
@@ -937,7 +937,7 @@ void gld_Line3DFlat_DX9(
//---------------------------------------------------------------------------
void gld_Line3DSmooth_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1)
{
@@ -964,7 +964,7 @@ void gld_Line3DSmooth_DX9(
//---------------------------------------------------------------------------
void gld_Triangle3DFlat_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2)
@@ -997,7 +997,7 @@ void gld_Triangle3DFlat_DX9(
//---------------------------------------------------------------------------
void gld_Triangle3DSmooth_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2)
@@ -1031,7 +1031,7 @@ void gld_Triangle3DSmooth_DX9(
//---------------------------------------------------------------------------
void gld_Quad3DFlat_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2,
@@ -1083,7 +1083,7 @@ void gld_Quad3DFlat_DX9(
//---------------------------------------------------------------------------
void gld_Quad3DSmooth_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint v0,
GLuint v1,
GLuint v2,
@@ -1137,34 +1137,34 @@ void gld_Quad3DSmooth_DX9(
/*
-void gld_Points2DTwoside_DX9(GLcontext *ctx, GLuint first, GLuint last)
+void gld_Points2DTwoside_DX9(struct gl_context *ctx, GLuint first, GLuint last)
{
// NOTE: Two-sided lighting does not apply to Points
}
//---------------------------------------------------------------------------
-void gld_Line2DFlatTwoside_DX9(GLcontext *ctx, GLuint v0, GLuint v1)
+void gld_Line2DFlatTwoside_DX9(struct gl_context *ctx, GLuint v0, GLuint v1)
{
// NOTE: Two-sided lighting does not apply to Lines
}
//---------------------------------------------------------------------------
-void gld_Line2DSmoothTwoside_DX9(GLcontext *ctx, GLuint v0, GLuint v1)
+void gld_Line2DSmoothTwoside_DX9(struct gl_context *ctx, GLuint v0, GLuint v1)
{
// NOTE: Two-sided lighting does not apply to Lines
}
//---------------------------------------------------------------------------
-void gld_Triangle2DFlatTwoside_DX9(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2)
+void gld_Triangle2DFlatTwoside_DX9(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2)
{
}
//---------------------------------------------------------------------------
-void gld_Triangle2DSmoothTwoside_DX9(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2)
+void gld_Triangle2DSmoothTwoside_DX9(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx9 *gld = GLD_GET_DX9_DRIVER(gldCtx);
@@ -1229,7 +1229,7 @@ void gld_Triangle2DSmoothTwoside_DX9(GLcontext *ctx, GLuint v0, GLuint v1, GLuin
//---------------------------------------------------------------------------
-void gld_Quad2DFlatTwoside_DX9(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
+void gld_Quad2DFlatTwoside_DX9(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx9 *gld = GLD_GET_DX9_DRIVER(gldCtx);
@@ -1336,7 +1336,7 @@ void gld_Quad2DFlatTwoside_DX9(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2,
//---------------------------------------------------------------------------
-void gld_Quad2DSmoothTwoside_DX9(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
+void gld_Quad2DSmoothTwoside_DX9(struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
GLD_driver_dx9 *gld = GLD_GET_DX9_DRIVER(gldCtx);
diff --git a/src/mesa/drivers/windows/gldirect/dx9/gld_texture_dx9.c b/src/mesa/drivers/windows/gldirect/dx9/gld_texture_dx9.c
index 5a822356164..bd7a64f57f6 100644
--- a/src/mesa/drivers/windows/gldirect/dx9/gld_texture_dx9.c
+++ b/src/mesa/drivers/windows/gldirect/dx9/gld_texture_dx9.c
@@ -760,7 +760,7 @@ const struct gl_texture_format* _gldMesaFormatForD3DFormat(
//---------------------------------------------------------------------------
void gldCopyTexImage1D_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum target, GLint level,
GLenum internalFormat,
GLint x, GLint y,
@@ -772,7 +772,7 @@ void gldCopyTexImage1D_DX9(
//---------------------------------------------------------------------------
void gldCopyTexImage2D_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum target,
GLint level,
GLenum internalFormat,
@@ -788,7 +788,7 @@ void gldCopyTexImage2D_DX9(
//---------------------------------------------------------------------------
void gldCopyTexSubImage1D_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum target, GLint level,
GLint xoffset, GLint x, GLint y, GLsizei width )
{
@@ -798,7 +798,7 @@ void gldCopyTexSubImage1D_DX9(
//---------------------------------------------------------------------------
void gldCopyTexSubImage2D_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum target,
GLint level,
GLint xoffset,
@@ -814,7 +814,7 @@ void gldCopyTexSubImage2D_DX9(
//---------------------------------------------------------------------------
void gldCopyTexSubImage3D_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum target,
GLint level,
GLint xoffset,
@@ -846,7 +846,7 @@ typedef struct {
//---------------------------------------------------------------------------
HRESULT _gldDrawPixels(
- GLcontext *ctx,
+ struct gl_context *ctx,
BOOL bChromakey, // Alpha test for glBitmap() images
GLint x, // GL x position
GLint y, // GL y position (needs flipping)
@@ -991,7 +991,7 @@ HRESULT _gldDrawPixels(
//---------------------------------------------------------------------------
void gld_DrawPixels_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *unpack,
@@ -1060,7 +1060,7 @@ void gld_DrawPixels_DX9(
//---------------------------------------------------------------------------
void gld_ReadPixels_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *pack,
@@ -1230,7 +1230,7 @@ gld_ReadPixels_DX9_return:
//---------------------------------------------------------------------------
void gld_CopyPixels_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLint srcx,
GLint srcy,
GLsizei width,
@@ -1329,7 +1329,7 @@ void gld_CopyPixels_DX9(
//---------------------------------------------------------------------------
void gld_Bitmap_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLint x,
GLint y,
GLsizei width,
@@ -1440,7 +1440,7 @@ void gld_Bitmap_DX9(
//---------------------------------------------------------------------------
void _gldAllocateTexture(
- GLcontext *ctx,
+ struct gl_context *ctx,
struct gl_texture_object *tObj,
struct gl_texture_image *texImage)
{
@@ -1486,7 +1486,7 @@ void _gldAllocateTexture(
//---------------------------------------------------------------------------
const struct gl_texture_format* gld_ChooseTextureFormat_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLint internalFormat,
GLenum srcFormat,
GLenum srcType)
@@ -1575,7 +1575,7 @@ const struct gl_texture_format* gld_ChooseTextureFormat_DX9(
/*
// Safer(?), slower version.
void gld_TexImage2D_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum target,
GLint level,
GLint internalFormat,
@@ -1653,7 +1653,7 @@ void gld_TexImage2D_DX9(
// Faster, more efficient version.
// Copies subimage straight to dest texture
void gld_TexImage2D_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum target,
GLint level,
GLint internalFormat,
@@ -1727,7 +1727,7 @@ void gld_TexImage2D_DX9(
//---------------------------------------------------------------------------
-void gld_TexImage1D_DX9(GLcontext *ctx, GLenum target, GLint level,
+void gld_TexImage1D_DX9(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -1742,7 +1742,7 @@ void gld_TexImage1D_DX9(GLcontext *ctx, GLenum target, GLint level,
//---------------------------------------------------------------------------
/*
-void gld_TexSubImage2D( GLcontext *ctx, GLenum target, GLint level,
+void gld_TexSubImage2D( struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
@@ -1818,7 +1818,7 @@ void gld_TexSubImage2D( GLcontext *ctx, GLenum target, GLint level,
// Faster, more efficient version.
// Copies subimage straight to dest texture
-void gld_TexSubImage2D_DX9( GLcontext *ctx, GLenum target, GLint level,
+void gld_TexSubImage2D_DX9( struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
@@ -1879,7 +1879,7 @@ void gld_TexSubImage2D_DX9( GLcontext *ctx, GLenum target, GLint level,
//---------------------------------------------------------------------------
-void gld_TexSubImage1D_DX9( GLcontext *ctx, GLenum target, GLint level,
+void gld_TexSubImage1D_DX9( struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLsizei width,
GLenum format, GLenum type,
const GLvoid *pixels,
@@ -1893,7 +1893,7 @@ void gld_TexSubImage1D_DX9( GLcontext *ctx, GLenum target, GLint level,
//---------------------------------------------------------------------------
void gld_DeleteTexture_DX9(
- GLcontext *ctx,
+ struct gl_context *ctx,
struct gl_texture_object *tObj)
{
GLD_context *gld = (GLD_context*)(ctx->DriverCtx);
@@ -1945,7 +1945,7 @@ __inline void _gldSetAlphaOps(
//---------------------------------------------------------------------------
void gldUpdateTextureUnit(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint unit,
BOOL bPassThrough)
{
@@ -2050,7 +2050,7 @@ void gldUpdateTextureUnit(
//---------------------------------------------------------------------------
void gld_NEW_TEXTURE_DX9(
- GLcontext *ctx)
+ struct gl_context *ctx)
{
// TODO: Support for three (ATI Radeon) or more (nVidia GeForce3) texture units
diff --git a/src/mesa/drivers/windows/gldirect/dx9/gld_vb_d3d_render_dx9.c b/src/mesa/drivers/windows/gldirect/dx9/gld_vb_d3d_render_dx9.c
index 91a68b3f2d9..5f818d9f960 100644
--- a/src/mesa/drivers/windows/gldirect/dx9/gld_vb_d3d_render_dx9.c
+++ b/src/mesa/drivers/windows/gldirect/dx9/gld_vb_d3d_render_dx9.c
@@ -61,7 +61,7 @@
//---------------------------------------------------------------------------
__inline void _gldSetVertexShaderConstants(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLD_driver_dx9 *gld)
{
D3DXMATRIX mat, matView, matProj;
@@ -116,7 +116,7 @@ __inline void _gldSetVertexShaderConstants(
//---------------------------------------------------------------------------
static GLboolean gld_d3d_render_stage_run(
- GLcontext *ctx,
+ struct gl_context *ctx,
struct tnl_pipeline_stage *stage)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
@@ -237,7 +237,7 @@ static GLboolean gld_d3d_render_stage_run(
//---------------------------------------------------------------------------
static void gld_d3d_render_stage_check(
- GLcontext *ctx,
+ struct gl_context *ctx,
struct tnl_pipeline_stage *stage)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
diff --git a/src/mesa/drivers/windows/gldirect/dx9/gld_vb_mesa_render_dx9.c b/src/mesa/drivers/windows/gldirect/dx9/gld_vb_mesa_render_dx9.c
index 64acab2d2a8..b5e005b25b0 100644
--- a/src/mesa/drivers/windows/gldirect/dx9/gld_vb_mesa_render_dx9.c
+++ b/src/mesa/drivers/windows/gldirect/dx9/gld_vb_mesa_render_dx9.c
@@ -162,7 +162,7 @@ do { \
/* TODO: do this for all primitives, verts and elts:
*/
-static void clip_elt_triangles( GLcontext *ctx,
+static void clip_elt_triangles( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -250,7 +250,7 @@ static void clip_elt_triangles( GLcontext *ctx,
/* Helper functions for drivers */
/**********************************************************************/
/*
-void _tnl_RenderClippedPolygon( GLcontext *ctx, const GLuint *elts, GLuint n )
+void _tnl_RenderClippedPolygon( struct gl_context *ctx, const GLuint *elts, GLuint n )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
@@ -261,7 +261,7 @@ void _tnl_RenderClippedPolygon( GLcontext *ctx, const GLuint *elts, GLuint n )
VB->Elts = tmp;
}
-void _tnl_RenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj )
+void _tnl_RenderClippedLine( struct gl_context *ctx, GLuint ii, GLuint jj )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
tnl->Driver.Render.Line( ctx, ii, jj );
@@ -301,7 +301,7 @@ tnl_quad_func _gldSetupQuad[4] = {
//---------------------------------------------------------------------------
static GLboolean _gld_mesa_render_stage_run(
- GLcontext *ctx,
+ struct gl_context *ctx,
struct tnl_pipeline_stage *stage)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
diff --git a/src/mesa/drivers/windows/gldirect/dx9/gld_wgl_dx9.c b/src/mesa/drivers/windows/gldirect/dx9/gld_wgl_dx9.c
index a03b865bb44..6cf46fb7a81 100644
--- a/src/mesa/drivers/windows/gldirect/dx9/gld_wgl_dx9.c
+++ b/src/mesa/drivers/windows/gldirect/dx9/gld_wgl_dx9.c
@@ -54,8 +54,8 @@ extern int nContextError;
#define DDLOG_CRITICAL_OR_WARN DDLOG_CRITICAL
-extern void _gld_mesa_warning(GLcontext *, char *);
-extern void _gld_mesa_fatal(GLcontext *, char *);
+extern void _gld_mesa_warning(struct gl_context *, char *);
+extern void _gld_mesa_fatal(struct gl_context *, char *);
//---------------------------------------------------------------------------
@@ -246,7 +246,7 @@ void _gldDestroyPrimitiveBuffer(
//---------------------------------------------------------------------------
HRESULT _gldCreatePrimitiveBuffer(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLD_driver_dx9 *lpCtx,
GLD_pb_dx9 *gldVB)
{
diff --git a/src/mesa/drivers/windows/gldirect/gld_driver.c b/src/mesa/drivers/windows/gldirect/gld_driver.c
index f7c575614b4..aa7bc27c99a 100644
--- a/src/mesa/drivers/windows/gldirect/gld_driver.c
+++ b/src/mesa/drivers/windows/gldirect/gld_driver.c
@@ -193,7 +193,7 @@ static BOOL _GetDisplayMode_ERROR(
//---------------------------------------------------------------------------
const GLubyte* _gldGetStringGeneric(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLenum name)
{
if (!ctx)
diff --git a/src/mesa/drivers/windows/gldirect/gld_driver.h b/src/mesa/drivers/windows/gldirect/gld_driver.h
index 01a46a8325f..7c393bc4c7e 100644
--- a/src/mesa/drivers/windows/gldirect/gld_driver.h
+++ b/src/mesa/drivers/windows/gldirect/gld_driver.h
@@ -83,7 +83,7 @@ typedef struct {
extern GLD_driver _gldDriver;
BOOL gldInitDriverPointers(DWORD dwDriver);
-const GLubyte* _gldGetStringGeneric(GLcontext *ctx, GLenum name);
+const GLubyte* _gldGetStringGeneric(struct gl_context *ctx, GLenum name);
#endif // _USE_GLD3_WGL
diff --git a/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c b/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c
index f927abfa115..7a26df8071e 100644
--- a/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c
+++ b/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c
@@ -610,7 +610,7 @@ BOOL wmFlush(PWMC pwc, HDC hDC)
// Support Functions
//---------------------------------------------------------------------------
-static void flush(GLcontext* ctx)
+static void flush(struct gl_context* ctx)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
WMesaContext *Current = GLD_GET_WMESA_DRIVER(gldCtx);
@@ -634,10 +634,10 @@ static void flush(GLcontext* ctx)
/*
* Set the color used to clear the color buffer.
*/
-//static void clear_color( GLcontext* ctx, const GLchan color[4] )
+//static void clear_color( struct gl_context* ctx, const GLchan color[4] )
// Changed for Mesa 5.x. KeithH
static void clear_color(
- GLcontext* ctx,
+ struct gl_context* ctx,
const GLfloat color[4])
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
@@ -664,7 +664,7 @@ static void clear_color(
* Otherwise, we let swrast do it.
*/
-static clear(GLcontext* ctx, GLbitfield mask,
+static clear(struct gl_context* ctx, GLbitfield mask,
GLboolean all, GLint x, GLint y, GLint width, GLint height)
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
@@ -787,7 +787,7 @@ static clear(GLcontext* ctx, GLbitfield mask,
//---------------------------------------------------------------------------
-static void enable( GLcontext* ctx, GLenum pname, GLboolean enable )
+static void enable( struct gl_context* ctx, GLenum pname, GLboolean enable )
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
WMesaContext *Current = GLD_GET_WMESA_DRIVER(gldCtx);
@@ -814,7 +814,7 @@ static void enable( GLcontext* ctx, GLenum pname, GLboolean enable )
//---------------------------------------------------------------------------
-static GLboolean set_draw_buffer( GLcontext* ctx, GLenum mode )
+static GLboolean set_draw_buffer( struct gl_context* ctx, GLenum mode )
{
/* TODO: this could be better */
if (mode==GL_FRONT_LEFT || mode==GL_BACK_LEFT) {
@@ -828,7 +828,7 @@ static GLboolean set_draw_buffer( GLcontext* ctx, GLenum mode )
//---------------------------------------------------------------------------
-static void set_read_buffer(GLcontext *ctx, GLframebuffer *colorBuffer,
+static void set_read_buffer(struct gl_context *ctx, struct gl_framebuffer *colorBuffer,
GLenum buffer )
{
/* XXX todo */
@@ -840,10 +840,10 @@ static void set_read_buffer(GLcontext *ctx, GLframebuffer *colorBuffer,
/* Return characteristics of the output buffer. */
-//static void buffer_size( GLcontext* ctx, GLuint *width, GLuint *height )
+//static void buffer_size( struct gl_context* ctx, GLuint *width, GLuint *height )
// Altered for Mesa 5.x. KeithH
static void buffer_size(
- GLframebuffer *buffer,
+ struct gl_framebuffer *buffer,
GLuint *width,
GLuint *height)
{
@@ -888,28 +888,28 @@ static void buffer_size(
/* Accelerated routines are not implemented in 4.0. See OSMesa for ideas. */
-static void fast_rgb_points( GLcontext* ctx, GLuint first, GLuint last )
+static void fast_rgb_points( struct gl_context* ctx, GLuint first, GLuint last )
{
}
//---------------------------------------------------------------------------
/* Return pointer to accelerated points function */
-extern tnl_points_func choose_points_function( GLcontext* ctx )
+extern tnl_points_func choose_points_function( struct gl_context* ctx )
{
return NULL;
}
//---------------------------------------------------------------------------
-static void fast_flat_rgb_line( GLcontext* ctx, GLuint v0,
+static void fast_flat_rgb_line( struct gl_context* ctx, GLuint v0,
GLuint v1, GLuint pv )
{
}
//---------------------------------------------------------------------------
-static tnl_line_func choose_line_function( GLcontext* ctx )
+static tnl_line_func choose_line_function( struct gl_context* ctx )
{
}
@@ -920,7 +920,7 @@ static tnl_line_func choose_line_function( GLcontext* ctx )
/* Write a horizontal span of 32-bit color-index pixels with a boolean mask. */
-static void write_ci32_span( const GLcontext* ctx,
+static void write_ci32_span( const struct gl_context* ctx,
GLuint n, GLint x, GLint y,
const GLuint index[],
const GLubyte mask[] )
@@ -939,7 +939,7 @@ static void write_ci32_span( const GLcontext* ctx,
//---------------------------------------------------------------------------
/* Write a horizontal span of 8-bit color-index pixels with a boolean mask. */
-static void write_ci8_span( const GLcontext* ctx,
+static void write_ci8_span( const struct gl_context* ctx,
GLuint n, GLint x, GLint y,
const GLubyte index[],
const GLubyte mask[] )
@@ -962,7 +962,7 @@ static void write_ci8_span( const GLcontext* ctx,
* Write a horizontal span of pixels with a boolean mask. The current
* color index is used for all pixels.
*/
-static void write_mono_ci_span(const GLcontext* ctx,
+static void write_mono_ci_span(const struct gl_context* ctx,
GLuint n,GLint x,GLint y,
GLuint colorIndex, const GLubyte mask[])
{
@@ -984,7 +984,7 @@ static void write_mono_ci_span(const GLcontext* ctx,
*/
/* Write a horizontal span of RGBA color pixels with a boolean mask. */
-static void write_rgba_span( const GLcontext* ctx, GLuint n, GLint x, GLint y,
+static void write_rgba_span( const struct gl_context* ctx, GLuint n, GLint x, GLint y,
const GLubyte rgba[][4], const GLubyte mask[] )
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
@@ -1035,7 +1035,7 @@ static void write_rgba_span( const GLcontext* ctx, GLuint n, GLint x, GLint y,
//---------------------------------------------------------------------------
/* Write a horizontal span of RGB color pixels with a boolean mask. */
-static void write_rgb_span( const GLcontext* ctx,
+static void write_rgb_span( const struct gl_context* ctx,
GLuint n, GLint x, GLint y,
const GLubyte rgb[][3], const GLubyte mask[] )
{
@@ -1090,7 +1090,7 @@ static void write_rgb_span( const GLcontext* ctx,
* Write a horizontal span of pixels with a boolean mask. The current color
* is used for all pixels.
*/
-static void write_mono_rgba_span( const GLcontext* ctx,
+static void write_mono_rgba_span( const struct gl_context* ctx,
GLuint n, GLint x, GLint y,
const GLchan color[4], const GLubyte mask[])
{
@@ -1123,7 +1123,7 @@ static void write_mono_rgba_span( const GLcontext* ctx,
/* Write an array of 32-bit index pixels with a boolean mask. */
-static void write_ci32_pixels( const GLcontext* ctx,
+static void write_ci32_pixels( const struct gl_context* ctx,
GLuint n, const GLint x[], const GLint y[],
const GLuint index[], const GLubyte mask[] )
{
@@ -1147,7 +1147,7 @@ static void write_ci32_pixels( const GLcontext* ctx,
* Write an array of pixels with a boolean mask. The current color
* index is used for all pixels.
*/
-static void write_mono_ci_pixels( const GLcontext* ctx,
+static void write_mono_ci_pixels( const struct gl_context* ctx,
GLuint n,
const GLint x[], const GLint y[],
GLuint colorIndex, const GLubyte mask[] )
@@ -1169,7 +1169,7 @@ static void write_mono_ci_pixels( const GLcontext* ctx,
/* Write an array of RGBA pixels with a boolean mask. */
-static void write_rgba_pixels( const GLcontext* ctx,
+static void write_rgba_pixels( const struct gl_context* ctx,
GLuint n, const GLint x[], const GLint y[],
const GLubyte rgba[][4], const GLubyte mask[] )
{
@@ -1194,7 +1194,7 @@ static void write_rgba_pixels( const GLcontext* ctx,
* Write an array of pixels with a boolean mask. The current color
* is used for all pixels.
*/
-static void write_mono_rgba_pixels( const GLcontext* ctx,
+static void write_mono_rgba_pixels( const struct gl_context* ctx,
GLuint n,
const GLint x[], const GLint y[],
const GLchan color[4],
@@ -1218,7 +1218,7 @@ static void write_mono_rgba_pixels( const GLcontext* ctx,
/**********************************************************************/
/* Read a horizontal span of color-index pixels. */
-static void read_ci32_span( const GLcontext* ctx, GLuint n, GLint x, GLint y,
+static void read_ci32_span( const struct gl_context* ctx, GLuint n, GLint x, GLint y,
GLuint index[])
{
GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
@@ -1233,7 +1233,7 @@ static void read_ci32_span( const GLcontext* ctx, GLuint n, GLint x, GLint y,
//---------------------------------------------------------------------------
/* Read an array of color index pixels. */
-static void read_ci32_pixels( const GLcontext* ctx,
+static void read_ci32_pixels( const struct gl_context* ctx,
GLuint n, const GLint x[], const GLint y[],
GLuint indx[], const GLubyte mask[] )
{
@@ -1251,7 +1251,7 @@ static void read_ci32_pixels( const GLcontext* ctx,
//---------------------------------------------------------------------------
/* Read a horizontal span of color pixels. */
-static void read_rgba_span( const GLcontext* ctx,
+static void read_rgba_span( const struct gl_context* ctx,
GLuint n, GLint x, GLint y,
GLubyte rgba[][4] )
{
@@ -1275,7 +1275,7 @@ static void read_rgba_span( const GLcontext* ctx,
//---------------------------------------------------------------------------
/* Read an array of color pixels. */
-static void read_rgba_pixels( const GLcontext* ctx,
+static void read_rgba_pixels( const struct gl_context* ctx,
GLuint n, const GLint x[], const GLint y[],
GLubyte rgba[][4], const GLubyte mask[] )
{
@@ -1301,7 +1301,7 @@ static void read_rgba_pixels( const GLcontext* ctx,
//---------------------------------------------------------------------------
static void wmesa_update_state(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint new_state)
{
_swrast_InvalidateState( ctx, new_state );
@@ -1313,7 +1313,7 @@ static void wmesa_update_state(
//---------------------------------------------------------------------------
static void wmesa_viewport(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLint x,
GLint y,
GLsizei w,
@@ -1325,7 +1325,7 @@ static void wmesa_viewport(
//---------------------------------------------------------------------------
static void wmesa_update_state_first_time(
- GLcontext *ctx,
+ struct gl_context *ctx,
GLuint new_state)
{
struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference( ctx );
@@ -1570,7 +1570,7 @@ BOOL gldBuildPixelformatList_MesaSW(void)
BOOL gldInitialiseMesa_MesaSW(
DGL_ctx *gld)
{
- GLcontext *ctx;
+ struct gl_context *ctx;
if (gld == NULL)
return FALSE;
diff --git a/src/mesa/drivers/x11/Makefile b/src/mesa/drivers/x11/Makefile
index f759da0a979..f94aae85f2c 100644
--- a/src/mesa/drivers/x11/Makefile
+++ b/src/mesa/drivers/x11/Makefile
@@ -12,7 +12,7 @@ include $(TOP)/configs/current
GL_MAJOR = 1
GL_MINOR = 5
-GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
+GL_TINY = 0$(MESA_MAJOR)$(MESA_MINOR)0$(MESA_TINY)
HEADERS = \
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index f1e62b6bd4f..577e27d4da3 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -868,6 +868,7 @@ register_with_display(Display *dpy)
XExtCodes *c = XAddExtension(dpy);
ext = dpy->ext_procs; /* new extension is at head of list */
assert(c->extension == ext->codes.extension);
+ (void) c; /* silence warning */
ext->name = _mesa_strdup(extName);
ext->close_display = close_display_callback;
}
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index dac1668cfe1..00ceb960c62 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -349,7 +349,7 @@ XMesaBuffer XMesaBufferList = NULL;
/**
* Allocate a new XMesaBuffer object which corresponds to the given drawable.
- * Note that XMesaBuffer is derived from GLframebuffer.
+ * Note that XMesaBuffer is derived from struct gl_framebuffer.
* The new XMesaBuffer will not have any size (Width=Height=0).
*
* \param d the corresponding X drawable (window or pixmap)
@@ -1047,7 +1047,7 @@ initialize_visual_and_buffer(XMesaVisual v, XMesaBuffer b,
XMesaColormap cmap)
{
int client = 0;
- const int xclass = v->mesa_visual.visualType;
+ const int xclass = v->visualType;
#ifdef XFree86Server
client = (window) ? CLIENT_ID(window->id) : 0;
@@ -1200,7 +1200,7 @@ initialize_visual_and_buffer(XMesaVisual v, XMesaBuffer b,
* Convert an RGBA color to a pixel value.
*/
unsigned long
-xmesa_color_to_pixel(GLcontext *ctx,
+xmesa_color_to_pixel(struct gl_context *ctx,
GLubyte r, GLubyte g, GLubyte b, GLubyte a,
GLuint pixelFormat)
{
@@ -1397,20 +1397,20 @@ XMesaVisual XMesaCreateVisual( XMesaDisplay *display,
v->mesa_visual.redMask = visinfo->redMask;
v->mesa_visual.greenMask = visinfo->greenMask;
v->mesa_visual.blueMask = visinfo->blueMask;
- v->mesa_visual.visualID = visinfo->vid;
- v->mesa_visual.screen = 0; /* FIXME: What should be done here? */
+ v->visualID = visinfo->vid;
+ v->screen = 0; /* FIXME: What should be done here? */
#else
v->mesa_visual.redMask = visinfo->red_mask;
v->mesa_visual.greenMask = visinfo->green_mask;
v->mesa_visual.blueMask = visinfo->blue_mask;
- v->mesa_visual.visualID = visinfo->visualid;
- v->mesa_visual.screen = visinfo->screen;
+ v->visualID = visinfo->visualid;
+ v->screen = visinfo->screen;
#endif
#if defined(XFree86Server) || !(defined(__cplusplus) || defined(c_plusplus))
- v->mesa_visual.visualType = xmesa_convert_from_x_visual_type(visinfo->class);
+ v->visualType = xmesa_convert_from_x_visual_type(visinfo->class);
#else
- v->mesa_visual.visualType = xmesa_convert_from_x_visual_type(visinfo->c_class);
+ v->visualType = xmesa_convert_from_x_visual_type(visinfo->c_class);
#endif
v->mesa_visual.visualRating = visualCaveat;
@@ -1421,7 +1421,7 @@ XMesaVisual XMesaCreateVisual( XMesaDisplay *display,
(void) initialize_visual_and_buffer( v, NULL, 0, 0 );
{
- const int xclass = v->mesa_visual.visualType;
+ const int xclass = v->visualType;
if (xclass == GLX_TRUE_COLOR || xclass == GLX_DIRECT_COLOR) {
red_bits = _mesa_bitcount(GET_REDMASK(v));
green_bits = _mesa_bitcount(GET_GREENMASK(v));
@@ -1481,7 +1481,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
{
static GLboolean firstTime = GL_TRUE;
XMesaContext c;
- GLcontext *mesaCtx;
+ struct gl_context *mesaCtx;
struct dd_function_table functions;
TNLcontext *tnl;
@@ -1490,7 +1490,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
firstTime = GL_FALSE;
}
- /* Note: the XMesaContext contains a Mesa GLcontext struct (inheritance) */
+ /* Note: the XMesaContext contains a Mesa struct gl_context struct (inheritance) */
c = (XMesaContext) CALLOC_STRUCT(xmesa_context);
if (!c)
return NULL;
@@ -1501,7 +1501,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
_mesa_init_driver_functions(&functions);
xmesa_init_driver_functions(v, &functions);
if (!_mesa_initialize_context(mesaCtx, &v->mesa_visual,
- share_list ? &(share_list->mesa) : (GLcontext *) NULL,
+ share_list ? &(share_list->mesa) : (struct gl_context *) NULL,
&functions, (void *) c)) {
free(c);
return NULL;
@@ -1574,7 +1574,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
PUBLIC
void XMesaDestroyContext( XMesaContext c )
{
- GLcontext *mesaCtx = &c->mesa;
+ struct gl_context *mesaCtx = &c->mesa;
#ifdef FX
FXdestroyContext( XMESA_BUFFER(mesaCtx->DrawBuffer) );
@@ -1788,7 +1788,7 @@ XMesaDestroyBuffer(XMesaBuffer b)
/**
- * Query the current window size and update the corresponding GLframebuffer
+ * Query the current window size and update the corresponding struct gl_framebuffer
* and all attached renderbuffers.
* Called when:
* 1. the first time a buffer is bound to a context.
@@ -1804,7 +1804,7 @@ xmesa_check_and_update_buffer_size(XMesaContext xmctx, XMesaBuffer drawBuffer)
xmesa_get_window_size(drawBuffer->display, drawBuffer, &width, &height);
if (drawBuffer->mesa_buffer.Width != width ||
drawBuffer->mesa_buffer.Height != height) {
- GLcontext *ctx = xmctx ? &xmctx->mesa : NULL;
+ struct gl_context *ctx = xmctx ? &xmctx->mesa : NULL;
_mesa_resize_framebuffer(ctx, &(drawBuffer->mesa_buffer), width, height);
}
drawBuffer->mesa_buffer.Initialized = GL_TRUE; /* XXX TEMPORARY? */
@@ -2252,7 +2252,7 @@ unsigned long XMesaDitherColor( XMesaContext xmesa, GLint x, GLint y,
GLfloat red, GLfloat green,
GLfloat blue, GLfloat alpha )
{
- GLcontext *ctx = &xmesa->mesa;
+ struct gl_context *ctx = &xmesa->mesa;
GLint r = (GLint) (red * 255.0F);
GLint g = (GLint) (green * 255.0F);
GLint b = (GLint) (blue * 255.0F);
diff --git a/src/mesa/drivers/x11/xm_buffer.c b/src/mesa/drivers/x11/xm_buffer.c
index e47949750ab..2683bd44d19 100644
--- a/src/mesa/drivers/x11/xm_buffer.c
+++ b/src/mesa/drivers/x11/xm_buffer.c
@@ -251,7 +251,7 @@ xmesa_delete_renderbuffer(struct gl_renderbuffer *rb)
* Called via gl_renderbuffer::AllocStorage()
*/
static GLboolean
-xmesa_alloc_front_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
+xmesa_alloc_front_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLenum internalFormat, GLuint width, GLuint height)
{
struct xmesa_renderbuffer *xrb = xmesa_renderbuffer(rb);
@@ -278,7 +278,7 @@ xmesa_alloc_front_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
* Called via gl_renderbuffer::AllocStorage()
*/
static GLboolean
-xmesa_alloc_back_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
+xmesa_alloc_back_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLenum internalFormat, GLuint width, GLuint height)
{
struct xmesa_renderbuffer *xrb = xmesa_renderbuffer(rb);
@@ -323,7 +323,7 @@ xmesa_alloc_back_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
struct xmesa_renderbuffer *
-xmesa_new_renderbuffer(GLcontext *ctx, GLuint name, const GLvisual *visual,
+xmesa_new_renderbuffer(struct gl_context *ctx, GLuint name, const struct gl_config *visual,
GLboolean backBuffer)
{
struct xmesa_renderbuffer *xrb = CALLOC_STRUCT(xmesa_renderbuffer);
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index 5edafb890b1..acece2025cf 100644
--- a/src/mesa/drivers/x11/xm_dd.c
+++ b/src/mesa/drivers/x11/xm_dd.c
@@ -91,7 +91,7 @@ const int xmesa_kernel1[16] = {
static void
-finish_or_flush( GLcontext *ctx )
+finish_or_flush( struct gl_context *ctx )
{
#ifdef XFree86Server
/* NOT_NEEDED */
@@ -107,7 +107,7 @@ finish_or_flush( GLcontext *ctx )
static void
-clear_color( GLcontext *ctx, const GLfloat color[4] )
+clear_color( struct gl_context *ctx, const GLfloat color[4] )
{
if (ctx->DrawBuffer->Name == 0) {
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
@@ -134,12 +134,12 @@ clear_color( GLcontext *ctx, const GLfloat color[4] )
/* Implements glColorMask() */
static void
-color_mask(GLcontext *ctx,
+color_mask(struct gl_context *ctx,
GLboolean rmask, GLboolean gmask, GLboolean bmask, GLboolean amask)
{
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaBuffer xmbuf;
- const int xclass = xmesa->xm_visual->mesa_visual.visualType;
+ const int xclass = xmesa->xm_visual->visualType;
(void) amask;
if (ctx->DrawBuffer->Name != 0)
@@ -173,7 +173,7 @@ color_mask(GLcontext *ctx,
* Clear the front or back color buffer, if it's implemented with a pixmap.
*/
static void
-clear_pixmap(GLcontext *ctx, struct xmesa_renderbuffer *xrb,
+clear_pixmap(struct gl_context *ctx, struct xmesa_renderbuffer *xrb,
GLint x, GLint y, GLint width, GLint height)
{
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
@@ -193,7 +193,7 @@ clear_pixmap(GLcontext *ctx, struct xmesa_renderbuffer *xrb,
static void
-clear_8bit_ximage( GLcontext *ctx, struct xmesa_renderbuffer *xrb,
+clear_8bit_ximage( struct gl_context *ctx, struct xmesa_renderbuffer *xrb,
GLint x, GLint y, GLint width, GLint height )
{
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
@@ -206,7 +206,7 @@ clear_8bit_ximage( GLcontext *ctx, struct xmesa_renderbuffer *xrb,
static void
-clear_HPCR_ximage( GLcontext *ctx, struct xmesa_renderbuffer *xrb,
+clear_HPCR_ximage( struct gl_context *ctx, struct xmesa_renderbuffer *xrb,
GLint x, GLint y, GLint width, GLint height )
{
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
@@ -227,7 +227,7 @@ clear_HPCR_ximage( GLcontext *ctx, struct xmesa_renderbuffer *xrb,
static void
-clear_16bit_ximage( GLcontext *ctx, struct xmesa_renderbuffer *xrb,
+clear_16bit_ximage( struct gl_context *ctx, struct xmesa_renderbuffer *xrb,
GLint x, GLint y, GLint width, GLint height)
{
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
@@ -249,7 +249,7 @@ clear_16bit_ximage( GLcontext *ctx, struct xmesa_renderbuffer *xrb,
/* Optimized code provided by Nozomi Ytow <[email protected]> */
static void
-clear_24bit_ximage(GLcontext *ctx, struct xmesa_renderbuffer *xrb,
+clear_24bit_ximage(struct gl_context *ctx, struct xmesa_renderbuffer *xrb,
GLint x, GLint y, GLint width, GLint height)
{
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
@@ -282,7 +282,7 @@ clear_24bit_ximage(GLcontext *ctx, struct xmesa_renderbuffer *xrb,
static void
-clear_32bit_ximage(GLcontext *ctx, struct xmesa_renderbuffer *xrb,
+clear_32bit_ximage(struct gl_context *ctx, struct xmesa_renderbuffer *xrb,
GLint x, GLint y, GLint width, GLint height)
{
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
@@ -326,7 +326,7 @@ clear_32bit_ximage(GLcontext *ctx, struct xmesa_renderbuffer *xrb,
static void
-clear_nbit_ximage(GLcontext *ctx, struct xmesa_renderbuffer *xrb,
+clear_nbit_ximage(struct gl_context *ctx, struct xmesa_renderbuffer *xrb,
GLint x, GLint y, GLint width, GLint height)
{
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
@@ -345,7 +345,7 @@ clear_nbit_ximage(GLcontext *ctx, struct xmesa_renderbuffer *xrb,
static void
-clear_buffers(GLcontext *ctx, GLbitfield buffers)
+clear_buffers(struct gl_context *ctx, GLbitfield buffers)
{
if (ctx->DrawBuffer->Name == 0) {
/* this is a window system framebuffer */
@@ -396,7 +396,7 @@ clear_buffers(GLcontext *ctx, GLbitfield buffers)
* Check if we can do an optimized glDrawPixels into an 8R8G8B visual.
*/
static GLboolean
-can_do_DrawPixels_8R8G8B(GLcontext *ctx, GLenum format, GLenum type)
+can_do_DrawPixels_8R8G8B(struct gl_context *ctx, GLenum format, GLenum type)
{
if (format == GL_BGRA &&
type == GL_UNSIGNED_BYTE &&
@@ -432,7 +432,7 @@ can_do_DrawPixels_8R8G8B(GLcontext *ctx, GLenum format, GLenum type)
* The image format must be GL_BGRA to match the PF_8R8G8B pixel format.
*/
static void
-xmesa_DrawPixels_8R8G8B( GLcontext *ctx,
+xmesa_DrawPixels_8R8G8B( struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *unpack,
@@ -529,7 +529,7 @@ xmesa_DrawPixels_8R8G8B( GLcontext *ctx,
* Check if we can do an optimized glDrawPixels into an 5R6G5B visual.
*/
static GLboolean
-can_do_DrawPixels_5R6G5B(GLcontext *ctx, GLenum format, GLenum type)
+can_do_DrawPixels_5R6G5B(struct gl_context *ctx, GLenum format, GLenum type)
{
if (format == GL_RGB &&
type == GL_UNSIGNED_SHORT_5_6_5 &&
@@ -567,7 +567,7 @@ can_do_DrawPixels_5R6G5B(GLcontext *ctx, GLenum format, GLenum type)
* match the PF_5R6G5B pixel format.
*/
static void
-xmesa_DrawPixels_5R6G5B( GLcontext *ctx,
+xmesa_DrawPixels_5R6G5B( struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *unpack,
@@ -662,7 +662,7 @@ xmesa_DrawPixels_5R6G5B( GLcontext *ctx,
* Determine if we can do an optimized glCopyPixels.
*/
static GLboolean
-can_do_CopyPixels(GLcontext *ctx, GLenum type)
+can_do_CopyPixels(struct gl_context *ctx, GLenum type)
{
if (type == GL_COLOR &&
ctx->_ImageTransferState == 0 && /* no color tables, scale/bias, etc */
@@ -701,7 +701,7 @@ can_do_CopyPixels(GLcontext *ctx, GLenum type)
* We do support copying from one window to another, ala glXMakeCurrentRead.
*/
static void
-xmesa_CopyPixels( GLcontext *ctx,
+xmesa_CopyPixels( struct gl_context *ctx,
GLint srcx, GLint srcy, GLsizei width, GLsizei height,
GLint destx, GLint desty, GLenum type )
{
@@ -740,7 +740,7 @@ xmesa_CopyPixels( GLcontext *ctx,
* return a meaningful GL_RENDERER string.
*/
static const GLubyte *
-get_string( GLcontext *ctx, GLenum name )
+get_string( struct gl_context *ctx, GLenum name )
{
(void) ctx;
switch (name) {
@@ -767,7 +767,7 @@ get_string( GLcontext *ctx, GLenum name )
* dither enable/disable.
*/
static void
-enable( GLcontext *ctx, GLenum pname, GLboolean state )
+enable( struct gl_context *ctx, GLenum pname, GLboolean state )
{
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
@@ -785,7 +785,7 @@ enable( GLcontext *ctx, GLenum pname, GLboolean state )
static void
-clear_color_HPCR_ximage( GLcontext *ctx, const GLfloat color[4] )
+clear_color_HPCR_ximage( struct gl_context *ctx, const GLfloat color[4] )
{
int i;
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
@@ -819,7 +819,7 @@ clear_color_HPCR_ximage( GLcontext *ctx, const GLfloat color[4] )
static void
-clear_color_HPCR_pixmap( GLcontext *ctx, const GLfloat color[4] )
+clear_color_HPCR_pixmap( struct gl_context *ctx, const GLfloat color[4] )
{
int i;
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
@@ -863,7 +863,7 @@ clear_color_HPCR_pixmap( GLcontext *ctx, const GLfloat color[4] )
* flags.
*/
void
-xmesa_update_state( GLcontext *ctx, GLbitfield new_state )
+xmesa_update_state( struct gl_context *ctx, GLbitfield new_state )
{
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
@@ -954,7 +954,7 @@ xmesa_update_state( GLcontext *ctx, GLbitfield new_state )
* texels.
*/
static GLboolean
-test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level,
+test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat, GLenum format, GLenum type,
GLint width, GLint height, GLint depth, GLint border)
{
@@ -988,7 +988,7 @@ test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level,
* In SW, we don't really compress GL_COMPRESSED_RGB[A] textures!
*/
static gl_format
-choose_tex_format( GLcontext *ctx, GLint internalFormat,
+choose_tex_format( struct gl_context *ctx, GLint internalFormat,
GLenum format, GLenum type )
{
switch (internalFormat) {
@@ -1014,7 +1014,7 @@ choose_tex_format( GLcontext *ctx, GLint internalFormat,
* That problem led to the GLX_MESA_resize_buffers extension.
*/
static void
-xmesa_viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
+xmesa_viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
{
XMesaContext xmctx = XMESA_CONTEXT(ctx);
XMesaBuffer xmdrawbuf = XMESA_BUFFER(ctx->WinSysDrawBuffer);
@@ -1044,7 +1044,7 @@ struct xmesa_query_object
static struct gl_query_object *
-xmesa_new_query_object(GLcontext *ctx, GLuint id)
+xmesa_new_query_object(struct gl_context *ctx, GLuint id)
{
struct xmesa_query_object *q = CALLOC_STRUCT(xmesa_query_object);
if (q) {
@@ -1056,7 +1056,7 @@ xmesa_new_query_object(GLcontext *ctx, GLuint id)
static void
-xmesa_begin_query(GLcontext *ctx, struct gl_query_object *q)
+xmesa_begin_query(struct gl_context *ctx, struct gl_query_object *q)
{
if (q->Target == GL_TIME_ELAPSED_EXT) {
struct xmesa_query_object *xq = (struct xmesa_query_object *) q;
@@ -1083,7 +1083,7 @@ time_diff(const struct timeval *t0, const struct timeval *t1)
static void
-xmesa_end_query(GLcontext *ctx, struct gl_query_object *q)
+xmesa_end_query(struct gl_context *ctx, struct gl_query_object *q)
{
if (q->Target == GL_TIME_ELAPSED_EXT) {
struct xmesa_query_object *xq = (struct xmesa_query_object *) q;
@@ -1175,7 +1175,7 @@ xmesa_init_driver_functions( XMesaVisual xmvisual,
* functions.
* Called during context creation only.
*/
-void xmesa_register_swrast_functions( GLcontext *ctx )
+void xmesa_register_swrast_functions( struct gl_context *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT( ctx );
diff --git a/src/mesa/drivers/x11/xm_line.c b/src/mesa/drivers/x11/xm_line.c
index f643b6d3a76..f03f99f918f 100644
--- a/src/mesa/drivers/x11/xm_line.c
+++ b/src/mesa/drivers/x11/xm_line.c
@@ -54,7 +54,7 @@
*/
#if 000
/* XXX don't use this, it doesn't dither correctly */
-static void draw_points_ANY_pixmap( GLcontext *ctx, const SWvertex *vert )
+static void draw_points_ANY_pixmap( struct gl_context *ctx, const SWvertex *vert )
{
XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
@@ -89,7 +89,7 @@ static void draw_points_ANY_pixmap( GLcontext *ctx, const SWvertex *vert )
* our internal point functions, otherwise fall back to the standard
* swrast functions.
*/
-void xmesa_choose_point( GLcontext *ctx )
+void xmesa_choose_point( struct gl_context *ctx )
{
#if 0
XMesaContext xmesa = XMESA_CONTEXT(ctx);
@@ -546,7 +546,7 @@ void xmesa_choose_point( GLcontext *ctx )
* for the XSetLineAttributes() function call.
*/
static void
-xor_line(GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1)
+xor_line(struct gl_context *ctx, const SWvertex *vert0, const SWvertex *vert1)
{
XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaDisplay *dpy = xmesa->xm_visual->display;
@@ -578,7 +578,7 @@ xor_line(GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1)
* swrast fallback.
*/
static swrast_line_func
-get_line_func(GLcontext *ctx)
+get_line_func(struct gl_context *ctx)
{
#if CHAN_BITS == 8
SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -682,7 +682,7 @@ get_line_func(GLcontext *ctx)
* standard swrast functions.
*/
void
-xmesa_choose_line(GLcontext *ctx)
+xmesa_choose_line(struct gl_context *ctx)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
diff --git a/src/mesa/drivers/x11/xm_span.c b/src/mesa/drivers/x11/xm_span.c
index c39d87c4516..ab66c5e1f12 100644
--- a/src/mesa/drivers/x11/xm_span.c
+++ b/src/mesa/drivers/x11/xm_span.c
@@ -163,13 +163,13 @@ static unsigned long read_pixel( XMesaDisplay *dpy,
#define PUT_ROW_ARGS \
- GLcontext *ctx, \
+ struct gl_context *ctx, \
struct gl_renderbuffer *rb, \
GLuint n, GLint x, GLint y, \
const void *values, const GLubyte mask[]
#define RGB_SPAN_ARGS \
- GLcontext *ctx, \
+ struct gl_context *ctx, \
struct gl_renderbuffer *rb, \
GLuint n, GLint x, GLint y, \
const void *values, const GLubyte mask[]
@@ -2242,7 +2242,7 @@ static void put_row_rgb_GRAYSCALE8_ximage( RGB_SPAN_ARGS )
#define PUT_VALUES_ARGS \
- GLcontext *ctx, struct gl_renderbuffer *rb, \
+ struct gl_context *ctx, struct gl_renderbuffer *rb, \
GLuint n, const GLint x[], const GLint y[], \
const void *values, const GLubyte mask[]
@@ -2829,7 +2829,7 @@ static void put_values_GRAYSCALE8_ximage( PUT_VALUES_ARGS )
/**********************************************************************/
#define PUT_MONO_ROW_ARGS \
- GLcontext *ctx, struct gl_renderbuffer *rb, \
+ struct gl_context *ctx, struct gl_renderbuffer *rb, \
GLuint n, GLint x, GLint y, const void *value, \
const GLubyte mask[]
@@ -3267,7 +3267,7 @@ static void put_mono_row_DITHER_5R6G5B_ximage( PUT_MONO_ROW_ARGS )
/**********************************************************************/
#define PUT_MONO_VALUES_ARGS \
- GLcontext *ctx, struct gl_renderbuffer *rb, \
+ struct gl_context *ctx, struct gl_renderbuffer *rb, \
GLuint n, const GLint x[], const GLint y[], \
const void *value, const GLubyte mask[]
@@ -3773,7 +3773,7 @@ static void put_values_ci_ximage( PUT_VALUES_ARGS )
* else return number of pixels to skip in the destination array.
*/
static int
-clip_for_xgetimage(GLcontext *ctx, XMesaPixmap pixmap, GLuint *n, GLint *x, GLint *y)
+clip_for_xgetimage(struct gl_context *ctx, XMesaPixmap pixmap, GLuint *n, GLint *x, GLint *y)
{
XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaBuffer source = XMESA_BUFFER(ctx->DrawBuffer);
@@ -3813,7 +3813,7 @@ clip_for_xgetimage(GLcontext *ctx, XMesaPixmap pixmap, GLuint *n, GLint *x, GLin
* Read a horizontal span of color-index pixels.
*/
static void
-get_row_ci(GLcontext *ctx, struct gl_renderbuffer *rb,
+get_row_ci(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y, void *values)
{
GLuint *index = (GLuint *) values;
@@ -3870,7 +3870,7 @@ get_row_ci(GLcontext *ctx, struct gl_renderbuffer *rb,
* Read a horizontal span of color pixels.
*/
static void
-get_row_rgba(GLcontext *ctx, struct gl_renderbuffer *rb,
+get_row_rgba(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y, void *values)
{
GLubyte (*rgba)[4] = (GLubyte (*)[4]) values;
@@ -4272,7 +4272,7 @@ get_row_rgba(GLcontext *ctx, struct gl_renderbuffer *rb,
* Read an array of color index pixels.
*/
static void
-get_values_ci(GLcontext *ctx, struct gl_renderbuffer *rb,
+get_values_ci(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint n, const GLint x[], const GLint y[], void *values)
{
GLuint *indx = (GLuint *) values;
@@ -4296,7 +4296,7 @@ get_values_ci(GLcontext *ctx, struct gl_renderbuffer *rb,
static void
-get_values_rgba(GLcontext *ctx, struct gl_renderbuffer *rb,
+get_values_rgba(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint n, const GLint x[], const GLint y[], void *values)
{
GLubyte (*rgba)[4] = (GLubyte (*)[4]) values;
diff --git a/src/mesa/drivers/x11/xm_tri.c b/src/mesa/drivers/x11/xm_tri.c
index a6efb35e3c3..98dece113de 100644
--- a/src/mesa/drivers/x11/xm_tri.c
+++ b/src/mesa/drivers/x11/xm_tri.c
@@ -1448,7 +1448,7 @@ do { \
* swrast fallback.
*/
static swrast_tri_func
-get_triangle_func(GLcontext *ctx)
+get_triangle_func(struct gl_context *ctx)
{
#if CHAN_BITS == 8
SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -1644,7 +1644,7 @@ get_triangle_func(GLcontext *ctx)
* of our internal tri functions, otherwise fall back to the
* standard swrast functions.
*/
-void xmesa_choose_triangle( GLcontext *ctx )
+void xmesa_choose_triangle( struct gl_context *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
diff --git a/src/mesa/drivers/x11/xmesaP.h b/src/mesa/drivers/x11/xmesaP.h
index e0a6908228d..5d34b430cb6 100644
--- a/src/mesa/drivers/x11/xmesaP.h
+++ b/src/mesa/drivers/x11/xmesaP.h
@@ -54,7 +54,7 @@ struct xmesa_renderbuffer;
/* Function pointer for clearing color buffers */
-typedef void (*ClearFunc)( GLcontext *ctx, struct xmesa_renderbuffer *xrb,
+typedef void (*ClearFunc)( struct gl_context *ctx, struct xmesa_renderbuffer *xrb,
GLint x, GLint y, GLint width, GLint height );
@@ -80,12 +80,14 @@ enum pixel_format {
/**
- * Visual inforation, derived from GLvisual.
+ * Visual inforation, derived from struct gl_config.
* Basically corresponds to an XVisualInfo.
*/
struct xmesa_visual {
- GLvisual mesa_visual; /* Device independent visual parameters */
+ struct gl_config mesa_visual; /* Device independent visual parameters */
XMesaDisplay *display; /* The X11 display */
+ int screen, visualID;
+ int visualType;
#ifdef XFree86Server
GLint ColormapEntries;
GLint nplanes;
@@ -127,11 +129,11 @@ struct xmesa_visual {
/**
- * Context info, derived from GLcontext.
+ * Context info, derived from struct gl_context.
* Basically corresponds to a GLXContext.
*/
struct xmesa_context {
- GLcontext mesa; /* the core library context (containment) */
+ struct gl_context mesa; /* the core library context (containment) */
XMesaVisual xm_visual; /* Describes the buffers */
XMesaBuffer xm_buffer; /* current span/point/line/triangle buffer */
@@ -204,7 +206,7 @@ struct xmesa_renderbuffer
* Basically corresponds to a GLXDrawable.
*/
struct xmesa_buffer {
- GLframebuffer mesa_buffer; /* depth, stencil, accum, etc buffers */
+ struct gl_framebuffer mesa_buffer; /* depth, stencil, accum, etc buffers */
/* This MUST BE FIRST! */
GLboolean wasCurrent; /* was ever the current buffer? */
XMesaVisual xm_visual; /* the X/Mesa visual */
@@ -494,7 +496,7 @@ extern const int xmesa_kernel1[16];
*/
extern struct xmesa_renderbuffer *
-xmesa_new_renderbuffer(GLcontext *ctx, GLuint name, const GLvisual *visual,
+xmesa_new_renderbuffer(struct gl_context *ctx, GLuint name, const struct gl_config *visual,
GLboolean backBuffer);
extern void
@@ -504,7 +506,7 @@ extern XMesaBuffer
xmesa_find_buffer(XMesaDisplay *dpy, XMesaColormap cmap, XMesaBuffer notThis);
extern unsigned long
-xmesa_color_to_pixel( GLcontext *ctx,
+xmesa_color_to_pixel( struct gl_context *ctx,
GLubyte r, GLubyte g, GLubyte b, GLubyte a,
GLuint pixelFormat );
@@ -520,7 +522,7 @@ xmesa_init_driver_functions( XMesaVisual xmvisual,
struct dd_function_table *driver );
extern void
-xmesa_update_state( GLcontext *ctx, GLbitfield new_state );
+xmesa_update_state( struct gl_context *ctx, GLbitfield new_state );
extern void
xmesa_set_renderbuffer_funcs(struct xmesa_renderbuffer *xrb,
@@ -541,22 +543,22 @@ xmesa_renderbuffer(struct gl_renderbuffer *rb)
/**
- * Return pointer to XMesaContext corresponding to a Mesa GLcontext.
+ * Return pointer to XMesaContext corresponding to a Mesa struct gl_context.
* Since we're using structure containment, it's just a cast!.
*/
static INLINE XMesaContext
-XMESA_CONTEXT(GLcontext *ctx)
+XMESA_CONTEXT(struct gl_context *ctx)
{
return (XMesaContext) ctx;
}
/**
- * Return pointer to XMesaBuffer corresponding to a Mesa GLframebuffer.
+ * Return pointer to XMesaBuffer corresponding to a Mesa struct gl_framebuffer.
* Since we're using structure containment, it's just a cast!.
*/
static INLINE XMesaBuffer
-XMESA_BUFFER(GLframebuffer *b)
+XMESA_BUFFER(struct gl_framebuffer *b)
{
return (XMesaBuffer) b;
}
@@ -565,12 +567,12 @@ XMESA_BUFFER(GLframebuffer *b)
/* Plugged into the software rasterizer. Try to use internal
* swrast-style point, line and triangle functions.
*/
-extern void xmesa_choose_point( GLcontext *ctx );
-extern void xmesa_choose_line( GLcontext *ctx );
-extern void xmesa_choose_triangle( GLcontext *ctx );
+extern void xmesa_choose_point( struct gl_context *ctx );
+extern void xmesa_choose_line( struct gl_context *ctx );
+extern void xmesa_choose_triangle( struct gl_context *ctx );
-extern void xmesa_register_swrast_functions( GLcontext *ctx );
+extern void xmesa_register_swrast_functions( struct gl_context *ctx );
diff --git a/src/mesa/drivers/x11/xmesa_x.h b/src/mesa/drivers/x11/xmesa_x.h
index 865bab4313b..ea6cb3f24e1 100644
--- a/src/mesa/drivers/x11/xmesa_x.h
+++ b/src/mesa/drivers/x11/xmesa_x.h
@@ -79,7 +79,7 @@ typedef XColor XMesaColor;
#define GET_GREENMASK(__v) __v->mesa_visual.greenMask
#define GET_BLUEMASK(__v) __v->mesa_visual.blueMask
#define GET_VISUAL_DEPTH(__v) __v->visinfo->depth
-#define GET_BLACK_PIXEL(__v) BlackPixel(__v->display, __v->mesa_visual.screen)
+#define GET_BLACK_PIXEL(__v) BlackPixel(__v->display, __v->screen)
#define CHECK_BYTE_ORDER(__v) host_byte_order()==ImageByteOrder(__v->display)
#define CHECK_FOR_HPCR(__v) XInternAtom(__v->display, "_HP_RGB_SMOOTH_MAP_LIST", True)
diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c
index 2012d00fd5f..9026110f3ef 100644
--- a/src/mesa/main/accum.c
+++ b/src/mesa/main/accum.c
@@ -115,7 +115,7 @@ _mesa_init_accum_dispatch(struct _glapi_table *disp)
void
-_mesa_init_accum( GLcontext *ctx )
+_mesa_init_accum( struct gl_context *ctx )
{
/* Accumulate buffer group */
ASSIGN_4V( ctx->Accum.ClearColor, 0.0, 0.0, 0.0, 0.0 );
diff --git a/src/mesa/main/accum.h b/src/mesa/main/accum.h
index 4b628bafa02..def692a73a5 100644
--- a/src/mesa/main/accum.h
+++ b/src/mesa/main/accum.h
@@ -67,6 +67,6 @@ _mesa_init_accum_dispatch(struct _glapi_table *disp)
#endif /* FEATURE_accum */
extern void
-_mesa_init_accum( GLcontext *ctx );
+_mesa_init_accum( struct gl_context *ctx );
#endif /* ACCUM_H */
diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c
index ffcd194240f..172c33b47bf 100644
--- a/src/mesa/main/api_arrayelt.c
+++ b/src/mesa/main/api_arrayelt.c
@@ -1031,7 +1031,7 @@ static attrib_func AttribFuncsARB[2][4][8] = {
/**********************************************************************/
-GLboolean _ae_create_context( GLcontext *ctx )
+GLboolean _ae_create_context( struct gl_context *ctx )
{
if (ctx->aelt_context)
return GL_TRUE;
@@ -1064,7 +1064,7 @@ GLboolean _ae_create_context( GLcontext *ctx )
}
-void _ae_destroy_context( GLcontext *ctx )
+void _ae_destroy_context( struct gl_context *ctx )
{
if ( AE_CONTEXT( ctx ) ) {
FREE( ctx->aelt_context );
@@ -1092,7 +1092,7 @@ static void check_vbo( AEcontext *actx,
* etc).
* Note: this may be called during display list construction.
*/
-static void _ae_update_state( GLcontext *ctx )
+static void _ae_update_state( struct gl_context *ctx )
{
AEcontext *actx = AE_CONTEXT(ctx);
AEarray *aa = actx->arrays;
@@ -1211,7 +1211,7 @@ static void _ae_update_state( GLcontext *ctx )
actx->NewState = 0;
}
-void _ae_map_vbos( GLcontext *ctx )
+void _ae_map_vbos( struct gl_context *ctx )
{
AEcontext *actx = AE_CONTEXT(ctx);
GLuint i;
@@ -1232,7 +1232,7 @@ void _ae_map_vbos( GLcontext *ctx )
actx->mapped_vbos = GL_TRUE;
}
-void _ae_unmap_vbos( GLcontext *ctx )
+void _ae_unmap_vbos( struct gl_context *ctx )
{
AEcontext *actx = AE_CONTEXT(ctx);
GLuint i;
@@ -1300,7 +1300,7 @@ void GLAPIENTRY _ae_ArrayElement( GLint elt )
}
-void _ae_invalidate_state( GLcontext *ctx, GLuint new_state )
+void _ae_invalidate_state( struct gl_context *ctx, GLuint new_state )
{
AEcontext *actx = AE_CONTEXT(ctx);
diff --git a/src/mesa/main/api_arrayelt.h b/src/mesa/main/api_arrayelt.h
index d18c0792c35..610e522a943 100644
--- a/src/mesa/main/api_arrayelt.h
+++ b/src/mesa/main/api_arrayelt.h
@@ -37,15 +37,15 @@
(vfmt)->ArrayElement = impl ## ArrayElement; \
} while (0)
-extern GLboolean _ae_create_context( GLcontext *ctx );
-extern void _ae_destroy_context( GLcontext *ctx );
-extern void _ae_invalidate_state( GLcontext *ctx, GLuint new_state );
+extern GLboolean _ae_create_context( struct gl_context *ctx );
+extern void _ae_destroy_context( struct gl_context *ctx );
+extern void _ae_invalidate_state( struct gl_context *ctx, GLuint new_state );
extern void GLAPIENTRY _ae_ArrayElement( GLint elt );
/* May optionally be called before a batch of element calls:
*/
-extern void _ae_map_vbos( GLcontext *ctx );
-extern void _ae_unmap_vbos( GLcontext *ctx );
+extern void _ae_map_vbos( struct gl_context *ctx );
+extern void _ae_unmap_vbos( struct gl_context *ctx );
extern void
_mesa_install_arrayelt_vtxfmt(struct _glapi_table *disp,
@@ -56,18 +56,18 @@ _mesa_install_arrayelt_vtxfmt(struct _glapi_table *disp,
#define _MESA_INIT_ARRAYELT_VTXFMT(vfmt, impl) do { } while (0)
static INLINE GLboolean
-_ae_create_context( GLcontext *ctx )
+_ae_create_context( struct gl_context *ctx )
{
return GL_TRUE;
}
static INLINE void
-_ae_destroy_context( GLcontext *ctx )
+_ae_destroy_context( struct gl_context *ctx )
{
}
static INLINE void
-_ae_invalidate_state( GLcontext *ctx, GLuint new_state )
+_ae_invalidate_state( struct gl_context *ctx, GLuint new_state )
{
}
diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c
index ae653e1914e..cd002f6bc27 100644
--- a/src/mesa/main/api_exec.c
+++ b/src/mesa/main/api_exec.c
@@ -494,6 +494,9 @@ _mesa_create_exec_table(void)
SET_ActiveStencilFaceEXT(exec, _mesa_ActiveStencilFaceEXT);
#endif
+ /* 285. GL_NV_primitive_restart */
+ SET_PrimitiveRestartIndexNV(exec, _mesa_PrimitiveRestartIndex);
+
/* ???. GL_EXT_depth_bounds_test */
SET_DepthBoundsEXT(exec, _mesa_DepthBoundsEXT);
@@ -723,6 +726,13 @@ _mesa_create_exec_table(void)
SET_FramebufferTextureFaceARB(exec, _mesa_FramebufferTextureFaceARB);
#endif
+ /* GL_EXT_texture_integer */
+ SET_ClearColorIiEXT(exec, _mesa_ClearColorIiEXT);
+ SET_ClearColorIuiEXT(exec, _mesa_ClearColorIuiEXT);
+ SET_GetTexParameterIivEXT(exec, _mesa_GetTexParameterIiv);
+ SET_GetTexParameterIuivEXT(exec, _mesa_GetTexParameterIuiv);
+ SET_TexParameterIivEXT(exec, _mesa_TexParameterIiv);
+ SET_TexParameterIuivEXT(exec, _mesa_TexParameterIuiv);
return exec;
}
diff --git a/src/mesa/main/api_noop.c b/src/mesa/main/api_noop.c
index 9a36394d65e..08b4b4a3b67 100644
--- a/src/mesa/main/api_noop.c
+++ b/src/mesa/main/api_noop.c
@@ -679,6 +679,16 @@ static void GLAPIENTRY _mesa_noop_End( void )
}
+/***
+ * PrimitiveRestart called outside glBegin()/End(): raise an error
+ */
+static void GLAPIENTRY _mesa_noop_PrimitiveRestartNV( void )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glPrimitiveRestartNV(no glBegin)");
+}
+
+
/**
* Execute a glRectf() function. This is not suitable for GL_COMPILE
* modes (as the test for outside begin/end is not compiled),
@@ -1007,6 +1017,8 @@ _mesa_noop_vtxfmt_init( GLvertexformat *vfmt )
vfmt->EdgeFlag = _mesa_noop_EdgeFlag;
vfmt->End = _mesa_noop_End;
+ vfmt->PrimitiveRestartNV = _mesa_noop_PrimitiveRestartNV;
+
_MESA_INIT_EVAL_VTXFMT(vfmt, _mesa_noop_);
vfmt->FogCoordfEXT = _mesa_noop_FogCoordfEXT;
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index b3b5c6cc053..4929a9310d4 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -54,7 +54,7 @@ index_bytes(GLenum type, GLsizei count)
* Find the max index in the given element/index buffer
*/
GLuint
-_mesa_max_buffer_index(GLcontext *ctx, GLuint count, GLenum type,
+_mesa_max_buffer_index(struct gl_context *ctx, GLuint count, GLenum type,
const void *indices,
struct gl_buffer_object *elementBuf)
{
@@ -99,7 +99,7 @@ _mesa_max_buffer_index(GLcontext *ctx, GLuint count, GLenum type,
* Check if OK to draw arrays/elements.
*/
static GLboolean
-check_valid_to_render(GLcontext *ctx, const char *function)
+check_valid_to_render(struct gl_context *ctx, const char *function)
{
if (!_mesa_valid_to_render(ctx, function)) {
return GL_FALSE;
@@ -140,7 +140,7 @@ check_valid_to_render(GLcontext *ctx, const char *function)
* \return GL_TRUE if OK, GL_FALSE if any indexed vertex goes is out of bounds
*/
static GLboolean
-check_index_bounds(GLcontext *ctx, GLsizei count, GLenum type,
+check_index_bounds(struct gl_context *ctx, GLsizei count, GLenum type,
const GLvoid *indices, GLint basevertex)
{
struct _mesa_prim prim;
@@ -181,7 +181,7 @@ check_index_bounds(GLcontext *ctx, GLsizei count, GLenum type,
* \return GL_TRUE if OK to render, GL_FALSE if error found
*/
GLboolean
-_mesa_validate_DrawElements(GLcontext *ctx,
+_mesa_validate_DrawElements(struct gl_context *ctx,
GLenum mode, GLsizei count, GLenum type,
const GLvoid *indices, GLint basevertex)
{
@@ -237,7 +237,7 @@ _mesa_validate_DrawElements(GLcontext *ctx,
* \return GL_TRUE if OK to render, GL_FALSE if error found
*/
GLboolean
-_mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
+_mesa_validate_DrawRangeElements(struct gl_context *ctx, GLenum mode,
GLuint start, GLuint end,
GLsizei count, GLenum type,
const GLvoid *indices, GLint basevertex)
@@ -298,7 +298,7 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
* \return GL_TRUE if OK to render, GL_FALSE if error found
*/
GLboolean
-_mesa_validate_DrawArrays(GLcontext *ctx,
+_mesa_validate_DrawArrays(struct gl_context *ctx,
GLenum mode, GLint start, GLsizei count)
{
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
@@ -327,7 +327,7 @@ _mesa_validate_DrawArrays(GLcontext *ctx,
GLboolean
-_mesa_validate_DrawArraysInstanced(GLcontext *ctx, GLenum mode, GLint first,
+_mesa_validate_DrawArraysInstanced(struct gl_context *ctx, GLenum mode, GLint first,
GLsizei count, GLsizei primcount)
{
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
@@ -371,7 +371,7 @@ _mesa_validate_DrawArraysInstanced(GLcontext *ctx, GLenum mode, GLint first,
GLboolean
-_mesa_validate_DrawElementsInstanced(GLcontext *ctx,
+_mesa_validate_DrawElementsInstanced(struct gl_context *ctx,
GLenum mode, GLsizei count, GLenum type,
const GLvoid *indices, GLsizei primcount)
{
diff --git a/src/mesa/main/api_validate.h b/src/mesa/main/api_validate.h
index cd27d58aa7d..b232a90843e 100644
--- a/src/mesa/main/api_validate.h
+++ b/src/mesa/main/api_validate.h
@@ -32,32 +32,32 @@
extern GLuint
-_mesa_max_buffer_index(GLcontext *ctx, GLuint count, GLenum type,
+_mesa_max_buffer_index(struct gl_context *ctx, GLuint count, GLenum type,
const void *indices,
struct gl_buffer_object *elementBuf);
extern GLboolean
-_mesa_validate_DrawArrays(GLcontext *ctx,
+_mesa_validate_DrawArrays(struct gl_context *ctx,
GLenum mode, GLint start, GLsizei count);
extern GLboolean
-_mesa_validate_DrawElements(GLcontext *ctx,
+_mesa_validate_DrawElements(struct gl_context *ctx,
GLenum mode, GLsizei count, GLenum type,
const GLvoid *indices, GLint basevertex);
extern GLboolean
-_mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
+_mesa_validate_DrawRangeElements(struct gl_context *ctx, GLenum mode,
GLuint start, GLuint end,
GLsizei count, GLenum type,
const GLvoid *indices, GLint basevertex);
extern GLboolean
-_mesa_validate_DrawArraysInstanced(GLcontext *ctx, GLenum mode, GLint first,
+_mesa_validate_DrawArraysInstanced(struct gl_context *ctx, GLenum mode, GLint first,
GLsizei count, GLsizei primcount);
extern GLboolean
-_mesa_validate_DrawElementsInstanced(GLcontext *ctx,
+_mesa_validate_DrawElementsInstanced(struct gl_context *ctx,
GLenum mode, GLsizei count, GLenum type,
const GLvoid *indices, GLsizei primcount);
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
index 0069cd3dcfd..0d64b7de8dd 100644
--- a/src/mesa/main/arrayobj.c
+++ b/src/mesa/main/arrayobj.c
@@ -61,7 +61,7 @@
*/
static INLINE struct gl_array_object *
-lookup_arrayobj(GLcontext *ctx, GLuint id)
+lookup_arrayobj(struct gl_context *ctx, GLuint id)
{
if (id == 0)
return NULL;
@@ -77,7 +77,7 @@ lookup_arrayobj(GLcontext *ctx, GLuint id)
* This is done just prior to array object destruction.
*/
static void
-unbind_array_object_vbos(GLcontext *ctx, struct gl_array_object *obj)
+unbind_array_object_vbos(struct gl_context *ctx, struct gl_array_object *obj)
{
GLuint i;
@@ -109,7 +109,7 @@ unbind_array_object_vbos(GLcontext *ctx, struct gl_array_object *obj)
* \c dd_function_table::NewArrayObject.
*/
struct gl_array_object *
-_mesa_new_array_object( GLcontext *ctx, GLuint name )
+_mesa_new_array_object( struct gl_context *ctx, GLuint name )
{
struct gl_array_object *obj = CALLOC_STRUCT(gl_array_object);
if (obj)
@@ -125,7 +125,7 @@ _mesa_new_array_object( GLcontext *ctx, GLuint name )
* \c dd_function_table::DeleteArrayObject.
*/
void
-_mesa_delete_array_object( GLcontext *ctx, struct gl_array_object *obj )
+_mesa_delete_array_object( struct gl_context *ctx, struct gl_array_object *obj )
{
(void) ctx;
unbind_array_object_vbos(ctx, obj);
@@ -138,7 +138,7 @@ _mesa_delete_array_object( GLcontext *ctx, struct gl_array_object *obj )
* Set ptr to arrayObj w/ reference counting.
*/
void
-_mesa_reference_array_object(GLcontext *ctx,
+_mesa_reference_array_object(struct gl_context *ctx,
struct gl_array_object **ptr,
struct gl_array_object *arrayObj)
{
@@ -193,7 +193,7 @@ _mesa_reference_array_object(GLcontext *ctx,
static void
-init_array(GLcontext *ctx,
+init_array(struct gl_context *ctx,
struct gl_client_array *array, GLint size, GLint type)
{
array->Size = size;
@@ -216,7 +216,7 @@ init_array(GLcontext *ctx,
* Initialize a gl_array_object's arrays.
*/
void
-_mesa_initialize_array_object( GLcontext *ctx,
+_mesa_initialize_array_object( struct gl_context *ctx,
struct gl_array_object *obj,
GLuint name )
{
@@ -253,7 +253,7 @@ _mesa_initialize_array_object( GLcontext *ctx,
* Add the given array object to the array object pool.
*/
static void
-save_array_object( GLcontext *ctx, struct gl_array_object *obj )
+save_array_object( struct gl_context *ctx, struct gl_array_object *obj )
{
if (obj->Name > 0) {
/* insert into hash table */
@@ -267,7 +267,7 @@ save_array_object( GLcontext *ctx, struct gl_array_object *obj )
* Do not deallocate the array object though.
*/
static void
-remove_array_object( GLcontext *ctx, struct gl_array_object *obj )
+remove_array_object( struct gl_context *ctx, struct gl_array_object *obj )
{
if (obj->Name > 0) {
/* remove from hash table */
@@ -327,7 +327,7 @@ update_min(GLuint min, struct gl_client_array *array)
* Examine vertex arrays to update the gl_array_object::_MaxElement field.
*/
void
-_mesa_update_array_object_max_element(GLcontext *ctx,
+_mesa_update_array_object_max_element(struct gl_context *ctx,
struct gl_array_object *arrayObj)
{
GLuint i, min = ~0;
@@ -364,7 +364,7 @@ _mesa_update_array_object_max_element(GLcontext *ctx,
* glGenVertexArrays().
*/
static void
-bind_vertex_array(GLcontext *ctx, GLuint id, GLboolean genRequired)
+bind_vertex_array(struct gl_context *ctx, GLuint id, GLboolean genRequired)
{
struct gl_array_object * const oldObj = ctx->Array.ArrayObj;
struct gl_array_object *newObj = NULL;
@@ -495,7 +495,7 @@ _mesa_DeleteVertexArraysAPPLE(GLsizei n, const GLuint *ids)
* \param vboOnly Will arrays have to reside in VBOs?
*/
static void
-gen_vertex_arrays(GLcontext *ctx, GLsizei n, GLuint *arrays, GLboolean vboOnly)
+gen_vertex_arrays(struct gl_context *ctx, GLsizei n, GLuint *arrays, GLboolean vboOnly)
{
GLuint first;
GLint i;
diff --git a/src/mesa/main/arrayobj.h b/src/mesa/main/arrayobj.h
index fdf7e2bca46..26e3af19c91 100644
--- a/src/mesa/main/arrayobj.h
+++ b/src/mesa/main/arrayobj.h
@@ -43,23 +43,23 @@
*/
extern struct gl_array_object *
-_mesa_new_array_object( GLcontext *ctx, GLuint name );
+_mesa_new_array_object( struct gl_context *ctx, GLuint name );
extern void
-_mesa_delete_array_object( GLcontext *ctx, struct gl_array_object *obj );
+_mesa_delete_array_object( struct gl_context *ctx, struct gl_array_object *obj );
extern void
-_mesa_reference_array_object(GLcontext *ctx,
+_mesa_reference_array_object(struct gl_context *ctx,
struct gl_array_object **ptr,
struct gl_array_object *arrayObj);
extern void
-_mesa_initialize_array_object( GLcontext *ctx,
+_mesa_initialize_array_object( struct gl_context *ctx,
struct gl_array_object *obj, GLuint name );
extern void
-_mesa_update_array_object_max_element(GLcontext *ctx,
+_mesa_update_array_object_max_element(struct gl_context *ctx,
struct gl_array_object *arrayObj);
diff --git a/src/mesa/main/atifragshader.c b/src/mesa/main/atifragshader.c
index 550f50b7a00..ae2feb3229a 100644
--- a/src/mesa/main/atifragshader.c
+++ b/src/mesa/main/atifragshader.c
@@ -62,7 +62,7 @@ _mesa_init_ati_fragment_shader_dispatch(struct _glapi_table *disp)
* Allocate and initialize a new ATI fragment shader object.
*/
struct ati_fragment_shader *
-_mesa_new_ati_fragment_shader(GLcontext *ctx, GLuint id)
+_mesa_new_ati_fragment_shader(struct gl_context *ctx, GLuint id)
{
struct ati_fragment_shader *s = CALLOC_STRUCT(ati_fragment_shader);
(void) ctx;
@@ -78,7 +78,7 @@ _mesa_new_ati_fragment_shader(GLcontext *ctx, GLuint id)
* Delete the given ati fragment shader
*/
void
-_mesa_delete_ati_fragment_shader(GLcontext *ctx, struct ati_fragment_shader *s)
+_mesa_delete_ati_fragment_shader(struct gl_context *ctx, struct ati_fragment_shader *s)
{
GLuint i;
for (i = 0; i < MAX_NUM_PASSES_ATI; i++) {
diff --git a/src/mesa/main/atifragshader.h b/src/mesa/main/atifragshader.h
index 31c335ec815..6911bba5aee 100644
--- a/src/mesa/main/atifragshader.h
+++ b/src/mesa/main/atifragshader.h
@@ -66,10 +66,10 @@ extern void
_mesa_init_ati_fragment_shader_dispatch(struct _glapi_table *disp);
extern struct ati_fragment_shader *
-_mesa_new_ati_fragment_shader(GLcontext *ctx, GLuint id);
+_mesa_new_ati_fragment_shader(struct gl_context *ctx, GLuint id);
extern void
-_mesa_delete_ati_fragment_shader(GLcontext *ctx,
+_mesa_delete_ati_fragment_shader(struct gl_context *ctx,
struct ati_fragment_shader *s);
@@ -133,13 +133,13 @@ _mesa_init_ati_fragment_shader_dispatch(struct _glapi_table *disp)
}
static INLINE struct ati_fragment_shader *
-_mesa_new_ati_fragment_shader(GLcontext *ctx, GLuint id)
+_mesa_new_ati_fragment_shader(struct gl_context *ctx, GLuint id)
{
return NULL;
}
static INLINE void
-_mesa_delete_ati_fragment_shader(GLcontext *ctx,
+_mesa_delete_ati_fragment_shader(struct gl_context *ctx,
struct ati_fragment_shader *s)
{
}
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 0299525f46b..fb6fbe5b6db 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -473,7 +473,7 @@ end:
static void
-pop_enable_group(GLcontext *ctx, const struct gl_enable_attrib *enable)
+pop_enable_group(struct gl_context *ctx, const struct gl_enable_attrib *enable)
{
const GLuint curTexUnitSave = ctx->Texture.CurrentUnit;
GLuint i;
@@ -669,7 +669,7 @@ pop_enable_group(GLcontext *ctx, const struct gl_enable_attrib *enable)
* Pop/restore texture attribute/group state.
*/
static void
-pop_texture_group(GLcontext *ctx, struct texture_state *texstate)
+pop_texture_group(struct gl_context *ctx, struct texture_state *texstate)
{
GLuint u;
@@ -1323,7 +1323,7 @@ adjust_buffer_object_ref_counts(struct gl_array_object *arrayObj, GLint step)
* object refcounts.
*/
static void
-copy_pixelstore(GLcontext *ctx,
+copy_pixelstore(struct gl_context *ctx,
struct gl_pixelstore_attrib *dst,
const struct gl_pixelstore_attrib *src)
{
@@ -1506,7 +1506,7 @@ _mesa_init_attrib_dispatch(struct _glapi_table *disp)
* Free any attribute state data that might be attached to the context.
*/
void
-_mesa_free_attrib_data(GLcontext *ctx)
+_mesa_free_attrib_data(struct gl_context *ctx)
{
while (ctx->AttribStackDepth > 0) {
struct gl_attrib_node *attr, *next;
@@ -1538,7 +1538,7 @@ _mesa_free_attrib_data(GLcontext *ctx)
}
-void _mesa_init_attrib( GLcontext *ctx )
+void _mesa_init_attrib( struct gl_context *ctx )
{
/* Renderer and client attribute stacks */
ctx->AttribStackDepth = 0;
diff --git a/src/mesa/main/attrib.h b/src/mesa/main/attrib.h
index 83b28a65b77..777781bdf0d 100644
--- a/src/mesa/main/attrib.h
+++ b/src/mesa/main/attrib.h
@@ -70,9 +70,9 @@ _mesa_init_attrib_dispatch(struct _glapi_table *disp)
#endif /* FEATURE_attrib_stack */
extern void
-_mesa_init_attrib( GLcontext *ctx );
+_mesa_init_attrib( struct gl_context *ctx );
extern void
-_mesa_free_attrib_data( GLcontext *ctx );
+_mesa_free_attrib_data( struct gl_context *ctx );
#endif /* ATTRIB_H */
diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c
index 736a94c052a..ec778b7244d 100644
--- a/src/mesa/main/blend.c
+++ b/src/mesa/main/blend.c
@@ -207,7 +207,7 @@ _mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB,
#if _HAVE_FULL_GL
static GLboolean
-_mesa_validate_blend_equation( GLcontext *ctx,
+_mesa_validate_blend_equation( struct gl_context *ctx,
GLenum mode, GLboolean is_separate )
{
switch (mode) {
@@ -589,9 +589,9 @@ _mesa_ClampColorARB(GLenum target, GLenum clamp)
* \param ctx GL context.
*
* Initializes the related fields in the context color attribute group,
- * __GLcontextRec::Color.
+ * __struct gl_contextRec::Color.
*/
-void _mesa_init_color( GLcontext * ctx )
+void _mesa_init_color( struct gl_context * ctx )
{
/* Color buffer group */
ctx->Color.IndexMask = ~0u;
diff --git a/src/mesa/main/blend.h b/src/mesa/main/blend.h
index b4fd7470ebe..677b01cc9fc 100644
--- a/src/mesa/main/blend.h
+++ b/src/mesa/main/blend.h
@@ -82,6 +82,6 @@ _mesa_ClampColorARB(GLenum target, GLenum clamp);
extern void
-_mesa_init_color( GLcontext * ctx );
+_mesa_init_color( struct gl_context * ctx );
#endif
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 61d46b936b2..0a68008a100 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -62,7 +62,7 @@
* specified context or \c NULL if \c target is invalid.
*/
static INLINE struct gl_buffer_object **
-get_buffer_target(GLcontext *ctx, GLenum target)
+get_buffer_target(struct gl_context *ctx, GLenum target)
{
switch (target) {
case GL_ARRAY_BUFFER_ARB:
@@ -99,7 +99,7 @@ get_buffer_target(GLcontext *ctx, GLenum target)
* specified context or \c NULL if \c target is invalid.
*/
static INLINE struct gl_buffer_object *
-get_buffer(GLcontext *ctx, GLenum target)
+get_buffer(struct gl_context *ctx, GLenum target)
{
struct gl_buffer_object **bufObj = get_buffer_target(ctx, target);
if (bufObj)
@@ -143,7 +143,7 @@ simplified_access_mode(GLbitfield access)
* \sa glBufferSubDataARB, glGetBufferSubDataARB
*/
static struct gl_buffer_object *
-buffer_object_subdata_range_good( GLcontext * ctx, GLenum target,
+buffer_object_subdata_range_good( struct gl_context * ctx, GLenum target,
GLintptrARB offset, GLsizeiptrARB size,
const char *caller )
{
@@ -189,7 +189,7 @@ buffer_object_subdata_range_good( GLcontext * ctx, GLenum target,
* Default callback for the \c dd_function_table::NewBufferObject() hook.
*/
static struct gl_buffer_object *
-_mesa_new_buffer_object( GLcontext *ctx, GLuint name, GLenum target )
+_mesa_new_buffer_object( struct gl_context *ctx, GLuint name, GLenum target )
{
struct gl_buffer_object *obj;
@@ -207,7 +207,7 @@ _mesa_new_buffer_object( GLcontext *ctx, GLuint name, GLenum target )
* Default callback for the \c dd_function_table::DeleteBuffer() hook.
*/
static void
-_mesa_delete_buffer_object( GLcontext *ctx, struct gl_buffer_object *bufObj )
+_mesa_delete_buffer_object( struct gl_context *ctx, struct gl_buffer_object *bufObj )
{
(void) ctx;
@@ -228,7 +228,7 @@ _mesa_delete_buffer_object( GLcontext *ctx, struct gl_buffer_object *bufObj )
* Set ptr to bufObj w/ reference counting.
*/
void
-_mesa_reference_buffer_object(GLcontext *ctx,
+_mesa_reference_buffer_object(struct gl_context *ctx,
struct gl_buffer_object **ptr,
struct gl_buffer_object *bufObj)
{
@@ -328,7 +328,7 @@ _mesa_initialize_buffer_object( struct gl_buffer_object *obj,
* \sa glBufferDataARB, dd_function_table::BufferData.
*/
static GLboolean
-_mesa_buffer_data( GLcontext *ctx, GLenum target, GLsizeiptrARB size,
+_mesa_buffer_data( struct gl_context *ctx, GLenum target, GLsizeiptrARB size,
const GLvoid * data, GLenum usage,
struct gl_buffer_object * bufObj )
{
@@ -372,7 +372,7 @@ _mesa_buffer_data( GLcontext *ctx, GLenum target, GLsizeiptrARB size,
* \sa glBufferSubDataARB, dd_function_table::BufferSubData.
*/
static void
-_mesa_buffer_subdata( GLcontext *ctx, GLenum target, GLintptrARB offset,
+_mesa_buffer_subdata( struct gl_context *ctx, GLenum target, GLintptrARB offset,
GLsizeiptrARB size, const GLvoid * data,
struct gl_buffer_object * bufObj )
{
@@ -405,7 +405,7 @@ _mesa_buffer_subdata( GLcontext *ctx, GLenum target, GLintptrARB offset,
* \sa glBufferGetSubDataARB, dd_function_table::GetBufferSubData.
*/
static void
-_mesa_buffer_get_subdata( GLcontext *ctx, GLenum target, GLintptrARB offset,
+_mesa_buffer_get_subdata( struct gl_context *ctx, GLenum target, GLintptrARB offset,
GLsizeiptrARB size, GLvoid * data,
struct gl_buffer_object * bufObj )
{
@@ -432,7 +432,7 @@ _mesa_buffer_get_subdata( GLcontext *ctx, GLenum target, GLintptrARB offset,
* \sa glMapBufferARB, dd_function_table::MapBuffer
*/
static void *
-_mesa_buffer_map( GLcontext *ctx, GLenum target, GLenum access,
+_mesa_buffer_map( struct gl_context *ctx, GLenum target, GLenum access,
struct gl_buffer_object *bufObj )
{
(void) ctx;
@@ -455,7 +455,7 @@ _mesa_buffer_map( GLcontext *ctx, GLenum target, GLenum access,
* Called via glMapBufferRange().
*/
static void *
-_mesa_buffer_map_range( GLcontext *ctx, GLenum target, GLintptr offset,
+_mesa_buffer_map_range( struct gl_context *ctx, GLenum target, GLintptr offset,
GLsizeiptr length, GLbitfield access,
struct gl_buffer_object *bufObj )
{
@@ -476,7 +476,7 @@ _mesa_buffer_map_range( GLcontext *ctx, GLenum target, GLintptr offset,
* Called via glFlushMappedBufferRange().
*/
static void
-_mesa_buffer_flush_mapped_range( GLcontext *ctx, GLenum target,
+_mesa_buffer_flush_mapped_range( struct gl_context *ctx, GLenum target,
GLintptr offset, GLsizeiptr length,
struct gl_buffer_object *obj )
{
@@ -497,7 +497,7 @@ _mesa_buffer_flush_mapped_range( GLcontext *ctx, GLenum target,
* \sa glUnmapBufferARB, dd_function_table::UnmapBuffer
*/
static GLboolean
-_mesa_buffer_unmap( GLcontext *ctx, GLenum target,
+_mesa_buffer_unmap( struct gl_context *ctx, GLenum target,
struct gl_buffer_object *bufObj )
{
(void) ctx;
@@ -516,7 +516,7 @@ _mesa_buffer_unmap( GLcontext *ctx, GLenum target,
* Called via glCopyBuffserSubData().
*/
static void
-_mesa_copy_buffer_subdata(GLcontext *ctx,
+_mesa_copy_buffer_subdata(struct gl_context *ctx,
struct gl_buffer_object *src,
struct gl_buffer_object *dst,
GLintptr readOffset, GLintptr writeOffset,
@@ -546,7 +546,7 @@ _mesa_copy_buffer_subdata(GLcontext *ctx,
* Initialize the state associated with buffer objects
*/
void
-_mesa_init_buffer_objects( GLcontext *ctx )
+_mesa_init_buffer_objects( struct gl_context *ctx )
{
_mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj,
ctx->Shared->NullBufferObj);
@@ -561,7 +561,7 @@ _mesa_init_buffer_objects( GLcontext *ctx )
void
-_mesa_free_buffer_objects( GLcontext *ctx )
+_mesa_free_buffer_objects( struct gl_context *ctx )
{
_mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj, NULL);
_mesa_reference_buffer_object(ctx, &ctx->Array.ElementArrayBufferObj, NULL);
@@ -576,7 +576,7 @@ _mesa_free_buffer_objects( GLcontext *ctx )
* Called by glBindBuffer() and other functions.
*/
static void
-bind_buffer_object(GLcontext *ctx, GLenum target, GLuint buffer)
+bind_buffer_object(struct gl_context *ctx, GLenum target, GLuint buffer)
{
struct gl_buffer_object *oldBufObj;
struct gl_buffer_object *newBufObj = NULL;
@@ -632,7 +632,7 @@ bind_buffer_object(GLcontext *ctx, GLenum target, GLuint buffer)
* shared state.
*/
void
-_mesa_update_default_objects_buffer_objects(GLcontext *ctx)
+_mesa_update_default_objects_buffer_objects(struct gl_context *ctx)
{
/* Bind the NullBufferObj to remove references to those
* in the shared context hash table.
@@ -716,7 +716,7 @@ _mesa_validate_pbo_access(GLuint dimensions,
* \return NULL if error, else pointer to start of data
*/
const GLvoid *
-_mesa_map_pbo_source(GLcontext *ctx,
+_mesa_map_pbo_source(struct gl_context *ctx,
const struct gl_pixelstore_attrib *unpack,
const GLvoid *src)
{
@@ -750,7 +750,7 @@ _mesa_map_pbo_source(GLcontext *ctx,
* _mesa_unmap_pbo_source().
*/
const GLvoid *
-_mesa_map_validate_pbo_source(GLcontext *ctx,
+_mesa_map_validate_pbo_source(struct gl_context *ctx,
GLuint dimensions,
const struct gl_pixelstore_attrib *unpack,
GLsizei width, GLsizei height, GLsizei depth,
@@ -786,7 +786,7 @@ _mesa_map_validate_pbo_source(GLcontext *ctx,
* Counterpart to _mesa_map_pbo_source()
*/
void
-_mesa_unmap_pbo_source(GLcontext *ctx,
+_mesa_unmap_pbo_source(struct gl_context *ctx,
const struct gl_pixelstore_attrib *unpack)
{
ASSERT(unpack != &ctx->Pack); /* catch pack/unpack mismatch */
@@ -806,7 +806,7 @@ _mesa_unmap_pbo_source(GLcontext *ctx,
* \return NULL if error, else pointer to start of data
*/
void *
-_mesa_map_pbo_dest(GLcontext *ctx,
+_mesa_map_pbo_dest(struct gl_context *ctx,
const struct gl_pixelstore_attrib *pack,
GLvoid *dest)
{
@@ -840,7 +840,7 @@ _mesa_map_pbo_dest(GLcontext *ctx,
* _mesa_unmap_pbo_dest().
*/
GLvoid *
-_mesa_map_validate_pbo_dest(GLcontext *ctx,
+_mesa_map_validate_pbo_dest(struct gl_context *ctx,
GLuint dimensions,
const struct gl_pixelstore_attrib *unpack,
GLsizei width, GLsizei height, GLsizei depth,
@@ -876,7 +876,7 @@ _mesa_map_validate_pbo_dest(GLcontext *ctx,
* Counterpart to _mesa_map_pbo_dest()
*/
void
-_mesa_unmap_pbo_dest(GLcontext *ctx,
+_mesa_unmap_pbo_dest(struct gl_context *ctx,
const struct gl_pixelstore_attrib *pack)
{
ASSERT(pack != &ctx->Unpack); /* catch pack/unpack mismatch */
@@ -892,7 +892,7 @@ _mesa_unmap_pbo_dest(GLcontext *ctx,
* Always return NULL for ID 0.
*/
struct gl_buffer_object *
-_mesa_lookup_bufferobj(GLcontext *ctx, GLuint buffer)
+_mesa_lookup_bufferobj(struct gl_context *ctx, GLuint buffer)
{
if (buffer == 0)
return NULL;
@@ -909,7 +909,7 @@ _mesa_lookup_bufferobj(GLcontext *ctx, GLuint buffer)
* unbound from all arrays in the current context.
*/
static void
-unbind(GLcontext *ctx,
+unbind(struct gl_context *ctx,
struct gl_buffer_object **ptr,
struct gl_buffer_object *obj)
{
@@ -1754,7 +1754,7 @@ _mesa_FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
#if FEATURE_APPLE_object_purgeable
static GLenum
-_mesa_BufferObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option)
+_mesa_BufferObjectPurgeable(struct gl_context *ctx, GLuint name, GLenum option)
{
struct gl_buffer_object *bufObj;
GLenum retval;
@@ -1787,7 +1787,7 @@ _mesa_BufferObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option)
static GLenum
-_mesa_RenderObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option)
+_mesa_RenderObjectPurgeable(struct gl_context *ctx, GLuint name, GLenum option)
{
struct gl_renderbuffer *bufObj;
GLenum retval;
@@ -1816,7 +1816,7 @@ _mesa_RenderObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option)
static GLenum
-_mesa_TextureObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option)
+_mesa_TextureObjectPurgeable(struct gl_context *ctx, GLuint name, GLenum option)
{
struct gl_texture_object *bufObj;
GLenum retval;
@@ -1897,7 +1897,7 @@ _mesa_ObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
static GLenum
-_mesa_BufferObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
+_mesa_BufferObjectUnpurgeable(struct gl_context *ctx, GLuint name, GLenum option)
{
struct gl_buffer_object *bufObj;
GLenum retval;
@@ -1927,7 +1927,7 @@ _mesa_BufferObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
static GLenum
-_mesa_RenderObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
+_mesa_RenderObjectUnpurgeable(struct gl_context *ctx, GLuint name, GLenum option)
{
struct gl_renderbuffer *bufObj;
GLenum retval;
@@ -1957,7 +1957,7 @@ _mesa_RenderObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
static GLenum
-_mesa_TextureObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
+_mesa_TextureObjectUnpurgeable(struct gl_context *ctx, GLuint name, GLenum option)
{
struct gl_texture_object *bufObj;
GLenum retval;
@@ -2027,7 +2027,7 @@ _mesa_ObjectUnpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
static void
-_mesa_GetBufferObjectParameterivAPPLE(GLcontext *ctx, GLuint name,
+_mesa_GetBufferObjectParameterivAPPLE(struct gl_context *ctx, GLuint name,
GLenum pname, GLint* params)
{
struct gl_buffer_object *bufObj;
@@ -2053,7 +2053,7 @@ _mesa_GetBufferObjectParameterivAPPLE(GLcontext *ctx, GLuint name,
static void
-_mesa_GetRenderObjectParameterivAPPLE(GLcontext *ctx, GLuint name,
+_mesa_GetRenderObjectParameterivAPPLE(struct gl_context *ctx, GLuint name,
GLenum pname, GLint* params)
{
struct gl_renderbuffer *bufObj;
@@ -2079,7 +2079,7 @@ _mesa_GetRenderObjectParameterivAPPLE(GLcontext *ctx, GLuint name,
static void
-_mesa_GetTextureObjectParameterivAPPLE(GLcontext *ctx, GLuint name,
+_mesa_GetTextureObjectParameterivAPPLE(struct gl_context *ctx, GLuint name,
GLenum pname, GLint* params)
{
struct gl_texture_object *bufObj;
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index f234d06c6cc..4b97e34767e 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -57,24 +57,24 @@ _mesa_is_bufferobj(const struct gl_buffer_object *obj)
extern void
-_mesa_init_buffer_objects( GLcontext *ctx );
+_mesa_init_buffer_objects( struct gl_context *ctx );
extern void
-_mesa_free_buffer_objects( GLcontext *ctx );
+_mesa_free_buffer_objects( struct gl_context *ctx );
extern void
-_mesa_update_default_objects_buffer_objects(GLcontext *ctx);
+_mesa_update_default_objects_buffer_objects(struct gl_context *ctx);
extern struct gl_buffer_object *
-_mesa_lookup_bufferobj(GLcontext *ctx, GLuint buffer);
+_mesa_lookup_bufferobj(struct gl_context *ctx, GLuint buffer);
extern void
_mesa_initialize_buffer_object( struct gl_buffer_object *obj,
GLuint name, GLenum target );
extern void
-_mesa_reference_buffer_object(GLcontext *ctx,
+_mesa_reference_buffer_object(struct gl_context *ctx,
struct gl_buffer_object **ptr,
struct gl_buffer_object *bufObj);
@@ -85,12 +85,12 @@ _mesa_validate_pbo_access(GLuint dimensions,
GLenum format, GLenum type, const GLvoid *ptr);
extern const GLvoid *
-_mesa_map_pbo_source(GLcontext *ctx,
+_mesa_map_pbo_source(struct gl_context *ctx,
const struct gl_pixelstore_attrib *unpack,
const GLvoid *src);
extern const GLvoid *
-_mesa_map_validate_pbo_source(GLcontext *ctx,
+_mesa_map_validate_pbo_source(struct gl_context *ctx,
GLuint dimensions,
const struct gl_pixelstore_attrib *unpack,
GLsizei width, GLsizei height, GLsizei depth,
@@ -98,16 +98,16 @@ _mesa_map_validate_pbo_source(GLcontext *ctx,
const char *where);
extern void
-_mesa_unmap_pbo_source(GLcontext *ctx,
+_mesa_unmap_pbo_source(struct gl_context *ctx,
const struct gl_pixelstore_attrib *unpack);
extern void *
-_mesa_map_pbo_dest(GLcontext *ctx,
+_mesa_map_pbo_dest(struct gl_context *ctx,
const struct gl_pixelstore_attrib *pack,
GLvoid *dest);
extern GLvoid *
-_mesa_map_validate_pbo_dest(GLcontext *ctx,
+_mesa_map_validate_pbo_dest(struct gl_context *ctx,
GLuint dimensions,
const struct gl_pixelstore_attrib *unpack,
GLsizei width, GLsizei height, GLsizei depth,
@@ -115,7 +115,7 @@ _mesa_map_validate_pbo_dest(GLcontext *ctx,
const char *where);
extern void
-_mesa_unmap_pbo_dest(GLcontext *ctx,
+_mesa_unmap_pbo_dest(struct gl_context *ctx,
const struct gl_pixelstore_attrib *pack);
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
index fb30b599609..86446311fe3 100644
--- a/src/mesa/main/buffers.c
+++ b/src/mesa/main/buffers.c
@@ -50,7 +50,7 @@
* \return bitmask of BUFFER_BIT_* flags
*/
static GLbitfield
-supported_buffer_bitmask(const GLcontext *ctx, const struct gl_framebuffer *fb)
+supported_buffer_bitmask(const struct gl_context *ctx, const struct gl_framebuffer *fb)
{
GLbitfield mask = 0x0;
@@ -355,7 +355,7 @@ _mesa_DrawBuffersARB(GLsizei n, const GLenum *buffers)
* BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT).
*/
void
-_mesa_drawbuffers(GLcontext *ctx, GLuint n, const GLenum *buffers,
+_mesa_drawbuffers(struct gl_context *ctx, GLuint n, const GLenum *buffers,
const GLbitfield *destMask)
{
struct gl_framebuffer *fb = ctx->DrawBuffer;
@@ -452,7 +452,7 @@ _mesa_drawbuffers(GLcontext *ctx, GLuint n, const GLenum *buffers,
* \param bufferIndex the numerical index corresponding to 'buffer'
*/
void
-_mesa_readbuffer(GLcontext *ctx, GLenum buffer, GLint bufferIndex)
+_mesa_readbuffer(struct gl_context *ctx, GLenum buffer, GLint bufferIndex)
{
struct gl_framebuffer *fb = ctx->ReadBuffer;
diff --git a/src/mesa/main/buffers.h b/src/mesa/main/buffers.h
index 8a7e7b5c1f0..36d6c8b6608 100644
--- a/src/mesa/main/buffers.h
+++ b/src/mesa/main/buffers.h
@@ -43,11 +43,11 @@ extern void GLAPIENTRY
_mesa_DrawBuffersARB(GLsizei n, const GLenum *buffers);
extern void
-_mesa_drawbuffers(GLcontext *ctx, GLuint n, const GLenum *buffers,
+_mesa_drawbuffers(struct gl_context *ctx, GLuint n, const GLenum *buffers,
const GLbitfield *destMask);
extern void
-_mesa_readbuffer(GLcontext *ctx, GLenum buffer, GLint bufferIndex);
+_mesa_readbuffer(struct gl_context *ctx, GLenum buffer, GLint bufferIndex);
extern void GLAPIENTRY
_mesa_ReadBuffer( GLenum mode );
diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c
index 49d86b3b1f1..61bc836a38d 100644
--- a/src/mesa/main/clear.c
+++ b/src/mesa/main/clear.c
@@ -96,11 +96,73 @@ _mesa_ClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
/**
+ * GL_EXT_texture_integer
+ */
+void GLAPIENTRY
+_mesa_ClearColorIiEXT(GLint r, GLint g, GLint b, GLint a)
+{
+ GLfloat tmp[4];
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ tmp[0] = (GLfloat) r;
+ tmp[1] = (GLfloat) g;
+ tmp[2] = (GLfloat) b;
+ tmp[3] = (GLfloat) a;
+
+ if (TEST_EQ_4V(tmp, ctx->Color.ClearColor))
+ return; /* no change */
+
+ FLUSH_VERTICES(ctx, _NEW_COLOR);
+
+ /* XXX we should eventually have a float/int/uint union for
+ * the ctx->Color.ClearColor state.
+ */
+ COPY_4V(ctx->Color.ClearColor, tmp);
+
+ if (ctx->Driver.ClearColor) {
+ ctx->Driver.ClearColor(ctx, ctx->Color.ClearColor);
+ }
+}
+
+
+/**
+ * GL_EXT_texture_integer
+ */
+void GLAPIENTRY
+_mesa_ClearColorIuiEXT(GLuint r, GLuint g, GLuint b, GLuint a)
+{
+ GLfloat tmp[4];
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ tmp[0] = (GLfloat) r;
+ tmp[1] = (GLfloat) g;
+ tmp[2] = (GLfloat) b;
+ tmp[3] = (GLfloat) a;
+
+ if (TEST_EQ_4V(tmp, ctx->Color.ClearColor))
+ return; /* no change */
+
+ FLUSH_VERTICES(ctx, _NEW_COLOR);
+
+ /* XXX we should eventually have a float/int/uint union for
+ * the ctx->Color.ClearColor state.
+ */
+ COPY_4V(ctx->Color.ClearColor, tmp);
+
+ if (ctx->Driver.ClearColor) {
+ ctx->Driver.ClearColor(ctx, ctx->Color.ClearColor);
+ }
+}
+
+
+/**
* Clear buffers.
*
* \param mask bit-mask indicating the buffers to be cleared.
*
- * Flushes the vertices and verifies the parameter. If __GLcontextRec::NewState
+ * Flushes the vertices and verifies the parameter. If __struct gl_contextRec::NewState
* is set then calls _mesa_update_state() to update gl_frame_buffer::_Xmin,
* etc. If the rasterization mode is set to GL_RENDER then requests the driver
* to clear the buffers, via the dd_function_table::Clear callback.
@@ -191,7 +253,7 @@ _mesa_Clear( GLbitfield mask )
* Return INVALID_MASK if the drawbuffer value is invalid.
*/
static GLbitfield
-make_color_buffer_mask(GLcontext *ctx, GLint drawbuffer)
+make_color_buffer_mask(struct gl_context *ctx, GLint drawbuffer)
{
const struct gl_renderbuffer_attachment *att = ctx->DrawBuffer->Attachment;
GLbitfield mask = 0x0;
diff --git a/src/mesa/main/clear.h b/src/mesa/main/clear.h
index 6657370c4b6..78327192034 100644
--- a/src/mesa/main/clear.h
+++ b/src/mesa/main/clear.h
@@ -38,6 +38,13 @@ _mesa_ClearColor( GLclampf red, GLclampf green,
GLclampf blue, GLclampf alpha );
extern void GLAPIENTRY
+_mesa_ClearColorIiEXT(GLint r, GLint g, GLint b, GLint a);
+
+extern void GLAPIENTRY
+_mesa_ClearColorIuiEXT(GLuint r, GLuint g, GLuint b, GLuint a);
+
+
+extern void GLAPIENTRY
_mesa_Clear( GLbitfield mask );
diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c
index 5c2697d40af..caa95835bc2 100644
--- a/src/mesa/main/colortab.c
+++ b/src/mesa/main/colortab.c
@@ -29,6 +29,7 @@
#include "context.h"
#include "image.h"
#include "macros.h"
+#include "pack.h"
#include "state.h"
#include "teximage.h"
#include "texstate.h"
@@ -176,7 +177,7 @@ set_component_sizes( struct gl_color_table *table )
* \param [rgba]Bias - RGBA bias factors
*/
static void
-store_colortable_entries(GLcontext *ctx, struct gl_color_table *table,
+store_colortable_entries(struct gl_context *ctx, struct gl_color_table *table,
GLsizei start, GLsizei count,
GLenum format, GLenum type, const GLvoid *data,
GLfloat rScale, GLfloat rBias,
diff --git a/src/mesa/main/condrender.c b/src/mesa/main/condrender.c
index 8d9a91d5478..25b3dd678dc 100644
--- a/src/mesa/main/condrender.c
+++ b/src/mesa/main/condrender.c
@@ -117,7 +117,7 @@ _mesa_EndConditionalRender(void)
* \return GL_TRUE if we should render, GL_FALSE if we should discard
*/
GLboolean
-_mesa_check_conditional_render(GLcontext *ctx)
+_mesa_check_conditional_render(struct gl_context *ctx)
{
struct gl_query_object *q = ctx->Query.CondRenderQuery;
diff --git a/src/mesa/main/condrender.h b/src/mesa/main/condrender.h
index d55e9805fe9..cf6d4ca2893 100644
--- a/src/mesa/main/condrender.h
+++ b/src/mesa/main/condrender.h
@@ -39,7 +39,7 @@ extern void APIENTRY
_mesa_EndConditionalRender(void);
extern GLboolean
-_mesa_check_conditional_render(GLcontext *ctx);
+_mesa_check_conditional_render(struct gl_context *ctx);
#endif /* CONDRENDER_H */
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 00132514d77..3ebe54926ff 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -137,7 +137,7 @@
#endif
#include "glsl_parser_extras.h"
-
+#include <stdbool.h>
#ifndef MESA_VERBOSE
@@ -163,7 +163,7 @@ GLfloat _mesa_ubyte_to_float_color_tab[256];
* We have to finish any pending rendering.
*/
void
-_mesa_notifySwapBuffers(__GLcontext *ctx)
+_mesa_notifySwapBuffers(struct gl_context *ctx)
{
if (MESA_VERBOSE & VERBOSE_SWAPBUFFERS)
_mesa_debug(ctx, "SwapBuffers\n");
@@ -180,7 +180,7 @@ _mesa_notifySwapBuffers(__GLcontext *ctx)
/*@{*/
/**
- * Allocates a GLvisual structure and initializes it via
+ * Allocates a struct gl_config structure and initializes it via
* _mesa_initialize_visual().
*
* \param dbFlag double buffering
@@ -198,12 +198,12 @@ _mesa_notifySwapBuffers(__GLcontext *ctx)
* \param alphaBits same as above.
* \param numSamples not really used.
*
- * \return pointer to new GLvisual or NULL if requested parameters can't be
+ * \return pointer to new struct gl_config or NULL if requested parameters can't be
* met.
*
* \note Need to add params for level and numAuxBuffers (at least)
*/
-GLvisual *
+struct gl_config *
_mesa_create_visual( GLboolean dbFlag,
GLboolean stereoFlag,
GLint redBits,
@@ -218,7 +218,7 @@ _mesa_create_visual( GLboolean dbFlag,
GLint accumAlphaBits,
GLint numSamples )
{
- GLvisual *vis = (GLvisual *) calloc(1, sizeof(GLvisual));
+ struct gl_config *vis = (struct gl_config *) calloc(1, sizeof(struct gl_config));
if (vis) {
if (!_mesa_initialize_visual(vis, dbFlag, stereoFlag,
redBits, greenBits, blueBits, alphaBits,
@@ -235,15 +235,15 @@ _mesa_create_visual( GLboolean dbFlag,
/**
* Makes some sanity checks and fills in the fields of the
- * GLvisual object with the given parameters. If the caller needs
- * to set additional fields, he should just probably init the whole GLvisual
+ * struct gl_config object with the given parameters. If the caller needs
+ * to set additional fields, he should just probably init the whole struct gl_config
* object himself.
* \return GL_TRUE on success, or GL_FALSE on failure.
*
* \sa _mesa_create_visual() above for the parameter description.
*/
GLboolean
-_mesa_initialize_visual( GLvisual *vis,
+_mesa_initialize_visual( struct gl_config *vis,
GLboolean dbFlag,
GLboolean stereoFlag,
GLint redBits,
@@ -296,7 +296,6 @@ _mesa_initialize_visual( GLvisual *vis,
vis->numAuxBuffers = 0;
vis->level = 0;
- vis->pixmapMode = 0;
vis->sampleBuffers = numSamples > 0 ? 1 : 0;
vis->samples = numSamples;
@@ -312,7 +311,7 @@ _mesa_initialize_visual( GLvisual *vis,
* Frees the visual structure.
*/
void
-_mesa_destroy_visual( GLvisual *vis )
+_mesa_destroy_visual( struct gl_config *vis )
{
free(vis);
}
@@ -378,7 +377,7 @@ _glthread_DECLARE_STATIC_MUTEX(OneTimeLock);
* \sa _math_init().
*/
static void
-one_time_init( GLcontext *ctx )
+one_time_init( struct gl_context *ctx )
{
static GLboolean alreadyCalled = GL_FALSE;
(void) ctx;
@@ -445,7 +444,7 @@ one_time_init( GLcontext *ctx )
* Initialize fields of gl_current_attrib (aka ctx->Current.*)
*/
static void
-_mesa_init_current(GLcontext *ctx)
+_mesa_init_current(struct gl_context *ctx)
{
GLuint i;
@@ -527,7 +526,7 @@ init_program_limits(GLenum type, struct gl_program_constants *prog)
* some of these values (such as number of texture units).
*/
static void
-_mesa_init_constants(GLcontext *ctx)
+_mesa_init_constants(struct gl_context *ctx)
{
assert(ctx);
@@ -593,11 +592,7 @@ _mesa_init_constants(GLcontext *ctx)
/* Shading language version */
if (ctx->API == API_OPENGL) {
-#if FEATURE_ARB_shading_language_120
ctx->Const.GLSLVersion = 120;
-#else
- ctx->Const.GLSLVersion = 110;
-#endif
}
else if (ctx->API == API_OPENGLES2) {
ctx->Const.GLSLVersion = 100;
@@ -633,7 +628,7 @@ _mesa_init_constants(GLcontext *ctx)
* Only called the first time a context is bound.
*/
static void
-check_context_limits(GLcontext *ctx)
+check_context_limits(struct gl_context *ctx)
{
/* check that we don't exceed the size of various bitfields */
assert(VERT_RESULT_MAX <=
@@ -708,7 +703,7 @@ check_context_limits(GLcontext *ctx)
* functions for the more complex data structures.
*/
static GLboolean
-init_attrib_groups(GLcontext *ctx)
+init_attrib_groups(struct gl_context *ctx)
{
assert(ctx);
@@ -776,7 +771,7 @@ init_attrib_groups(GLcontext *ctx)
* state.
*/
static GLboolean
-update_default_objects(GLcontext *ctx)
+update_default_objects(struct gl_context *ctx)
{
assert(ctx);
@@ -828,7 +823,7 @@ _mesa_alloc_dispatch_table(int size)
/**
- * Initialize a GLcontext struct (rendering context).
+ * Initialize a struct gl_context struct (rendering context).
*
* This includes allocating all the other structs and arrays which hang off of
* the context by pointers.
@@ -855,10 +850,10 @@ _mesa_alloc_dispatch_table(int size)
* \param driverContext pointer to driver-specific context data
*/
GLboolean
-_mesa_initialize_context_for_api(GLcontext *ctx,
+_mesa_initialize_context_for_api(struct gl_context *ctx,
gl_api api,
- const GLvisual *visual,
- GLcontext *share_list,
+ const struct gl_config *visual,
+ struct gl_context *share_list,
const struct dd_function_table *driverFunctions,
void *driverContext)
{
@@ -950,11 +945,6 @@ _mesa_initialize_context_for_api(GLcontext *ctx,
switch (ctx->API) {
case API_OPENGL:
- /* Neutral tnl module stuff */
- _mesa_init_exec_vtxfmt( ctx );
- ctx->TnlModule.Current = NULL;
- ctx->TnlModule.SwapCount = 0;
-
#if FEATURE_dlist
ctx->Save = _mesa_create_save_table();
if (!ctx->Save) {
@@ -994,9 +984,9 @@ _mesa_initialize_context_for_api(GLcontext *ctx,
}
GLboolean
-_mesa_initialize_context(GLcontext *ctx,
- const GLvisual *visual,
- GLcontext *share_list,
+_mesa_initialize_context(struct gl_context *ctx,
+ const struct gl_config *visual,
+ struct gl_context *share_list,
const struct dd_function_table *driverFunctions,
void *driverContext)
{
@@ -1009,33 +999,33 @@ _mesa_initialize_context(GLcontext *ctx,
}
/**
- * Allocate and initialize a GLcontext structure.
+ * Allocate and initialize a struct gl_context structure.
* Note that the driver needs to pass in its dd_function_table here since
* we need to at least call driverFunctions->NewTextureObject to initialize
* the rendering context.
*
* \param api the GL API type to create the context for
- * \param visual a GLvisual pointer (we copy the struct contents)
+ * \param visual a struct gl_config pointer (we copy the struct contents)
* \param share_list another context to share display lists with or NULL
* \param driverFunctions points to the dd_function_table into which the
* driver has plugged in all its special functions.
* \param driverContext points to the device driver's private context state
*
- * \return pointer to a new __GLcontextRec or NULL if error.
+ * \return pointer to a new __struct gl_contextRec or NULL if error.
*/
-GLcontext *
+struct gl_context *
_mesa_create_context_for_api(gl_api api,
- const GLvisual *visual,
- GLcontext *share_list,
+ const struct gl_config *visual,
+ struct gl_context *share_list,
const struct dd_function_table *driverFunctions,
void *driverContext)
{
- GLcontext *ctx;
+ struct gl_context *ctx;
ASSERT(visual);
/*ASSERT(driverContext);*/
- ctx = (GLcontext *) calloc(1, sizeof(GLcontext));
+ ctx = (struct gl_context *) calloc(1, sizeof(struct gl_context));
if (!ctx)
return NULL;
@@ -1049,9 +1039,9 @@ _mesa_create_context_for_api(gl_api api,
}
}
-GLcontext *
-_mesa_create_context(const GLvisual *visual,
- GLcontext *share_list,
+struct gl_context *
+_mesa_create_context(const struct gl_config *visual,
+ struct gl_context *share_list,
const struct dd_function_table *driverFunctions,
void *driverContext)
{
@@ -1064,12 +1054,12 @@ _mesa_create_context(const GLvisual *visual,
/**
* Free the data associated with the given context.
*
- * But doesn't free the GLcontext struct itself.
+ * But doesn't free the struct gl_context struct itself.
*
* \sa _mesa_initialize_context() and init_attrib_groups().
*/
void
-_mesa_free_context_data( GLcontext *ctx )
+_mesa_free_context_data( struct gl_context *ctx )
{
if (!_mesa_get_current_context()){
/* No current context, but we may need one in order to delete
@@ -1143,14 +1133,14 @@ _mesa_free_context_data( GLcontext *ctx )
/**
- * Destroy a GLcontext structure.
+ * Destroy a struct gl_context structure.
*
* \param ctx GL context.
*
- * Calls _mesa_free_context_data() and frees the GLcontext structure itself.
+ * Calls _mesa_free_context_data() and frees the struct gl_context structure itself.
*/
void
-_mesa_destroy_context( GLcontext *ctx )
+_mesa_destroy_context( struct gl_context *ctx )
{
if (ctx) {
_mesa_free_context_data(ctx);
@@ -1173,7 +1163,7 @@ _mesa_destroy_context( GLcontext *ctx )
* structures.
*/
void
-_mesa_copy_context( const GLcontext *src, GLcontext *dst, GLuint mask )
+_mesa_copy_context( const struct gl_context *src, struct gl_context *dst, GLuint mask )
{
if (mask & GL_ACCUM_BUFFER_BIT) {
/* OK to memcpy */
@@ -1292,10 +1282,10 @@ _mesa_copy_context( const GLcontext *src, GLcontext *dst, GLuint mask )
* \return GL_TRUE if compatible, GL_FALSE otherwise.
*/
static GLboolean
-check_compatible(const GLcontext *ctx, const GLframebuffer *buffer)
+check_compatible(const struct gl_context *ctx, const struct gl_framebuffer *buffer)
{
- const GLvisual *ctxvis = &ctx->Visual;
- const GLvisual *bufvis = &buffer->Visual;
+ const struct gl_config *ctxvis = &ctx->Visual;
+ const struct gl_config *bufvis = &buffer->Visual;
if (ctxvis == bufvis)
return GL_TRUE;
@@ -1341,7 +1331,7 @@ check_compatible(const GLcontext *ctx, const GLframebuffer *buffer)
* Really, the device driver should totally take care of this.
*/
static void
-initialize_framebuffer_size(GLcontext *ctx, GLframebuffer *fb)
+initialize_framebuffer_size(struct gl_context *ctx, struct gl_framebuffer *fb)
{
GLuint width, height;
if (ctx->Driver.GetBufferSize) {
@@ -1358,7 +1348,7 @@ initialize_framebuffer_size(GLcontext *ctx, GLframebuffer *fb)
* Initialize the size if the given width and height are non-zero.
*/
void
-_mesa_check_init_viewport(GLcontext *ctx, GLuint width, GLuint height)
+_mesa_check_init_viewport(struct gl_context *ctx, GLuint width, GLuint height)
{
if (!ctx->ViewportInitialized && width > 0 && height > 0) {
/* Note: set flag here, before calling _mesa_set_viewport(), to prevent
@@ -1386,8 +1376,8 @@ _mesa_check_init_viewport(GLcontext *ctx, GLuint width, GLuint height)
* \param readBuffer the reading framebuffer
*/
GLboolean
-_mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
- GLframebuffer *readBuffer )
+_mesa_make_current( struct gl_context *newCtx, struct gl_framebuffer *drawBuffer,
+ struct gl_framebuffer *readBuffer )
{
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(newCtx, "_mesa_make_current()\n");
@@ -1525,7 +1515,7 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
* be deleted if nobody else is sharing them.
*/
GLboolean
-_mesa_share_state(GLcontext *ctx, GLcontext *ctxToShare)
+_mesa_share_state(struct gl_context *ctx, struct gl_context *ctxToShare)
{
if (ctx && ctxToShare && ctx->Shared && ctxToShare->Shared) {
struct gl_shared_state *oldSharedState = ctx->Shared;
@@ -1556,10 +1546,10 @@ _mesa_share_state(GLcontext *ctx, GLcontext *ctxToShare)
* context. If you need speed, see the #GET_CURRENT_CONTEXT macro in
* context.h.
*/
-GLcontext *
+struct gl_context *
_mesa_get_current_context( void )
{
- return (GLcontext *) _glapi_get_context();
+ return (struct gl_context *) _glapi_get_context();
}
@@ -1573,10 +1563,10 @@ _mesa_get_current_context( void )
*
* \return pointer to dispatch_table.
*
- * Simply returns __GLcontextRec::CurrentDispatch.
+ * Simply returns __struct gl_contextRec::CurrentDispatch.
*/
struct _glapi_table *
-_mesa_get_dispatch(GLcontext *ctx)
+_mesa_get_dispatch(struct gl_context *ctx)
{
return ctx->CurrentDispatch;
}
@@ -1602,7 +1592,7 @@ _mesa_get_dispatch(GLcontext *ctx)
* This is called via _mesa_error().
*/
void
-_mesa_record_error(GLcontext *ctx, GLenum error)
+_mesa_record_error(struct gl_context *ctx, GLenum error)
{
if (!ctx)
return;
@@ -1622,7 +1612,7 @@ _mesa_record_error(GLcontext *ctx, GLenum error)
* Flush commands and wait for completion.
*/
void
-_mesa_finish(GLcontext *ctx)
+_mesa_finish(struct gl_context *ctx)
{
FLUSH_CURRENT( ctx, 0 );
if (ctx->Driver.Finish) {
@@ -1635,7 +1625,7 @@ _mesa_finish(GLcontext *ctx)
* Flush commands.
*/
void
-_mesa_flush(GLcontext *ctx)
+_mesa_flush(struct gl_context *ctx)
{
FLUSH_CURRENT( ctx, 0 );
if (ctx->Driver.Flush) {
@@ -1681,7 +1671,7 @@ _mesa_Flush(void)
* Otherwise we default to MUL/MAD.
*/
void
-_mesa_set_mvp_with_dp4( GLcontext *ctx,
+_mesa_set_mvp_with_dp4( struct gl_context *ctx,
GLboolean flag )
{
ctx->mvp_with_dp4 = flag;
@@ -1697,15 +1687,20 @@ _mesa_set_mvp_with_dp4( GLcontext *ctx,
* \return GL_TRUE if OK to render, GL_FALSE if not
*/
GLboolean
-_mesa_valid_to_render(GLcontext *ctx, const char *where)
+_mesa_valid_to_render(struct gl_context *ctx, const char *where)
{
+ bool vert_from_glsl_shader = false;
+ bool geom_from_glsl_shader = false;
+ bool frag_from_glsl_shader = false;
+
/* This depends on having up to date derived state (shaders) */
if (ctx->NewState)
_mesa_update_state(ctx);
- if (ctx->Shader.CurrentProgram) {
- /* using shaders */
- if (!ctx->Shader.CurrentProgram->LinkStatus) {
+ if (ctx->Shader.CurrentVertexProgram) {
+ vert_from_glsl_shader = true;
+
+ if (!ctx->Shader.CurrentVertexProgram->LinkStatus) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"%s(shader not linked)", where);
return GL_FALSE;
@@ -1713,23 +1708,86 @@ _mesa_valid_to_render(GLcontext *ctx, const char *where)
#if 0 /* not normally enabled */
{
char errMsg[100];
- if (!_mesa_validate_shader_program(ctx, ctx->Shader.CurrentProgram,
+ if (!_mesa_validate_shader_program(ctx,
+ ctx->Shader.CurrentVertexProgram,
errMsg)) {
_mesa_warning(ctx, "Shader program %u is invalid: %s",
- ctx->Shader.CurrentProgram->Name, errMsg);
+ ctx->Shader.CurrentVertexProgram->Name, errMsg);
}
}
#endif
}
- else {
- if (ctx->VertexProgram.Enabled && !ctx->VertexProgram._Enabled) {
+
+ if (ctx->Shader.CurrentGeometryProgram) {
+ geom_from_glsl_shader = true;
+
+ if (!ctx->Shader.CurrentGeometryProgram->LinkStatus) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "%s(shader not linked)", where);
+ return GL_FALSE;
+ }
+#if 0 /* not normally enabled */
+ {
+ char errMsg[100];
+ if (!_mesa_validate_shader_program(ctx,
+ ctx->Shader.CurrentGeometryProgram,
+ errMsg)) {
+ _mesa_warning(ctx, "Shader program %u is invalid: %s",
+ ctx->Shader.CurrentGeometryProgram->Name, errMsg);
+ }
+ }
+#endif
+ }
+
+ if (ctx->Shader.CurrentFragmentProgram) {
+ frag_from_glsl_shader = true;
+
+ if (!ctx->Shader.CurrentFragmentProgram->LinkStatus) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "%s(vertex program not valid)", where);
+ "%s(shader not linked)", where);
return GL_FALSE;
}
+#if 0 /* not normally enabled */
+ {
+ char errMsg[100];
+ if (!_mesa_validate_shader_program(ctx,
+ ctx->Shader.CurrentFragmentProgram,
+ errMsg)) {
+ _mesa_warning(ctx, "Shader program %u is invalid: %s",
+ ctx->Shader.CurrentFragmentProgram->Name, errMsg);
+ }
+ }
+#endif
+ }
+
+ /* Any shader stages that are not supplied by the GLSL shader and have
+ * assembly shaders enabled must now be validated.
+ */
+ if (!vert_from_glsl_shader
+ && ctx->VertexProgram.Enabled && !ctx->VertexProgram._Enabled) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "%s(vertex program not valid)", where);
+ return GL_FALSE;
+ }
+
+ /* FINISHME: If GL_NV_geometry_program4 is ever supported, the current
+ * FINISHME: geometry program should validated here.
+ */
+ (void) geom_from_glsl_shader;
+
+ if (!frag_from_glsl_shader) {
if (ctx->FragmentProgram.Enabled && !ctx->FragmentProgram._Enabled) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "%s(fragment program not valid)", where);
+ return GL_FALSE;
+ }
+
+ /* If drawing to integer-valued color buffers, there must be an
+ * active fragment shader (GL_EXT_texture_integer).
+ */
+ if (ctx->DrawBuffer && ctx->DrawBuffer->_IntegerColor) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "%s(fragment program not valid)", where);
+ "%s(integer format but no fragment shader)", where);
return GL_FALSE;
}
}
@@ -1742,26 +1800,51 @@ _mesa_valid_to_render(GLcontext *ctx, const char *where)
#ifdef DEBUG
if (ctx->Shader.Flags & GLSL_LOG) {
- struct gl_shader_program *shProg = ctx->Shader.CurrentProgram;
- if (shProg) {
- if (!shProg->_Used) {
- /* This is the first time this shader is being used.
- * Append shader's constants/uniforms to log file.
- */
- GLuint i;
- for (i = 0; i < shProg->NumShaders; i++) {
- struct gl_shader *sh = shProg->Shaders[i];
- if (sh->Type == GL_VERTEX_SHADER) {
- _mesa_append_uniforms_to_file(sh,
- &shProg->VertexProgram->Base);
- }
- else if (sh->Type == GL_FRAGMENT_SHADER) {
- _mesa_append_uniforms_to_file(sh,
- &shProg->FragmentProgram->Base);
- }
- }
- shProg->_Used = GL_TRUE;
- }
+ struct gl_shader_program *shProg[MESA_SHADER_TYPES];
+ unsigned i;
+
+ shProg[MESA_SHADER_VERTEX] = ctx->Shader.CurrentVertexProgram;
+ shProg[MESA_SHADER_GEOMETRY] = ctx->Shader.CurrentGeometryProgram;
+ shProg[MESA_SHADER_FRAGMENT] = ctx->Shader.CurrentFragmentProgram;
+
+ for (i = 0; i < MESA_SHADER_TYPES; i++) {
+ struct gl_shader *sh;
+
+ if (shProg[i] == NULL || shProg[i]->_Used
+ || shProg[i]->_LinkedShaders[i] == NULL)
+ continue;
+
+ /* This is the first time this shader is being used.
+ * Append shader's constants/uniforms to log file.
+ *
+ * The logic is a little odd here. We only want to log data for each
+ * shader target that will actually be used, and we only want to log
+ * it once. It's possible to have a program bound to the vertex
+ * shader target that also supplied a fragment shader. If that
+ * program isn't also bound to the fragment shader target we don't
+ * want to log its fragment data.
+ */
+ sh = shProg[i]->_LinkedShaders[i];
+ switch (sh->Type) {
+ case GL_VERTEX_SHADER:
+ _mesa_append_uniforms_to_file(sh, &shProg[i]->VertexProgram->Base);
+ break;
+
+ case GL_GEOMETRY_SHADER_ARB:
+ _mesa_append_uniforms_to_file(sh,
+ &shProg[i]->GeometryProgram->Base);
+ break;
+
+ case GL_FRAGMENT_SHADER:
+ _mesa_append_uniforms_to_file(sh,
+ &shProg[i]->FragmentProgram->Base);
+ break;
+ }
+ }
+
+ for (i = 0; i < MESA_SHADER_TYPES; i++) {
+ if (shProg[i] != NULL)
+ shProg[i]->_Used = GL_TRUE;
}
}
#endif
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index c61da62826f..42d98a33a8d 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -29,16 +29,16 @@
*
* There are three large Mesa data types/classes which are meant to be
* used by device drivers:
- * - GLcontext: this contains the Mesa rendering state
- * - GLvisual: this describes the color buffer (RGB vs. ci), whether or not
+ * - struct gl_context: this contains the Mesa rendering state
+ * - struct gl_config: this describes the color buffer (RGB vs. ci), whether or not
* there's a depth buffer, stencil buffer, etc.
- * - GLframebuffer: contains pointers to the depth buffer, stencil buffer,
+ * - struct gl_framebuffer: contains pointers to the depth buffer, stencil buffer,
* accum buffer and alpha buffers.
*
* These types should be encapsulated by corresponding device driver
* data types. See xmesa.h and xmesaP.h for an example.
*
- * In OOP terms, GLcontext, GLvisual, and GLframebuffer are base classes
+ * In OOP terms, struct gl_context, struct gl_config, and struct gl_framebuffer are base classes
* which the device driver must derive from.
*
* The following functions create and destroy these data types.
@@ -59,7 +59,7 @@ struct _glapi_table;
/** \name Visual-related functions */
/*@{*/
-extern GLvisual *
+extern struct gl_config *
_mesa_create_visual( GLboolean dbFlag,
GLboolean stereoFlag,
GLint redBits,
@@ -75,7 +75,7 @@ _mesa_create_visual( GLboolean dbFlag,
GLint numSamples );
extern GLboolean
-_mesa_initialize_visual( GLvisual *v,
+_mesa_initialize_visual( struct gl_config *v,
GLboolean dbFlag,
GLboolean stereoFlag,
GLint redBits,
@@ -91,7 +91,7 @@ _mesa_initialize_visual( GLvisual *v,
GLint numSamples );
extern void
-_mesa_destroy_visual( GLvisual *vis );
+_mesa_destroy_visual( struct gl_config *vis );
/*@}*/
@@ -99,78 +99,78 @@ _mesa_destroy_visual( GLvisual *vis );
/** \name Context-related functions */
/*@{*/
-extern GLcontext *
-_mesa_create_context( const GLvisual *visual,
- GLcontext *share_list,
+extern struct gl_context *
+_mesa_create_context( const struct gl_config *visual,
+ struct gl_context *share_list,
const struct dd_function_table *driverFunctions,
void *driverContext );
extern GLboolean
-_mesa_initialize_context( GLcontext *ctx,
- const GLvisual *visual,
- GLcontext *share_list,
+_mesa_initialize_context( struct gl_context *ctx,
+ const struct gl_config *visual,
+ struct gl_context *share_list,
const struct dd_function_table *driverFunctions,
void *driverContext );
-extern GLcontext *
+extern struct gl_context *
_mesa_create_context_for_api(gl_api api,
- const GLvisual *visual,
- GLcontext *share_list,
+ const struct gl_config *visual,
+ struct gl_context *share_list,
const struct dd_function_table *driverFunctions,
void *driverContext);
extern GLboolean
-_mesa_initialize_context_for_api(GLcontext *ctx,
+_mesa_initialize_context_for_api(struct gl_context *ctx,
gl_api api,
- const GLvisual *visual,
- GLcontext *share_list,
+ const struct gl_config *visual,
+ struct gl_context *share_list,
const struct dd_function_table *driverFunctions,
void *driverContext);
extern void
-_mesa_free_context_data( GLcontext *ctx );
+_mesa_free_context_data( struct gl_context *ctx );
extern void
-_mesa_destroy_context( GLcontext *ctx );
+_mesa_destroy_context( struct gl_context *ctx );
extern void
-_mesa_copy_context(const GLcontext *src, GLcontext *dst, GLuint mask);
+_mesa_copy_context(const struct gl_context *src, struct gl_context *dst, GLuint mask);
extern void
-_mesa_check_init_viewport(GLcontext *ctx, GLuint width, GLuint height);
+_mesa_check_init_viewport(struct gl_context *ctx, GLuint width, GLuint height);
extern GLboolean
-_mesa_make_current( GLcontext *ctx, GLframebuffer *drawBuffer,
- GLframebuffer *readBuffer );
+_mesa_make_current( struct gl_context *ctx, struct gl_framebuffer *drawBuffer,
+ struct gl_framebuffer *readBuffer );
extern GLboolean
-_mesa_share_state(GLcontext *ctx, GLcontext *ctxToShare);
+_mesa_share_state(struct gl_context *ctx, struct gl_context *ctxToShare);
-extern GLcontext *
+extern struct gl_context *
_mesa_get_current_context(void);
/*@}*/
extern void
-_mesa_init_get_hash(GLcontext *ctx);
+_mesa_init_get_hash(struct gl_context *ctx);
extern void
-_mesa_notifySwapBuffers(__GLcontext *gc);
+_mesa_notifySwapBuffers(struct gl_context *gc);
extern struct _glapi_table *
-_mesa_get_dispatch(GLcontext *ctx);
+_mesa_get_dispatch(struct gl_context *ctx);
void
-_mesa_set_mvp_with_dp4( GLcontext *ctx,
+_mesa_set_mvp_with_dp4( struct gl_context *ctx,
GLboolean flag );
extern GLboolean
-_mesa_valid_to_render(GLcontext *ctx, const char *where);
+_mesa_valid_to_render(struct gl_context *ctx, const char *where);
@@ -178,14 +178,14 @@ _mesa_valid_to_render(GLcontext *ctx, const char *where);
/*@{*/
extern void
-_mesa_record_error( GLcontext *ctx, GLenum error );
+_mesa_record_error( struct gl_context *ctx, GLenum error );
extern void
-_mesa_finish(GLcontext *ctx);
+_mesa_finish(struct gl_context *ctx);
extern void
-_mesa_flush(GLcontext *ctx);
+_mesa_flush(struct gl_context *ctx);
extern void GLAPIENTRY
@@ -211,7 +211,7 @@ _mesa_Flush( void );
*
* Checks if dd_function_table::NeedFlush is marked to flush stored vertices,
* and calls dd_function_table::FlushVertices if so. Marks
- * __GLcontextRec::NewState with \p newstate.
+ * __struct gl_contextRec::NewState with \p newstate.
*/
#define FLUSH_VERTICES(ctx, newstate) \
do { \
@@ -230,7 +230,7 @@ do { \
*
* Checks if dd_function_table::NeedFlush is marked to flush current state,
* and calls dd_function_table::FlushVertices if so. Marks
- * __GLcontextRec::NewState with \p newstate.
+ * __struct gl_contextRec::NewState with \p newstate.
*/
#define FLUSH_CURRENT(ctx, newstate) \
do { \
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 46d26cf901d..5e006e0ad30 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -70,7 +70,7 @@ struct dd_function_table {
* Only the GL_RENDERER query must be implemented. Otherwise, NULL can be
* returned.
*/
- const GLubyte * (*GetString)( GLcontext *ctx, GLenum name );
+ const GLubyte * (*GetString)( struct gl_context *ctx, GLenum name );
/**
* Notify the driver after Mesa has made some internal state changes.
@@ -78,7 +78,7 @@ struct dd_function_table {
* This is in addition to any state change callbacks Mesa may already have
* made.
*/
- void (*UpdateState)( GLcontext *ctx, GLbitfield new_state );
+ void (*UpdateState)( struct gl_context *ctx, GLbitfield new_state );
/**
* Get the width and height of the named buffer/window.
@@ -86,49 +86,49 @@ struct dd_function_table {
* Mesa uses this to determine when the driver's window size has changed.
* XXX OBSOLETE: this function will be removed in the future.
*/
- void (*GetBufferSize)( GLframebuffer *buffer,
+ void (*GetBufferSize)( struct gl_framebuffer *buffer,
GLuint *width, GLuint *height );
/**
* Resize the given framebuffer to the given size.
* XXX OBSOLETE: this function will be removed in the future.
*/
- void (*ResizeBuffers)( GLcontext *ctx, GLframebuffer *fb,
+ void (*ResizeBuffers)( struct gl_context *ctx, struct gl_framebuffer *fb,
GLuint width, GLuint height);
/**
* Called whenever an error is generated.
- * __GLcontextRec::ErrorValue contains the error value.
+ * __struct gl_contextRec::ErrorValue contains the error value.
*/
- void (*Error)( GLcontext *ctx );
+ void (*Error)( struct gl_context *ctx );
/**
* This is called whenever glFinish() is called.
*/
- void (*Finish)( GLcontext *ctx );
+ void (*Finish)( struct gl_context *ctx );
/**
* This is called whenever glFlush() is called.
*/
- void (*Flush)( GLcontext *ctx );
+ void (*Flush)( struct gl_context *ctx );
/**
* Clear the color/depth/stencil/accum buffer(s).
* \param buffers a bitmask of BUFFER_BIT_* flags indicating which
* renderbuffers need to be cleared.
*/
- void (*Clear)( GLcontext *ctx, GLbitfield buffers );
+ void (*Clear)( struct gl_context *ctx, GLbitfield buffers );
/**
* Execute glAccum command.
*/
- void (*Accum)( GLcontext *ctx, GLenum op, GLfloat value );
+ void (*Accum)( struct gl_context *ctx, GLenum op, GLfloat value );
/**
* Execute glRasterPos, updating the ctx->Current.Raster fields
*/
- void (*RasterPos)( GLcontext *ctx, const GLfloat v[4] );
+ void (*RasterPos)( struct gl_context *ctx, const GLfloat v[4] );
/**
* \name Image-related functions
@@ -139,7 +139,7 @@ struct dd_function_table {
* Called by glDrawPixels().
* \p unpack describes how to unpack the source image data.
*/
- void (*DrawPixels)( GLcontext *ctx,
+ void (*DrawPixels)( struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *unpack,
@@ -148,7 +148,7 @@ struct dd_function_table {
/**
* Called by glReadPixels().
*/
- void (*ReadPixels)( GLcontext *ctx,
+ void (*ReadPixels)( struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *unpack,
@@ -157,14 +157,14 @@ struct dd_function_table {
/**
* Called by glCopyPixels().
*/
- void (*CopyPixels)( GLcontext *ctx, GLint srcx, GLint srcy,
+ void (*CopyPixels)( struct gl_context *ctx, GLint srcx, GLint srcy,
GLsizei width, GLsizei height,
GLint dstx, GLint dsty, GLenum type );
/**
* Called by glBitmap().
*/
- void (*Bitmap)( GLcontext *ctx,
+ void (*Bitmap)( struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack,
const GLubyte *bitmap );
@@ -183,7 +183,7 @@ struct dd_function_table {
* functions. The driver should examine \p internalFormat and return a
* gl_format value.
*/
- GLuint (*ChooseTextureFormat)( GLcontext *ctx, GLint internalFormat,
+ GLuint (*ChooseTextureFormat)( struct gl_context *ctx, GLint internalFormat,
GLenum srcFormat, GLenum srcType );
/**
@@ -203,7 +203,7 @@ struct dd_function_table {
*
* Drivers should call a fallback routine from texstore.c if needed.
*/
- void (*TexImage1D)( GLcontext *ctx, GLenum target, GLint level,
+ void (*TexImage1D)( struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -216,7 +216,7 @@ struct dd_function_table {
*
* \sa dd_function_table::TexImage1D.
*/
- void (*TexImage2D)( GLcontext *ctx, GLenum target, GLint level,
+ void (*TexImage2D)( struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -229,7 +229,7 @@ struct dd_function_table {
*
* \sa dd_function_table::TexImage1D.
*/
- void (*TexImage3D)( GLcontext *ctx, GLenum target, GLint level,
+ void (*TexImage3D)( struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint depth, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -258,7 +258,7 @@ struct dd_function_table {
*
* The driver should use a fallback routine from texstore.c if needed.
*/
- void (*TexSubImage1D)( GLcontext *ctx, GLenum target, GLint level,
+ void (*TexSubImage1D)( struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLsizei width,
GLenum format, GLenum type,
const GLvoid *pixels,
@@ -271,7 +271,7 @@ struct dd_function_table {
*
* \sa dd_function_table::TexSubImage1D.
*/
- void (*TexSubImage2D)( GLcontext *ctx, GLenum target, GLint level,
+ void (*TexSubImage2D)( struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
@@ -285,7 +285,7 @@ struct dd_function_table {
*
* \sa dd_function_table::TexSubImage1D.
*/
- void (*TexSubImage3D)( GLcontext *ctx, GLenum target, GLint level,
+ void (*TexSubImage3D)( struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLsizei width, GLsizei height, GLint depth,
GLenum format, GLenum type,
@@ -297,7 +297,7 @@ struct dd_function_table {
/**
* Called by glGetTexImage().
*/
- void (*GetTexImage)( GLcontext *ctx, GLenum target, GLint level,
+ void (*GetTexImage)( struct gl_context *ctx, GLenum target, GLint level,
GLenum format, GLenum type, GLvoid *pixels,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage );
@@ -307,7 +307,7 @@ struct dd_function_table {
*
* Drivers should use a fallback routine from texstore.c if needed.
*/
- void (*CopyTexImage1D)( GLcontext *ctx, GLenum target, GLint level,
+ void (*CopyTexImage1D)( struct gl_context *ctx, GLenum target, GLint level,
GLenum internalFormat, GLint x, GLint y,
GLsizei width, GLint border );
@@ -316,7 +316,7 @@ struct dd_function_table {
*
* Drivers should use a fallback routine from texstore.c if needed.
*/
- void (*CopyTexImage2D)( GLcontext *ctx, GLenum target, GLint level,
+ void (*CopyTexImage2D)( struct gl_context *ctx, GLenum target, GLint level,
GLenum internalFormat, GLint x, GLint y,
GLsizei width, GLsizei height, GLint border );
@@ -325,7 +325,7 @@ struct dd_function_table {
*
* Drivers should use a fallback routine from texstore.c if needed.
*/
- void (*CopyTexSubImage1D)( GLcontext *ctx, GLenum target, GLint level,
+ void (*CopyTexSubImage1D)( struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset,
GLint x, GLint y, GLsizei width );
/**
@@ -333,7 +333,7 @@ struct dd_function_table {
*
* Drivers should use a fallback routine from texstore.c if needed.
*/
- void (*CopyTexSubImage2D)( GLcontext *ctx, GLenum target, GLint level,
+ void (*CopyTexSubImage2D)( struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLint x, GLint y,
GLsizei width, GLsizei height );
@@ -342,7 +342,7 @@ struct dd_function_table {
*
* Drivers should use a fallback routine from texstore.c if needed.
*/
- void (*CopyTexSubImage3D)( GLcontext *ctx, GLenum target, GLint level,
+ void (*CopyTexSubImage3D)( struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLint x, GLint y,
GLsizei width, GLsizei height );
@@ -350,7 +350,7 @@ struct dd_function_table {
/**
* Called by glGenerateMipmap() or when GL_GENERATE_MIPMAP_SGIS is enabled.
*/
- void (*GenerateMipmap)(GLcontext *ctx, GLenum target,
+ void (*GenerateMipmap)(struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj);
/**
@@ -359,7 +359,7 @@ struct dd_function_table {
*
* \return GL_TRUE if the proxy test passes, or GL_FALSE if the test fails.
*/
- GLboolean (*TestProxyTexImage)(GLcontext *ctx, GLenum target,
+ GLboolean (*TestProxyTexImage)(struct gl_context *ctx, GLenum target,
GLint level, GLint internalFormat,
GLenum format, GLenum type,
GLint width, GLint height,
@@ -387,7 +387,7 @@ struct dd_function_table {
* \a retainInternalCopy is returned by this function and indicates whether
* core Mesa should keep an internal copy of the texture image.
*/
- void (*CompressedTexImage1D)( GLcontext *ctx, GLenum target,
+ void (*CompressedTexImage1D)( struct gl_context *ctx, GLenum target,
GLint level, GLint internalFormat,
GLsizei width, GLint border,
GLsizei imageSize, const GLvoid *data,
@@ -398,7 +398,7 @@ struct dd_function_table {
*
* \sa dd_function_table::CompressedTexImage1D.
*/
- void (*CompressedTexImage2D)( GLcontext *ctx, GLenum target,
+ void (*CompressedTexImage2D)( struct gl_context *ctx, GLenum target,
GLint level, GLint internalFormat,
GLsizei width, GLsizei height, GLint border,
GLsizei imageSize, const GLvoid *data,
@@ -409,7 +409,7 @@ struct dd_function_table {
*
* \sa dd_function_table::CompressedTexImage3D.
*/
- void (*CompressedTexImage3D)( GLcontext *ctx, GLenum target,
+ void (*CompressedTexImage3D)( struct gl_context *ctx, GLenum target,
GLint level, GLint internalFormat,
GLsizei width, GLsizei height, GLsizei depth,
GLint border,
@@ -434,7 +434,7 @@ struct dd_function_table {
* \param texImage is the target texture image. It will have the texture \p
* width, \p height, \p depth, \p border and \p internalFormat information.
*/
- void (*CompressedTexSubImage1D)(GLcontext *ctx, GLenum target, GLint level,
+ void (*CompressedTexSubImage1D)(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLsizei width,
GLenum format,
GLsizei imageSize, const GLvoid *data,
@@ -445,7 +445,7 @@ struct dd_function_table {
*
* \sa dd_function_table::CompressedTexImage3D.
*/
- void (*CompressedTexSubImage2D)(GLcontext *ctx, GLenum target, GLint level,
+ void (*CompressedTexSubImage2D)(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLsizei width, GLint height,
GLenum format,
@@ -457,7 +457,7 @@ struct dd_function_table {
*
* \sa dd_function_table::CompressedTexImage3D.
*/
- void (*CompressedTexSubImage3D)(GLcontext *ctx, GLenum target, GLint level,
+ void (*CompressedTexSubImage3D)(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLsizei width, GLint height, GLint depth,
GLenum format,
@@ -469,7 +469,7 @@ struct dd_function_table {
/**
* Called by glGetCompressedTexImage.
*/
- void (*GetCompressedTexImage)(GLcontext *ctx, GLenum target, GLint level,
+ void (*GetCompressedTexImage)(struct gl_context *ctx, GLenum target, GLint level,
GLvoid *img,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage);
@@ -484,7 +484,7 @@ struct dd_function_table {
/**
* Called by glBindTexture().
*/
- void (*BindTexture)( GLcontext *ctx, GLenum target,
+ void (*BindTexture)( struct gl_context *ctx, GLenum target,
struct gl_texture_object *tObj );
/**
@@ -492,7 +492,7 @@ struct dd_function_table {
* A new gl_texture_object should be returned. The driver should
* attach to it any device-specific info it needs.
*/
- struct gl_texture_object * (*NewTextureObject)( GLcontext *ctx, GLuint name,
+ struct gl_texture_object * (*NewTextureObject)( struct gl_context *ctx, GLuint name,
GLenum target );
/**
* Called when a texture object is about to be deallocated.
@@ -500,22 +500,22 @@ struct dd_function_table {
* Driver should delete the gl_texture_object object and anything
* hanging off of it.
*/
- void (*DeleteTexture)( GLcontext *ctx, struct gl_texture_object *tObj );
+ void (*DeleteTexture)( struct gl_context *ctx, struct gl_texture_object *tObj );
/**
* Called to allocate a new texture image object.
*/
- struct gl_texture_image * (*NewTextureImage)( GLcontext *ctx );
+ struct gl_texture_image * (*NewTextureImage)( struct gl_context *ctx );
/**
* Called to free tImage->Data.
*/
- void (*FreeTexImageData)( GLcontext *ctx, struct gl_texture_image *tImage );
+ void (*FreeTexImageData)( struct gl_context *ctx, struct gl_texture_image *tImage );
/** Map texture image data into user space */
- void (*MapTexture)( GLcontext *ctx, struct gl_texture_object *tObj );
+ void (*MapTexture)( struct gl_context *ctx, struct gl_texture_object *tObj );
/** Unmap texture images from user space */
- void (*UnmapTexture)( GLcontext *ctx, struct gl_texture_object *tObj );
+ void (*UnmapTexture)( struct gl_context *ctx, struct gl_texture_object *tObj );
/**
* Note: no context argument. This function doesn't initially look
@@ -533,7 +533,7 @@ struct dd_function_table {
/**
* Called by glAreTextureResident().
*/
- GLboolean (*IsTextureResident)( GLcontext *ctx,
+ GLboolean (*IsTextureResident)( struct gl_context *ctx,
struct gl_texture_object *t );
/**
@@ -542,7 +542,7 @@ struct dd_function_table {
* If \p tObj is NULL then the shared texture palette
* gl_texture_object::Palette is to be updated.
*/
- void (*UpdateTexturePalette)( GLcontext *ctx,
+ void (*UpdateTexturePalette)( struct gl_context *ctx,
struct gl_texture_object *tObj );
/*@}*/
@@ -551,11 +551,11 @@ struct dd_function_table {
* \name Imaging functionality
*/
/*@{*/
- void (*CopyColorTable)( GLcontext *ctx,
+ void (*CopyColorTable)( struct gl_context *ctx,
GLenum target, GLenum internalformat,
GLint x, GLint y, GLsizei width );
- void (*CopyColorSubTable)( GLcontext *ctx,
+ void (*CopyColorSubTable)( struct gl_context *ctx,
GLenum target, GLsizei start,
GLint x, GLint y, GLsizei width );
/*@}*/
@@ -566,21 +566,21 @@ struct dd_function_table {
*/
/*@{*/
/** Bind a vertex/fragment program */
- void (*BindProgram)(GLcontext *ctx, GLenum target, struct gl_program *prog);
+ void (*BindProgram)(struct gl_context *ctx, GLenum target, struct gl_program *prog);
/** Allocate a new program */
- struct gl_program * (*NewProgram)(GLcontext *ctx, GLenum target, GLuint id);
+ struct gl_program * (*NewProgram)(struct gl_context *ctx, GLenum target, GLuint id);
/** Delete a program */
- void (*DeleteProgram)(GLcontext *ctx, struct gl_program *prog);
+ void (*DeleteProgram)(struct gl_context *ctx, struct gl_program *prog);
/**
* Notify driver that a program string (and GPU code) has been specified
* or modified. Return GL_TRUE or GL_FALSE to indicate if the program is
* supported by the driver.
*/
- GLboolean (*ProgramStringNotify)(GLcontext *ctx, GLenum target,
+ GLboolean (*ProgramStringNotify)(struct gl_context *ctx, GLenum target,
struct gl_program *prog);
/** Query if program can be loaded onto hardware */
- GLboolean (*IsProgramNative)(GLcontext *ctx, GLenum target,
+ GLboolean (*IsProgramNative)(struct gl_context *ctx, GLenum target,
struct gl_program *prog);
/*@}*/
@@ -597,14 +597,14 @@ struct dd_function_table {
* have CompileShader() called, so if lowering passes are done they
* need to also be performed in LinkShader().
*/
- GLboolean (*CompileShader)(GLcontext *ctx, struct gl_shader *shader);
+ GLboolean (*CompileShader)(struct gl_context *ctx, struct gl_shader *shader);
/**
* Called when a shader program is linked.
*
* This gives drivers an opportunity to clone the IR and make their
* own transformations on it for the purposes of code generation.
*/
- GLboolean (*LinkShader)(GLcontext *ctx, struct gl_shader_program *shader);
+ GLboolean (*LinkShader)(struct gl_context *ctx, struct gl_shader_program *shader);
/*@}*/
/**
@@ -618,102 +618,102 @@ struct dd_function_table {
*/
/*@{*/
/** Specify the alpha test function */
- void (*AlphaFunc)(GLcontext *ctx, GLenum func, GLfloat ref);
+ void (*AlphaFunc)(struct gl_context *ctx, GLenum func, GLfloat ref);
/** Set the blend color */
- void (*BlendColor)(GLcontext *ctx, const GLfloat color[4]);
+ void (*BlendColor)(struct gl_context *ctx, const GLfloat color[4]);
/** Set the blend equation */
- void (*BlendEquationSeparate)(GLcontext *ctx, GLenum modeRGB, GLenum modeA);
+ void (*BlendEquationSeparate)(struct gl_context *ctx, GLenum modeRGB, GLenum modeA);
/** Specify pixel arithmetic */
- void (*BlendFuncSeparate)(GLcontext *ctx,
+ void (*BlendFuncSeparate)(struct gl_context *ctx,
GLenum sfactorRGB, GLenum dfactorRGB,
GLenum sfactorA, GLenum dfactorA);
/** Specify clear values for the color buffers */
- void (*ClearColor)(GLcontext *ctx, const GLfloat color[4]);
+ void (*ClearColor)(struct gl_context *ctx, const GLfloat color[4]);
/** Specify the clear value for the depth buffer */
- void (*ClearDepth)(GLcontext *ctx, GLclampd d);
+ void (*ClearDepth)(struct gl_context *ctx, GLclampd d);
/** Specify the clear value for the stencil buffer */
- void (*ClearStencil)(GLcontext *ctx, GLint s);
+ void (*ClearStencil)(struct gl_context *ctx, GLint s);
/** Specify a plane against which all geometry is clipped */
- void (*ClipPlane)(GLcontext *ctx, GLenum plane, const GLfloat *equation );
+ void (*ClipPlane)(struct gl_context *ctx, GLenum plane, const GLfloat *equation );
/** Enable and disable writing of frame buffer color components */
- void (*ColorMask)(GLcontext *ctx, GLboolean rmask, GLboolean gmask,
+ void (*ColorMask)(struct gl_context *ctx, GLboolean rmask, GLboolean gmask,
GLboolean bmask, GLboolean amask );
- void (*ColorMaskIndexed)(GLcontext *ctx, GLuint buf, GLboolean rmask,
+ void (*ColorMaskIndexed)(struct gl_context *ctx, GLuint buf, GLboolean rmask,
GLboolean gmask, GLboolean bmask, GLboolean amask);
/** Cause a material color to track the current color */
- void (*ColorMaterial)(GLcontext *ctx, GLenum face, GLenum mode);
+ void (*ColorMaterial)(struct gl_context *ctx, GLenum face, GLenum mode);
/** Specify whether front- or back-facing facets can be culled */
- void (*CullFace)(GLcontext *ctx, GLenum mode);
+ void (*CullFace)(struct gl_context *ctx, GLenum mode);
/** Define front- and back-facing polygons */
- void (*FrontFace)(GLcontext *ctx, GLenum mode);
+ void (*FrontFace)(struct gl_context *ctx, GLenum mode);
/** Specify the value used for depth buffer comparisons */
- void (*DepthFunc)(GLcontext *ctx, GLenum func);
+ void (*DepthFunc)(struct gl_context *ctx, GLenum func);
/** Enable or disable writing into the depth buffer */
- void (*DepthMask)(GLcontext *ctx, GLboolean flag);
+ void (*DepthMask)(struct gl_context *ctx, GLboolean flag);
/** Specify mapping of depth values from NDC to window coordinates */
- void (*DepthRange)(GLcontext *ctx, GLclampd nearval, GLclampd farval);
+ void (*DepthRange)(struct gl_context *ctx, GLclampd nearval, GLclampd farval);
/** Specify the current buffer for writing */
- void (*DrawBuffer)( GLcontext *ctx, GLenum buffer );
+ void (*DrawBuffer)( struct gl_context *ctx, GLenum buffer );
/** Specify the buffers for writing for fragment programs*/
- void (*DrawBuffers)( GLcontext *ctx, GLsizei n, const GLenum *buffers );
+ void (*DrawBuffers)( struct gl_context *ctx, GLsizei n, const GLenum *buffers );
/** Enable or disable server-side gl capabilities */
- void (*Enable)(GLcontext *ctx, GLenum cap, GLboolean state);
+ void (*Enable)(struct gl_context *ctx, GLenum cap, GLboolean state);
/** Specify fog parameters */
- void (*Fogfv)(GLcontext *ctx, GLenum pname, const GLfloat *params);
+ void (*Fogfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params);
/** Specify implementation-specific hints */
- void (*Hint)(GLcontext *ctx, GLenum target, GLenum mode);
+ void (*Hint)(struct gl_context *ctx, GLenum target, GLenum mode);
/** Set light source parameters.
* Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already
* been transformed to eye-space.
*/
- void (*Lightfv)(GLcontext *ctx, GLenum light,
+ void (*Lightfv)(struct gl_context *ctx, GLenum light,
GLenum pname, const GLfloat *params );
/** Set the lighting model parameters */
- void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params);
+ void (*LightModelfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params);
/** Specify the line stipple pattern */
- void (*LineStipple)(GLcontext *ctx, GLint factor, GLushort pattern );
+ void (*LineStipple)(struct gl_context *ctx, GLint factor, GLushort pattern );
/** Specify the width of rasterized lines */
- void (*LineWidth)(GLcontext *ctx, GLfloat width);
+ void (*LineWidth)(struct gl_context *ctx, GLfloat width);
/** Specify a logical pixel operation for color index rendering */
- void (*LogicOpcode)(GLcontext *ctx, GLenum opcode);
- void (*PointParameterfv)(GLcontext *ctx, GLenum pname,
+ void (*LogicOpcode)(struct gl_context *ctx, GLenum opcode);
+ void (*PointParameterfv)(struct gl_context *ctx, GLenum pname,
const GLfloat *params);
/** Specify the diameter of rasterized points */
- void (*PointSize)(GLcontext *ctx, GLfloat size);
+ void (*PointSize)(struct gl_context *ctx, GLfloat size);
/** Select a polygon rasterization mode */
- void (*PolygonMode)(GLcontext *ctx, GLenum face, GLenum mode);
+ void (*PolygonMode)(struct gl_context *ctx, GLenum face, GLenum mode);
/** Set the scale and units used to calculate depth values */
- void (*PolygonOffset)(GLcontext *ctx, GLfloat factor, GLfloat units);
+ void (*PolygonOffset)(struct gl_context *ctx, GLfloat factor, GLfloat units);
/** Set the polygon stippling pattern */
- void (*PolygonStipple)(GLcontext *ctx, const GLubyte *mask );
+ void (*PolygonStipple)(struct gl_context *ctx, const GLubyte *mask );
/* Specifies the current buffer for reading */
- void (*ReadBuffer)( GLcontext *ctx, GLenum buffer );
+ void (*ReadBuffer)( struct gl_context *ctx, GLenum buffer );
/** Set rasterization mode */
- void (*RenderMode)(GLcontext *ctx, GLenum mode );
+ void (*RenderMode)(struct gl_context *ctx, GLenum mode );
/** Define the scissor box */
- void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
+ void (*Scissor)(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
/** Select flat or smooth shading */
- void (*ShadeModel)(GLcontext *ctx, GLenum mode);
+ void (*ShadeModel)(struct gl_context *ctx, GLenum mode);
/** OpenGL 2.0 two-sided StencilFunc */
- void (*StencilFuncSeparate)(GLcontext *ctx, GLenum face, GLenum func,
+ void (*StencilFuncSeparate)(struct gl_context *ctx, GLenum face, GLenum func,
GLint ref, GLuint mask);
/** OpenGL 2.0 two-sided StencilMask */
- void (*StencilMaskSeparate)(GLcontext *ctx, GLenum face, GLuint mask);
+ void (*StencilMaskSeparate)(struct gl_context *ctx, GLenum face, GLuint mask);
/** OpenGL 2.0 two-sided StencilOp */
- void (*StencilOpSeparate)(GLcontext *ctx, GLenum face, GLenum fail,
+ void (*StencilOpSeparate)(struct gl_context *ctx, GLenum face, GLenum fail,
GLenum zfail, GLenum zpass);
/** Control the generation of texture coordinates */
- void (*TexGen)(GLcontext *ctx, GLenum coord, GLenum pname,
+ void (*TexGen)(struct gl_context *ctx, GLenum coord, GLenum pname,
const GLfloat *params);
/** Set texture environment parameters */
- void (*TexEnv)(GLcontext *ctx, GLenum target, GLenum pname,
+ void (*TexEnv)(struct gl_context *ctx, GLenum target, GLenum pname,
const GLfloat *param);
/** Set texture parameters */
- void (*TexParameter)(GLcontext *ctx, GLenum target,
+ void (*TexParameter)(struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj,
GLenum pname, const GLfloat *params);
/** Set the viewport */
- void (*Viewport)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
+ void (*Viewport)(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
/*@}*/
@@ -721,30 +721,30 @@ struct dd_function_table {
* \name Vertex/pixel buffer object functions
*/
/*@{*/
- void (*BindBuffer)( GLcontext *ctx, GLenum target,
+ void (*BindBuffer)( struct gl_context *ctx, GLenum target,
struct gl_buffer_object *obj );
- struct gl_buffer_object * (*NewBufferObject)( GLcontext *ctx, GLuint buffer,
+ struct gl_buffer_object * (*NewBufferObject)( struct gl_context *ctx, GLuint buffer,
GLenum target );
- void (*DeleteBuffer)( GLcontext *ctx, struct gl_buffer_object *obj );
+ void (*DeleteBuffer)( struct gl_context *ctx, struct gl_buffer_object *obj );
- GLboolean (*BufferData)( GLcontext *ctx, GLenum target, GLsizeiptrARB size,
+ GLboolean (*BufferData)( struct gl_context *ctx, GLenum target, GLsizeiptrARB size,
const GLvoid *data, GLenum usage,
struct gl_buffer_object *obj );
- void (*BufferSubData)( GLcontext *ctx, GLenum target, GLintptrARB offset,
+ void (*BufferSubData)( struct gl_context *ctx, GLenum target, GLintptrARB offset,
GLsizeiptrARB size, const GLvoid *data,
struct gl_buffer_object *obj );
- void (*GetBufferSubData)( GLcontext *ctx, GLenum target,
+ void (*GetBufferSubData)( struct gl_context *ctx, GLenum target,
GLintptrARB offset, GLsizeiptrARB size,
GLvoid *data, struct gl_buffer_object *obj );
- void * (*MapBuffer)( GLcontext *ctx, GLenum target, GLenum access,
+ void * (*MapBuffer)( struct gl_context *ctx, GLenum target, GLenum access,
struct gl_buffer_object *obj );
- void (*CopyBufferSubData)( GLcontext *ctx,
+ void (*CopyBufferSubData)( struct gl_context *ctx,
struct gl_buffer_object *src,
struct gl_buffer_object *dst,
GLintptr readOffset, GLintptr writeOffset,
@@ -752,15 +752,15 @@ struct dd_function_table {
/* May return NULL if MESA_MAP_NOWAIT_BIT is set in access:
*/
- void * (*MapBufferRange)( GLcontext *ctx, GLenum target, GLintptr offset,
+ void * (*MapBufferRange)( struct gl_context *ctx, GLenum target, GLintptr offset,
GLsizeiptr length, GLbitfield access,
struct gl_buffer_object *obj);
- void (*FlushMappedBufferRange)(GLcontext *ctx, GLenum target,
+ void (*FlushMappedBufferRange)(struct gl_context *ctx, GLenum target,
GLintptr offset, GLsizeiptr length,
struct gl_buffer_object *obj);
- GLboolean (*UnmapBuffer)( GLcontext *ctx, GLenum target,
+ GLboolean (*UnmapBuffer)( struct gl_context *ctx, GLenum target,
struct gl_buffer_object *obj );
/*@}*/
@@ -769,38 +769,38 @@ struct dd_function_table {
*/
/*@{*/
/* variations on ObjectPurgeable */
- GLenum (*BufferObjectPurgeable)( GLcontext *ctx, struct gl_buffer_object *obj, GLenum option );
- GLenum (*RenderObjectPurgeable)( GLcontext *ctx, struct gl_renderbuffer *obj, GLenum option );
- GLenum (*TextureObjectPurgeable)( GLcontext *ctx, struct gl_texture_object *obj, GLenum option );
+ GLenum (*BufferObjectPurgeable)( struct gl_context *ctx, struct gl_buffer_object *obj, GLenum option );
+ GLenum (*RenderObjectPurgeable)( struct gl_context *ctx, struct gl_renderbuffer *obj, GLenum option );
+ GLenum (*TextureObjectPurgeable)( struct gl_context *ctx, struct gl_texture_object *obj, GLenum option );
/* variations on ObjectUnpurgeable */
- GLenum (*BufferObjectUnpurgeable)( GLcontext *ctx, struct gl_buffer_object *obj, GLenum option );
- GLenum (*RenderObjectUnpurgeable)( GLcontext *ctx, struct gl_renderbuffer *obj, GLenum option );
- GLenum (*TextureObjectUnpurgeable)( GLcontext *ctx, struct gl_texture_object *obj, GLenum option );
+ GLenum (*BufferObjectUnpurgeable)( struct gl_context *ctx, struct gl_buffer_object *obj, GLenum option );
+ GLenum (*RenderObjectUnpurgeable)( struct gl_context *ctx, struct gl_renderbuffer *obj, GLenum option );
+ GLenum (*TextureObjectUnpurgeable)( struct gl_context *ctx, struct gl_texture_object *obj, GLenum option );
/*@}*/
/**
* \name Functions for GL_EXT_framebuffer_{object,blit}.
*/
/*@{*/
- struct gl_framebuffer * (*NewFramebuffer)(GLcontext *ctx, GLuint name);
- struct gl_renderbuffer * (*NewRenderbuffer)(GLcontext *ctx, GLuint name);
- void (*BindFramebuffer)(GLcontext *ctx, GLenum target,
+ struct gl_framebuffer * (*NewFramebuffer)(struct gl_context *ctx, GLuint name);
+ struct gl_renderbuffer * (*NewRenderbuffer)(struct gl_context *ctx, GLuint name);
+ void (*BindFramebuffer)(struct gl_context *ctx, GLenum target,
struct gl_framebuffer *drawFb,
struct gl_framebuffer *readFb);
- void (*FramebufferRenderbuffer)(GLcontext *ctx,
+ void (*FramebufferRenderbuffer)(struct gl_context *ctx,
struct gl_framebuffer *fb,
GLenum attachment,
struct gl_renderbuffer *rb);
- void (*RenderTexture)(GLcontext *ctx,
+ void (*RenderTexture)(struct gl_context *ctx,
struct gl_framebuffer *fb,
struct gl_renderbuffer_attachment *att);
- void (*FinishRenderTexture)(GLcontext *ctx,
+ void (*FinishRenderTexture)(struct gl_context *ctx,
struct gl_renderbuffer_attachment *att);
- void (*ValidateFramebuffer)(GLcontext *ctx,
+ void (*ValidateFramebuffer)(struct gl_context *ctx,
struct gl_framebuffer *fb);
/*@}*/
- void (*BlitFramebuffer)(GLcontext *ctx,
+ void (*BlitFramebuffer)(struct gl_context *ctx,
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
GLbitfield mask, GLenum filter);
@@ -809,12 +809,12 @@ struct dd_function_table {
* \name Query objects
*/
/*@{*/
- struct gl_query_object * (*NewQueryObject)(GLcontext *ctx, GLuint id);
- void (*DeleteQuery)(GLcontext *ctx, struct gl_query_object *q);
- void (*BeginQuery)(GLcontext *ctx, struct gl_query_object *q);
- void (*EndQuery)(GLcontext *ctx, struct gl_query_object *q);
- void (*CheckQuery)(GLcontext *ctx, struct gl_query_object *q);
- void (*WaitQuery)(GLcontext *ctx, struct gl_query_object *q);
+ struct gl_query_object * (*NewQueryObject)(struct gl_context *ctx, GLuint id);
+ void (*DeleteQuery)(struct gl_context *ctx, struct gl_query_object *q);
+ void (*BeginQuery)(struct gl_context *ctx, struct gl_query_object *q);
+ void (*EndQuery)(struct gl_context *ctx, struct gl_query_object *q);
+ void (*CheckQuery)(struct gl_context *ctx, struct gl_query_object *q);
+ void (*WaitQuery)(struct gl_context *ctx, struct gl_query_object *q);
/*@}*/
@@ -822,21 +822,21 @@ struct dd_function_table {
* \name Vertex Array objects
*/
/*@{*/
- struct gl_array_object * (*NewArrayObject)(GLcontext *ctx, GLuint id);
- void (*DeleteArrayObject)(GLcontext *ctx, struct gl_array_object *obj);
- void (*BindArrayObject)(GLcontext *ctx, struct gl_array_object *obj);
+ struct gl_array_object * (*NewArrayObject)(struct gl_context *ctx, GLuint id);
+ void (*DeleteArrayObject)(struct gl_context *ctx, struct gl_array_object *obj);
+ void (*BindArrayObject)(struct gl_context *ctx, struct gl_array_object *obj);
/*@}*/
/**
* \name GLSL-related functions (ARB extensions and OpenGL 2.x)
*/
/*@{*/
- struct gl_shader *(*NewShader)(GLcontext *ctx, GLuint name, GLenum type);
- void (*DeleteShader)(GLcontext *ctx, struct gl_shader *shader);
- struct gl_shader_program *(*NewShaderProgram)(GLcontext *ctx, GLuint name);
- void (*DeleteShaderProgram)(GLcontext *ctx,
+ struct gl_shader *(*NewShader)(struct gl_context *ctx, GLuint name, GLenum type);
+ void (*DeleteShader)(struct gl_context *ctx, struct gl_shader *shader);
+ struct gl_shader_program *(*NewShaderProgram)(struct gl_context *ctx, GLuint name);
+ void (*DeleteShaderProgram)(struct gl_context *ctx,
struct gl_shader_program *shProg);
- void (*UseProgram)(GLcontext *ctx, struct gl_shader_program *shProg);
+ void (*UseProgram)(struct gl_context *ctx, struct gl_shader_program *shProg);
/*@}*/
@@ -862,7 +862,7 @@ struct dd_function_table {
* This must be non-NULL if a driver installs a custom T&L module and sets
* the dd_function_table::NeedValidate bitmask, but may be NULL otherwise.
*/
- void (*ValidateTnlModule)( GLcontext *ctx, GLuint new_state );
+ void (*ValidateTnlModule)( struct gl_context *ctx, GLuint new_state );
#define PRIM_OUTSIDE_BEGIN_END (GL_POLYGON+1)
@@ -889,7 +889,7 @@ struct dd_function_table {
#define FLUSH_UPDATE_CURRENT 0x2
/**
* Set by the driver-supplied T&L engine whenever vertices are buffered
- * between glBegin()/glEnd() objects or __GLcontextRec::Current is not
+ * between glBegin()/glEnd() objects or __struct gl_contextRec::Current is not
* updated.
*
* The dd_function_table::FlushVertices call below may be used to resolve
@@ -902,32 +902,32 @@ struct dd_function_table {
/* Called prior to any of the GLvertexformat functions being
* called. Paired with Driver.FlushVertices().
*/
- void (*BeginVertices)( GLcontext *ctx );
+ void (*BeginVertices)( struct gl_context *ctx );
/**
* If inside glBegin()/glEnd(), it should ASSERT(0). Otherwise, if
* FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered
* vertices, if FLUSH_UPDATE_CURRENT bit is set updates
- * __GLcontextRec::Current and gl_light_attrib::Material
+ * __struct gl_contextRec::Current and gl_light_attrib::Material
*
* Note that the default T&L engine never clears the
* FLUSH_UPDATE_CURRENT bit, even after performing the update.
*/
- void (*FlushVertices)( GLcontext *ctx, GLuint flags );
- void (*SaveFlushVertices)( GLcontext *ctx );
+ void (*FlushVertices)( struct gl_context *ctx, GLuint flags );
+ void (*SaveFlushVertices)( struct gl_context *ctx );
/**
* Give the driver the opportunity to hook in its own vtxfmt for
* compiling optimized display lists. This is called on each valid
* glBegin() during list compilation.
*/
- GLboolean (*NotifySaveBegin)( GLcontext *ctx, GLenum mode );
+ GLboolean (*NotifySaveBegin)( struct gl_context *ctx, GLenum mode );
/**
* Notify driver that the special derived value _NeedEyeCoords has
* changed.
*/
- void (*LightingSpaceChange)( GLcontext *ctx );
+ void (*LightingSpaceChange)( struct gl_context *ctx );
/**
* Called by glNewList().
@@ -935,64 +935,64 @@ struct dd_function_table {
* Let the T&L component know what is going on with display lists
* in time to make changes to dispatch tables, etc.
*/
- void (*NewList)( GLcontext *ctx, GLuint list, GLenum mode );
+ void (*NewList)( struct gl_context *ctx, GLuint list, GLenum mode );
/**
* Called by glEndList().
*
* \sa dd_function_table::NewList.
*/
- void (*EndList)( GLcontext *ctx );
+ void (*EndList)( struct gl_context *ctx );
/**
* Called by glCallList(s).
*
* Notify the T&L component before and after calling a display list.
*/
- void (*BeginCallList)( GLcontext *ctx,
+ void (*BeginCallList)( struct gl_context *ctx,
struct gl_display_list *dlist );
/**
* Called by glEndCallList().
*
* \sa dd_function_table::BeginCallList.
*/
- void (*EndCallList)( GLcontext *ctx );
+ void (*EndCallList)( struct gl_context *ctx );
/**
* \name GL_ARB_sync interfaces
*/
/*@{*/
- struct gl_sync_object * (*NewSyncObject)(GLcontext *, GLenum);
- void (*FenceSync)(GLcontext *, struct gl_sync_object *, GLenum, GLbitfield);
- void (*DeleteSyncObject)(GLcontext *, struct gl_sync_object *);
- void (*CheckSync)(GLcontext *, struct gl_sync_object *);
- void (*ClientWaitSync)(GLcontext *, struct gl_sync_object *,
+ struct gl_sync_object * (*NewSyncObject)(struct gl_context *, GLenum);
+ void (*FenceSync)(struct gl_context *, struct gl_sync_object *, GLenum, GLbitfield);
+ void (*DeleteSyncObject)(struct gl_context *, struct gl_sync_object *);
+ void (*CheckSync)(struct gl_context *, struct gl_sync_object *);
+ void (*ClientWaitSync)(struct gl_context *, struct gl_sync_object *,
GLbitfield, GLuint64);
- void (*ServerWaitSync)(GLcontext *, struct gl_sync_object *,
+ void (*ServerWaitSync)(struct gl_context *, struct gl_sync_object *,
GLbitfield, GLuint64);
/*@}*/
/** GL_NV_conditional_render */
- void (*BeginConditionalRender)(GLcontext *ctx, struct gl_query_object *q,
+ void (*BeginConditionalRender)(struct gl_context *ctx, struct gl_query_object *q,
GLenum mode);
- void (*EndConditionalRender)(GLcontext *ctx, struct gl_query_object *q);
+ void (*EndConditionalRender)(struct gl_context *ctx, struct gl_query_object *q);
/**
* \name GL_OES_draw_texture interface
*/
/*@{*/
- void (*DrawTex)(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
+ void (*DrawTex)(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
GLfloat width, GLfloat height);
/*@}*/
/**
* \name GL_OES_EGL_image interface
*/
- void (*EGLImageTargetTexture2D)(GLcontext *ctx, GLenum target,
+ void (*EGLImageTargetTexture2D)(struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage,
GLeglImageOES image_handle);
- void (*EGLImageTargetRenderbufferStorage)(GLcontext *ctx,
+ void (*EGLImageTargetRenderbufferStorage)(struct gl_context *ctx,
struct gl_renderbuffer *rb,
void *image_handle);
@@ -1000,18 +1000,18 @@ struct dd_function_table {
* \name GL_EXT_transform_feedback interface
*/
struct gl_transform_feedback_object *
- (*NewTransformFeedback)(GLcontext *ctx, GLuint name);
- void (*DeleteTransformFeedback)(GLcontext *ctx,
+ (*NewTransformFeedback)(struct gl_context *ctx, GLuint name);
+ void (*DeleteTransformFeedback)(struct gl_context *ctx,
struct gl_transform_feedback_object *obj);
- void (*BeginTransformFeedback)(GLcontext *ctx, GLenum mode,
+ void (*BeginTransformFeedback)(struct gl_context *ctx, GLenum mode,
struct gl_transform_feedback_object *obj);
- void (*EndTransformFeedback)(GLcontext *ctx,
+ void (*EndTransformFeedback)(struct gl_context *ctx,
struct gl_transform_feedback_object *obj);
- void (*PauseTransformFeedback)(GLcontext *ctx,
+ void (*PauseTransformFeedback)(struct gl_context *ctx,
struct gl_transform_feedback_object *obj);
- void (*ResumeTransformFeedback)(GLcontext *ctx,
+ void (*ResumeTransformFeedback)(struct gl_context *ctx,
struct gl_transform_feedback_object *obj);
- void (*DrawTransformFeedback)(GLcontext *ctx, GLenum mode,
+ void (*DrawTransformFeedback)(struct gl_context *ctx, GLenum mode,
struct gl_transform_feedback_object *obj);
};
@@ -1086,6 +1086,7 @@ typedef struct {
void (GLAPIENTRYP CallLists)( GLsizei, GLenum, const GLvoid * );
void (GLAPIENTRYP Begin)( GLenum );
void (GLAPIENTRYP End)( void );
+ void (GLAPIENTRYP PrimitiveRestartNV)( void );
/* GL_NV_vertex_program */
void (GLAPIENTRYP VertexAttrib1fNV)( GLuint index, GLfloat x );
void (GLAPIENTRYP VertexAttrib1fvNV)( GLuint index, const GLfloat *v );
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
index 4205c7a4b71..a7e65f8d3aa 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -233,7 +233,7 @@ static void add_debug_flags( const char *debug )
void
-_mesa_init_debug( GLcontext *ctx )
+_mesa_init_debug( struct gl_context *ctx )
{
char *c;
@@ -578,7 +578,7 @@ _mesa_dump_stencil_buffer(const char *filename)
* Quick and dirty function to "print" a texture to stdout.
*/
void
-_mesa_print_texture(GLcontext *ctx, const struct gl_texture_image *img)
+_mesa_print_texture(struct gl_context *ctx, const struct gl_texture_image *img)
{
#if CHAN_TYPE != GL_UNSIGNED_BYTE
_mesa_problem(NULL, "PrintTexture not supported");
diff --git a/src/mesa/main/debug.h b/src/mesa/main/debug.h
index b517cc8259f..e3bb4dfe813 100644
--- a/src/mesa/main/debug.h
+++ b/src/mesa/main/debug.h
@@ -45,7 +45,7 @@ extern void _mesa_print_tri_caps( const char *name, GLuint flags );
extern void _mesa_print_enable_flags( const char *msg, GLuint flags );
extern void _mesa_print_state( const char *msg, GLuint state );
extern void _mesa_print_info( void );
-extern void _mesa_init_debug( GLcontext *ctx );
+extern void _mesa_init_debug( struct gl_context *ctx );
#else
@@ -79,6 +79,6 @@ extern void
_mesa_dump_stencil_buffer(const char *filename);
extern void
-_mesa_print_texture(GLcontext *ctx, const struct gl_texture_image *img);
+_mesa_print_texture(struct gl_context *ctx, const struct gl_texture_image *img);
#endif
diff --git a/src/mesa/main/depth.c b/src/mesa/main/depth.c
index f187205b978..c5a910e144a 100644
--- a/src/mesa/main/depth.c
+++ b/src/mesa/main/depth.c
@@ -153,7 +153,7 @@ _mesa_DepthBoundsEXT( GLclampd zmin, GLclampd zmax )
* Initialize the depth buffer attribute group in the given context.
*/
void
-_mesa_init_depth(GLcontext *ctx)
+_mesa_init_depth(struct gl_context *ctx)
{
ctx->Depth.Test = GL_FALSE;
ctx->Depth.Clear = 1.0;
diff --git a/src/mesa/main/depth.h b/src/mesa/main/depth.h
index dcc0b4637a7..d61d3b121ba 100644
--- a/src/mesa/main/depth.h
+++ b/src/mesa/main/depth.h
@@ -50,7 +50,7 @@ extern void GLAPIENTRY
_mesa_DepthBoundsEXT( GLclampd zmin, GLclampd zmax );
extern void
-_mesa_init_depth( GLcontext * ctx );
+_mesa_init_depth( struct gl_context * ctx );
#else
diff --git a/src/mesa/main/depthstencil.c b/src/mesa/main/depthstencil.c
index dbaa8416457..c5466dc9fcc 100644
--- a/src/mesa/main/depthstencil.c
+++ b/src/mesa/main/depthstencil.c
@@ -46,7 +46,7 @@
static void *
-nop_get_pointer(GLcontext *ctx, struct gl_renderbuffer *rb, GLint x, GLint y)
+nop_get_pointer(struct gl_context *ctx, struct gl_renderbuffer *rb, GLint x, GLint y)
{
(void) ctx;
(void) rb;
@@ -73,7 +73,7 @@ delete_wrapper(struct gl_renderbuffer *rb)
* Realloc storage for wrapper.
*/
static GLboolean
-alloc_wrapper_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
+alloc_wrapper_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLenum internalFormat, GLuint width, GLuint height)
{
/* just pass this on to the wrapped renderbuffer */
@@ -103,7 +103,7 @@ alloc_wrapper_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
*/
static void
-get_row_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count,
+get_row_z24(struct gl_context *ctx, struct gl_renderbuffer *z24rb, GLuint count,
GLint x, GLint y, void *values)
{
struct gl_renderbuffer *dsrb = z24rb->Wrapped;
@@ -130,7 +130,7 @@ get_row_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count,
}
static void
-get_values_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count,
+get_values_z24(struct gl_context *ctx, struct gl_renderbuffer *z24rb, GLuint count,
const GLint x[], const GLint y[], void *values)
{
struct gl_renderbuffer *dsrb = z24rb->Wrapped;
@@ -155,7 +155,7 @@ get_values_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count,
}
static void
-put_row_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count,
+put_row_z24(struct gl_context *ctx, struct gl_renderbuffer *z24rb, GLuint count,
GLint x, GLint y, const void *values, const GLubyte *mask)
{
struct gl_renderbuffer *dsrb = z24rb->Wrapped;
@@ -206,7 +206,7 @@ put_row_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count,
}
static void
-put_mono_row_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count,
+put_mono_row_z24(struct gl_context *ctx, struct gl_renderbuffer *z24rb, GLuint count,
GLint x, GLint y, const void *value, const GLubyte *mask)
{
struct gl_renderbuffer *dsrb = z24rb->Wrapped;
@@ -260,7 +260,7 @@ put_mono_row_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count,
}
static void
-put_values_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count,
+put_values_z24(struct gl_context *ctx, struct gl_renderbuffer *z24rb, GLuint count,
const GLint x[], const GLint y[],
const void *values, const GLubyte *mask)
{
@@ -313,7 +313,7 @@ put_values_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count,
}
static void
-put_mono_values_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb,
+put_mono_values_z24(struct gl_context *ctx, struct gl_renderbuffer *z24rb,
GLuint count, const GLint x[], const GLint y[],
const void *value, const GLubyte *mask)
{
@@ -348,7 +348,7 @@ put_mono_values_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb,
* \return new depth renderbuffer
*/
struct gl_renderbuffer *
-_mesa_new_z24_renderbuffer_wrapper(GLcontext *ctx,
+_mesa_new_z24_renderbuffer_wrapper(struct gl_context *ctx,
struct gl_renderbuffer *dsrb)
{
struct gl_renderbuffer *z24rb;
@@ -396,7 +396,7 @@ _mesa_new_z24_renderbuffer_wrapper(GLcontext *ctx,
*/
static void
-get_row_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count,
+get_row_s8(struct gl_context *ctx, struct gl_renderbuffer *s8rb, GLuint count,
GLint x, GLint y, void *values)
{
struct gl_renderbuffer *dsrb = s8rb->Wrapped;
@@ -423,7 +423,7 @@ get_row_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count,
}
static void
-get_values_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count,
+get_values_s8(struct gl_context *ctx, struct gl_renderbuffer *s8rb, GLuint count,
const GLint x[], const GLint y[], void *values)
{
struct gl_renderbuffer *dsrb = s8rb->Wrapped;
@@ -448,7 +448,7 @@ get_values_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count,
}
static void
-put_row_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count,
+put_row_s8(struct gl_context *ctx, struct gl_renderbuffer *s8rb, GLuint count,
GLint x, GLint y, const void *values, const GLubyte *mask)
{
struct gl_renderbuffer *dsrb = s8rb->Wrapped;
@@ -499,7 +499,7 @@ put_row_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count,
}
static void
-put_mono_row_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count,
+put_mono_row_s8(struct gl_context *ctx, struct gl_renderbuffer *s8rb, GLuint count,
GLint x, GLint y, const void *value, const GLubyte *mask)
{
struct gl_renderbuffer *dsrb = s8rb->Wrapped;
@@ -550,7 +550,7 @@ put_mono_row_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count,
}
static void
-put_values_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count,
+put_values_s8(struct gl_context *ctx, struct gl_renderbuffer *s8rb, GLuint count,
const GLint x[], const GLint y[],
const void *values, const GLubyte *mask)
{
@@ -603,7 +603,7 @@ put_values_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count,
}
static void
-put_mono_values_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count,
+put_mono_values_s8(struct gl_context *ctx, struct gl_renderbuffer *s8rb, GLuint count,
const GLint x[], const GLint y[],
const void *value, const GLubyte *mask)
{
@@ -637,7 +637,7 @@ put_mono_values_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count,
* \return new stencil renderbuffer
*/
struct gl_renderbuffer *
-_mesa_new_s8_renderbuffer_wrapper(GLcontext *ctx, struct gl_renderbuffer *dsrb)
+_mesa_new_s8_renderbuffer_wrapper(struct gl_context *ctx, struct gl_renderbuffer *dsrb)
{
struct gl_renderbuffer *s8rb;
@@ -698,7 +698,7 @@ _mesa_new_s8_renderbuffer_wrapper(GLcontext *ctx, struct gl_renderbuffer *dsrb)
* (either 8-bit or 32-bit)
*/
void
-_mesa_extract_stencil(GLcontext *ctx,
+_mesa_extract_stencil(struct gl_context *ctx,
struct gl_renderbuffer *dsRb,
struct gl_renderbuffer *stencilRb)
{
@@ -747,7 +747,7 @@ _mesa_extract_stencil(GLcontext *ctx,
* \param stencilRb the source stencil buffer (either 8-bit or 32-bit)
*/
void
-_mesa_insert_stencil(GLcontext *ctx,
+_mesa_insert_stencil(struct gl_context *ctx,
struct gl_renderbuffer *dsRb,
struct gl_renderbuffer *stencilRb)
{
@@ -803,7 +803,7 @@ _mesa_insert_stencil(GLcontext *ctx,
* \param stencilRb the stencil renderbuffer to promote
*/
void
-_mesa_promote_stencil(GLcontext *ctx, struct gl_renderbuffer *stencilRb)
+_mesa_promote_stencil(struct gl_context *ctx, struct gl_renderbuffer *stencilRb)
{
const GLsizei width = stencilRb->Width;
const GLsizei height = stencilRb->Height;
diff --git a/src/mesa/main/depthstencil.h b/src/mesa/main/depthstencil.h
index afbac77f0e2..4db5868263a 100644
--- a/src/mesa/main/depthstencil.h
+++ b/src/mesa/main/depthstencil.h
@@ -29,29 +29,29 @@
#include "mtypes.h"
extern struct gl_renderbuffer *
-_mesa_new_z24_renderbuffer_wrapper(GLcontext *ctx,
+_mesa_new_z24_renderbuffer_wrapper(struct gl_context *ctx,
struct gl_renderbuffer *dsrb);
extern struct gl_renderbuffer *
-_mesa_new_s8_renderbuffer_wrapper(GLcontext *ctx,
+_mesa_new_s8_renderbuffer_wrapper(struct gl_context *ctx,
struct gl_renderbuffer *dsrb);
extern void
-_mesa_extract_stencil(GLcontext *ctx,
+_mesa_extract_stencil(struct gl_context *ctx,
struct gl_renderbuffer *dsRb,
struct gl_renderbuffer *stencilRb);
extern void
-_mesa_insert_stencil(GLcontext *ctx,
+_mesa_insert_stencil(struct gl_context *ctx,
struct gl_renderbuffer *dsRb,
struct gl_renderbuffer *stencilRb);
extern void
-_mesa_promote_stencil(GLcontext *ctx, struct gl_renderbuffer *stencilRb);
+_mesa_promote_stencil(struct gl_context *ctx, struct gl_renderbuffer *stencilRb);
#endif /* DEPTHSTENCIL_H */
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index cccec248539..e824226ca67 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -53,6 +53,7 @@
#include "image.h"
#include "light.h"
#include "macros.h"
+#include "pack.h"
#include "queryobj.h"
#include "teximage.h"
#include "mtypes.h"
@@ -77,9 +78,9 @@
struct gl_list_instruction
{
GLuint Size;
- void (*Execute)( GLcontext *ctx, void *data );
- void (*Destroy)( GLcontext *ctx, void *data );
- void (*Print)( GLcontext *ctx, void *data );
+ void (*Execute)( struct gl_context *ctx, void *data );
+ void (*Destroy)( struct gl_context *ctx, void *data );
+ void (*Print)( struct gl_context *ctx, void *data );
};
@@ -410,6 +411,16 @@ typedef enum
OPCODE_BEGIN_TRANSFORM_FEEDBACK,
OPCODE_END_TRANSFORM_FEEDBACK,
+ /* GL_EXT_texture_integer */
+ OPCODE_CLEARCOLOR_I,
+ OPCODE_CLEARCOLOR_UI,
+ OPCODE_TEXPARAMETER_I,
+ OPCODE_TEXPARAMETER_UI,
+
+ /* GL_EXT_separate_shader_objects */
+ OPCODE_ACTIVE_PROGRAM_EXT,
+ OPCODE_USE_SHADER_PROGRAM_EXT,
+
/* The following three are meta instructions */
OPCODE_ERROR, /* raise compiled-in error */
OPCODE_CONTINUE,
@@ -496,7 +507,7 @@ make_list(GLuint name, GLuint count)
* Lookup function to just encapsulate casting.
*/
static INLINE struct gl_display_list *
-lookup_list(GLcontext *ctx, GLuint list)
+lookup_list(struct gl_context *ctx, GLuint list)
{
return (struct gl_display_list *)
_mesa_HashLookup(ctx->Shared->DisplayList, list);
@@ -513,7 +524,7 @@ is_ext_opcode(OpCode opcode)
/** Destroy an extended opcode instruction */
static GLint
-ext_opcode_destroy(GLcontext *ctx, Node *node)
+ext_opcode_destroy(struct gl_context *ctx, Node *node)
{
const GLint i = node[0].opcode - OPCODE_EXT_0;
GLint step;
@@ -525,7 +536,7 @@ ext_opcode_destroy(GLcontext *ctx, Node *node)
/** Execute an extended opcode instruction */
static GLint
-ext_opcode_execute(GLcontext *ctx, Node *node)
+ext_opcode_execute(struct gl_context *ctx, Node *node)
{
const GLint i = node[0].opcode - OPCODE_EXT_0;
GLint step;
@@ -537,7 +548,7 @@ ext_opcode_execute(GLcontext *ctx, Node *node)
/** Print an extended opcode instruction */
static GLint
-ext_opcode_print(GLcontext *ctx, Node *node)
+ext_opcode_print(struct gl_context *ctx, Node *node)
{
const GLint i = node[0].opcode - OPCODE_EXT_0;
GLint step;
@@ -552,7 +563,7 @@ ext_opcode_print(GLcontext *ctx, Node *node)
* \param dlist - display list pointer
*/
void
-_mesa_delete_list(GLcontext *ctx, struct gl_display_list *dlist)
+_mesa_delete_list(struct gl_context *ctx, struct gl_display_list *dlist)
{
Node *n, *block;
GLboolean done;
@@ -730,7 +741,7 @@ _mesa_delete_list(GLcontext *ctx, struct gl_display_list *dlist)
* \param list - display list number
*/
static void
-destroy_list(GLcontext *ctx, GLuint list)
+destroy_list(struct gl_context *ctx, GLuint list)
{
struct gl_display_list *dlist;
@@ -814,7 +825,7 @@ translate_id(GLsizei n, GLenum type, const GLvoid * list)
* If we run out of memory, GL_OUT_OF_MEMORY will be recorded.
*/
static GLvoid *
-unpack_image(GLcontext *ctx, GLuint dimensions,
+unpack_image(struct gl_context *ctx, GLuint dimensions,
GLsizei width, GLsizei height, GLsizei depth,
GLenum format, GLenum type, const GLvoid * pixels,
const struct gl_pixelstore_attrib *unpack)
@@ -866,7 +877,7 @@ unpack_image(GLcontext *ctx, GLuint dimensions,
* \return pointer to allocated memory (the opcode space)
*/
static Node *
-dlist_alloc(GLcontext *ctx, OpCode opcode, GLuint bytes)
+dlist_alloc(struct gl_context *ctx, OpCode opcode, GLuint bytes)
{
const GLuint numNodes = 1 + (bytes + sizeof(Node) - 1) / sizeof(Node);
Node *n;
@@ -917,7 +928,7 @@ dlist_alloc(GLcontext *ctx, OpCode opcode, GLuint bytes)
* opcode).
*/
void *
-_mesa_dlist_alloc(GLcontext *ctx, GLuint opcode, GLuint bytes)
+_mesa_dlist_alloc(struct gl_context *ctx, GLuint opcode, GLuint bytes)
{
Node *n = dlist_alloc(ctx, (OpCode) opcode, bytes);
if (n)
@@ -938,11 +949,11 @@ _mesa_dlist_alloc(GLcontext *ctx, GLuint opcode, GLuint bytes)
* \return the new opcode number or -1 if error
*/
GLint
-_mesa_dlist_alloc_opcode(GLcontext *ctx,
+_mesa_dlist_alloc_opcode(struct gl_context *ctx,
GLuint size,
- void (*execute) (GLcontext *, void *),
- void (*destroy) (GLcontext *, void *),
- void (*print) (GLcontext *, void *))
+ void (*execute) (struct gl_context *, void *),
+ void (*destroy) (struct gl_context *, void *),
+ void (*print) (struct gl_context *, void *))
{
if (ctx->ListExt->NumOpcodes < MAX_DLIST_EXT_OPCODES) {
const GLuint i = ctx->ListExt->NumOpcodes++;
@@ -967,7 +978,7 @@ _mesa_dlist_alloc_opcode(GLcontext *ctx,
* \return pointer to start of instruction space
*/
static INLINE Node *
-alloc_instruction(GLcontext *ctx, OpCode opcode, GLuint nparams)
+alloc_instruction(struct gl_context *ctx, OpCode opcode, GLuint nparams)
{
return dlist_alloc(ctx, opcode, nparams * sizeof(Node));
}
@@ -1132,7 +1143,7 @@ save_BlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
}
}
-static void invalidate_saved_current_state( GLcontext *ctx )
+static void invalidate_saved_current_state( struct gl_context *ctx )
{
GLint i;
@@ -6786,6 +6797,137 @@ save_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose,
}
}
+static void GLAPIENTRY
+save_UseShaderProgramEXT(GLenum type, GLuint program)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_USE_SHADER_PROGRAM_EXT, 2);
+ if (n) {
+ n[1].ui = type;
+ n[2].ui = program;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_UseShaderProgramEXT(ctx->Exec, (type, program));
+ }
+}
+
+static void GLAPIENTRY
+save_ActiveProgramEXT(GLuint program)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_ACTIVE_PROGRAM_EXT, 1);
+ if (n) {
+ n[1].ui = program;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ActiveProgramEXT(ctx->Exec, (program));
+ }
+}
+
+/** GL_EXT_texture_integer */
+static void GLAPIENTRY
+save_ClearColorIi(GLint red, GLint green, GLint blue, GLint alpha)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_CLEARCOLOR_I, 4);
+ if (n) {
+ n[1].i = red;
+ n[2].i = green;
+ n[3].i = blue;
+ n[4].i = alpha;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ClearColorIiEXT(ctx->Exec, (red, green, blue, alpha));
+ }
+}
+
+/** GL_EXT_texture_integer */
+static void GLAPIENTRY
+save_ClearColorIui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_CLEARCOLOR_UI, 4);
+ if (n) {
+ n[1].ui = red;
+ n[2].ui = green;
+ n[3].ui = blue;
+ n[4].ui = alpha;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ClearColorIuiEXT(ctx->Exec, (red, green, blue, alpha));
+ }
+}
+
+/** GL_EXT_texture_integer */
+static void GLAPIENTRY
+save_TexParameterIiv(GLenum target, GLenum pname, const GLint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_TEXPARAMETER_I, 6);
+ if (n) {
+ n[1].e = target;
+ n[2].e = pname;
+ n[3].i = params[0];
+ n[4].i = params[1];
+ n[5].i = params[2];
+ n[6].i = params[3];
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_TexParameterIivEXT(ctx->Exec, (target, pname, params));
+ }
+}
+
+/** GL_EXT_texture_integer */
+static void GLAPIENTRY
+save_TexParameterIuiv(GLenum target, GLenum pname, const GLuint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_TEXPARAMETER_UI, 6);
+ if (n) {
+ n[1].e = target;
+ n[2].e = pname;
+ n[3].ui = params[0];
+ n[4].ui = params[1];
+ n[5].ui = params[2];
+ n[6].ui = params[3];
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_TexParameterIuivEXT(ctx->Exec, (target, pname, params));
+ }
+}
+
+/** GL_EXT_texture_integer */
+static void GLAPIENTRY
+exec_GetTexParameterIiv(GLenum target, GLenum pname, GLint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ CALL_GetTexParameterIivEXT(ctx->Exec, (target, pname, params));
+}
+
+/** GL_EXT_texture_integer */
+static void GLAPIENTRY
+exec_GetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ CALL_GetTexParameterIuivEXT(ctx->Exec, (target, pname, params));
+}
+
+
+
/**
@@ -6795,7 +6937,7 @@ save_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose,
* command that provoked the error. I don't see this as a problem.
*/
static void
-save_error(GLcontext *ctx, GLenum error, const char *s)
+save_error(struct gl_context *ctx, GLenum error, const char *s)
{
Node *n;
n = alloc_instruction(ctx, OPCODE_ERROR, 2);
@@ -6810,7 +6952,7 @@ save_error(GLcontext *ctx, GLenum error, const char *s)
* Compile an error into current display list.
*/
void
-_mesa_compile_error(GLcontext *ctx, GLenum error, const char *s)
+_mesa_compile_error(struct gl_context *ctx, GLenum error, const char *s)
{
if (ctx->CompileFlag)
save_error(ctx, error, s);
@@ -6823,7 +6965,7 @@ _mesa_compile_error(GLcontext *ctx, GLenum error, const char *s)
* Test if ID names a display list.
*/
static GLboolean
-islist(GLcontext *ctx, GLuint list)
+islist(struct gl_context *ctx, GLuint list)
{
if (list > 0 && lookup_list(ctx, list)) {
return GL_TRUE;
@@ -6847,7 +6989,7 @@ islist(GLcontext *ctx, GLuint list)
* \param list - display list number
*/
static void
-execute_list(GLcontext *ctx, GLuint list)
+execute_list(struct gl_context *ctx, GLuint list)
{
struct gl_display_list *dlist;
Node *n;
@@ -7673,6 +7815,12 @@ execute_list(GLcontext *ctx, GLuint list)
case OPCODE_USE_PROGRAM:
CALL_UseProgramObjectARB(ctx->Exec, (n[1].ui));
break;
+ case OPCODE_USE_SHADER_PROGRAM_EXT:
+ CALL_UseShaderProgramEXT(ctx->Exec, (n[1].ui, n[2].ui));
+ break;
+ case OPCODE_ACTIVE_PROGRAM_EXT:
+ CALL_ActiveProgramEXT(ctx->Exec, (n[1].ui));
+ break;
case OPCODE_UNIFORM_1F:
CALL_Uniform1fARB(ctx->Exec, (n[1].i, n[2].f));
break;
@@ -7903,6 +8051,35 @@ execute_list(GLcontext *ctx, GLuint list)
CALL_EvalPoint2(ctx->Exec, (n[1].i, n[2].i));
break;
+ /* GL_EXT_texture_integer */
+ case OPCODE_CLEARCOLOR_I:
+ CALL_ClearColorIiEXT(ctx->Exec, (n[1].i, n[2].i, n[3].i, n[4].i));
+ break;
+ case OPCODE_CLEARCOLOR_UI:
+ CALL_ClearColorIuiEXT(ctx->Exec,
+ (n[1].ui, n[2].ui, n[3].ui, n[4].ui));
+ break;
+ case OPCODE_TEXPARAMETER_I:
+ {
+ GLint params[4];
+ params[0] = n[3].i;
+ params[1] = n[4].i;
+ params[2] = n[5].i;
+ params[3] = n[6].i;
+ CALL_TexParameterIivEXT(ctx->Exec, (n[1].e, n[2].e, params));
+ }
+ break;
+ case OPCODE_TEXPARAMETER_UI:
+ {
+ GLuint params[4];
+ params[0] = n[3].ui;
+ params[1] = n[4].ui;
+ params[2] = n[5].ui;
+ params[3] = n[6].ui;
+ CALL_TexParameterIuivEXT(ctx->Exec, (n[1].e, n[2].e, params));
+ }
+ break;
+
case OPCODE_CONTINUE:
n = (Node *) n[1].next;
break;
@@ -9531,6 +9708,18 @@ _mesa_create_save_table(void)
SET_ObjectUnpurgeableAPPLE(table, _mesa_ObjectUnpurgeableAPPLE);
#endif
+ /* GL_EXT_texture_integer */
+ SET_ClearColorIiEXT(table, save_ClearColorIi);
+ SET_ClearColorIuiEXT(table, save_ClearColorIui);
+ SET_TexParameterIivEXT(table, save_TexParameterIiv);
+ SET_TexParameterIuivEXT(table, save_TexParameterIuiv);
+ SET_GetTexParameterIivEXT(table, exec_GetTexParameterIiv);
+ SET_GetTexParameterIuivEXT(table, exec_GetTexParameterIuiv);
+
+ /* 377. GL_EXT_separate_shader_objects */
+ SET_UseShaderProgramEXT(table, save_UseShaderProgramEXT);
+ SET_ActiveProgramEXT(table, save_ActiveProgramEXT);
+
/* GL 3.0 */
#if 0
SET_ClearBufferiv(table, save_ClearBufferiv);
@@ -9577,7 +9766,7 @@ enum_string(GLenum k)
* TODO: many commands aren't handled yet.
*/
static void GLAPIENTRY
-print_list(GLcontext *ctx, GLuint list)
+print_list(struct gl_context *ctx, GLuint list)
{
struct gl_display_list *dlist;
Node *n;
@@ -9969,7 +10158,7 @@ void _mesa_init_dlist_dispatch(struct _glapi_table *disp)
* Initialize display list state for given context.
*/
void
-_mesa_init_display_list(GLcontext *ctx)
+_mesa_init_display_list(struct gl_context *ctx)
{
static GLboolean tableInitialized = GL_FALSE;
@@ -9999,7 +10188,7 @@ _mesa_init_display_list(GLcontext *ctx)
void
-_mesa_free_display_list_data(GLcontext *ctx)
+_mesa_free_display_list_data(struct gl_context *ctx)
{
free(ctx->ListExt);
ctx->ListExt = NULL;
diff --git a/src/mesa/main/dlist.h b/src/mesa/main/dlist.h
index 86bb132e56e..24241a4bd4f 100644
--- a/src/mesa/main/dlist.h
+++ b/src/mesa/main/dlist.h
@@ -49,16 +49,16 @@ extern void GLAPIENTRY _mesa_CallList( GLuint list );
extern void GLAPIENTRY _mesa_CallLists( GLsizei n, GLenum type, const GLvoid *lists );
-extern void _mesa_compile_error( GLcontext *ctx, GLenum error, const char *s );
+extern void _mesa_compile_error( struct gl_context *ctx, GLenum error, const char *s );
-extern void *_mesa_dlist_alloc(GLcontext *ctx, GLuint opcode, GLuint sz);
+extern void *_mesa_dlist_alloc(struct gl_context *ctx, GLuint opcode, GLuint sz);
-extern GLint _mesa_dlist_alloc_opcode( GLcontext *ctx, GLuint sz,
- void (*execute)( GLcontext *, void * ),
- void (*destroy)( GLcontext *, void * ),
- void (*print)( GLcontext *, void * ) );
+extern GLint _mesa_dlist_alloc_opcode( struct gl_context *ctx, GLuint sz,
+ void (*execute)( struct gl_context *, void * ),
+ void (*destroy)( struct gl_context *, void * ),
+ void (*print)( struct gl_context *, void * ) );
-extern void _mesa_delete_list(GLcontext *ctx, struct gl_display_list *dlist);
+extern void _mesa_delete_list(struct gl_context *ctx, struct gl_display_list *dlist);
extern void _mesa_save_vtxfmt_init( GLvertexformat *vfmt );
@@ -76,7 +76,7 @@ extern void _mesa_init_dlist_dispatch(struct _glapi_table *disp);
#define _MESA_INIT_DLIST_VTXFMT(vfmt, impl) do { } while (0)
static INLINE void
-_mesa_delete_list(GLcontext *ctx, struct gl_display_list *dlist)
+_mesa_delete_list(struct gl_context *ctx, struct gl_display_list *dlist)
{
/* there should be no list to delete */
ASSERT_NO_FEATURE();
@@ -95,9 +95,9 @@ _mesa_init_dlist_dispatch(struct _glapi_table *disp)
#endif /* FEATURE_dlist */
-extern void _mesa_init_display_list( GLcontext * ctx );
+extern void _mesa_init_display_list( struct gl_context * ctx );
-extern void _mesa_free_display_list_data(GLcontext *ctx);
+extern void _mesa_free_display_list_data(struct gl_context *ctx);
#endif /* DLIST_H */
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c
index bf36a7e7a49..757aae6e703 100644
--- a/src/mesa/main/drawpix.c
+++ b/src/mesa/main/drawpix.c
@@ -32,23 +32,12 @@
#include "framebuffer.h"
#include "readpix.h"
#include "state.h"
-#include "main/dispatch.h"
+#include "dispatch.h"
#if FEATURE_drawpix
-/**
- * If a fragment program is enabled, check that it's valid.
- * \return GL_TRUE if valid, GL_FALSE otherwise
- */
-static GLboolean
-valid_fragment_program(GLcontext *ctx)
-{
- return !(ctx->FragmentProgram.Enabled && !ctx->FragmentProgram._Enabled);
-}
-
-
/*
* Execute glDrawPixels
*/
@@ -65,33 +54,21 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
}
/* We're not using the current vertex program, and the driver may install
- * it's own.
+ * its own. Note: this may dirty some state.
*/
_mesa_set_vp_override(ctx, GL_TRUE);
- if (ctx->NewState) {
- _mesa_update_state(ctx);
- }
-
- if (!valid_fragment_program(ctx)) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glDrawPixels (invalid fragment program)");
- goto end;
+ /* Note: this call does state validation */
+ if (!_mesa_valid_to_render(ctx, "glDrawPixels")) {
+ goto end; /* the error code was recorded */
}
if (_mesa_error_check_format_type(ctx, format, type, GL_TRUE)) {
- /* the error was already recorded */
- goto end;
- }
-
- if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
- _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
- "glDrawPixels(incomplete framebuffer)" );
- goto end;
+ goto end; /* the error code was recorded */
}
if (!ctx->Current.RasterPosValid) {
- goto end; /* no-op, not an error */
+ goto end; /* no-op, not an error */
}
if (ctx->RenderMode == GL_RENDER) {
@@ -165,22 +142,17 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
}
/* We're not using the current vertex program, and the driver may install
- * it's own.
+ * it's own. Note: this may dirty some state.
*/
_mesa_set_vp_override(ctx, GL_TRUE);
- if (ctx->NewState) {
- _mesa_update_state(ctx);
+ /* Note: this call does state validation */
+ if (!_mesa_valid_to_render(ctx, "glCopyPixels")) {
+ goto end; /* the error code was recorded */
}
- if (!valid_fragment_program(ctx)) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glCopyPixels (invalid fragment program)");
- goto end;
- }
-
- if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT ||
- ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
+ /* Check read buffer's status (draw buffer was already checked) */
+ if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
_mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
"glCopyPixels(incomplete framebuffer)" );
goto end;
@@ -241,19 +213,9 @@ _mesa_Bitmap( GLsizei width, GLsizei height,
return; /* do nothing */
}
- if (ctx->NewState) {
- _mesa_update_state(ctx);
- }
-
- if (!valid_fragment_program(ctx)) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glBitmap (invalid fragment program)");
- return;
- }
-
- if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
- _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
- "glBitmap(incomplete framebuffer)");
+ /* Note: this call does state validation */
+ if (!_mesa_valid_to_render(ctx, "glBitmap")) {
+ /* the error code was recorded */
return;
}
diff --git a/src/mesa/main/drawtex.c b/src/mesa/main/drawtex.c
index c2ad5f23862..b9afc9974e0 100644
--- a/src/mesa/main/drawtex.c
+++ b/src/mesa/main/drawtex.c
@@ -30,7 +30,7 @@
static void
-draw_texture(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
+draw_texture(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
GLfloat width, GLfloat height)
{
if (!ctx->Extensions.OES_draw_texture) {
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index b2be44830a0..a038a95c55a 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -50,7 +50,7 @@
* Helper to enable/disable client-side state.
*/
static void
-client_state(GLcontext *ctx, GLenum cap, GLboolean state)
+client_state(struct gl_context *ctx, GLenum cap, GLboolean state)
{
struct gl_array_object *arrayObj = ctx->Array.ArrayObj;
GLuint flag;
@@ -124,6 +124,15 @@ client_state(GLcontext *ctx, GLenum cap, GLboolean state)
break;
#endif /* FEATURE_NV_vertex_program */
+ /* GL_NV_primitive_restart */
+ case GL_PRIMITIVE_RESTART_NV:
+ if (!ctx->Extensions.NV_primitive_restart) {
+ goto invalid_enum_error;
+ }
+ var = &ctx->Array.PrimitiveRestart;
+ flag = 0;
+ break;
+
default:
goto invalid_enum_error;
}
@@ -207,7 +216,7 @@ _mesa_DisableClientState( GLenum cap )
* higher than the number of supported coordinate units. And we'll return NULL.
*/
static struct gl_texture_unit *
-get_texcoord_unit(GLcontext *ctx)
+get_texcoord_unit(struct gl_context *ctx)
{
if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureCoordUnits) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glEnable/Disable(texcoord unit)");
@@ -225,7 +234,7 @@ get_texcoord_unit(GLcontext *ctx)
* \return GL_TRUE if state is changing or GL_FALSE if no change
*/
static GLboolean
-enable_texture(GLcontext *ctx, GLboolean state, GLbitfield texBit)
+enable_texture(struct gl_context *ctx, GLboolean state, GLbitfield texBit)
{
struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
const GLbitfield newenabled = state
@@ -253,7 +262,7 @@ enable_texture(GLcontext *ctx, GLboolean state, GLbitfield texBit)
* dd_function_table::Enable.
*/
void
-_mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state)
+_mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
{
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "%s %s (newstate is %x)\n",
@@ -945,9 +954,11 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state)
break;
#endif
- /* GL 3.1 primitive restart */
+ /* GL 3.1 primitive restart. Note: this enum is different from
+ * GL_PRIMITIVE_RESTART_NV (which is client state).
+ */
case GL_PRIMITIVE_RESTART:
- if (ctx->VersionMajor * 10 + ctx->VersionMinor < 31) {
+ if (ctx->VersionMajor * 10 + ctx->VersionMinor < 31) {
goto invalid_enum_error;
}
if (ctx->Array.PrimitiveRestart != state) {
@@ -1005,7 +1016,7 @@ _mesa_Disable( GLenum cap )
* Enable/disable an indexed state var.
*/
void
-_mesa_set_enablei(GLcontext *ctx, GLenum cap, GLuint index, GLboolean state)
+_mesa_set_enablei(struct gl_context *ctx, GLenum cap, GLuint index, GLboolean state)
{
ASSERT(state == 0 || state == 1);
switch (cap) {
@@ -1095,7 +1106,7 @@ _mesa_IsEnabledIndexed( GLenum cap, GLuint index )
* Helper function to determine whether a texture target is enabled.
*/
static GLboolean
-is_texture_enabled(GLcontext *ctx, GLbitfield bit)
+is_texture_enabled(struct gl_context *ctx, GLbitfield bit)
{
const struct gl_texture_unit *const texUnit =
&ctx->Texture.Unit[ctx->Texture.CurrentUnit];
@@ -1454,9 +1465,16 @@ _mesa_IsEnabled( GLenum cap )
return ctx->TransformFeedback.RasterDiscard;
#endif
+ /* GL_NV_primitive_restart */
+ case GL_PRIMITIVE_RESTART_NV:
+ if (!ctx->Extensions.NV_primitive_restart) {
+ goto invalid_enum_error;
+ }
+ return ctx->Array.PrimitiveRestart;
+
/* GL 3.1 primitive restart */
case GL_PRIMITIVE_RESTART:
- if (ctx->VersionMajor * 10 + ctx->VersionMinor < 31) {
+ if (ctx->VersionMajor * 10 + ctx->VersionMinor < 31) {
goto invalid_enum_error;
}
return ctx->Array.PrimitiveRestart;
diff --git a/src/mesa/main/enable.h b/src/mesa/main/enable.h
index 24e3181a8ba..69e52b1cb26 100644
--- a/src/mesa/main/enable.h
+++ b/src/mesa/main/enable.h
@@ -36,7 +36,7 @@
extern void
-_mesa_set_enable( GLcontext* ctx, GLenum cap, GLboolean state );
+_mesa_set_enable( struct gl_context* ctx, GLenum cap, GLboolean state );
extern void GLAPIENTRY
_mesa_Disable( GLenum cap );
@@ -48,7 +48,7 @@ extern GLboolean GLAPIENTRY
_mesa_IsEnabled( GLenum cap );
extern void
-_mesa_set_enablei(GLcontext *ctx, GLenum cap, GLuint index, GLboolean state);
+_mesa_set_enablei(struct gl_context *ctx, GLenum cap, GLuint index, GLboolean state);
extern void GLAPIENTRY
_mesa_DisableIndexed( GLenum cap, GLuint index );
diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c
index bc18e1b1131..48291cfa7af 100644
--- a/src/mesa/main/enums.c
+++ b/src/mesa/main/enums.c
@@ -53,6 +53,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_ACCUM_RED_BITS\0"
"GL_ACTIVE_ATTRIBUTES\0"
"GL_ACTIVE_ATTRIBUTE_MAX_LENGTH\0"
+ "GL_ACTIVE_PROGRAM_EXT\0"
"GL_ACTIVE_STENCIL_FACE_EXT\0"
"GL_ACTIVE_TEXTURE\0"
"GL_ACTIVE_TEXTURE_ARB\0"
@@ -71,13 +72,20 @@ LONGSTRING static const char enum_string_table[] =
"GL_ALPHA12\0"
"GL_ALPHA12_EXT\0"
"GL_ALPHA16\0"
+ "GL_ALPHA16I_EXT\0"
+ "GL_ALPHA16UI_EXT\0"
"GL_ALPHA16_EXT\0"
+ "GL_ALPHA32I_EXT\0"
+ "GL_ALPHA32UI_EXT\0"
"GL_ALPHA4\0"
"GL_ALPHA4_EXT\0"
"GL_ALPHA8\0"
+ "GL_ALPHA8I_EXT\0"
+ "GL_ALPHA8UI_EXT\0"
"GL_ALPHA8_EXT\0"
"GL_ALPHA_BIAS\0"
"GL_ALPHA_BITS\0"
+ "GL_ALPHA_INTEGER_EXT\0"
"GL_ALPHA_SCALE\0"
"GL_ALPHA_TEST\0"
"GL_ALPHA_TEST_FUNC\0"
@@ -110,6 +118,8 @@ LONGSTRING static const char enum_string_table[] =
"GL_BGR\0"
"GL_BGRA\0"
"GL_BGRA_EXT\0"
+ "GL_BGRA_INTEGER_EXT\0"
+ "GL_BGR_INTEGER_EXT\0"
"GL_BITMAP\0"
"GL_BITMAP_TOKEN\0"
"GL_BLEND\0"
@@ -137,6 +147,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_BLUE\0"
"GL_BLUE_BIAS\0"
"GL_BLUE_BITS\0"
+ "GL_BLUE_INTEGER_EXT\0"
"GL_BLUE_SCALE\0"
"GL_BOOL\0"
"GL_BOOL_ARB\0"
@@ -689,6 +700,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_GREEN\0"
"GL_GREEN_BIAS\0"
"GL_GREEN_BITS\0"
+ "GL_GREEN_INTEGER_EXT\0"
"GL_GREEN_SCALE\0"
"GL_HALF_FLOAT\0"
"GL_HALF_FLOAT_OES\0"
@@ -742,10 +754,16 @@ LONGSTRING static const char enum_string_table[] =
"GL_INTENSITY12\0"
"GL_INTENSITY12_EXT\0"
"GL_INTENSITY16\0"
+ "GL_INTENSITY16I_EXT\0"
+ "GL_INTENSITY16UI_EXT\0"
"GL_INTENSITY16_EXT\0"
+ "GL_INTENSITY32I_EXT\0"
+ "GL_INTENSITY32UI_EXT\0"
"GL_INTENSITY4\0"
"GL_INTENSITY4_EXT\0"
"GL_INTENSITY8\0"
+ "GL_INTENSITY8I_EXT\0"
+ "GL_INTENSITY8UI_EXT\0"
"GL_INTENSITY8_EXT\0"
"GL_INTENSITY_EXT\0"
"GL_INTERLEAVED_ATTRIBS_EXT\0"
@@ -831,9 +849,13 @@ LONGSTRING static const char enum_string_table[] =
"GL_LUMINANCE12_ALPHA4_EXT\0"
"GL_LUMINANCE12_EXT\0"
"GL_LUMINANCE16\0"
+ "GL_LUMINANCE16I_EXT\0"
+ "GL_LUMINANCE16UI_EXT\0"
"GL_LUMINANCE16_ALPHA16\0"
"GL_LUMINANCE16_ALPHA16_EXT\0"
"GL_LUMINANCE16_EXT\0"
+ "GL_LUMINANCE32I_EXT\0"
+ "GL_LUMINANCE32UI_EXT\0"
"GL_LUMINANCE4\0"
"GL_LUMINANCE4_ALPHA4\0"
"GL_LUMINANCE4_ALPHA4_EXT\0"
@@ -841,10 +863,20 @@ LONGSTRING static const char enum_string_table[] =
"GL_LUMINANCE6_ALPHA2\0"
"GL_LUMINANCE6_ALPHA2_EXT\0"
"GL_LUMINANCE8\0"
+ "GL_LUMINANCE8I_EXT\0"
+ "GL_LUMINANCE8UI_EXT\0"
"GL_LUMINANCE8_ALPHA8\0"
"GL_LUMINANCE8_ALPHA8_EXT\0"
"GL_LUMINANCE8_EXT\0"
"GL_LUMINANCE_ALPHA\0"
+ "GL_LUMINANCE_ALPHA16I_EXT\0"
+ "GL_LUMINANCE_ALPHA16UI_EXT\0"
+ "GL_LUMINANCE_ALPHA32I_EXT\0"
+ "GL_LUMINANCE_ALPHA32UI_EXT\0"
+ "GL_LUMINANCE_ALPHA8I_EXT\0"
+ "GL_LUMINANCE_ALPHA8UI_EXT\0"
+ "GL_LUMINANCE_ALPHA_INTEGER_EXT\0"
+ "GL_LUMINANCE_INTEGER_EXT\0"
"GL_MAP1_COLOR_4\0"
"GL_MAP1_GRID_DOMAIN\0"
"GL_MAP1_GRID_SEGMENTS\0"
@@ -1369,6 +1401,8 @@ LONGSTRING static const char enum_string_table[] =
"GL_PRIMARY_COLOR_ARB\0"
"GL_PRIMARY_COLOR_EXT\0"
"GL_PRIMITIVES_GENERATED_EXT\0"
+ "GL_PRIMITIVE_RESTART_INDEX_NV\0"
+ "GL_PRIMITIVE_RESTART_NV\0"
"GL_PROGRAM_ADDRESS_REGISTERS_ARB\0"
"GL_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
"GL_PROGRAM_ATTRIBS_ARB\0"
@@ -1462,6 +1496,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_REDUCE_EXT\0"
"GL_RED_BIAS\0"
"GL_RED_BITS\0"
+ "GL_RED_INTEGER_EXT\0"
"GL_RED_SCALE\0"
"GL_REFLECTION_MAP\0"
"GL_REFLECTION_MAP_ARB\0"
@@ -1516,8 +1551,12 @@ LONGSTRING static const char enum_string_table[] =
"GL_RGB12\0"
"GL_RGB12_EXT\0"
"GL_RGB16\0"
+ "GL_RGB16I_EXT\0"
+ "GL_RGB16UI_EXT\0"
"GL_RGB16_EXT\0"
"GL_RGB2_EXT\0"
+ "GL_RGB32I_EXT\0"
+ "GL_RGB32UI_EXT\0"
"GL_RGB4\0"
"GL_RGB4_EXT\0"
"GL_RGB4_S3TC\0"
@@ -1529,28 +1568,39 @@ LONGSTRING static const char enum_string_table[] =
"GL_RGB5_A1_OES\0"
"GL_RGB5_EXT\0"
"GL_RGB8\0"
+ "GL_RGB8I_EXT\0"
+ "GL_RGB8UI_EXT\0"
"GL_RGB8_EXT\0"
"GL_RGB8_OES\0"
"GL_RGBA\0"
"GL_RGBA12\0"
"GL_RGBA12_EXT\0"
"GL_RGBA16\0"
+ "GL_RGBA16I_EXT\0"
+ "GL_RGBA16UI_EXT\0"
"GL_RGBA16_EXT\0"
"GL_RGBA2\0"
"GL_RGBA2_EXT\0"
+ "GL_RGBA32I_EXT\0"
+ "GL_RGBA32UI_EXT\0"
"GL_RGBA4\0"
"GL_RGBA4_DXT5_S3TC\0"
"GL_RGBA4_EXT\0"
"GL_RGBA4_OES\0"
"GL_RGBA4_S3TC\0"
"GL_RGBA8\0"
+ "GL_RGBA8I_EXT\0"
+ "GL_RGBA8UI_EXT\0"
"GL_RGBA8_EXT\0"
"GL_RGBA8_OES\0"
"GL_RGBA8_SNORM\0"
"GL_RGBA_DXT5_S3TC\0"
+ "GL_RGBA_INTEGER_EXT\0"
+ "GL_RGBA_INTEGER_MODE_EXT\0"
"GL_RGBA_MODE\0"
"GL_RGBA_S3TC\0"
"GL_RGBA_SNORM\0"
+ "GL_RGB_INTEGER_EXT\0"
"GL_RGB_S3TC\0"
"GL_RGB_SCALE\0"
"GL_RGB_SCALE_ARB\0"
@@ -2103,7 +2153,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_ZOOM_Y\0"
;
-static const enum_elt all_enums[2065] =
+static const enum_elt all_enums[2115] =
{
{ 0, 0x00000600 }, /* GL_2D */
{ 6, 0x00001407 }, /* GL_2_BYTES */
@@ -2122,3481 +2172,3580 @@ static const enum_elt all_enums[2065] =
{ 206, 0x00000D58 }, /* GL_ACCUM_RED_BITS */
{ 224, 0x00008B89 }, /* GL_ACTIVE_ATTRIBUTES */
{ 245, 0x00008B8A }, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
- { 276, 0x00008911 }, /* GL_ACTIVE_STENCIL_FACE_EXT */
- { 303, 0x000084E0 }, /* GL_ACTIVE_TEXTURE */
- { 321, 0x000084E0 }, /* GL_ACTIVE_TEXTURE_ARB */
- { 343, 0x00008B86 }, /* GL_ACTIVE_UNIFORMS */
- { 362, 0x00008B87 }, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
- { 391, 0x000086A5 }, /* GL_ACTIVE_VERTEX_UNITS_ARB */
- { 418, 0x00000104 }, /* GL_ADD */
- { 425, 0x00008574 }, /* GL_ADD_SIGNED */
- { 439, 0x00008574 }, /* GL_ADD_SIGNED_ARB */
- { 457, 0x00008574 }, /* GL_ADD_SIGNED_EXT */
- { 475, 0x0000846E }, /* GL_ALIASED_LINE_WIDTH_RANGE */
- { 503, 0x0000846D }, /* GL_ALIASED_POINT_SIZE_RANGE */
- { 531, 0x000FFFFF }, /* GL_ALL_ATTRIB_BITS */
- { 550, 0xFFFFFFFF }, /* GL_ALL_CLIENT_ATTRIB_BITS */
- { 576, 0x00001906 }, /* GL_ALPHA */
- { 585, 0x0000803D }, /* GL_ALPHA12 */
- { 596, 0x0000803D }, /* GL_ALPHA12_EXT */
- { 611, 0x0000803E }, /* GL_ALPHA16 */
- { 622, 0x0000803E }, /* GL_ALPHA16_EXT */
- { 637, 0x0000803B }, /* GL_ALPHA4 */
- { 647, 0x0000803B }, /* GL_ALPHA4_EXT */
- { 661, 0x0000803C }, /* GL_ALPHA8 */
- { 671, 0x0000803C }, /* GL_ALPHA8_EXT */
- { 685, 0x00000D1D }, /* GL_ALPHA_BIAS */
- { 699, 0x00000D55 }, /* GL_ALPHA_BITS */
- { 713, 0x00000D1C }, /* GL_ALPHA_SCALE */
- { 728, 0x00000BC0 }, /* GL_ALPHA_TEST */
- { 742, 0x00000BC1 }, /* GL_ALPHA_TEST_FUNC */
- { 761, 0x00000BC2 }, /* GL_ALPHA_TEST_REF */
- { 779, 0x0000911A }, /* GL_ALREADY_SIGNALED */
- { 799, 0x00000207 }, /* GL_ALWAYS */
- { 809, 0x00001200 }, /* GL_AMBIENT */
- { 820, 0x00001602 }, /* GL_AMBIENT_AND_DIFFUSE */
- { 843, 0x00001501 }, /* GL_AND */
- { 850, 0x00001504 }, /* GL_AND_INVERTED */
- { 866, 0x00001502 }, /* GL_AND_REVERSE */
- { 881, 0x00008892 }, /* GL_ARRAY_BUFFER */
- { 897, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING */
- { 921, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING_ARB */
- { 949, 0x00008B85 }, /* GL_ATTACHED_SHADERS */
- { 969, 0x00008645 }, /* GL_ATTRIB_ARRAY_POINTER_NV */
- { 996, 0x00008623 }, /* GL_ATTRIB_ARRAY_SIZE_NV */
- { 1020, 0x00008624 }, /* GL_ATTRIB_ARRAY_STRIDE_NV */
- { 1046, 0x00008625 }, /* GL_ATTRIB_ARRAY_TYPE_NV */
- { 1070, 0x00000BB0 }, /* GL_ATTRIB_STACK_DEPTH */
- { 1092, 0x00000D80 }, /* GL_AUTO_NORMAL */
- { 1107, 0x00000409 }, /* GL_AUX0 */
- { 1115, 0x0000040A }, /* GL_AUX1 */
- { 1123, 0x0000040B }, /* GL_AUX2 */
- { 1131, 0x0000040C }, /* GL_AUX3 */
- { 1139, 0x00000C00 }, /* GL_AUX_BUFFERS */
- { 1154, 0x00000405 }, /* GL_BACK */
- { 1162, 0x00000402 }, /* GL_BACK_LEFT */
- { 1175, 0x00000403 }, /* GL_BACK_RIGHT */
- { 1189, 0x000080E0 }, /* GL_BGR */
- { 1196, 0x000080E1 }, /* GL_BGRA */
- { 1204, 0x000080E1 }, /* GL_BGRA_EXT */
- { 1216, 0x00001A00 }, /* GL_BITMAP */
- { 1226, 0x00000704 }, /* GL_BITMAP_TOKEN */
- { 1242, 0x00000BE2 }, /* GL_BLEND */
- { 1251, 0x00008005 }, /* GL_BLEND_COLOR */
- { 1266, 0x00008005 }, /* GL_BLEND_COLOR_EXT */
- { 1285, 0x00000BE0 }, /* GL_BLEND_DST */
- { 1298, 0x000080CA }, /* GL_BLEND_DST_ALPHA */
- { 1317, 0x000080CA }, /* GL_BLEND_DST_ALPHA_OES */
- { 1340, 0x000080C8 }, /* GL_BLEND_DST_RGB */
- { 1357, 0x000080C8 }, /* GL_BLEND_DST_RGB_OES */
- { 1378, 0x00008009 }, /* GL_BLEND_EQUATION */
- { 1396, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA */
- { 1420, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_EXT */
- { 1448, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_OES */
- { 1476, 0x00008009 }, /* GL_BLEND_EQUATION_EXT */
- { 1498, 0x00008009 }, /* GL_BLEND_EQUATION_OES */
- { 1520, 0x00008009 }, /* GL_BLEND_EQUATION_RGB */
- { 1542, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_EXT */
- { 1568, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_OES */
- { 1594, 0x00000BE1 }, /* GL_BLEND_SRC */
- { 1607, 0x000080CB }, /* GL_BLEND_SRC_ALPHA */
- { 1626, 0x000080CB }, /* GL_BLEND_SRC_ALPHA_OES */
- { 1649, 0x000080C9 }, /* GL_BLEND_SRC_RGB */
- { 1666, 0x000080C9 }, /* GL_BLEND_SRC_RGB_OES */
- { 1687, 0x00001905 }, /* GL_BLUE */
- { 1695, 0x00000D1B }, /* GL_BLUE_BIAS */
- { 1708, 0x00000D54 }, /* GL_BLUE_BITS */
- { 1721, 0x00000D1A }, /* GL_BLUE_SCALE */
- { 1735, 0x00008B56 }, /* GL_BOOL */
- { 1743, 0x00008B56 }, /* GL_BOOL_ARB */
- { 1755, 0x00008B57 }, /* GL_BOOL_VEC2 */
- { 1768, 0x00008B57 }, /* GL_BOOL_VEC2_ARB */
- { 1785, 0x00008B58 }, /* GL_BOOL_VEC3 */
- { 1798, 0x00008B58 }, /* GL_BOOL_VEC3_ARB */
- { 1815, 0x00008B59 }, /* GL_BOOL_VEC4 */
- { 1828, 0x00008B59 }, /* GL_BOOL_VEC4_ARB */
- { 1845, 0x000088BB }, /* GL_BUFFER_ACCESS */
- { 1862, 0x000088BB }, /* GL_BUFFER_ACCESS_ARB */
- { 1883, 0x000088BB }, /* GL_BUFFER_ACCESS_OES */
- { 1904, 0x00008A13 }, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */
- { 1935, 0x000088BC }, /* GL_BUFFER_MAPPED */
- { 1952, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */
- { 1973, 0x000088BC }, /* GL_BUFFER_MAPPED_OES */
- { 1994, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */
- { 2016, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */
- { 2042, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_OES */
- { 2068, 0x000085B3 }, /* GL_BUFFER_OBJECT_APPLE */
- { 2091, 0x00008A12 }, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */
- { 2125, 0x00008764 }, /* GL_BUFFER_SIZE */
- { 2140, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */
- { 2159, 0x00008765 }, /* GL_BUFFER_USAGE */
- { 2175, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */
- { 2195, 0x0000877B }, /* GL_BUMP_ENVMAP_ATI */
- { 2214, 0x00008777 }, /* GL_BUMP_NUM_TEX_UNITS_ATI */
- { 2240, 0x00008775 }, /* GL_BUMP_ROT_MATRIX_ATI */
- { 2263, 0x00008776 }, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */
- { 2291, 0x0000877C }, /* GL_BUMP_TARGET_ATI */
- { 2310, 0x00008778 }, /* GL_BUMP_TEX_UNITS_ATI */
- { 2332, 0x00001400 }, /* GL_BYTE */
- { 2340, 0x00002A24 }, /* GL_C3F_V3F */
- { 2351, 0x00002A26 }, /* GL_C4F_N3F_V3F */
- { 2366, 0x00002A22 }, /* GL_C4UB_V2F */
- { 2378, 0x00002A23 }, /* GL_C4UB_V3F */
- { 2390, 0x00000901 }, /* GL_CCW */
- { 2397, 0x00002900 }, /* GL_CLAMP */
- { 2406, 0x0000812D }, /* GL_CLAMP_TO_BORDER */
- { 2425, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */
- { 2448, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */
- { 2472, 0x0000812F }, /* GL_CLAMP_TO_EDGE */
- { 2489, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */
- { 2511, 0x00001500 }, /* GL_CLEAR */
- { 2520, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */
- { 2545, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */
- { 2574, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */
- { 2600, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
- { 2629, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */
- { 2655, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */
- { 2682, 0x00003000 }, /* GL_CLIP_PLANE0 */
- { 2697, 0x00003001 }, /* GL_CLIP_PLANE1 */
- { 2712, 0x00003002 }, /* GL_CLIP_PLANE2 */
- { 2727, 0x00003003 }, /* GL_CLIP_PLANE3 */
- { 2742, 0x00003004 }, /* GL_CLIP_PLANE4 */
- { 2757, 0x00003005 }, /* GL_CLIP_PLANE5 */
- { 2772, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
- { 2805, 0x00000A00 }, /* GL_COEFF */
- { 2814, 0x00001800 }, /* GL_COLOR */
- { 2823, 0x00008076 }, /* GL_COLOR_ARRAY */
- { 2838, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */
- { 2868, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */
- { 2902, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */
- { 2925, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */
- { 2945, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */
- { 2967, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */
- { 2987, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0 */
- { 3008, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */
- { 3033, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_OES */
- { 3058, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1 */
- { 3079, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10 */
- { 3101, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */
- { 3127, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11 */
- { 3149, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */
- { 3175, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12 */
- { 3197, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */
- { 3223, 0x00008CED }, /* GL_COLOR_ATTACHMENT13 */
- { 3245, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */
- { 3271, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14 */
- { 3293, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */
- { 3319, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15 */
- { 3341, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */
- { 3367, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */
- { 3392, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2 */
- { 3413, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */
- { 3438, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3 */
- { 3459, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */
- { 3484, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4 */
- { 3505, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */
- { 3530, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5 */
- { 3551, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */
- { 3576, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6 */
- { 3597, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */
- { 3622, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7 */
- { 3643, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */
- { 3668, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8 */
- { 3689, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */
- { 3714, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9 */
- { 3735, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */
- { 3760, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */
- { 3780, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */
- { 3801, 0x00001900 }, /* GL_COLOR_INDEX */
- { 3816, 0x00001603 }, /* GL_COLOR_INDEXES */
- { 3833, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */
- { 3851, 0x00000B57 }, /* GL_COLOR_MATERIAL */
- { 3869, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */
- { 3892, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */
- { 3920, 0x000080B1 }, /* GL_COLOR_MATRIX */
- { 3936, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */
- { 3956, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */
- { 3984, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */
- { 4016, 0x00008458 }, /* GL_COLOR_SUM */
- { 4029, 0x00008458 }, /* GL_COLOR_SUM_ARB */
- { 4046, 0x000080D0 }, /* GL_COLOR_TABLE */
- { 4061, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */
- { 4087, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */
- { 4117, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */
- { 4147, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */
- { 4167, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */
- { 4191, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */
- { 4216, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */
- { 4245, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */
- { 4274, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */
- { 4296, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */
- { 4322, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */
- { 4348, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */
- { 4374, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */
- { 4404, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */
- { 4434, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */
- { 4464, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */
- { 4498, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */
- { 4532, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
- { 4562, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */
- { 4596, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */
- { 4630, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */
- { 4654, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */
- { 4682, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */
- { 4710, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */
- { 4731, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */
- { 4756, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */
- { 4777, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */
- { 4802, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */
- { 4827, 0x00000C23 }, /* GL_COLOR_WRITEMASK */
- { 4846, 0x00008570 }, /* GL_COMBINE */
- { 4857, 0x00008503 }, /* GL_COMBINE4 */
- { 4869, 0x00008572 }, /* GL_COMBINE_ALPHA */
- { 4886, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */
- { 4907, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */
- { 4928, 0x00008570 }, /* GL_COMBINE_ARB */
- { 4943, 0x00008570 }, /* GL_COMBINE_EXT */
- { 4958, 0x00008571 }, /* GL_COMBINE_RGB */
- { 4973, 0x00008571 }, /* GL_COMBINE_RGB_ARB */
- { 4992, 0x00008571 }, /* GL_COMBINE_RGB_EXT */
- { 5011, 0x0000884E }, /* GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT */
- { 5047, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */
- { 5071, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */
- { 5099, 0x00001300 }, /* GL_COMPILE */
- { 5110, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */
- { 5133, 0x00008B81 }, /* GL_COMPILE_STATUS */
- { 5151, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */
- { 5171, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */
- { 5195, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */
- { 5219, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */
- { 5247, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */
- { 5271, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */
- { 5301, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */
- { 5335, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */
- { 5363, 0x000084ED }, /* GL_COMPRESSED_RGB */
- { 5381, 0x000084EE }, /* GL_COMPRESSED_RGBA */
- { 5400, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */
- { 5423, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
- { 5452, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
- { 5485, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
- { 5518, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
- { 5551, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */
- { 5573, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */
- { 5601, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
- { 5633, 0x00008C4A }, /* GL_COMPRESSED_SLUMINANCE */
- { 5658, 0x00008C4B }, /* GL_COMPRESSED_SLUMINANCE_ALPHA */
- { 5689, 0x00008C48 }, /* GL_COMPRESSED_SRGB */
- { 5708, 0x00008C49 }, /* GL_COMPRESSED_SRGB_ALPHA */
- { 5733, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */
- { 5763, 0x0000911C }, /* GL_CONDITION_SATISFIED */
- { 5786, 0x00008576 }, /* GL_CONSTANT */
- { 5798, 0x00008003 }, /* GL_CONSTANT_ALPHA */
- { 5816, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */
- { 5838, 0x00008576 }, /* GL_CONSTANT_ARB */
- { 5854, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */
- { 5878, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */
- { 5900, 0x00008001 }, /* GL_CONSTANT_COLOR */
- { 5918, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */
- { 5940, 0x00008576 }, /* GL_CONSTANT_EXT */
- { 5956, 0x00008010 }, /* GL_CONVOLUTION_1D */
- { 5974, 0x00008011 }, /* GL_CONVOLUTION_2D */
- { 5992, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */
- { 6020, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */
- { 6051, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */
- { 6078, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */
- { 6109, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */
- { 6136, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */
- { 6167, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */
- { 6195, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */
- { 6227, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */
- { 6249, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */
- { 6275, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */
- { 6297, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */
- { 6323, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */
- { 6344, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */
- { 6369, 0x00008862 }, /* GL_COORD_REPLACE */
- { 6386, 0x00008862 }, /* GL_COORD_REPLACE_ARB */
- { 6407, 0x00008862 }, /* GL_COORD_REPLACE_NV */
- { 6427, 0x00008862 }, /* GL_COORD_REPLACE_OES */
- { 6448, 0x00001503 }, /* GL_COPY */
- { 6456, 0x0000150C }, /* GL_COPY_INVERTED */
- { 6473, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */
- { 6493, 0x00008F36 }, /* GL_COPY_READ_BUFFER */
- { 6513, 0x00008F37 }, /* GL_COPY_WRITE_BUFFER */
- { 6534, 0x00000B44 }, /* GL_CULL_FACE */
- { 6547, 0x00000B45 }, /* GL_CULL_FACE_MODE */
- { 6565, 0x000081AA }, /* GL_CULL_VERTEX_EXT */
- { 6584, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
- { 6616, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
- { 6651, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */
- { 6672, 0x00000001 }, /* GL_CURRENT_BIT */
- { 6687, 0x00000B00 }, /* GL_CURRENT_COLOR */
- { 6704, 0x00008453 }, /* GL_CURRENT_FOG_COORD */
- { 6725, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */
- { 6751, 0x00000B01 }, /* GL_CURRENT_INDEX */
- { 6768, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */
- { 6790, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */
- { 6818, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */
- { 6839, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
- { 6873, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */
- { 6906, 0x00000B02 }, /* GL_CURRENT_NORMAL */
- { 6924, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */
- { 6954, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_OES */
- { 6984, 0x00008B8D }, /* GL_CURRENT_PROGRAM */
- { 7003, 0x00008865 }, /* GL_CURRENT_QUERY */
- { 7020, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */
- { 7041, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */
- { 7065, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */
- { 7092, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */
- { 7116, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */
- { 7143, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */
- { 7176, 0x0000845F }, /* GL_CURRENT_RASTER_SECONDARY_COLOR */
- { 7210, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
- { 7243, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */
- { 7270, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */
- { 7296, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */
- { 7321, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */
- { 7350, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */
- { 7372, 0x00000900 }, /* GL_CW */
- { 7378, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */
- { 7399, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */
- { 7420, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */
- { 7440, 0x00002101 }, /* GL_DECAL */
- { 7449, 0x00001E03 }, /* GL_DECR */
- { 7457, 0x00008508 }, /* GL_DECR_WRAP */
- { 7470, 0x00008508 }, /* GL_DECR_WRAP_EXT */
- { 7487, 0x00008B80 }, /* GL_DELETE_STATUS */
- { 7504, 0x00001801 }, /* GL_DEPTH */
- { 7513, 0x000088F0 }, /* GL_DEPTH24_STENCIL8 */
- { 7533, 0x000088F0 }, /* GL_DEPTH24_STENCIL8_EXT */
- { 7557, 0x000088F0 }, /* GL_DEPTH24_STENCIL8_OES */
- { 7581, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT */
- { 7601, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
- { 7625, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_OES */
- { 7649, 0x00000D1F }, /* GL_DEPTH_BIAS */
- { 7663, 0x00000D56 }, /* GL_DEPTH_BITS */
- { 7677, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
- { 7697, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
- { 7722, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
- { 7742, 0x0000864F }, /* GL_DEPTH_CLAMP */
- { 7757, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
- { 7775, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
- { 7796, 0x00001902 }, /* GL_DEPTH_COMPONENT */
- { 7815, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
- { 7836, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
- { 7861, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_OES */
- { 7886, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
- { 7912, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
- { 7933, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
- { 7958, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_OES */
- { 7983, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
- { 8009, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
- { 8030, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
- { 8055, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_OES */
- { 8080, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
- { 8106, 0x00000B74 }, /* GL_DEPTH_FUNC */
- { 8120, 0x00000B70 }, /* GL_DEPTH_RANGE */
- { 8135, 0x00000D1E }, /* GL_DEPTH_SCALE */
- { 8150, 0x000084F9 }, /* GL_DEPTH_STENCIL */
- { 8167, 0x0000821A }, /* GL_DEPTH_STENCIL_ATTACHMENT */
- { 8195, 0x000084F9 }, /* GL_DEPTH_STENCIL_EXT */
- { 8216, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
- { 8236, 0x000084F9 }, /* GL_DEPTH_STENCIL_OES */
- { 8257, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
- { 8285, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
- { 8313, 0x00000B71 }, /* GL_DEPTH_TEST */
- { 8327, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
- { 8349, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
- { 8375, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
- { 8394, 0x00001201 }, /* GL_DIFFUSE */
- { 8405, 0x00000BD0 }, /* GL_DITHER */
- { 8415, 0x00000A02 }, /* GL_DOMAIN */
- { 8425, 0x00001100 }, /* GL_DONT_CARE */
- { 8438, 0x000086AE }, /* GL_DOT3_RGB */
- { 8450, 0x000086AF }, /* GL_DOT3_RGBA */
- { 8463, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
- { 8480, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
- { 8497, 0x000086AE }, /* GL_DOT3_RGB_ARB */
- { 8513, 0x00008740 }, /* GL_DOT3_RGB_EXT */
- { 8529, 0x0000140A }, /* GL_DOUBLE */
- { 8539, 0x00000C32 }, /* GL_DOUBLEBUFFER */
- { 8555, 0x00000C01 }, /* GL_DRAW_BUFFER */
- { 8570, 0x00008825 }, /* GL_DRAW_BUFFER0 */
- { 8586, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
- { 8606, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
- { 8626, 0x00008826 }, /* GL_DRAW_BUFFER1 */
- { 8642, 0x0000882F }, /* GL_DRAW_BUFFER10 */
- { 8659, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
- { 8680, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
- { 8701, 0x00008830 }, /* GL_DRAW_BUFFER11 */
- { 8718, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
- { 8739, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
- { 8760, 0x00008831 }, /* GL_DRAW_BUFFER12 */
- { 8777, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
- { 8798, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
- { 8819, 0x00008832 }, /* GL_DRAW_BUFFER13 */
- { 8836, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
- { 8857, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
- { 8878, 0x00008833 }, /* GL_DRAW_BUFFER14 */
- { 8895, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
- { 8916, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
- { 8937, 0x00008834 }, /* GL_DRAW_BUFFER15 */
- { 8954, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
- { 8975, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
- { 8996, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
- { 9016, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
- { 9036, 0x00008827 }, /* GL_DRAW_BUFFER2 */
- { 9052, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
- { 9072, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
- { 9092, 0x00008828 }, /* GL_DRAW_BUFFER3 */
- { 9108, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
- { 9128, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
- { 9148, 0x00008829 }, /* GL_DRAW_BUFFER4 */
- { 9164, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
- { 9184, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
- { 9204, 0x0000882A }, /* GL_DRAW_BUFFER5 */
- { 9220, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
- { 9240, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
- { 9260, 0x0000882B }, /* GL_DRAW_BUFFER6 */
- { 9276, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
- { 9296, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
- { 9316, 0x0000882C }, /* GL_DRAW_BUFFER7 */
- { 9332, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
- { 9352, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
- { 9372, 0x0000882D }, /* GL_DRAW_BUFFER8 */
- { 9388, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
- { 9408, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
- { 9428, 0x0000882E }, /* GL_DRAW_BUFFER9 */
- { 9444, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
- { 9464, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
- { 9484, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER */
- { 9504, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING */
- { 9532, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
- { 9564, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
- { 9588, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
- { 9608, 0x00000304 }, /* GL_DST_ALPHA */
- { 9621, 0x00000306 }, /* GL_DST_COLOR */
- { 9634, 0x0000877A }, /* GL_DU8DV8_ATI */
- { 9648, 0x00008779 }, /* GL_DUDV_ATI */
- { 9660, 0x000088EA }, /* GL_DYNAMIC_COPY */
- { 9676, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
- { 9696, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
- { 9712, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
- { 9732, 0x000088E9 }, /* GL_DYNAMIC_READ */
- { 9748, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
- { 9768, 0x00000B43 }, /* GL_EDGE_FLAG */
- { 9781, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
- { 9800, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
- { 9834, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
- { 9872, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
- { 9899, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
- { 9925, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
- { 9949, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
- { 9981, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
- { 10017, 0x00001600 }, /* GL_EMISSION */
- { 10029, 0x00002000 }, /* GL_ENABLE_BIT */
- { 10043, 0x00000202 }, /* GL_EQUAL */
- { 10052, 0x00001509 }, /* GL_EQUIV */
- { 10061, 0x00010000 }, /* GL_EVAL_BIT */
- { 10073, 0x00000800 }, /* GL_EXP */
- { 10080, 0x00000801 }, /* GL_EXP2 */
- { 10088, 0x00001F03 }, /* GL_EXTENSIONS */
- { 10102, 0x00002400 }, /* GL_EYE_LINEAR */
- { 10116, 0x00002502 }, /* GL_EYE_PLANE */
- { 10129, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
- { 10154, 0x0000855B }, /* GL_EYE_RADIAL_NV */
- { 10171, 0x00000000 }, /* GL_FALSE */
- { 10180, 0x00001101 }, /* GL_FASTEST */
- { 10191, 0x00001C01 }, /* GL_FEEDBACK */
- { 10203, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
- { 10230, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
- { 10254, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
- { 10278, 0x00001B02 }, /* GL_FILL */
- { 10286, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION */
- { 10313, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION_EXT */
- { 10344, 0x0000140C }, /* GL_FIXED */
- { 10353, 0x0000140C }, /* GL_FIXED_OES */
- { 10366, 0x00001D00 }, /* GL_FLAT */
- { 10374, 0x00001406 }, /* GL_FLOAT */
- { 10383, 0x00008B5A }, /* GL_FLOAT_MAT2 */
- { 10397, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
- { 10415, 0x00008B65 }, /* GL_FLOAT_MAT2x3 */
- { 10431, 0x00008B66 }, /* GL_FLOAT_MAT2x4 */
- { 10447, 0x00008B5B }, /* GL_FLOAT_MAT3 */
- { 10461, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
- { 10479, 0x00008B67 }, /* GL_FLOAT_MAT3x2 */
- { 10495, 0x00008B68 }, /* GL_FLOAT_MAT3x4 */
- { 10511, 0x00008B5C }, /* GL_FLOAT_MAT4 */
- { 10525, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
- { 10543, 0x00008B69 }, /* GL_FLOAT_MAT4x2 */
- { 10559, 0x00008B6A }, /* GL_FLOAT_MAT4x3 */
- { 10575, 0x00008B50 }, /* GL_FLOAT_VEC2 */
- { 10589, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
- { 10607, 0x00008B51 }, /* GL_FLOAT_VEC3 */
- { 10621, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
- { 10639, 0x00008B52 }, /* GL_FLOAT_VEC4 */
- { 10653, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
- { 10671, 0x00000B60 }, /* GL_FOG */
- { 10678, 0x00000080 }, /* GL_FOG_BIT */
- { 10689, 0x00000B66 }, /* GL_FOG_COLOR */
- { 10702, 0x00008451 }, /* GL_FOG_COORD */
- { 10715, 0x00008451 }, /* GL_FOG_COORDINATE */
- { 10733, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
- { 10757, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
- { 10796, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
- { 10839, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
- { 10871, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
- { 10902, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
- { 10931, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
- { 10956, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
- { 10975, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
- { 11009, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
- { 11036, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
- { 11062, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
- { 11086, 0x00008450 }, /* GL_FOG_COORD_SRC */
- { 11103, 0x00000B62 }, /* GL_FOG_DENSITY */
- { 11118, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
- { 11142, 0x00000B64 }, /* GL_FOG_END */
- { 11153, 0x00000C54 }, /* GL_FOG_HINT */
- { 11165, 0x00000B61 }, /* GL_FOG_INDEX */
- { 11178, 0x00000B65 }, /* GL_FOG_MODE */
- { 11190, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
- { 11209, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
- { 11234, 0x00000B63 }, /* GL_FOG_START */
- { 11247, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
- { 11265, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
- { 11289, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
- { 11308, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
- { 11331, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
- { 11366, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES */
- { 11405, 0x00008D40 }, /* GL_FRAMEBUFFER */
- { 11420, 0x00008215 }, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
- { 11457, 0x00008214 }, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
- { 11493, 0x00008210 }, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
- { 11534, 0x00008211 }, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
- { 11575, 0x00008216 }, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
- { 11612, 0x00008213 }, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
- { 11649, 0x00008DA7 }, /* GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB */
- { 11687, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
- { 11725, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
- { 11767, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES */
- { 11809, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
- { 11847, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
- { 11889, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES */
- { 11931, 0x00008212 }, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
- { 11966, 0x00008217 }, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
- { 12005, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
- { 12054, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES */
- { 12103, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
- { 12151, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
- { 12203, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES */
- { 12255, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
- { 12295, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
- { 12339, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
- { 12379, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
- { 12423, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES */
- { 12467, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING */
- { 12490, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
- { 12517, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_OES */
- { 12544, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE */
- { 12568, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
- { 12596, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_OES */
- { 12624, 0x00008218 }, /* GL_FRAMEBUFFER_DEFAULT */
- { 12647, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
- { 12666, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
- { 12703, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
- { 12744, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES */
- { 12785, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS */
- { 12822, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
- { 12863, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES */
- { 12904, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
- { 12942, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
- { 12984, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_OES */
- { 13026, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
- { 13077, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
- { 13115, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES */
- { 13153, 0x00008DA9 }, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB */
- { 13195, 0x00008DA8 }, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB */
- { 13239, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
- { 13284, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
- { 13333, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES */
- { 13382, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
- { 13420, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT */
- { 13462, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
- { 13500, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
- { 13542, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_OES */
- { 13584, 0x00008D40 }, /* GL_FRAMEBUFFER_OES */
- { 13603, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
- { 13635, 0x00008219 }, /* GL_FRAMEBUFFER_UNDEFINED */
- { 13660, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED */
- { 13687, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
- { 13718, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_OES */
- { 13749, 0x00000404 }, /* GL_FRONT */
- { 13758, 0x00000408 }, /* GL_FRONT_AND_BACK */
- { 13776, 0x00000B46 }, /* GL_FRONT_FACE */
- { 13790, 0x00000400 }, /* GL_FRONT_LEFT */
- { 13804, 0x00000401 }, /* GL_FRONT_RIGHT */
- { 13819, 0x00008006 }, /* GL_FUNC_ADD */
- { 13831, 0x00008006 }, /* GL_FUNC_ADD_EXT */
- { 13847, 0x00008006 }, /* GL_FUNC_ADD_OES */
- { 13863, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
- { 13888, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
- { 13917, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_OES */
- { 13946, 0x0000800A }, /* GL_FUNC_SUBTRACT */
- { 13963, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
- { 13984, 0x0000800A }, /* GL_FUNC_SUBTRACT_OES */
- { 14005, 0x00008191 }, /* GL_GENERATE_MIPMAP */
- { 14024, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
- { 14048, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
- { 14077, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
- { 14101, 0x00008DDB }, /* GL_GEOMETRY_INPUT_TYPE_ARB */
- { 14128, 0x00008DDC }, /* GL_GEOMETRY_OUTPUT_TYPE_ARB */
- { 14156, 0x00008DD9 }, /* GL_GEOMETRY_SHADER_ARB */
- { 14179, 0x00008DDA }, /* GL_GEOMETRY_VERTICES_OUT_ARB */
- { 14208, 0x00000206 }, /* GL_GEQUAL */
- { 14218, 0x00000204 }, /* GL_GREATER */
- { 14229, 0x00001904 }, /* GL_GREEN */
- { 14238, 0x00000D19 }, /* GL_GREEN_BIAS */
- { 14252, 0x00000D53 }, /* GL_GREEN_BITS */
- { 14266, 0x00000D18 }, /* GL_GREEN_SCALE */
- { 14281, 0x0000140B }, /* GL_HALF_FLOAT */
- { 14295, 0x00008D61 }, /* GL_HALF_FLOAT_OES */
- { 14313, 0x00008DF2 }, /* GL_HIGH_FLOAT */
- { 14327, 0x00008DF5 }, /* GL_HIGH_INT */
- { 14339, 0x00008000 }, /* GL_HINT_BIT */
- { 14351, 0x00008024 }, /* GL_HISTOGRAM */
- { 14364, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
- { 14388, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
- { 14416, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
- { 14439, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
- { 14466, 0x00008024 }, /* GL_HISTOGRAM_EXT */
- { 14483, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
- { 14503, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
- { 14527, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
- { 14551, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
- { 14579, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
- { 14607, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
- { 14639, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
- { 14661, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
- { 14687, 0x0000802D }, /* GL_HISTOGRAM_SINK */
- { 14705, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
- { 14727, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
- { 14746, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
- { 14769, 0x0000862A }, /* GL_IDENTITY_NV */
- { 14784, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
- { 14804, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT */
- { 14840, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
- { 14880, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE */
- { 14914, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
- { 14952, 0x00001E02 }, /* GL_INCR */
- { 14960, 0x00008507 }, /* GL_INCR_WRAP */
- { 14973, 0x00008507 }, /* GL_INCR_WRAP_EXT */
- { 14990, 0x00008222 }, /* GL_INDEX */
- { 14999, 0x00008077 }, /* GL_INDEX_ARRAY */
- { 15014, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
- { 15044, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
- { 15078, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
- { 15101, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
- { 15123, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
- { 15143, 0x00000D51 }, /* GL_INDEX_BITS */
- { 15157, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
- { 15178, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
- { 15196, 0x00000C30 }, /* GL_INDEX_MODE */
- { 15210, 0x00000D13 }, /* GL_INDEX_OFFSET */
- { 15226, 0x00000D12 }, /* GL_INDEX_SHIFT */
- { 15241, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
- { 15260, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
- { 15279, 0x00001404 }, /* GL_INT */
- { 15286, 0x00008049 }, /* GL_INTENSITY */
- { 15299, 0x0000804C }, /* GL_INTENSITY12 */
- { 15314, 0x0000804C }, /* GL_INTENSITY12_EXT */
- { 15333, 0x0000804D }, /* GL_INTENSITY16 */
- { 15348, 0x0000804D }, /* GL_INTENSITY16_EXT */
- { 15367, 0x0000804A }, /* GL_INTENSITY4 */
- { 15381, 0x0000804A }, /* GL_INTENSITY4_EXT */
- { 15399, 0x0000804B }, /* GL_INTENSITY8 */
- { 15413, 0x0000804B }, /* GL_INTENSITY8_EXT */
- { 15431, 0x00008049 }, /* GL_INTENSITY_EXT */
- { 15448, 0x00008C8C }, /* GL_INTERLEAVED_ATTRIBS_EXT */
- { 15475, 0x00008575 }, /* GL_INTERPOLATE */
- { 15490, 0x00008575 }, /* GL_INTERPOLATE_ARB */
- { 15509, 0x00008575 }, /* GL_INTERPOLATE_EXT */
- { 15528, 0x00008DF7 }, /* GL_INT_10_10_10_2_OES */
- { 15550, 0x00008B53 }, /* GL_INT_VEC2 */
- { 15562, 0x00008B53 }, /* GL_INT_VEC2_ARB */
- { 15578, 0x00008B54 }, /* GL_INT_VEC3 */
- { 15590, 0x00008B54 }, /* GL_INT_VEC3_ARB */
- { 15606, 0x00008B55 }, /* GL_INT_VEC4 */
- { 15618, 0x00008B55 }, /* GL_INT_VEC4_ARB */
- { 15634, 0x00000500 }, /* GL_INVALID_ENUM */
- { 15650, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION */
- { 15683, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
- { 15720, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_OES */
- { 15757, 0x00000502 }, /* GL_INVALID_OPERATION */
- { 15778, 0x00000501 }, /* GL_INVALID_VALUE */
- { 15795, 0x0000862B }, /* GL_INVERSE_NV */
- { 15809, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
- { 15833, 0x0000150A }, /* GL_INVERT */
- { 15843, 0x00001E00 }, /* GL_KEEP */
- { 15851, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION */
- { 15877, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION_EXT */
- { 15907, 0x00000406 }, /* GL_LEFT */
- { 15915, 0x00000203 }, /* GL_LEQUAL */
- { 15925, 0x00000201 }, /* GL_LESS */
- { 15933, 0x00004000 }, /* GL_LIGHT0 */
- { 15943, 0x00004001 }, /* GL_LIGHT1 */
- { 15953, 0x00004002 }, /* GL_LIGHT2 */
- { 15963, 0x00004003 }, /* GL_LIGHT3 */
- { 15973, 0x00004004 }, /* GL_LIGHT4 */
- { 15983, 0x00004005 }, /* GL_LIGHT5 */
- { 15993, 0x00004006 }, /* GL_LIGHT6 */
- { 16003, 0x00004007 }, /* GL_LIGHT7 */
- { 16013, 0x00000B50 }, /* GL_LIGHTING */
- { 16025, 0x00000040 }, /* GL_LIGHTING_BIT */
- { 16041, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
- { 16064, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
- { 16093, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
- { 16126, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
- { 16154, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
- { 16178, 0x00001B01 }, /* GL_LINE */
- { 16186, 0x00002601 }, /* GL_LINEAR */
- { 16196, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
- { 16218, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
- { 16248, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
- { 16279, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
- { 16303, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
- { 16328, 0x00000001 }, /* GL_LINES */
- { 16337, 0x0000000A }, /* GL_LINES_ADJACENCY_ARB */
- { 16360, 0x00000004 }, /* GL_LINE_BIT */
- { 16372, 0x00000002 }, /* GL_LINE_LOOP */
- { 16385, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
- { 16405, 0x00000B20 }, /* GL_LINE_SMOOTH */
- { 16420, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
- { 16440, 0x00000B24 }, /* GL_LINE_STIPPLE */
- { 16456, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
- { 16480, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
- { 16503, 0x00000003 }, /* GL_LINE_STRIP */
- { 16517, 0x0000000B }, /* GL_LINE_STRIP_ADJACENCY_ARB */
- { 16545, 0x00000702 }, /* GL_LINE_TOKEN */
- { 16559, 0x00000B21 }, /* GL_LINE_WIDTH */
- { 16573, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
- { 16599, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
- { 16619, 0x00008B82 }, /* GL_LINK_STATUS */
- { 16634, 0x00000B32 }, /* GL_LIST_BASE */
- { 16647, 0x00020000 }, /* GL_LIST_BIT */
- { 16659, 0x00000B33 }, /* GL_LIST_INDEX */
- { 16673, 0x00000B30 }, /* GL_LIST_MODE */
- { 16686, 0x00000101 }, /* GL_LOAD */
- { 16694, 0x00000BF1 }, /* GL_LOGIC_OP */
- { 16706, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
- { 16723, 0x00008CA1 }, /* GL_LOWER_LEFT */
- { 16737, 0x00008DF0 }, /* GL_LOW_FLOAT */
- { 16750, 0x00008DF3 }, /* GL_LOW_INT */
- { 16761, 0x00001909 }, /* GL_LUMINANCE */
- { 16774, 0x00008041 }, /* GL_LUMINANCE12 */
- { 16789, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
- { 16812, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
- { 16839, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
- { 16861, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
- { 16887, 0x00008041 }, /* GL_LUMINANCE12_EXT */
- { 16906, 0x00008042 }, /* GL_LUMINANCE16 */
- { 16921, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
- { 16944, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
- { 16971, 0x00008042 }, /* GL_LUMINANCE16_EXT */
- { 16990, 0x0000803F }, /* GL_LUMINANCE4 */
- { 17004, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
- { 17025, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
- { 17050, 0x0000803F }, /* GL_LUMINANCE4_EXT */
- { 17068, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
- { 17089, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
- { 17114, 0x00008040 }, /* GL_LUMINANCE8 */
- { 17128, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
- { 17149, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
- { 17174, 0x00008040 }, /* GL_LUMINANCE8_EXT */
- { 17192, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
- { 17211, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
- { 17227, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
- { 17247, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
- { 17269, 0x00000D91 }, /* GL_MAP1_INDEX */
- { 17283, 0x00000D92 }, /* GL_MAP1_NORMAL */
- { 17298, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
- { 17322, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
- { 17346, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
- { 17370, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
- { 17394, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
- { 17411, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
- { 17428, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
- { 17456, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
- { 17485, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
- { 17514, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
- { 17543, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
- { 17572, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
- { 17601, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
- { 17630, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
- { 17658, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
- { 17686, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
- { 17714, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
- { 17742, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
- { 17770, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
- { 17798, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
- { 17826, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
- { 17854, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
- { 17882, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
- { 17898, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
- { 17918, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
- { 17940, 0x00000DB1 }, /* GL_MAP2_INDEX */
- { 17954, 0x00000DB2 }, /* GL_MAP2_NORMAL */
- { 17969, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
- { 17993, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
- { 18017, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
- { 18041, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
- { 18065, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
- { 18082, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
- { 18099, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
- { 18127, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
- { 18156, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
- { 18185, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
- { 18214, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
- { 18243, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
- { 18272, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
- { 18301, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
- { 18329, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
- { 18357, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
- { 18385, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
- { 18413, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
- { 18441, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
- { 18469, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
- { 18497, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
- { 18525, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
- { 18553, 0x00000D10 }, /* GL_MAP_COLOR */
- { 18566, 0x00000010 }, /* GL_MAP_FLUSH_EXPLICIT_BIT */
- { 18592, 0x00000008 }, /* GL_MAP_INVALIDATE_BUFFER_BIT */
- { 18621, 0x00000004 }, /* GL_MAP_INVALIDATE_RANGE_BIT */
- { 18649, 0x00000001 }, /* GL_MAP_READ_BIT */
- { 18665, 0x00000D11 }, /* GL_MAP_STENCIL */
- { 18680, 0x00000020 }, /* GL_MAP_UNSYNCHRONIZED_BIT */
- { 18706, 0x00000002 }, /* GL_MAP_WRITE_BIT */
- { 18723, 0x000088C0 }, /* GL_MATRIX0_ARB */
- { 18738, 0x00008630 }, /* GL_MATRIX0_NV */
- { 18752, 0x000088CA }, /* GL_MATRIX10_ARB */
- { 18768, 0x000088CB }, /* GL_MATRIX11_ARB */
- { 18784, 0x000088CC }, /* GL_MATRIX12_ARB */
- { 18800, 0x000088CD }, /* GL_MATRIX13_ARB */
- { 18816, 0x000088CE }, /* GL_MATRIX14_ARB */
- { 18832, 0x000088CF }, /* GL_MATRIX15_ARB */
- { 18848, 0x000088D0 }, /* GL_MATRIX16_ARB */
- { 18864, 0x000088D1 }, /* GL_MATRIX17_ARB */
- { 18880, 0x000088D2 }, /* GL_MATRIX18_ARB */
- { 18896, 0x000088D3 }, /* GL_MATRIX19_ARB */
- { 18912, 0x000088C1 }, /* GL_MATRIX1_ARB */
- { 18927, 0x00008631 }, /* GL_MATRIX1_NV */
- { 18941, 0x000088D4 }, /* GL_MATRIX20_ARB */
- { 18957, 0x000088D5 }, /* GL_MATRIX21_ARB */
- { 18973, 0x000088D6 }, /* GL_MATRIX22_ARB */
- { 18989, 0x000088D7 }, /* GL_MATRIX23_ARB */
- { 19005, 0x000088D8 }, /* GL_MATRIX24_ARB */
- { 19021, 0x000088D9 }, /* GL_MATRIX25_ARB */
- { 19037, 0x000088DA }, /* GL_MATRIX26_ARB */
- { 19053, 0x000088DB }, /* GL_MATRIX27_ARB */
- { 19069, 0x000088DC }, /* GL_MATRIX28_ARB */
- { 19085, 0x000088DD }, /* GL_MATRIX29_ARB */
- { 19101, 0x000088C2 }, /* GL_MATRIX2_ARB */
- { 19116, 0x00008632 }, /* GL_MATRIX2_NV */
- { 19130, 0x000088DE }, /* GL_MATRIX30_ARB */
- { 19146, 0x000088DF }, /* GL_MATRIX31_ARB */
- { 19162, 0x000088C3 }, /* GL_MATRIX3_ARB */
- { 19177, 0x00008633 }, /* GL_MATRIX3_NV */
- { 19191, 0x000088C4 }, /* GL_MATRIX4_ARB */
- { 19206, 0x00008634 }, /* GL_MATRIX4_NV */
- { 19220, 0x000088C5 }, /* GL_MATRIX5_ARB */
- { 19235, 0x00008635 }, /* GL_MATRIX5_NV */
- { 19249, 0x000088C6 }, /* GL_MATRIX6_ARB */
- { 19264, 0x00008636 }, /* GL_MATRIX6_NV */
- { 19278, 0x000088C7 }, /* GL_MATRIX7_ARB */
- { 19293, 0x00008637 }, /* GL_MATRIX7_NV */
- { 19307, 0x000088C8 }, /* GL_MATRIX8_ARB */
- { 19322, 0x000088C9 }, /* GL_MATRIX9_ARB */
- { 19337, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
- { 19363, 0x00008B9E }, /* GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES */
- { 19404, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_OES */
- { 19430, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
- { 19464, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_OES */
- { 19498, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
- { 19529, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_OES */
- { 19560, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
- { 19593, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_OES */
- { 19626, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
- { 19657, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_OES */
- { 19688, 0x00000BA0 }, /* GL_MATRIX_MODE */
- { 19703, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
- { 19725, 0x00008840 }, /* GL_MATRIX_PALETTE_OES */
- { 19747, 0x00008008 }, /* GL_MAX */
- { 19754, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
- { 19777, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE_OES */
- { 19804, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
- { 19836, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
- { 19862, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
- { 19895, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
- { 19921, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- { 19955, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
- { 19974, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS */
- { 19999, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
- { 20028, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
- { 20060, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
- { 20096, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
- { 20132, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
- { 20172, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
- { 20198, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
- { 20228, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
- { 20253, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
- { 20282, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
- { 20311, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
- { 20344, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES */
- { 20377, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
- { 20397, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
- { 20421, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
- { 20445, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
- { 20469, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
- { 20494, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
- { 20512, 0x00008008 }, /* GL_MAX_EXT */
- { 20523, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
- { 20558, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
- { 20597, 0x00008DFD }, /* GL_MAX_FRAGMENT_UNIFORM_VECTORS */
- { 20629, 0x00008DE0 }, /* GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB */
- { 20665, 0x00008C29 }, /* GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB */
- { 20705, 0x00008DE1 }, /* GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB */
- { 20749, 0x00008DDF }, /* GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB */
- { 20788, 0x00008DDD }, /* GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB */
- { 20827, 0x00000D31 }, /* GL_MAX_LIGHTS */
- { 20841, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
- { 20861, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
- { 20899, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
- { 20928, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
- { 20952, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
- { 20980, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_OES */
- { 21008, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
- { 21031, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
- { 21068, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
- { 21104, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
- { 21131, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
- { 21160, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
- { 21194, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
- { 21230, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
- { 21257, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
- { 21289, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
- { 21325, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
- { 21354, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
- { 21383, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
- { 21411, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
- { 21449, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- { 21493, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- { 21536, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
- { 21570, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- { 21609, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
- { 21646, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
- { 21684, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- { 21727, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- { 21770, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
- { 21800, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
- { 21831, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
- { 21867, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
- { 21903, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
- { 21933, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
- { 21967, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
- { 22000, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE */
- { 22025, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
- { 22054, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_OES */
- { 22083, 0x00008D57 }, /* GL_MAX_SAMPLES */
- { 22098, 0x00008D57 }, /* GL_MAX_SAMPLES_EXT */
- { 22117, 0x00009111 }, /* GL_MAX_SERVER_WAIT_TIMEOUT */
- { 22144, 0x00008504 }, /* GL_MAX_SHININESS_NV */
- { 22164, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
- { 22188, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
- { 22210, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
- { 22236, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
- { 22263, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
- { 22294, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
- { 22318, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS_EXT */
- { 22346, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
- { 22380, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
- { 22400, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
- { 22427, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
- { 22448, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
- { 22473, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
- { 22498, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
- { 22533, 0x00008C8A }, /* GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT */
- { 22586, 0x00008C8B }, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT */
- { 22633, 0x00008C80 }, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT */
- { 22683, 0x00008B4B }, /* GL_MAX_VARYING_COMPONENTS */
- { 22709, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
- { 22731, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
- { 22757, 0x00008DFC }, /* GL_MAX_VARYING_VECTORS */
- { 22780, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
- { 22802, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
- { 22828, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
- { 22862, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
- { 22900, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
- { 22933, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
- { 22970, 0x00008DFB }, /* GL_MAX_VERTEX_UNIFORM_VECTORS */
- { 23000, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
- { 23024, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_OES */
- { 23048, 0x00008DDE }, /* GL_MAX_VERTEX_VARYING_COMPONENTS_ARB */
- { 23085, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
- { 23106, 0x00008DF1 }, /* GL_MEDIUM_FLOAT */
- { 23122, 0x00008DF4 }, /* GL_MEDIUM_INT */
- { 23136, 0x00008007 }, /* GL_MIN */
- { 23143, 0x0000802E }, /* GL_MINMAX */
- { 23153, 0x0000802E }, /* GL_MINMAX_EXT */
- { 23167, 0x0000802F }, /* GL_MINMAX_FORMAT */
- { 23184, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
- { 23205, 0x00008030 }, /* GL_MINMAX_SINK */
- { 23220, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
- { 23239, 0x00008007 }, /* GL_MIN_EXT */
- { 23250, 0x00008370 }, /* GL_MIRRORED_REPEAT */
- { 23269, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
- { 23292, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
- { 23315, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
- { 23335, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
- { 23355, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
- { 23385, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
- { 23413, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
- { 23441, 0x00001700 }, /* GL_MODELVIEW */
- { 23454, 0x00001700 }, /* GL_MODELVIEW0_ARB */
- { 23472, 0x0000872A }, /* GL_MODELVIEW10_ARB */
- { 23491, 0x0000872B }, /* GL_MODELVIEW11_ARB */
- { 23510, 0x0000872C }, /* GL_MODELVIEW12_ARB */
- { 23529, 0x0000872D }, /* GL_MODELVIEW13_ARB */
- { 23548, 0x0000872E }, /* GL_MODELVIEW14_ARB */
- { 23567, 0x0000872F }, /* GL_MODELVIEW15_ARB */
- { 23586, 0x00008730 }, /* GL_MODELVIEW16_ARB */
- { 23605, 0x00008731 }, /* GL_MODELVIEW17_ARB */
- { 23624, 0x00008732 }, /* GL_MODELVIEW18_ARB */
- { 23643, 0x00008733 }, /* GL_MODELVIEW19_ARB */
- { 23662, 0x0000850A }, /* GL_MODELVIEW1_ARB */
- { 23680, 0x00008734 }, /* GL_MODELVIEW20_ARB */
- { 23699, 0x00008735 }, /* GL_MODELVIEW21_ARB */
- { 23718, 0x00008736 }, /* GL_MODELVIEW22_ARB */
- { 23737, 0x00008737 }, /* GL_MODELVIEW23_ARB */
- { 23756, 0x00008738 }, /* GL_MODELVIEW24_ARB */
- { 23775, 0x00008739 }, /* GL_MODELVIEW25_ARB */
- { 23794, 0x0000873A }, /* GL_MODELVIEW26_ARB */
- { 23813, 0x0000873B }, /* GL_MODELVIEW27_ARB */
- { 23832, 0x0000873C }, /* GL_MODELVIEW28_ARB */
- { 23851, 0x0000873D }, /* GL_MODELVIEW29_ARB */
- { 23870, 0x00008722 }, /* GL_MODELVIEW2_ARB */
- { 23888, 0x0000873E }, /* GL_MODELVIEW30_ARB */
- { 23907, 0x0000873F }, /* GL_MODELVIEW31_ARB */
- { 23926, 0x00008723 }, /* GL_MODELVIEW3_ARB */
- { 23944, 0x00008724 }, /* GL_MODELVIEW4_ARB */
- { 23962, 0x00008725 }, /* GL_MODELVIEW5_ARB */
- { 23980, 0x00008726 }, /* GL_MODELVIEW6_ARB */
- { 23998, 0x00008727 }, /* GL_MODELVIEW7_ARB */
- { 24016, 0x00008728 }, /* GL_MODELVIEW8_ARB */
- { 24034, 0x00008729 }, /* GL_MODELVIEW9_ARB */
- { 24052, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
- { 24072, 0x0000898D }, /* GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES */
- { 24114, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
- { 24141, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
- { 24166, 0x00002100 }, /* GL_MODULATE */
- { 24178, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
- { 24198, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
- { 24225, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
- { 24250, 0x00000103 }, /* GL_MULT */
- { 24258, 0x0000809D }, /* GL_MULTISAMPLE */
- { 24273, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
- { 24293, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
- { 24312, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
- { 24331, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
- { 24355, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
- { 24378, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
- { 24408, 0x00002A25 }, /* GL_N3F_V3F */
- { 24419, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
- { 24439, 0x0000150E }, /* GL_NAND */
- { 24447, 0x00002600 }, /* GL_NEAREST */
- { 24458, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
- { 24489, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
- { 24521, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
- { 24546, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
- { 24572, 0x00000200 }, /* GL_NEVER */
- { 24581, 0x00001102 }, /* GL_NICEST */
- { 24591, 0x00000000 }, /* GL_NONE */
- { 24599, 0x00000000 }, /* GL_NONE_OES */
- { 24611, 0x00001505 }, /* GL_NOOP */
- { 24619, 0x00001508 }, /* GL_NOR */
- { 24626, 0x00000BA1 }, /* GL_NORMALIZE */
- { 24639, 0x00008075 }, /* GL_NORMAL_ARRAY */
- { 24655, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
- { 24686, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
- { 24721, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
- { 24745, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
- { 24768, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
- { 24789, 0x00008511 }, /* GL_NORMAL_MAP */
- { 24803, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
- { 24821, 0x00008511 }, /* GL_NORMAL_MAP_NV */
- { 24838, 0x00008511 }, /* GL_NORMAL_MAP_OES */
- { 24856, 0x00000205 }, /* GL_NOTEQUAL */
- { 24868, 0x00000000 }, /* GL_NO_ERROR */
- { 24880, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
- { 24914, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
- { 24952, 0x000087FE }, /* GL_NUM_PROGRAM_BINARY_FORMATS_OES */
- { 24986, 0x00008DF9 }, /* GL_NUM_SHADER_BINARY_FORMATS */
- { 25015, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
- { 25047, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
- { 25089, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
- { 25119, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
- { 25159, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
- { 25190, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
- { 25219, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
- { 25247, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
- { 25277, 0x00002401 }, /* GL_OBJECT_LINEAR */
- { 25294, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
- { 25320, 0x00002501 }, /* GL_OBJECT_PLANE */
- { 25336, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
- { 25371, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
- { 25393, 0x00009112 }, /* GL_OBJECT_TYPE */
- { 25408, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
- { 25427, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
- { 25457, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
- { 25478, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
- { 25506, 0x00000001 }, /* GL_ONE */
- { 25513, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
- { 25541, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
- { 25573, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
- { 25601, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
- { 25633, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
- { 25656, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
- { 25679, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
- { 25702, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
- { 25725, 0x00008598 }, /* GL_OPERAND0_ALPHA */
- { 25743, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
- { 25765, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
- { 25787, 0x00008590 }, /* GL_OPERAND0_RGB */
- { 25803, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
- { 25823, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
- { 25843, 0x00008599 }, /* GL_OPERAND1_ALPHA */
- { 25861, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
- { 25883, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
- { 25905, 0x00008591 }, /* GL_OPERAND1_RGB */
- { 25921, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
- { 25941, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
- { 25961, 0x0000859A }, /* GL_OPERAND2_ALPHA */
- { 25979, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
- { 26001, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
- { 26023, 0x00008592 }, /* GL_OPERAND2_RGB */
- { 26039, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
- { 26059, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
- { 26079, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
- { 26100, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
- { 26119, 0x00001507 }, /* GL_OR */
- { 26125, 0x00000A01 }, /* GL_ORDER */
- { 26134, 0x0000150D }, /* GL_OR_INVERTED */
- { 26149, 0x0000150B }, /* GL_OR_REVERSE */
- { 26163, 0x00000505 }, /* GL_OUT_OF_MEMORY */
- { 26180, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
- { 26198, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
- { 26219, 0x00008758 }, /* GL_PACK_INVERT_MESA */
- { 26239, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
- { 26257, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
- { 26276, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
- { 26296, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
- { 26316, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
- { 26334, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
- { 26353, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
- { 26378, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
- { 26402, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
- { 26423, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
- { 26445, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
- { 26467, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
- { 26492, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
- { 26516, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
- { 26537, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
- { 26559, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
- { 26581, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
- { 26603, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
- { 26634, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
- { 26654, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
- { 26679, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
- { 26699, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
- { 26724, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
- { 26744, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
- { 26769, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
- { 26789, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
- { 26814, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
- { 26834, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
- { 26859, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
- { 26879, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
- { 26904, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
- { 26924, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
- { 26949, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
- { 26969, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
- { 26994, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
- { 27014, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
- { 27039, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
- { 27059, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
- { 27084, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
- { 27102, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER */
- { 27123, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING */
- { 27152, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
- { 27185, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
- { 27210, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER */
- { 27233, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
- { 27264, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
- { 27299, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
- { 27326, 0x00001B00 }, /* GL_POINT */
- { 27335, 0x00000000 }, /* GL_POINTS */
- { 27345, 0x00000002 }, /* GL_POINT_BIT */
- { 27358, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
- { 27388, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
- { 27422, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
- { 27456, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
- { 27491, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
- { 27520, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
- { 27553, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
- { 27586, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
- { 27620, 0x00000B11 }, /* GL_POINT_SIZE */
- { 27634, 0x00008B9F }, /* GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES */
- { 27673, 0x00008B9C }, /* GL_POINT_SIZE_ARRAY_OES */
- { 27697, 0x0000898C }, /* GL_POINT_SIZE_ARRAY_POINTER_OES */
- { 27729, 0x0000898B }, /* GL_POINT_SIZE_ARRAY_STRIDE_OES */
- { 27760, 0x0000898A }, /* GL_POINT_SIZE_ARRAY_TYPE_OES */
- { 27789, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
- { 27815, 0x00008127 }, /* GL_POINT_SIZE_MAX */
- { 27833, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
- { 27855, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
- { 27877, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
- { 27900, 0x00008126 }, /* GL_POINT_SIZE_MIN */
- { 27918, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
- { 27940, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
- { 27962, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
- { 27985, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
- { 28005, 0x00000B10 }, /* GL_POINT_SMOOTH */
- { 28021, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
- { 28042, 0x00008861 }, /* GL_POINT_SPRITE */
- { 28058, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
- { 28078, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
- { 28107, 0x00008861 }, /* GL_POINT_SPRITE_NV */
- { 28126, 0x00008861 }, /* GL_POINT_SPRITE_OES */
- { 28146, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
- { 28172, 0x00000701 }, /* GL_POINT_TOKEN */
- { 28187, 0x00000009 }, /* GL_POLYGON */
- { 28198, 0x00000008 }, /* GL_POLYGON_BIT */
- { 28213, 0x00000B40 }, /* GL_POLYGON_MODE */
- { 28229, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
- { 28252, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
- { 28277, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
- { 28300, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
- { 28323, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
- { 28347, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
- { 28371, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
- { 28389, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
- { 28412, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
- { 28431, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
- { 28454, 0x00000703 }, /* GL_POLYGON_TOKEN */
- { 28471, 0x00001203 }, /* GL_POSITION */
- { 28483, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
- { 28515, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
- { 28551, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
- { 28584, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
- { 28621, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
- { 28652, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
- { 28687, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
- { 28719, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
- { 28755, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
- { 28788, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
- { 28820, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
- { 28856, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
- { 28889, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
- { 28926, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
- { 28956, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
- { 28990, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
- { 29021, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
- { 29056, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
- { 29087, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
- { 29122, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
- { 29154, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
- { 29190, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
- { 29220, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
- { 29254, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
- { 29285, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
- { 29320, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
- { 29352, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
- { 29383, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
- { 29418, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
- { 29450, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
- { 29486, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
- { 29515, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
- { 29548, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
- { 29578, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
- { 29612, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
- { 29651, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
- { 29684, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
- { 29724, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
- { 29758, 0x00008578 }, /* GL_PREVIOUS */
- { 29770, 0x00008578 }, /* GL_PREVIOUS_ARB */
- { 29786, 0x00008578 }, /* GL_PREVIOUS_EXT */
- { 29802, 0x00008577 }, /* GL_PRIMARY_COLOR */
- { 29819, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
- { 29840, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
- { 29861, 0x00008C87 }, /* GL_PRIMITIVES_GENERATED_EXT */
- { 29889, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
- { 29922, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
- { 29954, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
- { 29977, 0x000087FF }, /* GL_PROGRAM_BINARY_FORMATS_OES */
- { 30007, 0x00008741 }, /* GL_PROGRAM_BINARY_LENGTH_OES */
- { 30036, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
- { 30059, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
- { 30089, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
- { 30118, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
- { 30146, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
- { 30168, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
- { 30196, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
- { 30224, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
- { 30246, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
- { 30267, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- { 30307, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- { 30346, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
- { 30376, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- { 30411, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
- { 30444, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
- { 30478, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- { 30517, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- { 30556, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
- { 30578, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
- { 30604, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
- { 30628, 0x00008642 }, /* GL_PROGRAM_POINT_SIZE_ARB */
- { 30654, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
- { 30677, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
- { 30699, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
- { 30720, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
- { 30741, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
- { 30768, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
- { 30800, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
- { 30832, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
- { 30867, 0x00001701 }, /* GL_PROJECTION */
- { 30881, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
- { 30902, 0x0000898E }, /* GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES */
- { 30945, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
- { 30971, 0x00008E4F }, /* GL_PROVOKING_VERTEX */
- { 30991, 0x00008E4F }, /* GL_PROVOKING_VERTEX_EXT */
- { 31015, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
- { 31036, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
- { 31055, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
- { 31078, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
- { 31117, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
- { 31155, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
- { 31175, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
- { 31205, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
- { 31229, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
- { 31249, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
- { 31279, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
- { 31303, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
- { 31323, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
- { 31356, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
- { 31382, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
- { 31412, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
- { 31443, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
- { 31473, 0x00008A1D }, /* GL_PURGEABLE_APPLE */
- { 31492, 0x00002003 }, /* GL_Q */
- { 31497, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
- { 31522, 0x00000007 }, /* GL_QUADS */
- { 31531, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
- { 31575, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT */
- { 31623, 0x00008614 }, /* GL_QUAD_MESH_SUN */
- { 31640, 0x00000008 }, /* GL_QUAD_STRIP */
- { 31654, 0x00008E16 }, /* GL_QUERY_BY_REGION_NO_WAIT_NV */
- { 31684, 0x00008E15 }, /* GL_QUERY_BY_REGION_WAIT_NV */
- { 31711, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
- { 31733, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
- { 31759, 0x00008E14 }, /* GL_QUERY_NO_WAIT_NV */
- { 31779, 0x00008866 }, /* GL_QUERY_RESULT */
- { 31795, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
- { 31815, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
- { 31841, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
- { 31871, 0x00008E13 }, /* GL_QUERY_WAIT_NV */
- { 31888, 0x00002002 }, /* GL_R */
- { 31893, 0x00002A10 }, /* GL_R3_G3_B2 */
- { 31905, 0x00008C89 }, /* GL_RASTERIZER_DISCARD_EXT */
- { 31931, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
- { 31964, 0x00000C02 }, /* GL_READ_BUFFER */
- { 31979, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER */
- { 31999, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING */
- { 32027, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
- { 32059, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
- { 32083, 0x000088B8 }, /* GL_READ_ONLY */
- { 32096, 0x000088B8 }, /* GL_READ_ONLY_ARB */
- { 32113, 0x000088BA }, /* GL_READ_WRITE */
- { 32127, 0x000088BA }, /* GL_READ_WRITE_ARB */
- { 32145, 0x00001903 }, /* GL_RED */
- { 32152, 0x00008016 }, /* GL_REDUCE */
- { 32162, 0x00008016 }, /* GL_REDUCE_EXT */
- { 32176, 0x00000D15 }, /* GL_RED_BIAS */
- { 32188, 0x00000D52 }, /* GL_RED_BITS */
- { 32200, 0x00000D14 }, /* GL_RED_SCALE */
- { 32213, 0x00008512 }, /* GL_REFLECTION_MAP */
- { 32231, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
- { 32253, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
- { 32274, 0x00008512 }, /* GL_REFLECTION_MAP_OES */
- { 32296, 0x00008A19 }, /* GL_RELEASED_APPLE */
- { 32314, 0x00001C00 }, /* GL_RENDER */
- { 32324, 0x00008D41 }, /* GL_RENDERBUFFER */
- { 32340, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE */
- { 32367, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE_OES */
- { 32398, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING */
- { 32422, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
- { 32450, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_OES */
- { 32478, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE */
- { 32504, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE_OES */
- { 32534, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE */
- { 32561, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE_OES */
- { 32592, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
- { 32612, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE */
- { 32639, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE_OES */
- { 32670, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT */
- { 32693, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
- { 32720, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_OES */
- { 32747, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
- { 32779, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
- { 32815, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_OES */
- { 32851, 0x00008D41 }, /* GL_RENDERBUFFER_OES */
- { 32871, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE */
- { 32896, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE_OES */
- { 32925, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES */
- { 32949, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES_EXT */
- { 32977, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE */
- { 33006, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE_OES */
- { 33039, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH */
- { 33061, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
- { 33087, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_OES */
- { 33113, 0x00001F01 }, /* GL_RENDERER */
- { 33125, 0x00000C40 }, /* GL_RENDER_MODE */
- { 33140, 0x00002901 }, /* GL_REPEAT */
- { 33150, 0x00001E01 }, /* GL_REPLACE */
- { 33161, 0x00008062 }, /* GL_REPLACE_EXT */
- { 33176, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
- { 33199, 0x0000803A }, /* GL_RESCALE_NORMAL */
- { 33217, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
- { 33239, 0x00008A1B }, /* GL_RETAINED_APPLE */
- { 33257, 0x00000102 }, /* GL_RETURN */
- { 33267, 0x00001907 }, /* GL_RGB */
- { 33274, 0x00008052 }, /* GL_RGB10 */
- { 33283, 0x00008059 }, /* GL_RGB10_A2 */
- { 33295, 0x00008059 }, /* GL_RGB10_A2_EXT */
- { 33311, 0x00008052 }, /* GL_RGB10_EXT */
- { 33324, 0x00008053 }, /* GL_RGB12 */
- { 33333, 0x00008053 }, /* GL_RGB12_EXT */
- { 33346, 0x00008054 }, /* GL_RGB16 */
- { 33355, 0x00008054 }, /* GL_RGB16_EXT */
- { 33368, 0x0000804E }, /* GL_RGB2_EXT */
- { 33380, 0x0000804F }, /* GL_RGB4 */
- { 33388, 0x0000804F }, /* GL_RGB4_EXT */
- { 33400, 0x000083A1 }, /* GL_RGB4_S3TC */
- { 33413, 0x00008050 }, /* GL_RGB5 */
- { 33421, 0x00008D62 }, /* GL_RGB565 */
- { 33431, 0x00008D62 }, /* GL_RGB565_OES */
- { 33445, 0x00008057 }, /* GL_RGB5_A1 */
- { 33456, 0x00008057 }, /* GL_RGB5_A1_EXT */
- { 33471, 0x00008057 }, /* GL_RGB5_A1_OES */
- { 33486, 0x00008050 }, /* GL_RGB5_EXT */
- { 33498, 0x00008051 }, /* GL_RGB8 */
- { 33506, 0x00008051 }, /* GL_RGB8_EXT */
- { 33518, 0x00008051 }, /* GL_RGB8_OES */
- { 33530, 0x00001908 }, /* GL_RGBA */
- { 33538, 0x0000805A }, /* GL_RGBA12 */
- { 33548, 0x0000805A }, /* GL_RGBA12_EXT */
- { 33562, 0x0000805B }, /* GL_RGBA16 */
- { 33572, 0x0000805B }, /* GL_RGBA16_EXT */
- { 33586, 0x00008055 }, /* GL_RGBA2 */
- { 33595, 0x00008055 }, /* GL_RGBA2_EXT */
- { 33608, 0x00008056 }, /* GL_RGBA4 */
- { 33617, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
- { 33636, 0x00008056 }, /* GL_RGBA4_EXT */
- { 33649, 0x00008056 }, /* GL_RGBA4_OES */
- { 33662, 0x000083A3 }, /* GL_RGBA4_S3TC */
- { 33676, 0x00008058 }, /* GL_RGBA8 */
- { 33685, 0x00008058 }, /* GL_RGBA8_EXT */
- { 33698, 0x00008058 }, /* GL_RGBA8_OES */
- { 33711, 0x00008F97 }, /* GL_RGBA8_SNORM */
- { 33726, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
- { 33744, 0x00000C31 }, /* GL_RGBA_MODE */
- { 33757, 0x000083A2 }, /* GL_RGBA_S3TC */
- { 33770, 0x00008F93 }, /* GL_RGBA_SNORM */
- { 33784, 0x000083A0 }, /* GL_RGB_S3TC */
- { 33796, 0x00008573 }, /* GL_RGB_SCALE */
- { 33809, 0x00008573 }, /* GL_RGB_SCALE_ARB */
- { 33826, 0x00008573 }, /* GL_RGB_SCALE_EXT */
- { 33843, 0x00000407 }, /* GL_RIGHT */
- { 33852, 0x00002000 }, /* GL_S */
- { 33857, 0x00008B5D }, /* GL_SAMPLER_1D */
- { 33871, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
- { 33892, 0x00008B5E }, /* GL_SAMPLER_2D */
- { 33906, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
- { 33927, 0x00008B5F }, /* GL_SAMPLER_3D */
- { 33941, 0x00008B5F }, /* GL_SAMPLER_3D_OES */
- { 33959, 0x00008B60 }, /* GL_SAMPLER_CUBE */
- { 33975, 0x000080A9 }, /* GL_SAMPLES */
- { 33986, 0x000086B4 }, /* GL_SAMPLES_3DFX */
- { 34002, 0x000080A9 }, /* GL_SAMPLES_ARB */
- { 34017, 0x00008914 }, /* GL_SAMPLES_PASSED */
- { 34035, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
- { 34057, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
- { 34085, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
- { 34117, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
- { 34140, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
- { 34167, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
- { 34185, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
- { 34208, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
- { 34230, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
- { 34249, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
- { 34272, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
- { 34298, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
- { 34328, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
- { 34353, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
- { 34382, 0x00080000 }, /* GL_SCISSOR_BIT */
- { 34397, 0x00000C10 }, /* GL_SCISSOR_BOX */
- { 34412, 0x00000C11 }, /* GL_SCISSOR_TEST */
- { 34428, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
- { 34453, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
- { 34493, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
- { 34537, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
- { 34570, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
- { 34600, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
- { 34632, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
- { 34662, 0x00001C02 }, /* GL_SELECT */
- { 34672, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
- { 34700, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
- { 34725, 0x00008012 }, /* GL_SEPARABLE_2D */
- { 34741, 0x00008C8D }, /* GL_SEPARATE_ATTRIBS_EXT */
- { 34765, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
- { 34792, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
- { 34823, 0x0000150F }, /* GL_SET */
- { 34830, 0x00008DF8 }, /* GL_SHADER_BINARY_FORMATS */
- { 34855, 0x00008DFA }, /* GL_SHADER_COMPILER */
- { 34874, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
- { 34895, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
- { 34919, 0x00008B4F }, /* GL_SHADER_TYPE */
- { 34934, 0x00000B54 }, /* GL_SHADE_MODEL */
- { 34949, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
- { 34977, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
- { 35000, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
- { 35030, 0x00001601 }, /* GL_SHININESS */
- { 35043, 0x00001402 }, /* GL_SHORT */
- { 35052, 0x00009119 }, /* GL_SIGNALED */
- { 35064, 0x00008F9C }, /* GL_SIGNED_NORMALIZED */
- { 35085, 0x000081F9 }, /* GL_SINGLE_COLOR */
- { 35101, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
- { 35121, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
- { 35140, 0x00008C46 }, /* GL_SLUMINANCE */
- { 35154, 0x00008C47 }, /* GL_SLUMINANCE8 */
- { 35169, 0x00008C45 }, /* GL_SLUMINANCE8_ALPHA8 */
- { 35191, 0x00008C44 }, /* GL_SLUMINANCE_ALPHA */
- { 35211, 0x00001D01 }, /* GL_SMOOTH */
- { 35221, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
- { 35254, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
- { 35281, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
- { 35314, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
- { 35341, 0x00008588 }, /* GL_SOURCE0_ALPHA */
- { 35358, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
- { 35379, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
- { 35400, 0x00008580 }, /* GL_SOURCE0_RGB */
- { 35415, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
- { 35434, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
- { 35453, 0x00008589 }, /* GL_SOURCE1_ALPHA */
- { 35470, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
- { 35491, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
- { 35512, 0x00008581 }, /* GL_SOURCE1_RGB */
- { 35527, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
- { 35546, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
- { 35565, 0x0000858A }, /* GL_SOURCE2_ALPHA */
- { 35582, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
- { 35603, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
- { 35624, 0x00008582 }, /* GL_SOURCE2_RGB */
- { 35639, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
- { 35658, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
- { 35677, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
- { 35697, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
- { 35715, 0x00001202 }, /* GL_SPECULAR */
- { 35727, 0x00002402 }, /* GL_SPHERE_MAP */
- { 35741, 0x00001206 }, /* GL_SPOT_CUTOFF */
- { 35756, 0x00001204 }, /* GL_SPOT_DIRECTION */
- { 35774, 0x00001205 }, /* GL_SPOT_EXPONENT */
- { 35791, 0x00008588 }, /* GL_SRC0_ALPHA */
- { 35805, 0x00008580 }, /* GL_SRC0_RGB */
- { 35817, 0x00008589 }, /* GL_SRC1_ALPHA */
- { 35831, 0x00008581 }, /* GL_SRC1_RGB */
- { 35843, 0x0000858A }, /* GL_SRC2_ALPHA */
- { 35857, 0x00008582 }, /* GL_SRC2_RGB */
- { 35869, 0x00000302 }, /* GL_SRC_ALPHA */
- { 35882, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
- { 35904, 0x00000300 }, /* GL_SRC_COLOR */
- { 35917, 0x00008C40 }, /* GL_SRGB */
- { 35925, 0x00008C41 }, /* GL_SRGB8 */
- { 35934, 0x00008C43 }, /* GL_SRGB8_ALPHA8 */
- { 35950, 0x00008C42 }, /* GL_SRGB_ALPHA */
- { 35964, 0x00000503 }, /* GL_STACK_OVERFLOW */
- { 35982, 0x00000504 }, /* GL_STACK_UNDERFLOW */
- { 36001, 0x000088E6 }, /* GL_STATIC_COPY */
- { 36016, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
- { 36035, 0x000088E4 }, /* GL_STATIC_DRAW */
- { 36050, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
- { 36069, 0x000088E5 }, /* GL_STATIC_READ */
- { 36084, 0x000088E5 }, /* GL_STATIC_READ_ARB */
- { 36103, 0x00001802 }, /* GL_STENCIL */
- { 36114, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT */
- { 36136, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
- { 36162, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_OES */
- { 36188, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
- { 36209, 0x00008801 }, /* GL_STENCIL_BACK_FAIL_ATI */
- { 36234, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
- { 36255, 0x00008800 }, /* GL_STENCIL_BACK_FUNC_ATI */
- { 36280, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
- { 36312, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI */
- { 36348, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
- { 36380, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI */
- { 36416, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
- { 36436, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
- { 36463, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
- { 36489, 0x00000D57 }, /* GL_STENCIL_BITS */
- { 36505, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
- { 36527, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
- { 36550, 0x00000B94 }, /* GL_STENCIL_FAIL */
- { 36566, 0x00000B92 }, /* GL_STENCIL_FUNC */
- { 36582, 0x00001901 }, /* GL_STENCIL_INDEX */
- { 36599, 0x00008D46 }, /* GL_STENCIL_INDEX1 */
- { 36617, 0x00008D49 }, /* GL_STENCIL_INDEX16 */
- { 36636, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
- { 36659, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
- { 36681, 0x00008D46 }, /* GL_STENCIL_INDEX1_OES */
- { 36703, 0x00008D47 }, /* GL_STENCIL_INDEX4 */
- { 36721, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
- { 36743, 0x00008D47 }, /* GL_STENCIL_INDEX4_OES */
- { 36765, 0x00008D48 }, /* GL_STENCIL_INDEX8 */
- { 36783, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
- { 36805, 0x00008D48 }, /* GL_STENCIL_INDEX8_OES */
- { 36827, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
- { 36848, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
- { 36875, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
- { 36902, 0x00000B97 }, /* GL_STENCIL_REF */
- { 36917, 0x00000B90 }, /* GL_STENCIL_TEST */
- { 36933, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
- { 36962, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
- { 36984, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
- { 37005, 0x00000C33 }, /* GL_STEREO */
- { 37015, 0x000085BE }, /* GL_STORAGE_CACHED_APPLE */
- { 37039, 0x000085BD }, /* GL_STORAGE_PRIVATE_APPLE */
- { 37064, 0x000085BF }, /* GL_STORAGE_SHARED_APPLE */
- { 37088, 0x000088E2 }, /* GL_STREAM_COPY */
- { 37103, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
- { 37122, 0x000088E0 }, /* GL_STREAM_DRAW */
- { 37137, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
- { 37156, 0x000088E1 }, /* GL_STREAM_READ */
- { 37171, 0x000088E1 }, /* GL_STREAM_READ_ARB */
- { 37190, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
- { 37207, 0x000084E7 }, /* GL_SUBTRACT */
- { 37219, 0x000084E7 }, /* GL_SUBTRACT_ARB */
- { 37235, 0x00009113 }, /* GL_SYNC_CONDITION */
- { 37253, 0x00009116 }, /* GL_SYNC_FENCE */
- { 37267, 0x00009115 }, /* GL_SYNC_FLAGS */
- { 37281, 0x00000001 }, /* GL_SYNC_FLUSH_COMMANDS_BIT */
- { 37308, 0x00009117 }, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
- { 37338, 0x00009114 }, /* GL_SYNC_STATUS */
- { 37353, 0x00002001 }, /* GL_T */
- { 37358, 0x00002A2A }, /* GL_T2F_C3F_V3F */
- { 37373, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
- { 37392, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
- { 37408, 0x00002A2B }, /* GL_T2F_N3F_V3F */
- { 37423, 0x00002A27 }, /* GL_T2F_V3F */
- { 37434, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
- { 37453, 0x00002A28 }, /* GL_T4F_V4F */
- { 37464, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
- { 37487, 0x00001702 }, /* GL_TEXTURE */
- { 37498, 0x000084C0 }, /* GL_TEXTURE0 */
- { 37510, 0x000084C0 }, /* GL_TEXTURE0_ARB */
- { 37526, 0x000084C1 }, /* GL_TEXTURE1 */
- { 37538, 0x000084CA }, /* GL_TEXTURE10 */
- { 37551, 0x000084CA }, /* GL_TEXTURE10_ARB */
- { 37568, 0x000084CB }, /* GL_TEXTURE11 */
- { 37581, 0x000084CB }, /* GL_TEXTURE11_ARB */
- { 37598, 0x000084CC }, /* GL_TEXTURE12 */
- { 37611, 0x000084CC }, /* GL_TEXTURE12_ARB */
- { 37628, 0x000084CD }, /* GL_TEXTURE13 */
- { 37641, 0x000084CD }, /* GL_TEXTURE13_ARB */
- { 37658, 0x000084CE }, /* GL_TEXTURE14 */
- { 37671, 0x000084CE }, /* GL_TEXTURE14_ARB */
- { 37688, 0x000084CF }, /* GL_TEXTURE15 */
- { 37701, 0x000084CF }, /* GL_TEXTURE15_ARB */
- { 37718, 0x000084D0 }, /* GL_TEXTURE16 */
- { 37731, 0x000084D0 }, /* GL_TEXTURE16_ARB */
- { 37748, 0x000084D1 }, /* GL_TEXTURE17 */
- { 37761, 0x000084D1 }, /* GL_TEXTURE17_ARB */
- { 37778, 0x000084D2 }, /* GL_TEXTURE18 */
- { 37791, 0x000084D2 }, /* GL_TEXTURE18_ARB */
- { 37808, 0x000084D3 }, /* GL_TEXTURE19 */
- { 37821, 0x000084D3 }, /* GL_TEXTURE19_ARB */
- { 37838, 0x000084C1 }, /* GL_TEXTURE1_ARB */
- { 37854, 0x000084C2 }, /* GL_TEXTURE2 */
- { 37866, 0x000084D4 }, /* GL_TEXTURE20 */
- { 37879, 0x000084D4 }, /* GL_TEXTURE20_ARB */
- { 37896, 0x000084D5 }, /* GL_TEXTURE21 */
- { 37909, 0x000084D5 }, /* GL_TEXTURE21_ARB */
- { 37926, 0x000084D6 }, /* GL_TEXTURE22 */
- { 37939, 0x000084D6 }, /* GL_TEXTURE22_ARB */
- { 37956, 0x000084D7 }, /* GL_TEXTURE23 */
- { 37969, 0x000084D7 }, /* GL_TEXTURE23_ARB */
- { 37986, 0x000084D8 }, /* GL_TEXTURE24 */
- { 37999, 0x000084D8 }, /* GL_TEXTURE24_ARB */
- { 38016, 0x000084D9 }, /* GL_TEXTURE25 */
- { 38029, 0x000084D9 }, /* GL_TEXTURE25_ARB */
- { 38046, 0x000084DA }, /* GL_TEXTURE26 */
- { 38059, 0x000084DA }, /* GL_TEXTURE26_ARB */
- { 38076, 0x000084DB }, /* GL_TEXTURE27 */
- { 38089, 0x000084DB }, /* GL_TEXTURE27_ARB */
- { 38106, 0x000084DC }, /* GL_TEXTURE28 */
- { 38119, 0x000084DC }, /* GL_TEXTURE28_ARB */
- { 38136, 0x000084DD }, /* GL_TEXTURE29 */
- { 38149, 0x000084DD }, /* GL_TEXTURE29_ARB */
- { 38166, 0x000084C2 }, /* GL_TEXTURE2_ARB */
- { 38182, 0x000084C3 }, /* GL_TEXTURE3 */
- { 38194, 0x000084DE }, /* GL_TEXTURE30 */
- { 38207, 0x000084DE }, /* GL_TEXTURE30_ARB */
- { 38224, 0x000084DF }, /* GL_TEXTURE31 */
- { 38237, 0x000084DF }, /* GL_TEXTURE31_ARB */
- { 38254, 0x000084C3 }, /* GL_TEXTURE3_ARB */
- { 38270, 0x000084C4 }, /* GL_TEXTURE4 */
- { 38282, 0x000084C4 }, /* GL_TEXTURE4_ARB */
- { 38298, 0x000084C5 }, /* GL_TEXTURE5 */
- { 38310, 0x000084C5 }, /* GL_TEXTURE5_ARB */
- { 38326, 0x000084C6 }, /* GL_TEXTURE6 */
- { 38338, 0x000084C6 }, /* GL_TEXTURE6_ARB */
- { 38354, 0x000084C7 }, /* GL_TEXTURE7 */
- { 38366, 0x000084C7 }, /* GL_TEXTURE7_ARB */
- { 38382, 0x000084C8 }, /* GL_TEXTURE8 */
- { 38394, 0x000084C8 }, /* GL_TEXTURE8_ARB */
- { 38410, 0x000084C9 }, /* GL_TEXTURE9 */
- { 38422, 0x000084C9 }, /* GL_TEXTURE9_ARB */
- { 38438, 0x00000DE0 }, /* GL_TEXTURE_1D */
- { 38452, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
- { 38476, 0x00000DE1 }, /* GL_TEXTURE_2D */
- { 38490, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
- { 38514, 0x0000806F }, /* GL_TEXTURE_3D */
- { 38528, 0x0000806F }, /* GL_TEXTURE_3D_OES */
- { 38546, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
- { 38568, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
- { 38594, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
- { 38616, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
- { 38638, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
- { 38670, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
- { 38692, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
- { 38724, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
- { 38746, 0x0000806A }, /* GL_TEXTURE_BINDING_3D_OES */
- { 38772, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
- { 38800, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
- { 38832, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_OES */
- { 38864, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
- { 38897, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
- { 38929, 0x00040000 }, /* GL_TEXTURE_BIT */
- { 38944, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
- { 38965, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
- { 38990, 0x00001005 }, /* GL_TEXTURE_BORDER */
- { 39008, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
- { 39032, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
- { 39063, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
- { 39093, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
- { 39123, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
- { 39158, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
- { 39189, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- { 39227, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
- { 39254, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
- { 39286, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
- { 39320, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
- { 39344, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
- { 39372, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
- { 39396, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
- { 39424, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
- { 39457, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
- { 39481, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
- { 39503, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
- { 39525, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
- { 39551, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
- { 39585, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
- { 39618, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
- { 39655, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
- { 39683, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
- { 39715, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
- { 39738, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
- { 39776, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
- { 39818, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
- { 39849, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
- { 39877, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
- { 39907, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
- { 39935, 0x00008B9D }, /* GL_TEXTURE_CROP_RECT_OES */
- { 39960, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
- { 39980, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
- { 40004, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
- { 40035, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
- { 40070, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES */
- { 40105, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
- { 40136, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
- { 40171, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES */
- { 40206, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
- { 40237, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
- { 40272, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES */
- { 40307, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_OES */
- { 40331, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
- { 40362, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
- { 40397, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES */
- { 40432, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
- { 40463, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
- { 40498, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES */
- { 40533, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
- { 40564, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
- { 40599, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES */
- { 40634, 0x000088F4 }, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
- { 40663, 0x00008071 }, /* GL_TEXTURE_DEPTH */
- { 40680, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
- { 40702, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
- { 40728, 0x00002300 }, /* GL_TEXTURE_ENV */
- { 40743, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
- { 40764, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
- { 40784, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
- { 40810, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL_EXT */
- { 40840, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
- { 40860, 0x00002500 }, /* GL_TEXTURE_GEN_MODE_OES */
- { 40884, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
- { 40901, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
- { 40918, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
- { 40935, 0x00008D60 }, /* GL_TEXTURE_GEN_STR_OES */
- { 40958, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
- { 40975, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
- { 41000, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
- { 41022, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
- { 41048, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
- { 41066, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
- { 41092, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
- { 41118, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
- { 41148, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
- { 41175, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
- { 41200, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
- { 41220, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
- { 41244, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
- { 41271, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
- { 41298, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
- { 41325, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
- { 41351, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
- { 41381, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
- { 41403, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
- { 41421, 0x0000898F }, /* GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES */
- { 41461, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
- { 41491, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
- { 41519, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
- { 41547, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
- { 41575, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
- { 41596, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
- { 41615, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
- { 41637, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
- { 41656, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
- { 41676, 0x000085B7 }, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
- { 41706, 0x000085B8 }, /* GL_TEXTURE_RANGE_POINTER_APPLE */
- { 41737, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
- { 41762, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
- { 41786, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
- { 41806, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
- { 41830, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
- { 41850, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
- { 41873, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE */
- { 41897, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE_EXT */
- { 41925, 0x000085BC }, /* GL_TEXTURE_STORAGE_HINT_APPLE */
- { 41955, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
- { 41980, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
- { 42014, 0x00001000 }, /* GL_TEXTURE_WIDTH */
- { 42031, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
- { 42049, 0x00008072 }, /* GL_TEXTURE_WRAP_R_OES */
- { 42071, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
- { 42089, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
- { 42107, 0x0000911B }, /* GL_TIMEOUT_EXPIRED */
- { 42126, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
- { 42146, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
- { 42165, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
- { 42194, 0x00001000 }, /* GL_TRANSFORM_BIT */
- { 42211, 0x00008E22 }, /* GL_TRANSFORM_FEEDBACK */
- { 42233, 0x00008E25 }, /* GL_TRANSFORM_FEEDBACK_BINDING */
- { 42263, 0x00008E24 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE */
- { 42299, 0x00008C8F }, /* GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT */
- { 42340, 0x00008C8E }, /* GL_TRANSFORM_FEEDBACK_BUFFER_EXT */
- { 42373, 0x00008C7F }, /* GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT */
- { 42411, 0x00008E23 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED */
- { 42447, 0x00008C85 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT */
- { 42485, 0x00008C84 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT */
- { 42524, 0x00008C88 }, /* GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT */
- { 42569, 0x00008C83 }, /* GL_TRANSFORM_FEEDBACK_VARYINGS_EXT */
- { 42604, 0x00008C76 }, /* GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT */
- { 42649, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
- { 42675, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
- { 42705, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
- { 42737, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
- { 42767, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
- { 42801, 0x0000862C }, /* GL_TRANSPOSE_NV */
- { 42817, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
- { 42848, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
- { 42883, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
- { 42911, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
- { 42943, 0x00000004 }, /* GL_TRIANGLES */
- { 42956, 0x0000000C }, /* GL_TRIANGLES_ADJACENCY_ARB */
- { 42983, 0x00000006 }, /* GL_TRIANGLE_FAN */
- { 42999, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
- { 43020, 0x00000005 }, /* GL_TRIANGLE_STRIP */
- { 43038, 0x0000000D }, /* GL_TRIANGLE_STRIP_ADJACENCY_ARB */
- { 43070, 0x00000001 }, /* GL_TRUE */
- { 43078, 0x00008A1C }, /* GL_UNDEFINED_APPLE */
- { 43097, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
- { 43117, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
- { 43140, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
- { 43160, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
- { 43181, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
- { 43203, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
- { 43225, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
- { 43245, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
- { 43266, 0x00009118 }, /* GL_UNSIGNALED */
- { 43280, 0x00001401 }, /* GL_UNSIGNED_BYTE */
- { 43297, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
- { 43324, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
- { 43347, 0x00001405 }, /* GL_UNSIGNED_INT */
- { 43363, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
- { 43390, 0x00008DF6 }, /* GL_UNSIGNED_INT_10_10_10_2_OES */
- { 43421, 0x000084FA }, /* GL_UNSIGNED_INT_24_8 */
- { 43442, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_EXT */
- { 43467, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
- { 43491, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_OES */
- { 43516, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
- { 43547, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV_EXT */
- { 43582, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
- { 43606, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
- { 43634, 0x00008C17 }, /* GL_UNSIGNED_NORMALIZED */
- { 43657, 0x00001403 }, /* GL_UNSIGNED_SHORT */
- { 43675, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
- { 43705, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT */
- { 43739, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
- { 43765, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
- { 43795, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT */
- { 43829, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
- { 43855, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
- { 43879, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
- { 43907, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
- { 43935, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
- { 43962, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
- { 43994, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
- { 44025, 0x00008CA2 }, /* GL_UPPER_LEFT */
- { 44039, 0x00002A20 }, /* GL_V2F */
- { 44046, 0x00002A21 }, /* GL_V3F */
- { 44053, 0x00008B83 }, /* GL_VALIDATE_STATUS */
- { 44072, 0x00001F00 }, /* GL_VENDOR */
- { 44082, 0x00001F02 }, /* GL_VERSION */
- { 44093, 0x00008074 }, /* GL_VERTEX_ARRAY */
- { 44109, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING */
- { 44133, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
- { 44163, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
- { 44194, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
- { 44229, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
- { 44253, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
- { 44274, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
- { 44297, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
- { 44318, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
- { 44345, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
- { 44373, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
- { 44401, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
- { 44429, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
- { 44457, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
- { 44485, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
- { 44513, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
- { 44540, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
- { 44567, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
- { 44594, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
- { 44621, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
- { 44648, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
- { 44675, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
- { 44702, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
- { 44729, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
- { 44756, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
- { 44794, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
- { 44836, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
- { 44867, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
- { 44902, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
- { 44936, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
- { 44974, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
- { 45005, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
- { 45040, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
- { 45068, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
- { 45100, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
- { 45130, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
- { 45164, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
- { 45192, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
- { 45224, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
- { 45244, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
- { 45266, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
- { 45295, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
- { 45316, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
- { 45345, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
- { 45378, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
- { 45410, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
- { 45437, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
- { 45468, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
- { 45498, 0x00008B31 }, /* GL_VERTEX_SHADER */
- { 45515, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
- { 45536, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
- { 45563, 0x00000BA2 }, /* GL_VIEWPORT */
- { 45575, 0x00000800 }, /* GL_VIEWPORT_BIT */
- { 45591, 0x00008A1A }, /* GL_VOLATILE_APPLE */
- { 45609, 0x0000911D }, /* GL_WAIT_FAILED */
- { 45624, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
- { 45644, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
- { 45675, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
- { 45710, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_OES */
- { 45745, 0x000086AD }, /* GL_WEIGHT_ARRAY_OES */
- { 45765, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
- { 45793, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_OES */
- { 45821, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
- { 45846, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_OES */
- { 45871, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
- { 45898, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_OES */
- { 45925, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
- { 45950, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_OES */
- { 45975, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
- { 45999, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
- { 46018, 0x000088B9 }, /* GL_WRITE_ONLY */
- { 46032, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
- { 46050, 0x000088B9 }, /* GL_WRITE_ONLY_OES */
- { 46068, 0x00001506 }, /* GL_XOR */
- { 46075, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
- { 46094, 0x00008757 }, /* GL_YCBCR_MESA */
- { 46108, 0x00000000 }, /* GL_ZERO */
- { 46116, 0x00000D16 }, /* GL_ZOOM_X */
- { 46126, 0x00000D17 }, /* GL_ZOOM_Y */
+ { 276, 0x00008B8D }, /* GL_ACTIVE_PROGRAM_EXT */
+ { 298, 0x00008911 }, /* GL_ACTIVE_STENCIL_FACE_EXT */
+ { 325, 0x000084E0 }, /* GL_ACTIVE_TEXTURE */
+ { 343, 0x000084E0 }, /* GL_ACTIVE_TEXTURE_ARB */
+ { 365, 0x00008B86 }, /* GL_ACTIVE_UNIFORMS */
+ { 384, 0x00008B87 }, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
+ { 413, 0x000086A5 }, /* GL_ACTIVE_VERTEX_UNITS_ARB */
+ { 440, 0x00000104 }, /* GL_ADD */
+ { 447, 0x00008574 }, /* GL_ADD_SIGNED */
+ { 461, 0x00008574 }, /* GL_ADD_SIGNED_ARB */
+ { 479, 0x00008574 }, /* GL_ADD_SIGNED_EXT */
+ { 497, 0x0000846E }, /* GL_ALIASED_LINE_WIDTH_RANGE */
+ { 525, 0x0000846D }, /* GL_ALIASED_POINT_SIZE_RANGE */
+ { 553, 0x000FFFFF }, /* GL_ALL_ATTRIB_BITS */
+ { 572, 0xFFFFFFFF }, /* GL_ALL_CLIENT_ATTRIB_BITS */
+ { 598, 0x00001906 }, /* GL_ALPHA */
+ { 607, 0x0000803D }, /* GL_ALPHA12 */
+ { 618, 0x0000803D }, /* GL_ALPHA12_EXT */
+ { 633, 0x0000803E }, /* GL_ALPHA16 */
+ { 644, 0x00008D8A }, /* GL_ALPHA16I_EXT */
+ { 660, 0x00008D78 }, /* GL_ALPHA16UI_EXT */
+ { 677, 0x0000803E }, /* GL_ALPHA16_EXT */
+ { 692, 0x00008D84 }, /* GL_ALPHA32I_EXT */
+ { 708, 0x00008D72 }, /* GL_ALPHA32UI_EXT */
+ { 725, 0x0000803B }, /* GL_ALPHA4 */
+ { 735, 0x0000803B }, /* GL_ALPHA4_EXT */
+ { 749, 0x0000803C }, /* GL_ALPHA8 */
+ { 759, 0x00008D90 }, /* GL_ALPHA8I_EXT */
+ { 774, 0x00008D7E }, /* GL_ALPHA8UI_EXT */
+ { 790, 0x0000803C }, /* GL_ALPHA8_EXT */
+ { 804, 0x00000D1D }, /* GL_ALPHA_BIAS */
+ { 818, 0x00000D55 }, /* GL_ALPHA_BITS */
+ { 832, 0x00008D97 }, /* GL_ALPHA_INTEGER_EXT */
+ { 853, 0x00000D1C }, /* GL_ALPHA_SCALE */
+ { 868, 0x00000BC0 }, /* GL_ALPHA_TEST */
+ { 882, 0x00000BC1 }, /* GL_ALPHA_TEST_FUNC */
+ { 901, 0x00000BC2 }, /* GL_ALPHA_TEST_REF */
+ { 919, 0x0000911A }, /* GL_ALREADY_SIGNALED */
+ { 939, 0x00000207 }, /* GL_ALWAYS */
+ { 949, 0x00001200 }, /* GL_AMBIENT */
+ { 960, 0x00001602 }, /* GL_AMBIENT_AND_DIFFUSE */
+ { 983, 0x00001501 }, /* GL_AND */
+ { 990, 0x00001504 }, /* GL_AND_INVERTED */
+ { 1006, 0x00001502 }, /* GL_AND_REVERSE */
+ { 1021, 0x00008892 }, /* GL_ARRAY_BUFFER */
+ { 1037, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING */
+ { 1061, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING_ARB */
+ { 1089, 0x00008B85 }, /* GL_ATTACHED_SHADERS */
+ { 1109, 0x00008645 }, /* GL_ATTRIB_ARRAY_POINTER_NV */
+ { 1136, 0x00008623 }, /* GL_ATTRIB_ARRAY_SIZE_NV */
+ { 1160, 0x00008624 }, /* GL_ATTRIB_ARRAY_STRIDE_NV */
+ { 1186, 0x00008625 }, /* GL_ATTRIB_ARRAY_TYPE_NV */
+ { 1210, 0x00000BB0 }, /* GL_ATTRIB_STACK_DEPTH */
+ { 1232, 0x00000D80 }, /* GL_AUTO_NORMAL */
+ { 1247, 0x00000409 }, /* GL_AUX0 */
+ { 1255, 0x0000040A }, /* GL_AUX1 */
+ { 1263, 0x0000040B }, /* GL_AUX2 */
+ { 1271, 0x0000040C }, /* GL_AUX3 */
+ { 1279, 0x00000C00 }, /* GL_AUX_BUFFERS */
+ { 1294, 0x00000405 }, /* GL_BACK */
+ { 1302, 0x00000402 }, /* GL_BACK_LEFT */
+ { 1315, 0x00000403 }, /* GL_BACK_RIGHT */
+ { 1329, 0x000080E0 }, /* GL_BGR */
+ { 1336, 0x000080E1 }, /* GL_BGRA */
+ { 1344, 0x000080E1 }, /* GL_BGRA_EXT */
+ { 1356, 0x00008D9B }, /* GL_BGRA_INTEGER_EXT */
+ { 1376, 0x00008D9A }, /* GL_BGR_INTEGER_EXT */
+ { 1395, 0x00001A00 }, /* GL_BITMAP */
+ { 1405, 0x00000704 }, /* GL_BITMAP_TOKEN */
+ { 1421, 0x00000BE2 }, /* GL_BLEND */
+ { 1430, 0x00008005 }, /* GL_BLEND_COLOR */
+ { 1445, 0x00008005 }, /* GL_BLEND_COLOR_EXT */
+ { 1464, 0x00000BE0 }, /* GL_BLEND_DST */
+ { 1477, 0x000080CA }, /* GL_BLEND_DST_ALPHA */
+ { 1496, 0x000080CA }, /* GL_BLEND_DST_ALPHA_OES */
+ { 1519, 0x000080C8 }, /* GL_BLEND_DST_RGB */
+ { 1536, 0x000080C8 }, /* GL_BLEND_DST_RGB_OES */
+ { 1557, 0x00008009 }, /* GL_BLEND_EQUATION */
+ { 1575, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA */
+ { 1599, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_EXT */
+ { 1627, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_OES */
+ { 1655, 0x00008009 }, /* GL_BLEND_EQUATION_EXT */
+ { 1677, 0x00008009 }, /* GL_BLEND_EQUATION_OES */
+ { 1699, 0x00008009 }, /* GL_BLEND_EQUATION_RGB */
+ { 1721, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_EXT */
+ { 1747, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_OES */
+ { 1773, 0x00000BE1 }, /* GL_BLEND_SRC */
+ { 1786, 0x000080CB }, /* GL_BLEND_SRC_ALPHA */
+ { 1805, 0x000080CB }, /* GL_BLEND_SRC_ALPHA_OES */
+ { 1828, 0x000080C9 }, /* GL_BLEND_SRC_RGB */
+ { 1845, 0x000080C9 }, /* GL_BLEND_SRC_RGB_OES */
+ { 1866, 0x00001905 }, /* GL_BLUE */
+ { 1874, 0x00000D1B }, /* GL_BLUE_BIAS */
+ { 1887, 0x00000D54 }, /* GL_BLUE_BITS */
+ { 1900, 0x00008D96 }, /* GL_BLUE_INTEGER_EXT */
+ { 1920, 0x00000D1A }, /* GL_BLUE_SCALE */
+ { 1934, 0x00008B56 }, /* GL_BOOL */
+ { 1942, 0x00008B56 }, /* GL_BOOL_ARB */
+ { 1954, 0x00008B57 }, /* GL_BOOL_VEC2 */
+ { 1967, 0x00008B57 }, /* GL_BOOL_VEC2_ARB */
+ { 1984, 0x00008B58 }, /* GL_BOOL_VEC3 */
+ { 1997, 0x00008B58 }, /* GL_BOOL_VEC3_ARB */
+ { 2014, 0x00008B59 }, /* GL_BOOL_VEC4 */
+ { 2027, 0x00008B59 }, /* GL_BOOL_VEC4_ARB */
+ { 2044, 0x000088BB }, /* GL_BUFFER_ACCESS */
+ { 2061, 0x000088BB }, /* GL_BUFFER_ACCESS_ARB */
+ { 2082, 0x000088BB }, /* GL_BUFFER_ACCESS_OES */
+ { 2103, 0x00008A13 }, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */
+ { 2134, 0x000088BC }, /* GL_BUFFER_MAPPED */
+ { 2151, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */
+ { 2172, 0x000088BC }, /* GL_BUFFER_MAPPED_OES */
+ { 2193, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */
+ { 2215, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */
+ { 2241, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_OES */
+ { 2267, 0x000085B3 }, /* GL_BUFFER_OBJECT_APPLE */
+ { 2290, 0x00008A12 }, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */
+ { 2324, 0x00008764 }, /* GL_BUFFER_SIZE */
+ { 2339, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */
+ { 2358, 0x00008765 }, /* GL_BUFFER_USAGE */
+ { 2374, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */
+ { 2394, 0x0000877B }, /* GL_BUMP_ENVMAP_ATI */
+ { 2413, 0x00008777 }, /* GL_BUMP_NUM_TEX_UNITS_ATI */
+ { 2439, 0x00008775 }, /* GL_BUMP_ROT_MATRIX_ATI */
+ { 2462, 0x00008776 }, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */
+ { 2490, 0x0000877C }, /* GL_BUMP_TARGET_ATI */
+ { 2509, 0x00008778 }, /* GL_BUMP_TEX_UNITS_ATI */
+ { 2531, 0x00001400 }, /* GL_BYTE */
+ { 2539, 0x00002A24 }, /* GL_C3F_V3F */
+ { 2550, 0x00002A26 }, /* GL_C4F_N3F_V3F */
+ { 2565, 0x00002A22 }, /* GL_C4UB_V2F */
+ { 2577, 0x00002A23 }, /* GL_C4UB_V3F */
+ { 2589, 0x00000901 }, /* GL_CCW */
+ { 2596, 0x00002900 }, /* GL_CLAMP */
+ { 2605, 0x0000812D }, /* GL_CLAMP_TO_BORDER */
+ { 2624, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */
+ { 2647, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */
+ { 2671, 0x0000812F }, /* GL_CLAMP_TO_EDGE */
+ { 2688, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */
+ { 2710, 0x00001500 }, /* GL_CLEAR */
+ { 2719, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */
+ { 2744, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */
+ { 2773, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */
+ { 2799, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
+ { 2828, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */
+ { 2854, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */
+ { 2881, 0x00003000 }, /* GL_CLIP_PLANE0 */
+ { 2896, 0x00003001 }, /* GL_CLIP_PLANE1 */
+ { 2911, 0x00003002 }, /* GL_CLIP_PLANE2 */
+ { 2926, 0x00003003 }, /* GL_CLIP_PLANE3 */
+ { 2941, 0x00003004 }, /* GL_CLIP_PLANE4 */
+ { 2956, 0x00003005 }, /* GL_CLIP_PLANE5 */
+ { 2971, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
+ { 3004, 0x00000A00 }, /* GL_COEFF */
+ { 3013, 0x00001800 }, /* GL_COLOR */
+ { 3022, 0x00008076 }, /* GL_COLOR_ARRAY */
+ { 3037, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */
+ { 3067, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */
+ { 3101, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */
+ { 3124, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */
+ { 3144, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */
+ { 3166, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */
+ { 3186, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0 */
+ { 3207, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */
+ { 3232, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_OES */
+ { 3257, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1 */
+ { 3278, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10 */
+ { 3300, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */
+ { 3326, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11 */
+ { 3348, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */
+ { 3374, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12 */
+ { 3396, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */
+ { 3422, 0x00008CED }, /* GL_COLOR_ATTACHMENT13 */
+ { 3444, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */
+ { 3470, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14 */
+ { 3492, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */
+ { 3518, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15 */
+ { 3540, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */
+ { 3566, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */
+ { 3591, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2 */
+ { 3612, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */
+ { 3637, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3 */
+ { 3658, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */
+ { 3683, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4 */
+ { 3704, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */
+ { 3729, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5 */
+ { 3750, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */
+ { 3775, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6 */
+ { 3796, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */
+ { 3821, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7 */
+ { 3842, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */
+ { 3867, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8 */
+ { 3888, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */
+ { 3913, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9 */
+ { 3934, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */
+ { 3959, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */
+ { 3979, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */
+ { 4000, 0x00001900 }, /* GL_COLOR_INDEX */
+ { 4015, 0x00001603 }, /* GL_COLOR_INDEXES */
+ { 4032, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */
+ { 4050, 0x00000B57 }, /* GL_COLOR_MATERIAL */
+ { 4068, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */
+ { 4091, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */
+ { 4119, 0x000080B1 }, /* GL_COLOR_MATRIX */
+ { 4135, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */
+ { 4155, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */
+ { 4183, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */
+ { 4215, 0x00008458 }, /* GL_COLOR_SUM */
+ { 4228, 0x00008458 }, /* GL_COLOR_SUM_ARB */
+ { 4245, 0x000080D0 }, /* GL_COLOR_TABLE */
+ { 4260, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */
+ { 4286, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */
+ { 4316, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */
+ { 4346, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */
+ { 4366, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */
+ { 4390, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */
+ { 4415, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */
+ { 4444, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */
+ { 4473, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */
+ { 4495, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */
+ { 4521, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */
+ { 4547, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */
+ { 4573, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */
+ { 4603, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */
+ { 4633, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */
+ { 4663, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */
+ { 4697, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */
+ { 4731, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
+ { 4761, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */
+ { 4795, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */
+ { 4829, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */
+ { 4853, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */
+ { 4881, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */
+ { 4909, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */
+ { 4930, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */
+ { 4955, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */
+ { 4976, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */
+ { 5001, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */
+ { 5026, 0x00000C23 }, /* GL_COLOR_WRITEMASK */
+ { 5045, 0x00008570 }, /* GL_COMBINE */
+ { 5056, 0x00008503 }, /* GL_COMBINE4 */
+ { 5068, 0x00008572 }, /* GL_COMBINE_ALPHA */
+ { 5085, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */
+ { 5106, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */
+ { 5127, 0x00008570 }, /* GL_COMBINE_ARB */
+ { 5142, 0x00008570 }, /* GL_COMBINE_EXT */
+ { 5157, 0x00008571 }, /* GL_COMBINE_RGB */
+ { 5172, 0x00008571 }, /* GL_COMBINE_RGB_ARB */
+ { 5191, 0x00008571 }, /* GL_COMBINE_RGB_EXT */
+ { 5210, 0x0000884E }, /* GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT */
+ { 5246, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */
+ { 5270, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */
+ { 5298, 0x00001300 }, /* GL_COMPILE */
+ { 5309, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */
+ { 5332, 0x00008B81 }, /* GL_COMPILE_STATUS */
+ { 5350, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */
+ { 5370, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */
+ { 5394, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */
+ { 5418, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */
+ { 5446, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */
+ { 5470, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */
+ { 5500, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */
+ { 5534, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */
+ { 5562, 0x000084ED }, /* GL_COMPRESSED_RGB */
+ { 5580, 0x000084EE }, /* GL_COMPRESSED_RGBA */
+ { 5599, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */
+ { 5622, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
+ { 5651, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
+ { 5684, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
+ { 5717, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
+ { 5750, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */
+ { 5772, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */
+ { 5800, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
+ { 5832, 0x00008C4A }, /* GL_COMPRESSED_SLUMINANCE */
+ { 5857, 0x00008C4B }, /* GL_COMPRESSED_SLUMINANCE_ALPHA */
+ { 5888, 0x00008C48 }, /* GL_COMPRESSED_SRGB */
+ { 5907, 0x00008C49 }, /* GL_COMPRESSED_SRGB_ALPHA */
+ { 5932, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */
+ { 5962, 0x0000911C }, /* GL_CONDITION_SATISFIED */
+ { 5985, 0x00008576 }, /* GL_CONSTANT */
+ { 5997, 0x00008003 }, /* GL_CONSTANT_ALPHA */
+ { 6015, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */
+ { 6037, 0x00008576 }, /* GL_CONSTANT_ARB */
+ { 6053, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */
+ { 6077, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */
+ { 6099, 0x00008001 }, /* GL_CONSTANT_COLOR */
+ { 6117, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */
+ { 6139, 0x00008576 }, /* GL_CONSTANT_EXT */
+ { 6155, 0x00008010 }, /* GL_CONVOLUTION_1D */
+ { 6173, 0x00008011 }, /* GL_CONVOLUTION_2D */
+ { 6191, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */
+ { 6219, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */
+ { 6250, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */
+ { 6277, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */
+ { 6308, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */
+ { 6335, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */
+ { 6366, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */
+ { 6394, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */
+ { 6426, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */
+ { 6448, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */
+ { 6474, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */
+ { 6496, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */
+ { 6522, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */
+ { 6543, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */
+ { 6568, 0x00008862 }, /* GL_COORD_REPLACE */
+ { 6585, 0x00008862 }, /* GL_COORD_REPLACE_ARB */
+ { 6606, 0x00008862 }, /* GL_COORD_REPLACE_NV */
+ { 6626, 0x00008862 }, /* GL_COORD_REPLACE_OES */
+ { 6647, 0x00001503 }, /* GL_COPY */
+ { 6655, 0x0000150C }, /* GL_COPY_INVERTED */
+ { 6672, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */
+ { 6692, 0x00008F36 }, /* GL_COPY_READ_BUFFER */
+ { 6712, 0x00008F37 }, /* GL_COPY_WRITE_BUFFER */
+ { 6733, 0x00000B44 }, /* GL_CULL_FACE */
+ { 6746, 0x00000B45 }, /* GL_CULL_FACE_MODE */
+ { 6764, 0x000081AA }, /* GL_CULL_VERTEX_EXT */
+ { 6783, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
+ { 6815, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
+ { 6850, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */
+ { 6871, 0x00000001 }, /* GL_CURRENT_BIT */
+ { 6886, 0x00000B00 }, /* GL_CURRENT_COLOR */
+ { 6903, 0x00008453 }, /* GL_CURRENT_FOG_COORD */
+ { 6924, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */
+ { 6950, 0x00000B01 }, /* GL_CURRENT_INDEX */
+ { 6967, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */
+ { 6989, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */
+ { 7017, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */
+ { 7038, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
+ { 7072, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */
+ { 7105, 0x00000B02 }, /* GL_CURRENT_NORMAL */
+ { 7123, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */
+ { 7153, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_OES */
+ { 7183, 0x00008B8D }, /* GL_CURRENT_PROGRAM */
+ { 7202, 0x00008865 }, /* GL_CURRENT_QUERY */
+ { 7219, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */
+ { 7240, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */
+ { 7264, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */
+ { 7291, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */
+ { 7315, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */
+ { 7342, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */
+ { 7375, 0x0000845F }, /* GL_CURRENT_RASTER_SECONDARY_COLOR */
+ { 7409, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
+ { 7442, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */
+ { 7469, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */
+ { 7495, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */
+ { 7520, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */
+ { 7549, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */
+ { 7571, 0x00000900 }, /* GL_CW */
+ { 7577, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */
+ { 7598, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */
+ { 7619, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */
+ { 7639, 0x00002101 }, /* GL_DECAL */
+ { 7648, 0x00001E03 }, /* GL_DECR */
+ { 7656, 0x00008508 }, /* GL_DECR_WRAP */
+ { 7669, 0x00008508 }, /* GL_DECR_WRAP_EXT */
+ { 7686, 0x00008B80 }, /* GL_DELETE_STATUS */
+ { 7703, 0x00001801 }, /* GL_DEPTH */
+ { 7712, 0x000088F0 }, /* GL_DEPTH24_STENCIL8 */
+ { 7732, 0x000088F0 }, /* GL_DEPTH24_STENCIL8_EXT */
+ { 7756, 0x000088F0 }, /* GL_DEPTH24_STENCIL8_OES */
+ { 7780, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT */
+ { 7800, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
+ { 7824, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_OES */
+ { 7848, 0x00000D1F }, /* GL_DEPTH_BIAS */
+ { 7862, 0x00000D56 }, /* GL_DEPTH_BITS */
+ { 7876, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
+ { 7896, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
+ { 7921, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
+ { 7941, 0x0000864F }, /* GL_DEPTH_CLAMP */
+ { 7956, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
+ { 7974, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
+ { 7995, 0x00001902 }, /* GL_DEPTH_COMPONENT */
+ { 8014, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
+ { 8035, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
+ { 8060, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_OES */
+ { 8085, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
+ { 8111, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
+ { 8132, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
+ { 8157, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_OES */
+ { 8182, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
+ { 8208, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
+ { 8229, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
+ { 8254, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_OES */
+ { 8279, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
+ { 8305, 0x00000B74 }, /* GL_DEPTH_FUNC */
+ { 8319, 0x00000B70 }, /* GL_DEPTH_RANGE */
+ { 8334, 0x00000D1E }, /* GL_DEPTH_SCALE */
+ { 8349, 0x000084F9 }, /* GL_DEPTH_STENCIL */
+ { 8366, 0x0000821A }, /* GL_DEPTH_STENCIL_ATTACHMENT */
+ { 8394, 0x000084F9 }, /* GL_DEPTH_STENCIL_EXT */
+ { 8415, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
+ { 8435, 0x000084F9 }, /* GL_DEPTH_STENCIL_OES */
+ { 8456, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
+ { 8484, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
+ { 8512, 0x00000B71 }, /* GL_DEPTH_TEST */
+ { 8526, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
+ { 8548, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
+ { 8574, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
+ { 8593, 0x00001201 }, /* GL_DIFFUSE */
+ { 8604, 0x00000BD0 }, /* GL_DITHER */
+ { 8614, 0x00000A02 }, /* GL_DOMAIN */
+ { 8624, 0x00001100 }, /* GL_DONT_CARE */
+ { 8637, 0x000086AE }, /* GL_DOT3_RGB */
+ { 8649, 0x000086AF }, /* GL_DOT3_RGBA */
+ { 8662, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
+ { 8679, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
+ { 8696, 0x000086AE }, /* GL_DOT3_RGB_ARB */
+ { 8712, 0x00008740 }, /* GL_DOT3_RGB_EXT */
+ { 8728, 0x0000140A }, /* GL_DOUBLE */
+ { 8738, 0x00000C32 }, /* GL_DOUBLEBUFFER */
+ { 8754, 0x00000C01 }, /* GL_DRAW_BUFFER */
+ { 8769, 0x00008825 }, /* GL_DRAW_BUFFER0 */
+ { 8785, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
+ { 8805, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
+ { 8825, 0x00008826 }, /* GL_DRAW_BUFFER1 */
+ { 8841, 0x0000882F }, /* GL_DRAW_BUFFER10 */
+ { 8858, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
+ { 8879, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
+ { 8900, 0x00008830 }, /* GL_DRAW_BUFFER11 */
+ { 8917, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
+ { 8938, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
+ { 8959, 0x00008831 }, /* GL_DRAW_BUFFER12 */
+ { 8976, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
+ { 8997, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
+ { 9018, 0x00008832 }, /* GL_DRAW_BUFFER13 */
+ { 9035, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
+ { 9056, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
+ { 9077, 0x00008833 }, /* GL_DRAW_BUFFER14 */
+ { 9094, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
+ { 9115, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
+ { 9136, 0x00008834 }, /* GL_DRAW_BUFFER15 */
+ { 9153, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
+ { 9174, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
+ { 9195, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
+ { 9215, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
+ { 9235, 0x00008827 }, /* GL_DRAW_BUFFER2 */
+ { 9251, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
+ { 9271, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
+ { 9291, 0x00008828 }, /* GL_DRAW_BUFFER3 */
+ { 9307, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
+ { 9327, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
+ { 9347, 0x00008829 }, /* GL_DRAW_BUFFER4 */
+ { 9363, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
+ { 9383, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
+ { 9403, 0x0000882A }, /* GL_DRAW_BUFFER5 */
+ { 9419, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
+ { 9439, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
+ { 9459, 0x0000882B }, /* GL_DRAW_BUFFER6 */
+ { 9475, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
+ { 9495, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
+ { 9515, 0x0000882C }, /* GL_DRAW_BUFFER7 */
+ { 9531, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
+ { 9551, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
+ { 9571, 0x0000882D }, /* GL_DRAW_BUFFER8 */
+ { 9587, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
+ { 9607, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
+ { 9627, 0x0000882E }, /* GL_DRAW_BUFFER9 */
+ { 9643, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
+ { 9663, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
+ { 9683, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER */
+ { 9703, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING */
+ { 9731, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
+ { 9763, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
+ { 9787, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
+ { 9807, 0x00000304 }, /* GL_DST_ALPHA */
+ { 9820, 0x00000306 }, /* GL_DST_COLOR */
+ { 9833, 0x0000877A }, /* GL_DU8DV8_ATI */
+ { 9847, 0x00008779 }, /* GL_DUDV_ATI */
+ { 9859, 0x000088EA }, /* GL_DYNAMIC_COPY */
+ { 9875, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
+ { 9895, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
+ { 9911, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
+ { 9931, 0x000088E9 }, /* GL_DYNAMIC_READ */
+ { 9947, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
+ { 9967, 0x00000B43 }, /* GL_EDGE_FLAG */
+ { 9980, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
+ { 9999, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
+ { 10033, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
+ { 10071, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
+ { 10098, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
+ { 10124, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
+ { 10148, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
+ { 10180, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
+ { 10216, 0x00001600 }, /* GL_EMISSION */
+ { 10228, 0x00002000 }, /* GL_ENABLE_BIT */
+ { 10242, 0x00000202 }, /* GL_EQUAL */
+ { 10251, 0x00001509 }, /* GL_EQUIV */
+ { 10260, 0x00010000 }, /* GL_EVAL_BIT */
+ { 10272, 0x00000800 }, /* GL_EXP */
+ { 10279, 0x00000801 }, /* GL_EXP2 */
+ { 10287, 0x00001F03 }, /* GL_EXTENSIONS */
+ { 10301, 0x00002400 }, /* GL_EYE_LINEAR */
+ { 10315, 0x00002502 }, /* GL_EYE_PLANE */
+ { 10328, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
+ { 10353, 0x0000855B }, /* GL_EYE_RADIAL_NV */
+ { 10370, 0x00000000 }, /* GL_FALSE */
+ { 10379, 0x00001101 }, /* GL_FASTEST */
+ { 10390, 0x00001C01 }, /* GL_FEEDBACK */
+ { 10402, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
+ { 10429, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
+ { 10453, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
+ { 10477, 0x00001B02 }, /* GL_FILL */
+ { 10485, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION */
+ { 10512, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION_EXT */
+ { 10543, 0x0000140C }, /* GL_FIXED */
+ { 10552, 0x0000140C }, /* GL_FIXED_OES */
+ { 10565, 0x00001D00 }, /* GL_FLAT */
+ { 10573, 0x00001406 }, /* GL_FLOAT */
+ { 10582, 0x00008B5A }, /* GL_FLOAT_MAT2 */
+ { 10596, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
+ { 10614, 0x00008B65 }, /* GL_FLOAT_MAT2x3 */
+ { 10630, 0x00008B66 }, /* GL_FLOAT_MAT2x4 */
+ { 10646, 0x00008B5B }, /* GL_FLOAT_MAT3 */
+ { 10660, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
+ { 10678, 0x00008B67 }, /* GL_FLOAT_MAT3x2 */
+ { 10694, 0x00008B68 }, /* GL_FLOAT_MAT3x4 */
+ { 10710, 0x00008B5C }, /* GL_FLOAT_MAT4 */
+ { 10724, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
+ { 10742, 0x00008B69 }, /* GL_FLOAT_MAT4x2 */
+ { 10758, 0x00008B6A }, /* GL_FLOAT_MAT4x3 */
+ { 10774, 0x00008B50 }, /* GL_FLOAT_VEC2 */
+ { 10788, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
+ { 10806, 0x00008B51 }, /* GL_FLOAT_VEC3 */
+ { 10820, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
+ { 10838, 0x00008B52 }, /* GL_FLOAT_VEC4 */
+ { 10852, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
+ { 10870, 0x00000B60 }, /* GL_FOG */
+ { 10877, 0x00000080 }, /* GL_FOG_BIT */
+ { 10888, 0x00000B66 }, /* GL_FOG_COLOR */
+ { 10901, 0x00008451 }, /* GL_FOG_COORD */
+ { 10914, 0x00008451 }, /* GL_FOG_COORDINATE */
+ { 10932, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
+ { 10956, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
+ { 10995, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
+ { 11038, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
+ { 11070, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
+ { 11101, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
+ { 11130, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
+ { 11155, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
+ { 11174, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
+ { 11208, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
+ { 11235, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
+ { 11261, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
+ { 11285, 0x00008450 }, /* GL_FOG_COORD_SRC */
+ { 11302, 0x00000B62 }, /* GL_FOG_DENSITY */
+ { 11317, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
+ { 11341, 0x00000B64 }, /* GL_FOG_END */
+ { 11352, 0x00000C54 }, /* GL_FOG_HINT */
+ { 11364, 0x00000B61 }, /* GL_FOG_INDEX */
+ { 11377, 0x00000B65 }, /* GL_FOG_MODE */
+ { 11389, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
+ { 11408, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
+ { 11433, 0x00000B63 }, /* GL_FOG_START */
+ { 11446, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
+ { 11464, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
+ { 11488, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
+ { 11507, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
+ { 11530, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
+ { 11565, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES */
+ { 11604, 0x00008D40 }, /* GL_FRAMEBUFFER */
+ { 11619, 0x00008215 }, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
+ { 11656, 0x00008214 }, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
+ { 11692, 0x00008210 }, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
+ { 11733, 0x00008211 }, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
+ { 11774, 0x00008216 }, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
+ { 11811, 0x00008213 }, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
+ { 11848, 0x00008DA7 }, /* GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB */
+ { 11886, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
+ { 11924, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
+ { 11966, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES */
+ { 12008, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
+ { 12046, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
+ { 12088, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES */
+ { 12130, 0x00008212 }, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
+ { 12165, 0x00008217 }, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
+ { 12204, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
+ { 12253, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES */
+ { 12302, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
+ { 12350, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
+ { 12402, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES */
+ { 12454, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
+ { 12494, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
+ { 12538, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
+ { 12578, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
+ { 12622, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES */
+ { 12666, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING */
+ { 12689, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
+ { 12716, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_OES */
+ { 12743, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE */
+ { 12767, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
+ { 12795, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_OES */
+ { 12823, 0x00008218 }, /* GL_FRAMEBUFFER_DEFAULT */
+ { 12846, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
+ { 12865, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
+ { 12902, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
+ { 12943, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES */
+ { 12984, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS */
+ { 13021, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
+ { 13062, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES */
+ { 13103, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
+ { 13141, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
+ { 13183, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_OES */
+ { 13225, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
+ { 13276, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
+ { 13314, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES */
+ { 13352, 0x00008DA9 }, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB */
+ { 13394, 0x00008DA8 }, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB */
+ { 13438, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
+ { 13483, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
+ { 13532, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES */
+ { 13581, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
+ { 13619, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT */
+ { 13661, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
+ { 13699, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
+ { 13741, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_OES */
+ { 13783, 0x00008D40 }, /* GL_FRAMEBUFFER_OES */
+ { 13802, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
+ { 13834, 0x00008219 }, /* GL_FRAMEBUFFER_UNDEFINED */
+ { 13859, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED */
+ { 13886, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
+ { 13917, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_OES */
+ { 13948, 0x00000404 }, /* GL_FRONT */
+ { 13957, 0x00000408 }, /* GL_FRONT_AND_BACK */
+ { 13975, 0x00000B46 }, /* GL_FRONT_FACE */
+ { 13989, 0x00000400 }, /* GL_FRONT_LEFT */
+ { 14003, 0x00000401 }, /* GL_FRONT_RIGHT */
+ { 14018, 0x00008006 }, /* GL_FUNC_ADD */
+ { 14030, 0x00008006 }, /* GL_FUNC_ADD_EXT */
+ { 14046, 0x00008006 }, /* GL_FUNC_ADD_OES */
+ { 14062, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
+ { 14087, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
+ { 14116, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_OES */
+ { 14145, 0x0000800A }, /* GL_FUNC_SUBTRACT */
+ { 14162, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
+ { 14183, 0x0000800A }, /* GL_FUNC_SUBTRACT_OES */
+ { 14204, 0x00008191 }, /* GL_GENERATE_MIPMAP */
+ { 14223, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
+ { 14247, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
+ { 14276, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
+ { 14300, 0x00008DDB }, /* GL_GEOMETRY_INPUT_TYPE_ARB */
+ { 14327, 0x00008DDC }, /* GL_GEOMETRY_OUTPUT_TYPE_ARB */
+ { 14355, 0x00008DD9 }, /* GL_GEOMETRY_SHADER_ARB */
+ { 14378, 0x00008DDA }, /* GL_GEOMETRY_VERTICES_OUT_ARB */
+ { 14407, 0x00000206 }, /* GL_GEQUAL */
+ { 14417, 0x00000204 }, /* GL_GREATER */
+ { 14428, 0x00001904 }, /* GL_GREEN */
+ { 14437, 0x00000D19 }, /* GL_GREEN_BIAS */
+ { 14451, 0x00000D53 }, /* GL_GREEN_BITS */
+ { 14465, 0x00008D95 }, /* GL_GREEN_INTEGER_EXT */
+ { 14486, 0x00000D18 }, /* GL_GREEN_SCALE */
+ { 14501, 0x0000140B }, /* GL_HALF_FLOAT */
+ { 14515, 0x00008D61 }, /* GL_HALF_FLOAT_OES */
+ { 14533, 0x00008DF2 }, /* GL_HIGH_FLOAT */
+ { 14547, 0x00008DF5 }, /* GL_HIGH_INT */
+ { 14559, 0x00008000 }, /* GL_HINT_BIT */
+ { 14571, 0x00008024 }, /* GL_HISTOGRAM */
+ { 14584, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
+ { 14608, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
+ { 14636, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
+ { 14659, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
+ { 14686, 0x00008024 }, /* GL_HISTOGRAM_EXT */
+ { 14703, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
+ { 14723, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
+ { 14747, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
+ { 14771, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
+ { 14799, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
+ { 14827, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
+ { 14859, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
+ { 14881, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
+ { 14907, 0x0000802D }, /* GL_HISTOGRAM_SINK */
+ { 14925, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
+ { 14947, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
+ { 14966, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
+ { 14989, 0x0000862A }, /* GL_IDENTITY_NV */
+ { 15004, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
+ { 15024, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT */
+ { 15060, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
+ { 15100, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE */
+ { 15134, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
+ { 15172, 0x00001E02 }, /* GL_INCR */
+ { 15180, 0x00008507 }, /* GL_INCR_WRAP */
+ { 15193, 0x00008507 }, /* GL_INCR_WRAP_EXT */
+ { 15210, 0x00008222 }, /* GL_INDEX */
+ { 15219, 0x00008077 }, /* GL_INDEX_ARRAY */
+ { 15234, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
+ { 15264, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
+ { 15298, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
+ { 15321, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
+ { 15343, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
+ { 15363, 0x00000D51 }, /* GL_INDEX_BITS */
+ { 15377, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
+ { 15398, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
+ { 15416, 0x00000C30 }, /* GL_INDEX_MODE */
+ { 15430, 0x00000D13 }, /* GL_INDEX_OFFSET */
+ { 15446, 0x00000D12 }, /* GL_INDEX_SHIFT */
+ { 15461, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
+ { 15480, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
+ { 15499, 0x00001404 }, /* GL_INT */
+ { 15506, 0x00008049 }, /* GL_INTENSITY */
+ { 15519, 0x0000804C }, /* GL_INTENSITY12 */
+ { 15534, 0x0000804C }, /* GL_INTENSITY12_EXT */
+ { 15553, 0x0000804D }, /* GL_INTENSITY16 */
+ { 15568, 0x00008D8B }, /* GL_INTENSITY16I_EXT */
+ { 15588, 0x00008D79 }, /* GL_INTENSITY16UI_EXT */
+ { 15609, 0x0000804D }, /* GL_INTENSITY16_EXT */
+ { 15628, 0x00008D85 }, /* GL_INTENSITY32I_EXT */
+ { 15648, 0x00008D73 }, /* GL_INTENSITY32UI_EXT */
+ { 15669, 0x0000804A }, /* GL_INTENSITY4 */
+ { 15683, 0x0000804A }, /* GL_INTENSITY4_EXT */
+ { 15701, 0x0000804B }, /* GL_INTENSITY8 */
+ { 15715, 0x00008D91 }, /* GL_INTENSITY8I_EXT */
+ { 15734, 0x00008D7F }, /* GL_INTENSITY8UI_EXT */
+ { 15754, 0x0000804B }, /* GL_INTENSITY8_EXT */
+ { 15772, 0x00008049 }, /* GL_INTENSITY_EXT */
+ { 15789, 0x00008C8C }, /* GL_INTERLEAVED_ATTRIBS_EXT */
+ { 15816, 0x00008575 }, /* GL_INTERPOLATE */
+ { 15831, 0x00008575 }, /* GL_INTERPOLATE_ARB */
+ { 15850, 0x00008575 }, /* GL_INTERPOLATE_EXT */
+ { 15869, 0x00008DF7 }, /* GL_INT_10_10_10_2_OES */
+ { 15891, 0x00008B53 }, /* GL_INT_VEC2 */
+ { 15903, 0x00008B53 }, /* GL_INT_VEC2_ARB */
+ { 15919, 0x00008B54 }, /* GL_INT_VEC3 */
+ { 15931, 0x00008B54 }, /* GL_INT_VEC3_ARB */
+ { 15947, 0x00008B55 }, /* GL_INT_VEC4 */
+ { 15959, 0x00008B55 }, /* GL_INT_VEC4_ARB */
+ { 15975, 0x00000500 }, /* GL_INVALID_ENUM */
+ { 15991, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION */
+ { 16024, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
+ { 16061, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_OES */
+ { 16098, 0x00000502 }, /* GL_INVALID_OPERATION */
+ { 16119, 0x00000501 }, /* GL_INVALID_VALUE */
+ { 16136, 0x0000862B }, /* GL_INVERSE_NV */
+ { 16150, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
+ { 16174, 0x0000150A }, /* GL_INVERT */
+ { 16184, 0x00001E00 }, /* GL_KEEP */
+ { 16192, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION */
+ { 16218, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION_EXT */
+ { 16248, 0x00000406 }, /* GL_LEFT */
+ { 16256, 0x00000203 }, /* GL_LEQUAL */
+ { 16266, 0x00000201 }, /* GL_LESS */
+ { 16274, 0x00004000 }, /* GL_LIGHT0 */
+ { 16284, 0x00004001 }, /* GL_LIGHT1 */
+ { 16294, 0x00004002 }, /* GL_LIGHT2 */
+ { 16304, 0x00004003 }, /* GL_LIGHT3 */
+ { 16314, 0x00004004 }, /* GL_LIGHT4 */
+ { 16324, 0x00004005 }, /* GL_LIGHT5 */
+ { 16334, 0x00004006 }, /* GL_LIGHT6 */
+ { 16344, 0x00004007 }, /* GL_LIGHT7 */
+ { 16354, 0x00000B50 }, /* GL_LIGHTING */
+ { 16366, 0x00000040 }, /* GL_LIGHTING_BIT */
+ { 16382, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
+ { 16405, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
+ { 16434, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
+ { 16467, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
+ { 16495, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
+ { 16519, 0x00001B01 }, /* GL_LINE */
+ { 16527, 0x00002601 }, /* GL_LINEAR */
+ { 16537, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
+ { 16559, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
+ { 16589, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
+ { 16620, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
+ { 16644, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
+ { 16669, 0x00000001 }, /* GL_LINES */
+ { 16678, 0x0000000A }, /* GL_LINES_ADJACENCY_ARB */
+ { 16701, 0x00000004 }, /* GL_LINE_BIT */
+ { 16713, 0x00000002 }, /* GL_LINE_LOOP */
+ { 16726, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
+ { 16746, 0x00000B20 }, /* GL_LINE_SMOOTH */
+ { 16761, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
+ { 16781, 0x00000B24 }, /* GL_LINE_STIPPLE */
+ { 16797, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
+ { 16821, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
+ { 16844, 0x00000003 }, /* GL_LINE_STRIP */
+ { 16858, 0x0000000B }, /* GL_LINE_STRIP_ADJACENCY_ARB */
+ { 16886, 0x00000702 }, /* GL_LINE_TOKEN */
+ { 16900, 0x00000B21 }, /* GL_LINE_WIDTH */
+ { 16914, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
+ { 16940, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
+ { 16960, 0x00008B82 }, /* GL_LINK_STATUS */
+ { 16975, 0x00000B32 }, /* GL_LIST_BASE */
+ { 16988, 0x00020000 }, /* GL_LIST_BIT */
+ { 17000, 0x00000B33 }, /* GL_LIST_INDEX */
+ { 17014, 0x00000B30 }, /* GL_LIST_MODE */
+ { 17027, 0x00000101 }, /* GL_LOAD */
+ { 17035, 0x00000BF1 }, /* GL_LOGIC_OP */
+ { 17047, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
+ { 17064, 0x00008CA1 }, /* GL_LOWER_LEFT */
+ { 17078, 0x00008DF0 }, /* GL_LOW_FLOAT */
+ { 17091, 0x00008DF3 }, /* GL_LOW_INT */
+ { 17102, 0x00001909 }, /* GL_LUMINANCE */
+ { 17115, 0x00008041 }, /* GL_LUMINANCE12 */
+ { 17130, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
+ { 17153, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
+ { 17180, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
+ { 17202, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
+ { 17228, 0x00008041 }, /* GL_LUMINANCE12_EXT */
+ { 17247, 0x00008042 }, /* GL_LUMINANCE16 */
+ { 17262, 0x00008D8C }, /* GL_LUMINANCE16I_EXT */
+ { 17282, 0x00008D7A }, /* GL_LUMINANCE16UI_EXT */
+ { 17303, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
+ { 17326, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
+ { 17353, 0x00008042 }, /* GL_LUMINANCE16_EXT */
+ { 17372, 0x00008D86 }, /* GL_LUMINANCE32I_EXT */
+ { 17392, 0x00008D74 }, /* GL_LUMINANCE32UI_EXT */
+ { 17413, 0x0000803F }, /* GL_LUMINANCE4 */
+ { 17427, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
+ { 17448, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
+ { 17473, 0x0000803F }, /* GL_LUMINANCE4_EXT */
+ { 17491, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
+ { 17512, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
+ { 17537, 0x00008040 }, /* GL_LUMINANCE8 */
+ { 17551, 0x00008D92 }, /* GL_LUMINANCE8I_EXT */
+ { 17570, 0x00008D80 }, /* GL_LUMINANCE8UI_EXT */
+ { 17590, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
+ { 17611, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
+ { 17636, 0x00008040 }, /* GL_LUMINANCE8_EXT */
+ { 17654, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
+ { 17673, 0x00008D8D }, /* GL_LUMINANCE_ALPHA16I_EXT */
+ { 17699, 0x00008D7B }, /* GL_LUMINANCE_ALPHA16UI_EXT */
+ { 17726, 0x00008D87 }, /* GL_LUMINANCE_ALPHA32I_EXT */
+ { 17752, 0x00008D75 }, /* GL_LUMINANCE_ALPHA32UI_EXT */
+ { 17779, 0x00008D93 }, /* GL_LUMINANCE_ALPHA8I_EXT */
+ { 17804, 0x00008D81 }, /* GL_LUMINANCE_ALPHA8UI_EXT */
+ { 17830, 0x00008D9D }, /* GL_LUMINANCE_ALPHA_INTEGER_EXT */
+ { 17861, 0x00008D9C }, /* GL_LUMINANCE_INTEGER_EXT */
+ { 17886, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
+ { 17902, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
+ { 17922, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
+ { 17944, 0x00000D91 }, /* GL_MAP1_INDEX */
+ { 17958, 0x00000D92 }, /* GL_MAP1_NORMAL */
+ { 17973, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
+ { 17997, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
+ { 18021, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
+ { 18045, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
+ { 18069, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
+ { 18086, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
+ { 18103, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
+ { 18131, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
+ { 18160, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
+ { 18189, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
+ { 18218, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
+ { 18247, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
+ { 18276, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
+ { 18305, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
+ { 18333, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
+ { 18361, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
+ { 18389, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
+ { 18417, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
+ { 18445, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
+ { 18473, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
+ { 18501, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
+ { 18529, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
+ { 18557, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
+ { 18573, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
+ { 18593, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
+ { 18615, 0x00000DB1 }, /* GL_MAP2_INDEX */
+ { 18629, 0x00000DB2 }, /* GL_MAP2_NORMAL */
+ { 18644, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
+ { 18668, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
+ { 18692, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
+ { 18716, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
+ { 18740, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
+ { 18757, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
+ { 18774, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
+ { 18802, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
+ { 18831, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
+ { 18860, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
+ { 18889, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
+ { 18918, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
+ { 18947, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
+ { 18976, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
+ { 19004, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
+ { 19032, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
+ { 19060, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
+ { 19088, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
+ { 19116, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
+ { 19144, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
+ { 19172, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
+ { 19200, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
+ { 19228, 0x00000D10 }, /* GL_MAP_COLOR */
+ { 19241, 0x00000010 }, /* GL_MAP_FLUSH_EXPLICIT_BIT */
+ { 19267, 0x00000008 }, /* GL_MAP_INVALIDATE_BUFFER_BIT */
+ { 19296, 0x00000004 }, /* GL_MAP_INVALIDATE_RANGE_BIT */
+ { 19324, 0x00000001 }, /* GL_MAP_READ_BIT */
+ { 19340, 0x00000D11 }, /* GL_MAP_STENCIL */
+ { 19355, 0x00000020 }, /* GL_MAP_UNSYNCHRONIZED_BIT */
+ { 19381, 0x00000002 }, /* GL_MAP_WRITE_BIT */
+ { 19398, 0x000088C0 }, /* GL_MATRIX0_ARB */
+ { 19413, 0x00008630 }, /* GL_MATRIX0_NV */
+ { 19427, 0x000088CA }, /* GL_MATRIX10_ARB */
+ { 19443, 0x000088CB }, /* GL_MATRIX11_ARB */
+ { 19459, 0x000088CC }, /* GL_MATRIX12_ARB */
+ { 19475, 0x000088CD }, /* GL_MATRIX13_ARB */
+ { 19491, 0x000088CE }, /* GL_MATRIX14_ARB */
+ { 19507, 0x000088CF }, /* GL_MATRIX15_ARB */
+ { 19523, 0x000088D0 }, /* GL_MATRIX16_ARB */
+ { 19539, 0x000088D1 }, /* GL_MATRIX17_ARB */
+ { 19555, 0x000088D2 }, /* GL_MATRIX18_ARB */
+ { 19571, 0x000088D3 }, /* GL_MATRIX19_ARB */
+ { 19587, 0x000088C1 }, /* GL_MATRIX1_ARB */
+ { 19602, 0x00008631 }, /* GL_MATRIX1_NV */
+ { 19616, 0x000088D4 }, /* GL_MATRIX20_ARB */
+ { 19632, 0x000088D5 }, /* GL_MATRIX21_ARB */
+ { 19648, 0x000088D6 }, /* GL_MATRIX22_ARB */
+ { 19664, 0x000088D7 }, /* GL_MATRIX23_ARB */
+ { 19680, 0x000088D8 }, /* GL_MATRIX24_ARB */
+ { 19696, 0x000088D9 }, /* GL_MATRIX25_ARB */
+ { 19712, 0x000088DA }, /* GL_MATRIX26_ARB */
+ { 19728, 0x000088DB }, /* GL_MATRIX27_ARB */
+ { 19744, 0x000088DC }, /* GL_MATRIX28_ARB */
+ { 19760, 0x000088DD }, /* GL_MATRIX29_ARB */
+ { 19776, 0x000088C2 }, /* GL_MATRIX2_ARB */
+ { 19791, 0x00008632 }, /* GL_MATRIX2_NV */
+ { 19805, 0x000088DE }, /* GL_MATRIX30_ARB */
+ { 19821, 0x000088DF }, /* GL_MATRIX31_ARB */
+ { 19837, 0x000088C3 }, /* GL_MATRIX3_ARB */
+ { 19852, 0x00008633 }, /* GL_MATRIX3_NV */
+ { 19866, 0x000088C4 }, /* GL_MATRIX4_ARB */
+ { 19881, 0x00008634 }, /* GL_MATRIX4_NV */
+ { 19895, 0x000088C5 }, /* GL_MATRIX5_ARB */
+ { 19910, 0x00008635 }, /* GL_MATRIX5_NV */
+ { 19924, 0x000088C6 }, /* GL_MATRIX6_ARB */
+ { 19939, 0x00008636 }, /* GL_MATRIX6_NV */
+ { 19953, 0x000088C7 }, /* GL_MATRIX7_ARB */
+ { 19968, 0x00008637 }, /* GL_MATRIX7_NV */
+ { 19982, 0x000088C8 }, /* GL_MATRIX8_ARB */
+ { 19997, 0x000088C9 }, /* GL_MATRIX9_ARB */
+ { 20012, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
+ { 20038, 0x00008B9E }, /* GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES */
+ { 20079, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_OES */
+ { 20105, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
+ { 20139, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_OES */
+ { 20173, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
+ { 20204, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_OES */
+ { 20235, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
+ { 20268, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_OES */
+ { 20301, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
+ { 20332, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_OES */
+ { 20363, 0x00000BA0 }, /* GL_MATRIX_MODE */
+ { 20378, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
+ { 20400, 0x00008840 }, /* GL_MATRIX_PALETTE_OES */
+ { 20422, 0x00008008 }, /* GL_MAX */
+ { 20429, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
+ { 20452, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE_OES */
+ { 20479, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
+ { 20511, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
+ { 20537, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
+ { 20570, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
+ { 20596, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ { 20630, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
+ { 20649, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS */
+ { 20674, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
+ { 20703, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
+ { 20735, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
+ { 20771, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
+ { 20807, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
+ { 20847, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
+ { 20873, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
+ { 20903, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
+ { 20928, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
+ { 20957, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
+ { 20986, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
+ { 21019, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES */
+ { 21052, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
+ { 21072, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
+ { 21096, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
+ { 21120, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
+ { 21144, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
+ { 21169, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
+ { 21187, 0x00008008 }, /* GL_MAX_EXT */
+ { 21198, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
+ { 21233, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
+ { 21272, 0x00008DFD }, /* GL_MAX_FRAGMENT_UNIFORM_VECTORS */
+ { 21304, 0x00008DE0 }, /* GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB */
+ { 21340, 0x00008C29 }, /* GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB */
+ { 21380, 0x00008DE1 }, /* GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB */
+ { 21424, 0x00008DDF }, /* GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB */
+ { 21463, 0x00008DDD }, /* GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB */
+ { 21502, 0x00000D31 }, /* GL_MAX_LIGHTS */
+ { 21516, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
+ { 21536, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
+ { 21574, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
+ { 21603, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
+ { 21627, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
+ { 21655, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_OES */
+ { 21683, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
+ { 21706, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
+ { 21743, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ { 21779, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
+ { 21806, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
+ { 21835, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
+ { 21869, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
+ { 21905, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
+ { 21932, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
+ { 21964, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
+ { 22000, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
+ { 22029, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
+ { 22058, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
+ { 22086, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
+ { 22124, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ { 22168, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ { 22211, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
+ { 22245, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ { 22284, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
+ { 22321, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ { 22359, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ { 22402, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ { 22445, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
+ { 22475, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
+ { 22506, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
+ { 22542, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ { 22578, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
+ { 22608, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
+ { 22642, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
+ { 22675, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE */
+ { 22700, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
+ { 22729, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_OES */
+ { 22758, 0x00008D57 }, /* GL_MAX_SAMPLES */
+ { 22773, 0x00008D57 }, /* GL_MAX_SAMPLES_EXT */
+ { 22792, 0x00009111 }, /* GL_MAX_SERVER_WAIT_TIMEOUT */
+ { 22819, 0x00008504 }, /* GL_MAX_SHININESS_NV */
+ { 22839, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
+ { 22863, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
+ { 22885, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
+ { 22911, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
+ { 22938, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
+ { 22969, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
+ { 22993, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS_EXT */
+ { 23021, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
+ { 23055, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
+ { 23075, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
+ { 23102, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
+ { 23123, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
+ { 23148, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
+ { 23173, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
+ { 23208, 0x00008C8A }, /* GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT */
+ { 23261, 0x00008C8B }, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT */
+ { 23308, 0x00008C80 }, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT */
+ { 23358, 0x00008B4B }, /* GL_MAX_VARYING_COMPONENTS */
+ { 23384, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
+ { 23406, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
+ { 23432, 0x00008DFC }, /* GL_MAX_VARYING_VECTORS */
+ { 23455, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
+ { 23477, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
+ { 23503, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
+ { 23537, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
+ { 23575, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
+ { 23608, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
+ { 23645, 0x00008DFB }, /* GL_MAX_VERTEX_UNIFORM_VECTORS */
+ { 23675, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
+ { 23699, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_OES */
+ { 23723, 0x00008DDE }, /* GL_MAX_VERTEX_VARYING_COMPONENTS_ARB */
+ { 23760, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
+ { 23781, 0x00008DF1 }, /* GL_MEDIUM_FLOAT */
+ { 23797, 0x00008DF4 }, /* GL_MEDIUM_INT */
+ { 23811, 0x00008007 }, /* GL_MIN */
+ { 23818, 0x0000802E }, /* GL_MINMAX */
+ { 23828, 0x0000802E }, /* GL_MINMAX_EXT */
+ { 23842, 0x0000802F }, /* GL_MINMAX_FORMAT */
+ { 23859, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
+ { 23880, 0x00008030 }, /* GL_MINMAX_SINK */
+ { 23895, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
+ { 23914, 0x00008007 }, /* GL_MIN_EXT */
+ { 23925, 0x00008370 }, /* GL_MIRRORED_REPEAT */
+ { 23944, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
+ { 23967, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
+ { 23990, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
+ { 24010, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
+ { 24030, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
+ { 24060, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
+ { 24088, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
+ { 24116, 0x00001700 }, /* GL_MODELVIEW */
+ { 24129, 0x00001700 }, /* GL_MODELVIEW0_ARB */
+ { 24147, 0x0000872A }, /* GL_MODELVIEW10_ARB */
+ { 24166, 0x0000872B }, /* GL_MODELVIEW11_ARB */
+ { 24185, 0x0000872C }, /* GL_MODELVIEW12_ARB */
+ { 24204, 0x0000872D }, /* GL_MODELVIEW13_ARB */
+ { 24223, 0x0000872E }, /* GL_MODELVIEW14_ARB */
+ { 24242, 0x0000872F }, /* GL_MODELVIEW15_ARB */
+ { 24261, 0x00008730 }, /* GL_MODELVIEW16_ARB */
+ { 24280, 0x00008731 }, /* GL_MODELVIEW17_ARB */
+ { 24299, 0x00008732 }, /* GL_MODELVIEW18_ARB */
+ { 24318, 0x00008733 }, /* GL_MODELVIEW19_ARB */
+ { 24337, 0x0000850A }, /* GL_MODELVIEW1_ARB */
+ { 24355, 0x00008734 }, /* GL_MODELVIEW20_ARB */
+ { 24374, 0x00008735 }, /* GL_MODELVIEW21_ARB */
+ { 24393, 0x00008736 }, /* GL_MODELVIEW22_ARB */
+ { 24412, 0x00008737 }, /* GL_MODELVIEW23_ARB */
+ { 24431, 0x00008738 }, /* GL_MODELVIEW24_ARB */
+ { 24450, 0x00008739 }, /* GL_MODELVIEW25_ARB */
+ { 24469, 0x0000873A }, /* GL_MODELVIEW26_ARB */
+ { 24488, 0x0000873B }, /* GL_MODELVIEW27_ARB */
+ { 24507, 0x0000873C }, /* GL_MODELVIEW28_ARB */
+ { 24526, 0x0000873D }, /* GL_MODELVIEW29_ARB */
+ { 24545, 0x00008722 }, /* GL_MODELVIEW2_ARB */
+ { 24563, 0x0000873E }, /* GL_MODELVIEW30_ARB */
+ { 24582, 0x0000873F }, /* GL_MODELVIEW31_ARB */
+ { 24601, 0x00008723 }, /* GL_MODELVIEW3_ARB */
+ { 24619, 0x00008724 }, /* GL_MODELVIEW4_ARB */
+ { 24637, 0x00008725 }, /* GL_MODELVIEW5_ARB */
+ { 24655, 0x00008726 }, /* GL_MODELVIEW6_ARB */
+ { 24673, 0x00008727 }, /* GL_MODELVIEW7_ARB */
+ { 24691, 0x00008728 }, /* GL_MODELVIEW8_ARB */
+ { 24709, 0x00008729 }, /* GL_MODELVIEW9_ARB */
+ { 24727, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
+ { 24747, 0x0000898D }, /* GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES */
+ { 24789, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
+ { 24816, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
+ { 24841, 0x00002100 }, /* GL_MODULATE */
+ { 24853, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
+ { 24873, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
+ { 24900, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
+ { 24925, 0x00000103 }, /* GL_MULT */
+ { 24933, 0x0000809D }, /* GL_MULTISAMPLE */
+ { 24948, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
+ { 24968, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
+ { 24987, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
+ { 25006, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
+ { 25030, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
+ { 25053, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
+ { 25083, 0x00002A25 }, /* GL_N3F_V3F */
+ { 25094, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
+ { 25114, 0x0000150E }, /* GL_NAND */
+ { 25122, 0x00002600 }, /* GL_NEAREST */
+ { 25133, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
+ { 25164, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
+ { 25196, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
+ { 25221, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
+ { 25247, 0x00000200 }, /* GL_NEVER */
+ { 25256, 0x00001102 }, /* GL_NICEST */
+ { 25266, 0x00000000 }, /* GL_NONE */
+ { 25274, 0x00000000 }, /* GL_NONE_OES */
+ { 25286, 0x00001505 }, /* GL_NOOP */
+ { 25294, 0x00001508 }, /* GL_NOR */
+ { 25301, 0x00000BA1 }, /* GL_NORMALIZE */
+ { 25314, 0x00008075 }, /* GL_NORMAL_ARRAY */
+ { 25330, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
+ { 25361, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
+ { 25396, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
+ { 25420, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
+ { 25443, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
+ { 25464, 0x00008511 }, /* GL_NORMAL_MAP */
+ { 25478, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
+ { 25496, 0x00008511 }, /* GL_NORMAL_MAP_NV */
+ { 25513, 0x00008511 }, /* GL_NORMAL_MAP_OES */
+ { 25531, 0x00000205 }, /* GL_NOTEQUAL */
+ { 25543, 0x00000000 }, /* GL_NO_ERROR */
+ { 25555, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
+ { 25589, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
+ { 25627, 0x000087FE }, /* GL_NUM_PROGRAM_BINARY_FORMATS_OES */
+ { 25661, 0x00008DF9 }, /* GL_NUM_SHADER_BINARY_FORMATS */
+ { 25690, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
+ { 25722, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
+ { 25764, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
+ { 25794, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
+ { 25834, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
+ { 25865, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
+ { 25894, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
+ { 25922, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
+ { 25952, 0x00002401 }, /* GL_OBJECT_LINEAR */
+ { 25969, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
+ { 25995, 0x00002501 }, /* GL_OBJECT_PLANE */
+ { 26011, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
+ { 26046, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
+ { 26068, 0x00009112 }, /* GL_OBJECT_TYPE */
+ { 26083, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
+ { 26102, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
+ { 26132, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
+ { 26153, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
+ { 26181, 0x00000001 }, /* GL_ONE */
+ { 26188, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
+ { 26216, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
+ { 26248, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
+ { 26276, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
+ { 26308, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
+ { 26331, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
+ { 26354, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
+ { 26377, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
+ { 26400, 0x00008598 }, /* GL_OPERAND0_ALPHA */
+ { 26418, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
+ { 26440, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
+ { 26462, 0x00008590 }, /* GL_OPERAND0_RGB */
+ { 26478, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
+ { 26498, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
+ { 26518, 0x00008599 }, /* GL_OPERAND1_ALPHA */
+ { 26536, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
+ { 26558, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
+ { 26580, 0x00008591 }, /* GL_OPERAND1_RGB */
+ { 26596, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
+ { 26616, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
+ { 26636, 0x0000859A }, /* GL_OPERAND2_ALPHA */
+ { 26654, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
+ { 26676, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
+ { 26698, 0x00008592 }, /* GL_OPERAND2_RGB */
+ { 26714, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
+ { 26734, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
+ { 26754, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
+ { 26775, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
+ { 26794, 0x00001507 }, /* GL_OR */
+ { 26800, 0x00000A01 }, /* GL_ORDER */
+ { 26809, 0x0000150D }, /* GL_OR_INVERTED */
+ { 26824, 0x0000150B }, /* GL_OR_REVERSE */
+ { 26838, 0x00000505 }, /* GL_OUT_OF_MEMORY */
+ { 26855, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
+ { 26873, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
+ { 26894, 0x00008758 }, /* GL_PACK_INVERT_MESA */
+ { 26914, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
+ { 26932, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
+ { 26951, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
+ { 26971, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
+ { 26991, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
+ { 27009, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
+ { 27028, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
+ { 27053, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
+ { 27077, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
+ { 27098, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
+ { 27120, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
+ { 27142, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
+ { 27167, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
+ { 27191, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
+ { 27212, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
+ { 27234, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
+ { 27256, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
+ { 27278, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
+ { 27309, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
+ { 27329, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
+ { 27354, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
+ { 27374, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
+ { 27399, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
+ { 27419, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
+ { 27444, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
+ { 27464, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
+ { 27489, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
+ { 27509, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
+ { 27534, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
+ { 27554, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
+ { 27579, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
+ { 27599, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
+ { 27624, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
+ { 27644, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
+ { 27669, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
+ { 27689, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
+ { 27714, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
+ { 27734, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
+ { 27759, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
+ { 27777, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER */
+ { 27798, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING */
+ { 27827, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
+ { 27860, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
+ { 27885, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER */
+ { 27908, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
+ { 27939, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
+ { 27974, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
+ { 28001, 0x00001B00 }, /* GL_POINT */
+ { 28010, 0x00000000 }, /* GL_POINTS */
+ { 28020, 0x00000002 }, /* GL_POINT_BIT */
+ { 28033, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
+ { 28063, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
+ { 28097, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
+ { 28131, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
+ { 28166, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
+ { 28195, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
+ { 28228, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
+ { 28261, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
+ { 28295, 0x00000B11 }, /* GL_POINT_SIZE */
+ { 28309, 0x00008B9F }, /* GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES */
+ { 28348, 0x00008B9C }, /* GL_POINT_SIZE_ARRAY_OES */
+ { 28372, 0x0000898C }, /* GL_POINT_SIZE_ARRAY_POINTER_OES */
+ { 28404, 0x0000898B }, /* GL_POINT_SIZE_ARRAY_STRIDE_OES */
+ { 28435, 0x0000898A }, /* GL_POINT_SIZE_ARRAY_TYPE_OES */
+ { 28464, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
+ { 28490, 0x00008127 }, /* GL_POINT_SIZE_MAX */
+ { 28508, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
+ { 28530, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
+ { 28552, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
+ { 28575, 0x00008126 }, /* GL_POINT_SIZE_MIN */
+ { 28593, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
+ { 28615, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
+ { 28637, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
+ { 28660, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
+ { 28680, 0x00000B10 }, /* GL_POINT_SMOOTH */
+ { 28696, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
+ { 28717, 0x00008861 }, /* GL_POINT_SPRITE */
+ { 28733, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
+ { 28753, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
+ { 28782, 0x00008861 }, /* GL_POINT_SPRITE_NV */
+ { 28801, 0x00008861 }, /* GL_POINT_SPRITE_OES */
+ { 28821, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
+ { 28847, 0x00000701 }, /* GL_POINT_TOKEN */
+ { 28862, 0x00000009 }, /* GL_POLYGON */
+ { 28873, 0x00000008 }, /* GL_POLYGON_BIT */
+ { 28888, 0x00000B40 }, /* GL_POLYGON_MODE */
+ { 28904, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
+ { 28927, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
+ { 28952, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
+ { 28975, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
+ { 28998, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
+ { 29022, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
+ { 29046, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
+ { 29064, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
+ { 29087, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
+ { 29106, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
+ { 29129, 0x00000703 }, /* GL_POLYGON_TOKEN */
+ { 29146, 0x00001203 }, /* GL_POSITION */
+ { 29158, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
+ { 29190, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
+ { 29226, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
+ { 29259, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
+ { 29296, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
+ { 29327, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
+ { 29362, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
+ { 29394, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
+ { 29430, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
+ { 29463, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
+ { 29495, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
+ { 29531, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
+ { 29564, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
+ { 29601, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
+ { 29631, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
+ { 29665, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
+ { 29696, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
+ { 29731, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
+ { 29762, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
+ { 29797, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
+ { 29829, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
+ { 29865, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
+ { 29895, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
+ { 29929, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
+ { 29960, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
+ { 29995, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
+ { 30027, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
+ { 30058, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
+ { 30093, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
+ { 30125, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
+ { 30161, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
+ { 30190, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
+ { 30223, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
+ { 30253, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
+ { 30287, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
+ { 30326, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
+ { 30359, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
+ { 30399, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
+ { 30433, 0x00008578 }, /* GL_PREVIOUS */
+ { 30445, 0x00008578 }, /* GL_PREVIOUS_ARB */
+ { 30461, 0x00008578 }, /* GL_PREVIOUS_EXT */
+ { 30477, 0x00008577 }, /* GL_PRIMARY_COLOR */
+ { 30494, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
+ { 30515, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
+ { 30536, 0x00008C87 }, /* GL_PRIMITIVES_GENERATED_EXT */
+ { 30564, 0x00008559 }, /* GL_PRIMITIVE_RESTART_INDEX_NV */
+ { 30594, 0x00008558 }, /* GL_PRIMITIVE_RESTART_NV */
+ { 30618, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
+ { 30651, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ { 30683, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
+ { 30706, 0x000087FF }, /* GL_PROGRAM_BINARY_FORMATS_OES */
+ { 30736, 0x00008741 }, /* GL_PROGRAM_BINARY_LENGTH_OES */
+ { 30765, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
+ { 30788, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
+ { 30818, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
+ { 30847, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
+ { 30875, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
+ { 30897, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
+ { 30925, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
+ { 30953, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
+ { 30975, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
+ { 30996, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ { 31036, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ { 31075, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
+ { 31105, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ { 31140, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
+ { 31173, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ { 31207, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ { 31246, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ { 31285, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
+ { 31307, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
+ { 31333, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
+ { 31357, 0x00008642 }, /* GL_PROGRAM_POINT_SIZE_ARB */
+ { 31383, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
+ { 31406, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
+ { 31428, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
+ { 31449, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
+ { 31470, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
+ { 31497, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
+ { 31529, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ { 31561, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
+ { 31596, 0x00001701 }, /* GL_PROJECTION */
+ { 31610, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
+ { 31631, 0x0000898E }, /* GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES */
+ { 31674, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
+ { 31700, 0x00008E4F }, /* GL_PROVOKING_VERTEX */
+ { 31720, 0x00008E4F }, /* GL_PROVOKING_VERTEX_EXT */
+ { 31744, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
+ { 31765, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
+ { 31784, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
+ { 31807, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
+ { 31846, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
+ { 31884, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
+ { 31904, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
+ { 31934, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
+ { 31958, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
+ { 31978, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
+ { 32008, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
+ { 32032, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
+ { 32052, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
+ { 32085, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
+ { 32111, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
+ { 32141, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
+ { 32172, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
+ { 32202, 0x00008A1D }, /* GL_PURGEABLE_APPLE */
+ { 32221, 0x00002003 }, /* GL_Q */
+ { 32226, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
+ { 32251, 0x00000007 }, /* GL_QUADS */
+ { 32260, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
+ { 32304, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT */
+ { 32352, 0x00008614 }, /* GL_QUAD_MESH_SUN */
+ { 32369, 0x00000008 }, /* GL_QUAD_STRIP */
+ { 32383, 0x00008E16 }, /* GL_QUERY_BY_REGION_NO_WAIT_NV */
+ { 32413, 0x00008E15 }, /* GL_QUERY_BY_REGION_WAIT_NV */
+ { 32440, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
+ { 32462, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
+ { 32488, 0x00008E14 }, /* GL_QUERY_NO_WAIT_NV */
+ { 32508, 0x00008866 }, /* GL_QUERY_RESULT */
+ { 32524, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
+ { 32544, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
+ { 32570, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
+ { 32600, 0x00008E13 }, /* GL_QUERY_WAIT_NV */
+ { 32617, 0x00002002 }, /* GL_R */
+ { 32622, 0x00002A10 }, /* GL_R3_G3_B2 */
+ { 32634, 0x00008C89 }, /* GL_RASTERIZER_DISCARD_EXT */
+ { 32660, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
+ { 32693, 0x00000C02 }, /* GL_READ_BUFFER */
+ { 32708, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER */
+ { 32728, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING */
+ { 32756, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
+ { 32788, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
+ { 32812, 0x000088B8 }, /* GL_READ_ONLY */
+ { 32825, 0x000088B8 }, /* GL_READ_ONLY_ARB */
+ { 32842, 0x000088BA }, /* GL_READ_WRITE */
+ { 32856, 0x000088BA }, /* GL_READ_WRITE_ARB */
+ { 32874, 0x00001903 }, /* GL_RED */
+ { 32881, 0x00008016 }, /* GL_REDUCE */
+ { 32891, 0x00008016 }, /* GL_REDUCE_EXT */
+ { 32905, 0x00000D15 }, /* GL_RED_BIAS */
+ { 32917, 0x00000D52 }, /* GL_RED_BITS */
+ { 32929, 0x00008D94 }, /* GL_RED_INTEGER_EXT */
+ { 32948, 0x00000D14 }, /* GL_RED_SCALE */
+ { 32961, 0x00008512 }, /* GL_REFLECTION_MAP */
+ { 32979, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
+ { 33001, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
+ { 33022, 0x00008512 }, /* GL_REFLECTION_MAP_OES */
+ { 33044, 0x00008A19 }, /* GL_RELEASED_APPLE */
+ { 33062, 0x00001C00 }, /* GL_RENDER */
+ { 33072, 0x00008D41 }, /* GL_RENDERBUFFER */
+ { 33088, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE */
+ { 33115, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE_OES */
+ { 33146, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING */
+ { 33170, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
+ { 33198, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_OES */
+ { 33226, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE */
+ { 33252, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE_OES */
+ { 33282, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE */
+ { 33309, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE_OES */
+ { 33340, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
+ { 33360, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE */
+ { 33387, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE_OES */
+ { 33418, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT */
+ { 33441, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
+ { 33468, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_OES */
+ { 33495, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
+ { 33527, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
+ { 33563, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_OES */
+ { 33599, 0x00008D41 }, /* GL_RENDERBUFFER_OES */
+ { 33619, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE */
+ { 33644, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE_OES */
+ { 33673, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES */
+ { 33697, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES_EXT */
+ { 33725, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE */
+ { 33754, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE_OES */
+ { 33787, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH */
+ { 33809, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
+ { 33835, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_OES */
+ { 33861, 0x00001F01 }, /* GL_RENDERER */
+ { 33873, 0x00000C40 }, /* GL_RENDER_MODE */
+ { 33888, 0x00002901 }, /* GL_REPEAT */
+ { 33898, 0x00001E01 }, /* GL_REPLACE */
+ { 33909, 0x00008062 }, /* GL_REPLACE_EXT */
+ { 33924, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
+ { 33947, 0x0000803A }, /* GL_RESCALE_NORMAL */
+ { 33965, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
+ { 33987, 0x00008A1B }, /* GL_RETAINED_APPLE */
+ { 34005, 0x00000102 }, /* GL_RETURN */
+ { 34015, 0x00001907 }, /* GL_RGB */
+ { 34022, 0x00008052 }, /* GL_RGB10 */
+ { 34031, 0x00008059 }, /* GL_RGB10_A2 */
+ { 34043, 0x00008059 }, /* GL_RGB10_A2_EXT */
+ { 34059, 0x00008052 }, /* GL_RGB10_EXT */
+ { 34072, 0x00008053 }, /* GL_RGB12 */
+ { 34081, 0x00008053 }, /* GL_RGB12_EXT */
+ { 34094, 0x00008054 }, /* GL_RGB16 */
+ { 34103, 0x00008D89 }, /* GL_RGB16I_EXT */
+ { 34117, 0x00008D77 }, /* GL_RGB16UI_EXT */
+ { 34132, 0x00008054 }, /* GL_RGB16_EXT */
+ { 34145, 0x0000804E }, /* GL_RGB2_EXT */
+ { 34157, 0x00008D83 }, /* GL_RGB32I_EXT */
+ { 34171, 0x00008D71 }, /* GL_RGB32UI_EXT */
+ { 34186, 0x0000804F }, /* GL_RGB4 */
+ { 34194, 0x0000804F }, /* GL_RGB4_EXT */
+ { 34206, 0x000083A1 }, /* GL_RGB4_S3TC */
+ { 34219, 0x00008050 }, /* GL_RGB5 */
+ { 34227, 0x00008D62 }, /* GL_RGB565 */
+ { 34237, 0x00008D62 }, /* GL_RGB565_OES */
+ { 34251, 0x00008057 }, /* GL_RGB5_A1 */
+ { 34262, 0x00008057 }, /* GL_RGB5_A1_EXT */
+ { 34277, 0x00008057 }, /* GL_RGB5_A1_OES */
+ { 34292, 0x00008050 }, /* GL_RGB5_EXT */
+ { 34304, 0x00008051 }, /* GL_RGB8 */
+ { 34312, 0x00008D8F }, /* GL_RGB8I_EXT */
+ { 34325, 0x00008D7D }, /* GL_RGB8UI_EXT */
+ { 34339, 0x00008051 }, /* GL_RGB8_EXT */
+ { 34351, 0x00008051 }, /* GL_RGB8_OES */
+ { 34363, 0x00001908 }, /* GL_RGBA */
+ { 34371, 0x0000805A }, /* GL_RGBA12 */
+ { 34381, 0x0000805A }, /* GL_RGBA12_EXT */
+ { 34395, 0x0000805B }, /* GL_RGBA16 */
+ { 34405, 0x00008D88 }, /* GL_RGBA16I_EXT */
+ { 34420, 0x00008D76 }, /* GL_RGBA16UI_EXT */
+ { 34436, 0x0000805B }, /* GL_RGBA16_EXT */
+ { 34450, 0x00008055 }, /* GL_RGBA2 */
+ { 34459, 0x00008055 }, /* GL_RGBA2_EXT */
+ { 34472, 0x00008D82 }, /* GL_RGBA32I_EXT */
+ { 34487, 0x00008D70 }, /* GL_RGBA32UI_EXT */
+ { 34503, 0x00008056 }, /* GL_RGBA4 */
+ { 34512, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
+ { 34531, 0x00008056 }, /* GL_RGBA4_EXT */
+ { 34544, 0x00008056 }, /* GL_RGBA4_OES */
+ { 34557, 0x000083A3 }, /* GL_RGBA4_S3TC */
+ { 34571, 0x00008058 }, /* GL_RGBA8 */
+ { 34580, 0x00008D8E }, /* GL_RGBA8I_EXT */
+ { 34594, 0x00008D7C }, /* GL_RGBA8UI_EXT */
+ { 34609, 0x00008058 }, /* GL_RGBA8_EXT */
+ { 34622, 0x00008058 }, /* GL_RGBA8_OES */
+ { 34635, 0x00008F97 }, /* GL_RGBA8_SNORM */
+ { 34650, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
+ { 34668, 0x00008D99 }, /* GL_RGBA_INTEGER_EXT */
+ { 34688, 0x00008D9E }, /* GL_RGBA_INTEGER_MODE_EXT */
+ { 34713, 0x00000C31 }, /* GL_RGBA_MODE */
+ { 34726, 0x000083A2 }, /* GL_RGBA_S3TC */
+ { 34739, 0x00008F93 }, /* GL_RGBA_SNORM */
+ { 34753, 0x00008D98 }, /* GL_RGB_INTEGER_EXT */
+ { 34772, 0x000083A0 }, /* GL_RGB_S3TC */
+ { 34784, 0x00008573 }, /* GL_RGB_SCALE */
+ { 34797, 0x00008573 }, /* GL_RGB_SCALE_ARB */
+ { 34814, 0x00008573 }, /* GL_RGB_SCALE_EXT */
+ { 34831, 0x00000407 }, /* GL_RIGHT */
+ { 34840, 0x00002000 }, /* GL_S */
+ { 34845, 0x00008B5D }, /* GL_SAMPLER_1D */
+ { 34859, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
+ { 34880, 0x00008B5E }, /* GL_SAMPLER_2D */
+ { 34894, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
+ { 34915, 0x00008B5F }, /* GL_SAMPLER_3D */
+ { 34929, 0x00008B5F }, /* GL_SAMPLER_3D_OES */
+ { 34947, 0x00008B60 }, /* GL_SAMPLER_CUBE */
+ { 34963, 0x000080A9 }, /* GL_SAMPLES */
+ { 34974, 0x000086B4 }, /* GL_SAMPLES_3DFX */
+ { 34990, 0x000080A9 }, /* GL_SAMPLES_ARB */
+ { 35005, 0x00008914 }, /* GL_SAMPLES_PASSED */
+ { 35023, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
+ { 35045, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
+ { 35073, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
+ { 35105, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
+ { 35128, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
+ { 35155, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
+ { 35173, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
+ { 35196, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
+ { 35218, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
+ { 35237, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
+ { 35260, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
+ { 35286, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
+ { 35316, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
+ { 35341, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
+ { 35370, 0x00080000 }, /* GL_SCISSOR_BIT */
+ { 35385, 0x00000C10 }, /* GL_SCISSOR_BOX */
+ { 35400, 0x00000C11 }, /* GL_SCISSOR_TEST */
+ { 35416, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
+ { 35441, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
+ { 35481, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
+ { 35525, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
+ { 35558, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
+ { 35588, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
+ { 35620, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
+ { 35650, 0x00001C02 }, /* GL_SELECT */
+ { 35660, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
+ { 35688, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
+ { 35713, 0x00008012 }, /* GL_SEPARABLE_2D */
+ { 35729, 0x00008C8D }, /* GL_SEPARATE_ATTRIBS_EXT */
+ { 35753, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
+ { 35780, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
+ { 35811, 0x0000150F }, /* GL_SET */
+ { 35818, 0x00008DF8 }, /* GL_SHADER_BINARY_FORMATS */
+ { 35843, 0x00008DFA }, /* GL_SHADER_COMPILER */
+ { 35862, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
+ { 35883, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
+ { 35907, 0x00008B4F }, /* GL_SHADER_TYPE */
+ { 35922, 0x00000B54 }, /* GL_SHADE_MODEL */
+ { 35937, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
+ { 35965, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
+ { 35988, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
+ { 36018, 0x00001601 }, /* GL_SHININESS */
+ { 36031, 0x00001402 }, /* GL_SHORT */
+ { 36040, 0x00009119 }, /* GL_SIGNALED */
+ { 36052, 0x00008F9C }, /* GL_SIGNED_NORMALIZED */
+ { 36073, 0x000081F9 }, /* GL_SINGLE_COLOR */
+ { 36089, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
+ { 36109, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
+ { 36128, 0x00008C46 }, /* GL_SLUMINANCE */
+ { 36142, 0x00008C47 }, /* GL_SLUMINANCE8 */
+ { 36157, 0x00008C45 }, /* GL_SLUMINANCE8_ALPHA8 */
+ { 36179, 0x00008C44 }, /* GL_SLUMINANCE_ALPHA */
+ { 36199, 0x00001D01 }, /* GL_SMOOTH */
+ { 36209, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
+ { 36242, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
+ { 36269, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
+ { 36302, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
+ { 36329, 0x00008588 }, /* GL_SOURCE0_ALPHA */
+ { 36346, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
+ { 36367, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
+ { 36388, 0x00008580 }, /* GL_SOURCE0_RGB */
+ { 36403, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
+ { 36422, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
+ { 36441, 0x00008589 }, /* GL_SOURCE1_ALPHA */
+ { 36458, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
+ { 36479, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
+ { 36500, 0x00008581 }, /* GL_SOURCE1_RGB */
+ { 36515, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
+ { 36534, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
+ { 36553, 0x0000858A }, /* GL_SOURCE2_ALPHA */
+ { 36570, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
+ { 36591, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
+ { 36612, 0x00008582 }, /* GL_SOURCE2_RGB */
+ { 36627, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
+ { 36646, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
+ { 36665, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
+ { 36685, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
+ { 36703, 0x00001202 }, /* GL_SPECULAR */
+ { 36715, 0x00002402 }, /* GL_SPHERE_MAP */
+ { 36729, 0x00001206 }, /* GL_SPOT_CUTOFF */
+ { 36744, 0x00001204 }, /* GL_SPOT_DIRECTION */
+ { 36762, 0x00001205 }, /* GL_SPOT_EXPONENT */
+ { 36779, 0x00008588 }, /* GL_SRC0_ALPHA */
+ { 36793, 0x00008580 }, /* GL_SRC0_RGB */
+ { 36805, 0x00008589 }, /* GL_SRC1_ALPHA */
+ { 36819, 0x00008581 }, /* GL_SRC1_RGB */
+ { 36831, 0x0000858A }, /* GL_SRC2_ALPHA */
+ { 36845, 0x00008582 }, /* GL_SRC2_RGB */
+ { 36857, 0x00000302 }, /* GL_SRC_ALPHA */
+ { 36870, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
+ { 36892, 0x00000300 }, /* GL_SRC_COLOR */
+ { 36905, 0x00008C40 }, /* GL_SRGB */
+ { 36913, 0x00008C41 }, /* GL_SRGB8 */
+ { 36922, 0x00008C43 }, /* GL_SRGB8_ALPHA8 */
+ { 36938, 0x00008C42 }, /* GL_SRGB_ALPHA */
+ { 36952, 0x00000503 }, /* GL_STACK_OVERFLOW */
+ { 36970, 0x00000504 }, /* GL_STACK_UNDERFLOW */
+ { 36989, 0x000088E6 }, /* GL_STATIC_COPY */
+ { 37004, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
+ { 37023, 0x000088E4 }, /* GL_STATIC_DRAW */
+ { 37038, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
+ { 37057, 0x000088E5 }, /* GL_STATIC_READ */
+ { 37072, 0x000088E5 }, /* GL_STATIC_READ_ARB */
+ { 37091, 0x00001802 }, /* GL_STENCIL */
+ { 37102, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT */
+ { 37124, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
+ { 37150, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_OES */
+ { 37176, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
+ { 37197, 0x00008801 }, /* GL_STENCIL_BACK_FAIL_ATI */
+ { 37222, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
+ { 37243, 0x00008800 }, /* GL_STENCIL_BACK_FUNC_ATI */
+ { 37268, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
+ { 37300, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI */
+ { 37336, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
+ { 37368, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI */
+ { 37404, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
+ { 37424, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
+ { 37451, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
+ { 37477, 0x00000D57 }, /* GL_STENCIL_BITS */
+ { 37493, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
+ { 37515, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
+ { 37538, 0x00000B94 }, /* GL_STENCIL_FAIL */
+ { 37554, 0x00000B92 }, /* GL_STENCIL_FUNC */
+ { 37570, 0x00001901 }, /* GL_STENCIL_INDEX */
+ { 37587, 0x00008D46 }, /* GL_STENCIL_INDEX1 */
+ { 37605, 0x00008D49 }, /* GL_STENCIL_INDEX16 */
+ { 37624, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
+ { 37647, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
+ { 37669, 0x00008D46 }, /* GL_STENCIL_INDEX1_OES */
+ { 37691, 0x00008D47 }, /* GL_STENCIL_INDEX4 */
+ { 37709, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
+ { 37731, 0x00008D47 }, /* GL_STENCIL_INDEX4_OES */
+ { 37753, 0x00008D48 }, /* GL_STENCIL_INDEX8 */
+ { 37771, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
+ { 37793, 0x00008D48 }, /* GL_STENCIL_INDEX8_OES */
+ { 37815, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
+ { 37836, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
+ { 37863, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
+ { 37890, 0x00000B97 }, /* GL_STENCIL_REF */
+ { 37905, 0x00000B90 }, /* GL_STENCIL_TEST */
+ { 37921, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
+ { 37950, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
+ { 37972, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
+ { 37993, 0x00000C33 }, /* GL_STEREO */
+ { 38003, 0x000085BE }, /* GL_STORAGE_CACHED_APPLE */
+ { 38027, 0x000085BD }, /* GL_STORAGE_PRIVATE_APPLE */
+ { 38052, 0x000085BF }, /* GL_STORAGE_SHARED_APPLE */
+ { 38076, 0x000088E2 }, /* GL_STREAM_COPY */
+ { 38091, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
+ { 38110, 0x000088E0 }, /* GL_STREAM_DRAW */
+ { 38125, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
+ { 38144, 0x000088E1 }, /* GL_STREAM_READ */
+ { 38159, 0x000088E1 }, /* GL_STREAM_READ_ARB */
+ { 38178, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
+ { 38195, 0x000084E7 }, /* GL_SUBTRACT */
+ { 38207, 0x000084E7 }, /* GL_SUBTRACT_ARB */
+ { 38223, 0x00009113 }, /* GL_SYNC_CONDITION */
+ { 38241, 0x00009116 }, /* GL_SYNC_FENCE */
+ { 38255, 0x00009115 }, /* GL_SYNC_FLAGS */
+ { 38269, 0x00000001 }, /* GL_SYNC_FLUSH_COMMANDS_BIT */
+ { 38296, 0x00009117 }, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
+ { 38326, 0x00009114 }, /* GL_SYNC_STATUS */
+ { 38341, 0x00002001 }, /* GL_T */
+ { 38346, 0x00002A2A }, /* GL_T2F_C3F_V3F */
+ { 38361, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
+ { 38380, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
+ { 38396, 0x00002A2B }, /* GL_T2F_N3F_V3F */
+ { 38411, 0x00002A27 }, /* GL_T2F_V3F */
+ { 38422, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
+ { 38441, 0x00002A28 }, /* GL_T4F_V4F */
+ { 38452, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
+ { 38475, 0x00001702 }, /* GL_TEXTURE */
+ { 38486, 0x000084C0 }, /* GL_TEXTURE0 */
+ { 38498, 0x000084C0 }, /* GL_TEXTURE0_ARB */
+ { 38514, 0x000084C1 }, /* GL_TEXTURE1 */
+ { 38526, 0x000084CA }, /* GL_TEXTURE10 */
+ { 38539, 0x000084CA }, /* GL_TEXTURE10_ARB */
+ { 38556, 0x000084CB }, /* GL_TEXTURE11 */
+ { 38569, 0x000084CB }, /* GL_TEXTURE11_ARB */
+ { 38586, 0x000084CC }, /* GL_TEXTURE12 */
+ { 38599, 0x000084CC }, /* GL_TEXTURE12_ARB */
+ { 38616, 0x000084CD }, /* GL_TEXTURE13 */
+ { 38629, 0x000084CD }, /* GL_TEXTURE13_ARB */
+ { 38646, 0x000084CE }, /* GL_TEXTURE14 */
+ { 38659, 0x000084CE }, /* GL_TEXTURE14_ARB */
+ { 38676, 0x000084CF }, /* GL_TEXTURE15 */
+ { 38689, 0x000084CF }, /* GL_TEXTURE15_ARB */
+ { 38706, 0x000084D0 }, /* GL_TEXTURE16 */
+ { 38719, 0x000084D0 }, /* GL_TEXTURE16_ARB */
+ { 38736, 0x000084D1 }, /* GL_TEXTURE17 */
+ { 38749, 0x000084D1 }, /* GL_TEXTURE17_ARB */
+ { 38766, 0x000084D2 }, /* GL_TEXTURE18 */
+ { 38779, 0x000084D2 }, /* GL_TEXTURE18_ARB */
+ { 38796, 0x000084D3 }, /* GL_TEXTURE19 */
+ { 38809, 0x000084D3 }, /* GL_TEXTURE19_ARB */
+ { 38826, 0x000084C1 }, /* GL_TEXTURE1_ARB */
+ { 38842, 0x000084C2 }, /* GL_TEXTURE2 */
+ { 38854, 0x000084D4 }, /* GL_TEXTURE20 */
+ { 38867, 0x000084D4 }, /* GL_TEXTURE20_ARB */
+ { 38884, 0x000084D5 }, /* GL_TEXTURE21 */
+ { 38897, 0x000084D5 }, /* GL_TEXTURE21_ARB */
+ { 38914, 0x000084D6 }, /* GL_TEXTURE22 */
+ { 38927, 0x000084D6 }, /* GL_TEXTURE22_ARB */
+ { 38944, 0x000084D7 }, /* GL_TEXTURE23 */
+ { 38957, 0x000084D7 }, /* GL_TEXTURE23_ARB */
+ { 38974, 0x000084D8 }, /* GL_TEXTURE24 */
+ { 38987, 0x000084D8 }, /* GL_TEXTURE24_ARB */
+ { 39004, 0x000084D9 }, /* GL_TEXTURE25 */
+ { 39017, 0x000084D9 }, /* GL_TEXTURE25_ARB */
+ { 39034, 0x000084DA }, /* GL_TEXTURE26 */
+ { 39047, 0x000084DA }, /* GL_TEXTURE26_ARB */
+ { 39064, 0x000084DB }, /* GL_TEXTURE27 */
+ { 39077, 0x000084DB }, /* GL_TEXTURE27_ARB */
+ { 39094, 0x000084DC }, /* GL_TEXTURE28 */
+ { 39107, 0x000084DC }, /* GL_TEXTURE28_ARB */
+ { 39124, 0x000084DD }, /* GL_TEXTURE29 */
+ { 39137, 0x000084DD }, /* GL_TEXTURE29_ARB */
+ { 39154, 0x000084C2 }, /* GL_TEXTURE2_ARB */
+ { 39170, 0x000084C3 }, /* GL_TEXTURE3 */
+ { 39182, 0x000084DE }, /* GL_TEXTURE30 */
+ { 39195, 0x000084DE }, /* GL_TEXTURE30_ARB */
+ { 39212, 0x000084DF }, /* GL_TEXTURE31 */
+ { 39225, 0x000084DF }, /* GL_TEXTURE31_ARB */
+ { 39242, 0x000084C3 }, /* GL_TEXTURE3_ARB */
+ { 39258, 0x000084C4 }, /* GL_TEXTURE4 */
+ { 39270, 0x000084C4 }, /* GL_TEXTURE4_ARB */
+ { 39286, 0x000084C5 }, /* GL_TEXTURE5 */
+ { 39298, 0x000084C5 }, /* GL_TEXTURE5_ARB */
+ { 39314, 0x000084C6 }, /* GL_TEXTURE6 */
+ { 39326, 0x000084C6 }, /* GL_TEXTURE6_ARB */
+ { 39342, 0x000084C7 }, /* GL_TEXTURE7 */
+ { 39354, 0x000084C7 }, /* GL_TEXTURE7_ARB */
+ { 39370, 0x000084C8 }, /* GL_TEXTURE8 */
+ { 39382, 0x000084C8 }, /* GL_TEXTURE8_ARB */
+ { 39398, 0x000084C9 }, /* GL_TEXTURE9 */
+ { 39410, 0x000084C9 }, /* GL_TEXTURE9_ARB */
+ { 39426, 0x00000DE0 }, /* GL_TEXTURE_1D */
+ { 39440, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
+ { 39464, 0x00000DE1 }, /* GL_TEXTURE_2D */
+ { 39478, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
+ { 39502, 0x0000806F }, /* GL_TEXTURE_3D */
+ { 39516, 0x0000806F }, /* GL_TEXTURE_3D_OES */
+ { 39534, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
+ { 39556, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
+ { 39582, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
+ { 39604, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
+ { 39626, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
+ { 39658, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
+ { 39680, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
+ { 39712, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
+ { 39734, 0x0000806A }, /* GL_TEXTURE_BINDING_3D_OES */
+ { 39760, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
+ { 39788, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
+ { 39820, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_OES */
+ { 39852, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
+ { 39885, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
+ { 39917, 0x00040000 }, /* GL_TEXTURE_BIT */
+ { 39932, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
+ { 39953, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
+ { 39978, 0x00001005 }, /* GL_TEXTURE_BORDER */
+ { 39996, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
+ { 40020, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
+ { 40051, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
+ { 40081, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
+ { 40111, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
+ { 40146, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
+ { 40177, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ { 40215, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
+ { 40242, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
+ { 40274, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
+ { 40308, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
+ { 40332, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
+ { 40360, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
+ { 40384, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
+ { 40412, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
+ { 40445, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
+ { 40469, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
+ { 40491, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
+ { 40513, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
+ { 40539, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
+ { 40573, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
+ { 40606, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
+ { 40643, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
+ { 40671, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
+ { 40703, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
+ { 40726, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
+ { 40764, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
+ { 40806, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
+ { 40837, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
+ { 40865, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
+ { 40895, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
+ { 40923, 0x00008B9D }, /* GL_TEXTURE_CROP_RECT_OES */
+ { 40948, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
+ { 40968, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
+ { 40992, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
+ { 41023, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
+ { 41058, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES */
+ { 41093, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
+ { 41124, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
+ { 41159, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES */
+ { 41194, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
+ { 41225, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
+ { 41260, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES */
+ { 41295, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_OES */
+ { 41319, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
+ { 41350, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
+ { 41385, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES */
+ { 41420, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
+ { 41451, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
+ { 41486, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES */
+ { 41521, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
+ { 41552, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
+ { 41587, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES */
+ { 41622, 0x000088F4 }, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
+ { 41651, 0x00008071 }, /* GL_TEXTURE_DEPTH */
+ { 41668, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
+ { 41690, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
+ { 41716, 0x00002300 }, /* GL_TEXTURE_ENV */
+ { 41731, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
+ { 41752, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
+ { 41772, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
+ { 41798, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL_EXT */
+ { 41828, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
+ { 41848, 0x00002500 }, /* GL_TEXTURE_GEN_MODE_OES */
+ { 41872, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
+ { 41889, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
+ { 41906, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
+ { 41923, 0x00008D60 }, /* GL_TEXTURE_GEN_STR_OES */
+ { 41946, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
+ { 41963, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
+ { 41988, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
+ { 42010, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
+ { 42036, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
+ { 42054, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
+ { 42080, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
+ { 42106, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
+ { 42136, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
+ { 42163, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
+ { 42188, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
+ { 42208, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
+ { 42232, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
+ { 42259, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
+ { 42286, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
+ { 42313, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
+ { 42339, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
+ { 42369, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
+ { 42391, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
+ { 42409, 0x0000898F }, /* GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES */
+ { 42449, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
+ { 42479, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
+ { 42507, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
+ { 42535, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
+ { 42563, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
+ { 42584, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
+ { 42603, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
+ { 42625, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
+ { 42644, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
+ { 42664, 0x000085B7 }, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
+ { 42694, 0x000085B8 }, /* GL_TEXTURE_RANGE_POINTER_APPLE */
+ { 42725, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
+ { 42750, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
+ { 42774, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
+ { 42794, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
+ { 42818, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
+ { 42838, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
+ { 42861, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE */
+ { 42885, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE_EXT */
+ { 42913, 0x000085BC }, /* GL_TEXTURE_STORAGE_HINT_APPLE */
+ { 42943, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
+ { 42968, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
+ { 43002, 0x00001000 }, /* GL_TEXTURE_WIDTH */
+ { 43019, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
+ { 43037, 0x00008072 }, /* GL_TEXTURE_WRAP_R_OES */
+ { 43059, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
+ { 43077, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
+ { 43095, 0x0000911B }, /* GL_TIMEOUT_EXPIRED */
+ { 43114, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
+ { 43134, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
+ { 43153, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
+ { 43182, 0x00001000 }, /* GL_TRANSFORM_BIT */
+ { 43199, 0x00008E22 }, /* GL_TRANSFORM_FEEDBACK */
+ { 43221, 0x00008E25 }, /* GL_TRANSFORM_FEEDBACK_BINDING */
+ { 43251, 0x00008E24 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE */
+ { 43287, 0x00008C8F }, /* GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT */
+ { 43328, 0x00008C8E }, /* GL_TRANSFORM_FEEDBACK_BUFFER_EXT */
+ { 43361, 0x00008C7F }, /* GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT */
+ { 43399, 0x00008E23 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED */
+ { 43435, 0x00008C85 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT */
+ { 43473, 0x00008C84 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT */
+ { 43512, 0x00008C88 }, /* GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT */
+ { 43557, 0x00008C83 }, /* GL_TRANSFORM_FEEDBACK_VARYINGS_EXT */
+ { 43592, 0x00008C76 }, /* GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT */
+ { 43637, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
+ { 43663, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
+ { 43693, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
+ { 43725, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
+ { 43755, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
+ { 43789, 0x0000862C }, /* GL_TRANSPOSE_NV */
+ { 43805, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
+ { 43836, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
+ { 43871, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
+ { 43899, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
+ { 43931, 0x00000004 }, /* GL_TRIANGLES */
+ { 43944, 0x0000000C }, /* GL_TRIANGLES_ADJACENCY_ARB */
+ { 43971, 0x00000006 }, /* GL_TRIANGLE_FAN */
+ { 43987, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
+ { 44008, 0x00000005 }, /* GL_TRIANGLE_STRIP */
+ { 44026, 0x0000000D }, /* GL_TRIANGLE_STRIP_ADJACENCY_ARB */
+ { 44058, 0x00000001 }, /* GL_TRUE */
+ { 44066, 0x00008A1C }, /* GL_UNDEFINED_APPLE */
+ { 44085, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
+ { 44105, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
+ { 44128, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
+ { 44148, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
+ { 44169, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
+ { 44191, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
+ { 44213, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
+ { 44233, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
+ { 44254, 0x00009118 }, /* GL_UNSIGNALED */
+ { 44268, 0x00001401 }, /* GL_UNSIGNED_BYTE */
+ { 44285, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
+ { 44312, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
+ { 44335, 0x00001405 }, /* GL_UNSIGNED_INT */
+ { 44351, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
+ { 44378, 0x00008DF6 }, /* GL_UNSIGNED_INT_10_10_10_2_OES */
+ { 44409, 0x000084FA }, /* GL_UNSIGNED_INT_24_8 */
+ { 44430, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_EXT */
+ { 44455, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
+ { 44479, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_OES */
+ { 44504, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
+ { 44535, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV_EXT */
+ { 44570, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
+ { 44594, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
+ { 44622, 0x00008C17 }, /* GL_UNSIGNED_NORMALIZED */
+ { 44645, 0x00001403 }, /* GL_UNSIGNED_SHORT */
+ { 44663, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
+ { 44693, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT */
+ { 44727, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
+ { 44753, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
+ { 44783, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT */
+ { 44817, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
+ { 44843, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
+ { 44867, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
+ { 44895, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
+ { 44923, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
+ { 44950, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
+ { 44982, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
+ { 45013, 0x00008CA2 }, /* GL_UPPER_LEFT */
+ { 45027, 0x00002A20 }, /* GL_V2F */
+ { 45034, 0x00002A21 }, /* GL_V3F */
+ { 45041, 0x00008B83 }, /* GL_VALIDATE_STATUS */
+ { 45060, 0x00001F00 }, /* GL_VENDOR */
+ { 45070, 0x00001F02 }, /* GL_VERSION */
+ { 45081, 0x00008074 }, /* GL_VERTEX_ARRAY */
+ { 45097, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING */
+ { 45121, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
+ { 45151, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+ { 45182, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
+ { 45217, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
+ { 45241, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
+ { 45262, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
+ { 45285, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
+ { 45306, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
+ { 45333, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
+ { 45361, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
+ { 45389, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
+ { 45417, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
+ { 45445, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
+ { 45473, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
+ { 45501, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
+ { 45528, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
+ { 45555, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
+ { 45582, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
+ { 45609, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
+ { 45636, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
+ { 45663, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
+ { 45690, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
+ { 45717, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
+ { 45744, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
+ { 45782, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
+ { 45824, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
+ { 45855, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
+ { 45890, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
+ { 45924, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
+ { 45962, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
+ { 45993, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
+ { 46028, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
+ { 46056, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
+ { 46088, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
+ { 46118, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
+ { 46152, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+ { 46180, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
+ { 46212, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
+ { 46232, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
+ { 46254, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
+ { 46283, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
+ { 46304, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
+ { 46333, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
+ { 46366, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
+ { 46398, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
+ { 46425, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
+ { 46456, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
+ { 46486, 0x00008B31 }, /* GL_VERTEX_SHADER */
+ { 46503, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
+ { 46524, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
+ { 46551, 0x00000BA2 }, /* GL_VIEWPORT */
+ { 46563, 0x00000800 }, /* GL_VIEWPORT_BIT */
+ { 46579, 0x00008A1A }, /* GL_VOLATILE_APPLE */
+ { 46597, 0x0000911D }, /* GL_WAIT_FAILED */
+ { 46612, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
+ { 46632, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+ { 46663, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
+ { 46698, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_OES */
+ { 46733, 0x000086AD }, /* GL_WEIGHT_ARRAY_OES */
+ { 46753, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+ { 46781, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_OES */
+ { 46809, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+ { 46834, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_OES */
+ { 46859, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+ { 46886, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_OES */
+ { 46913, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+ { 46938, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_OES */
+ { 46963, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
+ { 46987, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
+ { 47006, 0x000088B9 }, /* GL_WRITE_ONLY */
+ { 47020, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
+ { 47038, 0x000088B9 }, /* GL_WRITE_ONLY_OES */
+ { 47056, 0x00001506 }, /* GL_XOR */
+ { 47063, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
+ { 47082, 0x00008757 }, /* GL_YCBCR_MESA */
+ { 47096, 0x00000000 }, /* GL_ZERO */
+ { 47104, 0x00000D16 }, /* GL_ZOOM_X */
+ { 47114, 0x00000D17 }, /* GL_ZOOM_Y */
};
-static const unsigned reduced_enums[1423] =
+static const unsigned reduced_enums[1472] =
{
- 500, /* GL_FALSE */
- 760, /* GL_LINES */
- 763, /* GL_LINE_LOOP */
- 770, /* GL_LINE_STRIP */
- 1934, /* GL_TRIANGLES */
- 1938, /* GL_TRIANGLE_STRIP */
- 1936, /* GL_TRIANGLE_FAN */
- 1393, /* GL_QUADS */
- 1397, /* GL_QUAD_STRIP */
- 1273, /* GL_POLYGON */
- 761, /* GL_LINES_ADJACENCY_ARB */
- 771, /* GL_LINE_STRIP_ADJACENCY_ARB */
- 1935, /* GL_TRIANGLES_ADJACENCY_ARB */
- 1939, /* GL_TRIANGLE_STRIP_ADJACENCY_ARB */
- 1285, /* GL_POLYGON_STIPPLE_BIT */
- 1228, /* GL_PIXEL_MODE_BIT */
- 747, /* GL_LIGHTING_BIT */
- 532, /* GL_FOG_BIT */
+ 511, /* GL_FALSE */
+ 778, /* GL_LINES */
+ 781, /* GL_LINE_LOOP */
+ 788, /* GL_LINE_STRIP */
+ 1984, /* GL_TRIANGLES */
+ 1988, /* GL_TRIANGLE_STRIP */
+ 1986, /* GL_TRIANGLE_FAN */
+ 1427, /* GL_QUADS */
+ 1431, /* GL_QUAD_STRIP */
+ 1305, /* GL_POLYGON */
+ 779, /* GL_LINES_ADJACENCY_ARB */
+ 789, /* GL_LINE_STRIP_ADJACENCY_ARB */
+ 1985, /* GL_TRIANGLES_ADJACENCY_ARB */
+ 1989, /* GL_TRIANGLE_STRIP_ADJACENCY_ARB */
+ 1317, /* GL_POLYGON_STIPPLE_BIT */
+ 1260, /* GL_PIXEL_MODE_BIT */
+ 765, /* GL_LIGHTING_BIT */
+ 543, /* GL_FOG_BIT */
8, /* GL_ACCUM */
- 781, /* GL_LOAD */
- 1471, /* GL_RETURN */
- 1096, /* GL_MULT */
- 23, /* GL_ADD */
- 1112, /* GL_NEVER */
- 737, /* GL_LESS */
- 490, /* GL_EQUAL */
- 736, /* GL_LEQUAL */
- 649, /* GL_GREATER */
- 1129, /* GL_NOTEQUAL */
- 648, /* GL_GEQUAL */
- 47, /* GL_ALWAYS */
- 1622, /* GL_SRC_COLOR */
- 1161, /* GL_ONE_MINUS_SRC_COLOR */
- 1620, /* GL_SRC_ALPHA */
- 1160, /* GL_ONE_MINUS_SRC_ALPHA */
- 469, /* GL_DST_ALPHA */
- 1158, /* GL_ONE_MINUS_DST_ALPHA */
- 470, /* GL_DST_COLOR */
- 1159, /* GL_ONE_MINUS_DST_COLOR */
- 1621, /* GL_SRC_ALPHA_SATURATE */
- 629, /* GL_FRONT_LEFT */
- 630, /* GL_FRONT_RIGHT */
- 69, /* GL_BACK_LEFT */
- 70, /* GL_BACK_RIGHT */
- 626, /* GL_FRONT */
- 68, /* GL_BACK */
- 735, /* GL_LEFT */
- 1519, /* GL_RIGHT */
- 627, /* GL_FRONT_AND_BACK */
- 63, /* GL_AUX0 */
- 64, /* GL_AUX1 */
- 65, /* GL_AUX2 */
- 66, /* GL_AUX3 */
- 723, /* GL_INVALID_ENUM */
- 728, /* GL_INVALID_VALUE */
- 727, /* GL_INVALID_OPERATION */
- 1627, /* GL_STACK_OVERFLOW */
- 1628, /* GL_STACK_UNDERFLOW */
- 1186, /* GL_OUT_OF_MEMORY */
- 724, /* GL_INVALID_FRAMEBUFFER_OPERATION */
+ 799, /* GL_LOAD */
+ 1506, /* GL_RETURN */
+ 1128, /* GL_MULT */
+ 24, /* GL_ADD */
+ 1144, /* GL_NEVER */
+ 755, /* GL_LESS */
+ 501, /* GL_EQUAL */
+ 754, /* GL_LEQUAL */
+ 660, /* GL_GREATER */
+ 1161, /* GL_NOTEQUAL */
+ 659, /* GL_GEQUAL */
+ 55, /* GL_ALWAYS */
+ 1672, /* GL_SRC_COLOR */
+ 1193, /* GL_ONE_MINUS_SRC_COLOR */
+ 1670, /* GL_SRC_ALPHA */
+ 1192, /* GL_ONE_MINUS_SRC_ALPHA */
+ 480, /* GL_DST_ALPHA */
+ 1190, /* GL_ONE_MINUS_DST_ALPHA */
+ 481, /* GL_DST_COLOR */
+ 1191, /* GL_ONE_MINUS_DST_COLOR */
+ 1671, /* GL_SRC_ALPHA_SATURATE */
+ 640, /* GL_FRONT_LEFT */
+ 641, /* GL_FRONT_RIGHT */
+ 77, /* GL_BACK_LEFT */
+ 78, /* GL_BACK_RIGHT */
+ 637, /* GL_FRONT */
+ 76, /* GL_BACK */
+ 753, /* GL_LEFT */
+ 1569, /* GL_RIGHT */
+ 638, /* GL_FRONT_AND_BACK */
+ 71, /* GL_AUX0 */
+ 72, /* GL_AUX1 */
+ 73, /* GL_AUX2 */
+ 74, /* GL_AUX3 */
+ 741, /* GL_INVALID_ENUM */
+ 746, /* GL_INVALID_VALUE */
+ 745, /* GL_INVALID_OPERATION */
+ 1677, /* GL_STACK_OVERFLOW */
+ 1678, /* GL_STACK_UNDERFLOW */
+ 1218, /* GL_OUT_OF_MEMORY */
+ 742, /* GL_INVALID_FRAMEBUFFER_OPERATION */
0, /* GL_2D */
2, /* GL_3D */
3, /* GL_3D_COLOR */
4, /* GL_3D_COLOR_TEXTURE */
6, /* GL_4D_COLOR_TEXTURE */
- 1206, /* GL_PASS_THROUGH_TOKEN */
- 1272, /* GL_POINT_TOKEN */
- 772, /* GL_LINE_TOKEN */
- 1286, /* GL_POLYGON_TOKEN */
- 75, /* GL_BITMAP_TOKEN */
- 468, /* GL_DRAW_PIXEL_TOKEN */
- 315, /* GL_COPY_PIXEL_TOKEN */
- 764, /* GL_LINE_RESET_TOKEN */
- 493, /* GL_EXP */
- 494, /* GL_EXP2 */
- 352, /* GL_CW */
- 137, /* GL_CCW */
- 158, /* GL_COEFF */
- 1183, /* GL_ORDER */
- 405, /* GL_DOMAIN */
- 325, /* GL_CURRENT_COLOR */
- 328, /* GL_CURRENT_INDEX */
- 334, /* GL_CURRENT_NORMAL */
- 348, /* GL_CURRENT_TEXTURE_COORDS */
- 340, /* GL_CURRENT_RASTER_COLOR */
- 342, /* GL_CURRENT_RASTER_INDEX */
- 346, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
- 343, /* GL_CURRENT_RASTER_POSITION */
- 344, /* GL_CURRENT_RASTER_POSITION_VALID */
- 341, /* GL_CURRENT_RASTER_DISTANCE */
- 1264, /* GL_POINT_SMOOTH */
- 1248, /* GL_POINT_SIZE */
- 1263, /* GL_POINT_SIZE_RANGE */
- 1254, /* GL_POINT_SIZE_GRANULARITY */
- 765, /* GL_LINE_SMOOTH */
- 773, /* GL_LINE_WIDTH */
- 775, /* GL_LINE_WIDTH_RANGE */
- 774, /* GL_LINE_WIDTH_GRANULARITY */
- 767, /* GL_LINE_STIPPLE */
- 768, /* GL_LINE_STIPPLE_PATTERN */
- 769, /* GL_LINE_STIPPLE_REPEAT */
- 780, /* GL_LIST_MODE */
- 963, /* GL_MAX_LIST_NESTING */
- 777, /* GL_LIST_BASE */
- 779, /* GL_LIST_INDEX */
- 1275, /* GL_POLYGON_MODE */
- 1282, /* GL_POLYGON_SMOOTH */
- 1284, /* GL_POLYGON_STIPPLE */
- 479, /* GL_EDGE_FLAG */
- 318, /* GL_CULL_FACE */
- 319, /* GL_CULL_FACE_MODE */
- 628, /* GL_FRONT_FACE */
- 746, /* GL_LIGHTING */
- 751, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
- 752, /* GL_LIGHT_MODEL_TWO_SIDE */
- 748, /* GL_LIGHT_MODEL_AMBIENT */
- 1569, /* GL_SHADE_MODEL */
- 206, /* GL_COLOR_MATERIAL_FACE */
- 207, /* GL_COLOR_MATERIAL_PARAMETER */
- 205, /* GL_COLOR_MATERIAL */
- 531, /* GL_FOG */
- 553, /* GL_FOG_INDEX */
- 549, /* GL_FOG_DENSITY */
- 557, /* GL_FOG_START */
- 551, /* GL_FOG_END */
- 554, /* GL_FOG_MODE */
- 533, /* GL_FOG_COLOR */
- 390, /* GL_DEPTH_RANGE */
- 399, /* GL_DEPTH_TEST */
- 402, /* GL_DEPTH_WRITEMASK */
- 375, /* GL_DEPTH_CLEAR_VALUE */
- 389, /* GL_DEPTH_FUNC */
+ 1238, /* GL_PASS_THROUGH_TOKEN */
+ 1304, /* GL_POINT_TOKEN */
+ 790, /* GL_LINE_TOKEN */
+ 1318, /* GL_POLYGON_TOKEN */
+ 85, /* GL_BITMAP_TOKEN */
+ 479, /* GL_DRAW_PIXEL_TOKEN */
+ 326, /* GL_COPY_PIXEL_TOKEN */
+ 782, /* GL_LINE_RESET_TOKEN */
+ 504, /* GL_EXP */
+ 505, /* GL_EXP2 */
+ 363, /* GL_CW */
+ 148, /* GL_CCW */
+ 169, /* GL_COEFF */
+ 1215, /* GL_ORDER */
+ 416, /* GL_DOMAIN */
+ 336, /* GL_CURRENT_COLOR */
+ 339, /* GL_CURRENT_INDEX */
+ 345, /* GL_CURRENT_NORMAL */
+ 359, /* GL_CURRENT_TEXTURE_COORDS */
+ 351, /* GL_CURRENT_RASTER_COLOR */
+ 353, /* GL_CURRENT_RASTER_INDEX */
+ 357, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
+ 354, /* GL_CURRENT_RASTER_POSITION */
+ 355, /* GL_CURRENT_RASTER_POSITION_VALID */
+ 352, /* GL_CURRENT_RASTER_DISTANCE */
+ 1296, /* GL_POINT_SMOOTH */
+ 1280, /* GL_POINT_SIZE */
+ 1295, /* GL_POINT_SIZE_RANGE */
+ 1286, /* GL_POINT_SIZE_GRANULARITY */
+ 783, /* GL_LINE_SMOOTH */
+ 791, /* GL_LINE_WIDTH */
+ 793, /* GL_LINE_WIDTH_RANGE */
+ 792, /* GL_LINE_WIDTH_GRANULARITY */
+ 785, /* GL_LINE_STIPPLE */
+ 786, /* GL_LINE_STIPPLE_PATTERN */
+ 787, /* GL_LINE_STIPPLE_REPEAT */
+ 798, /* GL_LIST_MODE */
+ 995, /* GL_MAX_LIST_NESTING */
+ 795, /* GL_LIST_BASE */
+ 797, /* GL_LIST_INDEX */
+ 1307, /* GL_POLYGON_MODE */
+ 1314, /* GL_POLYGON_SMOOTH */
+ 1316, /* GL_POLYGON_STIPPLE */
+ 490, /* GL_EDGE_FLAG */
+ 329, /* GL_CULL_FACE */
+ 330, /* GL_CULL_FACE_MODE */
+ 639, /* GL_FRONT_FACE */
+ 764, /* GL_LIGHTING */
+ 769, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
+ 770, /* GL_LIGHT_MODEL_TWO_SIDE */
+ 766, /* GL_LIGHT_MODEL_AMBIENT */
+ 1619, /* GL_SHADE_MODEL */
+ 217, /* GL_COLOR_MATERIAL_FACE */
+ 218, /* GL_COLOR_MATERIAL_PARAMETER */
+ 216, /* GL_COLOR_MATERIAL */
+ 542, /* GL_FOG */
+ 564, /* GL_FOG_INDEX */
+ 560, /* GL_FOG_DENSITY */
+ 568, /* GL_FOG_START */
+ 562, /* GL_FOG_END */
+ 565, /* GL_FOG_MODE */
+ 544, /* GL_FOG_COLOR */
+ 401, /* GL_DEPTH_RANGE */
+ 410, /* GL_DEPTH_TEST */
+ 413, /* GL_DEPTH_WRITEMASK */
+ 386, /* GL_DEPTH_CLEAR_VALUE */
+ 400, /* GL_DEPTH_FUNC */
12, /* GL_ACCUM_CLEAR_VALUE */
- 1671, /* GL_STENCIL_TEST */
- 1652, /* GL_STENCIL_CLEAR_VALUE */
- 1654, /* GL_STENCIL_FUNC */
- 1673, /* GL_STENCIL_VALUE_MASK */
- 1653, /* GL_STENCIL_FAIL */
- 1668, /* GL_STENCIL_PASS_DEPTH_FAIL */
- 1669, /* GL_STENCIL_PASS_DEPTH_PASS */
- 1670, /* GL_STENCIL_REF */
- 1674, /* GL_STENCIL_WRITEMASK */
- 922, /* GL_MATRIX_MODE */
- 1118, /* GL_NORMALIZE */
- 2037, /* GL_VIEWPORT */
- 1091, /* GL_MODELVIEW_STACK_DEPTH */
- 1370, /* GL_PROJECTION_STACK_DEPTH */
- 1896, /* GL_TEXTURE_STACK_DEPTH */
- 1088, /* GL_MODELVIEW_MATRIX */
- 1368, /* GL_PROJECTION_MATRIX */
- 1878, /* GL_TEXTURE_MATRIX */
- 61, /* GL_ATTRIB_STACK_DEPTH */
- 148, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
- 43, /* GL_ALPHA_TEST */
- 44, /* GL_ALPHA_TEST_FUNC */
- 45, /* GL_ALPHA_TEST_REF */
- 404, /* GL_DITHER */
- 79, /* GL_BLEND_DST */
- 93, /* GL_BLEND_SRC */
- 76, /* GL_BLEND */
- 783, /* GL_LOGIC_OP_MODE */
- 695, /* GL_INDEX_LOGIC_OP */
- 204, /* GL_COLOR_LOGIC_OP */
- 67, /* GL_AUX_BUFFERS */
- 415, /* GL_DRAW_BUFFER */
- 1412, /* GL_READ_BUFFER */
- 1547, /* GL_SCISSOR_BOX */
- 1548, /* GL_SCISSOR_TEST */
- 694, /* GL_INDEX_CLEAR_VALUE */
- 699, /* GL_INDEX_WRITEMASK */
- 201, /* GL_COLOR_CLEAR_VALUE */
- 243, /* GL_COLOR_WRITEMASK */
- 696, /* GL_INDEX_MODE */
- 1512, /* GL_RGBA_MODE */
- 414, /* GL_DOUBLEBUFFER */
- 1675, /* GL_STEREO */
- 1463, /* GL_RENDER_MODE */
- 1207, /* GL_PERSPECTIVE_CORRECTION_HINT */
- 1265, /* GL_POINT_SMOOTH_HINT */
- 766, /* GL_LINE_SMOOTH_HINT */
- 1283, /* GL_POLYGON_SMOOTH_HINT */
- 552, /* GL_FOG_HINT */
- 1858, /* GL_TEXTURE_GEN_S */
- 1860, /* GL_TEXTURE_GEN_T */
- 1857, /* GL_TEXTURE_GEN_R */
- 1856, /* GL_TEXTURE_GEN_Q */
- 1220, /* GL_PIXEL_MAP_I_TO_I */
- 1226, /* GL_PIXEL_MAP_S_TO_S */
- 1222, /* GL_PIXEL_MAP_I_TO_R */
- 1218, /* GL_PIXEL_MAP_I_TO_G */
- 1216, /* GL_PIXEL_MAP_I_TO_B */
- 1214, /* GL_PIXEL_MAP_I_TO_A */
- 1224, /* GL_PIXEL_MAP_R_TO_R */
- 1212, /* GL_PIXEL_MAP_G_TO_G */
- 1210, /* GL_PIXEL_MAP_B_TO_B */
- 1208, /* GL_PIXEL_MAP_A_TO_A */
- 1221, /* GL_PIXEL_MAP_I_TO_I_SIZE */
- 1227, /* GL_PIXEL_MAP_S_TO_S_SIZE */
- 1223, /* GL_PIXEL_MAP_I_TO_R_SIZE */
- 1219, /* GL_PIXEL_MAP_I_TO_G_SIZE */
- 1217, /* GL_PIXEL_MAP_I_TO_B_SIZE */
- 1215, /* GL_PIXEL_MAP_I_TO_A_SIZE */
- 1225, /* GL_PIXEL_MAP_R_TO_R_SIZE */
- 1213, /* GL_PIXEL_MAP_G_TO_G_SIZE */
- 1211, /* GL_PIXEL_MAP_B_TO_B_SIZE */
- 1209, /* GL_PIXEL_MAP_A_TO_A_SIZE */
- 1949, /* GL_UNPACK_SWAP_BYTES */
- 1944, /* GL_UNPACK_LSB_FIRST */
- 1945, /* GL_UNPACK_ROW_LENGTH */
- 1948, /* GL_UNPACK_SKIP_ROWS */
- 1947, /* GL_UNPACK_SKIP_PIXELS */
- 1942, /* GL_UNPACK_ALIGNMENT */
- 1195, /* GL_PACK_SWAP_BYTES */
- 1190, /* GL_PACK_LSB_FIRST */
- 1191, /* GL_PACK_ROW_LENGTH */
- 1194, /* GL_PACK_SKIP_ROWS */
- 1193, /* GL_PACK_SKIP_PIXELS */
- 1187, /* GL_PACK_ALIGNMENT */
- 863, /* GL_MAP_COLOR */
- 868, /* GL_MAP_STENCIL */
- 698, /* GL_INDEX_SHIFT */
- 697, /* GL_INDEX_OFFSET */
- 1426, /* GL_RED_SCALE */
- 1424, /* GL_RED_BIAS */
- 2063, /* GL_ZOOM_X */
- 2064, /* GL_ZOOM_Y */
- 653, /* GL_GREEN_SCALE */
- 651, /* GL_GREEN_BIAS */
- 101, /* GL_BLUE_SCALE */
- 99, /* GL_BLUE_BIAS */
- 42, /* GL_ALPHA_SCALE */
- 40, /* GL_ALPHA_BIAS */
- 391, /* GL_DEPTH_SCALE */
- 368, /* GL_DEPTH_BIAS */
- 952, /* GL_MAX_EVAL_ORDER */
- 962, /* GL_MAX_LIGHTS */
- 933, /* GL_MAX_CLIP_PLANES */
- 1013, /* GL_MAX_TEXTURE_SIZE */
- 969, /* GL_MAX_PIXEL_MAP_TABLE */
- 929, /* GL_MAX_ATTRIB_STACK_DEPTH */
- 965, /* GL_MAX_MODELVIEW_STACK_DEPTH */
- 966, /* GL_MAX_NAME_STACK_DEPTH */
- 995, /* GL_MAX_PROJECTION_STACK_DEPTH */
- 1014, /* GL_MAX_TEXTURE_STACK_DEPTH */
- 1036, /* GL_MAX_VIEWPORT_DIMS */
- 930, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
- 1685, /* GL_SUBPIXEL_BITS */
- 693, /* GL_INDEX_BITS */
- 1425, /* GL_RED_BITS */
- 652, /* GL_GREEN_BITS */
- 100, /* GL_BLUE_BITS */
- 41, /* GL_ALPHA_BITS */
- 369, /* GL_DEPTH_BITS */
- 1650, /* GL_STENCIL_BITS */
+ 1721, /* GL_STENCIL_TEST */
+ 1702, /* GL_STENCIL_CLEAR_VALUE */
+ 1704, /* GL_STENCIL_FUNC */
+ 1723, /* GL_STENCIL_VALUE_MASK */
+ 1703, /* GL_STENCIL_FAIL */
+ 1718, /* GL_STENCIL_PASS_DEPTH_FAIL */
+ 1719, /* GL_STENCIL_PASS_DEPTH_PASS */
+ 1720, /* GL_STENCIL_REF */
+ 1724, /* GL_STENCIL_WRITEMASK */
+ 954, /* GL_MATRIX_MODE */
+ 1150, /* GL_NORMALIZE */
+ 2087, /* GL_VIEWPORT */
+ 1123, /* GL_MODELVIEW_STACK_DEPTH */
+ 1404, /* GL_PROJECTION_STACK_DEPTH */
+ 1946, /* GL_TEXTURE_STACK_DEPTH */
+ 1120, /* GL_MODELVIEW_MATRIX */
+ 1402, /* GL_PROJECTION_MATRIX */
+ 1928, /* GL_TEXTURE_MATRIX */
+ 69, /* GL_ATTRIB_STACK_DEPTH */
+ 159, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
+ 51, /* GL_ALPHA_TEST */
+ 52, /* GL_ALPHA_TEST_FUNC */
+ 53, /* GL_ALPHA_TEST_REF */
+ 415, /* GL_DITHER */
+ 89, /* GL_BLEND_DST */
+ 103, /* GL_BLEND_SRC */
+ 86, /* GL_BLEND */
+ 801, /* GL_LOGIC_OP_MODE */
+ 707, /* GL_INDEX_LOGIC_OP */
+ 215, /* GL_COLOR_LOGIC_OP */
+ 75, /* GL_AUX_BUFFERS */
+ 426, /* GL_DRAW_BUFFER */
+ 1446, /* GL_READ_BUFFER */
+ 1597, /* GL_SCISSOR_BOX */
+ 1598, /* GL_SCISSOR_TEST */
+ 706, /* GL_INDEX_CLEAR_VALUE */
+ 711, /* GL_INDEX_WRITEMASK */
+ 212, /* GL_COLOR_CLEAR_VALUE */
+ 254, /* GL_COLOR_WRITEMASK */
+ 708, /* GL_INDEX_MODE */
+ 1561, /* GL_RGBA_MODE */
+ 425, /* GL_DOUBLEBUFFER */
+ 1725, /* GL_STEREO */
+ 1498, /* GL_RENDER_MODE */
+ 1239, /* GL_PERSPECTIVE_CORRECTION_HINT */
+ 1297, /* GL_POINT_SMOOTH_HINT */
+ 784, /* GL_LINE_SMOOTH_HINT */
+ 1315, /* GL_POLYGON_SMOOTH_HINT */
+ 563, /* GL_FOG_HINT */
+ 1908, /* GL_TEXTURE_GEN_S */
+ 1910, /* GL_TEXTURE_GEN_T */
+ 1907, /* GL_TEXTURE_GEN_R */
+ 1906, /* GL_TEXTURE_GEN_Q */
+ 1252, /* GL_PIXEL_MAP_I_TO_I */
+ 1258, /* GL_PIXEL_MAP_S_TO_S */
+ 1254, /* GL_PIXEL_MAP_I_TO_R */
+ 1250, /* GL_PIXEL_MAP_I_TO_G */
+ 1248, /* GL_PIXEL_MAP_I_TO_B */
+ 1246, /* GL_PIXEL_MAP_I_TO_A */
+ 1256, /* GL_PIXEL_MAP_R_TO_R */
+ 1244, /* GL_PIXEL_MAP_G_TO_G */
+ 1242, /* GL_PIXEL_MAP_B_TO_B */
+ 1240, /* GL_PIXEL_MAP_A_TO_A */
+ 1253, /* GL_PIXEL_MAP_I_TO_I_SIZE */
+ 1259, /* GL_PIXEL_MAP_S_TO_S_SIZE */
+ 1255, /* GL_PIXEL_MAP_I_TO_R_SIZE */
+ 1251, /* GL_PIXEL_MAP_I_TO_G_SIZE */
+ 1249, /* GL_PIXEL_MAP_I_TO_B_SIZE */
+ 1247, /* GL_PIXEL_MAP_I_TO_A_SIZE */
+ 1257, /* GL_PIXEL_MAP_R_TO_R_SIZE */
+ 1245, /* GL_PIXEL_MAP_G_TO_G_SIZE */
+ 1243, /* GL_PIXEL_MAP_B_TO_B_SIZE */
+ 1241, /* GL_PIXEL_MAP_A_TO_A_SIZE */
+ 1999, /* GL_UNPACK_SWAP_BYTES */
+ 1994, /* GL_UNPACK_LSB_FIRST */
+ 1995, /* GL_UNPACK_ROW_LENGTH */
+ 1998, /* GL_UNPACK_SKIP_ROWS */
+ 1997, /* GL_UNPACK_SKIP_PIXELS */
+ 1992, /* GL_UNPACK_ALIGNMENT */
+ 1227, /* GL_PACK_SWAP_BYTES */
+ 1222, /* GL_PACK_LSB_FIRST */
+ 1223, /* GL_PACK_ROW_LENGTH */
+ 1226, /* GL_PACK_SKIP_ROWS */
+ 1225, /* GL_PACK_SKIP_PIXELS */
+ 1219, /* GL_PACK_ALIGNMENT */
+ 895, /* GL_MAP_COLOR */
+ 900, /* GL_MAP_STENCIL */
+ 710, /* GL_INDEX_SHIFT */
+ 709, /* GL_INDEX_OFFSET */
+ 1461, /* GL_RED_SCALE */
+ 1458, /* GL_RED_BIAS */
+ 2113, /* GL_ZOOM_X */
+ 2114, /* GL_ZOOM_Y */
+ 665, /* GL_GREEN_SCALE */
+ 662, /* GL_GREEN_BIAS */
+ 112, /* GL_BLUE_SCALE */
+ 109, /* GL_BLUE_BIAS */
+ 50, /* GL_ALPHA_SCALE */
+ 47, /* GL_ALPHA_BIAS */
+ 402, /* GL_DEPTH_SCALE */
+ 379, /* GL_DEPTH_BIAS */
+ 984, /* GL_MAX_EVAL_ORDER */
+ 994, /* GL_MAX_LIGHTS */
+ 965, /* GL_MAX_CLIP_PLANES */
+ 1045, /* GL_MAX_TEXTURE_SIZE */
+ 1001, /* GL_MAX_PIXEL_MAP_TABLE */
+ 961, /* GL_MAX_ATTRIB_STACK_DEPTH */
+ 997, /* GL_MAX_MODELVIEW_STACK_DEPTH */
+ 998, /* GL_MAX_NAME_STACK_DEPTH */
+ 1027, /* GL_MAX_PROJECTION_STACK_DEPTH */
+ 1046, /* GL_MAX_TEXTURE_STACK_DEPTH */
+ 1068, /* GL_MAX_VIEWPORT_DIMS */
+ 962, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
+ 1735, /* GL_SUBPIXEL_BITS */
+ 705, /* GL_INDEX_BITS */
+ 1459, /* GL_RED_BITS */
+ 663, /* GL_GREEN_BITS */
+ 110, /* GL_BLUE_BITS */
+ 48, /* GL_ALPHA_BITS */
+ 380, /* GL_DEPTH_BITS */
+ 1700, /* GL_STENCIL_BITS */
14, /* GL_ACCUM_RED_BITS */
13, /* GL_ACCUM_GREEN_BITS */
10, /* GL_ACCUM_BLUE_BITS */
9, /* GL_ACCUM_ALPHA_BITS */
- 1105, /* GL_NAME_STACK_DEPTH */
- 62, /* GL_AUTO_NORMAL */
- 809, /* GL_MAP1_COLOR_4 */
- 812, /* GL_MAP1_INDEX */
- 813, /* GL_MAP1_NORMAL */
- 814, /* GL_MAP1_TEXTURE_COORD_1 */
- 815, /* GL_MAP1_TEXTURE_COORD_2 */
- 816, /* GL_MAP1_TEXTURE_COORD_3 */
- 817, /* GL_MAP1_TEXTURE_COORD_4 */
- 818, /* GL_MAP1_VERTEX_3 */
- 819, /* GL_MAP1_VERTEX_4 */
- 836, /* GL_MAP2_COLOR_4 */
- 839, /* GL_MAP2_INDEX */
- 840, /* GL_MAP2_NORMAL */
- 841, /* GL_MAP2_TEXTURE_COORD_1 */
- 842, /* GL_MAP2_TEXTURE_COORD_2 */
- 843, /* GL_MAP2_TEXTURE_COORD_3 */
- 844, /* GL_MAP2_TEXTURE_COORD_4 */
- 845, /* GL_MAP2_VERTEX_3 */
- 846, /* GL_MAP2_VERTEX_4 */
- 810, /* GL_MAP1_GRID_DOMAIN */
- 811, /* GL_MAP1_GRID_SEGMENTS */
- 837, /* GL_MAP2_GRID_DOMAIN */
- 838, /* GL_MAP2_GRID_SEGMENTS */
- 1768, /* GL_TEXTURE_1D */
- 1770, /* GL_TEXTURE_2D */
- 503, /* GL_FEEDBACK_BUFFER_POINTER */
- 504, /* GL_FEEDBACK_BUFFER_SIZE */
- 505, /* GL_FEEDBACK_BUFFER_TYPE */
- 1557, /* GL_SELECTION_BUFFER_POINTER */
- 1558, /* GL_SELECTION_BUFFER_SIZE */
- 1902, /* GL_TEXTURE_WIDTH */
- 1864, /* GL_TEXTURE_HEIGHT */
- 1808, /* GL_TEXTURE_COMPONENTS */
- 1792, /* GL_TEXTURE_BORDER_COLOR */
- 1791, /* GL_TEXTURE_BORDER */
- 406, /* GL_DONT_CARE */
- 501, /* GL_FASTEST */
- 1113, /* GL_NICEST */
- 48, /* GL_AMBIENT */
- 403, /* GL_DIFFUSE */
- 1609, /* GL_SPECULAR */
- 1287, /* GL_POSITION */
- 1612, /* GL_SPOT_DIRECTION */
- 1613, /* GL_SPOT_EXPONENT */
- 1611, /* GL_SPOT_CUTOFF */
- 288, /* GL_CONSTANT_ATTENUATION */
- 755, /* GL_LINEAR_ATTENUATION */
- 1392, /* GL_QUADRATIC_ATTENUATION */
- 257, /* GL_COMPILE */
- 258, /* GL_COMPILE_AND_EXECUTE */
- 132, /* GL_BYTE */
- 1951, /* GL_UNSIGNED_BYTE */
- 1574, /* GL_SHORT */
- 1966, /* GL_UNSIGNED_SHORT */
- 701, /* GL_INT */
- 1954, /* GL_UNSIGNED_INT */
- 512, /* GL_FLOAT */
+ 1137, /* GL_NAME_STACK_DEPTH */
+ 70, /* GL_AUTO_NORMAL */
+ 841, /* GL_MAP1_COLOR_4 */
+ 844, /* GL_MAP1_INDEX */
+ 845, /* GL_MAP1_NORMAL */
+ 846, /* GL_MAP1_TEXTURE_COORD_1 */
+ 847, /* GL_MAP1_TEXTURE_COORD_2 */
+ 848, /* GL_MAP1_TEXTURE_COORD_3 */
+ 849, /* GL_MAP1_TEXTURE_COORD_4 */
+ 850, /* GL_MAP1_VERTEX_3 */
+ 851, /* GL_MAP1_VERTEX_4 */
+ 868, /* GL_MAP2_COLOR_4 */
+ 871, /* GL_MAP2_INDEX */
+ 872, /* GL_MAP2_NORMAL */
+ 873, /* GL_MAP2_TEXTURE_COORD_1 */
+ 874, /* GL_MAP2_TEXTURE_COORD_2 */
+ 875, /* GL_MAP2_TEXTURE_COORD_3 */
+ 876, /* GL_MAP2_TEXTURE_COORD_4 */
+ 877, /* GL_MAP2_VERTEX_3 */
+ 878, /* GL_MAP2_VERTEX_4 */
+ 842, /* GL_MAP1_GRID_DOMAIN */
+ 843, /* GL_MAP1_GRID_SEGMENTS */
+ 869, /* GL_MAP2_GRID_DOMAIN */
+ 870, /* GL_MAP2_GRID_SEGMENTS */
+ 1818, /* GL_TEXTURE_1D */
+ 1820, /* GL_TEXTURE_2D */
+ 514, /* GL_FEEDBACK_BUFFER_POINTER */
+ 515, /* GL_FEEDBACK_BUFFER_SIZE */
+ 516, /* GL_FEEDBACK_BUFFER_TYPE */
+ 1607, /* GL_SELECTION_BUFFER_POINTER */
+ 1608, /* GL_SELECTION_BUFFER_SIZE */
+ 1952, /* GL_TEXTURE_WIDTH */
+ 1914, /* GL_TEXTURE_HEIGHT */
+ 1858, /* GL_TEXTURE_COMPONENTS */
+ 1842, /* GL_TEXTURE_BORDER_COLOR */
+ 1841, /* GL_TEXTURE_BORDER */
+ 417, /* GL_DONT_CARE */
+ 512, /* GL_FASTEST */
+ 1145, /* GL_NICEST */
+ 56, /* GL_AMBIENT */
+ 414, /* GL_DIFFUSE */
+ 1659, /* GL_SPECULAR */
+ 1319, /* GL_POSITION */
+ 1662, /* GL_SPOT_DIRECTION */
+ 1663, /* GL_SPOT_EXPONENT */
+ 1661, /* GL_SPOT_CUTOFF */
+ 299, /* GL_CONSTANT_ATTENUATION */
+ 773, /* GL_LINEAR_ATTENUATION */
+ 1426, /* GL_QUADRATIC_ATTENUATION */
+ 268, /* GL_COMPILE */
+ 269, /* GL_COMPILE_AND_EXECUTE */
+ 143, /* GL_BYTE */
+ 2001, /* GL_UNSIGNED_BYTE */
+ 1624, /* GL_SHORT */
+ 2016, /* GL_UNSIGNED_SHORT */
+ 713, /* GL_INT */
+ 2004, /* GL_UNSIGNED_INT */
+ 523, /* GL_FLOAT */
1, /* GL_2_BYTES */
5, /* GL_3_BYTES */
7, /* GL_4_BYTES */
- 413, /* GL_DOUBLE */
- 654, /* GL_HALF_FLOAT */
- 509, /* GL_FIXED */
- 144, /* GL_CLEAR */
- 50, /* GL_AND */
- 52, /* GL_AND_REVERSE */
- 313, /* GL_COPY */
- 51, /* GL_AND_INVERTED */
- 1116, /* GL_NOOP */
- 2059, /* GL_XOR */
- 1182, /* GL_OR */
- 1117, /* GL_NOR */
- 491, /* GL_EQUIV */
- 731, /* GL_INVERT */
- 1185, /* GL_OR_REVERSE */
- 314, /* GL_COPY_INVERTED */
- 1184, /* GL_OR_INVERTED */
- 1106, /* GL_NAND */
- 1563, /* GL_SET */
- 488, /* GL_EMISSION */
- 1573, /* GL_SHININESS */
- 49, /* GL_AMBIENT_AND_DIFFUSE */
- 203, /* GL_COLOR_INDEXES */
- 1055, /* GL_MODELVIEW */
- 1367, /* GL_PROJECTION */
- 1703, /* GL_TEXTURE */
- 159, /* GL_COLOR */
- 361, /* GL_DEPTH */
- 1635, /* GL_STENCIL */
- 202, /* GL_COLOR_INDEX */
- 1655, /* GL_STENCIL_INDEX */
- 376, /* GL_DEPTH_COMPONENT */
- 1421, /* GL_RED */
- 650, /* GL_GREEN */
- 98, /* GL_BLUE */
- 31, /* GL_ALPHA */
- 1472, /* GL_RGB */
- 1495, /* GL_RGBA */
- 787, /* GL_LUMINANCE */
- 808, /* GL_LUMINANCE_ALPHA */
- 74, /* GL_BITMAP */
- 1237, /* GL_POINT */
- 753, /* GL_LINE */
- 506, /* GL_FILL */
- 1432, /* GL_RENDER */
- 502, /* GL_FEEDBACK */
- 1556, /* GL_SELECT */
- 511, /* GL_FLAT */
- 1584, /* GL_SMOOTH */
- 732, /* GL_KEEP */
- 1465, /* GL_REPLACE */
- 683, /* GL_INCR */
- 357, /* GL_DECR */
- 1983, /* GL_VENDOR */
- 1462, /* GL_RENDERER */
- 1984, /* GL_VERSION */
- 495, /* GL_EXTENSIONS */
- 1520, /* GL_S */
- 1694, /* GL_T */
- 1408, /* GL_R */
- 1391, /* GL_Q */
- 1092, /* GL_MODULATE */
- 356, /* GL_DECAL */
- 1851, /* GL_TEXTURE_ENV_MODE */
- 1850, /* GL_TEXTURE_ENV_COLOR */
- 1849, /* GL_TEXTURE_ENV */
- 496, /* GL_EYE_LINEAR */
- 1143, /* GL_OBJECT_LINEAR */
- 1610, /* GL_SPHERE_MAP */
- 1854, /* GL_TEXTURE_GEN_MODE */
- 1145, /* GL_OBJECT_PLANE */
- 497, /* GL_EYE_PLANE */
- 1107, /* GL_NEAREST */
- 754, /* GL_LINEAR */
- 1111, /* GL_NEAREST_MIPMAP_NEAREST */
- 759, /* GL_LINEAR_MIPMAP_NEAREST */
- 1110, /* GL_NEAREST_MIPMAP_LINEAR */
- 758, /* GL_LINEAR_MIPMAP_LINEAR */
- 1877, /* GL_TEXTURE_MAG_FILTER */
- 1886, /* GL_TEXTURE_MIN_FILTER */
- 1905, /* GL_TEXTURE_WRAP_S */
- 1906, /* GL_TEXTURE_WRAP_T */
- 138, /* GL_CLAMP */
- 1464, /* GL_REPEAT */
- 1281, /* GL_POLYGON_OFFSET_UNITS */
- 1280, /* GL_POLYGON_OFFSET_POINT */
- 1279, /* GL_POLYGON_OFFSET_LINE */
- 1409, /* GL_R3_G3_B2 */
- 1980, /* GL_V2F */
- 1981, /* GL_V3F */
- 135, /* GL_C4UB_V2F */
- 136, /* GL_C4UB_V3F */
- 133, /* GL_C3F_V3F */
- 1104, /* GL_N3F_V3F */
- 134, /* GL_C4F_N3F_V3F */
- 1699, /* GL_T2F_V3F */
- 1701, /* GL_T4F_V4F */
- 1697, /* GL_T2F_C4UB_V3F */
- 1695, /* GL_T2F_C3F_V3F */
- 1698, /* GL_T2F_N3F_V3F */
- 1696, /* GL_T2F_C4F_N3F_V3F */
- 1700, /* GL_T4F_C4F_N3F_V4F */
- 151, /* GL_CLIP_PLANE0 */
- 152, /* GL_CLIP_PLANE1 */
- 153, /* GL_CLIP_PLANE2 */
- 154, /* GL_CLIP_PLANE3 */
- 155, /* GL_CLIP_PLANE4 */
- 156, /* GL_CLIP_PLANE5 */
- 738, /* GL_LIGHT0 */
- 739, /* GL_LIGHT1 */
- 740, /* GL_LIGHT2 */
- 741, /* GL_LIGHT3 */
- 742, /* GL_LIGHT4 */
- 743, /* GL_LIGHT5 */
- 744, /* GL_LIGHT6 */
- 745, /* GL_LIGHT7 */
- 658, /* GL_HINT_BIT */
- 290, /* GL_CONSTANT_COLOR */
- 1156, /* GL_ONE_MINUS_CONSTANT_COLOR */
- 285, /* GL_CONSTANT_ALPHA */
- 1154, /* GL_ONE_MINUS_CONSTANT_ALPHA */
- 77, /* GL_BLEND_COLOR */
- 631, /* GL_FUNC_ADD */
- 1039, /* GL_MIN */
- 925, /* GL_MAX */
- 84, /* GL_BLEND_EQUATION */
- 637, /* GL_FUNC_SUBTRACT */
- 634, /* GL_FUNC_REVERSE_SUBTRACT */
- 293, /* GL_CONVOLUTION_1D */
- 294, /* GL_CONVOLUTION_2D */
- 1559, /* GL_SEPARABLE_2D */
- 297, /* GL_CONVOLUTION_BORDER_MODE */
- 301, /* GL_CONVOLUTION_FILTER_SCALE */
- 299, /* GL_CONVOLUTION_FILTER_BIAS */
- 1422, /* GL_REDUCE */
- 303, /* GL_CONVOLUTION_FORMAT */
- 307, /* GL_CONVOLUTION_WIDTH */
- 305, /* GL_CONVOLUTION_HEIGHT */
- 942, /* GL_MAX_CONVOLUTION_WIDTH */
- 940, /* GL_MAX_CONVOLUTION_HEIGHT */
- 1320, /* GL_POST_CONVOLUTION_RED_SCALE */
- 1316, /* GL_POST_CONVOLUTION_GREEN_SCALE */
- 1311, /* GL_POST_CONVOLUTION_BLUE_SCALE */
- 1307, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
- 1318, /* GL_POST_CONVOLUTION_RED_BIAS */
- 1314, /* GL_POST_CONVOLUTION_GREEN_BIAS */
- 1309, /* GL_POST_CONVOLUTION_BLUE_BIAS */
- 1305, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
- 659, /* GL_HISTOGRAM */
- 1374, /* GL_PROXY_HISTOGRAM */
- 675, /* GL_HISTOGRAM_WIDTH */
- 665, /* GL_HISTOGRAM_FORMAT */
- 671, /* GL_HISTOGRAM_RED_SIZE */
- 667, /* GL_HISTOGRAM_GREEN_SIZE */
- 662, /* GL_HISTOGRAM_BLUE_SIZE */
- 660, /* GL_HISTOGRAM_ALPHA_SIZE */
- 669, /* GL_HISTOGRAM_LUMINANCE_SIZE */
- 673, /* GL_HISTOGRAM_SINK */
- 1040, /* GL_MINMAX */
- 1042, /* GL_MINMAX_FORMAT */
- 1044, /* GL_MINMAX_SINK */
- 1702, /* GL_TABLE_TOO_LARGE_EXT */
- 1953, /* GL_UNSIGNED_BYTE_3_3_2 */
- 1969, /* GL_UNSIGNED_SHORT_4_4_4_4 */
- 1972, /* GL_UNSIGNED_SHORT_5_5_5_1 */
- 1963, /* GL_UNSIGNED_INT_8_8_8_8 */
- 1955, /* GL_UNSIGNED_INT_10_10_10_2 */
- 1278, /* GL_POLYGON_OFFSET_FILL */
- 1277, /* GL_POLYGON_OFFSET_FACTOR */
- 1276, /* GL_POLYGON_OFFSET_BIAS */
- 1468, /* GL_RESCALE_NORMAL */
- 36, /* GL_ALPHA4 */
- 38, /* GL_ALPHA8 */
- 32, /* GL_ALPHA12 */
- 34, /* GL_ALPHA16 */
- 798, /* GL_LUMINANCE4 */
- 804, /* GL_LUMINANCE8 */
- 788, /* GL_LUMINANCE12 */
- 794, /* GL_LUMINANCE16 */
- 799, /* GL_LUMINANCE4_ALPHA4 */
- 802, /* GL_LUMINANCE6_ALPHA2 */
- 805, /* GL_LUMINANCE8_ALPHA8 */
- 791, /* GL_LUMINANCE12_ALPHA4 */
- 789, /* GL_LUMINANCE12_ALPHA12 */
- 795, /* GL_LUMINANCE16_ALPHA16 */
- 702, /* GL_INTENSITY */
- 707, /* GL_INTENSITY4 */
- 709, /* GL_INTENSITY8 */
- 703, /* GL_INTENSITY12 */
- 705, /* GL_INTENSITY16 */
- 1481, /* GL_RGB2_EXT */
- 1482, /* GL_RGB4 */
- 1485, /* GL_RGB5 */
- 1492, /* GL_RGB8 */
- 1473, /* GL_RGB10 */
- 1477, /* GL_RGB12 */
- 1479, /* GL_RGB16 */
- 1500, /* GL_RGBA2 */
- 1502, /* GL_RGBA4 */
- 1488, /* GL_RGB5_A1 */
- 1507, /* GL_RGBA8 */
- 1474, /* GL_RGB10_A2 */
- 1496, /* GL_RGBA12 */
- 1498, /* GL_RGBA16 */
- 1893, /* GL_TEXTURE_RED_SIZE */
- 1862, /* GL_TEXTURE_GREEN_SIZE */
- 1789, /* GL_TEXTURE_BLUE_SIZE */
- 1774, /* GL_TEXTURE_ALPHA_SIZE */
- 1875, /* GL_TEXTURE_LUMINANCE_SIZE */
- 1866, /* GL_TEXTURE_INTENSITY_SIZE */
- 1466, /* GL_REPLACE_EXT */
- 1378, /* GL_PROXY_TEXTURE_1D */
- 1381, /* GL_PROXY_TEXTURE_2D */
- 1900, /* GL_TEXTURE_TOO_LARGE_EXT */
- 1888, /* GL_TEXTURE_PRIORITY */
- 1895, /* GL_TEXTURE_RESIDENT */
- 1777, /* GL_TEXTURE_BINDING_1D */
- 1779, /* GL_TEXTURE_BINDING_2D */
- 1781, /* GL_TEXTURE_BINDING_3D */
- 1192, /* GL_PACK_SKIP_IMAGES */
- 1188, /* GL_PACK_IMAGE_HEIGHT */
- 1946, /* GL_UNPACK_SKIP_IMAGES */
- 1943, /* GL_UNPACK_IMAGE_HEIGHT */
- 1772, /* GL_TEXTURE_3D */
- 1384, /* GL_PROXY_TEXTURE_3D */
- 1846, /* GL_TEXTURE_DEPTH */
- 1903, /* GL_TEXTURE_WRAP_R */
- 926, /* GL_MAX_3D_TEXTURE_SIZE */
- 1985, /* GL_VERTEX_ARRAY */
- 1119, /* GL_NORMAL_ARRAY */
- 160, /* GL_COLOR_ARRAY */
- 687, /* GL_INDEX_ARRAY */
- 1816, /* GL_TEXTURE_COORD_ARRAY */
- 480, /* GL_EDGE_FLAG_ARRAY */
- 1991, /* GL_VERTEX_ARRAY_SIZE */
- 1993, /* GL_VERTEX_ARRAY_TYPE */
- 1992, /* GL_VERTEX_ARRAY_STRIDE */
- 1124, /* GL_NORMAL_ARRAY_TYPE */
- 1123, /* GL_NORMAL_ARRAY_STRIDE */
- 164, /* GL_COLOR_ARRAY_SIZE */
- 166, /* GL_COLOR_ARRAY_TYPE */
- 165, /* GL_COLOR_ARRAY_STRIDE */
- 692, /* GL_INDEX_ARRAY_TYPE */
- 691, /* GL_INDEX_ARRAY_STRIDE */
- 1820, /* GL_TEXTURE_COORD_ARRAY_SIZE */
- 1822, /* GL_TEXTURE_COORD_ARRAY_TYPE */
- 1821, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
- 484, /* GL_EDGE_FLAG_ARRAY_STRIDE */
- 1990, /* GL_VERTEX_ARRAY_POINTER */
- 1122, /* GL_NORMAL_ARRAY_POINTER */
- 163, /* GL_COLOR_ARRAY_POINTER */
- 690, /* GL_INDEX_ARRAY_POINTER */
- 1819, /* GL_TEXTURE_COORD_ARRAY_POINTER */
- 483, /* GL_EDGE_FLAG_ARRAY_POINTER */
- 1097, /* GL_MULTISAMPLE */
- 1533, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
- 1535, /* GL_SAMPLE_ALPHA_TO_ONE */
- 1540, /* GL_SAMPLE_COVERAGE */
- 1537, /* GL_SAMPLE_BUFFERS */
- 1528, /* GL_SAMPLES */
- 1544, /* GL_SAMPLE_COVERAGE_VALUE */
- 1542, /* GL_SAMPLE_COVERAGE_INVERT */
- 208, /* GL_COLOR_MATRIX */
- 210, /* GL_COLOR_MATRIX_STACK_DEPTH */
- 936, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
- 1303, /* GL_POST_COLOR_MATRIX_RED_SCALE */
- 1299, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
- 1294, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
- 1290, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
- 1301, /* GL_POST_COLOR_MATRIX_RED_BIAS */
- 1297, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
- 1292, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
- 1288, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
- 1799, /* GL_TEXTURE_COLOR_TABLE_SGI */
- 1385, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
- 1801, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
- 82, /* GL_BLEND_DST_RGB */
- 96, /* GL_BLEND_SRC_RGB */
- 80, /* GL_BLEND_DST_ALPHA */
- 94, /* GL_BLEND_SRC_ALPHA */
- 214, /* GL_COLOR_TABLE */
- 1313, /* GL_POST_CONVOLUTION_COLOR_TABLE */
- 1296, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
- 1373, /* GL_PROXY_COLOR_TABLE */
- 1377, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
- 1376, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
- 238, /* GL_COLOR_TABLE_SCALE */
- 218, /* GL_COLOR_TABLE_BIAS */
- 223, /* GL_COLOR_TABLE_FORMAT */
- 240, /* GL_COLOR_TABLE_WIDTH */
- 235, /* GL_COLOR_TABLE_RED_SIZE */
- 226, /* GL_COLOR_TABLE_GREEN_SIZE */
- 220, /* GL_COLOR_TABLE_BLUE_SIZE */
- 215, /* GL_COLOR_TABLE_ALPHA_SIZE */
- 232, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
- 229, /* GL_COLOR_TABLE_INTENSITY_SIZE */
- 71, /* GL_BGR */
- 72, /* GL_BGRA */
- 951, /* GL_MAX_ELEMENTS_VERTICES */
- 950, /* GL_MAX_ELEMENTS_INDICES */
- 1865, /* GL_TEXTURE_INDEX_SIZE_EXT */
- 157, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
- 1259, /* GL_POINT_SIZE_MIN */
- 1255, /* GL_POINT_SIZE_MAX */
- 1244, /* GL_POINT_FADE_THRESHOLD_SIZE */
- 1240, /* GL_POINT_DISTANCE_ATTENUATION */
- 139, /* GL_CLAMP_TO_BORDER */
- 142, /* GL_CLAMP_TO_EDGE */
- 1887, /* GL_TEXTURE_MIN_LOD */
- 1885, /* GL_TEXTURE_MAX_LOD */
- 1776, /* GL_TEXTURE_BASE_LEVEL */
- 1884, /* GL_TEXTURE_MAX_LEVEL */
- 678, /* GL_IGNORE_BORDER_HP */
- 289, /* GL_CONSTANT_BORDER_HP */
- 1467, /* GL_REPLICATE_BORDER_HP */
- 295, /* GL_CONVOLUTION_BORDER_COLOR */
- 1151, /* GL_OCCLUSION_TEST_HP */
- 1152, /* GL_OCCLUSION_TEST_RESULT_HP */
- 756, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
- 1793, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
- 1795, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
- 1797, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
- 1798, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- 1796, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
- 1794, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
- 931, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
- 932, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- 1323, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
- 1325, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
- 1322, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
- 1324, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
- 1873, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
- 1874, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
- 1872, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
- 640, /* GL_GENERATE_MIPMAP */
- 641, /* GL_GENERATE_MIPMAP_HINT */
- 555, /* GL_FOG_OFFSET_SGIX */
- 556, /* GL_FOG_OFFSET_VALUE_SGIX */
- 1807, /* GL_TEXTURE_COMPARE_SGIX */
- 1806, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
- 1869, /* GL_TEXTURE_LEQUAL_R_SGIX */
- 1861, /* GL_TEXTURE_GEQUAL_R_SGIX */
- 377, /* GL_DEPTH_COMPONENT16 */
- 381, /* GL_DEPTH_COMPONENT24 */
- 385, /* GL_DEPTH_COMPONENT32 */
- 320, /* GL_CULL_VERTEX_EXT */
- 322, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
- 321, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
- 2055, /* GL_WRAP_BORDER_SUN */
- 1800, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
- 749, /* GL_LIGHT_MODEL_COLOR_CONTROL */
- 1577, /* GL_SINGLE_COLOR */
- 1561, /* GL_SEPARATE_SPECULAR_COLOR */
- 1572, /* GL_SHARED_TEXTURE_PALETTE_EXT */
- 567, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
- 568, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
- 578, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
- 570, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
- 566, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
- 565, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
- 569, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
- 579, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
- 596, /* GL_FRAMEBUFFER_DEFAULT */
- 622, /* GL_FRAMEBUFFER_UNDEFINED */
- 393, /* GL_DEPTH_STENCIL_ATTACHMENT */
- 686, /* GL_INDEX */
- 1952, /* GL_UNSIGNED_BYTE_2_3_3_REV */
- 1973, /* GL_UNSIGNED_SHORT_5_6_5 */
- 1974, /* GL_UNSIGNED_SHORT_5_6_5_REV */
- 1970, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
- 1967, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
- 1964, /* GL_UNSIGNED_INT_8_8_8_8_REV */
- 1961, /* GL_UNSIGNED_INT_2_10_10_10_REV */
- 1882, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
- 1883, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
- 1881, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
- 1047, /* GL_MIRRORED_REPEAT */
- 1515, /* GL_RGB_S3TC */
- 1484, /* GL_RGB4_S3TC */
- 1513, /* GL_RGBA_S3TC */
- 1506, /* GL_RGBA4_S3TC */
- 1511, /* GL_RGBA_DXT5_S3TC */
- 1503, /* GL_RGBA4_DXT5_S3TC */
- 277, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
- 272, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
- 273, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
- 274, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
- 1109, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
- 1108, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
- 757, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
- 542, /* GL_FOG_COORDINATE_SOURCE */
- 534, /* GL_FOG_COORD */
- 558, /* GL_FRAGMENT_DEPTH */
- 326, /* GL_CURRENT_FOG_COORD */
- 541, /* GL_FOG_COORDINATE_ARRAY_TYPE */
- 540, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
- 539, /* GL_FOG_COORDINATE_ARRAY_POINTER */
- 536, /* GL_FOG_COORDINATE_ARRAY */
- 212, /* GL_COLOR_SUM */
- 347, /* GL_CURRENT_SECONDARY_COLOR */
- 1553, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
- 1555, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
- 1554, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
- 1552, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
- 1549, /* GL_SECONDARY_COLOR_ARRAY */
- 345, /* GL_CURRENT_RASTER_SECONDARY_COLOR */
- 28, /* GL_ALIASED_POINT_SIZE_RANGE */
- 27, /* GL_ALIASED_LINE_WIDTH_RANGE */
- 1704, /* GL_TEXTURE0 */
- 1706, /* GL_TEXTURE1 */
- 1728, /* GL_TEXTURE2 */
- 1750, /* GL_TEXTURE3 */
- 1756, /* GL_TEXTURE4 */
- 1758, /* GL_TEXTURE5 */
- 1760, /* GL_TEXTURE6 */
- 1762, /* GL_TEXTURE7 */
- 1764, /* GL_TEXTURE8 */
- 1766, /* GL_TEXTURE9 */
- 1707, /* GL_TEXTURE10 */
- 1709, /* GL_TEXTURE11 */
- 1711, /* GL_TEXTURE12 */
- 1713, /* GL_TEXTURE13 */
- 1715, /* GL_TEXTURE14 */
- 1717, /* GL_TEXTURE15 */
- 1719, /* GL_TEXTURE16 */
- 1721, /* GL_TEXTURE17 */
- 1723, /* GL_TEXTURE18 */
- 1725, /* GL_TEXTURE19 */
- 1729, /* GL_TEXTURE20 */
- 1731, /* GL_TEXTURE21 */
- 1733, /* GL_TEXTURE22 */
- 1735, /* GL_TEXTURE23 */
- 1737, /* GL_TEXTURE24 */
- 1739, /* GL_TEXTURE25 */
- 1741, /* GL_TEXTURE26 */
- 1743, /* GL_TEXTURE27 */
- 1745, /* GL_TEXTURE28 */
- 1747, /* GL_TEXTURE29 */
- 1751, /* GL_TEXTURE30 */
- 1753, /* GL_TEXTURE31 */
- 18, /* GL_ACTIVE_TEXTURE */
- 145, /* GL_CLIENT_ACTIVE_TEXTURE */
- 1015, /* GL_MAX_TEXTURE_UNITS */
- 1927, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
- 1930, /* GL_TRANSPOSE_PROJECTION_MATRIX */
- 1932, /* GL_TRANSPOSE_TEXTURE_MATRIX */
- 1924, /* GL_TRANSPOSE_COLOR_MATRIX */
- 1686, /* GL_SUBTRACT */
- 998, /* GL_MAX_RENDERBUFFER_SIZE */
- 260, /* GL_COMPRESSED_ALPHA */
- 264, /* GL_COMPRESSED_LUMINANCE */
- 265, /* GL_COMPRESSED_LUMINANCE_ALPHA */
- 262, /* GL_COMPRESSED_INTENSITY */
- 268, /* GL_COMPRESSED_RGB */
- 269, /* GL_COMPRESSED_RGBA */
- 1814, /* GL_TEXTURE_COMPRESSION_HINT */
- 1891, /* GL_TEXTURE_RECTANGLE_ARB */
- 1786, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
- 1388, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
- 996, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
- 392, /* GL_DEPTH_STENCIL */
- 1957, /* GL_UNSIGNED_INT_24_8 */
- 1010, /* GL_MAX_TEXTURE_LOD_BIAS */
- 1880, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
- 1012, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
- 1852, /* GL_TEXTURE_FILTER_CONTROL */
- 1870, /* GL_TEXTURE_LOD_BIAS */
- 245, /* GL_COMBINE4 */
- 1004, /* GL_MAX_SHININESS_NV */
- 1005, /* GL_MAX_SPOT_EXPONENT_NV */
- 684, /* GL_INCR_WRAP */
- 358, /* GL_DECR_WRAP */
- 1067, /* GL_MODELVIEW1_ARB */
- 1125, /* GL_NORMAL_MAP */
- 1427, /* GL_REFLECTION_MAP */
- 1824, /* GL_TEXTURE_CUBE_MAP */
- 1783, /* GL_TEXTURE_BINDING_CUBE_MAP */
- 1836, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
- 1826, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
- 1839, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
- 1829, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
- 1842, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
- 1832, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
- 1386, /* GL_PROXY_TEXTURE_CUBE_MAP */
- 944, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
- 1103, /* GL_MULTISAMPLE_FILTER_HINT_NV */
- 550, /* GL_FOG_DISTANCE_MODE_NV */
- 499, /* GL_EYE_RADIAL_NV */
- 498, /* GL_EYE_PLANE_ABSOLUTE_NV */
- 244, /* GL_COMBINE */
- 251, /* GL_COMBINE_RGB */
- 246, /* GL_COMBINE_ALPHA */
- 1516, /* GL_RGB_SCALE */
- 24, /* GL_ADD_SIGNED */
- 713, /* GL_INTERPOLATE */
- 284, /* GL_CONSTANT */
- 1329, /* GL_PRIMARY_COLOR */
- 1326, /* GL_PREVIOUS */
- 1592, /* GL_SOURCE0_RGB */
- 1598, /* GL_SOURCE1_RGB */
- 1604, /* GL_SOURCE2_RGB */
- 1608, /* GL_SOURCE3_RGB_NV */
- 1589, /* GL_SOURCE0_ALPHA */
- 1595, /* GL_SOURCE1_ALPHA */
- 1601, /* GL_SOURCE2_ALPHA */
- 1607, /* GL_SOURCE3_ALPHA_NV */
- 1165, /* GL_OPERAND0_RGB */
- 1171, /* GL_OPERAND1_RGB */
- 1177, /* GL_OPERAND2_RGB */
- 1181, /* GL_OPERAND3_RGB_NV */
- 1162, /* GL_OPERAND0_ALPHA */
- 1168, /* GL_OPERAND1_ALPHA */
- 1174, /* GL_OPERAND2_ALPHA */
- 1180, /* GL_OPERAND3_ALPHA_NV */
- 120, /* GL_BUFFER_OBJECT_APPLE */
- 1986, /* GL_VERTEX_ARRAY_BINDING */
- 1889, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
- 1890, /* GL_TEXTURE_RANGE_POINTER_APPLE */
- 2060, /* GL_YCBCR_422_APPLE */
- 1975, /* GL_UNSIGNED_SHORT_8_8_APPLE */
- 1977, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
- 1899, /* GL_TEXTURE_STORAGE_HINT_APPLE */
- 1677, /* GL_STORAGE_PRIVATE_APPLE */
- 1676, /* GL_STORAGE_CACHED_APPLE */
- 1678, /* GL_STORAGE_SHARED_APPLE */
- 1579, /* GL_SLICE_ACCUM_SUN */
- 1396, /* GL_QUAD_MESH_SUN */
- 1937, /* GL_TRIANGLE_MESH_SUN */
- 2025, /* GL_VERTEX_PROGRAM_ARB */
- 2036, /* GL_VERTEX_STATE_PROGRAM_NV */
- 2012, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
- 2018, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
- 2020, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
- 2022, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
- 349, /* GL_CURRENT_VERTEX_ATTRIB */
- 1345, /* GL_PROGRAM_LENGTH_ARB */
- 1360, /* GL_PROGRAM_STRING_ARB */
- 1090, /* GL_MODELVIEW_PROJECTION_NV */
- 677, /* GL_IDENTITY_NV */
- 729, /* GL_INVERSE_NV */
- 1929, /* GL_TRANSPOSE_NV */
- 730, /* GL_INVERSE_TRANSPOSE_NV */
- 982, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
- 981, /* GL_MAX_PROGRAM_MATRICES_ARB */
- 872, /* GL_MATRIX0_NV */
- 884, /* GL_MATRIX1_NV */
- 896, /* GL_MATRIX2_NV */
- 900, /* GL_MATRIX3_NV */
- 902, /* GL_MATRIX4_NV */
- 904, /* GL_MATRIX5_NV */
- 906, /* GL_MATRIX6_NV */
- 908, /* GL_MATRIX7_NV */
- 332, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
- 329, /* GL_CURRENT_MATRIX_ARB */
- 2028, /* GL_VERTEX_PROGRAM_POINT_SIZE */
- 2031, /* GL_VERTEX_PROGRAM_TWO_SIDE */
- 1357, /* GL_PROGRAM_PARAMETER_NV */
- 2016, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
- 1362, /* GL_PROGRAM_TARGET_NV */
- 1359, /* GL_PROGRAM_RESIDENT_NV */
- 1909, /* GL_TRACK_MATRIX_NV */
- 1910, /* GL_TRACK_MATRIX_TRANSFORM_NV */
- 2026, /* GL_VERTEX_PROGRAM_BINDING_NV */
- 1339, /* GL_PROGRAM_ERROR_POSITION_ARB */
- 373, /* GL_DEPTH_CLAMP */
- 1994, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
- 2001, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
- 2002, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
- 2003, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
- 2004, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
- 2005, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
- 2006, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
- 2007, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
- 2008, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
- 2009, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
- 1995, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
- 1996, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
- 1997, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
- 1998, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
- 1999, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
- 2000, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
- 820, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
- 827, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
- 828, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
- 829, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
- 830, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
- 831, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
- 832, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
- 833, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
- 834, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
- 835, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
- 821, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
- 822, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
- 823, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
- 824, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
- 825, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
- 826, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
- 847, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
- 854, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
- 855, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
- 856, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
- 857, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
- 858, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
- 859, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
- 1338, /* GL_PROGRAM_BINDING_ARB */
- 861, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
- 862, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
- 848, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
- 849, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
- 850, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
- 851, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
- 852, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
- 853, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
- 1812, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
- 1809, /* GL_TEXTURE_COMPRESSED */
- 1131, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
- 282, /* GL_COMPRESSED_TEXTURE_FORMATS */
- 1033, /* GL_MAX_VERTEX_UNITS_ARB */
- 22, /* GL_ACTIVE_VERTEX_UNITS_ARB */
- 2054, /* GL_WEIGHT_SUM_UNITY_ARB */
- 2024, /* GL_VERTEX_BLEND_ARB */
- 351, /* GL_CURRENT_WEIGHT_ARB */
- 2052, /* GL_WEIGHT_ARRAY_TYPE_ARB */
- 2050, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
- 2048, /* GL_WEIGHT_ARRAY_SIZE_ARB */
- 2046, /* GL_WEIGHT_ARRAY_POINTER_ARB */
- 2041, /* GL_WEIGHT_ARRAY_ARB */
- 407, /* GL_DOT3_RGB */
- 408, /* GL_DOT3_RGBA */
- 276, /* GL_COMPRESSED_RGB_FXT1_3DFX */
- 271, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
- 1098, /* GL_MULTISAMPLE_3DFX */
- 1538, /* GL_SAMPLE_BUFFERS_3DFX */
- 1529, /* GL_SAMPLES_3DFX */
- 1078, /* GL_MODELVIEW2_ARB */
- 1081, /* GL_MODELVIEW3_ARB */
- 1082, /* GL_MODELVIEW4_ARB */
- 1083, /* GL_MODELVIEW5_ARB */
- 1084, /* GL_MODELVIEW6_ARB */
- 1085, /* GL_MODELVIEW7_ARB */
- 1086, /* GL_MODELVIEW8_ARB */
- 1087, /* GL_MODELVIEW9_ARB */
- 1057, /* GL_MODELVIEW10_ARB */
- 1058, /* GL_MODELVIEW11_ARB */
- 1059, /* GL_MODELVIEW12_ARB */
- 1060, /* GL_MODELVIEW13_ARB */
- 1061, /* GL_MODELVIEW14_ARB */
- 1062, /* GL_MODELVIEW15_ARB */
- 1063, /* GL_MODELVIEW16_ARB */
- 1064, /* GL_MODELVIEW17_ARB */
- 1065, /* GL_MODELVIEW18_ARB */
- 1066, /* GL_MODELVIEW19_ARB */
- 1068, /* GL_MODELVIEW20_ARB */
- 1069, /* GL_MODELVIEW21_ARB */
- 1070, /* GL_MODELVIEW22_ARB */
- 1071, /* GL_MODELVIEW23_ARB */
- 1072, /* GL_MODELVIEW24_ARB */
- 1073, /* GL_MODELVIEW25_ARB */
- 1074, /* GL_MODELVIEW26_ARB */
- 1075, /* GL_MODELVIEW27_ARB */
- 1076, /* GL_MODELVIEW28_ARB */
- 1077, /* GL_MODELVIEW29_ARB */
- 1079, /* GL_MODELVIEW30_ARB */
- 1080, /* GL_MODELVIEW31_ARB */
- 412, /* GL_DOT3_RGB_EXT */
- 410, /* GL_DOT3_RGBA_EXT */
- 1051, /* GL_MIRROR_CLAMP_EXT */
- 1054, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
- 1093, /* GL_MODULATE_ADD_ATI */
- 1094, /* GL_MODULATE_SIGNED_ADD_ATI */
- 1095, /* GL_MODULATE_SUBTRACT_ATI */
- 2061, /* GL_YCBCR_MESA */
- 1189, /* GL_PACK_INVERT_MESA */
- 354, /* GL_DEBUG_OBJECT_MESA */
- 355, /* GL_DEBUG_PRINT_MESA */
- 353, /* GL_DEBUG_ASSERT_MESA */
- 122, /* GL_BUFFER_SIZE */
- 124, /* GL_BUFFER_USAGE */
- 128, /* GL_BUMP_ROT_MATRIX_ATI */
- 129, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */
- 127, /* GL_BUMP_NUM_TEX_UNITS_ATI */
- 131, /* GL_BUMP_TEX_UNITS_ATI */
- 472, /* GL_DUDV_ATI */
- 471, /* GL_DU8DV8_ATI */
- 126, /* GL_BUMP_ENVMAP_ATI */
- 130, /* GL_BUMP_TARGET_ATI */
- 1133, /* GL_NUM_PROGRAM_BINARY_FORMATS_OES */
- 1336, /* GL_PROGRAM_BINARY_FORMATS_OES */
- 1641, /* GL_STENCIL_BACK_FUNC */
- 1639, /* GL_STENCIL_BACK_FAIL */
- 1643, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
- 1645, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
- 559, /* GL_FRAGMENT_PROGRAM_ARB */
- 1334, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
- 1365, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
- 1364, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
- 1348, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- 1354, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- 1353, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- 971, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
- 994, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
- 993, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
- 984, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- 990, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- 989, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- 947, /* GL_MAX_DRAW_BUFFERS */
- 416, /* GL_DRAW_BUFFER0 */
- 419, /* GL_DRAW_BUFFER1 */
- 440, /* GL_DRAW_BUFFER2 */
- 443, /* GL_DRAW_BUFFER3 */
- 446, /* GL_DRAW_BUFFER4 */
- 449, /* GL_DRAW_BUFFER5 */
- 452, /* GL_DRAW_BUFFER6 */
- 455, /* GL_DRAW_BUFFER7 */
- 458, /* GL_DRAW_BUFFER8 */
- 461, /* GL_DRAW_BUFFER9 */
- 420, /* GL_DRAW_BUFFER10 */
- 423, /* GL_DRAW_BUFFER11 */
- 426, /* GL_DRAW_BUFFER12 */
- 429, /* GL_DRAW_BUFFER13 */
- 432, /* GL_DRAW_BUFFER14 */
- 435, /* GL_DRAW_BUFFER15 */
- 85, /* GL_BLEND_EQUATION_ALPHA */
- 923, /* GL_MATRIX_PALETTE_ARB */
- 964, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
- 967, /* GL_MAX_PALETTE_MATRICES_ARB */
- 335, /* GL_CURRENT_PALETTE_MATRIX_ARB */
- 911, /* GL_MATRIX_INDEX_ARRAY_ARB */
- 330, /* GL_CURRENT_MATRIX_INDEX_ARB */
- 916, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
- 920, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
- 918, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
- 914, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
- 1847, /* GL_TEXTURE_DEPTH_SIZE */
- 400, /* GL_DEPTH_TEXTURE_MODE */
- 1804, /* GL_TEXTURE_COMPARE_MODE */
- 1802, /* GL_TEXTURE_COMPARE_FUNC */
- 255, /* GL_COMPARE_R_TO_TEXTURE */
- 1266, /* GL_POINT_SPRITE */
- 309, /* GL_COORD_REPLACE */
- 1271, /* GL_POINT_SPRITE_R_MODE_NV */
- 1400, /* GL_QUERY_COUNTER_BITS */
- 338, /* GL_CURRENT_QUERY */
- 1403, /* GL_QUERY_RESULT */
- 1405, /* GL_QUERY_RESULT_AVAILABLE */
- 1026, /* GL_MAX_VERTEX_ATTRIBS */
- 2014, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
- 398, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
- 397, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
- 1006, /* GL_MAX_TEXTURE_COORDS */
- 1008, /* GL_MAX_TEXTURE_IMAGE_UNITS */
- 1341, /* GL_PROGRAM_ERROR_STRING_ARB */
- 1343, /* GL_PROGRAM_FORMAT_ASCII_ARB */
- 1342, /* GL_PROGRAM_FORMAT_ARB */
- 1901, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
- 371, /* GL_DEPTH_BOUNDS_TEST_EXT */
- 370, /* GL_DEPTH_BOUNDS_EXT */
- 53, /* GL_ARRAY_BUFFER */
- 485, /* GL_ELEMENT_ARRAY_BUFFER */
- 54, /* GL_ARRAY_BUFFER_BINDING */
- 486, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
- 1988, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
- 1120, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
- 161, /* GL_COLOR_ARRAY_BUFFER_BINDING */
- 688, /* GL_INDEX_ARRAY_BUFFER_BINDING */
- 1817, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
- 481, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
- 1550, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
- 537, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
- 2042, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
- 2010, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
- 1344, /* GL_PROGRAM_INSTRUCTIONS_ARB */
- 977, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
- 1350, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- 986, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- 1363, /* GL_PROGRAM_TEMPORARIES_ARB */
- 992, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
- 1352, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
- 988, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
- 1356, /* GL_PROGRAM_PARAMETERS_ARB */
- 991, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
- 1351, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
- 987, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
- 1335, /* GL_PROGRAM_ATTRIBS_ARB */
- 972, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
- 1349, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
- 985, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
- 1333, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
- 970, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
- 1347, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- 983, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- 978, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
- 974, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
- 1366, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
- 1926, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
- 1417, /* GL_READ_ONLY */
- 2056, /* GL_WRITE_ONLY */
- 1419, /* GL_READ_WRITE */
- 110, /* GL_BUFFER_ACCESS */
- 114, /* GL_BUFFER_MAPPED */
- 117, /* GL_BUFFER_MAP_POINTER */
- 1908, /* GL_TIME_ELAPSED_EXT */
- 871, /* GL_MATRIX0_ARB */
- 883, /* GL_MATRIX1_ARB */
- 895, /* GL_MATRIX2_ARB */
- 899, /* GL_MATRIX3_ARB */
- 901, /* GL_MATRIX4_ARB */
- 903, /* GL_MATRIX5_ARB */
- 905, /* GL_MATRIX6_ARB */
- 907, /* GL_MATRIX7_ARB */
- 909, /* GL_MATRIX8_ARB */
- 910, /* GL_MATRIX9_ARB */
- 873, /* GL_MATRIX10_ARB */
- 874, /* GL_MATRIX11_ARB */
- 875, /* GL_MATRIX12_ARB */
- 876, /* GL_MATRIX13_ARB */
- 877, /* GL_MATRIX14_ARB */
- 878, /* GL_MATRIX15_ARB */
- 879, /* GL_MATRIX16_ARB */
- 880, /* GL_MATRIX17_ARB */
- 881, /* GL_MATRIX18_ARB */
- 882, /* GL_MATRIX19_ARB */
- 885, /* GL_MATRIX20_ARB */
- 886, /* GL_MATRIX21_ARB */
- 887, /* GL_MATRIX22_ARB */
- 888, /* GL_MATRIX23_ARB */
- 889, /* GL_MATRIX24_ARB */
- 890, /* GL_MATRIX25_ARB */
- 891, /* GL_MATRIX26_ARB */
- 892, /* GL_MATRIX27_ARB */
- 893, /* GL_MATRIX28_ARB */
- 894, /* GL_MATRIX29_ARB */
- 897, /* GL_MATRIX30_ARB */
- 898, /* GL_MATRIX31_ARB */
- 1681, /* GL_STREAM_DRAW */
- 1683, /* GL_STREAM_READ */
- 1679, /* GL_STREAM_COPY */
- 1631, /* GL_STATIC_DRAW */
- 1633, /* GL_STATIC_READ */
- 1629, /* GL_STATIC_COPY */
- 475, /* GL_DYNAMIC_DRAW */
- 477, /* GL_DYNAMIC_READ */
- 473, /* GL_DYNAMIC_COPY */
- 1229, /* GL_PIXEL_PACK_BUFFER */
- 1233, /* GL_PIXEL_UNPACK_BUFFER */
- 1230, /* GL_PIXEL_PACK_BUFFER_BINDING */
- 1234, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
- 362, /* GL_DEPTH24_STENCIL8 */
- 1897, /* GL_TEXTURE_STENCIL_SIZE */
- 1845, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
- 973, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
- 976, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
- 980, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
- 979, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
- 928, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
- 1672, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
- 17, /* GL_ACTIVE_STENCIL_FACE_EXT */
- 1052, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
- 1531, /* GL_SAMPLES_PASSED */
- 1253, /* GL_POINT_SIZE_ARRAY_TYPE_OES */
- 1252, /* GL_POINT_SIZE_ARRAY_STRIDE_OES */
- 1251, /* GL_POINT_SIZE_ARRAY_POINTER_OES */
- 1089, /* GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES */
- 1369, /* GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES */
- 1879, /* GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES */
- 121, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */
- 113, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */
- 1431, /* GL_RELEASED_APPLE */
- 2039, /* GL_VOLATILE_APPLE */
- 1470, /* GL_RETAINED_APPLE */
- 1941, /* GL_UNDEFINED_APPLE */
- 1390, /* GL_PURGEABLE_APPLE */
- 560, /* GL_FRAGMENT_SHADER */
- 2034, /* GL_VERTEX_SHADER */
- 1355, /* GL_PROGRAM_OBJECT_ARB */
- 1566, /* GL_SHADER_OBJECT_ARB */
- 954, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
- 1030, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
- 1023, /* GL_MAX_VARYING_FLOATS */
- 1028, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
- 938, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
- 1149, /* GL_OBJECT_TYPE_ARB */
- 1568, /* GL_SHADER_TYPE */
- 525, /* GL_FLOAT_VEC2 */
- 527, /* GL_FLOAT_VEC3 */
- 529, /* GL_FLOAT_VEC4 */
- 717, /* GL_INT_VEC2 */
- 719, /* GL_INT_VEC3 */
- 721, /* GL_INT_VEC4 */
- 102, /* GL_BOOL */
- 104, /* GL_BOOL_VEC2 */
- 106, /* GL_BOOL_VEC3 */
- 108, /* GL_BOOL_VEC4 */
- 513, /* GL_FLOAT_MAT2 */
- 517, /* GL_FLOAT_MAT3 */
- 521, /* GL_FLOAT_MAT4 */
- 1521, /* GL_SAMPLER_1D */
- 1523, /* GL_SAMPLER_2D */
- 1525, /* GL_SAMPLER_3D */
- 1527, /* GL_SAMPLER_CUBE */
- 1522, /* GL_SAMPLER_1D_SHADOW */
- 1524, /* GL_SAMPLER_2D_SHADOW */
- 515, /* GL_FLOAT_MAT2x3 */
- 516, /* GL_FLOAT_MAT2x4 */
- 519, /* GL_FLOAT_MAT3x2 */
- 520, /* GL_FLOAT_MAT3x4 */
- 523, /* GL_FLOAT_MAT4x2 */
- 524, /* GL_FLOAT_MAT4x3 */
- 360, /* GL_DELETE_STATUS */
- 259, /* GL_COMPILE_STATUS */
- 776, /* GL_LINK_STATUS */
- 1982, /* GL_VALIDATE_STATUS */
- 700, /* GL_INFO_LOG_LENGTH */
- 56, /* GL_ATTACHED_SHADERS */
- 20, /* GL_ACTIVE_UNIFORMS */
- 21, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
- 1567, /* GL_SHADER_SOURCE_LENGTH */
+ 424, /* GL_DOUBLE */
+ 666, /* GL_HALF_FLOAT */
+ 520, /* GL_FIXED */
+ 155, /* GL_CLEAR */
+ 58, /* GL_AND */
+ 60, /* GL_AND_REVERSE */
+ 324, /* GL_COPY */
+ 59, /* GL_AND_INVERTED */
+ 1148, /* GL_NOOP */
+ 2109, /* GL_XOR */
+ 1214, /* GL_OR */
+ 1149, /* GL_NOR */
+ 502, /* GL_EQUIV */
+ 749, /* GL_INVERT */
+ 1217, /* GL_OR_REVERSE */
+ 325, /* GL_COPY_INVERTED */
+ 1216, /* GL_OR_INVERTED */
+ 1138, /* GL_NAND */
+ 1613, /* GL_SET */
+ 499, /* GL_EMISSION */
+ 1623, /* GL_SHININESS */
+ 57, /* GL_AMBIENT_AND_DIFFUSE */
+ 214, /* GL_COLOR_INDEXES */
+ 1087, /* GL_MODELVIEW */
+ 1401, /* GL_PROJECTION */
+ 1753, /* GL_TEXTURE */
+ 170, /* GL_COLOR */
+ 372, /* GL_DEPTH */
+ 1685, /* GL_STENCIL */
+ 213, /* GL_COLOR_INDEX */
+ 1705, /* GL_STENCIL_INDEX */
+ 387, /* GL_DEPTH_COMPONENT */
+ 1455, /* GL_RED */
+ 661, /* GL_GREEN */
+ 108, /* GL_BLUE */
+ 32, /* GL_ALPHA */
+ 1507, /* GL_RGB */
+ 1536, /* GL_RGBA */
+ 805, /* GL_LUMINANCE */
+ 832, /* GL_LUMINANCE_ALPHA */
+ 84, /* GL_BITMAP */
+ 1269, /* GL_POINT */
+ 771, /* GL_LINE */
+ 517, /* GL_FILL */
+ 1467, /* GL_RENDER */
+ 513, /* GL_FEEDBACK */
+ 1606, /* GL_SELECT */
+ 522, /* GL_FLAT */
+ 1634, /* GL_SMOOTH */
+ 750, /* GL_KEEP */
+ 1500, /* GL_REPLACE */
+ 695, /* GL_INCR */
+ 368, /* GL_DECR */
+ 2033, /* GL_VENDOR */
+ 1497, /* GL_RENDERER */
+ 2034, /* GL_VERSION */
+ 506, /* GL_EXTENSIONS */
+ 1570, /* GL_S */
+ 1744, /* GL_T */
+ 1442, /* GL_R */
+ 1425, /* GL_Q */
+ 1124, /* GL_MODULATE */
+ 367, /* GL_DECAL */
+ 1901, /* GL_TEXTURE_ENV_MODE */
+ 1900, /* GL_TEXTURE_ENV_COLOR */
+ 1899, /* GL_TEXTURE_ENV */
+ 507, /* GL_EYE_LINEAR */
+ 1175, /* GL_OBJECT_LINEAR */
+ 1660, /* GL_SPHERE_MAP */
+ 1904, /* GL_TEXTURE_GEN_MODE */
+ 1177, /* GL_OBJECT_PLANE */
+ 508, /* GL_EYE_PLANE */
+ 1139, /* GL_NEAREST */
+ 772, /* GL_LINEAR */
+ 1143, /* GL_NEAREST_MIPMAP_NEAREST */
+ 777, /* GL_LINEAR_MIPMAP_NEAREST */
+ 1142, /* GL_NEAREST_MIPMAP_LINEAR */
+ 776, /* GL_LINEAR_MIPMAP_LINEAR */
+ 1927, /* GL_TEXTURE_MAG_FILTER */
+ 1936, /* GL_TEXTURE_MIN_FILTER */
+ 1955, /* GL_TEXTURE_WRAP_S */
+ 1956, /* GL_TEXTURE_WRAP_T */
+ 149, /* GL_CLAMP */
+ 1499, /* GL_REPEAT */
+ 1313, /* GL_POLYGON_OFFSET_UNITS */
+ 1312, /* GL_POLYGON_OFFSET_POINT */
+ 1311, /* GL_POLYGON_OFFSET_LINE */
+ 1443, /* GL_R3_G3_B2 */
+ 2030, /* GL_V2F */
+ 2031, /* GL_V3F */
+ 146, /* GL_C4UB_V2F */
+ 147, /* GL_C4UB_V3F */
+ 144, /* GL_C3F_V3F */
+ 1136, /* GL_N3F_V3F */
+ 145, /* GL_C4F_N3F_V3F */
+ 1749, /* GL_T2F_V3F */
+ 1751, /* GL_T4F_V4F */
+ 1747, /* GL_T2F_C4UB_V3F */
+ 1745, /* GL_T2F_C3F_V3F */
+ 1748, /* GL_T2F_N3F_V3F */
+ 1746, /* GL_T2F_C4F_N3F_V3F */
+ 1750, /* GL_T4F_C4F_N3F_V4F */
+ 162, /* GL_CLIP_PLANE0 */
+ 163, /* GL_CLIP_PLANE1 */
+ 164, /* GL_CLIP_PLANE2 */
+ 165, /* GL_CLIP_PLANE3 */
+ 166, /* GL_CLIP_PLANE4 */
+ 167, /* GL_CLIP_PLANE5 */
+ 756, /* GL_LIGHT0 */
+ 757, /* GL_LIGHT1 */
+ 758, /* GL_LIGHT2 */
+ 759, /* GL_LIGHT3 */
+ 760, /* GL_LIGHT4 */
+ 761, /* GL_LIGHT5 */
+ 762, /* GL_LIGHT6 */
+ 763, /* GL_LIGHT7 */
+ 670, /* GL_HINT_BIT */
+ 301, /* GL_CONSTANT_COLOR */
+ 1188, /* GL_ONE_MINUS_CONSTANT_COLOR */
+ 296, /* GL_CONSTANT_ALPHA */
+ 1186, /* GL_ONE_MINUS_CONSTANT_ALPHA */
+ 87, /* GL_BLEND_COLOR */
+ 642, /* GL_FUNC_ADD */
+ 1071, /* GL_MIN */
+ 957, /* GL_MAX */
+ 94, /* GL_BLEND_EQUATION */
+ 648, /* GL_FUNC_SUBTRACT */
+ 645, /* GL_FUNC_REVERSE_SUBTRACT */
+ 304, /* GL_CONVOLUTION_1D */
+ 305, /* GL_CONVOLUTION_2D */
+ 1609, /* GL_SEPARABLE_2D */
+ 308, /* GL_CONVOLUTION_BORDER_MODE */
+ 312, /* GL_CONVOLUTION_FILTER_SCALE */
+ 310, /* GL_CONVOLUTION_FILTER_BIAS */
+ 1456, /* GL_REDUCE */
+ 314, /* GL_CONVOLUTION_FORMAT */
+ 318, /* GL_CONVOLUTION_WIDTH */
+ 316, /* GL_CONVOLUTION_HEIGHT */
+ 974, /* GL_MAX_CONVOLUTION_WIDTH */
+ 972, /* GL_MAX_CONVOLUTION_HEIGHT */
+ 1352, /* GL_POST_CONVOLUTION_RED_SCALE */
+ 1348, /* GL_POST_CONVOLUTION_GREEN_SCALE */
+ 1343, /* GL_POST_CONVOLUTION_BLUE_SCALE */
+ 1339, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
+ 1350, /* GL_POST_CONVOLUTION_RED_BIAS */
+ 1346, /* GL_POST_CONVOLUTION_GREEN_BIAS */
+ 1341, /* GL_POST_CONVOLUTION_BLUE_BIAS */
+ 1337, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
+ 671, /* GL_HISTOGRAM */
+ 1408, /* GL_PROXY_HISTOGRAM */
+ 687, /* GL_HISTOGRAM_WIDTH */
+ 677, /* GL_HISTOGRAM_FORMAT */
+ 683, /* GL_HISTOGRAM_RED_SIZE */
+ 679, /* GL_HISTOGRAM_GREEN_SIZE */
+ 674, /* GL_HISTOGRAM_BLUE_SIZE */
+ 672, /* GL_HISTOGRAM_ALPHA_SIZE */
+ 681, /* GL_HISTOGRAM_LUMINANCE_SIZE */
+ 685, /* GL_HISTOGRAM_SINK */
+ 1072, /* GL_MINMAX */
+ 1074, /* GL_MINMAX_FORMAT */
+ 1076, /* GL_MINMAX_SINK */
+ 1752, /* GL_TABLE_TOO_LARGE_EXT */
+ 2003, /* GL_UNSIGNED_BYTE_3_3_2 */
+ 2019, /* GL_UNSIGNED_SHORT_4_4_4_4 */
+ 2022, /* GL_UNSIGNED_SHORT_5_5_5_1 */
+ 2013, /* GL_UNSIGNED_INT_8_8_8_8 */
+ 2005, /* GL_UNSIGNED_INT_10_10_10_2 */
+ 1310, /* GL_POLYGON_OFFSET_FILL */
+ 1309, /* GL_POLYGON_OFFSET_FACTOR */
+ 1308, /* GL_POLYGON_OFFSET_BIAS */
+ 1503, /* GL_RESCALE_NORMAL */
+ 41, /* GL_ALPHA4 */
+ 43, /* GL_ALPHA8 */
+ 33, /* GL_ALPHA12 */
+ 35, /* GL_ALPHA16 */
+ 820, /* GL_LUMINANCE4 */
+ 826, /* GL_LUMINANCE8 */
+ 806, /* GL_LUMINANCE12 */
+ 812, /* GL_LUMINANCE16 */
+ 821, /* GL_LUMINANCE4_ALPHA4 */
+ 824, /* GL_LUMINANCE6_ALPHA2 */
+ 829, /* GL_LUMINANCE8_ALPHA8 */
+ 809, /* GL_LUMINANCE12_ALPHA4 */
+ 807, /* GL_LUMINANCE12_ALPHA12 */
+ 815, /* GL_LUMINANCE16_ALPHA16 */
+ 714, /* GL_INTENSITY */
+ 723, /* GL_INTENSITY4 */
+ 725, /* GL_INTENSITY8 */
+ 715, /* GL_INTENSITY12 */
+ 717, /* GL_INTENSITY16 */
+ 1518, /* GL_RGB2_EXT */
+ 1521, /* GL_RGB4 */
+ 1524, /* GL_RGB5 */
+ 1531, /* GL_RGB8 */
+ 1508, /* GL_RGB10 */
+ 1512, /* GL_RGB12 */
+ 1514, /* GL_RGB16 */
+ 1543, /* GL_RGBA2 */
+ 1547, /* GL_RGBA4 */
+ 1527, /* GL_RGB5_A1 */
+ 1552, /* GL_RGBA8 */
+ 1509, /* GL_RGB10_A2 */
+ 1537, /* GL_RGBA12 */
+ 1539, /* GL_RGBA16 */
+ 1943, /* GL_TEXTURE_RED_SIZE */
+ 1912, /* GL_TEXTURE_GREEN_SIZE */
+ 1839, /* GL_TEXTURE_BLUE_SIZE */
+ 1824, /* GL_TEXTURE_ALPHA_SIZE */
+ 1925, /* GL_TEXTURE_LUMINANCE_SIZE */
+ 1916, /* GL_TEXTURE_INTENSITY_SIZE */
+ 1501, /* GL_REPLACE_EXT */
+ 1412, /* GL_PROXY_TEXTURE_1D */
+ 1415, /* GL_PROXY_TEXTURE_2D */
+ 1950, /* GL_TEXTURE_TOO_LARGE_EXT */
+ 1938, /* GL_TEXTURE_PRIORITY */
+ 1945, /* GL_TEXTURE_RESIDENT */
+ 1827, /* GL_TEXTURE_BINDING_1D */
+ 1829, /* GL_TEXTURE_BINDING_2D */
+ 1831, /* GL_TEXTURE_BINDING_3D */
+ 1224, /* GL_PACK_SKIP_IMAGES */
+ 1220, /* GL_PACK_IMAGE_HEIGHT */
+ 1996, /* GL_UNPACK_SKIP_IMAGES */
+ 1993, /* GL_UNPACK_IMAGE_HEIGHT */
+ 1822, /* GL_TEXTURE_3D */
+ 1418, /* GL_PROXY_TEXTURE_3D */
+ 1896, /* GL_TEXTURE_DEPTH */
+ 1953, /* GL_TEXTURE_WRAP_R */
+ 958, /* GL_MAX_3D_TEXTURE_SIZE */
+ 2035, /* GL_VERTEX_ARRAY */
+ 1151, /* GL_NORMAL_ARRAY */
+ 171, /* GL_COLOR_ARRAY */
+ 699, /* GL_INDEX_ARRAY */
+ 1866, /* GL_TEXTURE_COORD_ARRAY */
+ 491, /* GL_EDGE_FLAG_ARRAY */
+ 2041, /* GL_VERTEX_ARRAY_SIZE */
+ 2043, /* GL_VERTEX_ARRAY_TYPE */
+ 2042, /* GL_VERTEX_ARRAY_STRIDE */
+ 1156, /* GL_NORMAL_ARRAY_TYPE */
+ 1155, /* GL_NORMAL_ARRAY_STRIDE */
+ 175, /* GL_COLOR_ARRAY_SIZE */
+ 177, /* GL_COLOR_ARRAY_TYPE */
+ 176, /* GL_COLOR_ARRAY_STRIDE */
+ 704, /* GL_INDEX_ARRAY_TYPE */
+ 703, /* GL_INDEX_ARRAY_STRIDE */
+ 1870, /* GL_TEXTURE_COORD_ARRAY_SIZE */
+ 1872, /* GL_TEXTURE_COORD_ARRAY_TYPE */
+ 1871, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
+ 495, /* GL_EDGE_FLAG_ARRAY_STRIDE */
+ 2040, /* GL_VERTEX_ARRAY_POINTER */
+ 1154, /* GL_NORMAL_ARRAY_POINTER */
+ 174, /* GL_COLOR_ARRAY_POINTER */
+ 702, /* GL_INDEX_ARRAY_POINTER */
+ 1869, /* GL_TEXTURE_COORD_ARRAY_POINTER */
+ 494, /* GL_EDGE_FLAG_ARRAY_POINTER */
+ 1129, /* GL_MULTISAMPLE */
+ 1583, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
+ 1585, /* GL_SAMPLE_ALPHA_TO_ONE */
+ 1590, /* GL_SAMPLE_COVERAGE */
+ 1587, /* GL_SAMPLE_BUFFERS */
+ 1578, /* GL_SAMPLES */
+ 1594, /* GL_SAMPLE_COVERAGE_VALUE */
+ 1592, /* GL_SAMPLE_COVERAGE_INVERT */
+ 219, /* GL_COLOR_MATRIX */
+ 221, /* GL_COLOR_MATRIX_STACK_DEPTH */
+ 968, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
+ 1335, /* GL_POST_COLOR_MATRIX_RED_SCALE */
+ 1331, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
+ 1326, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
+ 1322, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
+ 1333, /* GL_POST_COLOR_MATRIX_RED_BIAS */
+ 1329, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
+ 1324, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
+ 1320, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
+ 1849, /* GL_TEXTURE_COLOR_TABLE_SGI */
+ 1419, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
+ 1851, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
+ 92, /* GL_BLEND_DST_RGB */
+ 106, /* GL_BLEND_SRC_RGB */
+ 90, /* GL_BLEND_DST_ALPHA */
+ 104, /* GL_BLEND_SRC_ALPHA */
+ 225, /* GL_COLOR_TABLE */
+ 1345, /* GL_POST_CONVOLUTION_COLOR_TABLE */
+ 1328, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
+ 1407, /* GL_PROXY_COLOR_TABLE */
+ 1411, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
+ 1410, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
+ 249, /* GL_COLOR_TABLE_SCALE */
+ 229, /* GL_COLOR_TABLE_BIAS */
+ 234, /* GL_COLOR_TABLE_FORMAT */
+ 251, /* GL_COLOR_TABLE_WIDTH */
+ 246, /* GL_COLOR_TABLE_RED_SIZE */
+ 237, /* GL_COLOR_TABLE_GREEN_SIZE */
+ 231, /* GL_COLOR_TABLE_BLUE_SIZE */
+ 226, /* GL_COLOR_TABLE_ALPHA_SIZE */
+ 243, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
+ 240, /* GL_COLOR_TABLE_INTENSITY_SIZE */
+ 79, /* GL_BGR */
+ 80, /* GL_BGRA */
+ 983, /* GL_MAX_ELEMENTS_VERTICES */
+ 982, /* GL_MAX_ELEMENTS_INDICES */
+ 1915, /* GL_TEXTURE_INDEX_SIZE_EXT */
+ 168, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
+ 1291, /* GL_POINT_SIZE_MIN */
+ 1287, /* GL_POINT_SIZE_MAX */
+ 1276, /* GL_POINT_FADE_THRESHOLD_SIZE */
+ 1272, /* GL_POINT_DISTANCE_ATTENUATION */
+ 150, /* GL_CLAMP_TO_BORDER */
+ 153, /* GL_CLAMP_TO_EDGE */
+ 1937, /* GL_TEXTURE_MIN_LOD */
+ 1935, /* GL_TEXTURE_MAX_LOD */
+ 1826, /* GL_TEXTURE_BASE_LEVEL */
+ 1934, /* GL_TEXTURE_MAX_LEVEL */
+ 690, /* GL_IGNORE_BORDER_HP */
+ 300, /* GL_CONSTANT_BORDER_HP */
+ 1502, /* GL_REPLICATE_BORDER_HP */
+ 306, /* GL_CONVOLUTION_BORDER_COLOR */
+ 1183, /* GL_OCCLUSION_TEST_HP */
+ 1184, /* GL_OCCLUSION_TEST_RESULT_HP */
+ 774, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
+ 1843, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
+ 1845, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
+ 1847, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
+ 1848, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ 1846, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
+ 1844, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
+ 963, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
+ 964, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ 1355, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
+ 1357, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
+ 1354, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
+ 1356, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
+ 1923, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
+ 1924, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
+ 1922, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
+ 651, /* GL_GENERATE_MIPMAP */
+ 652, /* GL_GENERATE_MIPMAP_HINT */
+ 566, /* GL_FOG_OFFSET_SGIX */
+ 567, /* GL_FOG_OFFSET_VALUE_SGIX */
+ 1857, /* GL_TEXTURE_COMPARE_SGIX */
+ 1856, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
+ 1919, /* GL_TEXTURE_LEQUAL_R_SGIX */
+ 1911, /* GL_TEXTURE_GEQUAL_R_SGIX */
+ 388, /* GL_DEPTH_COMPONENT16 */
+ 392, /* GL_DEPTH_COMPONENT24 */
+ 396, /* GL_DEPTH_COMPONENT32 */
+ 331, /* GL_CULL_VERTEX_EXT */
+ 333, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
+ 332, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
+ 2105, /* GL_WRAP_BORDER_SUN */
+ 1850, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
+ 767, /* GL_LIGHT_MODEL_COLOR_CONTROL */
+ 1627, /* GL_SINGLE_COLOR */
+ 1611, /* GL_SEPARATE_SPECULAR_COLOR */
+ 1622, /* GL_SHARED_TEXTURE_PALETTE_EXT */
+ 578, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
+ 579, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
+ 589, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
+ 581, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
+ 577, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
+ 576, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
+ 580, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
+ 590, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
+ 607, /* GL_FRAMEBUFFER_DEFAULT */
+ 633, /* GL_FRAMEBUFFER_UNDEFINED */
+ 404, /* GL_DEPTH_STENCIL_ATTACHMENT */
+ 698, /* GL_INDEX */
+ 2002, /* GL_UNSIGNED_BYTE_2_3_3_REV */
+ 2023, /* GL_UNSIGNED_SHORT_5_6_5 */
+ 2024, /* GL_UNSIGNED_SHORT_5_6_5_REV */
+ 2020, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
+ 2017, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
+ 2014, /* GL_UNSIGNED_INT_8_8_8_8_REV */
+ 2011, /* GL_UNSIGNED_INT_2_10_10_10_REV */
+ 1932, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
+ 1933, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
+ 1931, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
+ 1079, /* GL_MIRRORED_REPEAT */
+ 1565, /* GL_RGB_S3TC */
+ 1523, /* GL_RGB4_S3TC */
+ 1562, /* GL_RGBA_S3TC */
+ 1551, /* GL_RGBA4_S3TC */
+ 1558, /* GL_RGBA_DXT5_S3TC */
+ 1548, /* GL_RGBA4_DXT5_S3TC */
+ 288, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
+ 283, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
+ 284, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
+ 285, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
+ 1141, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
+ 1140, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
+ 775, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
+ 553, /* GL_FOG_COORDINATE_SOURCE */
+ 545, /* GL_FOG_COORD */
+ 569, /* GL_FRAGMENT_DEPTH */
+ 337, /* GL_CURRENT_FOG_COORD */
+ 552, /* GL_FOG_COORDINATE_ARRAY_TYPE */
+ 551, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
+ 550, /* GL_FOG_COORDINATE_ARRAY_POINTER */
+ 547, /* GL_FOG_COORDINATE_ARRAY */
+ 223, /* GL_COLOR_SUM */
+ 358, /* GL_CURRENT_SECONDARY_COLOR */
+ 1603, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
+ 1605, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
+ 1604, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
+ 1602, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
+ 1599, /* GL_SECONDARY_COLOR_ARRAY */
+ 356, /* GL_CURRENT_RASTER_SECONDARY_COLOR */
+ 29, /* GL_ALIASED_POINT_SIZE_RANGE */
+ 28, /* GL_ALIASED_LINE_WIDTH_RANGE */
+ 1754, /* GL_TEXTURE0 */
+ 1756, /* GL_TEXTURE1 */
+ 1778, /* GL_TEXTURE2 */
+ 1800, /* GL_TEXTURE3 */
+ 1806, /* GL_TEXTURE4 */
+ 1808, /* GL_TEXTURE5 */
+ 1810, /* GL_TEXTURE6 */
+ 1812, /* GL_TEXTURE7 */
+ 1814, /* GL_TEXTURE8 */
+ 1816, /* GL_TEXTURE9 */
+ 1757, /* GL_TEXTURE10 */
+ 1759, /* GL_TEXTURE11 */
+ 1761, /* GL_TEXTURE12 */
+ 1763, /* GL_TEXTURE13 */
+ 1765, /* GL_TEXTURE14 */
+ 1767, /* GL_TEXTURE15 */
+ 1769, /* GL_TEXTURE16 */
+ 1771, /* GL_TEXTURE17 */
+ 1773, /* GL_TEXTURE18 */
+ 1775, /* GL_TEXTURE19 */
+ 1779, /* GL_TEXTURE20 */
+ 1781, /* GL_TEXTURE21 */
+ 1783, /* GL_TEXTURE22 */
+ 1785, /* GL_TEXTURE23 */
+ 1787, /* GL_TEXTURE24 */
+ 1789, /* GL_TEXTURE25 */
+ 1791, /* GL_TEXTURE26 */
+ 1793, /* GL_TEXTURE27 */
+ 1795, /* GL_TEXTURE28 */
+ 1797, /* GL_TEXTURE29 */
+ 1801, /* GL_TEXTURE30 */
+ 1803, /* GL_TEXTURE31 */
+ 19, /* GL_ACTIVE_TEXTURE */
+ 156, /* GL_CLIENT_ACTIVE_TEXTURE */
+ 1047, /* GL_MAX_TEXTURE_UNITS */
+ 1977, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
+ 1980, /* GL_TRANSPOSE_PROJECTION_MATRIX */
+ 1982, /* GL_TRANSPOSE_TEXTURE_MATRIX */
+ 1974, /* GL_TRANSPOSE_COLOR_MATRIX */
+ 1736, /* GL_SUBTRACT */
+ 1030, /* GL_MAX_RENDERBUFFER_SIZE */
+ 271, /* GL_COMPRESSED_ALPHA */
+ 275, /* GL_COMPRESSED_LUMINANCE */
+ 276, /* GL_COMPRESSED_LUMINANCE_ALPHA */
+ 273, /* GL_COMPRESSED_INTENSITY */
+ 279, /* GL_COMPRESSED_RGB */
+ 280, /* GL_COMPRESSED_RGBA */
+ 1864, /* GL_TEXTURE_COMPRESSION_HINT */
+ 1941, /* GL_TEXTURE_RECTANGLE_ARB */
+ 1836, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
+ 1422, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
+ 1028, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
+ 403, /* GL_DEPTH_STENCIL */
+ 2007, /* GL_UNSIGNED_INT_24_8 */
+ 1042, /* GL_MAX_TEXTURE_LOD_BIAS */
+ 1930, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
+ 1044, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
+ 1902, /* GL_TEXTURE_FILTER_CONTROL */
+ 1920, /* GL_TEXTURE_LOD_BIAS */
+ 256, /* GL_COMBINE4 */
+ 1036, /* GL_MAX_SHININESS_NV */
+ 1037, /* GL_MAX_SPOT_EXPONENT_NV */
+ 696, /* GL_INCR_WRAP */
+ 369, /* GL_DECR_WRAP */
+ 1099, /* GL_MODELVIEW1_ARB */
+ 1157, /* GL_NORMAL_MAP */
+ 1462, /* GL_REFLECTION_MAP */
+ 1874, /* GL_TEXTURE_CUBE_MAP */
+ 1833, /* GL_TEXTURE_BINDING_CUBE_MAP */
+ 1886, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
+ 1876, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
+ 1889, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
+ 1879, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
+ 1892, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
+ 1882, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
+ 1420, /* GL_PROXY_TEXTURE_CUBE_MAP */
+ 976, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
+ 1135, /* GL_MULTISAMPLE_FILTER_HINT_NV */
+ 1366, /* GL_PRIMITIVE_RESTART_NV */
+ 1365, /* GL_PRIMITIVE_RESTART_INDEX_NV */
+ 561, /* GL_FOG_DISTANCE_MODE_NV */
+ 510, /* GL_EYE_RADIAL_NV */
+ 509, /* GL_EYE_PLANE_ABSOLUTE_NV */
+ 255, /* GL_COMBINE */
+ 262, /* GL_COMBINE_RGB */
+ 257, /* GL_COMBINE_ALPHA */
+ 1566, /* GL_RGB_SCALE */
+ 25, /* GL_ADD_SIGNED */
+ 731, /* GL_INTERPOLATE */
+ 295, /* GL_CONSTANT */
+ 1361, /* GL_PRIMARY_COLOR */
+ 1358, /* GL_PREVIOUS */
+ 1642, /* GL_SOURCE0_RGB */
+ 1648, /* GL_SOURCE1_RGB */
+ 1654, /* GL_SOURCE2_RGB */
+ 1658, /* GL_SOURCE3_RGB_NV */
+ 1639, /* GL_SOURCE0_ALPHA */
+ 1645, /* GL_SOURCE1_ALPHA */
+ 1651, /* GL_SOURCE2_ALPHA */
+ 1657, /* GL_SOURCE3_ALPHA_NV */
+ 1197, /* GL_OPERAND0_RGB */
+ 1203, /* GL_OPERAND1_RGB */
+ 1209, /* GL_OPERAND2_RGB */
+ 1213, /* GL_OPERAND3_RGB_NV */
+ 1194, /* GL_OPERAND0_ALPHA */
+ 1200, /* GL_OPERAND1_ALPHA */
+ 1206, /* GL_OPERAND2_ALPHA */
+ 1212, /* GL_OPERAND3_ALPHA_NV */
+ 131, /* GL_BUFFER_OBJECT_APPLE */
+ 2036, /* GL_VERTEX_ARRAY_BINDING */
+ 1939, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
+ 1940, /* GL_TEXTURE_RANGE_POINTER_APPLE */
+ 2110, /* GL_YCBCR_422_APPLE */
+ 2025, /* GL_UNSIGNED_SHORT_8_8_APPLE */
+ 2027, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
+ 1949, /* GL_TEXTURE_STORAGE_HINT_APPLE */
+ 1727, /* GL_STORAGE_PRIVATE_APPLE */
+ 1726, /* GL_STORAGE_CACHED_APPLE */
+ 1728, /* GL_STORAGE_SHARED_APPLE */
+ 1629, /* GL_SLICE_ACCUM_SUN */
+ 1430, /* GL_QUAD_MESH_SUN */
+ 1987, /* GL_TRIANGLE_MESH_SUN */
+ 2075, /* GL_VERTEX_PROGRAM_ARB */
+ 2086, /* GL_VERTEX_STATE_PROGRAM_NV */
+ 2062, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
+ 2068, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
+ 2070, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
+ 2072, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+ 360, /* GL_CURRENT_VERTEX_ATTRIB */
+ 1379, /* GL_PROGRAM_LENGTH_ARB */
+ 1394, /* GL_PROGRAM_STRING_ARB */
+ 1122, /* GL_MODELVIEW_PROJECTION_NV */
+ 689, /* GL_IDENTITY_NV */
+ 747, /* GL_INVERSE_NV */
+ 1979, /* GL_TRANSPOSE_NV */
+ 748, /* GL_INVERSE_TRANSPOSE_NV */
+ 1014, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
+ 1013, /* GL_MAX_PROGRAM_MATRICES_ARB */
+ 904, /* GL_MATRIX0_NV */
+ 916, /* GL_MATRIX1_NV */
+ 928, /* GL_MATRIX2_NV */
+ 932, /* GL_MATRIX3_NV */
+ 934, /* GL_MATRIX4_NV */
+ 936, /* GL_MATRIX5_NV */
+ 938, /* GL_MATRIX6_NV */
+ 940, /* GL_MATRIX7_NV */
+ 343, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
+ 340, /* GL_CURRENT_MATRIX_ARB */
+ 2078, /* GL_VERTEX_PROGRAM_POINT_SIZE */
+ 2081, /* GL_VERTEX_PROGRAM_TWO_SIDE */
+ 1391, /* GL_PROGRAM_PARAMETER_NV */
+ 2066, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
+ 1396, /* GL_PROGRAM_TARGET_NV */
+ 1393, /* GL_PROGRAM_RESIDENT_NV */
+ 1959, /* GL_TRACK_MATRIX_NV */
+ 1960, /* GL_TRACK_MATRIX_TRANSFORM_NV */
+ 2076, /* GL_VERTEX_PROGRAM_BINDING_NV */
+ 1373, /* GL_PROGRAM_ERROR_POSITION_ARB */
+ 384, /* GL_DEPTH_CLAMP */
+ 2044, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
+ 2051, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
+ 2052, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
+ 2053, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
+ 2054, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
+ 2055, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
+ 2056, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
+ 2057, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
+ 2058, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
+ 2059, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
+ 2045, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
+ 2046, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
+ 2047, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
+ 2048, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
+ 2049, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
+ 2050, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
+ 852, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
+ 859, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
+ 860, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
+ 861, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
+ 862, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
+ 863, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
+ 864, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
+ 865, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
+ 866, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
+ 867, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
+ 853, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
+ 854, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
+ 855, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
+ 856, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
+ 857, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
+ 858, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
+ 879, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
+ 886, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
+ 887, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
+ 888, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
+ 889, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
+ 890, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
+ 891, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
+ 1372, /* GL_PROGRAM_BINDING_ARB */
+ 893, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
+ 894, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
+ 880, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
+ 881, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
+ 882, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
+ 883, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
+ 884, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
+ 885, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
+ 1862, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
+ 1859, /* GL_TEXTURE_COMPRESSED */
+ 1163, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
+ 293, /* GL_COMPRESSED_TEXTURE_FORMATS */
+ 1065, /* GL_MAX_VERTEX_UNITS_ARB */
+ 23, /* GL_ACTIVE_VERTEX_UNITS_ARB */
+ 2104, /* GL_WEIGHT_SUM_UNITY_ARB */
+ 2074, /* GL_VERTEX_BLEND_ARB */
+ 362, /* GL_CURRENT_WEIGHT_ARB */
+ 2102, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+ 2100, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+ 2098, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+ 2096, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+ 2091, /* GL_WEIGHT_ARRAY_ARB */
+ 418, /* GL_DOT3_RGB */
+ 419, /* GL_DOT3_RGBA */
+ 287, /* GL_COMPRESSED_RGB_FXT1_3DFX */
+ 282, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
+ 1130, /* GL_MULTISAMPLE_3DFX */
+ 1588, /* GL_SAMPLE_BUFFERS_3DFX */
+ 1579, /* GL_SAMPLES_3DFX */
+ 1110, /* GL_MODELVIEW2_ARB */
+ 1113, /* GL_MODELVIEW3_ARB */
+ 1114, /* GL_MODELVIEW4_ARB */
+ 1115, /* GL_MODELVIEW5_ARB */
+ 1116, /* GL_MODELVIEW6_ARB */
+ 1117, /* GL_MODELVIEW7_ARB */
+ 1118, /* GL_MODELVIEW8_ARB */
+ 1119, /* GL_MODELVIEW9_ARB */
+ 1089, /* GL_MODELVIEW10_ARB */
+ 1090, /* GL_MODELVIEW11_ARB */
+ 1091, /* GL_MODELVIEW12_ARB */
+ 1092, /* GL_MODELVIEW13_ARB */
+ 1093, /* GL_MODELVIEW14_ARB */
+ 1094, /* GL_MODELVIEW15_ARB */
+ 1095, /* GL_MODELVIEW16_ARB */
+ 1096, /* GL_MODELVIEW17_ARB */
+ 1097, /* GL_MODELVIEW18_ARB */
+ 1098, /* GL_MODELVIEW19_ARB */
+ 1100, /* GL_MODELVIEW20_ARB */
+ 1101, /* GL_MODELVIEW21_ARB */
+ 1102, /* GL_MODELVIEW22_ARB */
+ 1103, /* GL_MODELVIEW23_ARB */
+ 1104, /* GL_MODELVIEW24_ARB */
+ 1105, /* GL_MODELVIEW25_ARB */
+ 1106, /* GL_MODELVIEW26_ARB */
+ 1107, /* GL_MODELVIEW27_ARB */
+ 1108, /* GL_MODELVIEW28_ARB */
+ 1109, /* GL_MODELVIEW29_ARB */
+ 1111, /* GL_MODELVIEW30_ARB */
+ 1112, /* GL_MODELVIEW31_ARB */
+ 423, /* GL_DOT3_RGB_EXT */
+ 421, /* GL_DOT3_RGBA_EXT */
+ 1083, /* GL_MIRROR_CLAMP_EXT */
+ 1086, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
+ 1125, /* GL_MODULATE_ADD_ATI */
+ 1126, /* GL_MODULATE_SIGNED_ADD_ATI */
+ 1127, /* GL_MODULATE_SUBTRACT_ATI */
+ 2111, /* GL_YCBCR_MESA */
+ 1221, /* GL_PACK_INVERT_MESA */
+ 365, /* GL_DEBUG_OBJECT_MESA */
+ 366, /* GL_DEBUG_PRINT_MESA */
+ 364, /* GL_DEBUG_ASSERT_MESA */
+ 133, /* GL_BUFFER_SIZE */
+ 135, /* GL_BUFFER_USAGE */
+ 139, /* GL_BUMP_ROT_MATRIX_ATI */
+ 140, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */
+ 138, /* GL_BUMP_NUM_TEX_UNITS_ATI */
+ 142, /* GL_BUMP_TEX_UNITS_ATI */
+ 483, /* GL_DUDV_ATI */
+ 482, /* GL_DU8DV8_ATI */
+ 137, /* GL_BUMP_ENVMAP_ATI */
+ 141, /* GL_BUMP_TARGET_ATI */
+ 1165, /* GL_NUM_PROGRAM_BINARY_FORMATS_OES */
+ 1370, /* GL_PROGRAM_BINARY_FORMATS_OES */
+ 1691, /* GL_STENCIL_BACK_FUNC */
+ 1689, /* GL_STENCIL_BACK_FAIL */
+ 1693, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
+ 1695, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
+ 570, /* GL_FRAGMENT_PROGRAM_ARB */
+ 1368, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ 1399, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ 1398, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
+ 1382, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ 1388, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ 1387, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ 1003, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ 1026, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ 1025, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
+ 1016, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ 1022, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ 1021, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ 979, /* GL_MAX_DRAW_BUFFERS */
+ 427, /* GL_DRAW_BUFFER0 */
+ 430, /* GL_DRAW_BUFFER1 */
+ 451, /* GL_DRAW_BUFFER2 */
+ 454, /* GL_DRAW_BUFFER3 */
+ 457, /* GL_DRAW_BUFFER4 */
+ 460, /* GL_DRAW_BUFFER5 */
+ 463, /* GL_DRAW_BUFFER6 */
+ 466, /* GL_DRAW_BUFFER7 */
+ 469, /* GL_DRAW_BUFFER8 */
+ 472, /* GL_DRAW_BUFFER9 */
+ 431, /* GL_DRAW_BUFFER10 */
+ 434, /* GL_DRAW_BUFFER11 */
+ 437, /* GL_DRAW_BUFFER12 */
+ 440, /* GL_DRAW_BUFFER13 */
+ 443, /* GL_DRAW_BUFFER14 */
+ 446, /* GL_DRAW_BUFFER15 */
+ 95, /* GL_BLEND_EQUATION_ALPHA */
+ 955, /* GL_MATRIX_PALETTE_ARB */
+ 996, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
+ 999, /* GL_MAX_PALETTE_MATRICES_ARB */
+ 346, /* GL_CURRENT_PALETTE_MATRIX_ARB */
+ 943, /* GL_MATRIX_INDEX_ARRAY_ARB */
+ 341, /* GL_CURRENT_MATRIX_INDEX_ARB */
+ 948, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
+ 952, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
+ 950, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
+ 946, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
+ 1897, /* GL_TEXTURE_DEPTH_SIZE */
+ 411, /* GL_DEPTH_TEXTURE_MODE */
+ 1854, /* GL_TEXTURE_COMPARE_MODE */
+ 1852, /* GL_TEXTURE_COMPARE_FUNC */
+ 266, /* GL_COMPARE_R_TO_TEXTURE */
+ 1298, /* GL_POINT_SPRITE */
+ 320, /* GL_COORD_REPLACE */
+ 1303, /* GL_POINT_SPRITE_R_MODE_NV */
+ 1434, /* GL_QUERY_COUNTER_BITS */
+ 349, /* GL_CURRENT_QUERY */
+ 1437, /* GL_QUERY_RESULT */
+ 1439, /* GL_QUERY_RESULT_AVAILABLE */
+ 1058, /* GL_MAX_VERTEX_ATTRIBS */
+ 2064, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
+ 409, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
+ 408, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
+ 1038, /* GL_MAX_TEXTURE_COORDS */
+ 1040, /* GL_MAX_TEXTURE_IMAGE_UNITS */
+ 1375, /* GL_PROGRAM_ERROR_STRING_ARB */
+ 1377, /* GL_PROGRAM_FORMAT_ASCII_ARB */
+ 1376, /* GL_PROGRAM_FORMAT_ARB */
+ 1951, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
+ 382, /* GL_DEPTH_BOUNDS_TEST_EXT */
+ 381, /* GL_DEPTH_BOUNDS_EXT */
+ 61, /* GL_ARRAY_BUFFER */
+ 496, /* GL_ELEMENT_ARRAY_BUFFER */
+ 62, /* GL_ARRAY_BUFFER_BINDING */
+ 497, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
+ 2038, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+ 1152, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
+ 172, /* GL_COLOR_ARRAY_BUFFER_BINDING */
+ 700, /* GL_INDEX_ARRAY_BUFFER_BINDING */
+ 1867, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
+ 492, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
+ 1600, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
+ 548, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
+ 2092, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+ 2060, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
+ 1378, /* GL_PROGRAM_INSTRUCTIONS_ARB */
+ 1009, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
+ 1384, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ 1018, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ 1397, /* GL_PROGRAM_TEMPORARIES_ARB */
+ 1024, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
+ 1386, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ 1020, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ 1390, /* GL_PROGRAM_PARAMETERS_ARB */
+ 1023, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
+ 1385, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
+ 1019, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
+ 1369, /* GL_PROGRAM_ATTRIBS_ARB */
+ 1004, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
+ 1383, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
+ 1017, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
+ 1367, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
+ 1002, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
+ 1381, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ 1015, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ 1010, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
+ 1006, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
+ 1400, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
+ 1976, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
+ 1451, /* GL_READ_ONLY */
+ 2106, /* GL_WRITE_ONLY */
+ 1453, /* GL_READ_WRITE */
+ 121, /* GL_BUFFER_ACCESS */
+ 125, /* GL_BUFFER_MAPPED */
+ 128, /* GL_BUFFER_MAP_POINTER */
+ 1958, /* GL_TIME_ELAPSED_EXT */
+ 903, /* GL_MATRIX0_ARB */
+ 915, /* GL_MATRIX1_ARB */
+ 927, /* GL_MATRIX2_ARB */
+ 931, /* GL_MATRIX3_ARB */
+ 933, /* GL_MATRIX4_ARB */
+ 935, /* GL_MATRIX5_ARB */
+ 937, /* GL_MATRIX6_ARB */
+ 939, /* GL_MATRIX7_ARB */
+ 941, /* GL_MATRIX8_ARB */
+ 942, /* GL_MATRIX9_ARB */
+ 905, /* GL_MATRIX10_ARB */
+ 906, /* GL_MATRIX11_ARB */
+ 907, /* GL_MATRIX12_ARB */
+ 908, /* GL_MATRIX13_ARB */
+ 909, /* GL_MATRIX14_ARB */
+ 910, /* GL_MATRIX15_ARB */
+ 911, /* GL_MATRIX16_ARB */
+ 912, /* GL_MATRIX17_ARB */
+ 913, /* GL_MATRIX18_ARB */
+ 914, /* GL_MATRIX19_ARB */
+ 917, /* GL_MATRIX20_ARB */
+ 918, /* GL_MATRIX21_ARB */
+ 919, /* GL_MATRIX22_ARB */
+ 920, /* GL_MATRIX23_ARB */
+ 921, /* GL_MATRIX24_ARB */
+ 922, /* GL_MATRIX25_ARB */
+ 923, /* GL_MATRIX26_ARB */
+ 924, /* GL_MATRIX27_ARB */
+ 925, /* GL_MATRIX28_ARB */
+ 926, /* GL_MATRIX29_ARB */
+ 929, /* GL_MATRIX30_ARB */
+ 930, /* GL_MATRIX31_ARB */
+ 1731, /* GL_STREAM_DRAW */
+ 1733, /* GL_STREAM_READ */
+ 1729, /* GL_STREAM_COPY */
+ 1681, /* GL_STATIC_DRAW */
+ 1683, /* GL_STATIC_READ */
+ 1679, /* GL_STATIC_COPY */
+ 486, /* GL_DYNAMIC_DRAW */
+ 488, /* GL_DYNAMIC_READ */
+ 484, /* GL_DYNAMIC_COPY */
+ 1261, /* GL_PIXEL_PACK_BUFFER */
+ 1265, /* GL_PIXEL_UNPACK_BUFFER */
+ 1262, /* GL_PIXEL_PACK_BUFFER_BINDING */
+ 1266, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
+ 373, /* GL_DEPTH24_STENCIL8 */
+ 1947, /* GL_TEXTURE_STENCIL_SIZE */
+ 1895, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
+ 1005, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
+ 1008, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
+ 1012, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
+ 1011, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
+ 960, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
+ 1722, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
+ 18, /* GL_ACTIVE_STENCIL_FACE_EXT */
+ 1084, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
+ 1581, /* GL_SAMPLES_PASSED */
+ 1285, /* GL_POINT_SIZE_ARRAY_TYPE_OES */
+ 1284, /* GL_POINT_SIZE_ARRAY_STRIDE_OES */
+ 1283, /* GL_POINT_SIZE_ARRAY_POINTER_OES */
+ 1121, /* GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES */
+ 1403, /* GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES */
+ 1929, /* GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES */
+ 132, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */
+ 124, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */
+ 1466, /* GL_RELEASED_APPLE */
+ 2089, /* GL_VOLATILE_APPLE */
+ 1505, /* GL_RETAINED_APPLE */
+ 1991, /* GL_UNDEFINED_APPLE */
+ 1424, /* GL_PURGEABLE_APPLE */
+ 571, /* GL_FRAGMENT_SHADER */
+ 2084, /* GL_VERTEX_SHADER */
+ 1389, /* GL_PROGRAM_OBJECT_ARB */
+ 1616, /* GL_SHADER_OBJECT_ARB */
+ 986, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
+ 1062, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
+ 1055, /* GL_MAX_VARYING_FLOATS */
+ 1060, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
+ 970, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
+ 1181, /* GL_OBJECT_TYPE_ARB */
+ 1618, /* GL_SHADER_TYPE */
+ 536, /* GL_FLOAT_VEC2 */
+ 538, /* GL_FLOAT_VEC3 */
+ 540, /* GL_FLOAT_VEC4 */
+ 735, /* GL_INT_VEC2 */
+ 737, /* GL_INT_VEC3 */
+ 739, /* GL_INT_VEC4 */
+ 113, /* GL_BOOL */
+ 115, /* GL_BOOL_VEC2 */
+ 117, /* GL_BOOL_VEC3 */
+ 119, /* GL_BOOL_VEC4 */
+ 524, /* GL_FLOAT_MAT2 */
+ 528, /* GL_FLOAT_MAT3 */
+ 532, /* GL_FLOAT_MAT4 */
+ 1571, /* GL_SAMPLER_1D */
+ 1573, /* GL_SAMPLER_2D */
+ 1575, /* GL_SAMPLER_3D */
+ 1577, /* GL_SAMPLER_CUBE */
+ 1572, /* GL_SAMPLER_1D_SHADOW */
+ 1574, /* GL_SAMPLER_2D_SHADOW */
+ 526, /* GL_FLOAT_MAT2x3 */
+ 527, /* GL_FLOAT_MAT2x4 */
+ 530, /* GL_FLOAT_MAT3x2 */
+ 531, /* GL_FLOAT_MAT3x4 */
+ 534, /* GL_FLOAT_MAT4x2 */
+ 535, /* GL_FLOAT_MAT4x3 */
+ 371, /* GL_DELETE_STATUS */
+ 270, /* GL_COMPILE_STATUS */
+ 794, /* GL_LINK_STATUS */
+ 2032, /* GL_VALIDATE_STATUS */
+ 712, /* GL_INFO_LOG_LENGTH */
+ 64, /* GL_ATTACHED_SHADERS */
+ 21, /* GL_ACTIVE_UNIFORMS */
+ 22, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
+ 1617, /* GL_SHADER_SOURCE_LENGTH */
15, /* GL_ACTIVE_ATTRIBUTES */
16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
- 562, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
- 1570, /* GL_SHADING_LANGUAGE_VERSION */
- 337, /* GL_CURRENT_PROGRAM */
- 1198, /* GL_PALETTE4_RGB8_OES */
- 1200, /* GL_PALETTE4_RGBA8_OES */
- 1196, /* GL_PALETTE4_R5_G6_B5_OES */
- 1199, /* GL_PALETTE4_RGBA4_OES */
- 1197, /* GL_PALETTE4_RGB5_A1_OES */
- 1203, /* GL_PALETTE8_RGB8_OES */
- 1205, /* GL_PALETTE8_RGBA8_OES */
- 1201, /* GL_PALETTE8_R5_G6_B5_OES */
- 1204, /* GL_PALETTE8_RGBA4_OES */
- 1202, /* GL_PALETTE8_RGB5_A1_OES */
- 682, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
- 680, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
- 1250, /* GL_POINT_SIZE_ARRAY_OES */
- 1823, /* GL_TEXTURE_CROP_RECT_OES */
- 912, /* GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES */
- 1249, /* GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES */
- 1965, /* GL_UNSIGNED_NORMALIZED */
- 1769, /* GL_TEXTURE_1D_ARRAY_EXT */
- 1379, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
- 1771, /* GL_TEXTURE_2D_ARRAY_EXT */
- 1382, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
- 1778, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
- 1780, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
- 958, /* GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB */
- 1623, /* GL_SRGB */
- 1624, /* GL_SRGB8 */
- 1626, /* GL_SRGB_ALPHA */
- 1625, /* GL_SRGB8_ALPHA8 */
- 1583, /* GL_SLUMINANCE_ALPHA */
- 1582, /* GL_SLUMINANCE8_ALPHA8 */
- 1580, /* GL_SLUMINANCE */
- 1581, /* GL_SLUMINANCE8 */
- 280, /* GL_COMPRESSED_SRGB */
- 281, /* GL_COMPRESSED_SRGB_ALPHA */
- 278, /* GL_COMPRESSED_SLUMINANCE */
- 279, /* GL_COMPRESSED_SLUMINANCE_ALPHA */
- 1923, /* GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT */
- 1917, /* GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT */
- 1021, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT */
- 1922, /* GL_TRANSFORM_FEEDBACK_VARYINGS_EXT */
- 1920, /* GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT */
- 1919, /* GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT */
- 1332, /* GL_PRIMITIVES_GENERATED_EXT */
- 1921, /* GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT */
- 1410, /* GL_RASTERIZER_DISCARD_EXT */
- 1019, /* GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT */
- 1020, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT */
- 712, /* GL_INTERLEAVED_ATTRIBS_EXT */
- 1560, /* GL_SEPARATE_ATTRIBS_EXT */
- 1916, /* GL_TRANSFORM_FEEDBACK_BUFFER_EXT */
- 1915, /* GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT */
- 1268, /* GL_POINT_SPRITE_COORD_ORIGIN */
- 784, /* GL_LOWER_LEFT */
- 1979, /* GL_UPPER_LEFT */
- 1647, /* GL_STENCIL_BACK_REF */
- 1648, /* GL_STENCIL_BACK_VALUE_MASK */
- 1649, /* GL_STENCIL_BACK_WRITEMASK */
- 465, /* GL_DRAW_FRAMEBUFFER_BINDING */
- 1436, /* GL_RENDERBUFFER_BINDING */
- 1413, /* GL_READ_FRAMEBUFFER */
- 464, /* GL_DRAW_FRAMEBUFFER */
- 1414, /* GL_READ_FRAMEBUFFER_BINDING */
- 1455, /* GL_RENDERBUFFER_SAMPLES */
- 575, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
- 572, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
- 587, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
- 582, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
- 585, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
- 593, /* GL_FRAMEBUFFER_COMPLETE */
- 598, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
- 612, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
- 607, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
- 602, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
- 608, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
- 604, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
- 617, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
- 623, /* GL_FRAMEBUFFER_UNSUPPORTED */
- 621, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
- 934, /* GL_MAX_COLOR_ATTACHMENTS */
- 167, /* GL_COLOR_ATTACHMENT0 */
- 170, /* GL_COLOR_ATTACHMENT1 */
- 184, /* GL_COLOR_ATTACHMENT2 */
- 186, /* GL_COLOR_ATTACHMENT3 */
- 188, /* GL_COLOR_ATTACHMENT4 */
- 190, /* GL_COLOR_ATTACHMENT5 */
- 192, /* GL_COLOR_ATTACHMENT6 */
- 194, /* GL_COLOR_ATTACHMENT7 */
- 196, /* GL_COLOR_ATTACHMENT8 */
- 198, /* GL_COLOR_ATTACHMENT9 */
- 171, /* GL_COLOR_ATTACHMENT10 */
- 173, /* GL_COLOR_ATTACHMENT11 */
- 175, /* GL_COLOR_ATTACHMENT12 */
- 177, /* GL_COLOR_ATTACHMENT13 */
- 179, /* GL_COLOR_ATTACHMENT14 */
- 181, /* GL_COLOR_ATTACHMENT15 */
- 365, /* GL_DEPTH_ATTACHMENT */
- 1636, /* GL_STENCIL_ATTACHMENT */
- 564, /* GL_FRAMEBUFFER */
- 1433, /* GL_RENDERBUFFER */
- 1459, /* GL_RENDERBUFFER_WIDTH */
- 1446, /* GL_RENDERBUFFER_HEIGHT */
- 1449, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
- 1667, /* GL_STENCIL_INDEX_EXT */
- 1656, /* GL_STENCIL_INDEX1 */
- 1661, /* GL_STENCIL_INDEX4 */
- 1664, /* GL_STENCIL_INDEX8 */
- 1657, /* GL_STENCIL_INDEX16 */
- 1453, /* GL_RENDERBUFFER_RED_SIZE */
- 1444, /* GL_RENDERBUFFER_GREEN_SIZE */
- 1439, /* GL_RENDERBUFFER_BLUE_SIZE */
- 1434, /* GL_RENDERBUFFER_ALPHA_SIZE */
- 1441, /* GL_RENDERBUFFER_DEPTH_SIZE */
- 1457, /* GL_RENDERBUFFER_STENCIL_SIZE */
- 615, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
- 1001, /* GL_MAX_SAMPLES */
- 1859, /* GL_TEXTURE_GEN_STR_OES */
- 655, /* GL_HALF_FLOAT_OES */
- 1487, /* GL_RGB565_OES */
- 571, /* GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB */
- 611, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB */
- 610, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB */
- 646, /* GL_GEOMETRY_SHADER_ARB */
- 647, /* GL_GEOMETRY_VERTICES_OUT_ARB */
- 644, /* GL_GEOMETRY_INPUT_TYPE_ARB */
- 645, /* GL_GEOMETRY_OUTPUT_TYPE_ARB */
- 961, /* GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB */
- 1035, /* GL_MAX_VERTEX_VARYING_COMPONENTS_ARB */
- 960, /* GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB */
- 957, /* GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB */
- 959, /* GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB */
- 785, /* GL_LOW_FLOAT */
- 1037, /* GL_MEDIUM_FLOAT */
- 656, /* GL_HIGH_FLOAT */
- 786, /* GL_LOW_INT */
- 1038, /* GL_MEDIUM_INT */
- 657, /* GL_HIGH_INT */
- 1956, /* GL_UNSIGNED_INT_10_10_10_2_OES */
- 716, /* GL_INT_10_10_10_2_OES */
- 1564, /* GL_SHADER_BINARY_FORMATS */
- 1134, /* GL_NUM_SHADER_BINARY_FORMATS */
- 1565, /* GL_SHADER_COMPILER */
- 1032, /* GL_MAX_VERTEX_UNIFORM_VECTORS */
- 1025, /* GL_MAX_VARYING_VECTORS */
- 956, /* GL_MAX_FRAGMENT_UNIFORM_VECTORS */
- 1407, /* GL_QUERY_WAIT_NV */
- 1402, /* GL_QUERY_NO_WAIT_NV */
- 1399, /* GL_QUERY_BY_REGION_WAIT_NV */
- 1398, /* GL_QUERY_BY_REGION_NO_WAIT_NV */
- 1912, /* GL_TRANSFORM_FEEDBACK */
- 1918, /* GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED */
- 1914, /* GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE */
- 1913, /* GL_TRANSFORM_FEEDBACK_BINDING */
- 1394, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
- 507, /* GL_FIRST_VERTEX_CONVENTION */
- 733, /* GL_LAST_VERTEX_CONVENTION */
- 1371, /* GL_PROVOKING_VERTEX */
- 316, /* GL_COPY_READ_BUFFER */
- 317, /* GL_COPY_WRITE_BUFFER */
- 1514, /* GL_RGBA_SNORM */
- 1510, /* GL_RGBA8_SNORM */
- 1576, /* GL_SIGNED_NORMALIZED */
- 1003, /* GL_MAX_SERVER_WAIT_TIMEOUT */
- 1148, /* GL_OBJECT_TYPE */
- 1688, /* GL_SYNC_CONDITION */
- 1693, /* GL_SYNC_STATUS */
- 1690, /* GL_SYNC_FLAGS */
- 1689, /* GL_SYNC_FENCE */
- 1692, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
- 1950, /* GL_UNSIGNALED */
- 1575, /* GL_SIGNALED */
- 46, /* GL_ALREADY_SIGNALED */
- 1907, /* GL_TIMEOUT_EXPIRED */
- 283, /* GL_CONDITION_SATISFIED */
- 2040, /* GL_WAIT_FAILED */
- 492, /* GL_EVAL_BIT */
- 1411, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
- 778, /* GL_LIST_BIT */
- 1788, /* GL_TEXTURE_BIT */
- 1546, /* GL_SCISSOR_BIT */
- 29, /* GL_ALL_ATTRIB_BITS */
- 1100, /* GL_MULTISAMPLE_BIT */
- 30, /* GL_ALL_CLIENT_ATTRIB_BITS */
+ 573, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
+ 1620, /* GL_SHADING_LANGUAGE_VERSION */
+ 348, /* GL_CURRENT_PROGRAM */
+ 1230, /* GL_PALETTE4_RGB8_OES */
+ 1232, /* GL_PALETTE4_RGBA8_OES */
+ 1228, /* GL_PALETTE4_R5_G6_B5_OES */
+ 1231, /* GL_PALETTE4_RGBA4_OES */
+ 1229, /* GL_PALETTE4_RGB5_A1_OES */
+ 1235, /* GL_PALETTE8_RGB8_OES */
+ 1237, /* GL_PALETTE8_RGBA8_OES */
+ 1233, /* GL_PALETTE8_R5_G6_B5_OES */
+ 1236, /* GL_PALETTE8_RGBA4_OES */
+ 1234, /* GL_PALETTE8_RGB5_A1_OES */
+ 694, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
+ 692, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
+ 1282, /* GL_POINT_SIZE_ARRAY_OES */
+ 1873, /* GL_TEXTURE_CROP_RECT_OES */
+ 944, /* GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES */
+ 1281, /* GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES */
+ 2015, /* GL_UNSIGNED_NORMALIZED */
+ 1819, /* GL_TEXTURE_1D_ARRAY_EXT */
+ 1413, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
+ 1821, /* GL_TEXTURE_2D_ARRAY_EXT */
+ 1416, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
+ 1828, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
+ 1830, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
+ 990, /* GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB */
+ 1673, /* GL_SRGB */
+ 1674, /* GL_SRGB8 */
+ 1676, /* GL_SRGB_ALPHA */
+ 1675, /* GL_SRGB8_ALPHA8 */
+ 1633, /* GL_SLUMINANCE_ALPHA */
+ 1632, /* GL_SLUMINANCE8_ALPHA8 */
+ 1630, /* GL_SLUMINANCE */
+ 1631, /* GL_SLUMINANCE8 */
+ 291, /* GL_COMPRESSED_SRGB */
+ 292, /* GL_COMPRESSED_SRGB_ALPHA */
+ 289, /* GL_COMPRESSED_SLUMINANCE */
+ 290, /* GL_COMPRESSED_SLUMINANCE_ALPHA */
+ 1973, /* GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT */
+ 1967, /* GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT */
+ 1053, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT */
+ 1972, /* GL_TRANSFORM_FEEDBACK_VARYINGS_EXT */
+ 1970, /* GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT */
+ 1969, /* GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT */
+ 1364, /* GL_PRIMITIVES_GENERATED_EXT */
+ 1971, /* GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT */
+ 1444, /* GL_RASTERIZER_DISCARD_EXT */
+ 1051, /* GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT */
+ 1052, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT */
+ 730, /* GL_INTERLEAVED_ATTRIBS_EXT */
+ 1610, /* GL_SEPARATE_ATTRIBS_EXT */
+ 1966, /* GL_TRANSFORM_FEEDBACK_BUFFER_EXT */
+ 1965, /* GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT */
+ 1300, /* GL_POINT_SPRITE_COORD_ORIGIN */
+ 802, /* GL_LOWER_LEFT */
+ 2029, /* GL_UPPER_LEFT */
+ 1697, /* GL_STENCIL_BACK_REF */
+ 1698, /* GL_STENCIL_BACK_VALUE_MASK */
+ 1699, /* GL_STENCIL_BACK_WRITEMASK */
+ 476, /* GL_DRAW_FRAMEBUFFER_BINDING */
+ 1471, /* GL_RENDERBUFFER_BINDING */
+ 1447, /* GL_READ_FRAMEBUFFER */
+ 475, /* GL_DRAW_FRAMEBUFFER */
+ 1448, /* GL_READ_FRAMEBUFFER_BINDING */
+ 1490, /* GL_RENDERBUFFER_SAMPLES */
+ 586, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
+ 583, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
+ 598, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
+ 593, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
+ 596, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
+ 604, /* GL_FRAMEBUFFER_COMPLETE */
+ 609, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
+ 623, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
+ 618, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
+ 613, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
+ 619, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
+ 615, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
+ 628, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
+ 634, /* GL_FRAMEBUFFER_UNSUPPORTED */
+ 632, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
+ 966, /* GL_MAX_COLOR_ATTACHMENTS */
+ 178, /* GL_COLOR_ATTACHMENT0 */
+ 181, /* GL_COLOR_ATTACHMENT1 */
+ 195, /* GL_COLOR_ATTACHMENT2 */
+ 197, /* GL_COLOR_ATTACHMENT3 */
+ 199, /* GL_COLOR_ATTACHMENT4 */
+ 201, /* GL_COLOR_ATTACHMENT5 */
+ 203, /* GL_COLOR_ATTACHMENT6 */
+ 205, /* GL_COLOR_ATTACHMENT7 */
+ 207, /* GL_COLOR_ATTACHMENT8 */
+ 209, /* GL_COLOR_ATTACHMENT9 */
+ 182, /* GL_COLOR_ATTACHMENT10 */
+ 184, /* GL_COLOR_ATTACHMENT11 */
+ 186, /* GL_COLOR_ATTACHMENT12 */
+ 188, /* GL_COLOR_ATTACHMENT13 */
+ 190, /* GL_COLOR_ATTACHMENT14 */
+ 192, /* GL_COLOR_ATTACHMENT15 */
+ 376, /* GL_DEPTH_ATTACHMENT */
+ 1686, /* GL_STENCIL_ATTACHMENT */
+ 575, /* GL_FRAMEBUFFER */
+ 1468, /* GL_RENDERBUFFER */
+ 1494, /* GL_RENDERBUFFER_WIDTH */
+ 1481, /* GL_RENDERBUFFER_HEIGHT */
+ 1484, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
+ 1717, /* GL_STENCIL_INDEX_EXT */
+ 1706, /* GL_STENCIL_INDEX1 */
+ 1711, /* GL_STENCIL_INDEX4 */
+ 1714, /* GL_STENCIL_INDEX8 */
+ 1707, /* GL_STENCIL_INDEX16 */
+ 1488, /* GL_RENDERBUFFER_RED_SIZE */
+ 1479, /* GL_RENDERBUFFER_GREEN_SIZE */
+ 1474, /* GL_RENDERBUFFER_BLUE_SIZE */
+ 1469, /* GL_RENDERBUFFER_ALPHA_SIZE */
+ 1476, /* GL_RENDERBUFFER_DEPTH_SIZE */
+ 1492, /* GL_RENDERBUFFER_STENCIL_SIZE */
+ 626, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
+ 1033, /* GL_MAX_SAMPLES */
+ 1909, /* GL_TEXTURE_GEN_STR_OES */
+ 667, /* GL_HALF_FLOAT_OES */
+ 1526, /* GL_RGB565_OES */
+ 1546, /* GL_RGBA32UI_EXT */
+ 1520, /* GL_RGB32UI_EXT */
+ 40, /* GL_ALPHA32UI_EXT */
+ 722, /* GL_INTENSITY32UI_EXT */
+ 819, /* GL_LUMINANCE32UI_EXT */
+ 836, /* GL_LUMINANCE_ALPHA32UI_EXT */
+ 1541, /* GL_RGBA16UI_EXT */
+ 1516, /* GL_RGB16UI_EXT */
+ 37, /* GL_ALPHA16UI_EXT */
+ 719, /* GL_INTENSITY16UI_EXT */
+ 814, /* GL_LUMINANCE16UI_EXT */
+ 834, /* GL_LUMINANCE_ALPHA16UI_EXT */
+ 1554, /* GL_RGBA8UI_EXT */
+ 1533, /* GL_RGB8UI_EXT */
+ 45, /* GL_ALPHA8UI_EXT */
+ 727, /* GL_INTENSITY8UI_EXT */
+ 828, /* GL_LUMINANCE8UI_EXT */
+ 838, /* GL_LUMINANCE_ALPHA8UI_EXT */
+ 1545, /* GL_RGBA32I_EXT */
+ 1519, /* GL_RGB32I_EXT */
+ 39, /* GL_ALPHA32I_EXT */
+ 721, /* GL_INTENSITY32I_EXT */
+ 818, /* GL_LUMINANCE32I_EXT */
+ 835, /* GL_LUMINANCE_ALPHA32I_EXT */
+ 1540, /* GL_RGBA16I_EXT */
+ 1515, /* GL_RGB16I_EXT */
+ 36, /* GL_ALPHA16I_EXT */
+ 718, /* GL_INTENSITY16I_EXT */
+ 813, /* GL_LUMINANCE16I_EXT */
+ 833, /* GL_LUMINANCE_ALPHA16I_EXT */
+ 1553, /* GL_RGBA8I_EXT */
+ 1532, /* GL_RGB8I_EXT */
+ 44, /* GL_ALPHA8I_EXT */
+ 726, /* GL_INTENSITY8I_EXT */
+ 827, /* GL_LUMINANCE8I_EXT */
+ 837, /* GL_LUMINANCE_ALPHA8I_EXT */
+ 1460, /* GL_RED_INTEGER_EXT */
+ 664, /* GL_GREEN_INTEGER_EXT */
+ 111, /* GL_BLUE_INTEGER_EXT */
+ 49, /* GL_ALPHA_INTEGER_EXT */
+ 1564, /* GL_RGB_INTEGER_EXT */
+ 1559, /* GL_RGBA_INTEGER_EXT */
+ 83, /* GL_BGR_INTEGER_EXT */
+ 82, /* GL_BGRA_INTEGER_EXT */
+ 840, /* GL_LUMINANCE_INTEGER_EXT */
+ 839, /* GL_LUMINANCE_ALPHA_INTEGER_EXT */
+ 1560, /* GL_RGBA_INTEGER_MODE_EXT */
+ 582, /* GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB */
+ 622, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB */
+ 621, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB */
+ 657, /* GL_GEOMETRY_SHADER_ARB */
+ 658, /* GL_GEOMETRY_VERTICES_OUT_ARB */
+ 655, /* GL_GEOMETRY_INPUT_TYPE_ARB */
+ 656, /* GL_GEOMETRY_OUTPUT_TYPE_ARB */
+ 993, /* GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB */
+ 1067, /* GL_MAX_VERTEX_VARYING_COMPONENTS_ARB */
+ 992, /* GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB */
+ 989, /* GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB */
+ 991, /* GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB */
+ 803, /* GL_LOW_FLOAT */
+ 1069, /* GL_MEDIUM_FLOAT */
+ 668, /* GL_HIGH_FLOAT */
+ 804, /* GL_LOW_INT */
+ 1070, /* GL_MEDIUM_INT */
+ 669, /* GL_HIGH_INT */
+ 2006, /* GL_UNSIGNED_INT_10_10_10_2_OES */
+ 734, /* GL_INT_10_10_10_2_OES */
+ 1614, /* GL_SHADER_BINARY_FORMATS */
+ 1166, /* GL_NUM_SHADER_BINARY_FORMATS */
+ 1615, /* GL_SHADER_COMPILER */
+ 1064, /* GL_MAX_VERTEX_UNIFORM_VECTORS */
+ 1057, /* GL_MAX_VARYING_VECTORS */
+ 988, /* GL_MAX_FRAGMENT_UNIFORM_VECTORS */
+ 1441, /* GL_QUERY_WAIT_NV */
+ 1436, /* GL_QUERY_NO_WAIT_NV */
+ 1433, /* GL_QUERY_BY_REGION_WAIT_NV */
+ 1432, /* GL_QUERY_BY_REGION_NO_WAIT_NV */
+ 1962, /* GL_TRANSFORM_FEEDBACK */
+ 1968, /* GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED */
+ 1964, /* GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE */
+ 1963, /* GL_TRANSFORM_FEEDBACK_BINDING */
+ 1428, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
+ 518, /* GL_FIRST_VERTEX_CONVENTION */
+ 751, /* GL_LAST_VERTEX_CONVENTION */
+ 1405, /* GL_PROVOKING_VERTEX */
+ 327, /* GL_COPY_READ_BUFFER */
+ 328, /* GL_COPY_WRITE_BUFFER */
+ 1563, /* GL_RGBA_SNORM */
+ 1557, /* GL_RGBA8_SNORM */
+ 1626, /* GL_SIGNED_NORMALIZED */
+ 1035, /* GL_MAX_SERVER_WAIT_TIMEOUT */
+ 1180, /* GL_OBJECT_TYPE */
+ 1738, /* GL_SYNC_CONDITION */
+ 1743, /* GL_SYNC_STATUS */
+ 1740, /* GL_SYNC_FLAGS */
+ 1739, /* GL_SYNC_FENCE */
+ 1742, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
+ 2000, /* GL_UNSIGNALED */
+ 1625, /* GL_SIGNALED */
+ 54, /* GL_ALREADY_SIGNALED */
+ 1957, /* GL_TIMEOUT_EXPIRED */
+ 294, /* GL_CONDITION_SATISFIED */
+ 2090, /* GL_WAIT_FAILED */
+ 503, /* GL_EVAL_BIT */
+ 1445, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
+ 796, /* GL_LIST_BIT */
+ 1838, /* GL_TEXTURE_BIT */
+ 1596, /* GL_SCISSOR_BIT */
+ 30, /* GL_ALL_ATTRIB_BITS */
+ 1132, /* GL_MULTISAMPLE_BIT */
+ 31, /* GL_ALL_CLIENT_ATTRIB_BITS */
};
typedef int (*cfunc)(const void *, const void *);
diff --git a/src/mesa/main/eval.c b/src/mesa/main/eval.c
index bd2e1177fd2..c607e6a26af 100644
--- a/src/mesa/main/eval.c
+++ b/src/mesa/main/eval.c
@@ -100,7 +100,7 @@ GLuint _mesa_evaluator_components( GLenum target )
* Return pointer to the gl_1d_map struct for the named target.
*/
static struct gl_1d_map *
-get_1d_map( GLcontext *ctx, GLenum target )
+get_1d_map( struct gl_context *ctx, GLenum target )
{
switch (target) {
case GL_MAP1_VERTEX_3:
@@ -150,7 +150,7 @@ get_1d_map( GLcontext *ctx, GLenum target )
* Return pointer to the gl_2d_map struct for the named target.
*/
static struct gl_2d_map *
-get_2d_map( GLcontext *ctx, GLenum target )
+get_2d_map( struct gl_context *ctx, GLenum target )
{
switch (target) {
case GL_MAP2_VERTEX_3:
@@ -880,7 +880,7 @@ init_2d_map( struct gl_2d_map *map, int n, const float *initial )
}
-void _mesa_init_eval( GLcontext *ctx )
+void _mesa_init_eval( struct gl_context *ctx )
{
int i;
@@ -952,7 +952,7 @@ void _mesa_init_eval( GLcontext *ctx )
}
-void _mesa_free_eval_data( GLcontext *ctx )
+void _mesa_free_eval_data( struct gl_context *ctx )
{
int i;
diff --git a/src/mesa/main/eval.h b/src/mesa/main/eval.h
index ffd1bab76da..bd908f00cdd 100644
--- a/src/mesa/main/eval.h
+++ b/src/mesa/main/eval.h
@@ -57,7 +57,7 @@
extern GLuint _mesa_evaluator_components( GLenum target );
-extern void gl_free_control_points( GLcontext *ctx,
+extern void gl_free_control_points( struct gl_context *ctx,
GLenum target, GLfloat *data );
@@ -103,8 +103,8 @@ _mesa_init_eval_dispatch(struct _glapi_table *disp)
#endif /* FEATURE_evaluators */
-extern void _mesa_init_eval( GLcontext *ctx );
-extern void _mesa_free_eval_data( GLcontext *ctx );
+extern void _mesa_init_eval( struct gl_context *ctx );
+extern void _mesa_free_eval_data( struct gl_context *ctx );
#endif /* EVAL_H */
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 9df0ae4598a..caa5dad950a 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -75,6 +75,7 @@ static const struct {
{ OFF, "GL_ARB_sampler_objects", F(ARB_sampler_objects) },
{ OFF, "GL_ARB_seamless_cube_map", F(ARB_seamless_cube_map) },
{ OFF, "GL_ARB_shader_objects", F(ARB_shader_objects) },
+ { OFF, "GL_ARB_shader_stencil_export", F(ARB_shader_stencil_export) },
{ OFF, "GL_ARB_shading_language_100", F(ARB_shading_language_100) },
{ OFF, "GL_ARB_shadow", F(ARB_shadow) },
{ OFF, "GL_ARB_shadow_ambient", F(ARB_shadow_ambient) },
@@ -138,6 +139,7 @@ static const struct {
{ OFF, "GL_EXT_provoking_vertex", F(EXT_provoking_vertex) },
{ ON, "GL_EXT_rescale_normal", F(EXT_rescale_normal) },
{ OFF, "GL_EXT_secondary_color", F(EXT_secondary_color) },
+ { OFF, "GL_EXT_separate_shader_objects", F(EXT_separate_shader_objects) },
{ ON, "GL_EXT_separate_specular_color", F(EXT_separate_specular_color) },
{ OFF, "GL_EXT_shadow_funcs", F(EXT_shadow_funcs) },
{ OFF, "GL_EXT_shared_texture_palette", F(EXT_shared_texture_palette) },
@@ -227,7 +229,7 @@ static const struct {
* This is a convenience function used by the XMesa, OSMesa, GGI drivers, etc.
*/
void
-_mesa_enable_sw_extensions(GLcontext *ctx)
+_mesa_enable_sw_extensions(struct gl_context *ctx)
{
/*ctx->Extensions.ARB_copy_buffer = GL_TRUE;*/
ctx->Extensions.ARB_depth_clamp = GL_TRUE;
@@ -259,6 +261,7 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
ctx->Extensions.ARB_point_sprite = GL_TRUE;
#if FEATURE_ARB_shader_objects
ctx->Extensions.ARB_shader_objects = GL_TRUE;
+ ctx->Extensions.EXT_separate_shader_objects = GL_TRUE;
#endif
#if FEATURE_ARB_shading_language_100
ctx->Extensions.ARB_shading_language_100 = GL_TRUE;
@@ -387,7 +390,7 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
* Enable common EXT extensions in the ARB_imaging subset.
*/
void
-_mesa_enable_imaging_extensions(GLcontext *ctx)
+_mesa_enable_imaging_extensions(struct gl_context *ctx)
{
ctx->Extensions.EXT_blend_color = GL_TRUE;
ctx->Extensions.EXT_blend_logic_op = GL_TRUE;
@@ -402,7 +405,7 @@ _mesa_enable_imaging_extensions(GLcontext *ctx)
* A convenience function to be called by drivers.
*/
void
-_mesa_enable_1_3_extensions(GLcontext *ctx)
+_mesa_enable_1_3_extensions(struct gl_context *ctx)
{
/*ctx->Extensions.ARB_multisample = GL_TRUE;*/
ctx->Extensions.ARB_multitexture = GL_TRUE;
@@ -422,7 +425,7 @@ _mesa_enable_1_3_extensions(GLcontext *ctx)
* A convenience function to be called by drivers.
*/
void
-_mesa_enable_1_4_extensions(GLcontext *ctx)
+_mesa_enable_1_4_extensions(struct gl_context *ctx)
{
ctx->Extensions.ARB_depth_texture = GL_TRUE;
ctx->Extensions.ARB_shadow = GL_TRUE;
@@ -448,7 +451,7 @@ _mesa_enable_1_4_extensions(GLcontext *ctx)
* A convenience function to be called by drivers.
*/
void
-_mesa_enable_1_5_extensions(GLcontext *ctx)
+_mesa_enable_1_5_extensions(struct gl_context *ctx)
{
ctx->Extensions.ARB_occlusion_query = GL_TRUE;
/*ctx->Extensions.ARB_vertex_buffer_object = GL_TRUE;*/
@@ -461,7 +464,7 @@ _mesa_enable_1_5_extensions(GLcontext *ctx)
* A convenience function to be called by drivers.
*/
void
-_mesa_enable_2_0_extensions(GLcontext *ctx)
+_mesa_enable_2_0_extensions(struct gl_context *ctx)
{
/*ctx->Extensions.ARB_draw_buffers = GL_TRUE;*/
#if FEATURE_ARB_fragment_shader
@@ -488,7 +491,7 @@ _mesa_enable_2_0_extensions(GLcontext *ctx)
* A convenience function to be called by drivers.
*/
void
-_mesa_enable_2_1_extensions(GLcontext *ctx)
+_mesa_enable_2_1_extensions(struct gl_context *ctx)
{
#if FEATURE_EXT_pixel_buffer_object
ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE;
@@ -504,7 +507,7 @@ _mesa_enable_2_1_extensions(GLcontext *ctx)
* \return GL_TRUE for success, GL_FALSE if invalid extension name
*/
static GLboolean
-set_extension( GLcontext *ctx, const char *name, GLboolean state )
+set_extension( struct gl_context *ctx, const char *name, GLboolean state )
{
GLboolean *base = (GLboolean *) &ctx->Extensions;
GLuint i;
@@ -533,7 +536,7 @@ set_extension( GLcontext *ctx, const char *name, GLboolean state )
* Typically called by drivers.
*/
void
-_mesa_enable_extension( GLcontext *ctx, const char *name )
+_mesa_enable_extension( struct gl_context *ctx, const char *name )
{
if (!set_extension(ctx, name, GL_TRUE))
_mesa_problem(ctx, "Trying to enable unknown extension: %s", name);
@@ -545,7 +548,7 @@ _mesa_enable_extension( GLcontext *ctx, const char *name )
* XXX is this really needed???
*/
void
-_mesa_disable_extension( GLcontext *ctx, const char *name )
+_mesa_disable_extension( struct gl_context *ctx, const char *name )
{
if (!set_extension(ctx, name, GL_FALSE))
_mesa_problem(ctx, "Trying to disable unknown extension: %s", name);
@@ -556,7 +559,7 @@ _mesa_disable_extension( GLcontext *ctx, const char *name )
* Check if the i-th extension is enabled.
*/
static GLboolean
-extension_enabled(GLcontext *ctx, GLuint index)
+extension_enabled(struct gl_context *ctx, GLuint index)
{
const GLboolean *base = (const GLboolean *) &ctx->Extensions;
if (!default_extensions[index].flag_offset ||
@@ -573,7 +576,7 @@ extension_enabled(GLcontext *ctx, GLuint index)
* Test if the named extension is enabled in this context.
*/
GLboolean
-_mesa_extension_is_enabled( GLcontext *ctx, const char *name )
+_mesa_extension_is_enabled( struct gl_context *ctx, const char *name )
{
GLuint i;
@@ -615,7 +618,7 @@ append(const char *a, const char *b)
* Return a string of the unknown/leftover names.
*/
static const char *
-get_extension_override( GLcontext *ctx )
+get_extension_override( struct gl_context *ctx )
{
const char *envExt = _mesa_getenv("MESA_EXTENSION_OVERRIDE");
char *extraExt = NULL;
@@ -666,7 +669,7 @@ get_extension_override( GLcontext *ctx )
* To be called during context initialization.
*/
void
-_mesa_init_extensions( GLcontext *ctx )
+_mesa_init_extensions( struct gl_context *ctx )
{
GLboolean *base = (GLboolean *) &ctx->Extensions;
GLuint i;
@@ -685,7 +688,7 @@ _mesa_init_extensions( GLcontext *ctx )
* glGetString(GL_EXTENSIONS) is called.
*/
static GLubyte *
-compute_extensions( GLcontext *ctx )
+compute_extensions( struct gl_context *ctx )
{
const char *extraExt = get_extension_override(ctx);
GLuint extStrLen = 0;
@@ -752,7 +755,7 @@ append_extension(GLubyte **str, const char *ext)
static size_t
-make_extension_string_es1(const GLcontext *ctx, GLubyte *str)
+make_extension_string_es1(const struct gl_context *ctx, GLubyte *str)
{
size_t len = 0;
@@ -834,7 +837,7 @@ make_extension_string_es1(const GLcontext *ctx, GLubyte *str)
static GLubyte *
-compute_extensions_es1(const GLcontext *ctx)
+compute_extensions_es1(const struct gl_context *ctx)
{
GLubyte *s;
unsigned int len;
@@ -849,7 +852,7 @@ compute_extensions_es1(const GLcontext *ctx)
}
static size_t
-make_extension_string_es2(const GLcontext *ctx, GLubyte *str)
+make_extension_string_es2(const struct gl_context *ctx, GLubyte *str)
{
size_t len = 0;
@@ -903,7 +906,7 @@ make_extension_string_es2(const GLcontext *ctx, GLubyte *str)
}
static GLubyte *
-compute_extensions_es2(GLcontext *ctx)
+compute_extensions_es2(struct gl_context *ctx)
{
GLubyte *s;
unsigned int len;
@@ -919,7 +922,7 @@ compute_extensions_es2(GLcontext *ctx)
GLubyte *
-_mesa_make_extension_string(GLcontext *ctx)
+_mesa_make_extension_string(struct gl_context *ctx)
{
switch (ctx->API) {
case API_OPENGL:
@@ -938,7 +941,7 @@ _mesa_make_extension_string(GLcontext *ctx)
* Return number of enabled extensions.
*/
GLuint
-_mesa_get_extension_count(GLcontext *ctx)
+_mesa_get_extension_count(struct gl_context *ctx)
{
GLuint i;
@@ -963,7 +966,7 @@ _mesa_get_extension_count(GLcontext *ctx)
* Return name of i-th enabled extension
*/
const GLubyte *
-_mesa_get_enabled_extension(GLcontext *ctx, GLuint index)
+_mesa_get_enabled_extension(struct gl_context *ctx, GLuint index)
{
GLuint i;
diff --git a/src/mesa/main/extensions.h b/src/mesa/main/extensions.h
index a25472440d6..6eb85393965 100644
--- a/src/mesa/main/extensions.h
+++ b/src/mesa/main/extensions.h
@@ -40,35 +40,35 @@
#if _HAVE_FULL_GL
-extern void _mesa_enable_sw_extensions(GLcontext *ctx);
+extern void _mesa_enable_sw_extensions(struct gl_context *ctx);
-extern void _mesa_enable_imaging_extensions(GLcontext *ctx);
+extern void _mesa_enable_imaging_extensions(struct gl_context *ctx);
-extern void _mesa_enable_1_3_extensions(GLcontext *ctx);
+extern void _mesa_enable_1_3_extensions(struct gl_context *ctx);
-extern void _mesa_enable_1_4_extensions(GLcontext *ctx);
+extern void _mesa_enable_1_4_extensions(struct gl_context *ctx);
-extern void _mesa_enable_1_5_extensions(GLcontext *ctx);
+extern void _mesa_enable_1_5_extensions(struct gl_context *ctx);
-extern void _mesa_enable_2_0_extensions(GLcontext *ctx);
+extern void _mesa_enable_2_0_extensions(struct gl_context *ctx);
-extern void _mesa_enable_2_1_extensions(GLcontext *ctx);
+extern void _mesa_enable_2_1_extensions(struct gl_context *ctx);
-extern void _mesa_enable_extension(GLcontext *ctx, const char *name);
+extern void _mesa_enable_extension(struct gl_context *ctx, const char *name);
-extern void _mesa_disable_extension(GLcontext *ctx, const char *name);
+extern void _mesa_disable_extension(struct gl_context *ctx, const char *name);
-extern GLboolean _mesa_extension_is_enabled(GLcontext *ctx, const char *name);
+extern GLboolean _mesa_extension_is_enabled(struct gl_context *ctx, const char *name);
-extern void _mesa_init_extensions(GLcontext *ctx);
+extern void _mesa_init_extensions(struct gl_context *ctx);
-extern GLubyte *_mesa_make_extension_string(GLcontext *ctx);
+extern GLubyte *_mesa_make_extension_string(struct gl_context *ctx);
extern GLuint
-_mesa_get_extension_count(GLcontext *ctx);
+_mesa_get_extension_count(struct gl_context *ctx);
extern const GLubyte *
-_mesa_get_enabled_extension(GLcontext *ctx, GLuint index);
+_mesa_get_enabled_extension(struct gl_context *ctx, GLuint index);
#else
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index f28846c4c99..7c3357043fa 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -95,7 +95,7 @@ delete_dummy_framebuffer(struct gl_framebuffer *fb)
void
-_mesa_init_fbobjects(GLcontext *ctx)
+_mesa_init_fbobjects(struct gl_context *ctx)
{
_glthread_INIT_MUTEX(DummyFramebuffer.Mutex);
_glthread_INIT_MUTEX(DummyRenderbuffer.Mutex);
@@ -115,7 +115,7 @@ _mesa_get_incomplete_framebuffer(void)
* Helper routine for getting a gl_renderbuffer.
*/
struct gl_renderbuffer *
-_mesa_lookup_renderbuffer(GLcontext *ctx, GLuint id)
+_mesa_lookup_renderbuffer(struct gl_context *ctx, GLuint id)
{
struct gl_renderbuffer *rb;
@@ -132,7 +132,7 @@ _mesa_lookup_renderbuffer(GLcontext *ctx, GLuint id)
* Helper routine for getting a gl_framebuffer.
*/
struct gl_framebuffer *
-_mesa_lookup_framebuffer(GLcontext *ctx, GLuint id)
+_mesa_lookup_framebuffer(struct gl_context *ctx, GLuint id)
{
struct gl_framebuffer *fb;
@@ -166,7 +166,7 @@ invalidate_framebuffer(struct gl_framebuffer *fb)
* the depth buffer attachment point.
*/
struct gl_renderbuffer_attachment *
-_mesa_get_attachment(GLcontext *ctx, struct gl_framebuffer *fb,
+_mesa_get_attachment(struct gl_context *ctx, struct gl_framebuffer *fb,
GLenum attachment)
{
GLuint i;
@@ -216,7 +216,7 @@ _mesa_get_attachment(GLcontext *ctx, struct gl_framebuffer *fb,
* window-system framebuffer (not user-created framebuffer objects).
*/
static struct gl_renderbuffer_attachment *
-_mesa_get_fb0_attachment(GLcontext *ctx, struct gl_framebuffer *fb,
+_mesa_get_fb0_attachment(struct gl_context *ctx, struct gl_framebuffer *fb,
GLenum attachment)
{
assert(fb->Name == 0);
@@ -255,7 +255,8 @@ _mesa_get_fb0_attachment(GLcontext *ctx, struct gl_framebuffer *fb,
* point. Update reference counts, etc.
*/
void
-_mesa_remove_attachment(GLcontext *ctx, struct gl_renderbuffer_attachment *att)
+_mesa_remove_attachment(struct gl_context *ctx,
+ struct gl_renderbuffer_attachment *att)
{
if (att->Type == GL_TEXTURE) {
ASSERT(att->Texture);
@@ -281,7 +282,7 @@ _mesa_remove_attachment(GLcontext *ctx, struct gl_renderbuffer_attachment *att)
* The previous binding, if any, will be removed first.
*/
void
-_mesa_set_texture_attachment(GLcontext *ctx,
+_mesa_set_texture_attachment(struct gl_context *ctx,
struct gl_framebuffer *fb,
struct gl_renderbuffer_attachment *att,
struct gl_texture_object *texObj,
@@ -322,7 +323,7 @@ _mesa_set_texture_attachment(GLcontext *ctx,
* The previous binding, if any, will be removed first.
*/
void
-_mesa_set_renderbuffer_attachment(GLcontext *ctx,
+_mesa_set_renderbuffer_attachment(struct gl_context *ctx,
struct gl_renderbuffer_attachment *att,
struct gl_renderbuffer *rb)
{
@@ -340,7 +341,8 @@ _mesa_set_renderbuffer_attachment(GLcontext *ctx,
* Attach a renderbuffer object to a framebuffer object.
*/
void
-_mesa_framebuffer_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb,
+_mesa_framebuffer_renderbuffer(struct gl_context *ctx,
+ struct gl_framebuffer *fb,
GLenum attachment, struct gl_renderbuffer *rb)
{
struct gl_renderbuffer_attachment *att;
@@ -397,6 +399,44 @@ fbo_incomplete(const char *msg, int index)
}
+/**
+ * Is the given base format a legal format for a color renderbuffer?
+ */
+static GLboolean
+is_legal_color_format(const struct gl_context *ctx, GLenum baseFormat)
+{
+ switch (baseFormat) {
+ case GL_RGB:
+ case GL_RGBA:
+ return GL_TRUE;
+ case GL_LUMINANCE:
+ case GL_LUMINANCE_ALPHA:
+ case GL_INTENSITY:
+ case GL_ALPHA:
+ return ctx->Extensions.ARB_framebuffer_object;
+ case GL_RED:
+ case GL_RG:
+ return ctx->Extensions.ARB_texture_rg;
+ default:
+ return GL_FALSE;
+ }
+}
+
+
+/**
+ * Is the given base format a legal format for a depth/stencil renderbuffer?
+ */
+static GLboolean
+is_legal_depth_format(const struct gl_context *ctx, GLenum baseFormat)
+{
+ switch (baseFormat) {
+ case GL_DEPTH_COMPONENT:
+ case GL_DEPTH_STENCIL_EXT:
+ return GL_TRUE;
+ default:
+ return GL_FALSE;
+ }
+}
/**
@@ -406,7 +446,7 @@ fbo_incomplete(const char *msg, int index)
* if GL_STENCIL, this is a stencil component attachment point.
*/
static void
-test_attachment_completeness(const GLcontext *ctx, GLenum format,
+test_attachment_completeness(const struct gl_context *ctx, GLenum format,
struct gl_renderbuffer_attachment *att)
{
assert(format == GL_COLOR || format == GL_DEPTH || format == GL_STENCIL);
@@ -448,14 +488,7 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
baseFormat = _mesa_get_format_base_format(texImage->TexFormat);
if (format == GL_COLOR) {
- if (baseFormat != GL_RGB &&
- baseFormat != GL_RGBA &&
- (!ctx->Extensions.ARB_framebuffer_object ||
- baseFormat != GL_ALPHA) &&
- (!ctx->Extensions.ARB_texture_rg ||
- baseFormat != GL_RED) &&
- (!ctx->Extensions.ARB_texture_rg ||
- baseFormat != GL_RG)) {
+ if (!is_legal_color_format(ctx, baseFormat)) {
att_incomplete("bad format");
att->Complete = GL_FALSE;
return;
@@ -563,7 +596,8 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
* framebuffer is complete.
*/
void
-_mesa_test_framebuffer_completeness(GLcontext *ctx, struct gl_framebuffer *fb)
+_mesa_test_framebuffer_completeness(struct gl_context *ctx,
+ struct gl_framebuffer *fb)
{
GLuint numImages;
GLenum intFormat = GL_NONE; /* color buffers' internal format */
@@ -586,6 +620,7 @@ _mesa_test_framebuffer_completeness(GLcontext *ctx, struct gl_framebuffer *fb)
for (i = -2; i < (GLint) ctx->Const.MaxColorAttachments; i++) {
struct gl_renderbuffer_attachment *att;
GLenum f;
+ gl_format mesaFormat;
/*
* XXX for ARB_fbo, only check color buffers that are named by
@@ -632,12 +667,10 @@ _mesa_test_framebuffer_completeness(GLcontext *ctx, struct gl_framebuffer *fb)
minHeight = MIN2(minHeight, texImg->Height);
maxHeight = MAX2(maxHeight, texImg->Height);
f = texImg->_BaseFormat;
+ mesaFormat = texImg->TexFormat;
numImages++;
- if (f != GL_RGB && f != GL_RGBA && f != GL_DEPTH_COMPONENT
- && f != GL_DEPTH_STENCIL_EXT
- && (!ctx->Extensions.ARB_framebuffer_object || f != GL_ALPHA)
- && (!ctx->Extensions.ARB_texture_rg || f != GL_RED)
- && (!ctx->Extensions.ARB_texture_rg || f != GL_RG)) {
+ if (!is_legal_color_format(ctx, f) &&
+ !is_legal_depth_format(ctx, f)) {
fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT;
fbo_incomplete("texture attachment incomplete", -1);
return;
@@ -649,6 +682,7 @@ _mesa_test_framebuffer_completeness(GLcontext *ctx, struct gl_framebuffer *fb)
minHeight = MIN2(minHeight, att->Renderbuffer->Height);
maxHeight = MAX2(minHeight, att->Renderbuffer->Height);
f = att->Renderbuffer->InternalFormat;
+ mesaFormat = att->Renderbuffer->Format;
numImages++;
}
else {
@@ -661,6 +695,9 @@ _mesa_test_framebuffer_completeness(GLcontext *ctx, struct gl_framebuffer *fb)
numSamples = att->Renderbuffer->NumSamples;
}
+ /* check if integer color */
+ fb->_IntegerColor = _mesa_is_format_integer_color(mesaFormat);
+
/* Error-check width, height, format, samples
*/
if (numImages == 1) {
@@ -833,7 +870,7 @@ _mesa_BindRenderbufferEXT(GLenum target, GLuint renderbuffer)
* The spec calls for unbinding.
*/
static void
-detach_renderbuffer(GLcontext *ctx,
+detach_renderbuffer(struct gl_context *ctx,
struct gl_framebuffer *fb,
struct gl_renderbuffer *rb)
{
@@ -934,7 +971,7 @@ _mesa_GenRenderbuffersEXT(GLsizei n, GLuint *renderbuffers)
* we'll also return GL_RED and GL_RG.
*/
GLenum
-_mesa_base_fbo_format(GLcontext *ctx, GLenum internalFormat)
+_mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
{
switch (internalFormat) {
case GL_ALPHA:
@@ -1287,7 +1324,7 @@ _mesa_IsFramebufferEXT(GLuint framebuffer)
* attachments.
*/
static void
-check_begin_texture_render(GLcontext *ctx, struct gl_framebuffer *fb)
+check_begin_texture_render(struct gl_context *ctx, struct gl_framebuffer *fb)
{
GLuint i;
ASSERT(ctx->Driver.RenderTexture);
@@ -1312,7 +1349,7 @@ check_begin_texture_render(GLcontext *ctx, struct gl_framebuffer *fb)
* notify the device driver that the texture image may have changed.
*/
static void
-check_end_texture_render(GLcontext *ctx, struct gl_framebuffer *fb)
+check_end_texture_render(struct gl_context *ctx, struct gl_framebuffer *fb)
{
if (fb->Name == 0)
return; /* can't render to texture with winsys framebuffers */
@@ -1606,7 +1643,7 @@ _mesa_CheckFramebufferStatusEXT(GLenum target)
* Common code called by glFramebufferTexture1D/2D/3DEXT().
*/
static void
-framebuffer_texture(GLcontext *ctx, const char *caller, GLenum target,
+framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target,
GLenum attachment, GLenum textarget, GLuint texture,
GLint level, GLint zoffset)
{
diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h
index 9850ee9aa23..9e18e538a6f 100644
--- a/src/mesa/main/fbobject.h
+++ b/src/mesa/main/fbobject.h
@@ -29,47 +29,47 @@
#include "mtypes.h"
extern void
-_mesa_init_fbobjects(GLcontext *ctx);
+_mesa_init_fbobjects(struct gl_context *ctx);
extern struct gl_framebuffer *
_mesa_get_incomplete_framebuffer(void);
extern struct gl_renderbuffer *
-_mesa_lookup_renderbuffer(GLcontext *ctx, GLuint id);
+_mesa_lookup_renderbuffer(struct gl_context *ctx, GLuint id);
extern struct gl_framebuffer *
-_mesa_lookup_framebuffer(GLcontext *ctx, GLuint id);
+_mesa_lookup_framebuffer(struct gl_context *ctx, GLuint id);
extern struct gl_renderbuffer_attachment *
-_mesa_get_attachment(GLcontext *ctx, struct gl_framebuffer *fb,
+_mesa_get_attachment(struct gl_context *ctx, struct gl_framebuffer *fb,
GLenum attachment);
extern void
-_mesa_remove_attachment(GLcontext *ctx,
+_mesa_remove_attachment(struct gl_context *ctx,
struct gl_renderbuffer_attachment *att);
extern void
-_mesa_set_texture_attachment(GLcontext *ctx,
+_mesa_set_texture_attachment(struct gl_context *ctx,
struct gl_framebuffer *fb,
struct gl_renderbuffer_attachment *att,
struct gl_texture_object *texObj,
GLenum texTarget, GLuint level, GLuint zoffset);
extern void
-_mesa_set_renderbuffer_attachment(GLcontext *ctx,
+_mesa_set_renderbuffer_attachment(struct gl_context *ctx,
struct gl_renderbuffer_attachment *att,
struct gl_renderbuffer *rb);
extern void
-_mesa_framebuffer_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb,
+_mesa_framebuffer_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
GLenum attachment, struct gl_renderbuffer *rb);
extern void
-_mesa_test_framebuffer_completeness(GLcontext *ctx, struct gl_framebuffer *fb);
+_mesa_test_framebuffer_completeness(struct gl_context *ctx, struct gl_framebuffer *fb);
extern GLenum
-_mesa_base_fbo_format(GLcontext *ctx, GLenum internalFormat);
+_mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat);
extern GLboolean GLAPIENTRY
_mesa_IsRenderbufferEXT(GLuint renderbuffer);
diff --git a/src/mesa/main/feedback.c b/src/mesa/main/feedback.c
index c72b91280ed..ffdecaecc29 100644
--- a/src/mesa/main/feedback.c
+++ b/src/mesa/main/feedback.c
@@ -116,7 +116,7 @@ _mesa_PassThrough( GLfloat token )
* Put a vertex into the feedback buffer.
*/
void
-_mesa_feedback_vertex(GLcontext *ctx,
+_mesa_feedback_vertex(struct gl_context *ctx,
const GLfloat win[4],
const GLfloat color[4],
const GLfloat texcoord[4])
@@ -159,7 +159,7 @@ _mesa_feedback_vertex(GLcontext *ctx,
* \note this function can't be put in a display list.
*
* Verifies we're not in selection mode, flushes the vertices and initialize
- * the fields in __GLcontextRec::Select with the given buffer.
+ * the fields in __struct gl_contextRec::Select with the given buffer.
*/
static void GLAPIENTRY
_mesa_SelectBuffer( GLsizei size, GLuint *buffer )
@@ -192,7 +192,7 @@ _mesa_SelectBuffer( GLsizei size, GLuint *buffer )
* increments the pointer.
*/
static INLINE void
-write_record(GLcontext *ctx, GLuint value)
+write_record(struct gl_context *ctx, GLuint value)
{
if (ctx->Select.BufferCount < ctx->Select.BufferSize) {
ctx->Select.Buffer[ctx->Select.BufferCount] = value;
@@ -211,7 +211,7 @@ write_record(GLcontext *ctx, GLuint value)
* gl_selection::HitMaxZ.
*/
void
-_mesa_update_hitflag(GLcontext *ctx, GLfloat z)
+_mesa_update_hitflag(struct gl_context *ctx, GLfloat z)
{
ctx->Select.HitFlag = GL_TRUE;
if (z < ctx->Select.HitMinZ) {
@@ -235,7 +235,7 @@ _mesa_update_hitflag(GLcontext *ctx, GLfloat z)
* \sa gl_selection.
*/
static void
-write_hit_record(GLcontext *ctx)
+write_hit_record(struct gl_context *ctx)
{
GLuint i;
GLuint zmin, zmax, zscale = (~0u);
@@ -266,7 +266,7 @@ write_hit_record(GLcontext *ctx)
*
* Verifies we are in select mode and resets the name stack depth and resets
* the hit record data in gl_selection. Marks new render mode in
- * __GLcontextRec::NewState.
+ * __struct gl_contextRec::NewState.
*/
static void GLAPIENTRY
_mesa_InitNames( void )
@@ -297,7 +297,7 @@ _mesa_InitNames( void )
* Flushes vertices. If there is a hit flag writes it (via write_hit_record()),
* and replace the top-most name in the stack.
*
- * sa __GLcontextRec::Select.
+ * sa __struct gl_contextRec::Select.
*/
static void GLAPIENTRY
_mesa_LoadName( GLuint name )
@@ -336,7 +336,7 @@ _mesa_LoadName( GLuint name )
* Flushes vertices. If there is a hit flag writes it (via write_hit_record()),
* and adds the name to the top of the name stack.
*
- * sa __GLcontextRec::Select.
+ * sa __struct gl_contextRec::Select.
*/
static void GLAPIENTRY
_mesa_PushName( GLuint name )
@@ -367,7 +367,7 @@ _mesa_PushName( GLuint name )
* Flushes vertices. If there is a hit flag writes it (via write_hit_record()),
* and removes top-most name in the name stack.
*
- * sa __GLcontextRec::Select.
+ * sa __struct gl_contextRec::Select.
*/
static void GLAPIENTRY
_mesa_PopName( void )
@@ -409,7 +409,7 @@ _mesa_PopName( void )
* Flushes the vertices and do the necessary cleanup according to the previous
* rasterization mode, such as writing the hit record or resent the select
* buffer index when exiting the select mode. Updates
- * __GLcontextRec::RenderMode and notifies the driver via the
+ * __struct gl_contextRec::RenderMode and notifies the driver via the
* dd_function_table::RenderMode callback.
*/
static GLint GLAPIENTRY
@@ -519,7 +519,7 @@ _mesa_init_feedback_dispatch(struct _glapi_table *disp)
/**
* Initialize context feedback data.
*/
-void _mesa_init_feedback( GLcontext * ctx )
+void _mesa_init_feedback( struct gl_context * ctx )
{
/* Feedback */
ctx->Feedback.Type = GL_2D; /* TODO: verify */
diff --git a/src/mesa/main/feedback.h b/src/mesa/main/feedback.h
index c6354b97bcd..f9fbbce70b9 100644
--- a/src/mesa/main/feedback.h
+++ b/src/mesa/main/feedback.h
@@ -33,14 +33,14 @@
#if FEATURE_feedback
extern void
-_mesa_feedback_vertex( GLcontext *ctx,
+_mesa_feedback_vertex( struct gl_context *ctx,
const GLfloat win[4],
const GLfloat color[4],
const GLfloat texcoord[4] );
static INLINE void
-_mesa_feedback_token( GLcontext *ctx, GLfloat token )
+_mesa_feedback_token( struct gl_context *ctx, GLfloat token )
{
if (ctx->Feedback.Count < ctx->Feedback.BufferSize) {
ctx->Feedback.Buffer[ctx->Feedback.Count] = token;
@@ -50,7 +50,7 @@ _mesa_feedback_token( GLcontext *ctx, GLfloat token )
extern void
-_mesa_update_hitflag( GLcontext *ctx, GLfloat z );
+_mesa_update_hitflag( struct gl_context *ctx, GLfloat z );
extern void
@@ -61,7 +61,7 @@ _mesa_init_feedback_dispatch(struct _glapi_table *disp);
#include "main/compiler.h"
static INLINE void
-_mesa_feedback_vertex( GLcontext *ctx,
+_mesa_feedback_vertex( struct gl_context *ctx,
const GLfloat win[4],
const GLfloat color[4],
const GLfloat texcoord[4] )
@@ -72,14 +72,14 @@ _mesa_feedback_vertex( GLcontext *ctx,
static INLINE void
-_mesa_feedback_token( GLcontext *ctx, GLfloat token )
+_mesa_feedback_token( struct gl_context *ctx, GLfloat token )
{
/* render mode is always GL_RENDER */
ASSERT_NO_FEATURE();
}
static INLINE void
-_mesa_update_hitflag( GLcontext *ctx, GLfloat z )
+_mesa_update_hitflag( struct gl_context *ctx, GLfloat z )
{
/* render mode is always GL_RENDER */
ASSERT_NO_FEATURE();
@@ -93,6 +93,6 @@ _mesa_init_feedback_dispatch(struct _glapi_table *disp)
#endif /* FEATURE_feedback */
extern void
-_mesa_init_feedback( GLcontext *ctx );
+_mesa_init_feedback( struct gl_context *ctx );
#endif /* FEEDBACK_H */
diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c
index 92fec09bad0..0f2c313c819 100644
--- a/src/mesa/main/ffvertex_prog.c
+++ b/src/mesa/main/ffvertex_prog.c
@@ -109,7 +109,7 @@ static GLuint translate_texgen( GLboolean enabled, GLenum mode )
-static GLboolean check_active_shininess( GLcontext *ctx,
+static GLboolean check_active_shininess( struct gl_context *ctx,
const struct state_key *key,
GLuint side )
{
@@ -129,7 +129,7 @@ static GLboolean check_active_shininess( GLcontext *ctx,
}
-static void make_state_key( GLcontext *ctx, struct state_key *key )
+static void make_state_key( struct gl_context *ctx, struct state_key *key )
{
const struct gl_fragment_program *fp;
GLuint i;
@@ -1638,7 +1638,7 @@ create_new_program( const struct state_key *key,
* XXX move this into core mesa (main/)
*/
struct gl_vertex_program *
-_mesa_get_fixed_func_vertex_program(GLcontext *ctx)
+_mesa_get_fixed_func_vertex_program(struct gl_context *ctx)
{
struct gl_vertex_program *prog;
struct state_key key;
diff --git a/src/mesa/main/ffvertex_prog.h b/src/mesa/main/ffvertex_prog.h
index 38dc5fbb8d3..72cd6ea115d 100644
--- a/src/mesa/main/ffvertex_prog.h
+++ b/src/mesa/main/ffvertex_prog.h
@@ -33,7 +33,7 @@
#include "main/mtypes.h"
struct gl_vertex_program *
-_mesa_get_fixed_func_vertex_program(GLcontext *ctx);
+_mesa_get_fixed_func_vertex_program(struct gl_context *ctx);
diff --git a/src/mesa/main/fog.c b/src/mesa/main/fog.c
index 9f26c012d66..fd64bd1fd89 100644
--- a/src/mesa/main/fog.c
+++ b/src/mesa/main/fog.c
@@ -178,7 +178,7 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params )
/***** Initialization *****/
/**********************************************************************/
-void _mesa_init_fog( GLcontext * ctx )
+void _mesa_init_fog( struct gl_context * ctx )
{
/* Fog group */
ctx->Fog.Enabled = GL_FALSE;
diff --git a/src/mesa/main/fog.h b/src/mesa/main/fog.h
index a14d19cdb39..7df4f0b6735 100644
--- a/src/mesa/main/fog.h
+++ b/src/mesa/main/fog.h
@@ -54,7 +54,7 @@ _mesa_Fogfv(GLenum pname, const GLfloat *params );
extern void GLAPIENTRY
_mesa_Fogiv(GLenum pname, const GLint *params );
-extern void _mesa_init_fog( GLcontext * ctx );
+extern void _mesa_init_fog( struct gl_context * ctx );
#else
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index 654ea038a55..e18a9fc9977 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -945,6 +945,7 @@ _mesa_get_format_bits(gl_format format, GLenum pname)
* GL_UNSIGNED_NORMALIZED = unsigned int representing [0,1]
* GL_SIGNED_NORMALIZED = signed int representing [-1, 1]
* GL_UNSIGNED_INT = an ordinary unsigned integer
+ * GL_INT = an ordinary signed integer
* GL_FLOAT = an ordinary float
*/
GLenum
@@ -1007,6 +1008,20 @@ _mesa_is_format_packed_depth_stencil(gl_format format)
/**
+ * Is the given format a signed/unsigned integer color format?
+ */
+GLboolean
+_mesa_is_format_integer_color(gl_format format)
+{
+ const struct gl_format_info *info = _mesa_get_format_info(format);
+ return (info->DataType == GL_INT || info->DataType == GL_UNSIGNED_INT) &&
+ info->BaseFormat != GL_DEPTH_COMPONENT &&
+ info->BaseFormat != GL_DEPTH_STENCIL &&
+ info->BaseFormat != GL_STENCIL_INDEX;
+}
+
+
+/**
* Return color encoding for given format.
* \return GL_LINEAR or GL_SRGB
*/
diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
index 7674d8eaa4e..eeb460dabe7 100644
--- a/src/mesa/main/formats.h
+++ b/src/mesa/main/formats.h
@@ -199,6 +199,9 @@ _mesa_is_format_compressed(gl_format format);
extern GLboolean
_mesa_is_format_packed_depth_stencil(gl_format format);
+extern GLboolean
+_mesa_is_format_integer_color(gl_format format);
+
extern GLenum
_mesa_get_format_color_encoding(gl_format format);
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index a98c09cfbf3..5530c51c892 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -83,7 +83,7 @@ compute_depth_max(struct gl_framebuffer *fb)
* \sa _mesa_new_framebuffer
*/
struct gl_framebuffer *
-_mesa_create_framebuffer(const GLvisual *visual)
+_mesa_create_framebuffer(const struct gl_config *visual)
{
struct gl_framebuffer *fb = CALLOC_STRUCT(gl_framebuffer);
assert(visual);
@@ -102,7 +102,7 @@ _mesa_create_framebuffer(const GLvisual *visual)
* \sa _mesa_create_framebuffer
*/
struct gl_framebuffer *
-_mesa_new_framebuffer(GLcontext *ctx, GLuint name)
+_mesa_new_framebuffer(struct gl_context *ctx, GLuint name)
{
struct gl_framebuffer *fb;
(void) ctx;
@@ -122,7 +122,7 @@ _mesa_new_framebuffer(GLcontext *ctx, GLuint name)
*/
void
_mesa_initialize_window_framebuffer(struct gl_framebuffer *fb,
- const GLvisual *visual)
+ const struct gl_config *visual)
{
assert(fb);
assert(visual);
@@ -281,7 +281,7 @@ _mesa_reference_framebuffer(struct gl_framebuffer **ptr,
* without a currently bound rendering context.
*/
void
-_mesa_resize_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb,
+_mesa_resize_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
GLuint width, GLuint height)
{
GLuint i;
@@ -359,7 +359,7 @@ _mesa_resize_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb,
* from device drivers (as was done in the past).
*/
void
-_mesa_resizebuffers( GLcontext *ctx )
+_mesa_resizebuffers( struct gl_context *ctx )
{
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx );
@@ -372,7 +372,7 @@ _mesa_resizebuffers( GLcontext *ctx )
if (ctx->WinSysDrawBuffer) {
GLuint newWidth, newHeight;
- GLframebuffer *buffer = ctx->WinSysDrawBuffer;
+ struct gl_framebuffer *buffer = ctx->WinSysDrawBuffer;
assert(buffer->Name == 0);
@@ -389,7 +389,7 @@ _mesa_resizebuffers( GLcontext *ctx )
if (ctx->WinSysReadBuffer
&& ctx->WinSysReadBuffer != ctx->WinSysDrawBuffer) {
GLuint newWidth, newHeight;
- GLframebuffer *buffer = ctx->WinSysReadBuffer;
+ struct gl_framebuffer *buffer = ctx->WinSysReadBuffer;
assert(buffer->Name == 0);
@@ -429,7 +429,7 @@ _mesa_ResizeBuffersMESA( void )
* window-system framebuffes.
*/
static void
-update_framebuffer_size(GLcontext *ctx, struct gl_framebuffer *fb)
+update_framebuffer_size(struct gl_context *ctx, struct gl_framebuffer *fb)
{
GLuint minWidth = ~0, minHeight = ~0;
GLuint i;
@@ -464,7 +464,7 @@ update_framebuffer_size(GLcontext *ctx, struct gl_framebuffer *fb)
* \param ctx the GL context.
*/
void
-_mesa_update_draw_buffer_bounds(GLcontext *ctx)
+_mesa_update_draw_buffer_bounds(struct gl_context *ctx)
{
struct gl_framebuffer *buffer = ctx->DrawBuffer;
@@ -600,7 +600,7 @@ _mesa_update_framebuffer_visual(struct gl_framebuffer *fb)
* \param attIndex indicates the renderbuffer to possibly wrap
*/
void
-_mesa_update_depth_buffer(GLcontext *ctx,
+_mesa_update_depth_buffer(struct gl_context *ctx,
struct gl_framebuffer *fb,
GLuint attIndex)
{
@@ -641,7 +641,7 @@ _mesa_update_depth_buffer(GLcontext *ctx,
* \param attIndex indicates the renderbuffer to possibly wrap
*/
void
-_mesa_update_stencil_buffer(GLcontext *ctx,
+_mesa_update_stencil_buffer(struct gl_context *ctx,
struct gl_framebuffer *fb,
GLuint attIndex)
{
@@ -722,7 +722,7 @@ _mesa_update_stencil_buffer(GLcontext *ctx,
* writing colors.
*/
static void
-update_color_draw_buffers(GLcontext *ctx, struct gl_framebuffer *fb)
+update_color_draw_buffers(struct gl_context *ctx, struct gl_framebuffer *fb)
{
GLuint output;
@@ -746,7 +746,7 @@ update_color_draw_buffers(GLcontext *ctx, struct gl_framebuffer *fb)
* Unlike the DrawBuffer, we can only read from one (or zero) color buffers.
*/
static void
-update_color_read_buffer(GLcontext *ctx, struct gl_framebuffer *fb)
+update_color_read_buffer(struct gl_context *ctx, struct gl_framebuffer *fb)
{
(void) ctx;
if (fb->_ColorReadBufferIndex == -1 ||
@@ -781,7 +781,7 @@ update_color_read_buffer(GLcontext *ctx, struct gl_framebuffer *fb)
* glRenderbufferStorageEXT.
*/
static void
-update_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb)
+update_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
{
if (fb->Name == 0) {
/* This is a window-system framebuffer */
@@ -823,7 +823,7 @@ update_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb)
* Update state related to the current draw/read framebuffers.
*/
void
-_mesa_update_framebuffer(GLcontext *ctx)
+_mesa_update_framebuffer(struct gl_context *ctx)
{
struct gl_framebuffer *drawFb;
struct gl_framebuffer *readFb;
@@ -846,7 +846,7 @@ _mesa_update_framebuffer(GLcontext *ctx)
* \return GL_TRUE if buffer exists, GL_FALSE otherwise
*/
GLboolean
-_mesa_source_buffer_exists(GLcontext *ctx, GLenum format)
+_mesa_source_buffer_exists(struct gl_context *ctx, GLenum format)
{
const struct gl_renderbuffer_attachment *att = ctx->ReadBuffer->Attachment;
@@ -868,12 +868,23 @@ _mesa_source_buffer_exists(GLcontext *ctx, GLenum format)
case GL_LUMINANCE:
case GL_LUMINANCE_ALPHA:
case GL_INTENSITY:
+ case GL_RG:
case GL_RGB:
case GL_BGR:
case GL_RGBA:
case GL_BGRA:
case GL_ABGR_EXT:
case GL_COLOR_INDEX:
+ case GL_RED_INTEGER_EXT:
+ case GL_GREEN_INTEGER_EXT:
+ case GL_BLUE_INTEGER_EXT:
+ case GL_ALPHA_INTEGER_EXT:
+ case GL_RGB_INTEGER_EXT:
+ case GL_RGBA_INTEGER_EXT:
+ case GL_BGR_INTEGER_EXT:
+ case GL_BGRA_INTEGER_EXT:
+ case GL_LUMINANCE_INTEGER_EXT:
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
if (ctx->ReadBuffer->_ColorReadBuffer == NULL) {
return GL_FALSE;
}
@@ -922,7 +933,7 @@ _mesa_source_buffer_exists(GLcontext *ctx, GLenum format)
* XXX could do some code merging w/ above function.
*/
GLboolean
-_mesa_dest_buffer_exists(GLcontext *ctx, GLenum format)
+_mesa_dest_buffer_exists(struct gl_context *ctx, GLenum format)
{
const struct gl_renderbuffer_attachment *att = ctx->DrawBuffer->Attachment;
@@ -950,6 +961,16 @@ _mesa_dest_buffer_exists(GLcontext *ctx, GLenum format)
case GL_BGRA:
case GL_ABGR_EXT:
case GL_COLOR_INDEX:
+ case GL_RED_INTEGER_EXT:
+ case GL_GREEN_INTEGER_EXT:
+ case GL_BLUE_INTEGER_EXT:
+ case GL_ALPHA_INTEGER_EXT:
+ case GL_RGB_INTEGER_EXT:
+ case GL_RGBA_INTEGER_EXT:
+ case GL_BGR_INTEGER_EXT:
+ case GL_BGRA_INTEGER_EXT:
+ case GL_LUMINANCE_INTEGER_EXT:
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
/* Nothing special since GL_DRAW_BUFFER could be GL_NONE. */
/* Could assert that colorbuffer has RedBits > 0 */
break;
@@ -993,7 +1014,7 @@ _mesa_dest_buffer_exists(GLcontext *ctx, GLenum format)
* Used to answer the GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES query.
*/
GLenum
-_mesa_get_color_read_format(GLcontext *ctx)
+_mesa_get_color_read_format(struct gl_context *ctx)
{
switch (ctx->ReadBuffer->_ColorReadBuffer->Format) {
case MESA_FORMAT_ARGB8888:
@@ -1010,7 +1031,7 @@ _mesa_get_color_read_format(GLcontext *ctx)
* Used to answer the GL_IMPLEMENTATION_COLOR_READ_TYPE_OES query.
*/
GLenum
-_mesa_get_color_read_type(GLcontext *ctx)
+_mesa_get_color_read_type(struct gl_context *ctx)
{
switch (ctx->ReadBuffer->_ColorReadBuffer->Format) {
case MESA_FORMAT_ARGB8888:
diff --git a/src/mesa/main/framebuffer.h b/src/mesa/main/framebuffer.h
index 2e9844282f8..13722ea457a 100644
--- a/src/mesa/main/framebuffer.h
+++ b/src/mesa/main/framebuffer.h
@@ -29,14 +29,14 @@
#include "mtypes.h"
extern struct gl_framebuffer *
-_mesa_create_framebuffer(const GLvisual *visual);
+_mesa_create_framebuffer(const struct gl_config *visual);
extern struct gl_framebuffer *
-_mesa_new_framebuffer(GLcontext *ctx, GLuint name);
+_mesa_new_framebuffer(struct gl_context *ctx, GLuint name);
extern void
_mesa_initialize_window_framebuffer(struct gl_framebuffer *fb,
- const GLvisual *visual);
+ const struct gl_config *visual);
extern void
_mesa_initialize_user_framebuffer(struct gl_framebuffer *fb, GLuint name);
@@ -52,45 +52,45 @@ _mesa_reference_framebuffer(struct gl_framebuffer **ptr,
struct gl_framebuffer *fb);
extern void
-_mesa_resize_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb,
+_mesa_resize_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
GLuint width, GLuint height);
extern void
-_mesa_resizebuffers( GLcontext *ctx );
+_mesa_resizebuffers( struct gl_context *ctx );
extern void GLAPIENTRY
_mesa_ResizeBuffersMESA( void );
extern void
-_mesa_update_draw_buffer_bounds(GLcontext *ctx);
+_mesa_update_draw_buffer_bounds(struct gl_context *ctx);
extern void
_mesa_update_framebuffer_visual(struct gl_framebuffer *fb);
extern void
-_mesa_update_depth_buffer(GLcontext *ctx, struct gl_framebuffer *fb,
+_mesa_update_depth_buffer(struct gl_context *ctx, struct gl_framebuffer *fb,
GLuint attIndex);
extern void
-_mesa_update_stencil_buffer(GLcontext *ctx, struct gl_framebuffer *fb,
+_mesa_update_stencil_buffer(struct gl_context *ctx, struct gl_framebuffer *fb,
GLuint attIndex);
extern void
-_mesa_update_framebuffer(GLcontext *ctx);
+_mesa_update_framebuffer(struct gl_context *ctx);
extern GLboolean
-_mesa_source_buffer_exists(GLcontext *ctx, GLenum format);
+_mesa_source_buffer_exists(struct gl_context *ctx, GLenum format);
extern GLboolean
-_mesa_dest_buffer_exists(GLcontext *ctx, GLenum format);
+_mesa_dest_buffer_exists(struct gl_context *ctx, GLenum format);
extern GLenum
-_mesa_get_color_read_type(GLcontext *ctx);
+_mesa_get_color_read_type(struct gl_context *ctx);
extern GLenum
-_mesa_get_color_read_format(GLcontext *ctx);
+_mesa_get_color_read_format(struct gl_context *ctx);
extern void
_mesa_print_framebuffer(const struct gl_framebuffer *fb);
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index cb456fb64d8..da9df27bdb6 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -36,17 +36,17 @@
/* This is a table driven implemetation of the glGet*v() functions.
* The basic idea is that most getters just look up an int somewhere
- * in GLcontext and then convert it to a bool or float according to
+ * in struct gl_context and then convert it to a bool or float according to
* which of glGetIntegerv() glGetBooleanv() etc is being called.
* Instead of generating code to do this, we can just record the enum
- * value and the offset into GLcontext in an array of structs. Then
+ * value and the offset into struct gl_context in an array of structs. Then
* in glGet*(), we lookup the struct for the enum in question, and use
* the offset to get the int we need.
*
* Sometimes we need to look up a float, a boolean, a bit in a
* bitfield, a matrix or other types instead, so we need to track the
- * type of the value in GLcontext. And sometimes the value isn't in
- * GLcontext but in the drawbuffer, the array object, current texture
+ * type of the value in struct gl_context. And sometimes the value isn't in
+ * struct gl_context but in the drawbuffer, the array object, current texture
* unit, or maybe it's a computed value. So we need to also track
* where or how to find the value. Finally, we sometimes need to
* check that one of a number of extensions are enabled, the GL
@@ -165,7 +165,7 @@ union value {
#define BUFFER_FIELD(field, type) \
LOC_BUFFER, type, offsetof(struct gl_framebuffer, field)
#define CONTEXT_FIELD(field, type) \
- LOC_CONTEXT, type, offsetof(GLcontext, field)
+ LOC_CONTEXT, type, offsetof(struct gl_context, field)
#define ARRAY_FIELD(field, type) \
LOC_ARRAY, type, offsetof(struct gl_array_object, field)
#define CONST(value) \
@@ -173,6 +173,7 @@ union value {
#define BUFFER_INT(field) BUFFER_FIELD(field, TYPE_INT)
#define BUFFER_ENUM(field) BUFFER_FIELD(field, TYPE_ENUM)
+#define BUFFER_BOOL(field) BUFFER_FIELD(field, TYPE_BOOLEAN)
#define CONTEXT_INT(field) CONTEXT_FIELD(field, TYPE_INT)
#define CONTEXT_INT2(field) CONTEXT_FIELD(field, TYPE_INT_2)
@@ -260,6 +261,12 @@ static const int extra_EXT_fog_coord_flush_current[] = {
EXTRA_END
};
+static const int extra_EXT_texture_integer[] = {
+ EXT(EXT_texture_integer),
+ EXTRA_END
+};
+
+
EXTRA_EXT(ARB_multitexture);
EXTRA_EXT(ARB_texture_cube_map);
EXTRA_EXT(MESA_texture_array);
@@ -320,6 +327,12 @@ extra_NV_vertex_program_ARB_vertex_program_ARB_fragment_program_NV_vertex_progra
EXTRA_END
};
+static const int
+extra_NV_primitive_restart[] = {
+ EXT(NV_primitive_restart),
+ EXTRA_END
+};
+
static const int extra_version_30[] = { EXTRA_VERSION_30, EXTRA_END };
static const int extra_version_31[] = { EXTRA_VERSION_31, EXTRA_END };
static const int extra_version_32[] = { EXTRA_VERSION_32, EXTRA_END };
@@ -371,7 +384,7 @@ static const struct value_desc values[] = {
{ GL_MAX_ELEMENTS_VERTICES, CONTEXT_INT(Const.MaxArrayLockSize), NO_EXTRA },
{ GL_MAX_ELEMENTS_INDICES, CONTEXT_INT(Const.MaxArrayLockSize), NO_EXTRA },
{ GL_MAX_TEXTURE_SIZE, LOC_CUSTOM, TYPE_INT,
- offsetof(GLcontext, Const.MaxTextureLevels), NO_EXTRA },
+ offsetof(struct gl_context, Const.MaxTextureLevels), NO_EXTRA },
{ GL_MAX_VIEWPORT_DIMS, CONTEXT_INT2(Const.MaxViewportWidth), NO_EXTRA },
{ GL_PACK_ALIGNMENT, CONTEXT_INT(Pack.Alignment), NO_EXTRA },
{ GL_ALIASED_POINT_SIZE_RANGE, CONTEXT_FLOAT2(Const.MinPointSize), NO_EXTRA },
@@ -410,7 +423,7 @@ static const struct value_desc values[] = {
{ GL_TEXTURE_BINDING_CUBE_MAP_ARB, LOC_CUSTOM, TYPE_INT,
TEXTURE_CUBE_INDEX, extra_ARB_texture_cube_map },
{ GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB, LOC_CUSTOM, TYPE_INT,
- offsetof(GLcontext, Const.MaxCubeTextureLevels),
+ offsetof(struct gl_context, Const.MaxCubeTextureLevels),
extra_ARB_texture_cube_map }, /* XXX: OES_texture_cube_map */
/* XXX: OES_blend_subtract */
@@ -522,7 +535,7 @@ static const struct value_desc values[] = {
{ GL_MAX_TEXTURE_STACK_DEPTH, CONST(MAX_TEXTURE_STACK_DEPTH), NO_EXTRA },
{ GL_MODELVIEW_MATRIX, CONTEXT_MATRIX(ModelviewMatrixStack.Top), NO_EXTRA },
{ GL_MODELVIEW_STACK_DEPTH, LOC_CUSTOM, TYPE_INT,
- offsetof(GLcontext, ModelviewMatrixStack.Depth), NO_EXTRA },
+ offsetof(struct gl_context, ModelviewMatrixStack.Depth), NO_EXTRA },
{ GL_NORMALIZE, CONTEXT_BOOL(Transform.Normalize), NO_EXTRA },
{ GL_PACK_SKIP_IMAGES_EXT, CONTEXT_INT(Pack.SkipImages), NO_EXTRA },
{ GL_PERSPECTIVE_CORRECTION_HINT, CONTEXT_ENUM(Hint.PerspectiveCorrection), NO_EXTRA },
@@ -535,7 +548,7 @@ static const struct value_desc values[] = {
{ GL_POINT_FADE_THRESHOLD_SIZE_EXT, CONTEXT_FLOAT(Point.Threshold), NO_EXTRA },
{ GL_PROJECTION_MATRIX, CONTEXT_MATRIX(ProjectionMatrixStack.Top), NO_EXTRA },
{ GL_PROJECTION_STACK_DEPTH, LOC_CUSTOM, TYPE_INT,
- offsetof(GLcontext, ProjectionMatrixStack.Depth), NO_EXTRA },
+ offsetof(struct gl_context, ProjectionMatrixStack.Depth), NO_EXTRA },
{ GL_RESCALE_NORMAL, CONTEXT_BOOL(Transform.RescaleNormals), NO_EXTRA },
{ GL_SHADE_MODEL, CONTEXT_ENUM(Light.ShadeModel), NO_EXTRA },
{ GL_TEXTURE_2D, LOC_CUSTOM, TYPE_BOOLEAN, 0, NO_EXTRA },
@@ -672,7 +685,7 @@ static const struct value_desc values[] = {
/* OES_texture_3D */
{ GL_TEXTURE_BINDING_3D, LOC_CUSTOM, TYPE_INT, TEXTURE_3D_INDEX, NO_EXTRA },
{ GL_MAX_3D_TEXTURE_SIZE, LOC_CUSTOM, TYPE_INT,
- offsetof(GLcontext, Const.Max3DTextureLevels), NO_EXTRA },
+ offsetof(struct gl_context, Const.Max3DTextureLevels), NO_EXTRA },
/* GL_ARB_fragment_program/OES_standard_derivatives */
{ GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB,
@@ -683,11 +696,11 @@ static const struct value_desc values[] = {
/* Enums unique to OpenGL ES 2.0 */
{ 0, 0, TYPE_API_MASK, API_OPENGLES2_BIT, NO_EXTRA },
{ GL_MAX_FRAGMENT_UNIFORM_VECTORS, LOC_CUSTOM, TYPE_INT,
- offsetof(GLcontext, Const.FragmentProgram.MaxUniformComponents), NO_EXTRA },
+ offsetof(struct gl_context, Const.FragmentProgram.MaxUniformComponents), NO_EXTRA },
{ GL_MAX_VARYING_VECTORS, LOC_CUSTOM, TYPE_INT,
- offsetof(GLcontext, Const.MaxVarying), NO_EXTRA },
+ offsetof(struct gl_context, Const.MaxVarying), NO_EXTRA },
{ GL_MAX_VERTEX_UNIFORM_VECTORS, LOC_CUSTOM, TYPE_INT,
- offsetof(GLcontext, Const.VertexProgram.MaxUniformComponents), NO_EXTRA },
+ offsetof(struct gl_context, Const.VertexProgram.MaxUniformComponents), NO_EXTRA },
{ GL_SHADER_COMPILER, CONST(1), NO_EXTRA },
/* OES_get_program_binary */
{ GL_NUM_SHADER_BINARY_FORMATS, CONST(0), NO_EXTRA },
@@ -1019,6 +1032,12 @@ static const struct value_desc values[] = {
{ GL_MAX_SPOT_EXPONENT_NV, CONTEXT_FLOAT(Const.MaxSpotExponent),
extra_NV_light_max_exponent },
+ /* GL_NV_primitive_restart */
+ { GL_PRIMITIVE_RESTART_NV, CONTEXT_BOOL(Array.PrimitiveRestart),
+ extra_NV_primitive_restart },
+ { GL_PRIMITIVE_RESTART_INDEX_NV, CONTEXT_INT(Array.RestartIndex),
+ extra_NV_primitive_restart },
+
/* GL_ARB_vertex_buffer_object */
{ GL_INDEX_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT,
offsetof(struct gl_array_object, Index.BufferObj), NO_EXTRA },
@@ -1132,6 +1151,10 @@ static const struct value_desc values[] = {
{ GL_MAX_SERVER_WAIT_TIMEOUT,
CONTEXT_INT64(Const.MaxServerWaitTimeout), extra_ARB_sync },
+ /* GL_EXT_texture_integer */
+ { GL_RGBA_INTEGER_MODE_EXT, BUFFER_BOOL(_IntegerColor),
+ extra_EXT_texture_integer },
+
/* GL_EXT_transform_feedback */
{ GL_TRANSFORM_FEEDBACK_BUFFER_BINDING, LOC_CUSTOM, TYPE_INT, 0,
extra_EXT_transform_feedback },
@@ -1182,11 +1205,15 @@ static const struct value_desc values[] = {
{ GL_CONTEXT_FLAGS, CONTEXT_INT(Const.ContextFlags), extra_version_30 },
/* GL 3.1 */
+ /* NOTE: different enum values for GL_PRIMITIVE_RESTART_NV
+ * vs. GL_PRIMITIVE_RESTART!
+ */
{ GL_PRIMITIVE_RESTART, CONTEXT_BOOL(Array.PrimitiveRestart),
extra_version_31 },
{ GL_PRIMITIVE_RESTART_INDEX, CONTEXT_INT(Array.RestartIndex),
extra_version_31 },
+
/* GL 3.2 */
{ GL_CONTEXT_PROFILE_MASK, CONTEXT_INT(Const.ProfileMask),
extra_version_32 },
@@ -1256,7 +1283,7 @@ print_table_stats(void)
*
* \param the current context, for determining the API in question
*/
-void _mesa_init_get_hash(GLcontext *ctx)
+void _mesa_init_get_hash(struct gl_context *ctx)
{
int i, hash, index, mask;
int api_mask = 0, api_bit;
@@ -1305,7 +1332,7 @@ void _mesa_init_get_hash(GLcontext *ctx)
* \param v pointer to the tmp declared in the calling glGet*v() function
*/
static void
-find_custom_value(GLcontext *ctx, const struct value_desc *d, union value *v)
+find_custom_value(struct gl_context *ctx, const struct value_desc *d, union value *v)
{
struct gl_buffer_object *buffer_obj;
struct gl_client_array *array;
@@ -1552,7 +1579,7 @@ find_custom_value(GLcontext *ctx, const struct value_desc *d, union value *v)
break;
case GL_CURRENT_PROGRAM:
v->value_int =
- ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0;
+ ctx->Shader.ActiveProgram ? ctx->Shader.ActiveProgram->Name : 0;
break;
case GL_READ_FRAMEBUFFER_BINDING_EXT:
v->value_int = ctx->ReadBuffer->Name;
@@ -1583,7 +1610,7 @@ find_custom_value(GLcontext *ctx, const struct value_desc *d, union value *v)
* otherwise GL_TRUE.
*/
static GLboolean
-check_extra(GLcontext *ctx, const char *func, const struct value_desc *d)
+check_extra(struct gl_context *ctx, const char *func, const struct value_desc *d)
{
const GLuint version = ctx->VersionMajor * 10 + ctx->VersionMinor;
int total, enabled;
diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c
index 3910047fb5d..bfa283f6a30 100644
--- a/src/mesa/main/getstring.c
+++ b/src/mesa/main/getstring.c
@@ -35,7 +35,7 @@
* Return the string for a glGetString(GL_SHADING_LANGUAGE_VERSION) query.
*/
static const GLubyte *
-shading_language_version(GLcontext *ctx)
+shading_language_version(struct gl_context *ctx)
{
switch (ctx->API) {
case API_OPENGL:
@@ -233,7 +233,7 @@ _mesa_GetPointerv( GLenum pname, GLvoid **params )
* Returns the current GL error code, or GL_NO_ERROR.
* \return current error code
*
- * Returns __GLcontextRec::ErrorValue.
+ * Returns __struct gl_contextRec::ErrorValue.
*/
GLenum GLAPIENTRY
_mesa_GetError( void )
diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h
index 45f7b55ad2a..08ad5f32018 100644
--- a/src/mesa/main/glheader.h
+++ b/src/mesa/main/glheader.h
@@ -52,7 +52,6 @@
#define GL_GLEXT_PROTOTYPES
#include "GL/gl.h"
#include "GL/glext.h"
-#include "GL/internal/glcore.h"
/**
@@ -140,6 +139,25 @@ typedef void *GLeglImageOES;
*/
#define MESA_GEOMETRY_PROGRAM 0x8c26
-
+/* Several fields of struct gl_config can take these as values. Since
+ * GLX header files may not be available everywhere they need to be used,
+ * redefine them here.
+ */
+#define GLX_NONE 0x8000
+#define GLX_SLOW_CONFIG 0x8001
+#define GLX_TRUE_COLOR 0x8002
+#define GLX_DIRECT_COLOR 0x8003
+#define GLX_PSEUDO_COLOR 0x8004
+#define GLX_STATIC_COLOR 0x8005
+#define GLX_GRAY_SCALE 0x8006
+#define GLX_STATIC_GRAY 0x8007
+#define GLX_TRANSPARENT_RGB 0x8008
+#define GLX_TRANSPARENT_INDEX 0x8009
+#define GLX_NON_CONFORMANT_CONFIG 0x800D
+#define GLX_SWAP_EXCHANGE_OML 0x8061
+#define GLX_SWAP_COPY_OML 0x8062
+#define GLX_SWAP_UNDEFINED_OML 0x8063
+
+#define GLX_DONT_CARE 0xFFFFFFFF
#endif /* GLHEADER_H */
diff --git a/src/mesa/main/hash.c b/src/mesa/main/hash.c
index b624e6ecac1..72d924dcc38 100644
--- a/src/mesa/main/hash.c
+++ b/src/mesa/main/hash.c
@@ -277,7 +277,7 @@ _mesa_HashRemove(struct _mesa_HashTable *table, GLuint key)
* \param table the hash table to delete
* \param callback the callback function
* \param userData arbitrary pointer to pass along to the callback
- * (this is typically a GLcontext pointer)
+ * (this is typically a struct gl_context pointer)
*/
void
_mesa_HashDeleteAll(struct _mesa_HashTable *table,
@@ -313,7 +313,7 @@ _mesa_HashDeleteAll(struct _mesa_HashTable *table,
* \param table the hash table to walk
* \param callback the callback function
* \param userData arbitrary pointer to pass along to the callback
- * (this is typically a GLcontext pointer)
+ * (this is typically a struct gl_context pointer)
*/
void
_mesa_HashWalk(const struct _mesa_HashTable *table,
diff --git a/src/mesa/main/hint.c b/src/mesa/main/hint.c
index 8902ae37763..878f10d4a43 100644
--- a/src/mesa/main/hint.c
+++ b/src/mesa/main/hint.c
@@ -130,7 +130,7 @@ _mesa_Hint( GLenum target, GLenum mode )
/***** Initialization *****/
/**********************************************************************/
-void _mesa_init_hint( GLcontext * ctx )
+void _mesa_init_hint( struct gl_context * ctx )
{
/* Hint group */
ctx->Hint.PerspectiveCorrection = GL_DONT_CARE;
diff --git a/src/mesa/main/hint.h b/src/mesa/main/hint.h
index bfc3887107d..66e78ad6557 100644
--- a/src/mesa/main/hint.h
+++ b/src/mesa/main/hint.h
@@ -45,7 +45,7 @@ extern void GLAPIENTRY
_mesa_Hint( GLenum target, GLenum mode );
extern void
-_mesa_init_hint( GLcontext * ctx );
+_mesa_init_hint( struct gl_context * ctx );
#else
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index ce10b3b1f85..43cc06d7196 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -32,7 +32,6 @@
#include "glheader.h"
#include "colormac.h"
-#include "enums.h"
#include "image.h"
#include "imports.h"
#include "macros.h"
@@ -86,36 +85,6 @@ _mesa_type_is_packed(GLenum type)
return GL_FALSE;
}
-/**
- * Flip the 8 bits in each byte of the given array.
- *
- * \param p array.
- * \param n number of bytes.
- *
- * \todo try this trick to flip bytes someday:
- * \code
- * v = ((v & 0x55555555) << 1) | ((v >> 1) & 0x55555555);
- * v = ((v & 0x33333333) << 2) | ((v >> 2) & 0x33333333);
- * v = ((v & 0x0f0f0f0f) << 4) | ((v >> 4) & 0x0f0f0f0f);
- * \endcode
- */
-static void
-flip_bytes( GLubyte *p, GLuint n )
-{
- GLuint i, a, b;
- for (i = 0; i < n; i++) {
- b = (GLuint) p[i]; /* words are often faster than bytes */
- a = ((b & 0x01) << 7) |
- ((b & 0x02) << 5) |
- ((b & 0x04) << 3) |
- ((b & 0x08) << 1) |
- ((b & 0x10) >> 1) |
- ((b & 0x20) >> 3) |
- ((b & 0x40) >> 5) |
- ((b & 0x80) >> 7);
- p[i] = (GLubyte) a;
- }
-}
/**
@@ -399,7 +368,7 @@ _mesa_bytes_per_pixel( GLenum format, GLenum type )
* otherwise.
*/
GLboolean
-_mesa_is_legal_format_and_type( GLcontext *ctx, GLenum format, GLenum type )
+_mesa_is_legal_format_and_type( struct gl_context *ctx, GLenum format, GLenum type )
{
switch (format) {
case GL_COLOR_INDEX:
@@ -699,10 +668,57 @@ _mesa_is_color_format(GLenum format)
case GL_COMPRESSED_SIGNED_RED_RGTC1:
case GL_COMPRESSED_RG_RGTC2:
case GL_COMPRESSED_SIGNED_RG_RGTC2:
- return GL_TRUE;
- /* signed texture formats */
+ /* signed, normalized texture formats */
case GL_RGBA_SNORM:
case GL_RGBA8_SNORM:
+ /* generic integer formats */
+ case GL_RED_INTEGER_EXT:
+ case GL_GREEN_INTEGER_EXT:
+ case GL_BLUE_INTEGER_EXT:
+ case GL_ALPHA_INTEGER_EXT:
+ case GL_RGB_INTEGER_EXT:
+ case GL_RGBA_INTEGER_EXT:
+ case GL_BGR_INTEGER_EXT:
+ case GL_BGRA_INTEGER_EXT:
+ case GL_LUMINANCE_INTEGER_EXT:
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ /* sized integer formats */
+ case GL_RGBA32UI_EXT:
+ case GL_RGB32UI_EXT:
+ case GL_ALPHA32UI_EXT:
+ case GL_INTENSITY32UI_EXT:
+ case GL_LUMINANCE32UI_EXT:
+ case GL_LUMINANCE_ALPHA32UI_EXT:
+ case GL_RGBA16UI_EXT:
+ case GL_RGB16UI_EXT:
+ case GL_ALPHA16UI_EXT:
+ case GL_INTENSITY16UI_EXT:
+ case GL_LUMINANCE16UI_EXT:
+ case GL_LUMINANCE_ALPHA16UI_EXT:
+ case GL_RGBA8UI_EXT:
+ case GL_RGB8UI_EXT:
+ case GL_ALPHA8UI_EXT:
+ case GL_INTENSITY8UI_EXT:
+ case GL_LUMINANCE8UI_EXT:
+ case GL_LUMINANCE_ALPHA8UI_EXT:
+ case GL_RGBA32I_EXT:
+ case GL_RGB32I_EXT:
+ case GL_ALPHA32I_EXT:
+ case GL_INTENSITY32I_EXT:
+ case GL_LUMINANCE32I_EXT:
+ case GL_LUMINANCE_ALPHA32I_EXT:
+ case GL_RGBA16I_EXT:
+ case GL_RGB16I_EXT:
+ case GL_ALPHA16I_EXT:
+ case GL_INTENSITY16I_EXT:
+ case GL_LUMINANCE16I_EXT:
+ case GL_LUMINANCE_ALPHA16I_EXT:
+ case GL_RGBA8I_EXT:
+ case GL_RGB8I_EXT:
+ case GL_ALPHA8I_EXT:
+ case GL_INTENSITY8I_EXT:
+ case GL_LUMINANCE8I_EXT:
+ case GL_LUMINANCE_ALPHA8I_EXT:
return GL_TRUE;
case GL_YCBCR_MESA: /* not considered to be RGB */
/* fall-through */
@@ -846,6 +862,7 @@ GLboolean
_mesa_is_integer_format(GLenum format)
{
switch (format) {
+ /* generic integer formats */
case GL_RED_INTEGER_EXT:
case GL_GREEN_INTEGER_EXT:
case GL_BLUE_INTEGER_EXT:
@@ -856,6 +873,43 @@ _mesa_is_integer_format(GLenum format)
case GL_BGRA_INTEGER_EXT:
case GL_LUMINANCE_INTEGER_EXT:
case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ /* specific integer formats */
+ case GL_RGBA32UI_EXT:
+ case GL_RGB32UI_EXT:
+ case GL_ALPHA32UI_EXT:
+ case GL_INTENSITY32UI_EXT:
+ case GL_LUMINANCE32UI_EXT:
+ case GL_LUMINANCE_ALPHA32UI_EXT:
+ case GL_RGBA16UI_EXT:
+ case GL_RGB16UI_EXT:
+ case GL_ALPHA16UI_EXT:
+ case GL_INTENSITY16UI_EXT:
+ case GL_LUMINANCE16UI_EXT:
+ case GL_LUMINANCE_ALPHA16UI_EXT:
+ case GL_RGBA8UI_EXT:
+ case GL_RGB8UI_EXT:
+ case GL_ALPHA8UI_EXT:
+ case GL_INTENSITY8UI_EXT:
+ case GL_LUMINANCE8UI_EXT:
+ case GL_LUMINANCE_ALPHA8UI_EXT:
+ case GL_RGBA32I_EXT:
+ case GL_RGB32I_EXT:
+ case GL_ALPHA32I_EXT:
+ case GL_INTENSITY32I_EXT:
+ case GL_LUMINANCE32I_EXT:
+ case GL_LUMINANCE_ALPHA32I_EXT:
+ case GL_RGBA16I_EXT:
+ case GL_RGB16I_EXT:
+ case GL_ALPHA16I_EXT:
+ case GL_INTENSITY16I_EXT:
+ case GL_LUMINANCE16I_EXT:
+ case GL_LUMINANCE_ALPHA16I_EXT:
+ case GL_RGBA8I_EXT:
+ case GL_RGB8I_EXT:
+ case GL_ALPHA8I_EXT:
+ case GL_INTENSITY8I_EXT:
+ case GL_LUMINANCE8I_EXT:
+ case GL_LUMINANCE_ALPHA8I_EXT:
return GL_TRUE;
default:
return GL_FALSE;
@@ -869,7 +923,7 @@ _mesa_is_integer_format(GLenum format)
* \return GL_TRUE if compressed, GL_FALSE if uncompressed
*/
GLboolean
-_mesa_is_compressed_format(GLcontext *ctx, GLenum format)
+_mesa_is_compressed_format(struct gl_context *ctx, GLenum format)
{
switch (format) {
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
@@ -1119,8 +1173,6 @@ _mesa_image_row_stride( const struct gl_pixelstore_attrib *packing,
}
-#if _HAVE_FULL_GL
-
/*
* Compute the stride between images in a 3D texture (in bytes) for the given
* pixel packing parameters and image width, format and type.
@@ -1168,248 +1220,6 @@ _mesa_image_image_stride( const struct gl_pixelstore_attrib *packing,
}
-/*
- * Unpack a 32x32 pixel polygon stipple from user memory using the
- * current pixel unpack settings.
- */
-void
-_mesa_unpack_polygon_stipple( const GLubyte *pattern, GLuint dest[32],
- const struct gl_pixelstore_attrib *unpacking )
-{
- GLubyte *ptrn = (GLubyte *) _mesa_unpack_bitmap(32, 32, pattern, unpacking);
- if (ptrn) {
- /* Convert pattern from GLubytes to GLuints and handle big/little
- * endian differences
- */
- GLubyte *p = ptrn;
- GLint i;
- for (i = 0; i < 32; i++) {
- dest[i] = (p[0] << 24)
- | (p[1] << 16)
- | (p[2] << 8)
- | (p[3] );
- p += 4;
- }
- free(ptrn);
- }
-}
-
-
-/*
- * Pack polygon stipple into user memory given current pixel packing
- * settings.
- */
-void
-_mesa_pack_polygon_stipple( const GLuint pattern[32], GLubyte *dest,
- const struct gl_pixelstore_attrib *packing )
-{
- /* Convert pattern from GLuints to GLubytes to handle big/little
- * endian differences.
- */
- GLubyte ptrn[32*4];
- GLint i;
- for (i = 0; i < 32; i++) {
- ptrn[i * 4 + 0] = (GLubyte) ((pattern[i] >> 24) & 0xff);
- ptrn[i * 4 + 1] = (GLubyte) ((pattern[i] >> 16) & 0xff);
- ptrn[i * 4 + 2] = (GLubyte) ((pattern[i] >> 8 ) & 0xff);
- ptrn[i * 4 + 3] = (GLubyte) ((pattern[i] ) & 0xff);
- }
-
- _mesa_pack_bitmap(32, 32, ptrn, dest, packing);
-}
-
-
-/*
- * Unpack bitmap data. Resulting data will be in most-significant-bit-first
- * order with row alignment = 1 byte.
- */
-GLvoid *
-_mesa_unpack_bitmap( GLint width, GLint height, const GLubyte *pixels,
- const struct gl_pixelstore_attrib *packing )
-{
- GLint bytes, row, width_in_bytes;
- GLubyte *buffer, *dst;
-
- if (!pixels)
- return NULL;
-
- /* Alloc dest storage */
- bytes = ((width + 7) / 8 * height);
- buffer = (GLubyte *) malloc( bytes );
- if (!buffer)
- return NULL;
-
- width_in_bytes = CEILING( width, 8 );
- dst = buffer;
- for (row = 0; row < height; row++) {
- const GLubyte *src = (const GLubyte *)
- _mesa_image_address2d(packing, pixels, width, height,
- GL_COLOR_INDEX, GL_BITMAP, row, 0);
- if (!src) {
- free(buffer);
- return NULL;
- }
-
- if ((packing->SkipPixels & 7) == 0) {
- memcpy( dst, src, width_in_bytes );
- if (packing->LsbFirst) {
- flip_bytes( dst, width_in_bytes );
- }
- }
- else {
- /* handling SkipPixels is a bit tricky (no pun intended!) */
- GLint i;
- if (packing->LsbFirst) {
- GLubyte srcMask = 1 << (packing->SkipPixels & 0x7);
- GLubyte dstMask = 128;
- const GLubyte *s = src;
- GLubyte *d = dst;
- *d = 0;
- for (i = 0; i < width; i++) {
- if (*s & srcMask) {
- *d |= dstMask;
- }
- if (srcMask == 128) {
- srcMask = 1;
- s++;
- }
- else {
- srcMask = srcMask << 1;
- }
- if (dstMask == 1) {
- dstMask = 128;
- d++;
- *d = 0;
- }
- else {
- dstMask = dstMask >> 1;
- }
- }
- }
- else {
- GLubyte srcMask = 128 >> (packing->SkipPixels & 0x7);
- GLubyte dstMask = 128;
- const GLubyte *s = src;
- GLubyte *d = dst;
- *d = 0;
- for (i = 0; i < width; i++) {
- if (*s & srcMask) {
- *d |= dstMask;
- }
- if (srcMask == 1) {
- srcMask = 128;
- s++;
- }
- else {
- srcMask = srcMask >> 1;
- }
- if (dstMask == 1) {
- dstMask = 128;
- d++;
- *d = 0;
- }
- else {
- dstMask = dstMask >> 1;
- }
- }
- }
- }
- dst += width_in_bytes;
- }
-
- return buffer;
-}
-
-
-/*
- * Pack bitmap data.
- */
-void
-_mesa_pack_bitmap( GLint width, GLint height, const GLubyte *source,
- GLubyte *dest, const struct gl_pixelstore_attrib *packing )
-{
- GLint row, width_in_bytes;
- const GLubyte *src;
-
- if (!source)
- return;
-
- width_in_bytes = CEILING( width, 8 );
- src = source;
- for (row = 0; row < height; row++) {
- GLubyte *dst = (GLubyte *) _mesa_image_address2d(packing, dest,
- width, height, GL_COLOR_INDEX, GL_BITMAP, row, 0);
- if (!dst)
- return;
-
- if ((packing->SkipPixels & 7) == 0) {
- memcpy( dst, src, width_in_bytes );
- if (packing->LsbFirst) {
- flip_bytes( dst, width_in_bytes );
- }
- }
- else {
- /* handling SkipPixels is a bit tricky (no pun intended!) */
- GLint i;
- if (packing->LsbFirst) {
- GLubyte srcMask = 128;
- GLubyte dstMask = 1 << (packing->SkipPixels & 0x7);
- const GLubyte *s = src;
- GLubyte *d = dst;
- *d = 0;
- for (i = 0; i < width; i++) {
- if (*s & srcMask) {
- *d |= dstMask;
- }
- if (srcMask == 1) {
- srcMask = 128;
- s++;
- }
- else {
- srcMask = srcMask >> 1;
- }
- if (dstMask == 128) {
- dstMask = 1;
- d++;
- *d = 0;
- }
- else {
- dstMask = dstMask << 1;
- }
- }
- }
- else {
- GLubyte srcMask = 128;
- GLubyte dstMask = 128 >> (packing->SkipPixels & 0x7);
- const GLubyte *s = src;
- GLubyte *d = dst;
- *d = 0;
- for (i = 0; i < width; i++) {
- if (*s & srcMask) {
- *d |= dstMask;
- }
- if (srcMask == 1) {
- srcMask = 128;
- s++;
- }
- else {
- srcMask = srcMask >> 1;
- }
- if (dstMask == 1) {
- dstMask = 128;
- d++;
- *d = 0;
- }
- else {
- dstMask = dstMask >> 1;
- }
- }
- }
- }
- src += width_in_bytes;
- }
-}
-
/**
* "Expand" a bitmap from 1-bit per pixel to 8-bits per pixel.
@@ -1496,4047 +1306,6 @@ _mesa_expand_bitmap(GLsizei width, GLsizei height,
}
-/**********************************************************************/
-/***** Pixel processing functions ******/
-/**********************************************************************/
-
-/*
- * Apply scale and bias factors to an array of RGBA pixels.
- */
-void
-_mesa_scale_and_bias_rgba(GLuint n, GLfloat rgba[][4],
- GLfloat rScale, GLfloat gScale,
- GLfloat bScale, GLfloat aScale,
- GLfloat rBias, GLfloat gBias,
- GLfloat bBias, GLfloat aBias)
-{
- if (rScale != 1.0 || rBias != 0.0) {
- GLuint i;
- for (i = 0; i < n; i++) {
- rgba[i][RCOMP] = rgba[i][RCOMP] * rScale + rBias;
- }
- }
- if (gScale != 1.0 || gBias != 0.0) {
- GLuint i;
- for (i = 0; i < n; i++) {
- rgba[i][GCOMP] = rgba[i][GCOMP] * gScale + gBias;
- }
- }
- if (bScale != 1.0 || bBias != 0.0) {
- GLuint i;
- for (i = 0; i < n; i++) {
- rgba[i][BCOMP] = rgba[i][BCOMP] * bScale + bBias;
- }
- }
- if (aScale != 1.0 || aBias != 0.0) {
- GLuint i;
- for (i = 0; i < n; i++) {
- rgba[i][ACOMP] = rgba[i][ACOMP] * aScale + aBias;
- }
- }
-}
-
-
-/*
- * Apply pixel mapping to an array of floating point RGBA pixels.
- */
-void
-_mesa_map_rgba( const GLcontext *ctx, GLuint n, GLfloat rgba[][4] )
-{
- const GLfloat rscale = (GLfloat) (ctx->PixelMaps.RtoR.Size - 1);
- const GLfloat gscale = (GLfloat) (ctx->PixelMaps.GtoG.Size - 1);
- const GLfloat bscale = (GLfloat) (ctx->PixelMaps.BtoB.Size - 1);
- const GLfloat ascale = (GLfloat) (ctx->PixelMaps.AtoA.Size - 1);
- const GLfloat *rMap = ctx->PixelMaps.RtoR.Map;
- const GLfloat *gMap = ctx->PixelMaps.GtoG.Map;
- const GLfloat *bMap = ctx->PixelMaps.BtoB.Map;
- const GLfloat *aMap = ctx->PixelMaps.AtoA.Map;
- GLuint i;
- for (i=0;i<n;i++) {
- GLfloat r = CLAMP(rgba[i][RCOMP], 0.0F, 1.0F);
- GLfloat g = CLAMP(rgba[i][GCOMP], 0.0F, 1.0F);
- GLfloat b = CLAMP(rgba[i][BCOMP], 0.0F, 1.0F);
- GLfloat a = CLAMP(rgba[i][ACOMP], 0.0F, 1.0F);
- rgba[i][RCOMP] = rMap[IROUND(r * rscale)];
- rgba[i][GCOMP] = gMap[IROUND(g * gscale)];
- rgba[i][BCOMP] = bMap[IROUND(b * bscale)];
- rgba[i][ACOMP] = aMap[IROUND(a * ascale)];
- }
-}
-
-/**
- * Apply a color table lookup to an array of floating point RGBA colors.
- */
-void
-_mesa_lookup_rgba_float(const struct gl_color_table *table,
- GLuint n, GLfloat rgba[][4])
-{
- const GLint max = table->Size - 1;
- const GLfloat scale = (GLfloat) max;
- const GLfloat *lut = table->TableF;
- GLuint i;
-
- if (!table->TableF || table->Size == 0)
- return;
-
- switch (table->_BaseFormat) {
- case GL_INTENSITY:
- /* replace RGBA with I */
- for (i = 0; i < n; i++) {
- GLint j = IROUND(rgba[i][RCOMP] * scale);
- GLfloat c = lut[CLAMP(j, 0, max)];
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] =
- rgba[i][ACOMP] = c;
- }
- break;
- case GL_LUMINANCE:
- /* replace RGB with L */
- for (i = 0; i < n; i++) {
- GLint j = IROUND(rgba[i][RCOMP] * scale);
- GLfloat c = lut[CLAMP(j, 0, max)];
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] = c;
- }
- break;
- case GL_ALPHA:
- /* replace A with A */
- for (i = 0; i < n; i++) {
- GLint j = IROUND(rgba[i][ACOMP] * scale);
- rgba[i][ACOMP] = lut[CLAMP(j, 0, max)];
- }
- break;
- case GL_LUMINANCE_ALPHA:
- /* replace RGBA with LLLA */
- for (i = 0; i < n; i++) {
- GLint jL = IROUND(rgba[i][RCOMP] * scale);
- GLint jA = IROUND(rgba[i][ACOMP] * scale);
- GLfloat luminance, alpha;
- jL = CLAMP(jL, 0, max);
- jA = CLAMP(jA, 0, max);
- luminance = lut[jL * 2 + 0];
- alpha = lut[jA * 2 + 1];
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] = luminance;
- rgba[i][ACOMP] = alpha;;
- }
- break;
- case GL_RED:
- /* replace RGB with RGB */
- for (i = 0; i < n; i++) {
- GLint jR = IROUND(rgba[i][RCOMP] * scale);
- jR = CLAMP(jR, 0, max);
- rgba[i][RCOMP] = lut[jR * 3 + 0];
- }
- break;
- case GL_RG:
- /* replace RG with RG */
- for (i = 0; i < n; i++) {
- GLint jR = IROUND(rgba[i][RCOMP] * scale);
- GLint jG = IROUND(rgba[i][GCOMP] * scale);
- jR = CLAMP(jR, 0, max);
- jG = CLAMP(jG, 0, max);
- rgba[i][RCOMP] = lut[jR * 3 + 0];
- rgba[i][GCOMP] = lut[jG * 3 + 1];
- }
- break;
- case GL_RGB:
- /* replace RGB with RGB */
- for (i = 0; i < n; i++) {
- GLint jR = IROUND(rgba[i][RCOMP] * scale);
- GLint jG = IROUND(rgba[i][GCOMP] * scale);
- GLint jB = IROUND(rgba[i][BCOMP] * scale);
- jR = CLAMP(jR, 0, max);
- jG = CLAMP(jG, 0, max);
- jB = CLAMP(jB, 0, max);
- rgba[i][RCOMP] = lut[jR * 3 + 0];
- rgba[i][GCOMP] = lut[jG * 3 + 1];
- rgba[i][BCOMP] = lut[jB * 3 + 2];
- }
- break;
- case GL_RGBA:
- /* replace RGBA with RGBA */
- for (i = 0; i < n; i++) {
- GLint jR = IROUND(rgba[i][RCOMP] * scale);
- GLint jG = IROUND(rgba[i][GCOMP] * scale);
- GLint jB = IROUND(rgba[i][BCOMP] * scale);
- GLint jA = IROUND(rgba[i][ACOMP] * scale);
- jR = CLAMP(jR, 0, max);
- jG = CLAMP(jG, 0, max);
- jB = CLAMP(jB, 0, max);
- jA = CLAMP(jA, 0, max);
- rgba[i][RCOMP] = lut[jR * 4 + 0];
- rgba[i][GCOMP] = lut[jG * 4 + 1];
- rgba[i][BCOMP] = lut[jB * 4 + 2];
- rgba[i][ACOMP] = lut[jA * 4 + 3];
- }
- break;
- default:
- _mesa_problem(NULL, "Bad format in _mesa_lookup_rgba_float");
- return;
- }
-}
-
-
-
-/**
- * Apply a color table lookup to an array of ubyte/RGBA colors.
- */
-void
-_mesa_lookup_rgba_ubyte(const struct gl_color_table *table,
- GLuint n, GLubyte rgba[][4])
-{
- const GLubyte *lut = table->TableUB;
- const GLfloat scale = (GLfloat) (table->Size - 1) / (GLfloat)255.0;
- GLuint i;
-
- if (!table->TableUB || table->Size == 0)
- return;
-
- switch (table->_BaseFormat) {
- case GL_INTENSITY:
- /* replace RGBA with I */
- if (table->Size == 256) {
- for (i = 0; i < n; i++) {
- const GLubyte c = lut[rgba[i][RCOMP]];
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] =
- rgba[i][ACOMP] = c;
- }
- }
- else {
- for (i = 0; i < n; i++) {
- GLint j = IROUND((GLfloat) rgba[i][RCOMP] * scale);
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] =
- rgba[i][ACOMP] = lut[j];
- }
- }
- break;
- case GL_LUMINANCE:
- /* replace RGB with L */
- if (table->Size == 256) {
- for (i = 0; i < n; i++) {
- const GLubyte c = lut[rgba[i][RCOMP]];
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] = c;
- }
- }
- else {
- for (i = 0; i < n; i++) {
- GLint j = IROUND((GLfloat) rgba[i][RCOMP] * scale);
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] = lut[j];
- }
- }
- break;
- case GL_ALPHA:
- /* replace A with A */
- if (table->Size == 256) {
- for (i = 0; i < n; i++) {
- rgba[i][ACOMP] = lut[rgba[i][ACOMP]];
- }
- }
- else {
- for (i = 0; i < n; i++) {
- GLint j = IROUND((GLfloat) rgba[i][ACOMP] * scale);
- rgba[i][ACOMP] = lut[j];
- }
- }
- break;
- case GL_LUMINANCE_ALPHA:
- /* replace RGBA with LLLA */
- if (table->Size == 256) {
- for (i = 0; i < n; i++) {
- GLubyte l = lut[rgba[i][RCOMP] * 2 + 0];
- GLubyte a = lut[rgba[i][ACOMP] * 2 + 1];;
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] = l;
- rgba[i][ACOMP] = a;
- }
- }
- else {
- for (i = 0; i < n; i++) {
- GLint jL = IROUND((GLfloat) rgba[i][RCOMP] * scale);
- GLint jA = IROUND((GLfloat) rgba[i][ACOMP] * scale);
- GLubyte luminance = lut[jL * 2 + 0];
- GLubyte alpha = lut[jA * 2 + 1];
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] = luminance;
- rgba[i][ACOMP] = alpha;
- }
- }
- break;
- case GL_RGB:
- if (table->Size == 256) {
- for (i = 0; i < n; i++) {
- rgba[i][RCOMP] = lut[rgba[i][RCOMP] * 3 + 0];
- rgba[i][GCOMP] = lut[rgba[i][GCOMP] * 3 + 1];
- rgba[i][BCOMP] = lut[rgba[i][BCOMP] * 3 + 2];
- }
- }
- else {
- for (i = 0; i < n; i++) {
- GLint jR = IROUND((GLfloat) rgba[i][RCOMP] * scale);
- GLint jG = IROUND((GLfloat) rgba[i][GCOMP] * scale);
- GLint jB = IROUND((GLfloat) rgba[i][BCOMP] * scale);
- rgba[i][RCOMP] = lut[jR * 3 + 0];
- rgba[i][GCOMP] = lut[jG * 3 + 1];
- rgba[i][BCOMP] = lut[jB * 3 + 2];
- }
- }
- break;
- case GL_RGBA:
- if (table->Size == 256) {
- for (i = 0; i < n; i++) {
- rgba[i][RCOMP] = lut[rgba[i][RCOMP] * 4 + 0];
- rgba[i][GCOMP] = lut[rgba[i][GCOMP] * 4 + 1];
- rgba[i][BCOMP] = lut[rgba[i][BCOMP] * 4 + 2];
- rgba[i][ACOMP] = lut[rgba[i][ACOMP] * 4 + 3];
- }
- }
- else {
- for (i = 0; i < n; i++) {
- GLint jR = IROUND((GLfloat) rgba[i][RCOMP] * scale);
- GLint jG = IROUND((GLfloat) rgba[i][GCOMP] * scale);
- GLint jB = IROUND((GLfloat) rgba[i][BCOMP] * scale);
- GLint jA = IROUND((GLfloat) rgba[i][ACOMP] * scale);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][RCOMP], lut[jR * 4 + 0]);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][GCOMP], lut[jG * 4 + 1]);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][BCOMP], lut[jB * 4 + 2]);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][ACOMP], lut[jA * 4 + 3]);
- }
- }
- break;
- default:
- _mesa_problem(NULL, "Bad format in _mesa_lookup_rgba_chan");
- return;
- }
-}
-
-
-
-/*
- * Map color indexes to float rgba values.
- */
-void
-_mesa_map_ci_to_rgba( const GLcontext *ctx, GLuint n,
- const GLuint index[], GLfloat rgba[][4] )
-{
- GLuint rmask = ctx->PixelMaps.ItoR.Size - 1;
- GLuint gmask = ctx->PixelMaps.ItoG.Size - 1;
- GLuint bmask = ctx->PixelMaps.ItoB.Size - 1;
- GLuint amask = ctx->PixelMaps.ItoA.Size - 1;
- const GLfloat *rMap = ctx->PixelMaps.ItoR.Map;
- const GLfloat *gMap = ctx->PixelMaps.ItoG.Map;
- const GLfloat *bMap = ctx->PixelMaps.ItoB.Map;
- const GLfloat *aMap = ctx->PixelMaps.ItoA.Map;
- GLuint i;
- for (i=0;i<n;i++) {
- rgba[i][RCOMP] = rMap[index[i] & rmask];
- rgba[i][GCOMP] = gMap[index[i] & gmask];
- rgba[i][BCOMP] = bMap[index[i] & bmask];
- rgba[i][ACOMP] = aMap[index[i] & amask];
- }
-}
-
-
-/**
- * Map ubyte color indexes to ubyte/RGBA values.
- */
-void
-_mesa_map_ci8_to_rgba8(const GLcontext *ctx, GLuint n, const GLubyte index[],
- GLubyte rgba[][4])
-{
- GLuint rmask = ctx->PixelMaps.ItoR.Size - 1;
- GLuint gmask = ctx->PixelMaps.ItoG.Size - 1;
- GLuint bmask = ctx->PixelMaps.ItoB.Size - 1;
- GLuint amask = ctx->PixelMaps.ItoA.Size - 1;
- const GLubyte *rMap = ctx->PixelMaps.ItoR.Map8;
- const GLubyte *gMap = ctx->PixelMaps.ItoG.Map8;
- const GLubyte *bMap = ctx->PixelMaps.ItoB.Map8;
- const GLubyte *aMap = ctx->PixelMaps.ItoA.Map8;
- GLuint i;
- for (i=0;i<n;i++) {
- rgba[i][RCOMP] = rMap[index[i] & rmask];
- rgba[i][GCOMP] = gMap[index[i] & gmask];
- rgba[i][BCOMP] = bMap[index[i] & bmask];
- rgba[i][ACOMP] = aMap[index[i] & amask];
- }
-}
-
-
-void
-_mesa_scale_and_bias_depth(const GLcontext *ctx, GLuint n,
- GLfloat depthValues[])
-{
- const GLfloat scale = ctx->Pixel.DepthScale;
- const GLfloat bias = ctx->Pixel.DepthBias;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLfloat d = depthValues[i] * scale + bias;
- depthValues[i] = CLAMP(d, 0.0F, 1.0F);
- }
-}
-
-
-void
-_mesa_scale_and_bias_depth_uint(const GLcontext *ctx, GLuint n,
- GLuint depthValues[])
-{
- const GLdouble max = (double) 0xffffffff;
- const GLdouble scale = ctx->Pixel.DepthScale;
- const GLdouble bias = ctx->Pixel.DepthBias * max;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLdouble d = (GLdouble) depthValues[i] * scale + bias;
- d = CLAMP(d, 0.0, max);
- depthValues[i] = (GLuint) d;
- }
-}
-
-/**
- * Apply various pixel transfer operations to an array of RGBA pixels
- * as indicated by the transferOps bitmask
- */
-void
-_mesa_apply_rgba_transfer_ops(GLcontext *ctx, GLbitfield transferOps,
- GLuint n, GLfloat rgba[][4])
-{
- /* scale & bias */
- if (transferOps & IMAGE_SCALE_BIAS_BIT) {
- _mesa_scale_and_bias_rgba(n, rgba,
- ctx->Pixel.RedScale, ctx->Pixel.GreenScale,
- ctx->Pixel.BlueScale, ctx->Pixel.AlphaScale,
- ctx->Pixel.RedBias, ctx->Pixel.GreenBias,
- ctx->Pixel.BlueBias, ctx->Pixel.AlphaBias);
- }
- /* color map lookup */
- if (transferOps & IMAGE_MAP_COLOR_BIT) {
- _mesa_map_rgba( ctx, n, rgba );
- }
-
- /* clamping to [0,1] */
- if (transferOps & IMAGE_CLAMP_BIT) {
- GLuint i;
- for (i = 0; i < n; i++) {
- rgba[i][RCOMP] = CLAMP(rgba[i][RCOMP], 0.0F, 1.0F);
- rgba[i][GCOMP] = CLAMP(rgba[i][GCOMP], 0.0F, 1.0F);
- rgba[i][BCOMP] = CLAMP(rgba[i][BCOMP], 0.0F, 1.0F);
- rgba[i][ACOMP] = CLAMP(rgba[i][ACOMP], 0.0F, 1.0F);
- }
- }
-}
-
-
-/*
- * Apply color index shift and offset to an array of pixels.
- */
-static void
-shift_and_offset_ci( const GLcontext *ctx, GLuint n, GLuint indexes[] )
-{
- GLint shift = ctx->Pixel.IndexShift;
- GLint offset = ctx->Pixel.IndexOffset;
- GLuint i;
- if (shift > 0) {
- for (i=0;i<n;i++) {
- indexes[i] = (indexes[i] << shift) + offset;
- }
- }
- else if (shift < 0) {
- shift = -shift;
- for (i=0;i<n;i++) {
- indexes[i] = (indexes[i] >> shift) + offset;
- }
- }
- else {
- for (i=0;i<n;i++) {
- indexes[i] = indexes[i] + offset;
- }
- }
-}
-
-
-
-/**
- * Apply color index shift, offset and table lookup to an array
- * of color indexes;
- */
-void
-_mesa_apply_ci_transfer_ops(const GLcontext *ctx, GLbitfield transferOps,
- GLuint n, GLuint indexes[])
-{
- if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
- shift_and_offset_ci(ctx, n, indexes);
- }
- if (transferOps & IMAGE_MAP_COLOR_BIT) {
- const GLuint mask = ctx->PixelMaps.ItoI.Size - 1;
- GLuint i;
- for (i = 0; i < n; i++) {
- const GLuint j = indexes[i] & mask;
- indexes[i] = IROUND(ctx->PixelMaps.ItoI.Map[j]);
- }
- }
-}
-
-
-/**
- * Apply stencil index shift, offset and table lookup to an array
- * of stencil values.
- */
-void
-_mesa_apply_stencil_transfer_ops(const GLcontext *ctx, GLuint n,
- GLstencil stencil[])
-{
- if (ctx->Pixel.IndexShift != 0 || ctx->Pixel.IndexOffset != 0) {
- const GLint offset = ctx->Pixel.IndexOffset;
- GLint shift = ctx->Pixel.IndexShift;
- GLuint i;
- if (shift > 0) {
- for (i = 0; i < n; i++) {
- stencil[i] = (stencil[i] << shift) + offset;
- }
- }
- else if (shift < 0) {
- shift = -shift;
- for (i = 0; i < n; i++) {
- stencil[i] = (stencil[i] >> shift) + offset;
- }
- }
- else {
- for (i = 0; i < n; i++) {
- stencil[i] = stencil[i] + offset;
- }
- }
- }
- if (ctx->Pixel.MapStencilFlag) {
- GLuint mask = ctx->PixelMaps.StoS.Size - 1;
- GLuint i;
- for (i = 0; i < n; i++) {
- stencil[i] = (GLstencil)ctx->PixelMaps.StoS.Map[ stencil[i] & mask ];
- }
- }
-}
-
-
-/**
- * Used to pack an array [][4] of RGBA float colors as specified
- * by the dstFormat, dstType and dstPacking. Used by glReadPixels.
- * Note: the rgba values will be modified by this function when any pixel
- * transfer ops are enabled.
- */
-void
-_mesa_pack_rgba_span_float(GLcontext *ctx, GLuint n, GLfloat rgba[][4],
- GLenum dstFormat, GLenum dstType,
- GLvoid *dstAddr,
- const struct gl_pixelstore_attrib *dstPacking,
- GLbitfield transferOps)
-{
- GLfloat luminance[MAX_WIDTH];
- const GLint comps = _mesa_components_in_format(dstFormat);
- GLuint i;
-
- /* XXX
- * This test should probably go away. Have the caller set/clear the
- * IMAGE_CLAMP_BIT as needed.
- */
- if (dstType != GL_FLOAT || ctx->Color.ClampReadColor == GL_TRUE) {
- /* need to clamp to [0, 1] */
- transferOps |= IMAGE_CLAMP_BIT;
- }
-
- if (transferOps) {
- _mesa_apply_rgba_transfer_ops(ctx, transferOps, n, rgba);
- }
-
- if (dstFormat == GL_LUMINANCE || dstFormat == GL_LUMINANCE_ALPHA) {
- /* compute luminance values */
- if (transferOps & IMAGE_CLAMP_BIT) {
- for (i = 0; i < n; i++) {
- GLfloat sum = rgba[i][RCOMP] + rgba[i][GCOMP] + rgba[i][BCOMP];
- luminance[i] = CLAMP(sum, 0.0F, 1.0F);
- }
- }
- else {
- for (i = 0; i < n; i++) {
- luminance[i] = rgba[i][RCOMP] + rgba[i][GCOMP] + rgba[i][BCOMP];
- }
- }
- }
-
- /*
- * Pack/store the pixels. Ugh! Lots of cases!!!
- */
- switch (dstType) {
- case GL_UNSIGNED_BYTE:
- {
- GLubyte *dst = (GLubyte *) dstAddr;
- switch (dstFormat) {
- case GL_RED:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
- break;
- case GL_GREEN:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
- break;
- case GL_BLUE:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_UBYTE(rgba[i][BCOMP]);
- break;
- case GL_ALPHA:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_UBYTE(rgba[i][ACOMP]);
- break;
- case GL_LUMINANCE:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_UBYTE(luminance[i]);
- break;
- case GL_LUMINANCE_ALPHA:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_UBYTE(luminance[i]);
- dst[i*2+1] = FLOAT_TO_UBYTE(rgba[i][ACOMP]);
- }
- break;
- case GL_RGB:
- for (i=0;i<n;i++) {
- dst[i*3+0] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
- dst[i*3+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
- dst[i*3+2] = FLOAT_TO_UBYTE(rgba[i][BCOMP]);
- }
- break;
- case GL_RGBA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
- dst[i*4+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
- dst[i*4+2] = FLOAT_TO_UBYTE(rgba[i][BCOMP]);
- dst[i*4+3] = FLOAT_TO_UBYTE(rgba[i][ACOMP]);
- }
- break;
- case GL_BGR:
- for (i=0;i<n;i++) {
- dst[i*3+0] = FLOAT_TO_UBYTE(rgba[i][BCOMP]);
- dst[i*3+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
- dst[i*3+2] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
- }
- break;
- case GL_BGRA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_UBYTE(rgba[i][BCOMP]);
- dst[i*4+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
- dst[i*4+2] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
- dst[i*4+3] = FLOAT_TO_UBYTE(rgba[i][ACOMP]);
- }
- break;
- case GL_ABGR_EXT:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_UBYTE(rgba[i][ACOMP]);
- dst[i*4+1] = FLOAT_TO_UBYTE(rgba[i][BCOMP]);
- dst[i*4+2] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
- dst[i*4+3] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
- }
- break;
- case GL_DUDV_ATI:
- case GL_DU8DV8_ATI:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
- dst[i*2+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
- }
- break;
- default:
- _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
- }
- }
- break;
- case GL_BYTE:
- {
- GLbyte *dst = (GLbyte *) dstAddr;
- switch (dstFormat) {
- case GL_RED:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
- break;
- case GL_GREEN:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
- break;
- case GL_BLUE:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_BYTE(rgba[i][BCOMP]);
- break;
- case GL_ALPHA:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_BYTE(rgba[i][ACOMP]);
- break;
- case GL_LUMINANCE:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_BYTE(luminance[i]);
- break;
- case GL_LUMINANCE_ALPHA:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_BYTE(luminance[i]);
- dst[i*2+1] = FLOAT_TO_BYTE(rgba[i][ACOMP]);
- }
- break;
- case GL_RGB:
- for (i=0;i<n;i++) {
- dst[i*3+0] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
- dst[i*3+1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
- dst[i*3+2] = FLOAT_TO_BYTE(rgba[i][BCOMP]);
- }
- break;
- case GL_RGBA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
- dst[i*4+1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
- dst[i*4+2] = FLOAT_TO_BYTE(rgba[i][BCOMP]);
- dst[i*4+3] = FLOAT_TO_BYTE(rgba[i][ACOMP]);
- }
- break;
- case GL_BGR:
- for (i=0;i<n;i++) {
- dst[i*3+0] = FLOAT_TO_BYTE(rgba[i][BCOMP]);
- dst[i*3+1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
- dst[i*3+2] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
- }
- break;
- case GL_BGRA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_BYTE(rgba[i][BCOMP]);
- dst[i*4+1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
- dst[i*4+2] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
- dst[i*4+3] = FLOAT_TO_BYTE(rgba[i][ACOMP]);
- }
- break;
- case GL_ABGR_EXT:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_BYTE(rgba[i][ACOMP]);
- dst[i*4+1] = FLOAT_TO_BYTE(rgba[i][BCOMP]);
- dst[i*4+2] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
- dst[i*4+3] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
- }
- break;
- case GL_DUDV_ATI:
- case GL_DU8DV8_ATI:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
- dst[i*2+1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
- }
- break;
- default:
- _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
- }
- }
- break;
- case GL_UNSIGNED_SHORT:
- {
- GLushort *dst = (GLushort *) dstAddr;
- switch (dstFormat) {
- case GL_RED:
- for (i=0;i<n;i++)
- CLAMPED_FLOAT_TO_USHORT(dst[i], rgba[i][RCOMP]);
- break;
- case GL_GREEN:
- for (i=0;i<n;i++)
- CLAMPED_FLOAT_TO_USHORT(dst[i], rgba[i][GCOMP]);
- break;
- case GL_BLUE:
- for (i=0;i<n;i++)
- CLAMPED_FLOAT_TO_USHORT(dst[i], rgba[i][BCOMP]);
- break;
- case GL_ALPHA:
- for (i=0;i<n;i++)
- CLAMPED_FLOAT_TO_USHORT(dst[i], rgba[i][ACOMP]);
- break;
- case GL_LUMINANCE:
- for (i=0;i<n;i++)
- UNCLAMPED_FLOAT_TO_USHORT(dst[i], luminance[i]);
- break;
- case GL_LUMINANCE_ALPHA:
- for (i=0;i<n;i++) {
- UNCLAMPED_FLOAT_TO_USHORT(dst[i*2+0], luminance[i]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*2+1], rgba[i][ACOMP]);
- }
- break;
- case GL_RGB:
- for (i=0;i<n;i++) {
- CLAMPED_FLOAT_TO_USHORT(dst[i*3+0], rgba[i][RCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*3+1], rgba[i][GCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*3+2], rgba[i][BCOMP]);
- }
- break;
- case GL_RGBA:
- for (i=0;i<n;i++) {
- CLAMPED_FLOAT_TO_USHORT(dst[i*4+0], rgba[i][RCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*4+1], rgba[i][GCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*4+2], rgba[i][BCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*4+3], rgba[i][ACOMP]);
- }
- break;
- case GL_BGR:
- for (i=0;i<n;i++) {
- CLAMPED_FLOAT_TO_USHORT(dst[i*3+0], rgba[i][BCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*3+1], rgba[i][GCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*3+2], rgba[i][RCOMP]);
- }
- break;
- case GL_BGRA:
- for (i=0;i<n;i++) {
- CLAMPED_FLOAT_TO_USHORT(dst[i*4+0], rgba[i][BCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*4+1], rgba[i][GCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*4+2], rgba[i][RCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*4+3], rgba[i][ACOMP]);
- }
- break;
- case GL_ABGR_EXT:
- for (i=0;i<n;i++) {
- CLAMPED_FLOAT_TO_USHORT(dst[i*4+0], rgba[i][ACOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*4+1], rgba[i][BCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*4+2], rgba[i][GCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*4+3], rgba[i][RCOMP]);
- }
- break;
- case GL_DUDV_ATI:
- case GL_DU8DV8_ATI:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_USHORT(rgba[i][RCOMP]);
- dst[i*2+1] = FLOAT_TO_USHORT(rgba[i][GCOMP]);
- }
- break;
- default:
- _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
- }
- }
- break;
- case GL_SHORT:
- {
- GLshort *dst = (GLshort *) dstAddr;
- switch (dstFormat) {
- case GL_RED:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
- break;
- case GL_GREEN:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
- break;
- case GL_BLUE:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_SHORT(rgba[i][BCOMP]);
- break;
- case GL_ALPHA:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_SHORT(rgba[i][ACOMP]);
- break;
- case GL_LUMINANCE:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_SHORT(luminance[i]);
- break;
- case GL_LUMINANCE_ALPHA:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_SHORT(luminance[i]);
- dst[i*2+1] = FLOAT_TO_SHORT(rgba[i][ACOMP]);
- }
- break;
- case GL_RGB:
- for (i=0;i<n;i++) {
- dst[i*3+0] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
- dst[i*3+1] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
- dst[i*3+2] = FLOAT_TO_SHORT(rgba[i][BCOMP]);
- }
- break;
- case GL_RGBA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
- dst[i*4+1] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
- dst[i*4+2] = FLOAT_TO_SHORT(rgba[i][BCOMP]);
- dst[i*4+3] = FLOAT_TO_SHORT(rgba[i][ACOMP]);
- }
- break;
- case GL_BGR:
- for (i=0;i<n;i++) {
- dst[i*3+0] = FLOAT_TO_SHORT(rgba[i][BCOMP]);
- dst[i*3+1] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
- dst[i*3+2] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
- }
- break;
- case GL_BGRA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_SHORT(rgba[i][BCOMP]);
- dst[i*4+1] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
- dst[i*4+2] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
- dst[i*4+3] = FLOAT_TO_SHORT(rgba[i][ACOMP]);
- }
- break;
- case GL_ABGR_EXT:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_SHORT(rgba[i][ACOMP]);
- dst[i*4+1] = FLOAT_TO_SHORT(rgba[i][BCOMP]);
- dst[i*4+2] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
- dst[i*4+3] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
- }
- break;
- case GL_DUDV_ATI:
- case GL_DU8DV8_ATI:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
- dst[i*2+1] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
- }
- break;
- default:
- _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
- }
- }
- break;
- case GL_UNSIGNED_INT:
- {
- GLuint *dst = (GLuint *) dstAddr;
- switch (dstFormat) {
- case GL_RED:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_UINT(rgba[i][RCOMP]);
- break;
- case GL_GREEN:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_UINT(rgba[i][GCOMP]);
- break;
- case GL_BLUE:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_UINT(rgba[i][BCOMP]);
- break;
- case GL_ALPHA:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_UINT(rgba[i][ACOMP]);
- break;
- case GL_LUMINANCE:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_UINT(luminance[i]);
- break;
- case GL_LUMINANCE_ALPHA:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_UINT(luminance[i]);
- dst[i*2+1] = FLOAT_TO_UINT(rgba[i][ACOMP]);
- }
- break;
- case GL_RGB:
- for (i=0;i<n;i++) {
- dst[i*3+0] = FLOAT_TO_UINT(rgba[i][RCOMP]);
- dst[i*3+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
- dst[i*3+2] = FLOAT_TO_UINT(rgba[i][BCOMP]);
- }
- break;
- case GL_RGBA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_UINT(rgba[i][RCOMP]);
- dst[i*4+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
- dst[i*4+2] = FLOAT_TO_UINT(rgba[i][BCOMP]);
- dst[i*4+3] = FLOAT_TO_UINT(rgba[i][ACOMP]);
- }
- break;
- case GL_BGR:
- for (i=0;i<n;i++) {
- dst[i*3+0] = FLOAT_TO_UINT(rgba[i][BCOMP]);
- dst[i*3+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
- dst[i*3+2] = FLOAT_TO_UINT(rgba[i][RCOMP]);
- }
- break;
- case GL_BGRA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_UINT(rgba[i][BCOMP]);
- dst[i*4+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
- dst[i*4+2] = FLOAT_TO_UINT(rgba[i][RCOMP]);
- dst[i*4+3] = FLOAT_TO_UINT(rgba[i][ACOMP]);
- }
- break;
- case GL_ABGR_EXT:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_UINT(rgba[i][ACOMP]);
- dst[i*4+1] = FLOAT_TO_UINT(rgba[i][BCOMP]);
- dst[i*4+2] = FLOAT_TO_UINT(rgba[i][GCOMP]);
- dst[i*4+3] = FLOAT_TO_UINT(rgba[i][RCOMP]);
- }
- break;
- case GL_DUDV_ATI:
- case GL_DU8DV8_ATI:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_UINT(rgba[i][RCOMP]);
- dst[i*2+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
- }
- break;
- default:
- _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
- }
- }
- break;
- case GL_INT:
- {
- GLint *dst = (GLint *) dstAddr;
- switch (dstFormat) {
- case GL_RED:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_INT(rgba[i][RCOMP]);
- break;
- case GL_GREEN:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_INT(rgba[i][GCOMP]);
- break;
- case GL_BLUE:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_INT(rgba[i][BCOMP]);
- break;
- case GL_ALPHA:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_INT(rgba[i][ACOMP]);
- break;
- case GL_LUMINANCE:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_INT(luminance[i]);
- break;
- case GL_LUMINANCE_ALPHA:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_INT(luminance[i]);
- dst[i*2+1] = FLOAT_TO_INT(rgba[i][ACOMP]);
- }
- break;
- case GL_RGB:
- for (i=0;i<n;i++) {
- dst[i*3+0] = FLOAT_TO_INT(rgba[i][RCOMP]);
- dst[i*3+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
- dst[i*3+2] = FLOAT_TO_INT(rgba[i][BCOMP]);
- }
- break;
- case GL_RGBA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_INT(rgba[i][RCOMP]);
- dst[i*4+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
- dst[i*4+2] = FLOAT_TO_INT(rgba[i][BCOMP]);
- dst[i*4+3] = FLOAT_TO_INT(rgba[i][ACOMP]);
- }
- break;
- case GL_BGR:
- for (i=0;i<n;i++) {
- dst[i*3+0] = FLOAT_TO_INT(rgba[i][BCOMP]);
- dst[i*3+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
- dst[i*3+2] = FLOAT_TO_INT(rgba[i][RCOMP]);
- }
- break;
- case GL_BGRA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_INT(rgba[i][BCOMP]);
- dst[i*4+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
- dst[i*4+2] = FLOAT_TO_INT(rgba[i][RCOMP]);
- dst[i*4+3] = FLOAT_TO_INT(rgba[i][ACOMP]);
- }
- break;
- case GL_ABGR_EXT:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_INT(rgba[i][ACOMP]);
- dst[i*4+1] = FLOAT_TO_INT(rgba[i][BCOMP]);
- dst[i*4+2] = FLOAT_TO_INT(rgba[i][GCOMP]);
- dst[i*4+3] = FLOAT_TO_INT(rgba[i][RCOMP]);
- }
- break;
- case GL_DUDV_ATI:
- case GL_DU8DV8_ATI:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_INT(rgba[i][RCOMP]);
- dst[i*2+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
- }
- break;
- default:
- _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
- }
- }
- break;
- case GL_FLOAT:
- {
- GLfloat *dst = (GLfloat *) dstAddr;
- switch (dstFormat) {
- case GL_RED:
- for (i=0;i<n;i++)
- dst[i] = rgba[i][RCOMP];
- break;
- case GL_GREEN:
- for (i=0;i<n;i++)
- dst[i] = rgba[i][GCOMP];
- break;
- case GL_BLUE:
- for (i=0;i<n;i++)
- dst[i] = rgba[i][BCOMP];
- break;
- case GL_ALPHA:
- for (i=0;i<n;i++)
- dst[i] = rgba[i][ACOMP];
- break;
- case GL_LUMINANCE:
- for (i=0;i<n;i++)
- dst[i] = luminance[i];
- break;
- case GL_LUMINANCE_ALPHA:
- for (i=0;i<n;i++) {
- dst[i*2+0] = luminance[i];
- dst[i*2+1] = rgba[i][ACOMP];
- }
- break;
- case GL_RGB:
- for (i=0;i<n;i++) {
- dst[i*3+0] = rgba[i][RCOMP];
- dst[i*3+1] = rgba[i][GCOMP];
- dst[i*3+2] = rgba[i][BCOMP];
- }
- break;
- case GL_RGBA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = rgba[i][RCOMP];
- dst[i*4+1] = rgba[i][GCOMP];
- dst[i*4+2] = rgba[i][BCOMP];
- dst[i*4+3] = rgba[i][ACOMP];
- }
- break;
- case GL_BGR:
- for (i=0;i<n;i++) {
- dst[i*3+0] = rgba[i][BCOMP];
- dst[i*3+1] = rgba[i][GCOMP];
- dst[i*3+2] = rgba[i][RCOMP];
- }
- break;
- case GL_BGRA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = rgba[i][BCOMP];
- dst[i*4+1] = rgba[i][GCOMP];
- dst[i*4+2] = rgba[i][RCOMP];
- dst[i*4+3] = rgba[i][ACOMP];
- }
- break;
- case GL_ABGR_EXT:
- for (i=0;i<n;i++) {
- dst[i*4+0] = rgba[i][ACOMP];
- dst[i*4+1] = rgba[i][BCOMP];
- dst[i*4+2] = rgba[i][GCOMP];
- dst[i*4+3] = rgba[i][RCOMP];
- }
- break;
- case GL_DUDV_ATI:
- case GL_DU8DV8_ATI:
- for (i=0;i<n;i++) {
- dst[i*2+0] = rgba[i][RCOMP];
- dst[i*2+1] = rgba[i][GCOMP];
- }
- break;
- default:
- _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
- }
- }
- break;
- case GL_HALF_FLOAT_ARB:
- {
- GLhalfARB *dst = (GLhalfARB *) dstAddr;
- switch (dstFormat) {
- case GL_RED:
- for (i=0;i<n;i++)
- dst[i] = _mesa_float_to_half(rgba[i][RCOMP]);
- break;
- case GL_GREEN:
- for (i=0;i<n;i++)
- dst[i] = _mesa_float_to_half(rgba[i][GCOMP]);
- break;
- case GL_BLUE:
- for (i=0;i<n;i++)
- dst[i] = _mesa_float_to_half(rgba[i][BCOMP]);
- break;
- case GL_ALPHA:
- for (i=0;i<n;i++)
- dst[i] = _mesa_float_to_half(rgba[i][ACOMP]);
- break;
- case GL_LUMINANCE:
- for (i=0;i<n;i++)
- dst[i] = _mesa_float_to_half(luminance[i]);
- break;
- case GL_LUMINANCE_ALPHA:
- for (i=0;i<n;i++) {
- dst[i*2+0] = _mesa_float_to_half(luminance[i]);
- dst[i*2+1] = _mesa_float_to_half(rgba[i][ACOMP]);
- }
- break;
- case GL_RGB:
- for (i=0;i<n;i++) {
- dst[i*3+0] = _mesa_float_to_half(rgba[i][RCOMP]);
- dst[i*3+1] = _mesa_float_to_half(rgba[i][GCOMP]);
- dst[i*3+2] = _mesa_float_to_half(rgba[i][BCOMP]);
- }
- break;
- case GL_RGBA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = _mesa_float_to_half(rgba[i][RCOMP]);
- dst[i*4+1] = _mesa_float_to_half(rgba[i][GCOMP]);
- dst[i*4+2] = _mesa_float_to_half(rgba[i][BCOMP]);
- dst[i*4+3] = _mesa_float_to_half(rgba[i][ACOMP]);
- }
- break;
- case GL_BGR:
- for (i=0;i<n;i++) {
- dst[i*3+0] = _mesa_float_to_half(rgba[i][BCOMP]);
- dst[i*3+1] = _mesa_float_to_half(rgba[i][GCOMP]);
- dst[i*3+2] = _mesa_float_to_half(rgba[i][RCOMP]);
- }
- break;
- case GL_BGRA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = _mesa_float_to_half(rgba[i][BCOMP]);
- dst[i*4+1] = _mesa_float_to_half(rgba[i][GCOMP]);
- dst[i*4+2] = _mesa_float_to_half(rgba[i][RCOMP]);
- dst[i*4+3] = _mesa_float_to_half(rgba[i][ACOMP]);
- }
- break;
- case GL_ABGR_EXT:
- for (i=0;i<n;i++) {
- dst[i*4+0] = _mesa_float_to_half(rgba[i][ACOMP]);
- dst[i*4+1] = _mesa_float_to_half(rgba[i][BCOMP]);
- dst[i*4+2] = _mesa_float_to_half(rgba[i][GCOMP]);
- dst[i*4+3] = _mesa_float_to_half(rgba[i][RCOMP]);
- }
- break;
- case GL_DUDV_ATI:
- case GL_DU8DV8_ATI:
- for (i=0;i<n;i++) {
- dst[i*2+0] = _mesa_float_to_half(rgba[i][RCOMP]);
- dst[i*2+1] = _mesa_float_to_half(rgba[i][GCOMP]);
- }
- break;
- default:
- _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
- }
- }
- break;
- case GL_UNSIGNED_BYTE_3_3_2:
- if (dstFormat == GL_RGB) {
- GLubyte *dst = (GLubyte *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][RCOMP] * 7.0F) << 5)
- | (IROUND(rgba[i][GCOMP] * 7.0F) << 2)
- | (IROUND(rgba[i][BCOMP] * 3.0F) );
- }
- }
- break;
- case GL_UNSIGNED_BYTE_2_3_3_REV:
- if (dstFormat == GL_RGB) {
- GLubyte *dst = (GLubyte *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][RCOMP] * 7.0F) )
- | (IROUND(rgba[i][GCOMP] * 7.0F) << 3)
- | (IROUND(rgba[i][BCOMP] * 3.0F) << 6);
- }
- }
- break;
- case GL_UNSIGNED_SHORT_5_6_5:
- if (dstFormat == GL_RGB) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][RCOMP] * 31.0F) << 11)
- | (IROUND(rgba[i][GCOMP] * 63.0F) << 5)
- | (IROUND(rgba[i][BCOMP] * 31.0F) );
- }
- }
- break;
- case GL_UNSIGNED_SHORT_5_6_5_REV:
- if (dstFormat == GL_RGB) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][RCOMP] * 31.0F) )
- | (IROUND(rgba[i][GCOMP] * 63.0F) << 5)
- | (IROUND(rgba[i][BCOMP] * 31.0F) << 11);
- }
- }
- break;
- case GL_UNSIGNED_SHORT_4_4_4_4:
- if (dstFormat == GL_RGBA) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][RCOMP] * 15.0F) << 12)
- | (IROUND(rgba[i][GCOMP] * 15.0F) << 8)
- | (IROUND(rgba[i][BCOMP] * 15.0F) << 4)
- | (IROUND(rgba[i][ACOMP] * 15.0F) );
- }
- }
- else if (dstFormat == GL_BGRA) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][BCOMP] * 15.0F) << 12)
- | (IROUND(rgba[i][GCOMP] * 15.0F) << 8)
- | (IROUND(rgba[i][RCOMP] * 15.0F) << 4)
- | (IROUND(rgba[i][ACOMP] * 15.0F) );
- }
- }
- else if (dstFormat == GL_ABGR_EXT) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][ACOMP] * 15.0F) << 12)
- | (IROUND(rgba[i][BCOMP] * 15.0F) << 8)
- | (IROUND(rgba[i][GCOMP] * 15.0F) << 4)
- | (IROUND(rgba[i][RCOMP] * 15.0F) );
- }
- }
- break;
- case GL_UNSIGNED_SHORT_4_4_4_4_REV:
- if (dstFormat == GL_RGBA) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][RCOMP] * 15.0F) )
- | (IROUND(rgba[i][GCOMP] * 15.0F) << 4)
- | (IROUND(rgba[i][BCOMP] * 15.0F) << 8)
- | (IROUND(rgba[i][ACOMP] * 15.0F) << 12);
- }
- }
- else if (dstFormat == GL_BGRA) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][BCOMP] * 15.0F) )
- | (IROUND(rgba[i][GCOMP] * 15.0F) << 4)
- | (IROUND(rgba[i][RCOMP] * 15.0F) << 8)
- | (IROUND(rgba[i][ACOMP] * 15.0F) << 12);
- }
- }
- else if (dstFormat == GL_ABGR_EXT) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][ACOMP] * 15.0F) )
- | (IROUND(rgba[i][BCOMP] * 15.0F) << 4)
- | (IROUND(rgba[i][GCOMP] * 15.0F) << 8)
- | (IROUND(rgba[i][RCOMP] * 15.0F) << 12);
- }
- }
- break;
- case GL_UNSIGNED_SHORT_5_5_5_1:
- if (dstFormat == GL_RGBA) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][RCOMP] * 31.0F) << 11)
- | (IROUND(rgba[i][GCOMP] * 31.0F) << 6)
- | (IROUND(rgba[i][BCOMP] * 31.0F) << 1)
- | (IROUND(rgba[i][ACOMP] * 1.0F) );
- }
- }
- else if (dstFormat == GL_BGRA) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][BCOMP] * 31.0F) << 11)
- | (IROUND(rgba[i][GCOMP] * 31.0F) << 6)
- | (IROUND(rgba[i][RCOMP] * 31.0F) << 1)
- | (IROUND(rgba[i][ACOMP] * 1.0F) );
- }
- }
- else if (dstFormat == GL_ABGR_EXT) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][ACOMP] * 31.0F) << 11)
- | (IROUND(rgba[i][BCOMP] * 31.0F) << 6)
- | (IROUND(rgba[i][GCOMP] * 31.0F) << 1)
- | (IROUND(rgba[i][RCOMP] * 1.0F) );
- }
- }
- break;
- case GL_UNSIGNED_SHORT_1_5_5_5_REV:
- if (dstFormat == GL_RGBA) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][RCOMP] * 31.0F) )
- | (IROUND(rgba[i][GCOMP] * 31.0F) << 5)
- | (IROUND(rgba[i][BCOMP] * 31.0F) << 10)
- | (IROUND(rgba[i][ACOMP] * 1.0F) << 15);
- }
- }
- else if (dstFormat == GL_BGRA) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][BCOMP] * 31.0F) )
- | (IROUND(rgba[i][GCOMP] * 31.0F) << 5)
- | (IROUND(rgba[i][RCOMP] * 31.0F) << 10)
- | (IROUND(rgba[i][ACOMP] * 1.0F) << 15);
- }
- }
- else if (dstFormat == GL_ABGR_EXT) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][ACOMP] * 31.0F) )
- | (IROUND(rgba[i][BCOMP] * 31.0F) << 5)
- | (IROUND(rgba[i][GCOMP] * 31.0F) << 10)
- | (IROUND(rgba[i][RCOMP] * 1.0F) << 15);
- }
- }
- break;
- case GL_UNSIGNED_INT_8_8_8_8:
- if (dstFormat == GL_RGBA) {
- GLuint *dst = (GLuint *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][RCOMP] * 255.F) << 24)
- | (IROUND(rgba[i][GCOMP] * 255.F) << 16)
- | (IROUND(rgba[i][BCOMP] * 255.F) << 8)
- | (IROUND(rgba[i][ACOMP] * 255.F) );
- }
- }
- else if (dstFormat == GL_BGRA) {
- GLuint *dst = (GLuint *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][BCOMP] * 255.F) << 24)
- | (IROUND(rgba[i][GCOMP] * 255.F) << 16)
- | (IROUND(rgba[i][RCOMP] * 255.F) << 8)
- | (IROUND(rgba[i][ACOMP] * 255.F) );
- }
- }
- else if (dstFormat == GL_ABGR_EXT) {
- GLuint *dst = (GLuint *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][ACOMP] * 255.F) << 24)
- | (IROUND(rgba[i][BCOMP] * 255.F) << 16)
- | (IROUND(rgba[i][GCOMP] * 255.F) << 8)
- | (IROUND(rgba[i][RCOMP] * 255.F) );
- }
- }
- break;
- case GL_UNSIGNED_INT_8_8_8_8_REV:
- if (dstFormat == GL_RGBA) {
- GLuint *dst = (GLuint *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][RCOMP] * 255.0F) )
- | (IROUND(rgba[i][GCOMP] * 255.0F) << 8)
- | (IROUND(rgba[i][BCOMP] * 255.0F) << 16)
- | (IROUND(rgba[i][ACOMP] * 255.0F) << 24);
- }
- }
- else if (dstFormat == GL_BGRA) {
- GLuint *dst = (GLuint *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][BCOMP] * 255.0F) )
- | (IROUND(rgba[i][GCOMP] * 255.0F) << 8)
- | (IROUND(rgba[i][RCOMP] * 255.0F) << 16)
- | (IROUND(rgba[i][ACOMP] * 255.0F) << 24);
- }
- }
- else if (dstFormat == GL_ABGR_EXT) {
- GLuint *dst = (GLuint *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][ACOMP] * 255.0F) )
- | (IROUND(rgba[i][BCOMP] * 255.0F) << 8)
- | (IROUND(rgba[i][GCOMP] * 255.0F) << 16)
- | (IROUND(rgba[i][RCOMP] * 255.0F) << 24);
- }
- }
- break;
- case GL_UNSIGNED_INT_10_10_10_2:
- if (dstFormat == GL_RGBA) {
- GLuint *dst = (GLuint *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][RCOMP] * 1023.0F) << 22)
- | (IROUND(rgba[i][GCOMP] * 1023.0F) << 12)
- | (IROUND(rgba[i][BCOMP] * 1023.0F) << 2)
- | (IROUND(rgba[i][ACOMP] * 3.0F) );
- }
- }
- else if (dstFormat == GL_BGRA) {
- GLuint *dst = (GLuint *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][BCOMP] * 1023.0F) << 22)
- | (IROUND(rgba[i][GCOMP] * 1023.0F) << 12)
- | (IROUND(rgba[i][RCOMP] * 1023.0F) << 2)
- | (IROUND(rgba[i][ACOMP] * 3.0F) );
- }
- }
- else if (dstFormat == GL_ABGR_EXT) {
- GLuint *dst = (GLuint *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][ACOMP] * 1023.0F) << 22)
- | (IROUND(rgba[i][BCOMP] * 1023.0F) << 12)
- | (IROUND(rgba[i][GCOMP] * 1023.0F) << 2)
- | (IROUND(rgba[i][RCOMP] * 3.0F) );
- }
- }
- break;
- case GL_UNSIGNED_INT_2_10_10_10_REV:
- if (dstFormat == GL_RGBA) {
- GLuint *dst = (GLuint *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][RCOMP] * 1023.0F) )
- | (IROUND(rgba[i][GCOMP] * 1023.0F) << 10)
- | (IROUND(rgba[i][BCOMP] * 1023.0F) << 20)
- | (IROUND(rgba[i][ACOMP] * 3.0F) << 30);
- }
- }
- else if (dstFormat == GL_BGRA) {
- GLuint *dst = (GLuint *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][BCOMP] * 1023.0F) )
- | (IROUND(rgba[i][GCOMP] * 1023.0F) << 10)
- | (IROUND(rgba[i][RCOMP] * 1023.0F) << 20)
- | (IROUND(rgba[i][ACOMP] * 3.0F) << 30);
- }
- }
- else if (dstFormat == GL_ABGR_EXT) {
- GLuint *dst = (GLuint *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][ACOMP] * 1023.0F) )
- | (IROUND(rgba[i][BCOMP] * 1023.0F) << 10)
- | (IROUND(rgba[i][GCOMP] * 1023.0F) << 20)
- | (IROUND(rgba[i][RCOMP] * 3.0F) << 30);
- }
- }
- break;
- default:
- _mesa_problem(ctx, "bad type in _mesa_pack_rgba_span_float");
- return;
- }
-
- if (dstPacking->SwapBytes) {
- GLint swapSize = _mesa_sizeof_packed_type(dstType);
- if (swapSize == 2) {
- if (dstPacking->SwapBytes) {
- _mesa_swap2((GLushort *) dstAddr, n * comps);
- }
- }
- else if (swapSize == 4) {
- if (dstPacking->SwapBytes) {
- _mesa_swap4((GLuint *) dstAddr, n * comps);
- }
- }
- }
-}
-
-
-#define SWAP2BYTE(VALUE) \
- { \
- GLubyte *bytes = (GLubyte *) &(VALUE); \
- GLubyte tmp = bytes[0]; \
- bytes[0] = bytes[1]; \
- bytes[1] = tmp; \
- }
-
-#define SWAP4BYTE(VALUE) \
- { \
- GLubyte *bytes = (GLubyte *) &(VALUE); \
- GLubyte tmp = bytes[0]; \
- bytes[0] = bytes[3]; \
- bytes[3] = tmp; \
- tmp = bytes[1]; \
- bytes[1] = bytes[2]; \
- bytes[2] = tmp; \
- }
-
-
-static void
-extract_uint_indexes(GLuint n, GLuint indexes[],
- GLenum srcFormat, GLenum srcType, const GLvoid *src,
- const struct gl_pixelstore_attrib *unpack )
-{
- ASSERT(srcFormat == GL_COLOR_INDEX || srcFormat == GL_STENCIL_INDEX);
-
- ASSERT(srcType == GL_BITMAP ||
- srcType == GL_UNSIGNED_BYTE ||
- srcType == GL_BYTE ||
- srcType == GL_UNSIGNED_SHORT ||
- srcType == GL_SHORT ||
- srcType == GL_UNSIGNED_INT ||
- srcType == GL_INT ||
- srcType == GL_UNSIGNED_INT_24_8_EXT ||
- srcType == GL_HALF_FLOAT_ARB ||
- srcType == GL_FLOAT);
-
- switch (srcType) {
- case GL_BITMAP:
- {
- GLubyte *ubsrc = (GLubyte *) src;
- if (unpack->LsbFirst) {
- GLubyte mask = 1 << (unpack->SkipPixels & 0x7);
- GLuint i;
- for (i = 0; i < n; i++) {
- indexes[i] = (*ubsrc & mask) ? 1 : 0;
- if (mask == 128) {
- mask = 1;
- ubsrc++;
- }
- else {
- mask = mask << 1;
- }
- }
- }
- else {
- GLubyte mask = 128 >> (unpack->SkipPixels & 0x7);
- GLuint i;
- for (i = 0; i < n; i++) {
- indexes[i] = (*ubsrc & mask) ? 1 : 0;
- if (mask == 1) {
- mask = 128;
- ubsrc++;
- }
- else {
- mask = mask >> 1;
- }
- }
- }
- }
- break;
- case GL_UNSIGNED_BYTE:
- {
- GLuint i;
- const GLubyte *s = (const GLubyte *) src;
- for (i = 0; i < n; i++)
- indexes[i] = s[i];
- }
- break;
- case GL_BYTE:
- {
- GLuint i;
- const GLbyte *s = (const GLbyte *) src;
- for (i = 0; i < n; i++)
- indexes[i] = s[i];
- }
- break;
- case GL_UNSIGNED_SHORT:
- {
- GLuint i;
- const GLushort *s = (const GLushort *) src;
- if (unpack->SwapBytes) {
- for (i = 0; i < n; i++) {
- GLushort value = s[i];
- SWAP2BYTE(value);
- indexes[i] = value;
- }
- }
- else {
- for (i = 0; i < n; i++)
- indexes[i] = s[i];
- }
- }
- break;
- case GL_SHORT:
- {
- GLuint i;
- const GLshort *s = (const GLshort *) src;
- if (unpack->SwapBytes) {
- for (i = 0; i < n; i++) {
- GLshort value = s[i];
- SWAP2BYTE(value);
- indexes[i] = value;
- }
- }
- else {
- for (i = 0; i < n; i++)
- indexes[i] = s[i];
- }
- }
- break;
- case GL_UNSIGNED_INT:
- {
- GLuint i;
- const GLuint *s = (const GLuint *) src;
- if (unpack->SwapBytes) {
- for (i = 0; i < n; i++) {
- GLuint value = s[i];
- SWAP4BYTE(value);
- indexes[i] = value;
- }
- }
- else {
- for (i = 0; i < n; i++)
- indexes[i] = s[i];
- }
- }
- break;
- case GL_INT:
- {
- GLuint i;
- const GLint *s = (const GLint *) src;
- if (unpack->SwapBytes) {
- for (i = 0; i < n; i++) {
- GLint value = s[i];
- SWAP4BYTE(value);
- indexes[i] = value;
- }
- }
- else {
- for (i = 0; i < n; i++)
- indexes[i] = s[i];
- }
- }
- break;
- case GL_FLOAT:
- {
- GLuint i;
- const GLfloat *s = (const GLfloat *) src;
- if (unpack->SwapBytes) {
- for (i = 0; i < n; i++) {
- GLfloat value = s[i];
- SWAP4BYTE(value);
- indexes[i] = (GLuint) value;
- }
- }
- else {
- for (i = 0; i < n; i++)
- indexes[i] = (GLuint) s[i];
- }
- }
- break;
- case GL_HALF_FLOAT_ARB:
- {
- GLuint i;
- const GLhalfARB *s = (const GLhalfARB *) src;
- if (unpack->SwapBytes) {
- for (i = 0; i < n; i++) {
- GLhalfARB value = s[i];
- SWAP2BYTE(value);
- indexes[i] = (GLuint) _mesa_half_to_float(value);
- }
- }
- else {
- for (i = 0; i < n; i++)
- indexes[i] = (GLuint) _mesa_half_to_float(s[i]);
- }
- }
- break;
- case GL_UNSIGNED_INT_24_8_EXT:
- {
- GLuint i;
- const GLuint *s = (const GLuint *) src;
- if (unpack->SwapBytes) {
- for (i = 0; i < n; i++) {
- GLuint value = s[i];
- SWAP4BYTE(value);
- indexes[i] = value & 0xff; /* lower 8 bits */
- }
- }
- else {
- for (i = 0; i < n; i++)
- indexes[i] = s[i] & 0xff; /* lower 8 bits */
- }
- }
- break;
-
- default:
- _mesa_problem(NULL, "bad srcType in extract_uint_indexes");
- return;
- }
-}
-
-
-/*
- * This function extracts floating point RGBA values from arbitrary
- * image data. srcFormat and srcType are the format and type parameters
- * passed to glDrawPixels, glTexImage[123]D, glTexSubImage[123]D, etc.
- *
- * Refering to section 3.6.4 of the OpenGL 1.2 spec, this function
- * implements the "Conversion to floating point", "Conversion to RGB",
- * and "Final Expansion to RGBA" operations.
- *
- * Args: n - number of pixels
- * rgba - output colors
- * srcFormat - format of incoming data
- * srcType - data type of incoming data
- * src - source data pointer
- * swapBytes - perform byteswapping of incoming data?
- */
-static void
-extract_float_rgba(GLuint n, GLfloat rgba[][4],
- GLenum srcFormat, GLenum srcType, const GLvoid *src,
- GLboolean swapBytes)
-{
- GLint redIndex, greenIndex, blueIndex, alphaIndex;
- GLint stride;
- GLint rComp, bComp, gComp, aComp;
- GLboolean intFormat;
- GLfloat rs = 1.0f, gs = 1.0f, bs = 1.0f, as = 1.0f; /* scale factors */
-
- ASSERT(srcFormat == GL_RED ||
- srcFormat == GL_GREEN ||
- srcFormat == GL_BLUE ||
- srcFormat == GL_ALPHA ||
- srcFormat == GL_LUMINANCE ||
- srcFormat == GL_LUMINANCE_ALPHA ||
- srcFormat == GL_INTENSITY ||
- srcFormat == GL_RG ||
- srcFormat == GL_RGB ||
- srcFormat == GL_BGR ||
- srcFormat == GL_RGBA ||
- srcFormat == GL_BGRA ||
- srcFormat == GL_ABGR_EXT ||
- srcFormat == GL_DU8DV8_ATI ||
- srcFormat == GL_DUDV_ATI ||
- srcFormat == GL_RED_INTEGER_EXT ||
- srcFormat == GL_GREEN_INTEGER_EXT ||
- srcFormat == GL_BLUE_INTEGER_EXT ||
- srcFormat == GL_ALPHA_INTEGER_EXT ||
- srcFormat == GL_RGB_INTEGER_EXT ||
- srcFormat == GL_RGBA_INTEGER_EXT ||
- srcFormat == GL_BGR_INTEGER_EXT ||
- srcFormat == GL_BGRA_INTEGER_EXT ||
- srcFormat == GL_LUMINANCE_INTEGER_EXT ||
- srcFormat == GL_LUMINANCE_ALPHA_INTEGER_EXT);
-
- ASSERT(srcType == GL_UNSIGNED_BYTE ||
- srcType == GL_BYTE ||
- srcType == GL_UNSIGNED_SHORT ||
- srcType == GL_SHORT ||
- srcType == GL_UNSIGNED_INT ||
- srcType == GL_INT ||
- srcType == GL_HALF_FLOAT_ARB ||
- srcType == GL_FLOAT ||
- srcType == GL_UNSIGNED_BYTE_3_3_2 ||
- srcType == GL_UNSIGNED_BYTE_2_3_3_REV ||
- srcType == GL_UNSIGNED_SHORT_5_6_5 ||
- srcType == GL_UNSIGNED_SHORT_5_6_5_REV ||
- srcType == GL_UNSIGNED_SHORT_4_4_4_4 ||
- srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV ||
- srcType == GL_UNSIGNED_SHORT_5_5_5_1 ||
- srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV ||
- srcType == GL_UNSIGNED_INT_8_8_8_8 ||
- srcType == GL_UNSIGNED_INT_8_8_8_8_REV ||
- srcType == GL_UNSIGNED_INT_10_10_10_2 ||
- srcType == GL_UNSIGNED_INT_2_10_10_10_REV);
-
- rComp = gComp = bComp = aComp = -1;
-
- switch (srcFormat) {
- case GL_RED:
- case GL_RED_INTEGER_EXT:
- redIndex = 0;
- greenIndex = blueIndex = alphaIndex = -1;
- stride = 1;
- break;
- case GL_GREEN:
- case GL_GREEN_INTEGER_EXT:
- greenIndex = 0;
- redIndex = blueIndex = alphaIndex = -1;
- stride = 1;
- break;
- case GL_BLUE:
- case GL_BLUE_INTEGER_EXT:
- blueIndex = 0;
- redIndex = greenIndex = alphaIndex = -1;
- stride = 1;
- break;
- case GL_ALPHA:
- case GL_ALPHA_INTEGER_EXT:
- redIndex = greenIndex = blueIndex = -1;
- alphaIndex = 0;
- stride = 1;
- break;
- case GL_LUMINANCE:
- case GL_LUMINANCE_INTEGER_EXT:
- redIndex = greenIndex = blueIndex = 0;
- alphaIndex = -1;
- stride = 1;
- break;
- case GL_LUMINANCE_ALPHA:
- case GL_LUMINANCE_ALPHA_INTEGER_EXT:
- redIndex = greenIndex = blueIndex = 0;
- alphaIndex = 1;
- stride = 2;
- break;
- case GL_INTENSITY:
- redIndex = greenIndex = blueIndex = alphaIndex = 0;
- stride = 1;
- break;
- case GL_RG:
- case GL_RG_INTEGER:
- redIndex = 0;
- greenIndex = 1;
- blueIndex = -1;
- alphaIndex = -1;
- rComp = 0;
- gComp = 1;
- bComp = 2;
- aComp = 3;
- stride = 2;
- break;
- case GL_RGB:
- case GL_RGB_INTEGER:
- redIndex = 0;
- greenIndex = 1;
- blueIndex = 2;
- alphaIndex = -1;
- rComp = 0;
- gComp = 1;
- bComp = 2;
- aComp = 3;
- stride = 3;
- break;
- case GL_BGR:
- redIndex = 2;
- greenIndex = 1;
- blueIndex = 0;
- alphaIndex = -1;
- rComp = 2;
- gComp = 1;
- bComp = 0;
- aComp = 3;
- stride = 3;
- break;
- case GL_RGBA:
- case GL_RGBA_INTEGER:
- redIndex = 0;
- greenIndex = 1;
- blueIndex = 2;
- alphaIndex = 3;
- rComp = 0;
- gComp = 1;
- bComp = 2;
- aComp = 3;
- stride = 4;
- break;
- case GL_BGRA:
- redIndex = 2;
- greenIndex = 1;
- blueIndex = 0;
- alphaIndex = 3;
- rComp = 2;
- gComp = 1;
- bComp = 0;
- aComp = 3;
- stride = 4;
- break;
- case GL_ABGR_EXT:
- redIndex = 3;
- greenIndex = 2;
- blueIndex = 1;
- alphaIndex = 0;
- rComp = 3;
- gComp = 2;
- bComp = 1;
- aComp = 0;
- stride = 4;
- break;
- case GL_DU8DV8_ATI:
- case GL_DUDV_ATI:
- redIndex = 0;
- greenIndex = 1;
- blueIndex = -1;
- alphaIndex = -1;
- stride = 2;
- break;
- default:
- _mesa_problem(NULL, "bad srcFormat %s in extract float data",
- _mesa_lookup_enum_by_nr(srcFormat));
- return;
- }
-
- intFormat = _mesa_is_integer_format(srcFormat);
-
-#define PROCESS(INDEX, CHANNEL, DEFAULT, DEFAULT_INT, TYPE, CONVERSION) \
- if ((INDEX) < 0) { \
- GLuint i; \
- if (intFormat) { \
- for (i = 0; i < n; i++) { \
- rgba[i][CHANNEL] = DEFAULT_INT; \
- } \
- } \
- else { \
- for (i = 0; i < n; i++) { \
- rgba[i][CHANNEL] = DEFAULT; \
- } \
- } \
- } \
- else if (swapBytes) { \
- const TYPE *s = (const TYPE *) src; \
- GLuint i; \
- for (i = 0; i < n; i++) { \
- TYPE value = s[INDEX]; \
- if (sizeof(TYPE) == 2) { \
- SWAP2BYTE(value); \
- } \
- else if (sizeof(TYPE) == 4) { \
- SWAP4BYTE(value); \
- } \
- if (intFormat) \
- rgba[i][CHANNEL] = (GLfloat) value; \
- else \
- rgba[i][CHANNEL] = (GLfloat) CONVERSION(value); \
- s += stride; \
- } \
- } \
- else { \
- const TYPE *s = (const TYPE *) src; \
- GLuint i; \
- if (intFormat) { \
- for (i = 0; i < n; i++) { \
- rgba[i][CHANNEL] = (GLfloat) s[INDEX]; \
- s += stride; \
- } \
- } \
- else { \
- for (i = 0; i < n; i++) { \
- rgba[i][CHANNEL] = (GLfloat) CONVERSION(s[INDEX]); \
- s += stride; \
- } \
- } \
- }
-
- switch (srcType) {
- case GL_UNSIGNED_BYTE:
- PROCESS(redIndex, RCOMP, 0.0F, 0, GLubyte, UBYTE_TO_FLOAT);
- PROCESS(greenIndex, GCOMP, 0.0F, 0, GLubyte, UBYTE_TO_FLOAT);
- PROCESS(blueIndex, BCOMP, 0.0F, 0, GLubyte, UBYTE_TO_FLOAT);
- PROCESS(alphaIndex, ACOMP, 1.0F, 255, GLubyte, UBYTE_TO_FLOAT);
- break;
- case GL_BYTE:
- PROCESS(redIndex, RCOMP, 0.0F, 0, GLbyte, BYTE_TO_FLOAT);
- PROCESS(greenIndex, GCOMP, 0.0F, 0, GLbyte, BYTE_TO_FLOAT);
- PROCESS(blueIndex, BCOMP, 0.0F, 0, GLbyte, BYTE_TO_FLOAT);
- PROCESS(alphaIndex, ACOMP, 1.0F, 127, GLbyte, BYTE_TO_FLOAT);
- break;
- case GL_UNSIGNED_SHORT:
- PROCESS(redIndex, RCOMP, 0.0F, 0, GLushort, USHORT_TO_FLOAT);
- PROCESS(greenIndex, GCOMP, 0.0F, 0, GLushort, USHORT_TO_FLOAT);
- PROCESS(blueIndex, BCOMP, 0.0F, 0, GLushort, USHORT_TO_FLOAT);
- PROCESS(alphaIndex, ACOMP, 1.0F, 0xffff, GLushort, USHORT_TO_FLOAT);
- break;
- case GL_SHORT:
- PROCESS(redIndex, RCOMP, 0.0F, 0, GLshort, SHORT_TO_FLOAT);
- PROCESS(greenIndex, GCOMP, 0.0F, 0, GLshort, SHORT_TO_FLOAT);
- PROCESS(blueIndex, BCOMP, 0.0F, 0, GLshort, SHORT_TO_FLOAT);
- PROCESS(alphaIndex, ACOMP, 1.0F, 32767, GLshort, SHORT_TO_FLOAT);
- break;
- case GL_UNSIGNED_INT:
- PROCESS(redIndex, RCOMP, 0.0F, 0, GLuint, UINT_TO_FLOAT);
- PROCESS(greenIndex, GCOMP, 0.0F, 0, GLuint, UINT_TO_FLOAT);
- PROCESS(blueIndex, BCOMP, 0.0F, 0, GLuint, UINT_TO_FLOAT);
- PROCESS(alphaIndex, ACOMP, 1.0F, 0xffffffff, GLuint, UINT_TO_FLOAT);
- break;
- case GL_INT:
- PROCESS(redIndex, RCOMP, 0.0F, 0, GLint, INT_TO_FLOAT);
- PROCESS(greenIndex, GCOMP, 0.0F, 0, GLint, INT_TO_FLOAT);
- PROCESS(blueIndex, BCOMP, 0.0F, 0, GLint, INT_TO_FLOAT);
- PROCESS(alphaIndex, ACOMP, 1.0F, 2147483647, GLint, INT_TO_FLOAT);
- break;
- case GL_FLOAT:
- PROCESS(redIndex, RCOMP, 0.0F, 0.0F, GLfloat, (GLfloat));
- PROCESS(greenIndex, GCOMP, 0.0F, 0.0F, GLfloat, (GLfloat));
- PROCESS(blueIndex, BCOMP, 0.0F, 0.0F, GLfloat, (GLfloat));
- PROCESS(alphaIndex, ACOMP, 1.0F, 1.0F, GLfloat, (GLfloat));
- break;
- case GL_HALF_FLOAT_ARB:
- PROCESS(redIndex, RCOMP, 0.0F, 0.0F, GLhalfARB, _mesa_half_to_float);
- PROCESS(greenIndex, GCOMP, 0.0F, 0.0F, GLhalfARB, _mesa_half_to_float);
- PROCESS(blueIndex, BCOMP, 0.0F, 0.0F, GLhalfARB, _mesa_half_to_float);
- PROCESS(alphaIndex, ACOMP, 1.0F, 1.0F, GLhalfARB, _mesa_half_to_float);
- break;
- case GL_UNSIGNED_BYTE_3_3_2:
- {
- const GLubyte *ubsrc = (const GLubyte *) src;
- GLuint i;
- if (!intFormat) {
- rs = 1.0F / 7.0F;
- gs = 1.0F / 7.0F;
- bs = 1.0F / 3.0F;
- }
- for (i = 0; i < n; i ++) {
- GLubyte p = ubsrc[i];
- rgba[i][rComp] = ((p >> 5) ) * rs;
- rgba[i][gComp] = ((p >> 2) & 0x7) * gs;
- rgba[i][bComp] = ((p ) & 0x3) * bs;
- rgba[i][aComp] = 1.0F;
- }
- }
- break;
- case GL_UNSIGNED_BYTE_2_3_3_REV:
- {
- const GLubyte *ubsrc = (const GLubyte *) src;
- GLuint i;
- if (!intFormat) {
- rs = 1.0F / 7.0F;
- gs = 1.0F / 7.0F;
- bs = 1.0F / 3.0F;
- }
- for (i = 0; i < n; i ++) {
- GLubyte p = ubsrc[i];
- rgba[i][rComp] = ((p ) & 0x7) * rs;
- rgba[i][gComp] = ((p >> 3) & 0x7) * gs;
- rgba[i][bComp] = ((p >> 6) ) * bs;
- rgba[i][aComp] = 1.0F;
- }
- }
- break;
- case GL_UNSIGNED_SHORT_5_6_5:
- if (!intFormat) {
- rs = 1.0F / 31.0F;
- gs = 1.0F / 63.0F;
- bs = 1.0F / 31.0F;
- }
- if (swapBytes) {
- const GLushort *ussrc = (const GLushort *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLushort p = ussrc[i];
- SWAP2BYTE(p);
- rgba[i][rComp] = ((p >> 11) ) * rs;
- rgba[i][gComp] = ((p >> 5) & 0x3f) * gs;
- rgba[i][bComp] = ((p ) & 0x1f) * bs;
- rgba[i][aComp] = 1.0F;
- }
- }
- else {
- const GLushort *ussrc = (const GLushort *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLushort p = ussrc[i];
- rgba[i][rComp] = ((p >> 11) ) * rs;
- rgba[i][gComp] = ((p >> 5) & 0x3f) * gs;
- rgba[i][bComp] = ((p ) & 0x1f) * bs;
- rgba[i][aComp] = 1.0F;
- }
- }
- break;
- case GL_UNSIGNED_SHORT_5_6_5_REV:
- if (!intFormat) {
- rs = 1.0F / 31.0F;
- gs = 1.0F / 63.0F;
- bs = 1.0F / 31.0F;
- }
- if (swapBytes) {
- const GLushort *ussrc = (const GLushort *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLushort p = ussrc[i];
- SWAP2BYTE(p);
- rgba[i][rComp] = ((p ) & 0x1f) * rs;
- rgba[i][gComp] = ((p >> 5) & 0x3f) * gs;
- rgba[i][bComp] = ((p >> 11) ) * bs;
- rgba[i][aComp] = 1.0F;
- }
- }
- else {
- const GLushort *ussrc = (const GLushort *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLushort p = ussrc[i];
- rgba[i][rComp] = ((p ) & 0x1f) * rs;
- rgba[i][gComp] = ((p >> 5) & 0x3f) * gs;
- rgba[i][bComp] = ((p >> 11) ) * bs;
- rgba[i][aComp] = 1.0F;
- }
- }
- break;
- case GL_UNSIGNED_SHORT_4_4_4_4:
- if (!intFormat) {
- rs = gs = bs = as = 1.0F / 15.0F;
- }
- if (swapBytes) {
- const GLushort *ussrc = (const GLushort *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLushort p = ussrc[i];
- SWAP2BYTE(p);
- rgba[i][rComp] = ((p >> 12) ) * rs;
- rgba[i][gComp] = ((p >> 8) & 0xf) * gs;
- rgba[i][bComp] = ((p >> 4) & 0xf) * bs;
- rgba[i][aComp] = ((p ) & 0xf) * as;
- }
- }
- else {
- const GLushort *ussrc = (const GLushort *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLushort p = ussrc[i];
- rgba[i][rComp] = ((p >> 12) ) * rs;
- rgba[i][gComp] = ((p >> 8) & 0xf) * gs;
- rgba[i][bComp] = ((p >> 4) & 0xf) * bs;
- rgba[i][aComp] = ((p ) & 0xf) * as;
- }
- }
- break;
- case GL_UNSIGNED_SHORT_4_4_4_4_REV:
- if (!intFormat) {
- rs = gs = bs = as = 1.0F / 15.0F;
- }
- if (swapBytes) {
- const GLushort *ussrc = (const GLushort *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLushort p = ussrc[i];
- SWAP2BYTE(p);
- rgba[i][rComp] = ((p ) & 0xf) * rs;
- rgba[i][gComp] = ((p >> 4) & 0xf) * gs;
- rgba[i][bComp] = ((p >> 8) & 0xf) * bs;
- rgba[i][aComp] = ((p >> 12) ) * as;
- }
- }
- else {
- const GLushort *ussrc = (const GLushort *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLushort p = ussrc[i];
- rgba[i][rComp] = ((p ) & 0xf) * rs;
- rgba[i][gComp] = ((p >> 4) & 0xf) * gs;
- rgba[i][bComp] = ((p >> 8) & 0xf) * bs;
- rgba[i][aComp] = ((p >> 12) ) * as;
- }
- }
- break;
- case GL_UNSIGNED_SHORT_5_5_5_1:
- if (!intFormat) {
- rs = gs = bs = 1.0F / 31.0F;
- }
- if (swapBytes) {
- const GLushort *ussrc = (const GLushort *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLushort p = ussrc[i];
- SWAP2BYTE(p);
- rgba[i][rComp] = ((p >> 11) ) * rs;
- rgba[i][gComp] = ((p >> 6) & 0x1f) * gs;
- rgba[i][bComp] = ((p >> 1) & 0x1f) * bs;
- rgba[i][aComp] = ((p ) & 0x1) * as;
- }
- }
- else {
- const GLushort *ussrc = (const GLushort *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLushort p = ussrc[i];
- rgba[i][rComp] = ((p >> 11) ) * rs;
- rgba[i][gComp] = ((p >> 6) & 0x1f) * gs;
- rgba[i][bComp] = ((p >> 1) & 0x1f) * bs;
- rgba[i][aComp] = ((p ) & 0x1) * as;
- }
- }
- break;
- case GL_UNSIGNED_SHORT_1_5_5_5_REV:
- if (!intFormat) {
- rs = gs = bs = 1.0F / 31.0F;
- }
- if (swapBytes) {
- const GLushort *ussrc = (const GLushort *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLushort p = ussrc[i];
- SWAP2BYTE(p);
- rgba[i][rComp] = ((p ) & 0x1f) * rs;
- rgba[i][gComp] = ((p >> 5) & 0x1f) * gs;
- rgba[i][bComp] = ((p >> 10) & 0x1f) * bs;
- rgba[i][aComp] = ((p >> 15) ) * as;
- }
- }
- else {
- const GLushort *ussrc = (const GLushort *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLushort p = ussrc[i];
- rgba[i][rComp] = ((p ) & 0x1f) * rs;
- rgba[i][gComp] = ((p >> 5) & 0x1f) * gs;
- rgba[i][bComp] = ((p >> 10) & 0x1f) * bs;
- rgba[i][aComp] = ((p >> 15) ) * as;
- }
- }
- break;
- case GL_UNSIGNED_INT_8_8_8_8:
- if (swapBytes) {
- const GLuint *uisrc = (const GLuint *) src;
- GLuint i;
- if (intFormat) {
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- rgba[i][rComp] = (GLfloat) ((p ) & 0xff);
- rgba[i][gComp] = (GLfloat) ((p >> 8) & 0xff);
- rgba[i][bComp] = (GLfloat) ((p >> 16) & 0xff);
- rgba[i][aComp] = (GLfloat) ((p >> 24) );
- }
- }
- else {
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- rgba[i][rComp] = UBYTE_TO_FLOAT((p ) & 0xff);
- rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
- rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
- rgba[i][aComp] = UBYTE_TO_FLOAT((p >> 24) );
- }
- }
- }
- else {
- const GLuint *uisrc = (const GLuint *) src;
- GLuint i;
- if (intFormat) {
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- rgba[i][rComp] = (GLfloat) ((p >> 24) );
- rgba[i][gComp] = (GLfloat) ((p >> 16) & 0xff);
- rgba[i][bComp] = (GLfloat) ((p >> 8) & 0xff);
- rgba[i][aComp] = (GLfloat) ((p ) & 0xff);
- }
- }
- else {
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- rgba[i][rComp] = UBYTE_TO_FLOAT((p >> 24) );
- rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
- rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
- rgba[i][aComp] = UBYTE_TO_FLOAT((p ) & 0xff);
- }
- }
- }
- break;
- case GL_UNSIGNED_INT_8_8_8_8_REV:
- if (swapBytes) {
- const GLuint *uisrc = (const GLuint *) src;
- GLuint i;
- if (intFormat) {
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- rgba[i][rComp] = (GLfloat) ((p >> 24) );
- rgba[i][gComp] = (GLfloat) ((p >> 16) & 0xff);
- rgba[i][bComp] = (GLfloat) ((p >> 8) & 0xff);
- rgba[i][aComp] = (GLfloat) ((p ) & 0xff);
- }
- }
- else {
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- rgba[i][rComp] = UBYTE_TO_FLOAT((p >> 24) );
- rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
- rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
- rgba[i][aComp] = UBYTE_TO_FLOAT((p ) & 0xff);
- }
- }
- }
- else {
- const GLuint *uisrc = (const GLuint *) src;
- GLuint i;
- if (intFormat) {
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- rgba[i][rComp] = (GLfloat) ((p ) & 0xff);
- rgba[i][gComp] = (GLfloat) ((p >> 8) & 0xff);
- rgba[i][bComp] = (GLfloat) ((p >> 16) & 0xff);
- rgba[i][aComp] = (GLfloat) ((p >> 24) );
- }
- }
- else {
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- rgba[i][rComp] = UBYTE_TO_FLOAT((p ) & 0xff);
- rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
- rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
- rgba[i][aComp] = UBYTE_TO_FLOAT((p >> 24) );
- }
- }
- }
- break;
- case GL_UNSIGNED_INT_10_10_10_2:
- if (!intFormat) {
- rs = 1.0F / 1023.0F;
- gs = 1.0F / 1023.0F;
- bs = 1.0F / 1023.0F;
- as = 1.0F / 3.0F;
- }
- if (swapBytes) {
- const GLuint *uisrc = (const GLuint *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- SWAP4BYTE(p);
- rgba[i][rComp] = ((p >> 22) ) * rs;
- rgba[i][gComp] = ((p >> 12) & 0x3ff) * gs;
- rgba[i][bComp] = ((p >> 2) & 0x3ff) * bs;
- rgba[i][aComp] = ((p ) & 0x3 ) * as;
- }
- }
- else {
- const GLuint *uisrc = (const GLuint *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- rgba[i][rComp] = ((p >> 22) ) * rs;
- rgba[i][gComp] = ((p >> 12) & 0x3ff) * gs;
- rgba[i][bComp] = ((p >> 2) & 0x3ff) * bs;
- rgba[i][aComp] = ((p ) & 0x3 ) * as;
- }
- }
- break;
- case GL_UNSIGNED_INT_2_10_10_10_REV:
- if (!intFormat) {
- rs = 1.0F / 1023.0F;
- gs = 1.0F / 1023.0F;
- bs = 1.0F / 1023.0F;
- as = 1.0F / 3.0F;
- }
- if (swapBytes) {
- const GLuint *uisrc = (const GLuint *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- SWAP4BYTE(p);
- rgba[i][rComp] = ((p ) & 0x3ff) * rs;
- rgba[i][gComp] = ((p >> 10) & 0x3ff) * gs;
- rgba[i][bComp] = ((p >> 20) & 0x3ff) * bs;
- rgba[i][aComp] = ((p >> 30) ) * as;
- }
- }
- else {
- const GLuint *uisrc = (const GLuint *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- rgba[i][rComp] = ((p ) & 0x3ff) * rs;
- rgba[i][gComp] = ((p >> 10) & 0x3ff) * gs;
- rgba[i][bComp] = ((p >> 20) & 0x3ff) * bs;
- rgba[i][aComp] = ((p >> 30) ) * as;
- }
- }
- break;
- default:
- _mesa_problem(NULL, "bad srcType in extract float data");
- break;
- }
-}
-
-
-/*
- * Unpack a row of color image data from a client buffer according to
- * the pixel unpacking parameters.
- * Return GLchan values in the specified dest image format.
- * This is used by glDrawPixels and glTexImage?D().
- * \param ctx - the context
- * n - number of pixels in the span
- * dstFormat - format of destination color array
- * dest - the destination color array
- * srcFormat - source image format
- * srcType - source image data type
- * source - source image pointer
- * srcPacking - pixel unpacking parameters
- * transferOps - bitmask of IMAGE_*_BIT values of operations to apply
- *
- * XXX perhaps expand this to process whole images someday.
- */
-void
-_mesa_unpack_color_span_chan( GLcontext *ctx,
- GLuint n, GLenum dstFormat, GLchan dest[],
- GLenum srcFormat, GLenum srcType,
- const GLvoid *source,
- const struct gl_pixelstore_attrib *srcPacking,
- GLbitfield transferOps )
-{
- ASSERT(dstFormat == GL_ALPHA ||
- dstFormat == GL_LUMINANCE ||
- dstFormat == GL_LUMINANCE_ALPHA ||
- dstFormat == GL_INTENSITY ||
- dstFormat == GL_RED ||
- dstFormat == GL_RG ||
- dstFormat == GL_RGB ||
- dstFormat == GL_RGBA ||
- dstFormat == GL_COLOR_INDEX);
-
- ASSERT(srcFormat == GL_RED ||
- srcFormat == GL_GREEN ||
- srcFormat == GL_BLUE ||
- srcFormat == GL_ALPHA ||
- srcFormat == GL_LUMINANCE ||
- srcFormat == GL_LUMINANCE_ALPHA ||
- srcFormat == GL_INTENSITY ||
- srcFormat == GL_RG ||
- srcFormat == GL_RGB ||
- srcFormat == GL_BGR ||
- srcFormat == GL_RGBA ||
- srcFormat == GL_BGRA ||
- srcFormat == GL_ABGR_EXT ||
- srcFormat == GL_COLOR_INDEX);
-
- ASSERT(srcType == GL_BITMAP ||
- srcType == GL_UNSIGNED_BYTE ||
- srcType == GL_BYTE ||
- srcType == GL_UNSIGNED_SHORT ||
- srcType == GL_SHORT ||
- srcType == GL_UNSIGNED_INT ||
- srcType == GL_INT ||
- srcType == GL_HALF_FLOAT_ARB ||
- srcType == GL_FLOAT ||
- srcType == GL_UNSIGNED_BYTE_3_3_2 ||
- srcType == GL_UNSIGNED_BYTE_2_3_3_REV ||
- srcType == GL_UNSIGNED_SHORT_5_6_5 ||
- srcType == GL_UNSIGNED_SHORT_5_6_5_REV ||
- srcType == GL_UNSIGNED_SHORT_4_4_4_4 ||
- srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV ||
- srcType == GL_UNSIGNED_SHORT_5_5_5_1 ||
- srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV ||
- srcType == GL_UNSIGNED_INT_8_8_8_8 ||
- srcType == GL_UNSIGNED_INT_8_8_8_8_REV ||
- srcType == GL_UNSIGNED_INT_10_10_10_2 ||
- srcType == GL_UNSIGNED_INT_2_10_10_10_REV);
-
- /* Try simple cases first */
- if (transferOps == 0) {
- if (srcType == CHAN_TYPE) {
- if (dstFormat == GL_RGBA) {
- if (srcFormat == GL_RGBA) {
- memcpy( dest, source, n * 4 * sizeof(GLchan) );
- return;
- }
- else if (srcFormat == GL_RGB) {
- GLuint i;
- const GLchan *src = (const GLchan *) source;
- GLchan *dst = dest;
- for (i = 0; i < n; i++) {
- dst[0] = src[0];
- dst[1] = src[1];
- dst[2] = src[2];
- dst[3] = CHAN_MAX;
- src += 3;
- dst += 4;
- }
- return;
- }
- }
- else if (dstFormat == GL_RGB) {
- if (srcFormat == GL_RGB) {
- memcpy( dest, source, n * 3 * sizeof(GLchan) );
- return;
- }
- else if (srcFormat == GL_RGBA) {
- GLuint i;
- const GLchan *src = (const GLchan *) source;
- GLchan *dst = dest;
- for (i = 0; i < n; i++) {
- dst[0] = src[0];
- dst[1] = src[1];
- dst[2] = src[2];
- src += 4;
- dst += 3;
- }
- return;
- }
- }
- else if (dstFormat == srcFormat) {
- GLint comps = _mesa_components_in_format(srcFormat);
- assert(comps > 0);
- memcpy( dest, source, n * comps * sizeof(GLchan) );
- return;
- }
- }
- /*
- * Common situation, loading 8bit RGBA/RGB source images
- * into 16/32 bit destination. (OSMesa16/32)
- */
- else if (srcType == GL_UNSIGNED_BYTE) {
- if (dstFormat == GL_RGBA) {
- if (srcFormat == GL_RGB) {
- GLuint i;
- const GLubyte *src = (const GLubyte *) source;
- GLchan *dst = dest;
- for (i = 0; i < n; i++) {
- dst[0] = UBYTE_TO_CHAN(src[0]);
- dst[1] = UBYTE_TO_CHAN(src[1]);
- dst[2] = UBYTE_TO_CHAN(src[2]);
- dst[3] = CHAN_MAX;
- src += 3;
- dst += 4;
- }
- return;
- }
- else if (srcFormat == GL_RGBA) {
- GLuint i;
- const GLubyte *src = (const GLubyte *) source;
- GLchan *dst = dest;
- for (i = 0; i < n; i++) {
- dst[0] = UBYTE_TO_CHAN(src[0]);
- dst[1] = UBYTE_TO_CHAN(src[1]);
- dst[2] = UBYTE_TO_CHAN(src[2]);
- dst[3] = UBYTE_TO_CHAN(src[3]);
- src += 4;
- dst += 4;
- }
- return;
- }
- }
- else if (dstFormat == GL_RGB) {
- if (srcFormat == GL_RGB) {
- GLuint i;
- const GLubyte *src = (const GLubyte *) source;
- GLchan *dst = dest;
- for (i = 0; i < n; i++) {
- dst[0] = UBYTE_TO_CHAN(src[0]);
- dst[1] = UBYTE_TO_CHAN(src[1]);
- dst[2] = UBYTE_TO_CHAN(src[2]);
- src += 3;
- dst += 3;
- }
- return;
- }
- else if (srcFormat == GL_RGBA) {
- GLuint i;
- const GLubyte *src = (const GLubyte *) source;
- GLchan *dst = dest;
- for (i = 0; i < n; i++) {
- dst[0] = UBYTE_TO_CHAN(src[0]);
- dst[1] = UBYTE_TO_CHAN(src[1]);
- dst[2] = UBYTE_TO_CHAN(src[2]);
- src += 4;
- dst += 3;
- }
- return;
- }
- }
- }
- }
-
-
- /* general solution begins here */
- {
- GLint dstComponents;
- GLint dstRedIndex, dstGreenIndex, dstBlueIndex, dstAlphaIndex;
- GLint dstLuminanceIndex, dstIntensityIndex;
- GLfloat rgba[MAX_WIDTH][4];
-
- dstComponents = _mesa_components_in_format( dstFormat );
- /* source & dest image formats should have been error checked by now */
- assert(dstComponents > 0);
-
- /*
- * Extract image data and convert to RGBA floats
- */
- assert(n <= MAX_WIDTH);
- if (srcFormat == GL_COLOR_INDEX) {
- GLuint indexes[MAX_WIDTH];
- extract_uint_indexes(n, indexes, srcFormat, srcType, source,
- srcPacking);
-
- if (dstFormat == GL_COLOR_INDEX) {
- GLuint i;
- _mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes);
- /* convert to GLchan and return */
- for (i = 0; i < n; i++) {
- dest[i] = (GLchan) (indexes[i] & 0xff);
- }
- return;
- }
- else {
- /* Convert indexes to RGBA */
- if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
- shift_and_offset_ci(ctx, n, indexes);
- }
- _mesa_map_ci_to_rgba(ctx, n, indexes, rgba);
- }
-
- /* Don't do RGBA scale/bias or RGBA->RGBA mapping if starting
- * with color indexes.
- */
- transferOps &= ~(IMAGE_SCALE_BIAS_BIT | IMAGE_MAP_COLOR_BIT);
- }
- else {
- /* non-color index data */
- extract_float_rgba(n, rgba, srcFormat, srcType, source,
- srcPacking->SwapBytes);
- }
-
- /* Need to clamp if returning GLubytes or GLushorts */
-#if CHAN_TYPE != GL_FLOAT
- transferOps |= IMAGE_CLAMP_BIT;
-#endif
-
- if (transferOps) {
- _mesa_apply_rgba_transfer_ops(ctx, transferOps, n, rgba);
- }
-
- /* Now determine which color channels we need to produce.
- * And determine the dest index (offset) within each color tuple.
- */
- switch (dstFormat) {
- case GL_ALPHA:
- dstAlphaIndex = 0;
- dstRedIndex = dstGreenIndex = dstBlueIndex = -1;
- dstLuminanceIndex = dstIntensityIndex = -1;
- break;
- case GL_LUMINANCE:
- dstLuminanceIndex = 0;
- dstRedIndex = dstGreenIndex = dstBlueIndex = dstAlphaIndex = -1;
- dstIntensityIndex = -1;
- break;
- case GL_LUMINANCE_ALPHA:
- dstLuminanceIndex = 0;
- dstAlphaIndex = 1;
- dstRedIndex = dstGreenIndex = dstBlueIndex = -1;
- dstIntensityIndex = -1;
- break;
- case GL_INTENSITY:
- dstIntensityIndex = 0;
- dstRedIndex = dstGreenIndex = dstBlueIndex = dstAlphaIndex = -1;
- dstLuminanceIndex = -1;
- break;
- case GL_RED:
- dstRedIndex = 0;
- dstGreenIndex = dstBlueIndex = -1;
- dstAlphaIndex = dstLuminanceIndex = dstIntensityIndex = -1;
- break;
- case GL_RG:
- dstRedIndex = 0;
- dstGreenIndex = 1;
- dstBlueIndex = -1;
- dstAlphaIndex = dstLuminanceIndex = dstIntensityIndex = -1;
- break;
- case GL_RGB:
- dstRedIndex = 0;
- dstGreenIndex = 1;
- dstBlueIndex = 2;
- dstAlphaIndex = dstLuminanceIndex = dstIntensityIndex = -1;
- break;
- case GL_RGBA:
- dstRedIndex = 0;
- dstGreenIndex = 1;
- dstBlueIndex = 2;
- dstAlphaIndex = 3;
- dstLuminanceIndex = dstIntensityIndex = -1;
- break;
- default:
- _mesa_problem(ctx, "bad dstFormat in _mesa_unpack_chan_span()");
- return;
- }
-
-
- /* Now return the GLchan data in the requested dstFormat */
-
- if (dstRedIndex >= 0) {
- GLchan *dst = dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- CLAMPED_FLOAT_TO_CHAN(dst[dstRedIndex], rgba[i][RCOMP]);
- dst += dstComponents;
- }
- }
-
- if (dstGreenIndex >= 0) {
- GLchan *dst = dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- CLAMPED_FLOAT_TO_CHAN(dst[dstGreenIndex], rgba[i][GCOMP]);
- dst += dstComponents;
- }
- }
-
- if (dstBlueIndex >= 0) {
- GLchan *dst = dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- CLAMPED_FLOAT_TO_CHAN(dst[dstBlueIndex], rgba[i][BCOMP]);
- dst += dstComponents;
- }
- }
-
- if (dstAlphaIndex >= 0) {
- GLchan *dst = dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- CLAMPED_FLOAT_TO_CHAN(dst[dstAlphaIndex], rgba[i][ACOMP]);
- dst += dstComponents;
- }
- }
-
- if (dstIntensityIndex >= 0) {
- GLchan *dst = dest;
- GLuint i;
- assert(dstIntensityIndex == 0);
- assert(dstComponents == 1);
- for (i = 0; i < n; i++) {
- /* Intensity comes from red channel */
- CLAMPED_FLOAT_TO_CHAN(dst[i], rgba[i][RCOMP]);
- }
- }
-
- if (dstLuminanceIndex >= 0) {
- GLchan *dst = dest;
- GLuint i;
- assert(dstLuminanceIndex == 0);
- for (i = 0; i < n; i++) {
- /* Luminance comes from red channel */
- CLAMPED_FLOAT_TO_CHAN(dst[0], rgba[i][RCOMP]);
- dst += dstComponents;
- }
- }
- }
-}
-
-
-/**
- * Same as _mesa_unpack_color_span_chan(), but return GLfloat data
- * instead of GLchan.
- */
-void
-_mesa_unpack_color_span_float( GLcontext *ctx,
- GLuint n, GLenum dstFormat, GLfloat dest[],
- GLenum srcFormat, GLenum srcType,
- const GLvoid *source,
- const struct gl_pixelstore_attrib *srcPacking,
- GLbitfield transferOps )
-{
- ASSERT(dstFormat == GL_ALPHA ||
- dstFormat == GL_LUMINANCE ||
- dstFormat == GL_LUMINANCE_ALPHA ||
- dstFormat == GL_INTENSITY ||
- dstFormat == GL_RED ||
- dstFormat == GL_RG ||
- dstFormat == GL_RGB ||
- dstFormat == GL_RGBA ||
- dstFormat == GL_COLOR_INDEX);
-
- ASSERT(srcFormat == GL_RED ||
- srcFormat == GL_GREEN ||
- srcFormat == GL_BLUE ||
- srcFormat == GL_ALPHA ||
- srcFormat == GL_LUMINANCE ||
- srcFormat == GL_LUMINANCE_ALPHA ||
- srcFormat == GL_INTENSITY ||
- srcFormat == GL_RG ||
- srcFormat == GL_RGB ||
- srcFormat == GL_BGR ||
- srcFormat == GL_RGBA ||
- srcFormat == GL_BGRA ||
- srcFormat == GL_ABGR_EXT ||
- srcFormat == GL_RED_INTEGER_EXT ||
- srcFormat == GL_GREEN_INTEGER_EXT ||
- srcFormat == GL_BLUE_INTEGER_EXT ||
- srcFormat == GL_ALPHA_INTEGER_EXT ||
- srcFormat == GL_RGB_INTEGER_EXT ||
- srcFormat == GL_RGBA_INTEGER_EXT ||
- srcFormat == GL_BGR_INTEGER_EXT ||
- srcFormat == GL_BGRA_INTEGER_EXT ||
- srcFormat == GL_LUMINANCE_INTEGER_EXT ||
- srcFormat == GL_LUMINANCE_ALPHA_INTEGER_EXT ||
- srcFormat == GL_COLOR_INDEX);
-
- ASSERT(srcType == GL_BITMAP ||
- srcType == GL_UNSIGNED_BYTE ||
- srcType == GL_BYTE ||
- srcType == GL_UNSIGNED_SHORT ||
- srcType == GL_SHORT ||
- srcType == GL_UNSIGNED_INT ||
- srcType == GL_INT ||
- srcType == GL_HALF_FLOAT_ARB ||
- srcType == GL_FLOAT ||
- srcType == GL_UNSIGNED_BYTE_3_3_2 ||
- srcType == GL_UNSIGNED_BYTE_2_3_3_REV ||
- srcType == GL_UNSIGNED_SHORT_5_6_5 ||
- srcType == GL_UNSIGNED_SHORT_5_6_5_REV ||
- srcType == GL_UNSIGNED_SHORT_4_4_4_4 ||
- srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV ||
- srcType == GL_UNSIGNED_SHORT_5_5_5_1 ||
- srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV ||
- srcType == GL_UNSIGNED_INT_8_8_8_8 ||
- srcType == GL_UNSIGNED_INT_8_8_8_8_REV ||
- srcType == GL_UNSIGNED_INT_10_10_10_2 ||
- srcType == GL_UNSIGNED_INT_2_10_10_10_REV);
-
- /* general solution, no special cases, yet */
- {
- GLint dstComponents;
- GLint dstRedIndex, dstGreenIndex, dstBlueIndex, dstAlphaIndex;
- GLint dstLuminanceIndex, dstIntensityIndex;
- GLfloat rgba[MAX_WIDTH][4];
-
- dstComponents = _mesa_components_in_format( dstFormat );
- /* source & dest image formats should have been error checked by now */
- assert(dstComponents > 0);
-
- /*
- * Extract image data and convert to RGBA floats
- */
- assert(n <= MAX_WIDTH);
- if (srcFormat == GL_COLOR_INDEX) {
- GLuint indexes[MAX_WIDTH];
- extract_uint_indexes(n, indexes, srcFormat, srcType, source,
- srcPacking);
-
- if (dstFormat == GL_COLOR_INDEX) {
- GLuint i;
- _mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes);
- /* convert to GLchan and return */
- for (i = 0; i < n; i++) {
- dest[i] = (GLchan) (indexes[i] & 0xff);
- }
- return;
- }
- else {
- /* Convert indexes to RGBA */
- if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
- shift_and_offset_ci(ctx, n, indexes);
- }
- _mesa_map_ci_to_rgba(ctx, n, indexes, rgba);
- }
-
- /* Don't do RGBA scale/bias or RGBA->RGBA mapping if starting
- * with color indexes.
- */
- transferOps &= ~(IMAGE_SCALE_BIAS_BIT | IMAGE_MAP_COLOR_BIT);
- }
- else {
- /* non-color index data */
- extract_float_rgba(n, rgba, srcFormat, srcType, source,
- srcPacking->SwapBytes);
- }
-
- if (transferOps) {
- _mesa_apply_rgba_transfer_ops(ctx, transferOps, n, rgba);
- }
-
- /* Now determine which color channels we need to produce.
- * And determine the dest index (offset) within each color tuple.
- */
- switch (dstFormat) {
- case GL_ALPHA:
- dstAlphaIndex = 0;
- dstRedIndex = dstGreenIndex = dstBlueIndex = -1;
- dstLuminanceIndex = dstIntensityIndex = -1;
- break;
- case GL_LUMINANCE:
- dstLuminanceIndex = 0;
- dstRedIndex = dstGreenIndex = dstBlueIndex = dstAlphaIndex = -1;
- dstIntensityIndex = -1;
- break;
- case GL_LUMINANCE_ALPHA:
- dstLuminanceIndex = 0;
- dstAlphaIndex = 1;
- dstRedIndex = dstGreenIndex = dstBlueIndex = -1;
- dstIntensityIndex = -1;
- break;
- case GL_INTENSITY:
- dstIntensityIndex = 0;
- dstRedIndex = dstGreenIndex = dstBlueIndex = dstAlphaIndex = -1;
- dstLuminanceIndex = -1;
- break;
- case GL_RED:
- dstRedIndex = 0;
- dstGreenIndex = dstBlueIndex = -1;
- dstAlphaIndex = dstLuminanceIndex = dstIntensityIndex = -1;
- break;
- case GL_RG:
- dstRedIndex = 0;
- dstGreenIndex = 1;
- dstBlueIndex = -1;
- dstAlphaIndex = dstLuminanceIndex = dstIntensityIndex = -1;
- break;
- case GL_RGB:
- dstRedIndex = 0;
- dstGreenIndex = 1;
- dstBlueIndex = 2;
- dstAlphaIndex = dstLuminanceIndex = dstIntensityIndex = -1;
- break;
- case GL_RGBA:
- dstRedIndex = 0;
- dstGreenIndex = 1;
- dstBlueIndex = 2;
- dstAlphaIndex = 3;
- dstLuminanceIndex = dstIntensityIndex = -1;
- break;
- default:
- _mesa_problem(ctx, "bad dstFormat in _mesa_unpack_color_span_float()");
- return;
- }
-
- /* Now pack results in the requested dstFormat */
- if (dstRedIndex >= 0) {
- GLfloat *dst = dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[dstRedIndex] = rgba[i][RCOMP];
- dst += dstComponents;
- }
- }
-
- if (dstGreenIndex >= 0) {
- GLfloat *dst = dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[dstGreenIndex] = rgba[i][GCOMP];
- dst += dstComponents;
- }
- }
-
- if (dstBlueIndex >= 0) {
- GLfloat *dst = dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[dstBlueIndex] = rgba[i][BCOMP];
- dst += dstComponents;
- }
- }
-
- if (dstAlphaIndex >= 0) {
- GLfloat *dst = dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[dstAlphaIndex] = rgba[i][ACOMP];
- dst += dstComponents;
- }
- }
-
- if (dstIntensityIndex >= 0) {
- GLfloat *dst = dest;
- GLuint i;
- assert(dstIntensityIndex == 0);
- assert(dstComponents == 1);
- for (i = 0; i < n; i++) {
- /* Intensity comes from red channel */
- dst[i] = rgba[i][RCOMP];
- }
- }
-
- if (dstLuminanceIndex >= 0) {
- GLfloat *dst = dest;
- GLuint i;
- assert(dstLuminanceIndex == 0);
- for (i = 0; i < n; i++) {
- /* Luminance comes from red channel */
- dst[0] = rgba[i][RCOMP];
- dst += dstComponents;
- }
- }
- }
-}
-
-/**
- * Similar to _mesa_unpack_color_span_float(), but for dudv data instead of rgba,
- * directly return GLbyte data, no transfer ops apply.
- */
-void
-_mesa_unpack_dudv_span_byte( GLcontext *ctx,
- GLuint n, GLenum dstFormat, GLbyte dest[],
- GLenum srcFormat, GLenum srcType,
- const GLvoid *source,
- const struct gl_pixelstore_attrib *srcPacking,
- GLbitfield transferOps )
-{
- ASSERT(dstFormat == GL_DUDV_ATI);
- ASSERT(srcFormat == GL_DUDV_ATI);
-
- ASSERT(srcType == GL_UNSIGNED_BYTE ||
- srcType == GL_BYTE ||
- srcType == GL_UNSIGNED_SHORT ||
- srcType == GL_SHORT ||
- srcType == GL_UNSIGNED_INT ||
- srcType == GL_INT ||
- srcType == GL_HALF_FLOAT_ARB ||
- srcType == GL_FLOAT);
-
- /* general solution */
- {
- GLint dstComponents;
- GLfloat rgba[MAX_WIDTH][4];
- GLbyte *dst = dest;
- GLuint i;
-
- dstComponents = _mesa_components_in_format( dstFormat );
- /* source & dest image formats should have been error checked by now */
- assert(dstComponents > 0);
-
- /*
- * Extract image data and convert to RGBA floats
- */
- assert(n <= MAX_WIDTH);
- extract_float_rgba(n, rgba, srcFormat, srcType, source,
- srcPacking->SwapBytes);
-
-
- /* Now determine which color channels we need to produce.
- * And determine the dest index (offset) within each color tuple.
- */
-
- /* Now pack results in the requested dstFormat */
- for (i = 0; i < n; i++) {
- /* not sure - need clamp[-1,1] here? */
- dst[0] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
- dst[1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
- dst += dstComponents;
- }
- }
-}
-
-/*
- * Unpack a row of color index data from a client buffer according to
- * the pixel unpacking parameters.
- * This is (or will be) used by glDrawPixels, glTexImage[123]D, etc.
- *
- * Args: ctx - the context
- * n - number of pixels
- * dstType - destination data type
- * dest - destination array
- * srcType - source pixel type
- * source - source data pointer
- * srcPacking - pixel unpacking parameters
- * transferOps - the pixel transfer operations to apply
- */
-void
-_mesa_unpack_index_span( const GLcontext *ctx, GLuint n,
- GLenum dstType, GLvoid *dest,
- GLenum srcType, const GLvoid *source,
- const struct gl_pixelstore_attrib *srcPacking,
- GLbitfield transferOps )
-{
- ASSERT(srcType == GL_BITMAP ||
- srcType == GL_UNSIGNED_BYTE ||
- srcType == GL_BYTE ||
- srcType == GL_UNSIGNED_SHORT ||
- srcType == GL_SHORT ||
- srcType == GL_UNSIGNED_INT ||
- srcType == GL_INT ||
- srcType == GL_HALF_FLOAT_ARB ||
- srcType == GL_FLOAT);
-
- ASSERT(dstType == GL_UNSIGNED_BYTE ||
- dstType == GL_UNSIGNED_SHORT ||
- dstType == GL_UNSIGNED_INT);
-
-
- transferOps &= (IMAGE_MAP_COLOR_BIT | IMAGE_SHIFT_OFFSET_BIT);
-
- /*
- * Try simple cases first
- */
- if (transferOps == 0 && srcType == GL_UNSIGNED_BYTE
- && dstType == GL_UNSIGNED_BYTE) {
- memcpy(dest, source, n * sizeof(GLubyte));
- }
- else if (transferOps == 0 && srcType == GL_UNSIGNED_INT
- && dstType == GL_UNSIGNED_INT && !srcPacking->SwapBytes) {
- memcpy(dest, source, n * sizeof(GLuint));
- }
- else {
- /*
- * general solution
- */
- GLuint indexes[MAX_WIDTH];
- assert(n <= MAX_WIDTH);
-
- extract_uint_indexes(n, indexes, GL_COLOR_INDEX, srcType, source,
- srcPacking);
-
- if (transferOps)
- _mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes);
-
- /* convert to dest type */
- switch (dstType) {
- case GL_UNSIGNED_BYTE:
- {
- GLubyte *dst = (GLubyte *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = (GLubyte) (indexes[i] & 0xff);
- }
- }
- break;
- case GL_UNSIGNED_SHORT:
- {
- GLuint *dst = (GLuint *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = (GLushort) (indexes[i] & 0xffff);
- }
- }
- break;
- case GL_UNSIGNED_INT:
- memcpy(dest, indexes, n * sizeof(GLuint));
- break;
- default:
- _mesa_problem(ctx, "bad dstType in _mesa_unpack_index_span");
- }
- }
-}
-
-
-void
-_mesa_pack_index_span( const GLcontext *ctx, GLuint n,
- GLenum dstType, GLvoid *dest, const GLuint *source,
- const struct gl_pixelstore_attrib *dstPacking,
- GLbitfield transferOps )
-{
- GLuint indexes[MAX_WIDTH];
-
- ASSERT(n <= MAX_WIDTH);
-
- transferOps &= (IMAGE_MAP_COLOR_BIT | IMAGE_SHIFT_OFFSET_BIT);
-
- if (transferOps & (IMAGE_MAP_COLOR_BIT | IMAGE_SHIFT_OFFSET_BIT)) {
- /* make a copy of input */
- memcpy(indexes, source, n * sizeof(GLuint));
- _mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes);
- source = indexes;
- }
-
- switch (dstType) {
- case GL_UNSIGNED_BYTE:
- {
- GLubyte *dst = (GLubyte *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- *dst++ = (GLubyte) source[i];
- }
- }
- break;
- case GL_BYTE:
- {
- GLbyte *dst = (GLbyte *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = (GLbyte) source[i];
- }
- }
- break;
- case GL_UNSIGNED_SHORT:
- {
- GLushort *dst = (GLushort *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = (GLushort) source[i];
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap2( (GLushort *) dst, n );
- }
- }
- break;
- case GL_SHORT:
- {
- GLshort *dst = (GLshort *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = (GLshort) source[i];
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap2( (GLushort *) dst, n );
- }
- }
- break;
- case GL_UNSIGNED_INT:
- {
- GLuint *dst = (GLuint *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = (GLuint) source[i];
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap4( (GLuint *) dst, n );
- }
- }
- break;
- case GL_INT:
- {
- GLint *dst = (GLint *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = (GLint) source[i];
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap4( (GLuint *) dst, n );
- }
- }
- break;
- case GL_FLOAT:
- {
- GLfloat *dst = (GLfloat *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = (GLfloat) source[i];
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap4( (GLuint *) dst, n );
- }
- }
- break;
- case GL_HALF_FLOAT_ARB:
- {
- GLhalfARB *dst = (GLhalfARB *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = _mesa_float_to_half((GLfloat) source[i]);
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap2( (GLushort *) dst, n );
- }
- }
- break;
- default:
- _mesa_problem(ctx, "bad type in _mesa_pack_index_span");
- }
-}
-
-
-/*
- * Unpack a row of stencil data from a client buffer according to
- * the pixel unpacking parameters.
- * This is (or will be) used by glDrawPixels
- *
- * Args: ctx - the context
- * n - number of pixels
- * dstType - destination data type
- * dest - destination array
- * srcType - source pixel type
- * source - source data pointer
- * srcPacking - pixel unpacking parameters
- * transferOps - apply offset/bias/lookup ops?
- */
-void
-_mesa_unpack_stencil_span( const GLcontext *ctx, GLuint n,
- GLenum dstType, GLvoid *dest,
- GLenum srcType, const GLvoid *source,
- const struct gl_pixelstore_attrib *srcPacking,
- GLbitfield transferOps )
-{
- ASSERT(srcType == GL_BITMAP ||
- srcType == GL_UNSIGNED_BYTE ||
- srcType == GL_BYTE ||
- srcType == GL_UNSIGNED_SHORT ||
- srcType == GL_SHORT ||
- srcType == GL_UNSIGNED_INT ||
- srcType == GL_INT ||
- srcType == GL_UNSIGNED_INT_24_8_EXT ||
- srcType == GL_HALF_FLOAT_ARB ||
- srcType == GL_FLOAT);
-
- ASSERT(dstType == GL_UNSIGNED_BYTE ||
- dstType == GL_UNSIGNED_SHORT ||
- dstType == GL_UNSIGNED_INT);
-
- /* only shift and offset apply to stencil */
- transferOps &= IMAGE_SHIFT_OFFSET_BIT;
-
- /*
- * Try simple cases first
- */
- if (transferOps == 0 &&
- !ctx->Pixel.MapStencilFlag &&
- srcType == GL_UNSIGNED_BYTE &&
- dstType == GL_UNSIGNED_BYTE) {
- memcpy(dest, source, n * sizeof(GLubyte));
- }
- else if (transferOps == 0 &&
- !ctx->Pixel.MapStencilFlag &&
- srcType == GL_UNSIGNED_INT &&
- dstType == GL_UNSIGNED_INT &&
- !srcPacking->SwapBytes) {
- memcpy(dest, source, n * sizeof(GLuint));
- }
- else {
- /*
- * general solution
- */
- GLuint indexes[MAX_WIDTH];
- assert(n <= MAX_WIDTH);
-
- extract_uint_indexes(n, indexes, GL_STENCIL_INDEX, srcType, source,
- srcPacking);
-
- if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
- /* shift and offset indexes */
- shift_and_offset_ci(ctx, n, indexes);
- }
-
- if (ctx->Pixel.MapStencilFlag) {
- /* Apply stencil lookup table */
- const GLuint mask = ctx->PixelMaps.StoS.Size - 1;
- GLuint i;
- for (i = 0; i < n; i++) {
- indexes[i] = (GLuint)ctx->PixelMaps.StoS.Map[ indexes[i] & mask ];
- }
- }
-
- /* convert to dest type */
- switch (dstType) {
- case GL_UNSIGNED_BYTE:
- {
- GLubyte *dst = (GLubyte *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = (GLubyte) (indexes[i] & 0xff);
- }
- }
- break;
- case GL_UNSIGNED_SHORT:
- {
- GLuint *dst = (GLuint *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = (GLushort) (indexes[i] & 0xffff);
- }
- }
- break;
- case GL_UNSIGNED_INT:
- memcpy(dest, indexes, n * sizeof(GLuint));
- break;
- default:
- _mesa_problem(ctx, "bad dstType in _mesa_unpack_stencil_span");
- }
- }
-}
-
-
-void
-_mesa_pack_stencil_span( const GLcontext *ctx, GLuint n,
- GLenum dstType, GLvoid *dest, const GLstencil *source,
- const struct gl_pixelstore_attrib *dstPacking )
-{
- GLstencil stencil[MAX_WIDTH];
-
- ASSERT(n <= MAX_WIDTH);
-
- if (ctx->Pixel.IndexShift || ctx->Pixel.IndexOffset ||
- ctx->Pixel.MapStencilFlag) {
- /* make a copy of input */
- memcpy(stencil, source, n * sizeof(GLstencil));
- _mesa_apply_stencil_transfer_ops(ctx, n, stencil);
- source = stencil;
- }
-
- switch (dstType) {
- case GL_UNSIGNED_BYTE:
- if (sizeof(GLstencil) == 1) {
- memcpy( dest, source, n );
- }
- else {
- GLubyte *dst = (GLubyte *) dest;
- GLuint i;
- for (i=0;i<n;i++) {
- dst[i] = (GLubyte) source[i];
- }
- }
- break;
- case GL_BYTE:
- {
- GLbyte *dst = (GLbyte *) dest;
- GLuint i;
- for (i=0;i<n;i++) {
- dst[i] = (GLbyte) (source[i] & 0x7f);
- }
- }
- break;
- case GL_UNSIGNED_SHORT:
- {
- GLushort *dst = (GLushort *) dest;
- GLuint i;
- for (i=0;i<n;i++) {
- dst[i] = (GLushort) source[i];
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap2( (GLushort *) dst, n );
- }
- }
- break;
- case GL_SHORT:
- {
- GLshort *dst = (GLshort *) dest;
- GLuint i;
- for (i=0;i<n;i++) {
- dst[i] = (GLshort) source[i];
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap2( (GLushort *) dst, n );
- }
- }
- break;
- case GL_UNSIGNED_INT:
- {
- GLuint *dst = (GLuint *) dest;
- GLuint i;
- for (i=0;i<n;i++) {
- dst[i] = (GLuint) source[i];
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap4( (GLuint *) dst, n );
- }
- }
- break;
- case GL_INT:
- {
- GLint *dst = (GLint *) dest;
- GLuint i;
- for (i=0;i<n;i++) {
- dst[i] = (GLint) source[i];
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap4( (GLuint *) dst, n );
- }
- }
- break;
- case GL_FLOAT:
- {
- GLfloat *dst = (GLfloat *) dest;
- GLuint i;
- for (i=0;i<n;i++) {
- dst[i] = (GLfloat) source[i];
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap4( (GLuint *) dst, n );
- }
- }
- break;
- case GL_HALF_FLOAT_ARB:
- {
- GLhalfARB *dst = (GLhalfARB *) dest;
- GLuint i;
- for (i=0;i<n;i++) {
- dst[i] = _mesa_float_to_half( (float) source[i] );
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap2( (GLushort *) dst, n );
- }
- }
- break;
- case GL_BITMAP:
- if (dstPacking->LsbFirst) {
- GLubyte *dst = (GLubyte *) dest;
- GLint shift = 0;
- GLuint i;
- for (i = 0; i < n; i++) {
- if (shift == 0)
- *dst = 0;
- *dst |= ((source[i] != 0) << shift);
- shift++;
- if (shift == 8) {
- shift = 0;
- dst++;
- }
- }
- }
- else {
- GLubyte *dst = (GLubyte *) dest;
- GLint shift = 7;
- GLuint i;
- for (i = 0; i < n; i++) {
- if (shift == 7)
- *dst = 0;
- *dst |= ((source[i] != 0) << shift);
- shift--;
- if (shift < 0) {
- shift = 7;
- dst++;
- }
- }
- }
- break;
- default:
- _mesa_problem(ctx, "bad type in _mesa_pack_index_span");
- }
-}
-
-#define DEPTH_VALUES(GLTYPE, GLTYPE2FLOAT) \
- do { \
- GLuint i; \
- const GLTYPE *src = (const GLTYPE *)source; \
- for (i = 0; i < n; i++) { \
- GLTYPE value = src[i]; \
- if (srcPacking->SwapBytes) { \
- if (sizeof(GLTYPE) == 2) { \
- SWAP2BYTE(value); \
- } else if (sizeof(GLTYPE) == 4) { \
- SWAP4BYTE(value); \
- } \
- } \
- depthValues[i] = GLTYPE2FLOAT(value); \
- } \
- } while (0)
-
-
-/**
- * Unpack a row of depth/z values from memory, returning GLushort, GLuint
- * or GLfloat values.
- * The glPixelTransfer (scale/bias) params will be applied.
- *
- * \param dstType one of GL_UNSIGNED_SHORT, GL_UNSIGNED_INT, GL_FLOAT
- * \param depthMax max value for returned GLushort or GLuint values
- * (ignored for GLfloat).
- */
-void
-_mesa_unpack_depth_span( const GLcontext *ctx, GLuint n,
- GLenum dstType, GLvoid *dest, GLuint depthMax,
- GLenum srcType, const GLvoid *source,
- const struct gl_pixelstore_attrib *srcPacking )
-{
- GLfloat depthTemp[MAX_WIDTH], *depthValues;
- GLboolean needClamp = GL_FALSE;
-
- /* Look for special cases first.
- * Not only are these faster, they're less prone to numeric conversion
- * problems. Otherwise, converting from an int type to a float then
- * back to an int type can introduce errors that will show up as
- * artifacts in things like depth peeling which uses glCopyTexImage.
- */
- if (ctx->Pixel.DepthScale == 1.0 && ctx->Pixel.DepthBias == 0.0) {
- if (srcType == GL_UNSIGNED_INT && dstType == GL_UNSIGNED_SHORT) {
- const GLuint *src = (const GLuint *) source;
- GLushort *dst = (GLushort *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = src[i] >> 16;
- }
- return;
- }
- if (srcType == GL_UNSIGNED_SHORT
- && dstType == GL_UNSIGNED_INT
- && depthMax == 0xffffffff) {
- const GLushort *src = (const GLushort *) source;
- GLuint *dst = (GLuint *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = src[i] | (src[i] << 16);
- }
- return;
- }
- if (srcType == GL_UNSIGNED_INT_24_8
- && dstType == GL_UNSIGNED_INT
- && depthMax == 0xffffff) {
- const GLuint *src = (const GLuint *) source;
- GLuint *dst = (GLuint *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = src[i] >> 8;
- }
- return;
- }
- /* XXX may want to add additional cases here someday */
- }
-
- /* general case path follows */
-
- if (dstType == GL_FLOAT) {
- depthValues = (GLfloat *) dest;
- }
- else {
- depthValues = depthTemp;
- }
-
- /* Convert incoming values to GLfloat. Some conversions will require
- * clamping, below.
- */
- switch (srcType) {
- case GL_BYTE:
- DEPTH_VALUES(GLbyte, BYTE_TO_FLOAT);
- needClamp = GL_TRUE;
- break;
- case GL_UNSIGNED_BYTE:
- DEPTH_VALUES(GLubyte, UBYTE_TO_FLOAT);
- break;
- case GL_SHORT:
- DEPTH_VALUES(GLshort, SHORT_TO_FLOAT);
- needClamp = GL_TRUE;
- break;
- case GL_UNSIGNED_SHORT:
- DEPTH_VALUES(GLushort, USHORT_TO_FLOAT);
- break;
- case GL_INT:
- DEPTH_VALUES(GLint, INT_TO_FLOAT);
- needClamp = GL_TRUE;
- break;
- case GL_UNSIGNED_INT:
- DEPTH_VALUES(GLuint, UINT_TO_FLOAT);
- break;
- case GL_UNSIGNED_INT_24_8_EXT: /* GL_EXT_packed_depth_stencil */
- if (dstType == GL_UNSIGNED_INT_24_8_EXT &&
- depthMax == 0xffffff &&
- ctx->Pixel.DepthScale == 1.0 &&
- ctx->Pixel.DepthBias == 0.0) {
- const GLuint *src = (const GLuint *) source;
- GLuint *zValues = (GLuint *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLuint value = src[i];
- if (srcPacking->SwapBytes) {
- SWAP4BYTE(value);
- }
- zValues[i] = value & 0xffffff00;
- }
- return;
- }
- else {
- const GLuint *src = (const GLuint *) source;
- const GLfloat scale = 1.0f / 0xffffff;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLuint value = src[i];
- if (srcPacking->SwapBytes) {
- SWAP4BYTE(value);
- }
- depthValues[i] = (value >> 8) * scale;
- }
- }
- break;
- case GL_FLOAT:
- DEPTH_VALUES(GLfloat, 1*);
- needClamp = GL_TRUE;
- break;
- case GL_HALF_FLOAT_ARB:
- {
- GLuint i;
- const GLhalfARB *src = (const GLhalfARB *) source;
- for (i = 0; i < n; i++) {
- GLhalfARB value = src[i];
- if (srcPacking->SwapBytes) {
- SWAP2BYTE(value);
- }
- depthValues[i] = _mesa_half_to_float(value);
- }
- needClamp = GL_TRUE;
- }
- break;
- default:
- _mesa_problem(NULL, "bad type in _mesa_unpack_depth_span()");
- return;
- }
-
- /* apply depth scale and bias */
- {
- const GLfloat scale = ctx->Pixel.DepthScale;
- const GLfloat bias = ctx->Pixel.DepthBias;
- if (scale != 1.0 || bias != 0.0) {
- GLuint i;
- for (i = 0; i < n; i++) {
- depthValues[i] = depthValues[i] * scale + bias;
- }
- needClamp = GL_TRUE;
- }
- }
-
- /* clamp to [0, 1] */
- if (needClamp) {
- GLuint i;
- for (i = 0; i < n; i++) {
- depthValues[i] = (GLfloat)CLAMP(depthValues[i], 0.0, 1.0);
- }
- }
-
- /*
- * Convert values to dstType
- */
- if (dstType == GL_UNSIGNED_INT) {
- GLuint *zValues = (GLuint *) dest;
- GLuint i;
- if (depthMax <= 0xffffff) {
- /* no overflow worries */
- for (i = 0; i < n; i++) {
- zValues[i] = (GLuint) (depthValues[i] * (GLfloat) depthMax);
- }
- }
- else {
- /* need to use double precision to prevent overflow problems */
- for (i = 0; i < n; i++) {
- GLdouble z = depthValues[i] * (GLfloat) depthMax;
- if (z >= (GLdouble) 0xffffffff)
- zValues[i] = 0xffffffff;
- else
- zValues[i] = (GLuint) z;
- }
- }
- }
- else if (dstType == GL_UNSIGNED_SHORT) {
- GLushort *zValues = (GLushort *) dest;
- GLuint i;
- ASSERT(depthMax <= 0xffff);
- for (i = 0; i < n; i++) {
- zValues[i] = (GLushort) (depthValues[i] * (GLfloat) depthMax);
- }
- }
- else {
- ASSERT(dstType == GL_FLOAT);
- /*ASSERT(depthMax == 1.0F);*/
- }
-}
-
-
-/*
- * Pack an array of depth values. The values are floats in [0,1].
- */
-void
-_mesa_pack_depth_span( const GLcontext *ctx, GLuint n, GLvoid *dest,
- GLenum dstType, const GLfloat *depthSpan,
- const struct gl_pixelstore_attrib *dstPacking )
-{
- GLfloat depthCopy[MAX_WIDTH];
-
- ASSERT(n <= MAX_WIDTH);
-
- if (ctx->Pixel.DepthScale != 1.0 || ctx->Pixel.DepthBias != 0.0) {
- memcpy(depthCopy, depthSpan, n * sizeof(GLfloat));
- _mesa_scale_and_bias_depth(ctx, n, depthCopy);
- depthSpan = depthCopy;
- }
-
- switch (dstType) {
- case GL_UNSIGNED_BYTE:
- {
- GLubyte *dst = (GLubyte *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = FLOAT_TO_UBYTE( depthSpan[i] );
- }
- }
- break;
- case GL_BYTE:
- {
- GLbyte *dst = (GLbyte *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = FLOAT_TO_BYTE( depthSpan[i] );
- }
- }
- break;
- case GL_UNSIGNED_SHORT:
- {
- GLushort *dst = (GLushort *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- CLAMPED_FLOAT_TO_USHORT(dst[i], depthSpan[i]);
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap2( (GLushort *) dst, n );
- }
- }
- break;
- case GL_SHORT:
- {
- GLshort *dst = (GLshort *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = FLOAT_TO_SHORT( depthSpan[i] );
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap2( (GLushort *) dst, n );
- }
- }
- break;
- case GL_UNSIGNED_INT:
- {
- GLuint *dst = (GLuint *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = FLOAT_TO_UINT( depthSpan[i] );
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap4( (GLuint *) dst, n );
- }
- }
- break;
- case GL_INT:
- {
- GLint *dst = (GLint *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = FLOAT_TO_INT( depthSpan[i] );
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap4( (GLuint *) dst, n );
- }
- }
- break;
- case GL_FLOAT:
- {
- GLfloat *dst = (GLfloat *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = depthSpan[i];
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap4( (GLuint *) dst, n );
- }
- }
- break;
- case GL_HALF_FLOAT_ARB:
- {
- GLhalfARB *dst = (GLhalfARB *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = _mesa_float_to_half(depthSpan[i]);
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap2( (GLushort *) dst, n );
- }
- }
- break;
- default:
- _mesa_problem(ctx, "bad type in _mesa_pack_depth_span");
- }
-}
-
-
-
-/**
- * Pack depth and stencil values as GL_DEPTH_STENCIL/GL_UNSIGNED_INT_24_8.
- */
-void
-_mesa_pack_depth_stencil_span(const GLcontext *ctx, GLuint n, GLuint *dest,
- const GLfloat *depthVals,
- const GLstencil *stencilVals,
- const struct gl_pixelstore_attrib *dstPacking)
-{
- GLfloat depthCopy[MAX_WIDTH];
- GLstencil stencilCopy[MAX_WIDTH];
- GLuint i;
-
- ASSERT(n <= MAX_WIDTH);
-
- if (ctx->Pixel.DepthScale != 1.0 || ctx->Pixel.DepthBias != 0.0) {
- memcpy(depthCopy, depthVals, n * sizeof(GLfloat));
- _mesa_scale_and_bias_depth(ctx, n, depthCopy);
- depthVals = depthCopy;
- }
-
- if (ctx->Pixel.IndexShift ||
- ctx->Pixel.IndexOffset ||
- ctx->Pixel.MapStencilFlag) {
- memcpy(stencilCopy, stencilVals, n * sizeof(GLstencil));
- _mesa_apply_stencil_transfer_ops(ctx, n, stencilCopy);
- stencilVals = stencilCopy;
- }
-
- for (i = 0; i < n; i++) {
- GLuint z = (GLuint) (depthVals[i] * 0xffffff);
- dest[i] = (z << 8) | (stencilVals[i] & 0xff);
- }
-
- if (dstPacking->SwapBytes) {
- _mesa_swap4(dest, n);
- }
-}
-
-
-
-
-/**
- * Unpack image data. Apply byte swapping, byte flipping (bitmap).
- * Return all image data in a contiguous block. This is used when we
- * compile glDrawPixels, glTexImage, etc into a display list. We
- * need a copy of the data in a standard format.
- */
-void *
-_mesa_unpack_image( GLuint dimensions,
- GLsizei width, GLsizei height, GLsizei depth,
- GLenum format, GLenum type, const GLvoid *pixels,
- const struct gl_pixelstore_attrib *unpack )
-{
- GLint bytesPerRow, compsPerRow;
- GLboolean flipBytes, swap2, swap4;
-
- if (!pixels)
- return NULL; /* not necessarily an error */
-
- if (width <= 0 || height <= 0 || depth <= 0)
- return NULL; /* generate error later */
-
- if (type == GL_BITMAP) {
- bytesPerRow = (width + 7) >> 3;
- flipBytes = unpack->LsbFirst;
- swap2 = swap4 = GL_FALSE;
- compsPerRow = 0;
- }
- else {
- const GLint bytesPerPixel = _mesa_bytes_per_pixel(format, type);
- GLint components = _mesa_components_in_format(format);
- GLint bytesPerComp;
-
- if (_mesa_type_is_packed(type))
- components = 1;
-
- if (bytesPerPixel <= 0 || components <= 0)
- return NULL; /* bad format or type. generate error later */
- bytesPerRow = bytesPerPixel * width;
- bytesPerComp = bytesPerPixel / components;
- flipBytes = GL_FALSE;
- swap2 = (bytesPerComp == 2) && unpack->SwapBytes;
- swap4 = (bytesPerComp == 4) && unpack->SwapBytes;
- compsPerRow = components * width;
- assert(compsPerRow >= width);
- }
-
- {
- GLubyte *destBuffer
- = (GLubyte *) malloc(bytesPerRow * height * depth);
- GLubyte *dst;
- GLint img, row;
- if (!destBuffer)
- return NULL; /* generate GL_OUT_OF_MEMORY later */
-
- dst = destBuffer;
- for (img = 0; img < depth; img++) {
- for (row = 0; row < height; row++) {
- const GLvoid *src = _mesa_image_address(dimensions, unpack, pixels,
- width, height, format, type, img, row, 0);
-
- if ((type == GL_BITMAP) && (unpack->SkipPixels & 0x7)) {
- GLint i;
- flipBytes = GL_FALSE;
- if (unpack->LsbFirst) {
- GLubyte srcMask = 1 << (unpack->SkipPixels & 0x7);
- GLubyte dstMask = 128;
- const GLubyte *s = src;
- GLubyte *d = dst;
- *d = 0;
- for (i = 0; i < width; i++) {
- if (*s & srcMask) {
- *d |= dstMask;
- }
- if (srcMask == 128) {
- srcMask = 1;
- s++;
- }
- else {
- srcMask = srcMask << 1;
- }
- if (dstMask == 1) {
- dstMask = 128;
- d++;
- *d = 0;
- }
- else {
- dstMask = dstMask >> 1;
- }
- }
- }
- else {
- GLubyte srcMask = 128 >> (unpack->SkipPixels & 0x7);
- GLubyte dstMask = 128;
- const GLubyte *s = src;
- GLubyte *d = dst;
- *d = 0;
- for (i = 0; i < width; i++) {
- if (*s & srcMask) {
- *d |= dstMask;
- }
- if (srcMask == 1) {
- srcMask = 128;
- s++;
- }
- else {
- srcMask = srcMask >> 1;
- }
- if (dstMask == 1) {
- dstMask = 128;
- d++;
- *d = 0;
- }
- else {
- dstMask = dstMask >> 1;
- }
- }
- }
- }
- else {
- memcpy(dst, src, bytesPerRow);
- }
-
- /* byte flipping/swapping */
- if (flipBytes) {
- flip_bytes((GLubyte *) dst, bytesPerRow);
- }
- else if (swap2) {
- _mesa_swap2((GLushort*) dst, compsPerRow);
- }
- else if (swap4) {
- _mesa_swap4((GLuint*) dst, compsPerRow);
- }
- dst += bytesPerRow;
- }
- }
- return destBuffer;
- }
-}
-
-#endif /* _HAVE_FULL_GL */
-
/**
@@ -5673,12 +1442,12 @@ _mesa_convert_colors(GLenum srcType, const GLvoid *src,
* GL_FALSE if image was completely clipped away (draw nothing)
*/
GLboolean
-_mesa_clip_drawpixels(const GLcontext *ctx,
+_mesa_clip_drawpixels(const struct gl_context *ctx,
GLint *destX, GLint *destY,
GLsizei *width, GLsizei *height,
struct gl_pixelstore_attrib *unpack)
{
- const GLframebuffer *buffer = ctx->DrawBuffer;
+ const struct gl_framebuffer *buffer = ctx->DrawBuffer;
if (unpack->RowLength == 0) {
unpack->RowLength = *width;
@@ -5744,12 +1513,12 @@ _mesa_clip_drawpixels(const GLcontext *ctx,
* GL_FALSE if image was completely clipped away (draw nothing)
*/
GLboolean
-_mesa_clip_readpixels(const GLcontext *ctx,
+_mesa_clip_readpixels(const struct gl_context *ctx,
GLint *srcX, GLint *srcY,
GLsizei *width, GLsizei *height,
struct gl_pixelstore_attrib *pack)
{
- const GLframebuffer *buffer = ctx->ReadBuffer;
+ const struct gl_framebuffer *buffer = ctx->ReadBuffer;
if (pack->RowLength == 0) {
pack->RowLength = *width;
@@ -5794,7 +1563,7 @@ _mesa_clip_readpixels(const GLcontext *ctx,
* \return GL_FALSE if region is totally clipped, GL_TRUE otherwise.
*/
GLboolean
-_mesa_clip_copytexsubimage(const GLcontext *ctx,
+_mesa_clip_copytexsubimage(const struct gl_context *ctx,
GLint *destX, GLint *destY,
GLint *srcX, GLint *srcY,
GLsizei *width, GLsizei *height)
@@ -5937,7 +1706,7 @@ clip_left_or_bottom(GLint *srcX0, GLint *srcX1,
* \return GL_TRUE if anything is left to draw, GL_FALSE if totally clipped
*/
GLboolean
-_mesa_clip_blit(GLcontext *ctx,
+_mesa_clip_blit(struct gl_context *ctx,
GLint *srcX0, GLint *srcY0, GLint *srcX1, GLint *srcY1,
GLint *dstX0, GLint *dstY0, GLint *dstX1, GLint *dstY1)
{
diff --git a/src/mesa/main/image.h b/src/mesa/main/image.h
index 672dbf2823e..b40717223e1 100644
--- a/src/mesa/main/image.h
+++ b/src/mesa/main/image.h
@@ -52,7 +52,7 @@ extern GLint
_mesa_bytes_per_pixel( GLenum format, GLenum type );
extern GLboolean
-_mesa_is_legal_format_and_type( GLcontext *ctx, GLenum format, GLenum type );
+_mesa_is_legal_format_and_type( struct gl_context *ctx, GLenum format, GLenum type );
extern GLboolean
_mesa_is_color_format(GLenum format);
@@ -82,7 +82,7 @@ extern GLboolean
_mesa_is_integer_format(GLenum format);
extern GLboolean
-_mesa_is_compressed_format(GLcontext *ctx, GLenum format);
+_mesa_is_compressed_format(struct gl_context *ctx, GLenum format);
extern GLvoid *
_mesa_image_address( GLuint dimensions,
@@ -124,23 +124,6 @@ _mesa_image_image_stride( const struct gl_pixelstore_attrib *packing,
GLint width, GLint height,
GLenum format, GLenum type );
-extern void
-_mesa_unpack_polygon_stipple( const GLubyte *pattern, GLuint dest[32],
- const struct gl_pixelstore_attrib *unpacking );
-
-
-extern void
-_mesa_pack_polygon_stipple( const GLuint pattern[32], GLubyte *dest,
- const struct gl_pixelstore_attrib *packing );
-
-
-extern GLvoid *
-_mesa_unpack_bitmap( GLint width, GLint height, const GLubyte *pixels,
- const struct gl_pixelstore_attrib *packing );
-
-extern void
-_mesa_pack_bitmap( GLint width, GLint height, const GLubyte *source,
- GLubyte *dest, const struct gl_pixelstore_attrib *packing );
extern void
_mesa_expand_bitmap(GLsizei width, GLsizei height,
@@ -150,147 +133,6 @@ _mesa_expand_bitmap(GLsizei width, GLsizei height,
GLubyte onValue);
-/** \name Pixel processing functions */
-/*@{*/
-
-extern void
-_mesa_scale_and_bias_rgba(GLuint n, GLfloat rgba[][4],
- GLfloat rScale, GLfloat gScale,
- GLfloat bScale, GLfloat aScale,
- GLfloat rBias, GLfloat gBias,
- GLfloat bBias, GLfloat aBias);
-
-extern void
-_mesa_map_rgba(const GLcontext *ctx, GLuint n, GLfloat rgba[][4]);
-
-extern void
-_mesa_lookup_rgba_float(const struct gl_color_table *table,
- GLuint n, GLfloat rgba[][4]);
-
-extern void
-_mesa_lookup_rgba_ubyte(const struct gl_color_table *table,
- GLuint n, GLubyte rgba[][4]);
-
-
-extern void
-_mesa_map_ci_to_rgba(const GLcontext *ctx,
- GLuint n, const GLuint index[], GLfloat rgba[][4]);
-
-
-extern void
-_mesa_map_ci8_to_rgba8(const GLcontext *ctx, GLuint n, const GLubyte index[],
- GLubyte rgba[][4]);
-
-
-extern void
-_mesa_scale_and_bias_depth(const GLcontext *ctx, GLuint n,
- GLfloat depthValues[]);
-
-extern void
-_mesa_scale_and_bias_depth_uint(const GLcontext *ctx, GLuint n,
- GLuint depthValues[]);
-
-extern void
-_mesa_apply_rgba_transfer_ops(GLcontext *ctx, GLbitfield transferOps,
- GLuint n, GLfloat rgba[][4]);
-
-
-extern void
-_mesa_apply_ci_transfer_ops(const GLcontext *ctx, GLbitfield transferOps,
- GLuint n, GLuint indexes[]);
-
-
-extern void
-_mesa_apply_stencil_transfer_ops(const GLcontext *ctx, GLuint n,
- GLstencil stencil[]);
-
-
-extern void
-_mesa_pack_rgba_span_float( GLcontext *ctx, GLuint n, GLfloat rgba[][4],
- GLenum dstFormat, GLenum dstType, GLvoid *dstAddr,
- const struct gl_pixelstore_attrib *dstPacking,
- GLbitfield transferOps );
-
-
-extern void
-_mesa_unpack_color_span_chan( GLcontext *ctx,
- GLuint n, GLenum dstFormat, GLchan dest[],
- GLenum srcFormat, GLenum srcType,
- const GLvoid *source,
- const struct gl_pixelstore_attrib *srcPacking,
- GLbitfield transferOps );
-
-
-extern void
-_mesa_unpack_color_span_float( GLcontext *ctx,
- GLuint n, GLenum dstFormat, GLfloat dest[],
- GLenum srcFormat, GLenum srcType,
- const GLvoid *source,
- const struct gl_pixelstore_attrib *srcPacking,
- GLbitfield transferOps );
-
-extern void
-_mesa_unpack_dudv_span_byte( GLcontext *ctx,
- GLuint n, GLenum dstFormat, GLbyte dest[],
- GLenum srcFormat, GLenum srcType,
- const GLvoid *source,
- const struct gl_pixelstore_attrib *srcPacking,
- GLbitfield transferOps );
-
-extern void
-_mesa_unpack_index_span( const GLcontext *ctx, GLuint n,
- GLenum dstType, GLvoid *dest,
- GLenum srcType, const GLvoid *source,
- const struct gl_pixelstore_attrib *srcPacking,
- GLbitfield transferOps );
-
-
-extern void
-_mesa_pack_index_span( const GLcontext *ctx, GLuint n,
- GLenum dstType, GLvoid *dest, const GLuint *source,
- const struct gl_pixelstore_attrib *dstPacking,
- GLbitfield transferOps );
-
-
-extern void
-_mesa_unpack_stencil_span( const GLcontext *ctx, GLuint n,
- GLenum dstType, GLvoid *dest,
- GLenum srcType, const GLvoid *source,
- const struct gl_pixelstore_attrib *srcPacking,
- GLbitfield transferOps );
-
-extern void
-_mesa_pack_stencil_span( const GLcontext *ctx, GLuint n,
- GLenum dstType, GLvoid *dest, const GLstencil *source,
- const struct gl_pixelstore_attrib *dstPacking );
-
-
-extern void
-_mesa_unpack_depth_span( const GLcontext *ctx, GLuint n,
- GLenum dstType, GLvoid *dest, GLuint depthMax,
- GLenum srcType, const GLvoid *source,
- const struct gl_pixelstore_attrib *srcPacking );
-
-extern void
-_mesa_pack_depth_span( const GLcontext *ctx, GLuint n, GLvoid *dest,
- GLenum dstType, const GLfloat *depthSpan,
- const struct gl_pixelstore_attrib *dstPacking );
-
-
-extern void
-_mesa_pack_depth_stencil_span(const GLcontext *ctx, GLuint n, GLuint *dest,
- const GLfloat *depthVals,
- const GLstencil *stencilVals,
- const struct gl_pixelstore_attrib *dstPacking);
-
-
-extern void *
-_mesa_unpack_image( GLuint dimensions,
- GLsizei width, GLsizei height, GLsizei depth,
- GLenum format, GLenum type, const GLvoid *pixels,
- const struct gl_pixelstore_attrib *unpack );
-
-
extern void
_mesa_convert_colors(GLenum srcType, const GLvoid *src,
GLenum dstType, GLvoid *dst,
@@ -298,20 +140,20 @@ _mesa_convert_colors(GLenum srcType, const GLvoid *src,
extern GLboolean
-_mesa_clip_drawpixels(const GLcontext *ctx,
+_mesa_clip_drawpixels(const struct gl_context *ctx,
GLint *destX, GLint *destY,
GLsizei *width, GLsizei *height,
struct gl_pixelstore_attrib *unpack);
extern GLboolean
-_mesa_clip_readpixels(const GLcontext *ctx,
+_mesa_clip_readpixels(const struct gl_context *ctx,
GLint *srcX, GLint *srcY,
GLsizei *width, GLsizei *height,
struct gl_pixelstore_attrib *pack);
extern GLboolean
-_mesa_clip_copytexsubimage(const GLcontext *ctx,
+_mesa_clip_copytexsubimage(const struct gl_context *ctx,
GLint *destX, GLint *destY,
GLint *srcX, GLint *srcY,
GLsizei *width, GLsizei *height);
@@ -323,7 +165,7 @@ _mesa_clip_to_region(GLint xmin, GLint ymin,
GLsizei *width, GLsizei *height );
extern GLboolean
-_mesa_clip_blit(GLcontext *ctx,
+_mesa_clip_blit(struct gl_context *ctx,
GLint *srcX0, GLint *srcY0, GLint *srcX1, GLint *srcY1,
GLint *dstX0, GLint *dstY0, GLint *dstX1, GLint *dstY1);
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index 46e5c932d0f..bcca4edc1aa 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -882,7 +882,7 @@ error_string( GLenum error )
* previous errors which were accumulated.
*/
static void
-flush_delayed_errors( GLcontext *ctx )
+flush_delayed_errors( struct gl_context *ctx )
{
char s[MAXSTRING];
@@ -906,7 +906,7 @@ flush_delayed_errors( GLcontext *ctx )
* \param fmtString printf()-like format string.
*/
void
-_mesa_warning( GLcontext *ctx, const char *fmtString, ... )
+_mesa_warning( struct gl_context *ctx, const char *fmtString, ... )
{
char str[MAXSTRING];
va_list args;
@@ -929,7 +929,7 @@ _mesa_warning( GLcontext *ctx, const char *fmtString, ... )
* \param fmtString problem description string.
*/
void
-_mesa_problem( const GLcontext *ctx, const char *fmtString, ... )
+_mesa_problem( const struct gl_context *ctx, const char *fmtString, ... )
{
va_list args;
char str[MAXSTRING];
@@ -957,7 +957,7 @@ _mesa_problem( const GLcontext *ctx, const char *fmtString, ... )
* \param fmtString printf() style format string, followed by optional args
*/
void
-_mesa_error( GLcontext *ctx, GLenum error, const char *fmtString, ... )
+_mesa_error( struct gl_context *ctx, GLenum error, const char *fmtString, ... )
{
static GLint debug = -1;
@@ -1014,7 +1014,7 @@ _mesa_error( GLcontext *ctx, GLenum error, const char *fmtString, ... )
* \param fmtString printf()-style format string, followed by optional args.
*/
void
-_mesa_debug( const GLcontext *ctx, const char *fmtString, ... )
+_mesa_debug( const struct gl_context *ctx, const char *fmtString, ... )
{
#ifdef DEBUG
char s[MAXSTRING];
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index 751f2065011..30fc152389d 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -568,17 +568,19 @@ _mesa_str_checksum(const char *str);
extern int
_mesa_snprintf( char *str, size_t size, const char *fmt, ... ) PRINTFLIKE(3, 4);
+struct gl_context;
+
extern void
-_mesa_warning( __GLcontext *gc, const char *fmtString, ... ) PRINTFLIKE(2, 3);
+_mesa_warning( struct gl_context *gc, const char *fmtString, ... ) PRINTFLIKE(2, 3);
extern void
-_mesa_problem( const __GLcontext *ctx, const char *fmtString, ... ) PRINTFLIKE(2, 3);
+_mesa_problem( const struct gl_context *ctx, const char *fmtString, ... ) PRINTFLIKE(2, 3);
extern void
-_mesa_error( __GLcontext *ctx, GLenum error, const char *fmtString, ... ) PRINTFLIKE(3, 4);
+_mesa_error( struct gl_context *ctx, GLenum error, const char *fmtString, ... ) PRINTFLIKE(3, 4);
extern void
-_mesa_debug( const __GLcontext *ctx, const char *fmtString, ... ) PRINTFLIKE(2, 3);
+_mesa_debug( const struct gl_context *ctx, const char *fmtString, ... ) PRINTFLIKE(2, 3);
#if defined(_MSC_VER) && !defined(snprintf)
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c
index 43ae28c25ab..c27cf1dd38b 100644
--- a/src/mesa/main/light.c
+++ b/src/mesa/main/light.c
@@ -103,7 +103,7 @@ _mesa_ProvokingVertexEXT(GLenum mode)
* Also, all error checking should have already been done.
*/
void
-_mesa_light(GLcontext *ctx, GLuint lnum, GLenum pname, const GLfloat *params)
+_mesa_light(struct gl_context *ctx, GLuint lnum, GLenum pname, const GLfloat *params)
{
struct gl_light *light;
@@ -569,7 +569,7 @@ _mesa_LightModelf( GLenum pname, GLfloat param )
* of the targeted material values.
*/
GLuint
-_mesa_material_bitmask( GLcontext *ctx, GLenum face, GLenum pname,
+_mesa_material_bitmask( struct gl_context *ctx, GLenum face, GLenum pname,
GLuint legal, const char *where )
{
GLuint bitmask = 0;
@@ -643,7 +643,7 @@ _mesa_copy_materials( struct gl_material *dst,
/* Update derived values following a change in ctx->Light.Material
*/
void
-_mesa_update_material( GLcontext *ctx, GLuint bitmask )
+_mesa_update_material( struct gl_context *ctx, GLuint bitmask )
{
struct gl_light *light, *list = &ctx->Light.EnabledList;
GLfloat (*mat)[4] = ctx->Light.Material.Attrib;
@@ -728,7 +728,7 @@ _mesa_update_material( GLcontext *ctx, GLuint bitmask )
* set by glColorMaterial().
*/
void
-_mesa_update_color_material( GLcontext *ctx, const GLfloat color[4] )
+_mesa_update_color_material( struct gl_context *ctx, const GLfloat color[4] )
{
GLuint bitmask = ctx->Light.ColorMaterialBitmask;
struct gl_material *mat = &ctx->Light.Material;
@@ -972,7 +972,7 @@ validate_spot_exp_table( struct gl_light *l )
* by keeping a MRU cache of shine tables for various shine values.
*/
void
-_mesa_invalidate_shine_table( GLcontext *ctx, GLuint side )
+_mesa_invalidate_shine_table( struct gl_context *ctx, GLuint side )
{
ASSERT(side < 2);
if (ctx->_ShineTable[side])
@@ -982,7 +982,7 @@ _mesa_invalidate_shine_table( GLcontext *ctx, GLuint side )
static void
-validate_shine_table( GLcontext *ctx, GLuint side, GLfloat shininess )
+validate_shine_table( struct gl_context *ctx, GLuint side, GLfloat shininess )
{
struct gl_shine_tab *list = ctx->_ShineTabList;
struct gl_shine_tab *s;
@@ -1034,7 +1034,7 @@ validate_shine_table( GLcontext *ctx, GLuint side, GLfloat shininess )
void
-_mesa_validate_all_lighting_tables( GLcontext *ctx )
+_mesa_validate_all_lighting_tables( struct gl_context *ctx )
{
GLuint i;
GLfloat shininess;
@@ -1060,7 +1060,7 @@ _mesa_validate_all_lighting_tables( GLcontext *ctx )
* source and material ambient, diffuse and specular coefficients.
*/
void
-_mesa_update_lighting( GLcontext *ctx )
+_mesa_update_lighting( struct gl_context *ctx )
{
struct gl_light *light;
ctx->Light._NeedEyeCoords = GL_FALSE;
@@ -1123,7 +1123,7 @@ _mesa_update_lighting( GLcontext *ctx )
* Also update on lighting space changes.
*/
static void
-compute_light_positions( GLcontext *ctx )
+compute_light_positions( struct gl_context *ctx )
{
struct gl_light *light;
static const GLfloat eye_z[3] = { 0, 0, 1 };
@@ -1210,7 +1210,7 @@ compute_light_positions( GLcontext *ctx )
static void
-update_modelview_scale( GLcontext *ctx )
+update_modelview_scale( struct gl_context *ctx )
{
ctx->_ModelViewInvScale = 1.0F;
if (!_math_matrix_is_length_preserving(ctx->ModelviewMatrixStack.Top)) {
@@ -1229,7 +1229,7 @@ update_modelview_scale( GLcontext *ctx )
* Bring up to date any state that relies on _NeedEyeCoords.
*/
void
-_mesa_update_tnl_spaces( GLcontext *ctx, GLuint new_state )
+_mesa_update_tnl_spaces( struct gl_context *ctx, GLuint new_state )
{
const GLuint oldneedeyecoords = ctx->_NeedEyeCoords;
@@ -1278,7 +1278,7 @@ _mesa_update_tnl_spaces( GLcontext *ctx, GLuint new_state )
* light-in-modelspace optimization. It's also useful for debugging.
*/
void
-_mesa_allow_light_in_model( GLcontext *ctx, GLboolean flag )
+_mesa_allow_light_in_model( struct gl_context *ctx, GLboolean flag )
{
ctx->_ForceEyeCoords = !flag;
ctx->NewState |= _NEW_POINT; /* one of the bits from
@@ -1370,7 +1370,7 @@ init_material( struct gl_material *m )
* Initialize all lighting state for the given context.
*/
void
-_mesa_init_lighting( GLcontext *ctx )
+_mesa_init_lighting( struct gl_context *ctx )
{
GLuint i;
@@ -1418,7 +1418,7 @@ _mesa_init_lighting( GLcontext *ctx )
* Deallocate malloc'd lighting state attached to given context.
*/
void
-_mesa_free_lighting_data( GLcontext *ctx )
+_mesa_free_lighting_data( struct gl_context *ctx )
{
struct gl_shine_tab *s, *tmps;
diff --git a/src/mesa/main/light.h b/src/mesa/main/light.h
index b3436114d40..021f5ea1939 100644
--- a/src/mesa/main/light.h
+++ b/src/mesa/main/light.h
@@ -79,7 +79,7 @@ _mesa_GetMaterialiv( GLenum face, GLenum pname, GLint *params );
extern void
-_mesa_light(GLcontext *ctx, GLuint lnum, GLenum pname, const GLfloat *params);
+_mesa_light(struct gl_context *ctx, GLuint lnum, GLenum pname, const GLfloat *params);
/* Lerp between adjacent values in the f(x) lookup table, giving a
@@ -100,36 +100,36 @@ do { \
} while (0)
-extern GLuint _mesa_material_bitmask( GLcontext *ctx,
+extern GLuint _mesa_material_bitmask( struct gl_context *ctx,
GLenum face, GLenum pname,
GLuint legal,
const char * );
extern void _mesa_invalidate_spot_exp_table( struct gl_light *l );
-extern void _mesa_invalidate_shine_table( GLcontext *ctx, GLuint i );
+extern void _mesa_invalidate_shine_table( struct gl_context *ctx, GLuint i );
-extern void _mesa_validate_all_lighting_tables( GLcontext *ctx );
+extern void _mesa_validate_all_lighting_tables( struct gl_context *ctx );
-extern void _mesa_update_lighting( GLcontext *ctx );
+extern void _mesa_update_lighting( struct gl_context *ctx );
-extern void _mesa_update_tnl_spaces( GLcontext *ctx, GLuint new_state );
+extern void _mesa_update_tnl_spaces( struct gl_context *ctx, GLuint new_state );
-extern void _mesa_update_material( GLcontext *ctx,
+extern void _mesa_update_material( struct gl_context *ctx,
GLuint bitmask );
extern void _mesa_copy_materials( struct gl_material *dst,
const struct gl_material *src,
GLuint bitmask );
-extern void _mesa_update_color_material( GLcontext *ctx,
+extern void _mesa_update_color_material( struct gl_context *ctx,
const GLfloat rgba[4] );
-extern void _mesa_init_lighting( GLcontext *ctx );
+extern void _mesa_init_lighting( struct gl_context *ctx );
-extern void _mesa_free_lighting_data( GLcontext *ctx );
+extern void _mesa_free_lighting_data( struct gl_context *ctx );
-extern void _mesa_allow_light_in_model( GLcontext *ctx, GLboolean flag );
+extern void _mesa_allow_light_in_model( struct gl_context *ctx, GLboolean flag );
#else
#define _mesa_update_color_material( c, r ) ((void)0)
diff --git a/src/mesa/main/lines.c b/src/mesa/main/lines.c
index cc63a759ec0..505f840ba5a 100644
--- a/src/mesa/main/lines.c
+++ b/src/mesa/main/lines.c
@@ -102,11 +102,11 @@ _mesa_LineStipple( GLint factor, GLushort pattern )
*
* \param ctx GL context.
*
- * Initializes __GLcontextRec::Line and line related constants in
- * __GLcontextRec::Const.
+ * Initializes __struct gl_contextRec::Line and line related constants in
+ * __struct gl_contextRec::Const.
*/
void GLAPIENTRY
-_mesa_init_line( GLcontext * ctx )
+_mesa_init_line( struct gl_context * ctx )
{
ctx->Line.SmoothFlag = GL_FALSE;
ctx->Line.StippleFlag = GL_FALSE;
diff --git a/src/mesa/main/lines.h b/src/mesa/main/lines.h
index 5a47e9858d5..3accdd78004 100644
--- a/src/mesa/main/lines.h
+++ b/src/mesa/main/lines.h
@@ -43,6 +43,6 @@ extern void GLAPIENTRY
_mesa_LineStipple( GLint factor, GLushort pattern );
extern void GLAPIENTRY
-_mesa_init_line( GLcontext * ctx );
+_mesa_init_line( struct gl_context * ctx );
#endif
diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c
index 8ed718cd38e..105d4a327fb 100644
--- a/src/mesa/main/matrix.c
+++ b/src/mesa/main/matrix.c
@@ -59,7 +59,7 @@
*
* Flushes vertices and validates parameters. Calls _math_matrix_frustum() with
* the top matrix of the current matrix stack and sets
- * __GLcontextRec::NewState.
+ * __struct gl_contextRec::NewState.
*/
void GLAPIENTRY
_mesa_Frustum( GLdouble left, GLdouble right,
@@ -101,7 +101,7 @@ _mesa_Frustum( GLdouble left, GLdouble right,
*
* Flushes vertices and validates parameters. Calls _math_matrix_ortho() with
* the top matrix of the current matrix stack and sets
- * __GLcontextRec::NewState.
+ * __struct gl_contextRec::NewState.
*/
void GLAPIENTRY
_mesa_Ortho( GLdouble left, GLdouble right,
@@ -139,7 +139,7 @@ _mesa_Ortho( GLdouble left, GLdouble right,
* \sa glMatrixMode().
*
* Flushes the vertices, validates the parameter and updates
- * __GLcontextRec::CurrentStack and gl_transform_attrib::MatrixMode with the
+ * __struct gl_contextRec::CurrentStack and gl_transform_attrib::MatrixMode with the
* specified matrix stack.
*/
void GLAPIENTRY
@@ -231,7 +231,7 @@ _mesa_MatrixMode( GLenum mode )
* \sa glPushMatrix().
*
* Verifies the current matrix stack is not full, and duplicates the top-most
- * matrix in the stack. Marks __GLcontextRec::NewState with the stack dirty
+ * matrix in the stack. Marks __struct gl_contextRec::NewState with the stack dirty
* flag.
*/
void GLAPIENTRY
@@ -271,7 +271,7 @@ _mesa_PushMatrix( void )
* \sa glPopMatrix().
*
* Flushes the vertices, verifies the current matrix stack is not empty, and
- * moves the stack head down. Marks __GLcontextRec::NewState with the dirty
+ * moves the stack head down. Marks __struct gl_contextRec::NewState with the dirty
* stack flag.
*/
void GLAPIENTRY
@@ -309,7 +309,7 @@ _mesa_PopMatrix( void )
* \sa glLoadIdentity().
*
* Flushes the vertices and calls _math_matrix_set_identity() with the top-most
- * matrix in the current stack. Marks __GLcontextRec::NewState with the stack
+ * matrix in the current stack. Marks __struct gl_contextRec::NewState with the stack
* dirty flag.
*/
void GLAPIENTRY
@@ -334,7 +334,7 @@ _mesa_LoadIdentity( void )
* \sa glLoadMatrixf().
*
* Flushes the vertices and calls _math_matrix_loadf() with the top-most matrix
- * in the current stack and the given matrix. Marks __GLcontextRec::NewState
+ * in the current stack and the given matrix. Marks __struct gl_contextRec::NewState
* with the dirty stack flag.
*/
void GLAPIENTRY
@@ -365,7 +365,7 @@ _mesa_LoadMatrixf( const GLfloat *m )
*
* Flushes the vertices and calls _math_matrix_mul_floats() with the top-most
* matrix in the current stack and the given matrix. Marks
- * __GLcontextRec::NewState with the dirty stack flag.
+ * __struct gl_contextRec::NewState with the dirty stack flag.
*/
void GLAPIENTRY
_mesa_MultMatrixf( const GLfloat *m )
@@ -397,7 +397,7 @@ _mesa_MultMatrixf( const GLfloat *m )
*
* Flushes the vertices and calls _math_matrix_rotate() with the top-most
* matrix in the current stack and the given parameters. Marks
- * __GLcontextRec::NewState with the dirty stack flag.
+ * __struct gl_contextRec::NewState with the dirty stack flag.
*/
void GLAPIENTRY
_mesa_Rotatef( GLfloat angle, GLfloat x, GLfloat y, GLfloat z )
@@ -422,7 +422,7 @@ _mesa_Rotatef( GLfloat angle, GLfloat x, GLfloat y, GLfloat z )
*
* Flushes the vertices and calls _math_matrix_scale() with the top-most
* matrix in the current stack and the given parameters. Marks
- * __GLcontextRec::NewState with the dirty stack flag.
+ * __struct gl_contextRec::NewState with the dirty stack flag.
*/
void GLAPIENTRY
_mesa_Scalef( GLfloat x, GLfloat y, GLfloat z )
@@ -445,7 +445,7 @@ _mesa_Scalef( GLfloat x, GLfloat y, GLfloat z )
*
* Flushes the vertices and calls _math_matrix_translate() with the top-most
* matrix in the current stack and the given parameters. Marks
- * __GLcontextRec::NewState with the dirty stack flag.
+ * __struct gl_contextRec::NewState with the dirty stack flag.
*/
void GLAPIENTRY
_mesa_Translatef( GLfloat x, GLfloat y, GLfloat z )
@@ -559,13 +559,13 @@ _mesa_MultTransposeMatrixdARB( const GLdouble *m )
* Calls _math_matrix_analyse() with the top-matrix of the projection matrix
* stack, and recomputes user clip positions if necessary.
*
- * \note This routine references __GLcontextRec::Tranform attribute values to
+ * \note This routine references __struct gl_contextRec::Tranform attribute values to
* compute userclip positions in clip space, but is only called on
* _NEW_PROJECTION. The _mesa_ClipPlane() function keeps these values up to
- * date across changes to the __GLcontextRec::Transform attributes.
+ * date across changes to the __struct gl_contextRec::Transform attributes.
*/
static void
-update_projection( GLcontext *ctx )
+update_projection( struct gl_context *ctx )
{
_math_matrix_analyse( ctx->ProjectionMatrixStack.Top );
@@ -593,11 +593,11 @@ update_projection( GLcontext *ctx )
* \param ctx GL context.
*
* Multiplies the top matrices of the projection and model view stacks into
- * __GLcontextRec::_ModelProjectMatrix via _math_matrix_mul_matrix() and
+ * __struct gl_contextRec::_ModelProjectMatrix via _math_matrix_mul_matrix() and
* analyzes the resulting matrix via _math_matrix_analyse().
*/
static void
-calculate_model_project_matrix( GLcontext *ctx )
+calculate_model_project_matrix( struct gl_context *ctx )
{
_math_matrix_mul_matrix( &ctx->_ModelProjectMatrix,
ctx->ProjectionMatrixStack.Top,
@@ -618,7 +618,7 @@ calculate_model_project_matrix( GLcontext *ctx )
* calculate_model_project_matrix() to recalculate the modelview-projection
* matrix.
*/
-void _mesa_update_modelview_project( GLcontext *ctx, GLuint new_state )
+void _mesa_update_modelview_project( struct gl_context *ctx, GLuint new_state )
{
if (new_state & _NEW_MODELVIEW) {
_math_matrix_analyse( ctx->ModelviewMatrixStack.Top );
@@ -712,7 +712,7 @@ free_matrix_stack( struct gl_matrix_stack *stack )
* Initializes each of the matrix stacks and the combined modelview-projection
* matrix.
*/
-void _mesa_init_matrix( GLcontext * ctx )
+void _mesa_init_matrix( struct gl_context * ctx )
{
GLint i;
@@ -742,7 +742,7 @@ void _mesa_init_matrix( GLcontext * ctx )
* Frees each of the matrix stacks and the combined modelview-projection
* matrix.
*/
-void _mesa_free_matrix_data( GLcontext *ctx )
+void _mesa_free_matrix_data( struct gl_context *ctx )
{
GLint i;
@@ -765,7 +765,7 @@ void _mesa_free_matrix_data( GLcontext *ctx )
*
* \todo Move this to a new file with other 'transform' routines.
*/
-void _mesa_init_transform( GLcontext *ctx )
+void _mesa_init_transform( struct gl_context *ctx )
{
GLint i;
diff --git a/src/mesa/main/matrix.h b/src/mesa/main/matrix.h
index a53d1045c7d..38fd235b117 100644
--- a/src/mesa/main/matrix.h
+++ b/src/mesa/main/matrix.h
@@ -97,16 +97,16 @@ _mesa_MultTransposeMatrixdARB( const GLdouble *m );
extern void
-_mesa_init_matrix( GLcontext * ctx );
+_mesa_init_matrix( struct gl_context * ctx );
extern void
-_mesa_init_transform( GLcontext *ctx );
+_mesa_init_transform( struct gl_context *ctx );
extern void
-_mesa_free_matrix_data( GLcontext *ctx );
+_mesa_free_matrix_data( struct gl_context *ctx );
extern void
-_mesa_update_modelview_project( GLcontext *ctx, GLuint newstate );
+_mesa_update_modelview_project( struct gl_context *ctx, GLuint newstate );
#endif
diff --git a/src/mesa/main/mfeatures.h b/src/mesa/main/mfeatures.h
index 9b9b6d0420b..5afd65d9766 100644
--- a/src/mesa/main/mfeatures.h
+++ b/src/mesa/main/mfeatures.h
@@ -119,7 +119,6 @@
#define FEATURE_ARB_fragment_shader 1
#define FEATURE_ARB_shader_objects (FEATURE_ARB_vertex_shader || FEATURE_ARB_fragment_shader)
#define FEATURE_ARB_shading_language_100 FEATURE_ARB_shader_objects
-#define FEATURE_ARB_shading_language_120 FEATURE_ARB_shader_objects
#define FEATURE_ARB_geometry_shader4 FEATURE_ARB_shader_objects
#define FEATURE_ARB_framebuffer_object (FEATURE_GL && FEATURE_EXT_framebuffer_object)
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index 3d1a4c49c49..11d5a0519e0 100644
--- a/src/mesa/main/mipmap.c
+++ b/src/mesa/main/mipmap.c
@@ -606,7 +606,7 @@ do_row_3D(GLenum datatype, GLuint comps, GLint srcWidth,
FILTER_3D(0);
}
}
- if ((datatype == GL_BYTE) && (comps == 4)) {
+ else if ((datatype == GL_BYTE) && (comps == 4)) {
DECLARE_ROW_POINTERS(GLbyte, 4);
for (i = j = 0, k = k0; i < (GLuint) dstWidth;
@@ -1504,7 +1504,7 @@ next_mipmap_level_size(GLenum target, GLint border,
* GL_TEXTURE_CUBE_MAP_POSITIVE/NEGATIVE_X/Y/Z; never GL_TEXTURE_CUBE_MAP.
*/
void
-_mesa_generate_mipmap(GLcontext *ctx, GLenum target,
+_mesa_generate_mipmap(struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj)
{
const struct gl_texture_image *srcImage;
diff --git a/src/mesa/main/mipmap.h b/src/mesa/main/mipmap.h
index 22094c34372..4c7ee635aee 100644
--- a/src/mesa/main/mipmap.h
+++ b/src/mesa/main/mipmap.h
@@ -42,7 +42,7 @@ _mesa_generate_mipmap_level(GLenum target,
extern void
-_mesa_generate_mipmap(GLcontext *ctx, GLenum target,
+_mesa_generate_mipmap(struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj);
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index aa9676665ff..1b8a80416c9 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -123,10 +123,8 @@ struct gl_program_cache;
struct gl_texture_format;
struct gl_texture_image;
struct gl_texture_object;
+struct gl_context;
struct st_context;
-typedef struct __GLcontextRec GLcontext;
-typedef struct __GLcontextModesRec GLvisual;
-typedef struct gl_framebuffer GLframebuffer;
/*@}*/
@@ -380,8 +378,9 @@ typedef enum
typedef enum
{
FRAG_RESULT_DEPTH = 0,
- FRAG_RESULT_COLOR = 1,
- FRAG_RESULT_DATA0 = 2,
+ FRAG_RESULT_STENCIL = 1,
+ FRAG_RESULT_COLOR = 2,
+ FRAG_RESULT_DATA0 = 3,
FRAG_RESULT_MAX = (FRAG_RESULT_DATA0 + MAX_DRAW_BUFFERS)
} gl_frag_result;
@@ -548,6 +547,60 @@ struct gl_shine_tab
GLuint refcount;
};
+struct gl_config {
+ GLboolean rgbMode;
+ GLboolean floatMode;
+ GLboolean colorIndexMode;
+ GLuint doubleBufferMode;
+ GLuint stereoMode;
+
+ GLboolean haveAccumBuffer;
+ GLboolean haveDepthBuffer;
+ GLboolean haveStencilBuffer;
+
+ GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */
+ GLuint redMask, greenMask, blueMask, alphaMask;
+ GLint rgbBits; /* total bits for rgb */
+ GLint indexBits; /* total bits for colorindex */
+
+ GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
+ GLint depthBits;
+ GLint stencilBits;
+
+ GLint numAuxBuffers;
+
+ GLint level;
+
+ /* EXT_visual_rating / GLX 1.2 */
+ GLint visualRating;
+
+ /* EXT_visual_info / GLX 1.2 */
+ GLint transparentPixel;
+ /* colors are floats scaled to ints */
+ GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha;
+ GLint transparentIndex;
+
+ /* ARB_multisample / SGIS_multisample */
+ GLint sampleBuffers;
+ GLint samples;
+
+ /* SGIX_pbuffer / GLX 1.3 */
+ GLint maxPbufferWidth;
+ GLint maxPbufferHeight;
+ GLint maxPbufferPixels;
+ GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */
+ GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */
+
+ /* OML_swap_method */
+ GLint swapMethod;
+
+ /* EXT_texture_from_pixmap */
+ GLint bindToTextureRgb;
+ GLint bindToTextureRgba;
+ GLint bindToMipmapTexture;
+ GLint bindToTextureTargets;
+ GLint yInverted;
+};
/**
* Light source state.
@@ -2064,11 +2117,12 @@ struct gl_shader_program
/**
* Per-stage shaders resulting from the first stage of linking.
+ *
+ * Set of linked shaders for this program. The array is accessed using the
+ * \c MESA_SHADER_* defines. Entries for non-existent stages will be
+ * \c NULL.
*/
- /*@{*/
- GLuint _NumLinkedShaders;
- struct gl_shader *_LinkedShaders[2];
- /*@}*/
+ struct gl_shader *_LinkedShaders[MESA_SHADER_TYPES];
};
@@ -2087,7 +2141,24 @@ struct gl_shader_program
*/
struct gl_shader_state
{
- struct gl_shader_program *CurrentProgram; /**< The user-bound program */
+ /**
+ * Programs used for rendering
+ *
+ * There is a separate program set for each shader stage. If
+ * GL_EXT_separate_shader_objects is not supported, each of these must point
+ * to \c NULL or to the same program.
+ */
+ struct gl_shader_program *CurrentVertexProgram;
+ struct gl_shader_program *CurrentGeometryProgram;
+ struct gl_shader_program *CurrentFragmentProgram;
+
+ /**
+ * Program used by glUniform calls.
+ *
+ * Explicitly set by \c glUseProgram and \c glActiveProgramEXT.
+ */
+ struct gl_shader_program *ActiveProgram;
+
void *MemPool;
GLbitfield Flags; /**< Mask of GLSL_x flags */
@@ -2271,38 +2342,38 @@ struct gl_renderbuffer
void (*Delete)(struct gl_renderbuffer *rb);
/* Allocate new storage for this renderbuffer */
- GLboolean (*AllocStorage)(GLcontext *ctx, struct gl_renderbuffer *rb,
+ GLboolean (*AllocStorage)(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLenum internalFormat,
GLuint width, GLuint height);
/* Lock/Unlock are called before/after calling the Get/Put functions.
* Not sure this is the right place for these yet.
- void (*Lock)(GLcontext *ctx, struct gl_renderbuffer *rb);
- void (*Unlock)(GLcontext *ctx, struct gl_renderbuffer *rb);
+ void (*Lock)(struct gl_context *ctx, struct gl_renderbuffer *rb);
+ void (*Unlock)(struct gl_context *ctx, struct gl_renderbuffer *rb);
*/
/* Return a pointer to the element/pixel at (x,y).
* Should return NULL if the buffer memory can't be directly addressed.
*/
- void *(*GetPointer)(GLcontext *ctx, struct gl_renderbuffer *rb,
+ void *(*GetPointer)(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLint x, GLint y);
/* Get/Read a row of values.
* The values will be of format _BaseFormat and type DataType.
*/
- void (*GetRow)(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+ void (*GetRow)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, void *values);
/* Get/Read values at arbitrary locations.
* The values will be of format _BaseFormat and type DataType.
*/
- void (*GetValues)(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+ void (*GetValues)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLint x[], const GLint y[], void *values);
/* Put/Write a row of values.
* The values will be of format _BaseFormat and type DataType.
*/
- void (*PutRow)(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+ void (*PutRow)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, const void *values, const GLubyte *mask);
/* Put/Write a row of RGB values. This is a special-case routine that's
@@ -2310,26 +2381,26 @@ struct gl_renderbuffer
* a common case for glDrawPixels and some triangle routines.
* The values will be of format GL_RGB and type DataType.
*/
- void (*PutRowRGB)(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+ void (*PutRowRGB)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, const void *values, const GLubyte *mask);
/* Put/Write a row of identical values.
* The values will be of format _BaseFormat and type DataType.
*/
- void (*PutMonoRow)(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+ void (*PutMonoRow)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, const void *value, const GLubyte *mask);
/* Put/Write values at arbitrary locations.
* The values will be of format _BaseFormat and type DataType.
*/
- void (*PutValues)(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+ void (*PutValues)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLint x[], const GLint y[], const void *values,
const GLubyte *mask);
/* Put/Write identical values at arbitrary locations.
* The values will be of format _BaseFormat and type DataType.
*/
- void (*PutMonoValues)(GLcontext *ctx, struct gl_renderbuffer *rb,
+ void (*PutMonoValues)(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, const GLint x[], const GLint y[],
const void *value, const GLubyte *mask);
};
@@ -2386,7 +2457,7 @@ struct gl_framebuffer
* The framebuffer's visual. Immutable if this is a window system buffer.
* Computed from attachments if user-made FBO.
*/
- GLvisual Visual;
+ struct gl_config Visual;
GLboolean Initialized;
@@ -2408,6 +2479,9 @@ struct gl_framebuffer
/** One of the GL_FRAMEBUFFER_(IN)COMPLETE_* tokens */
GLenum _Status;
+ /** Integer color values */
+ GLboolean _IntegerColor;
+
/** Array of all renderbuffer attachments, indexed by BUFFER_* tokens. */
struct gl_renderbuffer_attachment Attachment[BUFFER_COUNT];
@@ -2587,6 +2661,7 @@ struct gl_extensions
GLboolean ARB_sampler_objects;
GLboolean ARB_seamless_cube_map;
GLboolean ARB_shader_objects;
+ GLboolean ARB_shader_stencil_export;
GLboolean ARB_shading_language_100;
GLboolean ARB_shadow;
GLboolean ARB_shadow_ambient;
@@ -2635,6 +2710,7 @@ struct gl_extensions
GLboolean EXT_framebuffer_object;
GLboolean EXT_framebuffer_sRGB;
GLboolean EXT_gpu_program_parameters;
+ GLboolean EXT_gpu_shader4;
GLboolean EXT_multi_draw_arrays;
GLboolean EXT_paletted_texture;
GLboolean EXT_packed_depth_stencil;
@@ -2647,6 +2723,7 @@ struct gl_extensions
GLboolean EXT_rescale_normal;
GLboolean EXT_shadow_funcs;
GLboolean EXT_secondary_color;
+ GLboolean EXT_separate_shader_objects;
GLboolean EXT_separate_specular_color;
GLboolean EXT_shared_texture_palette;
GLboolean EXT_stencil_wrap;
@@ -2733,7 +2810,7 @@ struct gl_matrix_stack
/**
* \name Bits for image transfer operations
- * \sa __GLcontextRec::ImageTransferState.
+ * \sa __struct gl_contextRec::ImageTransferState.
*/
/*@{*/
#define IMAGE_SCALE_BIAS_BIT 0x1
@@ -2753,34 +2830,34 @@ struct gl_matrix_stack
* 4 unused flags.
*/
/*@{*/
-#define _NEW_MODELVIEW 0x1 /**< __GLcontextRec::ModelView */
-#define _NEW_PROJECTION 0x2 /**< __GLcontextRec::Projection */
-#define _NEW_TEXTURE_MATRIX 0x4 /**< __GLcontextRec::TextureMatrix */
-#define _NEW_ACCUM 0x10 /**< __GLcontextRec::Accum */
-#define _NEW_COLOR 0x20 /**< __GLcontextRec::Color */
-#define _NEW_DEPTH 0x40 /**< __GLcontextRec::Depth */
-#define _NEW_EVAL 0x80 /**< __GLcontextRec::Eval, __GLcontextRec::EvalMap */
-#define _NEW_FOG 0x100 /**< __GLcontextRec::Fog */
-#define _NEW_HINT 0x200 /**< __GLcontextRec::Hint */
-#define _NEW_LIGHT 0x400 /**< __GLcontextRec::Light */
-#define _NEW_LINE 0x800 /**< __GLcontextRec::Line */
-#define _NEW_PIXEL 0x1000 /**< __GLcontextRec::Pixel */
-#define _NEW_POINT 0x2000 /**< __GLcontextRec::Point */
-#define _NEW_POLYGON 0x4000 /**< __GLcontextRec::Polygon */
-#define _NEW_POLYGONSTIPPLE 0x8000 /**< __GLcontextRec::PolygonStipple */
-#define _NEW_SCISSOR 0x10000 /**< __GLcontextRec::Scissor */
-#define _NEW_STENCIL 0x20000 /**< __GLcontextRec::Stencil */
-#define _NEW_TEXTURE 0x40000 /**< __GLcontextRec::Texture */
-#define _NEW_TRANSFORM 0x80000 /**< __GLcontextRec::Transform */
-#define _NEW_VIEWPORT 0x100000 /**< __GLcontextRec::Viewport */
-#define _NEW_PACKUNPACK 0x200000 /**< __GLcontextRec::Pack, __GLcontextRec::Unpack */
-#define _NEW_ARRAY 0x400000 /**< __GLcontextRec::Array */
-#define _NEW_RENDERMODE 0x800000 /**< __GLcontextRec::RenderMode, __GLcontextRec::Feedback, __GLcontextRec::Select */
-#define _NEW_BUFFERS 0x1000000 /**< __GLcontextRec::Visual, __GLcontextRec::DrawBuffer, */
-#define _NEW_MULTISAMPLE 0x2000000 /**< __GLcontextRec::Multisample */
-#define _NEW_TRACK_MATRIX 0x4000000 /**< __GLcontextRec::VertexProgram */
-#define _NEW_PROGRAM 0x8000000 /**< __GLcontextRec::VertexProgram */
-#define _NEW_CURRENT_ATTRIB 0x10000000 /**< __GLcontextRec::Current */
+#define _NEW_MODELVIEW 0x1 /**< __struct gl_contextRec::ModelView */
+#define _NEW_PROJECTION 0x2 /**< __struct gl_contextRec::Projection */
+#define _NEW_TEXTURE_MATRIX 0x4 /**< __struct gl_contextRec::TextureMatrix */
+#define _NEW_ACCUM 0x10 /**< __struct gl_contextRec::Accum */
+#define _NEW_COLOR 0x20 /**< __struct gl_contextRec::Color */
+#define _NEW_DEPTH 0x40 /**< __struct gl_contextRec::Depth */
+#define _NEW_EVAL 0x80 /**< __struct gl_contextRec::Eval, __struct gl_contextRec::EvalMap */
+#define _NEW_FOG 0x100 /**< __struct gl_contextRec::Fog */
+#define _NEW_HINT 0x200 /**< __struct gl_contextRec::Hint */
+#define _NEW_LIGHT 0x400 /**< __struct gl_contextRec::Light */
+#define _NEW_LINE 0x800 /**< __struct gl_contextRec::Line */
+#define _NEW_PIXEL 0x1000 /**< __struct gl_contextRec::Pixel */
+#define _NEW_POINT 0x2000 /**< __struct gl_contextRec::Point */
+#define _NEW_POLYGON 0x4000 /**< __struct gl_contextRec::Polygon */
+#define _NEW_POLYGONSTIPPLE 0x8000 /**< __struct gl_contextRec::PolygonStipple */
+#define _NEW_SCISSOR 0x10000 /**< __struct gl_contextRec::Scissor */
+#define _NEW_STENCIL 0x20000 /**< __struct gl_contextRec::Stencil */
+#define _NEW_TEXTURE 0x40000 /**< __struct gl_contextRec::Texture */
+#define _NEW_TRANSFORM 0x80000 /**< __struct gl_contextRec::Transform */
+#define _NEW_VIEWPORT 0x100000 /**< __struct gl_contextRec::Viewport */
+#define _NEW_PACKUNPACK 0x200000 /**< __struct gl_contextRec::Pack, __struct gl_contextRec::Unpack */
+#define _NEW_ARRAY 0x400000 /**< __struct gl_contextRec::Array */
+#define _NEW_RENDERMODE 0x800000 /**< __struct gl_contextRec::RenderMode, __struct gl_contextRec::Feedback, __struct gl_contextRec::Select */
+#define _NEW_BUFFERS 0x1000000 /**< __struct gl_contextRec::Visual, __struct gl_contextRec::DrawBuffer, */
+#define _NEW_MULTISAMPLE 0x2000000 /**< __struct gl_contextRec::Multisample */
+#define _NEW_TRACK_MATRIX 0x4000000 /**< __struct gl_contextRec::VertexProgram */
+#define _NEW_PROGRAM 0x8000000 /**< __struct gl_contextRec::VertexProgram */
+#define _NEW_CURRENT_ATTRIB 0x10000000 /**< __struct gl_contextRec::Current */
#define _NEW_PROGRAM_CONSTANTS 0x20000000
#define _NEW_BUFFER_OBJECT 0x40000000
#define _NEW_ALL ~0
@@ -2823,7 +2900,7 @@ struct gl_matrix_stack
/**
* \name A bunch of flags that we think might be useful to drivers.
*
- * Set in the __GLcontextRec::_TriangleCaps bitfield.
+ * Set in the __struct gl_contextRec::_TriangleCaps bitfield.
*/
/*@{*/
#define DD_FLATSHADE 0x1
@@ -2888,32 +2965,6 @@ struct gl_matrix_stack
#include "dd.h"
-#define NUM_VERTEX_FORMAT_ENTRIES (sizeof(GLvertexformat) / sizeof(void *))
-
-/**
- * Core Mesa's support for tnl modules:
- */
-struct gl_tnl_module
-{
- /**
- * Vertex format to be lazily swapped into current dispatch.
- */
- const GLvertexformat *Current;
-
- /**
- * \name Record of functions swapped out.
- * On restore, only need to swap these functions back in.
- */
- /*@{*/
- struct {
- _glapi_proc * location;
- _glapi_proc function;
- } Swapped[NUM_VERTEX_FORMAT_ENTRIES];
- GLuint SwapCount;
- /*@}*/
-};
-
-
/**
* Display list flags.
* Strictly this is a tnl-private concept, but it doesn't seem
@@ -2991,9 +3042,9 @@ typedef enum {
* Think of this as a base class from which device drivers will derive
* sub classes.
*
- * The GLcontext typedef names this structure.
+ * The struct gl_context typedef names this structure.
*/
-struct __GLcontextRec
+struct gl_context
{
/** State possibly shared with other contexts in the address space */
struct gl_shared_state *Shared;
@@ -3006,11 +3057,11 @@ struct __GLcontextRec
struct _glapi_table *CurrentDispatch; /**< == Save or Exec !! */
/*@}*/
- GLvisual Visual;
- GLframebuffer *DrawBuffer; /**< buffer for writing */
- GLframebuffer *ReadBuffer; /**< buffer for reading */
- GLframebuffer *WinSysDrawBuffer; /**< set with MakeCurrent */
- GLframebuffer *WinSysReadBuffer; /**< set with MakeCurrent */
+ struct gl_config Visual;
+ struct gl_framebuffer *DrawBuffer; /**< buffer for writing */
+ struct gl_framebuffer *ReadBuffer; /**< buffer for reading */
+ struct gl_framebuffer *WinSysDrawBuffer; /**< set with MakeCurrent */
+ struct gl_framebuffer *WinSysReadBuffer; /**< set with MakeCurrent */
/**
* Device driver function pointer table
@@ -3177,9 +3228,6 @@ struct __GLcontextRec
*/
GLboolean mvp_with_dp4;
- /** Core tnl module support */
- struct gl_tnl_module TnlModule;
-
/**
* \name Hooks for module contexts.
*
diff --git a/src/mesa/main/multisample.c b/src/mesa/main/multisample.c
index 01b68df7afc..5487d45f56b 100644
--- a/src/mesa/main/multisample.c
+++ b/src/mesa/main/multisample.c
@@ -50,7 +50,7 @@ _mesa_SampleCoverageARB(GLclampf value, GLboolean invert)
* \param ctx the GL context.
*/
void
-_mesa_init_multisample(GLcontext *ctx)
+_mesa_init_multisample(struct gl_context *ctx)
{
ctx->Multisample.Enabled = GL_TRUE;
ctx->Multisample.SampleAlphaToCoverage = GL_FALSE;
diff --git a/src/mesa/main/multisample.h b/src/mesa/main/multisample.h
index 998488ef420..c7cc432daac 100644
--- a/src/mesa/main/multisample.h
+++ b/src/mesa/main/multisample.h
@@ -33,7 +33,7 @@ _mesa_SampleCoverageARB(GLclampf value, GLboolean invert);
extern void
-_mesa_init_multisample(GLcontext *ctx);
+_mesa_init_multisample(struct gl_context *ctx);
#endif
diff --git a/src/mesa/main/nvprogram.c b/src/mesa/main/nvprogram.c
index 3a570b7dda6..833bf916ecf 100644
--- a/src/mesa/main/nvprogram.c
+++ b/src/mesa/main/nvprogram.c
@@ -511,7 +511,7 @@ _mesa_GetVertexAttribPointervNV(GLuint index, GLenum pname, GLvoid **pointer)
}
void
-_mesa_emit_nv_temp_initialization(GLcontext *ctx,
+_mesa_emit_nv_temp_initialization(struct gl_context *ctx,
struct gl_program *program)
{
struct prog_instruction *inst;
@@ -559,7 +559,7 @@ _mesa_emit_nv_temp_initialization(GLcontext *ctx,
}
void
-_mesa_setup_nv_temporary_count(GLcontext *ctx, struct gl_program *program)
+_mesa_setup_nv_temporary_count(struct gl_context *ctx, struct gl_program *program)
{
GLuint i;
diff --git a/src/mesa/main/nvprogram.h b/src/mesa/main/nvprogram.h
index 260a25ba9e9..035f2fe2426 100644
--- a/src/mesa/main/nvprogram.h
+++ b/src/mesa/main/nvprogram.h
@@ -106,10 +106,10 @@ _mesa_GetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte *name,
GLdouble *params);
extern void
-_mesa_setup_nv_temporary_count(GLcontext *ctx, struct gl_program *program);
+_mesa_setup_nv_temporary_count(struct gl_context *ctx, struct gl_program *program);
extern void
-_mesa_emit_nv_temp_initialization(GLcontext *ctx,
+_mesa_emit_nv_temp_initialization(struct gl_context *ctx,
struct gl_program *program);
#endif
diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c
new file mode 100644
index 00000000000..877d27ce1e4
--- /dev/null
+++ b/src/mesa/main/pack.c
@@ -0,0 +1,4339 @@
+/*
+ * Mesa 3-D graphics library
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 2009-2010 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THEA AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/**
+ * \file pack.c
+ * Image and pixel span packing and unpacking.
+ */
+
+
+#include "glheader.h"
+#include "colormac.h"
+#include "enums.h"
+#include "image.h"
+#include "pack.h"
+#include "pixeltransfer.h"
+#include "imports.h"
+
+
+/**
+ * NOTE:
+ * Normally, BYTE_TO_FLOAT(0) returns 0.00392 That causes problems when
+ * we later convert the float to a packed integer value (such as for
+ * GL_RGB5_A1) because we'll wind up with a non-zero value.
+ *
+ * We redefine the macros here so zero is handled correctly.
+ */
+#undef BYTE_TO_FLOAT
+#define BYTE_TO_FLOAT(B) ((B) == 0 ? 0.0F : ((2.0F * (B) + 1.0F) * (1.0F/255.0F)))
+
+#undef SHORT_TO_FLOAT
+#define SHORT_TO_FLOAT(S) ((S) == 0 ? 0.0F : ((2.0F * (S) + 1.0F) * (1.0F/65535.0F)))
+
+
+
+/** Compute ceiling of integer quotient of A divided by B. */
+#define CEILING( A, B ) ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 )
+
+
+/**
+ * Flip the 8 bits in each byte of the given array.
+ *
+ * \param p array.
+ * \param n number of bytes.
+ *
+ * \todo try this trick to flip bytes someday:
+ * \code
+ * v = ((v & 0x55555555) << 1) | ((v >> 1) & 0x55555555);
+ * v = ((v & 0x33333333) << 2) | ((v >> 2) & 0x33333333);
+ * v = ((v & 0x0f0f0f0f) << 4) | ((v >> 4) & 0x0f0f0f0f);
+ * \endcode
+ */
+static void
+flip_bytes( GLubyte *p, GLuint n )
+{
+ GLuint i, a, b;
+ for (i = 0; i < n; i++) {
+ b = (GLuint) p[i]; /* words are often faster than bytes */
+ a = ((b & 0x01) << 7) |
+ ((b & 0x02) << 5) |
+ ((b & 0x04) << 3) |
+ ((b & 0x08) << 1) |
+ ((b & 0x10) >> 1) |
+ ((b & 0x20) >> 3) |
+ ((b & 0x40) >> 5) |
+ ((b & 0x80) >> 7);
+ p[i] = (GLubyte) a;
+ }
+}
+
+
+
+/*
+ * Unpack a 32x32 pixel polygon stipple from user memory using the
+ * current pixel unpack settings.
+ */
+void
+_mesa_unpack_polygon_stipple( const GLubyte *pattern, GLuint dest[32],
+ const struct gl_pixelstore_attrib *unpacking )
+{
+ GLubyte *ptrn = (GLubyte *) _mesa_unpack_bitmap(32, 32, pattern, unpacking);
+ if (ptrn) {
+ /* Convert pattern from GLubytes to GLuints and handle big/little
+ * endian differences
+ */
+ GLubyte *p = ptrn;
+ GLint i;
+ for (i = 0; i < 32; i++) {
+ dest[i] = (p[0] << 24)
+ | (p[1] << 16)
+ | (p[2] << 8)
+ | (p[3] );
+ p += 4;
+ }
+ free(ptrn);
+ }
+}
+
+
+/*
+ * Pack polygon stipple into user memory given current pixel packing
+ * settings.
+ */
+void
+_mesa_pack_polygon_stipple( const GLuint pattern[32], GLubyte *dest,
+ const struct gl_pixelstore_attrib *packing )
+{
+ /* Convert pattern from GLuints to GLubytes to handle big/little
+ * endian differences.
+ */
+ GLubyte ptrn[32*4];
+ GLint i;
+ for (i = 0; i < 32; i++) {
+ ptrn[i * 4 + 0] = (GLubyte) ((pattern[i] >> 24) & 0xff);
+ ptrn[i * 4 + 1] = (GLubyte) ((pattern[i] >> 16) & 0xff);
+ ptrn[i * 4 + 2] = (GLubyte) ((pattern[i] >> 8 ) & 0xff);
+ ptrn[i * 4 + 3] = (GLubyte) ((pattern[i] ) & 0xff);
+ }
+
+ _mesa_pack_bitmap(32, 32, ptrn, dest, packing);
+}
+
+
+/*
+ * Unpack bitmap data. Resulting data will be in most-significant-bit-first
+ * order with row alignment = 1 byte.
+ */
+GLvoid *
+_mesa_unpack_bitmap( GLint width, GLint height, const GLubyte *pixels,
+ const struct gl_pixelstore_attrib *packing )
+{
+ GLint bytes, row, width_in_bytes;
+ GLubyte *buffer, *dst;
+
+ if (!pixels)
+ return NULL;
+
+ /* Alloc dest storage */
+ bytes = ((width + 7) / 8 * height);
+ buffer = (GLubyte *) malloc( bytes );
+ if (!buffer)
+ return NULL;
+
+ width_in_bytes = CEILING( width, 8 );
+ dst = buffer;
+ for (row = 0; row < height; row++) {
+ const GLubyte *src = (const GLubyte *)
+ _mesa_image_address2d(packing, pixels, width, height,
+ GL_COLOR_INDEX, GL_BITMAP, row, 0);
+ if (!src) {
+ free(buffer);
+ return NULL;
+ }
+
+ if ((packing->SkipPixels & 7) == 0) {
+ memcpy( dst, src, width_in_bytes );
+ if (packing->LsbFirst) {
+ flip_bytes( dst, width_in_bytes );
+ }
+ }
+ else {
+ /* handling SkipPixels is a bit tricky (no pun intended!) */
+ GLint i;
+ if (packing->LsbFirst) {
+ GLubyte srcMask = 1 << (packing->SkipPixels & 0x7);
+ GLubyte dstMask = 128;
+ const GLubyte *s = src;
+ GLubyte *d = dst;
+ *d = 0;
+ for (i = 0; i < width; i++) {
+ if (*s & srcMask) {
+ *d |= dstMask;
+ }
+ if (srcMask == 128) {
+ srcMask = 1;
+ s++;
+ }
+ else {
+ srcMask = srcMask << 1;
+ }
+ if (dstMask == 1) {
+ dstMask = 128;
+ d++;
+ *d = 0;
+ }
+ else {
+ dstMask = dstMask >> 1;
+ }
+ }
+ }
+ else {
+ GLubyte srcMask = 128 >> (packing->SkipPixels & 0x7);
+ GLubyte dstMask = 128;
+ const GLubyte *s = src;
+ GLubyte *d = dst;
+ *d = 0;
+ for (i = 0; i < width; i++) {
+ if (*s & srcMask) {
+ *d |= dstMask;
+ }
+ if (srcMask == 1) {
+ srcMask = 128;
+ s++;
+ }
+ else {
+ srcMask = srcMask >> 1;
+ }
+ if (dstMask == 1) {
+ dstMask = 128;
+ d++;
+ *d = 0;
+ }
+ else {
+ dstMask = dstMask >> 1;
+ }
+ }
+ }
+ }
+ dst += width_in_bytes;
+ }
+
+ return buffer;
+}
+
+
+/*
+ * Pack bitmap data.
+ */
+void
+_mesa_pack_bitmap( GLint width, GLint height, const GLubyte *source,
+ GLubyte *dest, const struct gl_pixelstore_attrib *packing )
+{
+ GLint row, width_in_bytes;
+ const GLubyte *src;
+
+ if (!source)
+ return;
+
+ width_in_bytes = CEILING( width, 8 );
+ src = source;
+ for (row = 0; row < height; row++) {
+ GLubyte *dst = (GLubyte *) _mesa_image_address2d(packing, dest,
+ width, height, GL_COLOR_INDEX, GL_BITMAP, row, 0);
+ if (!dst)
+ return;
+
+ if ((packing->SkipPixels & 7) == 0) {
+ memcpy( dst, src, width_in_bytes );
+ if (packing->LsbFirst) {
+ flip_bytes( dst, width_in_bytes );
+ }
+ }
+ else {
+ /* handling SkipPixels is a bit tricky (no pun intended!) */
+ GLint i;
+ if (packing->LsbFirst) {
+ GLubyte srcMask = 128;
+ GLubyte dstMask = 1 << (packing->SkipPixels & 0x7);
+ const GLubyte *s = src;
+ GLubyte *d = dst;
+ *d = 0;
+ for (i = 0; i < width; i++) {
+ if (*s & srcMask) {
+ *d |= dstMask;
+ }
+ if (srcMask == 1) {
+ srcMask = 128;
+ s++;
+ }
+ else {
+ srcMask = srcMask >> 1;
+ }
+ if (dstMask == 128) {
+ dstMask = 1;
+ d++;
+ *d = 0;
+ }
+ else {
+ dstMask = dstMask << 1;
+ }
+ }
+ }
+ else {
+ GLubyte srcMask = 128;
+ GLubyte dstMask = 128 >> (packing->SkipPixels & 0x7);
+ const GLubyte *s = src;
+ GLubyte *d = dst;
+ *d = 0;
+ for (i = 0; i < width; i++) {
+ if (*s & srcMask) {
+ *d |= dstMask;
+ }
+ if (srcMask == 1) {
+ srcMask = 128;
+ s++;
+ }
+ else {
+ srcMask = srcMask >> 1;
+ }
+ if (dstMask == 1) {
+ dstMask = 128;
+ d++;
+ *d = 0;
+ }
+ else {
+ dstMask = dstMask >> 1;
+ }
+ }
+ }
+ }
+ src += width_in_bytes;
+ }
+}
+
+
+
+/**
+ * For small integer types, return the min and max possible values.
+ * Used for clamping floats to unscaled integer types.
+ * \return GL_TRUE if type is handled, GL_FALSE otherwise.
+ */
+static GLboolean
+get_type_min_max(GLenum type, GLfloat *min, GLfloat *max)
+{
+ switch (type) {
+ case GL_BYTE:
+ *min = -128.0;
+ *max = 127.0;
+ return GL_TRUE;
+ case GL_UNSIGNED_BYTE:
+ *min = 0.0;
+ *max = 255.0;
+ return GL_TRUE;
+ case GL_SHORT:
+ *min = -32768.0;
+ *max = 32767.0;
+ return GL_TRUE;
+ case GL_UNSIGNED_SHORT:
+ *min = 0.0;
+ *max = 65535.0;
+ return GL_TRUE;
+ default:
+ return GL_FALSE;
+ }
+}
+
+
+
+/**
+ * Used to pack an array [][4] of RGBA float colors as specified
+ * by the dstFormat, dstType and dstPacking. Used by glReadPixels.
+ * Historically, the RGBA values were in [0,1] and rescaled to fit
+ * into GLubytes, etc. But with new integer formats, the RGBA values
+ * may have any value and we don't always rescale when converting to
+ * integers.
+ *
+ * Note: the rgba values will be modified by this function when any pixel
+ * transfer ops are enabled.
+ */
+void
+_mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n, GLfloat rgba[][4],
+ GLenum dstFormat, GLenum dstType,
+ GLvoid *dstAddr,
+ const struct gl_pixelstore_attrib *dstPacking,
+ GLbitfield transferOps)
+{
+ GLfloat luminance[MAX_WIDTH];
+ const GLint comps = _mesa_components_in_format(dstFormat);
+ const GLboolean intDstFormat = _mesa_is_integer_format(dstFormat);
+ GLuint i;
+
+ /* XXX
+ * This test should probably go away. Have the caller set/clear the
+ * IMAGE_CLAMP_BIT as needed.
+ */
+ if (dstType != GL_FLOAT || ctx->Color.ClampReadColor == GL_TRUE) {
+ if (!intDstFormat) {
+ /* need to clamp to [0, 1] */
+ transferOps |= IMAGE_CLAMP_BIT;
+ }
+ }
+
+ if (transferOps) {
+ _mesa_apply_rgba_transfer_ops(ctx, transferOps, n, rgba);
+ }
+
+ /*
+ * Component clamping (besides clamping to [0,1] in
+ * _mesa_apply_rgba_transfer_ops()).
+ */
+ if (intDstFormat) {
+ /* clamping to dest type's min/max values */
+ GLfloat min, max;
+ if (get_type_min_max(dstType, &min, &max)) {
+ for (i = 0; i < n; i++) {
+ rgba[i][RCOMP] = CLAMP(rgba[i][RCOMP], min, max);
+ rgba[i][GCOMP] = CLAMP(rgba[i][GCOMP], min, max);
+ rgba[i][BCOMP] = CLAMP(rgba[i][BCOMP], min, max);
+ rgba[i][ACOMP] = CLAMP(rgba[i][ACOMP], min, max);
+ }
+ }
+ }
+ else if (dstFormat == GL_LUMINANCE || dstFormat == GL_LUMINANCE_ALPHA) {
+ /* compute luminance values */
+ if (transferOps & IMAGE_CLAMP_BIT) {
+ for (i = 0; i < n; i++) {
+ GLfloat sum = rgba[i][RCOMP] + rgba[i][GCOMP] + rgba[i][BCOMP];
+ luminance[i] = CLAMP(sum, 0.0F, 1.0F);
+ }
+ }
+ else {
+ for (i = 0; i < n; i++) {
+ luminance[i] = rgba[i][RCOMP] + rgba[i][GCOMP] + rgba[i][BCOMP];
+ }
+ }
+ }
+
+ /*
+ * Pack/store the pixels. Ugh! Lots of cases!!!
+ */
+ switch (dstType) {
+ case GL_UNSIGNED_BYTE:
+ {
+ GLubyte *dst = (GLubyte *) dstAddr;
+ switch (dstFormat) {
+ case GL_RED:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
+ break;
+ case GL_GREEN:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
+ break;
+ case GL_BLUE:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_UBYTE(rgba[i][BCOMP]);
+ break;
+ case GL_ALPHA:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_UBYTE(rgba[i][ACOMP]);
+ break;
+ case GL_LUMINANCE:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_UBYTE(luminance[i]);
+ break;
+ case GL_LUMINANCE_ALPHA:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_UBYTE(luminance[i]);
+ dst[i*2+1] = FLOAT_TO_UBYTE(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_RG:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
+ }
+ break;
+ case GL_RGB:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
+ dst[i*3+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
+ dst[i*3+2] = FLOAT_TO_UBYTE(rgba[i][BCOMP]);
+ }
+ break;
+ case GL_RGBA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
+ dst[i*4+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
+ dst[i*4+2] = FLOAT_TO_UBYTE(rgba[i][BCOMP]);
+ dst[i*4+3] = FLOAT_TO_UBYTE(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_BGR:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = FLOAT_TO_UBYTE(rgba[i][BCOMP]);
+ dst[i*3+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
+ dst[i*3+2] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
+ }
+ break;
+ case GL_BGRA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_UBYTE(rgba[i][BCOMP]);
+ dst[i*4+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
+ dst[i*4+2] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
+ dst[i*4+3] = FLOAT_TO_UBYTE(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_ABGR_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_UBYTE(rgba[i][ACOMP]);
+ dst[i*4+1] = FLOAT_TO_UBYTE(rgba[i][BCOMP]);
+ dst[i*4+2] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
+ dst[i*4+3] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
+ }
+ break;
+ case GL_RED_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLubyte) rgba[i][RCOMP];
+ }
+ break;
+ case GL_GREEN_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLubyte) rgba[i][GCOMP];
+ }
+ break;
+ case GL_BLUE_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLubyte) rgba[i][BCOMP];
+ }
+ break;
+ case GL_ALPHA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLubyte) rgba[i][ACOMP];
+ }
+ break;
+ case GL_RGB_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLubyte) rgba[i][RCOMP];
+ dst[i*3+1] = (GLubyte) rgba[i][GCOMP];
+ dst[i*3+2] = (GLubyte) rgba[i][BCOMP];
+ }
+ break;
+ case GL_RGBA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = (GLubyte) rgba[i][RCOMP];
+ dst[i*4+1] = (GLubyte) rgba[i][GCOMP];
+ dst[i*4+2] = (GLubyte) rgba[i][BCOMP];
+ dst[i*4+3] = (GLubyte) rgba[i][ACOMP];
+ }
+ break;
+ case GL_BGR_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLubyte) rgba[i][BCOMP];
+ dst[i*3+1] = (GLubyte) rgba[i][GCOMP];
+ dst[i*3+2] = (GLubyte) rgba[i][RCOMP];
+ }
+ break;
+ case GL_BGRA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = (GLubyte) rgba[i][BCOMP];
+ dst[i*4+1] = (GLubyte) rgba[i][GCOMP];
+ dst[i*4+2] = (GLubyte) rgba[i][RCOMP];
+ dst[i*4+3] = (GLubyte) rgba[i][ACOMP];
+ }
+ break;
+ case GL_LUMINANCE_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = (GLubyte) (rgba[i][RCOMP] +
+ rgba[i][GCOMP] +
+ rgba[i][BCOMP]);
+ dst[i*2+1] = (GLubyte) rgba[i][ACOMP];
+ }
+ break;
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLubyte) (rgba[i][RCOMP] +
+ rgba[i][GCOMP] +
+ rgba[i][BCOMP]);
+ }
+ break;
+ case GL_DUDV_ATI:
+ case GL_DU8DV8_ATI:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
+ }
+ }
+ break;
+ case GL_BYTE:
+ {
+ GLbyte *dst = (GLbyte *) dstAddr;
+ switch (dstFormat) {
+ case GL_RED:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
+ break;
+ case GL_GREEN:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
+ break;
+ case GL_BLUE:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_BYTE(rgba[i][BCOMP]);
+ break;
+ case GL_ALPHA:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_BYTE(rgba[i][ACOMP]);
+ break;
+ case GL_LUMINANCE:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_BYTE(luminance[i]);
+ break;
+ case GL_LUMINANCE_ALPHA:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_BYTE(luminance[i]);
+ dst[i*2+1] = FLOAT_TO_BYTE(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_RG:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
+ }
+ break;
+ case GL_RGB:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
+ dst[i*3+1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
+ dst[i*3+2] = FLOAT_TO_BYTE(rgba[i][BCOMP]);
+ }
+ break;
+ case GL_RGBA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
+ dst[i*4+1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
+ dst[i*4+2] = FLOAT_TO_BYTE(rgba[i][BCOMP]);
+ dst[i*4+3] = FLOAT_TO_BYTE(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_BGR:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = FLOAT_TO_BYTE(rgba[i][BCOMP]);
+ dst[i*3+1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
+ dst[i*3+2] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
+ }
+ break;
+ case GL_BGRA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_BYTE(rgba[i][BCOMP]);
+ dst[i*4+1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
+ dst[i*4+2] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
+ dst[i*4+3] = FLOAT_TO_BYTE(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_ABGR_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_BYTE(rgba[i][ACOMP]);
+ dst[i*4+1] = FLOAT_TO_BYTE(rgba[i][BCOMP]);
+ dst[i*4+2] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
+ dst[i*4+3] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
+ }
+ break;
+ case GL_RED_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLbyte) rgba[i][RCOMP];
+ }
+ break;
+ case GL_GREEN_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLbyte) rgba[i][GCOMP];
+ }
+ break;
+ case GL_BLUE_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLbyte) rgba[i][BCOMP];
+ }
+ break;
+ case GL_ALPHA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLbyte) rgba[i][ACOMP];
+ }
+ break;
+ case GL_RGB_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLbyte) rgba[i][RCOMP];
+ dst[i*3+1] = (GLbyte) rgba[i][GCOMP];
+ dst[i*3+2] = (GLbyte) rgba[i][BCOMP];
+ }
+ break;
+ case GL_RGBA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = (GLbyte) rgba[i][RCOMP];
+ dst[i*4+1] = (GLbyte) rgba[i][GCOMP];
+ dst[i*4+2] = (GLbyte) rgba[i][BCOMP];
+ dst[i*4+3] = (GLbyte) rgba[i][ACOMP];
+ }
+ break;
+ case GL_BGR_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLbyte) rgba[i][BCOMP];
+ dst[i*3+1] = (GLbyte) rgba[i][GCOMP];
+ dst[i*3+2] = (GLbyte) rgba[i][RCOMP];
+ }
+ break;
+ case GL_BGRA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = (GLbyte) rgba[i][BCOMP];
+ dst[i*4+1] = (GLbyte) rgba[i][GCOMP];
+ dst[i*4+2] = (GLbyte) rgba[i][RCOMP];
+ dst[i*4+3] = (GLbyte) rgba[i][ACOMP];
+ }
+ break;
+ case GL_LUMINANCE_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = (GLbyte) (rgba[i][RCOMP] +
+ rgba[i][GCOMP] +
+ rgba[i][BCOMP]);
+ dst[i*2+1] = (GLbyte) rgba[i][ACOMP];
+ }
+ break;
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLbyte) (rgba[i][RCOMP] +
+ rgba[i][GCOMP] +
+ rgba[i][BCOMP]);
+ }
+ break;
+ case GL_DUDV_ATI:
+ case GL_DU8DV8_ATI:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT:
+ {
+ GLushort *dst = (GLushort *) dstAddr;
+ switch (dstFormat) {
+ case GL_RED:
+ for (i=0;i<n;i++)
+ CLAMPED_FLOAT_TO_USHORT(dst[i], rgba[i][RCOMP]);
+ break;
+ case GL_GREEN:
+ for (i=0;i<n;i++)
+ CLAMPED_FLOAT_TO_USHORT(dst[i], rgba[i][GCOMP]);
+ break;
+ case GL_BLUE:
+ for (i=0;i<n;i++)
+ CLAMPED_FLOAT_TO_USHORT(dst[i], rgba[i][BCOMP]);
+ break;
+ case GL_ALPHA:
+ for (i=0;i<n;i++)
+ CLAMPED_FLOAT_TO_USHORT(dst[i], rgba[i][ACOMP]);
+ break;
+ case GL_LUMINANCE:
+ for (i=0;i<n;i++)
+ UNCLAMPED_FLOAT_TO_USHORT(dst[i], luminance[i]);
+ break;
+ case GL_LUMINANCE_ALPHA:
+ for (i=0;i<n;i++) {
+ UNCLAMPED_FLOAT_TO_USHORT(dst[i*2+0], luminance[i]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*2+1], rgba[i][ACOMP]);
+ }
+ break;
+ case GL_RG:
+ for (i=0;i<n;i++) {
+ CLAMPED_FLOAT_TO_USHORT(dst[i*2+0], rgba[i][RCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*2+1], rgba[i][GCOMP]);
+ }
+ break;
+ case GL_RGB:
+ for (i=0;i<n;i++) {
+ CLAMPED_FLOAT_TO_USHORT(dst[i*3+0], rgba[i][RCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*3+1], rgba[i][GCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*3+2], rgba[i][BCOMP]);
+ }
+ break;
+ case GL_RGBA:
+ for (i=0;i<n;i++) {
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+0], rgba[i][RCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+1], rgba[i][GCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+2], rgba[i][BCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+3], rgba[i][ACOMP]);
+ }
+ break;
+ case GL_BGR:
+ for (i=0;i<n;i++) {
+ CLAMPED_FLOAT_TO_USHORT(dst[i*3+0], rgba[i][BCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*3+1], rgba[i][GCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*3+2], rgba[i][RCOMP]);
+ }
+ break;
+ case GL_BGRA:
+ for (i=0;i<n;i++) {
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+0], rgba[i][BCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+1], rgba[i][GCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+2], rgba[i][RCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+3], rgba[i][ACOMP]);
+ }
+ break;
+ case GL_ABGR_EXT:
+ for (i=0;i<n;i++) {
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+0], rgba[i][ACOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+1], rgba[i][BCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+2], rgba[i][GCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+3], rgba[i][RCOMP]);
+ }
+ break;
+ case GL_RED_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLushort) rgba[i][RCOMP];
+ }
+ break;
+ case GL_GREEN_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLushort) rgba[i][GCOMP];
+ }
+ break;
+ case GL_BLUE_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLushort) rgba[i][BCOMP];
+ }
+ break;
+ case GL_ALPHA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLushort) rgba[i][ACOMP];
+ }
+ break;
+ case GL_RGB_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLushort) rgba[i][RCOMP];
+ dst[i*3+1] = (GLushort) rgba[i][GCOMP];
+ dst[i*3+2] = (GLushort) rgba[i][BCOMP];
+ }
+ break;
+ case GL_RGBA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = (GLushort) rgba[i][RCOMP];
+ dst[i*4+1] = (GLushort) rgba[i][GCOMP];
+ dst[i*4+2] = (GLushort) rgba[i][BCOMP];
+ dst[i*4+3] = (GLushort) rgba[i][ACOMP];
+ }
+ break;
+ case GL_BGR_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLushort) rgba[i][BCOMP];
+ dst[i*3+1] = (GLushort) rgba[i][GCOMP];
+ dst[i*3+2] = (GLushort) rgba[i][RCOMP];
+ }
+ break;
+ case GL_BGRA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = (GLushort) rgba[i][BCOMP];
+ dst[i*4+1] = (GLushort) rgba[i][GCOMP];
+ dst[i*4+2] = (GLushort) rgba[i][RCOMP];
+ dst[i*4+3] = (GLushort) rgba[i][ACOMP];
+ }
+ break;
+ case GL_LUMINANCE_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = (GLushort) (rgba[i][RCOMP] +
+ rgba[i][GCOMP] +
+ rgba[i][BCOMP]);
+ dst[i*2+1] = (GLushort) rgba[i][ACOMP];
+ }
+ break;
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLushort) (rgba[i][RCOMP] +
+ rgba[i][GCOMP] +
+ rgba[i][BCOMP]);
+ }
+ break;
+ case GL_DUDV_ATI:
+ case GL_DU8DV8_ATI:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_USHORT(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_USHORT(rgba[i][GCOMP]);
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
+ }
+ }
+ break;
+ case GL_SHORT:
+ {
+ GLshort *dst = (GLshort *) dstAddr;
+ switch (dstFormat) {
+ case GL_RED:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
+ break;
+ case GL_GREEN:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
+ break;
+ case GL_BLUE:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_SHORT(rgba[i][BCOMP]);
+ break;
+ case GL_ALPHA:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_SHORT(rgba[i][ACOMP]);
+ break;
+ case GL_LUMINANCE:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_SHORT(luminance[i]);
+ break;
+ case GL_LUMINANCE_ALPHA:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_SHORT(luminance[i]);
+ dst[i*2+1] = FLOAT_TO_SHORT(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_RG:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
+ }
+ break;
+ case GL_RGB:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
+ dst[i*3+1] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
+ dst[i*3+2] = FLOAT_TO_SHORT(rgba[i][BCOMP]);
+ }
+ break;
+ case GL_RGBA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
+ dst[i*4+1] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
+ dst[i*4+2] = FLOAT_TO_SHORT(rgba[i][BCOMP]);
+ dst[i*4+3] = FLOAT_TO_SHORT(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_BGR:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = FLOAT_TO_SHORT(rgba[i][BCOMP]);
+ dst[i*3+1] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
+ dst[i*3+2] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
+ }
+ break;
+ case GL_BGRA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_SHORT(rgba[i][BCOMP]);
+ dst[i*4+1] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
+ dst[i*4+2] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
+ dst[i*4+3] = FLOAT_TO_SHORT(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_ABGR_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_SHORT(rgba[i][ACOMP]);
+ dst[i*4+1] = FLOAT_TO_SHORT(rgba[i][BCOMP]);
+ dst[i*4+2] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
+ dst[i*4+3] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
+ }
+ break;
+ case GL_RED_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLshort) rgba[i][RCOMP];
+ }
+ break;
+ case GL_GREEN_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLshort) rgba[i][GCOMP];
+ }
+ break;
+ case GL_BLUE_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLshort) rgba[i][BCOMP];
+ }
+ break;
+ case GL_ALPHA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLshort) rgba[i][ACOMP];
+ }
+ break;
+ case GL_RGB_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLshort) rgba[i][RCOMP];
+ dst[i*3+1] = (GLshort) rgba[i][GCOMP];
+ dst[i*3+2] = (GLshort) rgba[i][BCOMP];
+ }
+ break;
+ case GL_RGBA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = (GLshort) rgba[i][RCOMP];
+ dst[i*4+1] = (GLshort) rgba[i][GCOMP];
+ dst[i*4+2] = (GLshort) rgba[i][BCOMP];
+ dst[i*4+3] = (GLshort) rgba[i][ACOMP];
+ }
+ break;
+ case GL_BGR_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLshort) rgba[i][BCOMP];
+ dst[i*3+1] = (GLshort) rgba[i][GCOMP];
+ dst[i*3+2] = (GLshort) rgba[i][RCOMP];
+ }
+ break;
+ case GL_BGRA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = (GLshort) rgba[i][BCOMP];
+ dst[i*4+1] = (GLshort) rgba[i][GCOMP];
+ dst[i*4+2] = (GLshort) rgba[i][RCOMP];
+ dst[i*4+3] = (GLshort) rgba[i][ACOMP];
+ }
+ break;
+ case GL_LUMINANCE_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = (GLshort) (rgba[i][RCOMP] +
+ rgba[i][GCOMP] +
+ rgba[i][BCOMP]);
+ dst[i*2+1] = (GLshort) rgba[i][ACOMP];
+ }
+ break;
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLshort) (rgba[i][RCOMP] +
+ rgba[i][GCOMP] +
+ rgba[i][BCOMP]);
+ }
+ break;
+ case GL_DUDV_ATI:
+ case GL_DU8DV8_ATI:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT:
+ {
+ GLuint *dst = (GLuint *) dstAddr;
+ switch (dstFormat) {
+ case GL_RED:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_UINT(rgba[i][RCOMP]);
+ break;
+ case GL_GREEN:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_UINT(rgba[i][GCOMP]);
+ break;
+ case GL_BLUE:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_UINT(rgba[i][BCOMP]);
+ break;
+ case GL_ALPHA:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_UINT(rgba[i][ACOMP]);
+ break;
+ case GL_LUMINANCE:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_UINT(luminance[i]);
+ break;
+ case GL_LUMINANCE_ALPHA:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_UINT(luminance[i]);
+ dst[i*2+1] = FLOAT_TO_UINT(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_RG:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_UINT(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
+ }
+ break;
+ case GL_RGB:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = FLOAT_TO_UINT(rgba[i][RCOMP]);
+ dst[i*3+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
+ dst[i*3+2] = FLOAT_TO_UINT(rgba[i][BCOMP]);
+ }
+ break;
+ case GL_RGBA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_UINT(rgba[i][RCOMP]);
+ dst[i*4+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
+ dst[i*4+2] = FLOAT_TO_UINT(rgba[i][BCOMP]);
+ dst[i*4+3] = FLOAT_TO_UINT(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_BGR:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = FLOAT_TO_UINT(rgba[i][BCOMP]);
+ dst[i*3+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
+ dst[i*3+2] = FLOAT_TO_UINT(rgba[i][RCOMP]);
+ }
+ break;
+ case GL_BGRA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_UINT(rgba[i][BCOMP]);
+ dst[i*4+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
+ dst[i*4+2] = FLOAT_TO_UINT(rgba[i][RCOMP]);
+ dst[i*4+3] = FLOAT_TO_UINT(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_ABGR_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_UINT(rgba[i][ACOMP]);
+ dst[i*4+1] = FLOAT_TO_UINT(rgba[i][BCOMP]);
+ dst[i*4+2] = FLOAT_TO_UINT(rgba[i][GCOMP]);
+ dst[i*4+3] = FLOAT_TO_UINT(rgba[i][RCOMP]);
+ }
+ break;
+ case GL_RED_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLuint) rgba[i][RCOMP];
+ }
+ break;
+ case GL_GREEN_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLuint) rgba[i][GCOMP];
+ }
+ break;
+ case GL_BLUE_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLuint) rgba[i][BCOMP];
+ }
+ break;
+ case GL_ALPHA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLuint) rgba[i][ACOMP];
+ }
+ break;
+ case GL_RGB_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLuint) rgba[i][RCOMP];
+ dst[i*3+1] = (GLuint) rgba[i][GCOMP];
+ dst[i*3+2] = (GLuint) rgba[i][BCOMP];
+ }
+ break;
+ case GL_RGBA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = (GLuint) rgba[i][RCOMP];
+ dst[i*4+1] = (GLuint) rgba[i][GCOMP];
+ dst[i*4+2] = (GLuint) rgba[i][BCOMP];
+ dst[i*4+3] = (GLuint) rgba[i][ACOMP];
+ }
+ break;
+ case GL_BGR_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLuint) rgba[i][BCOMP];
+ dst[i*3+1] = (GLuint) rgba[i][GCOMP];
+ dst[i*3+2] = (GLuint) rgba[i][RCOMP];
+ }
+ break;
+ case GL_BGRA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = (GLuint) rgba[i][BCOMP];
+ dst[i*4+1] = (GLuint) rgba[i][GCOMP];
+ dst[i*4+2] = (GLuint) rgba[i][RCOMP];
+ dst[i*4+3] = (GLuint) rgba[i][ACOMP];
+ }
+ break;
+ case GL_LUMINANCE_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = (GLuint) (rgba[i][RCOMP] +
+ rgba[i][GCOMP] +
+ rgba[i][BCOMP]);
+ dst[i*2+1] = (GLuint) rgba[i][ACOMP];
+ }
+ break;
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLuint) (rgba[i][RCOMP] +
+ rgba[i][GCOMP] +
+ rgba[i][BCOMP]);
+ }
+ break;
+ case GL_DUDV_ATI:
+ case GL_DU8DV8_ATI:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_UINT(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
+ }
+ }
+ break;
+ case GL_INT:
+ {
+ GLint *dst = (GLint *) dstAddr;
+ switch (dstFormat) {
+ case GL_RED:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_INT(rgba[i][RCOMP]);
+ break;
+ case GL_GREEN:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_INT(rgba[i][GCOMP]);
+ break;
+ case GL_BLUE:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_INT(rgba[i][BCOMP]);
+ break;
+ case GL_ALPHA:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_INT(rgba[i][ACOMP]);
+ break;
+ case GL_LUMINANCE:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_INT(luminance[i]);
+ break;
+ case GL_LUMINANCE_ALPHA:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_INT(luminance[i]);
+ dst[i*2+1] = FLOAT_TO_INT(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_RG:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_INT(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
+ }
+ break;
+ case GL_RGB:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = FLOAT_TO_INT(rgba[i][RCOMP]);
+ dst[i*3+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
+ dst[i*3+2] = FLOAT_TO_INT(rgba[i][BCOMP]);
+ }
+ break;
+ case GL_RGBA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_INT(rgba[i][RCOMP]);
+ dst[i*4+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
+ dst[i*4+2] = FLOAT_TO_INT(rgba[i][BCOMP]);
+ dst[i*4+3] = FLOAT_TO_INT(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_BGR:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = FLOAT_TO_INT(rgba[i][BCOMP]);
+ dst[i*3+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
+ dst[i*3+2] = FLOAT_TO_INT(rgba[i][RCOMP]);
+ }
+ break;
+ case GL_BGRA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_INT(rgba[i][BCOMP]);
+ dst[i*4+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
+ dst[i*4+2] = FLOAT_TO_INT(rgba[i][RCOMP]);
+ dst[i*4+3] = FLOAT_TO_INT(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_ABGR_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_INT(rgba[i][ACOMP]);
+ dst[i*4+1] = FLOAT_TO_INT(rgba[i][BCOMP]);
+ dst[i*4+2] = FLOAT_TO_INT(rgba[i][GCOMP]);
+ dst[i*4+3] = FLOAT_TO_INT(rgba[i][RCOMP]);
+ }
+ break;
+ case GL_DUDV_ATI:
+ case GL_DU8DV8_ATI:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_INT(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
+ }
+ break;
+ case GL_RED_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLint) rgba[i][RCOMP];
+ }
+ break;
+ case GL_GREEN_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLint) rgba[i][GCOMP];
+ }
+ break;
+ case GL_BLUE_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLint) rgba[i][BCOMP];
+ }
+ break;
+ case GL_ALPHA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLint) rgba[i][ACOMP];
+ }
+ break;
+ case GL_RGB_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLint) rgba[i][RCOMP];
+ dst[i*3+1] = (GLint) rgba[i][GCOMP];
+ dst[i*3+2] = (GLint) rgba[i][BCOMP];
+ }
+ break;
+ case GL_RGBA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = (GLint) rgba[i][RCOMP];
+ dst[i*4+1] = (GLint) rgba[i][GCOMP];
+ dst[i*4+2] = (GLint) rgba[i][BCOMP];
+ dst[i*4+3] = (GLint) rgba[i][ACOMP];
+ }
+ break;
+ case GL_BGR_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLint) rgba[i][BCOMP];
+ dst[i*3+1] = (GLint) rgba[i][GCOMP];
+ dst[i*3+2] = (GLint) rgba[i][RCOMP];
+ }
+ break;
+ case GL_BGRA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = (GLint) rgba[i][BCOMP];
+ dst[i*4+1] = (GLint) rgba[i][GCOMP];
+ dst[i*4+2] = (GLint) rgba[i][RCOMP];
+ dst[i*4+3] = (GLint) rgba[i][ACOMP];
+ }
+ break;
+ case GL_LUMINANCE_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = (GLint) (rgba[i][RCOMP] +
+ rgba[i][GCOMP] +
+ rgba[i][BCOMP]);
+ dst[i*2+1] = (GLint) rgba[i][ACOMP];
+ }
+ break;
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLint) (rgba[i][RCOMP] +
+ rgba[i][GCOMP] +
+ rgba[i][BCOMP]);
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
+ }
+ }
+ break;
+ case GL_FLOAT:
+ {
+ GLfloat *dst = (GLfloat *) dstAddr;
+ switch (dstFormat) {
+ case GL_RED:
+ for (i=0;i<n;i++)
+ dst[i] = rgba[i][RCOMP];
+ break;
+ case GL_GREEN:
+ for (i=0;i<n;i++)
+ dst[i] = rgba[i][GCOMP];
+ break;
+ case GL_BLUE:
+ for (i=0;i<n;i++)
+ dst[i] = rgba[i][BCOMP];
+ break;
+ case GL_ALPHA:
+ for (i=0;i<n;i++)
+ dst[i] = rgba[i][ACOMP];
+ break;
+ case GL_LUMINANCE:
+ for (i=0;i<n;i++)
+ dst[i] = luminance[i];
+ break;
+ case GL_LUMINANCE_ALPHA:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = luminance[i];
+ dst[i*2+1] = rgba[i][ACOMP];
+ }
+ break;
+ case GL_RG:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = rgba[i][RCOMP];
+ dst[i*2+1] = rgba[i][GCOMP];
+ }
+ break;
+ case GL_RGB:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = rgba[i][RCOMP];
+ dst[i*3+1] = rgba[i][GCOMP];
+ dst[i*3+2] = rgba[i][BCOMP];
+ }
+ break;
+ case GL_RGBA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = rgba[i][RCOMP];
+ dst[i*4+1] = rgba[i][GCOMP];
+ dst[i*4+2] = rgba[i][BCOMP];
+ dst[i*4+3] = rgba[i][ACOMP];
+ }
+ break;
+ case GL_BGR:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = rgba[i][BCOMP];
+ dst[i*3+1] = rgba[i][GCOMP];
+ dst[i*3+2] = rgba[i][RCOMP];
+ }
+ break;
+ case GL_BGRA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = rgba[i][BCOMP];
+ dst[i*4+1] = rgba[i][GCOMP];
+ dst[i*4+2] = rgba[i][RCOMP];
+ dst[i*4+3] = rgba[i][ACOMP];
+ }
+ break;
+ case GL_ABGR_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = rgba[i][ACOMP];
+ dst[i*4+1] = rgba[i][BCOMP];
+ dst[i*4+2] = rgba[i][GCOMP];
+ dst[i*4+3] = rgba[i][RCOMP];
+ }
+ break;
+ case GL_DUDV_ATI:
+ case GL_DU8DV8_ATI:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = rgba[i][RCOMP];
+ dst[i*2+1] = rgba[i][GCOMP];
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
+ }
+ }
+ break;
+ case GL_HALF_FLOAT_ARB:
+ {
+ GLhalfARB *dst = (GLhalfARB *) dstAddr;
+ switch (dstFormat) {
+ case GL_RED:
+ for (i=0;i<n;i++)
+ dst[i] = _mesa_float_to_half(rgba[i][RCOMP]);
+ break;
+ case GL_GREEN:
+ for (i=0;i<n;i++)
+ dst[i] = _mesa_float_to_half(rgba[i][GCOMP]);
+ break;
+ case GL_BLUE:
+ for (i=0;i<n;i++)
+ dst[i] = _mesa_float_to_half(rgba[i][BCOMP]);
+ break;
+ case GL_ALPHA:
+ for (i=0;i<n;i++)
+ dst[i] = _mesa_float_to_half(rgba[i][ACOMP]);
+ break;
+ case GL_LUMINANCE:
+ for (i=0;i<n;i++)
+ dst[i] = _mesa_float_to_half(luminance[i]);
+ break;
+ case GL_LUMINANCE_ALPHA:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = _mesa_float_to_half(luminance[i]);
+ dst[i*2+1] = _mesa_float_to_half(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_RG:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = _mesa_float_to_half(rgba[i][RCOMP]);
+ dst[i*2+1] = _mesa_float_to_half(rgba[i][GCOMP]);
+ }
+ break;
+ case GL_RGB:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = _mesa_float_to_half(rgba[i][RCOMP]);
+ dst[i*3+1] = _mesa_float_to_half(rgba[i][GCOMP]);
+ dst[i*3+2] = _mesa_float_to_half(rgba[i][BCOMP]);
+ }
+ break;
+ case GL_RGBA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = _mesa_float_to_half(rgba[i][RCOMP]);
+ dst[i*4+1] = _mesa_float_to_half(rgba[i][GCOMP]);
+ dst[i*4+2] = _mesa_float_to_half(rgba[i][BCOMP]);
+ dst[i*4+3] = _mesa_float_to_half(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_BGR:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = _mesa_float_to_half(rgba[i][BCOMP]);
+ dst[i*3+1] = _mesa_float_to_half(rgba[i][GCOMP]);
+ dst[i*3+2] = _mesa_float_to_half(rgba[i][RCOMP]);
+ }
+ break;
+ case GL_BGRA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = _mesa_float_to_half(rgba[i][BCOMP]);
+ dst[i*4+1] = _mesa_float_to_half(rgba[i][GCOMP]);
+ dst[i*4+2] = _mesa_float_to_half(rgba[i][RCOMP]);
+ dst[i*4+3] = _mesa_float_to_half(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_ABGR_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = _mesa_float_to_half(rgba[i][ACOMP]);
+ dst[i*4+1] = _mesa_float_to_half(rgba[i][BCOMP]);
+ dst[i*4+2] = _mesa_float_to_half(rgba[i][GCOMP]);
+ dst[i*4+3] = _mesa_float_to_half(rgba[i][RCOMP]);
+ }
+ break;
+ case GL_DUDV_ATI:
+ case GL_DU8DV8_ATI:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = _mesa_float_to_half(rgba[i][RCOMP]);
+ dst[i*2+1] = _mesa_float_to_half(rgba[i][GCOMP]);
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
+ }
+ }
+ break;
+ case GL_UNSIGNED_BYTE_3_3_2:
+ if (dstFormat == GL_RGB) {
+ GLubyte *dst = (GLubyte *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][RCOMP] * 7.0F) << 5)
+ | (IROUND(rgba[i][GCOMP] * 7.0F) << 2)
+ | (IROUND(rgba[i][BCOMP] * 3.0F) );
+ }
+ }
+ break;
+ case GL_UNSIGNED_BYTE_2_3_3_REV:
+ if (dstFormat == GL_RGB) {
+ GLubyte *dst = (GLubyte *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][RCOMP] * 7.0F) )
+ | (IROUND(rgba[i][GCOMP] * 7.0F) << 3)
+ | (IROUND(rgba[i][BCOMP] * 3.0F) << 6);
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_5_6_5:
+ if (dstFormat == GL_RGB) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][RCOMP] * 31.0F) << 11)
+ | (IROUND(rgba[i][GCOMP] * 63.0F) << 5)
+ | (IROUND(rgba[i][BCOMP] * 31.0F) );
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_5_6_5_REV:
+ if (dstFormat == GL_RGB) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][RCOMP] * 31.0F) )
+ | (IROUND(rgba[i][GCOMP] * 63.0F) << 5)
+ | (IROUND(rgba[i][BCOMP] * 31.0F) << 11);
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_4_4_4_4:
+ if (dstFormat == GL_RGBA) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][RCOMP] * 15.0F) << 12)
+ | (IROUND(rgba[i][GCOMP] * 15.0F) << 8)
+ | (IROUND(rgba[i][BCOMP] * 15.0F) << 4)
+ | (IROUND(rgba[i][ACOMP] * 15.0F) );
+ }
+ }
+ else if (dstFormat == GL_BGRA) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][BCOMP] * 15.0F) << 12)
+ | (IROUND(rgba[i][GCOMP] * 15.0F) << 8)
+ | (IROUND(rgba[i][RCOMP] * 15.0F) << 4)
+ | (IROUND(rgba[i][ACOMP] * 15.0F) );
+ }
+ }
+ else if (dstFormat == GL_ABGR_EXT) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][ACOMP] * 15.0F) << 12)
+ | (IROUND(rgba[i][BCOMP] * 15.0F) << 8)
+ | (IROUND(rgba[i][GCOMP] * 15.0F) << 4)
+ | (IROUND(rgba[i][RCOMP] * 15.0F) );
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_4_4_4_4_REV:
+ if (dstFormat == GL_RGBA) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][RCOMP] * 15.0F) )
+ | (IROUND(rgba[i][GCOMP] * 15.0F) << 4)
+ | (IROUND(rgba[i][BCOMP] * 15.0F) << 8)
+ | (IROUND(rgba[i][ACOMP] * 15.0F) << 12);
+ }
+ }
+ else if (dstFormat == GL_BGRA) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][BCOMP] * 15.0F) )
+ | (IROUND(rgba[i][GCOMP] * 15.0F) << 4)
+ | (IROUND(rgba[i][RCOMP] * 15.0F) << 8)
+ | (IROUND(rgba[i][ACOMP] * 15.0F) << 12);
+ }
+ }
+ else if (dstFormat == GL_ABGR_EXT) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][ACOMP] * 15.0F) )
+ | (IROUND(rgba[i][BCOMP] * 15.0F) << 4)
+ | (IROUND(rgba[i][GCOMP] * 15.0F) << 8)
+ | (IROUND(rgba[i][RCOMP] * 15.0F) << 12);
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_5_5_5_1:
+ if (dstFormat == GL_RGBA) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][RCOMP] * 31.0F) << 11)
+ | (IROUND(rgba[i][GCOMP] * 31.0F) << 6)
+ | (IROUND(rgba[i][BCOMP] * 31.0F) << 1)
+ | (IROUND(rgba[i][ACOMP] * 1.0F) );
+ }
+ }
+ else if (dstFormat == GL_BGRA) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][BCOMP] * 31.0F) << 11)
+ | (IROUND(rgba[i][GCOMP] * 31.0F) << 6)
+ | (IROUND(rgba[i][RCOMP] * 31.0F) << 1)
+ | (IROUND(rgba[i][ACOMP] * 1.0F) );
+ }
+ }
+ else if (dstFormat == GL_ABGR_EXT) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][ACOMP] * 31.0F) << 11)
+ | (IROUND(rgba[i][BCOMP] * 31.0F) << 6)
+ | (IROUND(rgba[i][GCOMP] * 31.0F) << 1)
+ | (IROUND(rgba[i][RCOMP] * 1.0F) );
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_1_5_5_5_REV:
+ if (dstFormat == GL_RGBA) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][RCOMP] * 31.0F) )
+ | (IROUND(rgba[i][GCOMP] * 31.0F) << 5)
+ | (IROUND(rgba[i][BCOMP] * 31.0F) << 10)
+ | (IROUND(rgba[i][ACOMP] * 1.0F) << 15);
+ }
+ }
+ else if (dstFormat == GL_BGRA) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][BCOMP] * 31.0F) )
+ | (IROUND(rgba[i][GCOMP] * 31.0F) << 5)
+ | (IROUND(rgba[i][RCOMP] * 31.0F) << 10)
+ | (IROUND(rgba[i][ACOMP] * 1.0F) << 15);
+ }
+ }
+ else if (dstFormat == GL_ABGR_EXT) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][ACOMP] * 31.0F) )
+ | (IROUND(rgba[i][BCOMP] * 31.0F) << 5)
+ | (IROUND(rgba[i][GCOMP] * 31.0F) << 10)
+ | (IROUND(rgba[i][RCOMP] * 1.0F) << 15);
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT_8_8_8_8:
+ if (dstFormat == GL_RGBA) {
+ GLuint *dst = (GLuint *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][RCOMP] * 255.F) << 24)
+ | (IROUND(rgba[i][GCOMP] * 255.F) << 16)
+ | (IROUND(rgba[i][BCOMP] * 255.F) << 8)
+ | (IROUND(rgba[i][ACOMP] * 255.F) );
+ }
+ }
+ else if (dstFormat == GL_BGRA) {
+ GLuint *dst = (GLuint *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][BCOMP] * 255.F) << 24)
+ | (IROUND(rgba[i][GCOMP] * 255.F) << 16)
+ | (IROUND(rgba[i][RCOMP] * 255.F) << 8)
+ | (IROUND(rgba[i][ACOMP] * 255.F) );
+ }
+ }
+ else if (dstFormat == GL_ABGR_EXT) {
+ GLuint *dst = (GLuint *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][ACOMP] * 255.F) << 24)
+ | (IROUND(rgba[i][BCOMP] * 255.F) << 16)
+ | (IROUND(rgba[i][GCOMP] * 255.F) << 8)
+ | (IROUND(rgba[i][RCOMP] * 255.F) );
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT_8_8_8_8_REV:
+ if (dstFormat == GL_RGBA) {
+ GLuint *dst = (GLuint *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][RCOMP] * 255.0F) )
+ | (IROUND(rgba[i][GCOMP] * 255.0F) << 8)
+ | (IROUND(rgba[i][BCOMP] * 255.0F) << 16)
+ | (IROUND(rgba[i][ACOMP] * 255.0F) << 24);
+ }
+ }
+ else if (dstFormat == GL_BGRA) {
+ GLuint *dst = (GLuint *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][BCOMP] * 255.0F) )
+ | (IROUND(rgba[i][GCOMP] * 255.0F) << 8)
+ | (IROUND(rgba[i][RCOMP] * 255.0F) << 16)
+ | (IROUND(rgba[i][ACOMP] * 255.0F) << 24);
+ }
+ }
+ else if (dstFormat == GL_ABGR_EXT) {
+ GLuint *dst = (GLuint *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][ACOMP] * 255.0F) )
+ | (IROUND(rgba[i][BCOMP] * 255.0F) << 8)
+ | (IROUND(rgba[i][GCOMP] * 255.0F) << 16)
+ | (IROUND(rgba[i][RCOMP] * 255.0F) << 24);
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT_10_10_10_2:
+ if (dstFormat == GL_RGBA) {
+ GLuint *dst = (GLuint *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][RCOMP] * 1023.0F) << 22)
+ | (IROUND(rgba[i][GCOMP] * 1023.0F) << 12)
+ | (IROUND(rgba[i][BCOMP] * 1023.0F) << 2)
+ | (IROUND(rgba[i][ACOMP] * 3.0F) );
+ }
+ }
+ else if (dstFormat == GL_BGRA) {
+ GLuint *dst = (GLuint *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][BCOMP] * 1023.0F) << 22)
+ | (IROUND(rgba[i][GCOMP] * 1023.0F) << 12)
+ | (IROUND(rgba[i][RCOMP] * 1023.0F) << 2)
+ | (IROUND(rgba[i][ACOMP] * 3.0F) );
+ }
+ }
+ else if (dstFormat == GL_ABGR_EXT) {
+ GLuint *dst = (GLuint *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][ACOMP] * 1023.0F) << 22)
+ | (IROUND(rgba[i][BCOMP] * 1023.0F) << 12)
+ | (IROUND(rgba[i][GCOMP] * 1023.0F) << 2)
+ | (IROUND(rgba[i][RCOMP] * 3.0F) );
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT_2_10_10_10_REV:
+ if (dstFormat == GL_RGBA) {
+ GLuint *dst = (GLuint *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][RCOMP] * 1023.0F) )
+ | (IROUND(rgba[i][GCOMP] * 1023.0F) << 10)
+ | (IROUND(rgba[i][BCOMP] * 1023.0F) << 20)
+ | (IROUND(rgba[i][ACOMP] * 3.0F) << 30);
+ }
+ }
+ else if (dstFormat == GL_BGRA) {
+ GLuint *dst = (GLuint *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][BCOMP] * 1023.0F) )
+ | (IROUND(rgba[i][GCOMP] * 1023.0F) << 10)
+ | (IROUND(rgba[i][RCOMP] * 1023.0F) << 20)
+ | (IROUND(rgba[i][ACOMP] * 3.0F) << 30);
+ }
+ }
+ else if (dstFormat == GL_ABGR_EXT) {
+ GLuint *dst = (GLuint *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][ACOMP] * 1023.0F) )
+ | (IROUND(rgba[i][BCOMP] * 1023.0F) << 10)
+ | (IROUND(rgba[i][GCOMP] * 1023.0F) << 20)
+ | (IROUND(rgba[i][RCOMP] * 3.0F) << 30);
+ }
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad type in _mesa_pack_rgba_span_float");
+ return;
+ }
+
+ if (dstPacking->SwapBytes) {
+ GLint swapSize = _mesa_sizeof_packed_type(dstType);
+ if (swapSize == 2) {
+ if (dstPacking->SwapBytes) {
+ _mesa_swap2((GLushort *) dstAddr, n * comps);
+ }
+ }
+ else if (swapSize == 4) {
+ if (dstPacking->SwapBytes) {
+ _mesa_swap4((GLuint *) dstAddr, n * comps);
+ }
+ }
+ }
+}
+
+
+
+#define SWAP2BYTE(VALUE) \
+ { \
+ GLubyte *bytes = (GLubyte *) &(VALUE); \
+ GLubyte tmp = bytes[0]; \
+ bytes[0] = bytes[1]; \
+ bytes[1] = tmp; \
+ }
+
+#define SWAP4BYTE(VALUE) \
+ { \
+ GLubyte *bytes = (GLubyte *) &(VALUE); \
+ GLubyte tmp = bytes[0]; \
+ bytes[0] = bytes[3]; \
+ bytes[3] = tmp; \
+ tmp = bytes[1]; \
+ bytes[1] = bytes[2]; \
+ bytes[2] = tmp; \
+ }
+
+
+static void
+extract_uint_indexes(GLuint n, GLuint indexes[],
+ GLenum srcFormat, GLenum srcType, const GLvoid *src,
+ const struct gl_pixelstore_attrib *unpack )
+{
+ ASSERT(srcFormat == GL_COLOR_INDEX || srcFormat == GL_STENCIL_INDEX);
+
+ ASSERT(srcType == GL_BITMAP ||
+ srcType == GL_UNSIGNED_BYTE ||
+ srcType == GL_BYTE ||
+ srcType == GL_UNSIGNED_SHORT ||
+ srcType == GL_SHORT ||
+ srcType == GL_UNSIGNED_INT ||
+ srcType == GL_INT ||
+ srcType == GL_UNSIGNED_INT_24_8_EXT ||
+ srcType == GL_HALF_FLOAT_ARB ||
+ srcType == GL_FLOAT);
+
+ switch (srcType) {
+ case GL_BITMAP:
+ {
+ GLubyte *ubsrc = (GLubyte *) src;
+ if (unpack->LsbFirst) {
+ GLubyte mask = 1 << (unpack->SkipPixels & 0x7);
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ indexes[i] = (*ubsrc & mask) ? 1 : 0;
+ if (mask == 128) {
+ mask = 1;
+ ubsrc++;
+ }
+ else {
+ mask = mask << 1;
+ }
+ }
+ }
+ else {
+ GLubyte mask = 128 >> (unpack->SkipPixels & 0x7);
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ indexes[i] = (*ubsrc & mask) ? 1 : 0;
+ if (mask == 1) {
+ mask = 128;
+ ubsrc++;
+ }
+ else {
+ mask = mask >> 1;
+ }
+ }
+ }
+ }
+ break;
+ case GL_UNSIGNED_BYTE:
+ {
+ GLuint i;
+ const GLubyte *s = (const GLubyte *) src;
+ for (i = 0; i < n; i++)
+ indexes[i] = s[i];
+ }
+ break;
+ case GL_BYTE:
+ {
+ GLuint i;
+ const GLbyte *s = (const GLbyte *) src;
+ for (i = 0; i < n; i++)
+ indexes[i] = s[i];
+ }
+ break;
+ case GL_UNSIGNED_SHORT:
+ {
+ GLuint i;
+ const GLushort *s = (const GLushort *) src;
+ if (unpack->SwapBytes) {
+ for (i = 0; i < n; i++) {
+ GLushort value = s[i];
+ SWAP2BYTE(value);
+ indexes[i] = value;
+ }
+ }
+ else {
+ for (i = 0; i < n; i++)
+ indexes[i] = s[i];
+ }
+ }
+ break;
+ case GL_SHORT:
+ {
+ GLuint i;
+ const GLshort *s = (const GLshort *) src;
+ if (unpack->SwapBytes) {
+ for (i = 0; i < n; i++) {
+ GLshort value = s[i];
+ SWAP2BYTE(value);
+ indexes[i] = value;
+ }
+ }
+ else {
+ for (i = 0; i < n; i++)
+ indexes[i] = s[i];
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT:
+ {
+ GLuint i;
+ const GLuint *s = (const GLuint *) src;
+ if (unpack->SwapBytes) {
+ for (i = 0; i < n; i++) {
+ GLuint value = s[i];
+ SWAP4BYTE(value);
+ indexes[i] = value;
+ }
+ }
+ else {
+ for (i = 0; i < n; i++)
+ indexes[i] = s[i];
+ }
+ }
+ break;
+ case GL_INT:
+ {
+ GLuint i;
+ const GLint *s = (const GLint *) src;
+ if (unpack->SwapBytes) {
+ for (i = 0; i < n; i++) {
+ GLint value = s[i];
+ SWAP4BYTE(value);
+ indexes[i] = value;
+ }
+ }
+ else {
+ for (i = 0; i < n; i++)
+ indexes[i] = s[i];
+ }
+ }
+ break;
+ case GL_FLOAT:
+ {
+ GLuint i;
+ const GLfloat *s = (const GLfloat *) src;
+ if (unpack->SwapBytes) {
+ for (i = 0; i < n; i++) {
+ GLfloat value = s[i];
+ SWAP4BYTE(value);
+ indexes[i] = (GLuint) value;
+ }
+ }
+ else {
+ for (i = 0; i < n; i++)
+ indexes[i] = (GLuint) s[i];
+ }
+ }
+ break;
+ case GL_HALF_FLOAT_ARB:
+ {
+ GLuint i;
+ const GLhalfARB *s = (const GLhalfARB *) src;
+ if (unpack->SwapBytes) {
+ for (i = 0; i < n; i++) {
+ GLhalfARB value = s[i];
+ SWAP2BYTE(value);
+ indexes[i] = (GLuint) _mesa_half_to_float(value);
+ }
+ }
+ else {
+ for (i = 0; i < n; i++)
+ indexes[i] = (GLuint) _mesa_half_to_float(s[i]);
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT_24_8_EXT:
+ {
+ GLuint i;
+ const GLuint *s = (const GLuint *) src;
+ if (unpack->SwapBytes) {
+ for (i = 0; i < n; i++) {
+ GLuint value = s[i];
+ SWAP4BYTE(value);
+ indexes[i] = value & 0xff; /* lower 8 bits */
+ }
+ }
+ else {
+ for (i = 0; i < n; i++)
+ indexes[i] = s[i] & 0xff; /* lower 8 bits */
+ }
+ }
+ break;
+
+ default:
+ _mesa_problem(NULL, "bad srcType in extract_uint_indexes");
+ return;
+ }
+}
+
+
+/*
+ * This function extracts floating point RGBA values from arbitrary
+ * image data. srcFormat and srcType are the format and type parameters
+ * passed to glDrawPixels, glTexImage[123]D, glTexSubImage[123]D, etc.
+ *
+ * Refering to section 3.6.4 of the OpenGL 1.2 spec, this function
+ * implements the "Conversion to floating point", "Conversion to RGB",
+ * and "Final Expansion to RGBA" operations.
+ *
+ * Args: n - number of pixels
+ * rgba - output colors
+ * srcFormat - format of incoming data
+ * srcType - data type of incoming data
+ * src - source data pointer
+ * swapBytes - perform byteswapping of incoming data?
+ */
+static void
+extract_float_rgba(GLuint n, GLfloat rgba[][4],
+ GLenum srcFormat, GLenum srcType, const GLvoid *src,
+ GLboolean swapBytes)
+{
+ GLint redIndex, greenIndex, blueIndex, alphaIndex;
+ GLint stride;
+ GLint rComp, bComp, gComp, aComp;
+ GLboolean intFormat;
+ GLfloat rs = 1.0f, gs = 1.0f, bs = 1.0f, as = 1.0f; /* scale factors */
+
+ ASSERT(srcFormat == GL_RED ||
+ srcFormat == GL_GREEN ||
+ srcFormat == GL_BLUE ||
+ srcFormat == GL_ALPHA ||
+ srcFormat == GL_LUMINANCE ||
+ srcFormat == GL_LUMINANCE_ALPHA ||
+ srcFormat == GL_INTENSITY ||
+ srcFormat == GL_RG ||
+ srcFormat == GL_RGB ||
+ srcFormat == GL_BGR ||
+ srcFormat == GL_RGBA ||
+ srcFormat == GL_BGRA ||
+ srcFormat == GL_ABGR_EXT ||
+ srcFormat == GL_DU8DV8_ATI ||
+ srcFormat == GL_DUDV_ATI ||
+ srcFormat == GL_RED_INTEGER_EXT ||
+ srcFormat == GL_GREEN_INTEGER_EXT ||
+ srcFormat == GL_BLUE_INTEGER_EXT ||
+ srcFormat == GL_ALPHA_INTEGER_EXT ||
+ srcFormat == GL_RGB_INTEGER_EXT ||
+ srcFormat == GL_RGBA_INTEGER_EXT ||
+ srcFormat == GL_BGR_INTEGER_EXT ||
+ srcFormat == GL_BGRA_INTEGER_EXT ||
+ srcFormat == GL_LUMINANCE_INTEGER_EXT ||
+ srcFormat == GL_LUMINANCE_ALPHA_INTEGER_EXT);
+
+ ASSERT(srcType == GL_UNSIGNED_BYTE ||
+ srcType == GL_BYTE ||
+ srcType == GL_UNSIGNED_SHORT ||
+ srcType == GL_SHORT ||
+ srcType == GL_UNSIGNED_INT ||
+ srcType == GL_INT ||
+ srcType == GL_HALF_FLOAT_ARB ||
+ srcType == GL_FLOAT ||
+ srcType == GL_UNSIGNED_BYTE_3_3_2 ||
+ srcType == GL_UNSIGNED_BYTE_2_3_3_REV ||
+ srcType == GL_UNSIGNED_SHORT_5_6_5 ||
+ srcType == GL_UNSIGNED_SHORT_5_6_5_REV ||
+ srcType == GL_UNSIGNED_SHORT_4_4_4_4 ||
+ srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV ||
+ srcType == GL_UNSIGNED_SHORT_5_5_5_1 ||
+ srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8 ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8_REV ||
+ srcType == GL_UNSIGNED_INT_10_10_10_2 ||
+ srcType == GL_UNSIGNED_INT_2_10_10_10_REV);
+
+ rComp = gComp = bComp = aComp = -1;
+
+ switch (srcFormat) {
+ case GL_RED:
+ case GL_RED_INTEGER_EXT:
+ redIndex = 0;
+ greenIndex = blueIndex = alphaIndex = -1;
+ stride = 1;
+ break;
+ case GL_GREEN:
+ case GL_GREEN_INTEGER_EXT:
+ greenIndex = 0;
+ redIndex = blueIndex = alphaIndex = -1;
+ stride = 1;
+ break;
+ case GL_BLUE:
+ case GL_BLUE_INTEGER_EXT:
+ blueIndex = 0;
+ redIndex = greenIndex = alphaIndex = -1;
+ stride = 1;
+ break;
+ case GL_ALPHA:
+ case GL_ALPHA_INTEGER_EXT:
+ redIndex = greenIndex = blueIndex = -1;
+ alphaIndex = 0;
+ stride = 1;
+ break;
+ case GL_LUMINANCE:
+ case GL_LUMINANCE_INTEGER_EXT:
+ redIndex = greenIndex = blueIndex = 0;
+ alphaIndex = -1;
+ stride = 1;
+ break;
+ case GL_LUMINANCE_ALPHA:
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ redIndex = greenIndex = blueIndex = 0;
+ alphaIndex = 1;
+ stride = 2;
+ break;
+ case GL_INTENSITY:
+ redIndex = greenIndex = blueIndex = alphaIndex = 0;
+ stride = 1;
+ break;
+ case GL_RG:
+ case GL_RG_INTEGER:
+ redIndex = 0;
+ greenIndex = 1;
+ blueIndex = -1;
+ alphaIndex = -1;
+ rComp = 0;
+ gComp = 1;
+ bComp = 2;
+ aComp = 3;
+ stride = 2;
+ break;
+ case GL_RGB:
+ case GL_RGB_INTEGER:
+ redIndex = 0;
+ greenIndex = 1;
+ blueIndex = 2;
+ alphaIndex = -1;
+ rComp = 0;
+ gComp = 1;
+ bComp = 2;
+ aComp = 3;
+ stride = 3;
+ break;
+ case GL_BGR:
+ redIndex = 2;
+ greenIndex = 1;
+ blueIndex = 0;
+ alphaIndex = -1;
+ rComp = 2;
+ gComp = 1;
+ bComp = 0;
+ aComp = 3;
+ stride = 3;
+ break;
+ case GL_RGBA:
+ case GL_RGBA_INTEGER:
+ redIndex = 0;
+ greenIndex = 1;
+ blueIndex = 2;
+ alphaIndex = 3;
+ rComp = 0;
+ gComp = 1;
+ bComp = 2;
+ aComp = 3;
+ stride = 4;
+ break;
+ case GL_BGRA:
+ redIndex = 2;
+ greenIndex = 1;
+ blueIndex = 0;
+ alphaIndex = 3;
+ rComp = 2;
+ gComp = 1;
+ bComp = 0;
+ aComp = 3;
+ stride = 4;
+ break;
+ case GL_ABGR_EXT:
+ redIndex = 3;
+ greenIndex = 2;
+ blueIndex = 1;
+ alphaIndex = 0;
+ rComp = 3;
+ gComp = 2;
+ bComp = 1;
+ aComp = 0;
+ stride = 4;
+ break;
+ case GL_DU8DV8_ATI:
+ case GL_DUDV_ATI:
+ redIndex = 0;
+ greenIndex = 1;
+ blueIndex = -1;
+ alphaIndex = -1;
+ stride = 2;
+ break;
+ default:
+ _mesa_problem(NULL, "bad srcFormat %s in extract float data",
+ _mesa_lookup_enum_by_nr(srcFormat));
+ return;
+ }
+
+ intFormat = _mesa_is_integer_format(srcFormat);
+
+#define PROCESS(INDEX, CHANNEL, DEFAULT, DEFAULT_INT, TYPE, CONVERSION) \
+ if ((INDEX) < 0) { \
+ GLuint i; \
+ if (intFormat) { \
+ for (i = 0; i < n; i++) { \
+ rgba[i][CHANNEL] = DEFAULT_INT; \
+ } \
+ } \
+ else { \
+ for (i = 0; i < n; i++) { \
+ rgba[i][CHANNEL] = DEFAULT; \
+ } \
+ } \
+ } \
+ else if (swapBytes) { \
+ const TYPE *s = (const TYPE *) src; \
+ GLuint i; \
+ for (i = 0; i < n; i++) { \
+ TYPE value = s[INDEX]; \
+ if (sizeof(TYPE) == 2) { \
+ SWAP2BYTE(value); \
+ } \
+ else if (sizeof(TYPE) == 4) { \
+ SWAP4BYTE(value); \
+ } \
+ if (intFormat) \
+ rgba[i][CHANNEL] = (GLfloat) value; \
+ else \
+ rgba[i][CHANNEL] = (GLfloat) CONVERSION(value); \
+ s += stride; \
+ } \
+ } \
+ else { \
+ const TYPE *s = (const TYPE *) src; \
+ GLuint i; \
+ if (intFormat) { \
+ for (i = 0; i < n; i++) { \
+ rgba[i][CHANNEL] = (GLfloat) s[INDEX]; \
+ s += stride; \
+ } \
+ } \
+ else { \
+ for (i = 0; i < n; i++) { \
+ rgba[i][CHANNEL] = (GLfloat) CONVERSION(s[INDEX]); \
+ s += stride; \
+ } \
+ } \
+ }
+
+ switch (srcType) {
+ case GL_UNSIGNED_BYTE:
+ PROCESS(redIndex, RCOMP, 0.0F, 0, GLubyte, UBYTE_TO_FLOAT);
+ PROCESS(greenIndex, GCOMP, 0.0F, 0, GLubyte, UBYTE_TO_FLOAT);
+ PROCESS(blueIndex, BCOMP, 0.0F, 0, GLubyte, UBYTE_TO_FLOAT);
+ PROCESS(alphaIndex, ACOMP, 1.0F, 255, GLubyte, UBYTE_TO_FLOAT);
+ break;
+ case GL_BYTE:
+ PROCESS(redIndex, RCOMP, 0.0F, 0, GLbyte, BYTE_TO_FLOAT);
+ PROCESS(greenIndex, GCOMP, 0.0F, 0, GLbyte, BYTE_TO_FLOAT);
+ PROCESS(blueIndex, BCOMP, 0.0F, 0, GLbyte, BYTE_TO_FLOAT);
+ PROCESS(alphaIndex, ACOMP, 1.0F, 127, GLbyte, BYTE_TO_FLOAT);
+ break;
+ case GL_UNSIGNED_SHORT:
+ PROCESS(redIndex, RCOMP, 0.0F, 0, GLushort, USHORT_TO_FLOAT);
+ PROCESS(greenIndex, GCOMP, 0.0F, 0, GLushort, USHORT_TO_FLOAT);
+ PROCESS(blueIndex, BCOMP, 0.0F, 0, GLushort, USHORT_TO_FLOAT);
+ PROCESS(alphaIndex, ACOMP, 1.0F, 0xffff, GLushort, USHORT_TO_FLOAT);
+ break;
+ case GL_SHORT:
+ PROCESS(redIndex, RCOMP, 0.0F, 0, GLshort, SHORT_TO_FLOAT);
+ PROCESS(greenIndex, GCOMP, 0.0F, 0, GLshort, SHORT_TO_FLOAT);
+ PROCESS(blueIndex, BCOMP, 0.0F, 0, GLshort, SHORT_TO_FLOAT);
+ PROCESS(alphaIndex, ACOMP, 1.0F, 32767, GLshort, SHORT_TO_FLOAT);
+ break;
+ case GL_UNSIGNED_INT:
+ PROCESS(redIndex, RCOMP, 0.0F, 0, GLuint, UINT_TO_FLOAT);
+ PROCESS(greenIndex, GCOMP, 0.0F, 0, GLuint, UINT_TO_FLOAT);
+ PROCESS(blueIndex, BCOMP, 0.0F, 0, GLuint, UINT_TO_FLOAT);
+ PROCESS(alphaIndex, ACOMP, 1.0F, 0xffffffff, GLuint, UINT_TO_FLOAT);
+ break;
+ case GL_INT:
+ PROCESS(redIndex, RCOMP, 0.0F, 0, GLint, INT_TO_FLOAT);
+ PROCESS(greenIndex, GCOMP, 0.0F, 0, GLint, INT_TO_FLOAT);
+ PROCESS(blueIndex, BCOMP, 0.0F, 0, GLint, INT_TO_FLOAT);
+ PROCESS(alphaIndex, ACOMP, 1.0F, 2147483647, GLint, INT_TO_FLOAT);
+ break;
+ case GL_FLOAT:
+ PROCESS(redIndex, RCOMP, 0.0F, 0.0F, GLfloat, (GLfloat));
+ PROCESS(greenIndex, GCOMP, 0.0F, 0.0F, GLfloat, (GLfloat));
+ PROCESS(blueIndex, BCOMP, 0.0F, 0.0F, GLfloat, (GLfloat));
+ PROCESS(alphaIndex, ACOMP, 1.0F, 1.0F, GLfloat, (GLfloat));
+ break;
+ case GL_HALF_FLOAT_ARB:
+ PROCESS(redIndex, RCOMP, 0.0F, 0.0F, GLhalfARB, _mesa_half_to_float);
+ PROCESS(greenIndex, GCOMP, 0.0F, 0.0F, GLhalfARB, _mesa_half_to_float);
+ PROCESS(blueIndex, BCOMP, 0.0F, 0.0F, GLhalfARB, _mesa_half_to_float);
+ PROCESS(alphaIndex, ACOMP, 1.0F, 1.0F, GLhalfARB, _mesa_half_to_float);
+ break;
+ case GL_UNSIGNED_BYTE_3_3_2:
+ {
+ const GLubyte *ubsrc = (const GLubyte *) src;
+ GLuint i;
+ if (!intFormat) {
+ rs = 1.0F / 7.0F;
+ gs = 1.0F / 7.0F;
+ bs = 1.0F / 3.0F;
+ }
+ for (i = 0; i < n; i ++) {
+ GLubyte p = ubsrc[i];
+ rgba[i][rComp] = ((p >> 5) ) * rs;
+ rgba[i][gComp] = ((p >> 2) & 0x7) * gs;
+ rgba[i][bComp] = ((p ) & 0x3) * bs;
+ rgba[i][aComp] = 1.0F;
+ }
+ }
+ break;
+ case GL_UNSIGNED_BYTE_2_3_3_REV:
+ {
+ const GLubyte *ubsrc = (const GLubyte *) src;
+ GLuint i;
+ if (!intFormat) {
+ rs = 1.0F / 7.0F;
+ gs = 1.0F / 7.0F;
+ bs = 1.0F / 3.0F;
+ }
+ for (i = 0; i < n; i ++) {
+ GLubyte p = ubsrc[i];
+ rgba[i][rComp] = ((p ) & 0x7) * rs;
+ rgba[i][gComp] = ((p >> 3) & 0x7) * gs;
+ rgba[i][bComp] = ((p >> 6) ) * bs;
+ rgba[i][aComp] = 1.0F;
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_5_6_5:
+ if (!intFormat) {
+ rs = 1.0F / 31.0F;
+ gs = 1.0F / 63.0F;
+ bs = 1.0F / 31.0F;
+ }
+ if (swapBytes) {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ SWAP2BYTE(p);
+ rgba[i][rComp] = ((p >> 11) ) * rs;
+ rgba[i][gComp] = ((p >> 5) & 0x3f) * gs;
+ rgba[i][bComp] = ((p ) & 0x1f) * bs;
+ rgba[i][aComp] = 1.0F;
+ }
+ }
+ else {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ rgba[i][rComp] = ((p >> 11) ) * rs;
+ rgba[i][gComp] = ((p >> 5) & 0x3f) * gs;
+ rgba[i][bComp] = ((p ) & 0x1f) * bs;
+ rgba[i][aComp] = 1.0F;
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_5_6_5_REV:
+ if (!intFormat) {
+ rs = 1.0F / 31.0F;
+ gs = 1.0F / 63.0F;
+ bs = 1.0F / 31.0F;
+ }
+ if (swapBytes) {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ SWAP2BYTE(p);
+ rgba[i][rComp] = ((p ) & 0x1f) * rs;
+ rgba[i][gComp] = ((p >> 5) & 0x3f) * gs;
+ rgba[i][bComp] = ((p >> 11) ) * bs;
+ rgba[i][aComp] = 1.0F;
+ }
+ }
+ else {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ rgba[i][rComp] = ((p ) & 0x1f) * rs;
+ rgba[i][gComp] = ((p >> 5) & 0x3f) * gs;
+ rgba[i][bComp] = ((p >> 11) ) * bs;
+ rgba[i][aComp] = 1.0F;
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_4_4_4_4:
+ if (!intFormat) {
+ rs = gs = bs = as = 1.0F / 15.0F;
+ }
+ if (swapBytes) {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ SWAP2BYTE(p);
+ rgba[i][rComp] = ((p >> 12) ) * rs;
+ rgba[i][gComp] = ((p >> 8) & 0xf) * gs;
+ rgba[i][bComp] = ((p >> 4) & 0xf) * bs;
+ rgba[i][aComp] = ((p ) & 0xf) * as;
+ }
+ }
+ else {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ rgba[i][rComp] = ((p >> 12) ) * rs;
+ rgba[i][gComp] = ((p >> 8) & 0xf) * gs;
+ rgba[i][bComp] = ((p >> 4) & 0xf) * bs;
+ rgba[i][aComp] = ((p ) & 0xf) * as;
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_4_4_4_4_REV:
+ if (!intFormat) {
+ rs = gs = bs = as = 1.0F / 15.0F;
+ }
+ if (swapBytes) {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ SWAP2BYTE(p);
+ rgba[i][rComp] = ((p ) & 0xf) * rs;
+ rgba[i][gComp] = ((p >> 4) & 0xf) * gs;
+ rgba[i][bComp] = ((p >> 8) & 0xf) * bs;
+ rgba[i][aComp] = ((p >> 12) ) * as;
+ }
+ }
+ else {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ rgba[i][rComp] = ((p ) & 0xf) * rs;
+ rgba[i][gComp] = ((p >> 4) & 0xf) * gs;
+ rgba[i][bComp] = ((p >> 8) & 0xf) * bs;
+ rgba[i][aComp] = ((p >> 12) ) * as;
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_5_5_5_1:
+ if (!intFormat) {
+ rs = gs = bs = 1.0F / 31.0F;
+ }
+ if (swapBytes) {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ SWAP2BYTE(p);
+ rgba[i][rComp] = ((p >> 11) ) * rs;
+ rgba[i][gComp] = ((p >> 6) & 0x1f) * gs;
+ rgba[i][bComp] = ((p >> 1) & 0x1f) * bs;
+ rgba[i][aComp] = ((p ) & 0x1) * as;
+ }
+ }
+ else {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ rgba[i][rComp] = ((p >> 11) ) * rs;
+ rgba[i][gComp] = ((p >> 6) & 0x1f) * gs;
+ rgba[i][bComp] = ((p >> 1) & 0x1f) * bs;
+ rgba[i][aComp] = ((p ) & 0x1) * as;
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_1_5_5_5_REV:
+ if (!intFormat) {
+ rs = gs = bs = 1.0F / 31.0F;
+ }
+ if (swapBytes) {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ SWAP2BYTE(p);
+ rgba[i][rComp] = ((p ) & 0x1f) * rs;
+ rgba[i][gComp] = ((p >> 5) & 0x1f) * gs;
+ rgba[i][bComp] = ((p >> 10) & 0x1f) * bs;
+ rgba[i][aComp] = ((p >> 15) ) * as;
+ }
+ }
+ else {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ rgba[i][rComp] = ((p ) & 0x1f) * rs;
+ rgba[i][gComp] = ((p >> 5) & 0x1f) * gs;
+ rgba[i][bComp] = ((p >> 10) & 0x1f) * bs;
+ rgba[i][aComp] = ((p >> 15) ) * as;
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT_8_8_8_8:
+ if (swapBytes) {
+ const GLuint *uisrc = (const GLuint *) src;
+ GLuint i;
+ if (intFormat) {
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rComp] = (GLfloat) ((p ) & 0xff);
+ rgba[i][gComp] = (GLfloat) ((p >> 8) & 0xff);
+ rgba[i][bComp] = (GLfloat) ((p >> 16) & 0xff);
+ rgba[i][aComp] = (GLfloat) ((p >> 24) );
+ }
+ }
+ else {
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rComp] = UBYTE_TO_FLOAT((p ) & 0xff);
+ rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
+ rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
+ rgba[i][aComp] = UBYTE_TO_FLOAT((p >> 24) );
+ }
+ }
+ }
+ else {
+ const GLuint *uisrc = (const GLuint *) src;
+ GLuint i;
+ if (intFormat) {
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rComp] = (GLfloat) ((p >> 24) );
+ rgba[i][gComp] = (GLfloat) ((p >> 16) & 0xff);
+ rgba[i][bComp] = (GLfloat) ((p >> 8) & 0xff);
+ rgba[i][aComp] = (GLfloat) ((p ) & 0xff);
+ }
+ }
+ else {
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rComp] = UBYTE_TO_FLOAT((p >> 24) );
+ rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
+ rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
+ rgba[i][aComp] = UBYTE_TO_FLOAT((p ) & 0xff);
+ }
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT_8_8_8_8_REV:
+ if (swapBytes) {
+ const GLuint *uisrc = (const GLuint *) src;
+ GLuint i;
+ if (intFormat) {
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rComp] = (GLfloat) ((p >> 24) );
+ rgba[i][gComp] = (GLfloat) ((p >> 16) & 0xff);
+ rgba[i][bComp] = (GLfloat) ((p >> 8) & 0xff);
+ rgba[i][aComp] = (GLfloat) ((p ) & 0xff);
+ }
+ }
+ else {
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rComp] = UBYTE_TO_FLOAT((p >> 24) );
+ rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
+ rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
+ rgba[i][aComp] = UBYTE_TO_FLOAT((p ) & 0xff);
+ }
+ }
+ }
+ else {
+ const GLuint *uisrc = (const GLuint *) src;
+ GLuint i;
+ if (intFormat) {
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rComp] = (GLfloat) ((p ) & 0xff);
+ rgba[i][gComp] = (GLfloat) ((p >> 8) & 0xff);
+ rgba[i][bComp] = (GLfloat) ((p >> 16) & 0xff);
+ rgba[i][aComp] = (GLfloat) ((p >> 24) );
+ }
+ }
+ else {
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rComp] = UBYTE_TO_FLOAT((p ) & 0xff);
+ rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
+ rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
+ rgba[i][aComp] = UBYTE_TO_FLOAT((p >> 24) );
+ }
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT_10_10_10_2:
+ if (!intFormat) {
+ rs = 1.0F / 1023.0F;
+ gs = 1.0F / 1023.0F;
+ bs = 1.0F / 1023.0F;
+ as = 1.0F / 3.0F;
+ }
+ if (swapBytes) {
+ const GLuint *uisrc = (const GLuint *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ SWAP4BYTE(p);
+ rgba[i][rComp] = ((p >> 22) ) * rs;
+ rgba[i][gComp] = ((p >> 12) & 0x3ff) * gs;
+ rgba[i][bComp] = ((p >> 2) & 0x3ff) * bs;
+ rgba[i][aComp] = ((p ) & 0x3 ) * as;
+ }
+ }
+ else {
+ const GLuint *uisrc = (const GLuint *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rComp] = ((p >> 22) ) * rs;
+ rgba[i][gComp] = ((p >> 12) & 0x3ff) * gs;
+ rgba[i][bComp] = ((p >> 2) & 0x3ff) * bs;
+ rgba[i][aComp] = ((p ) & 0x3 ) * as;
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT_2_10_10_10_REV:
+ if (!intFormat) {
+ rs = 1.0F / 1023.0F;
+ gs = 1.0F / 1023.0F;
+ bs = 1.0F / 1023.0F;
+ as = 1.0F / 3.0F;
+ }
+ if (swapBytes) {
+ const GLuint *uisrc = (const GLuint *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ SWAP4BYTE(p);
+ rgba[i][rComp] = ((p ) & 0x3ff) * rs;
+ rgba[i][gComp] = ((p >> 10) & 0x3ff) * gs;
+ rgba[i][bComp] = ((p >> 20) & 0x3ff) * bs;
+ rgba[i][aComp] = ((p >> 30) ) * as;
+ }
+ }
+ else {
+ const GLuint *uisrc = (const GLuint *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rComp] = ((p ) & 0x3ff) * rs;
+ rgba[i][gComp] = ((p >> 10) & 0x3ff) * gs;
+ rgba[i][bComp] = ((p >> 20) & 0x3ff) * bs;
+ rgba[i][aComp] = ((p >> 30) ) * as;
+ }
+ }
+ break;
+ default:
+ _mesa_problem(NULL, "bad srcType in extract float data");
+ break;
+ }
+}
+
+
+/*
+ * Unpack a row of color image data from a client buffer according to
+ * the pixel unpacking parameters.
+ * Return GLchan values in the specified dest image format.
+ * This is used by glDrawPixels and glTexImage?D().
+ * \param ctx - the context
+ * n - number of pixels in the span
+ * dstFormat - format of destination color array
+ * dest - the destination color array
+ * srcFormat - source image format
+ * srcType - source image data type
+ * source - source image pointer
+ * srcPacking - pixel unpacking parameters
+ * transferOps - bitmask of IMAGE_*_BIT values of operations to apply
+ *
+ * XXX perhaps expand this to process whole images someday.
+ */
+void
+_mesa_unpack_color_span_chan( struct gl_context *ctx,
+ GLuint n, GLenum dstFormat, GLchan dest[],
+ GLenum srcFormat, GLenum srcType,
+ const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking,
+ GLbitfield transferOps )
+{
+ ASSERT(dstFormat == GL_ALPHA ||
+ dstFormat == GL_LUMINANCE ||
+ dstFormat == GL_LUMINANCE_ALPHA ||
+ dstFormat == GL_INTENSITY ||
+ dstFormat == GL_RED ||
+ dstFormat == GL_RG ||
+ dstFormat == GL_RGB ||
+ dstFormat == GL_RGBA ||
+ dstFormat == GL_COLOR_INDEX);
+
+ ASSERT(srcFormat == GL_RED ||
+ srcFormat == GL_GREEN ||
+ srcFormat == GL_BLUE ||
+ srcFormat == GL_ALPHA ||
+ srcFormat == GL_LUMINANCE ||
+ srcFormat == GL_LUMINANCE_ALPHA ||
+ srcFormat == GL_INTENSITY ||
+ srcFormat == GL_RG ||
+ srcFormat == GL_RGB ||
+ srcFormat == GL_BGR ||
+ srcFormat == GL_RGBA ||
+ srcFormat == GL_BGRA ||
+ srcFormat == GL_ABGR_EXT ||
+ srcFormat == GL_COLOR_INDEX);
+
+ ASSERT(srcType == GL_BITMAP ||
+ srcType == GL_UNSIGNED_BYTE ||
+ srcType == GL_BYTE ||
+ srcType == GL_UNSIGNED_SHORT ||
+ srcType == GL_SHORT ||
+ srcType == GL_UNSIGNED_INT ||
+ srcType == GL_INT ||
+ srcType == GL_HALF_FLOAT_ARB ||
+ srcType == GL_FLOAT ||
+ srcType == GL_UNSIGNED_BYTE_3_3_2 ||
+ srcType == GL_UNSIGNED_BYTE_2_3_3_REV ||
+ srcType == GL_UNSIGNED_SHORT_5_6_5 ||
+ srcType == GL_UNSIGNED_SHORT_5_6_5_REV ||
+ srcType == GL_UNSIGNED_SHORT_4_4_4_4 ||
+ srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV ||
+ srcType == GL_UNSIGNED_SHORT_5_5_5_1 ||
+ srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8 ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8_REV ||
+ srcType == GL_UNSIGNED_INT_10_10_10_2 ||
+ srcType == GL_UNSIGNED_INT_2_10_10_10_REV);
+
+ /* Try simple cases first */
+ if (transferOps == 0) {
+ if (srcType == CHAN_TYPE) {
+ if (dstFormat == GL_RGBA) {
+ if (srcFormat == GL_RGBA) {
+ memcpy( dest, source, n * 4 * sizeof(GLchan) );
+ return;
+ }
+ else if (srcFormat == GL_RGB) {
+ GLuint i;
+ const GLchan *src = (const GLchan *) source;
+ GLchan *dst = dest;
+ for (i = 0; i < n; i++) {
+ dst[0] = src[0];
+ dst[1] = src[1];
+ dst[2] = src[2];
+ dst[3] = CHAN_MAX;
+ src += 3;
+ dst += 4;
+ }
+ return;
+ }
+ }
+ else if (dstFormat == GL_RGB) {
+ if (srcFormat == GL_RGB) {
+ memcpy( dest, source, n * 3 * sizeof(GLchan) );
+ return;
+ }
+ else if (srcFormat == GL_RGBA) {
+ GLuint i;
+ const GLchan *src = (const GLchan *) source;
+ GLchan *dst = dest;
+ for (i = 0; i < n; i++) {
+ dst[0] = src[0];
+ dst[1] = src[1];
+ dst[2] = src[2];
+ src += 4;
+ dst += 3;
+ }
+ return;
+ }
+ }
+ else if (dstFormat == srcFormat) {
+ GLint comps = _mesa_components_in_format(srcFormat);
+ assert(comps > 0);
+ memcpy( dest, source, n * comps * sizeof(GLchan) );
+ return;
+ }
+ }
+ /*
+ * Common situation, loading 8bit RGBA/RGB source images
+ * into 16/32 bit destination. (OSMesa16/32)
+ */
+ else if (srcType == GL_UNSIGNED_BYTE) {
+ if (dstFormat == GL_RGBA) {
+ if (srcFormat == GL_RGB) {
+ GLuint i;
+ const GLubyte *src = (const GLubyte *) source;
+ GLchan *dst = dest;
+ for (i = 0; i < n; i++) {
+ dst[0] = UBYTE_TO_CHAN(src[0]);
+ dst[1] = UBYTE_TO_CHAN(src[1]);
+ dst[2] = UBYTE_TO_CHAN(src[2]);
+ dst[3] = CHAN_MAX;
+ src += 3;
+ dst += 4;
+ }
+ return;
+ }
+ else if (srcFormat == GL_RGBA) {
+ GLuint i;
+ const GLubyte *src = (const GLubyte *) source;
+ GLchan *dst = dest;
+ for (i = 0; i < n; i++) {
+ dst[0] = UBYTE_TO_CHAN(src[0]);
+ dst[1] = UBYTE_TO_CHAN(src[1]);
+ dst[2] = UBYTE_TO_CHAN(src[2]);
+ dst[3] = UBYTE_TO_CHAN(src[3]);
+ src += 4;
+ dst += 4;
+ }
+ return;
+ }
+ }
+ else if (dstFormat == GL_RGB) {
+ if (srcFormat == GL_RGB) {
+ GLuint i;
+ const GLubyte *src = (const GLubyte *) source;
+ GLchan *dst = dest;
+ for (i = 0; i < n; i++) {
+ dst[0] = UBYTE_TO_CHAN(src[0]);
+ dst[1] = UBYTE_TO_CHAN(src[1]);
+ dst[2] = UBYTE_TO_CHAN(src[2]);
+ src += 3;
+ dst += 3;
+ }
+ return;
+ }
+ else if (srcFormat == GL_RGBA) {
+ GLuint i;
+ const GLubyte *src = (const GLubyte *) source;
+ GLchan *dst = dest;
+ for (i = 0; i < n; i++) {
+ dst[0] = UBYTE_TO_CHAN(src[0]);
+ dst[1] = UBYTE_TO_CHAN(src[1]);
+ dst[2] = UBYTE_TO_CHAN(src[2]);
+ src += 4;
+ dst += 3;
+ }
+ return;
+ }
+ }
+ }
+ }
+
+
+ /* general solution begins here */
+ {
+ GLint dstComponents;
+ GLint dstRedIndex, dstGreenIndex, dstBlueIndex, dstAlphaIndex;
+ GLint dstLuminanceIndex, dstIntensityIndex;
+ GLfloat rgba[MAX_WIDTH][4];
+
+ dstComponents = _mesa_components_in_format( dstFormat );
+ /* source & dest image formats should have been error checked by now */
+ assert(dstComponents > 0);
+
+ /*
+ * Extract image data and convert to RGBA floats
+ */
+ assert(n <= MAX_WIDTH);
+ if (srcFormat == GL_COLOR_INDEX) {
+ GLuint indexes[MAX_WIDTH];
+ extract_uint_indexes(n, indexes, srcFormat, srcType, source,
+ srcPacking);
+
+ if (dstFormat == GL_COLOR_INDEX) {
+ GLuint i;
+ _mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes);
+ /* convert to GLchan and return */
+ for (i = 0; i < n; i++) {
+ dest[i] = (GLchan) (indexes[i] & 0xff);
+ }
+ return;
+ }
+ else {
+ /* Convert indexes to RGBA */
+ if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
+ _mesa_shift_and_offset_ci(ctx, n, indexes);
+ }
+ _mesa_map_ci_to_rgba(ctx, n, indexes, rgba);
+ }
+
+ /* Don't do RGBA scale/bias or RGBA->RGBA mapping if starting
+ * with color indexes.
+ */
+ transferOps &= ~(IMAGE_SCALE_BIAS_BIT | IMAGE_MAP_COLOR_BIT);
+ }
+ else {
+ /* non-color index data */
+ extract_float_rgba(n, rgba, srcFormat, srcType, source,
+ srcPacking->SwapBytes);
+ }
+
+ /* Need to clamp if returning GLubytes or GLushorts */
+#if CHAN_TYPE != GL_FLOAT
+ transferOps |= IMAGE_CLAMP_BIT;
+#endif
+
+ if (transferOps) {
+ _mesa_apply_rgba_transfer_ops(ctx, transferOps, n, rgba);
+ }
+
+ /* Now determine which color channels we need to produce.
+ * And determine the dest index (offset) within each color tuple.
+ */
+ switch (dstFormat) {
+ case GL_ALPHA:
+ dstAlphaIndex = 0;
+ dstRedIndex = dstGreenIndex = dstBlueIndex = -1;
+ dstLuminanceIndex = dstIntensityIndex = -1;
+ break;
+ case GL_LUMINANCE:
+ dstLuminanceIndex = 0;
+ dstRedIndex = dstGreenIndex = dstBlueIndex = dstAlphaIndex = -1;
+ dstIntensityIndex = -1;
+ break;
+ case GL_LUMINANCE_ALPHA:
+ dstLuminanceIndex = 0;
+ dstAlphaIndex = 1;
+ dstRedIndex = dstGreenIndex = dstBlueIndex = -1;
+ dstIntensityIndex = -1;
+ break;
+ case GL_INTENSITY:
+ dstIntensityIndex = 0;
+ dstRedIndex = dstGreenIndex = dstBlueIndex = dstAlphaIndex = -1;
+ dstLuminanceIndex = -1;
+ break;
+ case GL_RED:
+ dstRedIndex = 0;
+ dstGreenIndex = dstBlueIndex = -1;
+ dstAlphaIndex = dstLuminanceIndex = dstIntensityIndex = -1;
+ break;
+ case GL_RG:
+ dstRedIndex = 0;
+ dstGreenIndex = 1;
+ dstBlueIndex = -1;
+ dstAlphaIndex = dstLuminanceIndex = dstIntensityIndex = -1;
+ break;
+ case GL_RGB:
+ dstRedIndex = 0;
+ dstGreenIndex = 1;
+ dstBlueIndex = 2;
+ dstAlphaIndex = dstLuminanceIndex = dstIntensityIndex = -1;
+ break;
+ case GL_RGBA:
+ dstRedIndex = 0;
+ dstGreenIndex = 1;
+ dstBlueIndex = 2;
+ dstAlphaIndex = 3;
+ dstLuminanceIndex = dstIntensityIndex = -1;
+ break;
+ default:
+ _mesa_problem(ctx, "bad dstFormat in _mesa_unpack_chan_span()");
+ return;
+ }
+
+
+ /* Now return the GLchan data in the requested dstFormat */
+
+ if (dstRedIndex >= 0) {
+ GLchan *dst = dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ CLAMPED_FLOAT_TO_CHAN(dst[dstRedIndex], rgba[i][RCOMP]);
+ dst += dstComponents;
+ }
+ }
+
+ if (dstGreenIndex >= 0) {
+ GLchan *dst = dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ CLAMPED_FLOAT_TO_CHAN(dst[dstGreenIndex], rgba[i][GCOMP]);
+ dst += dstComponents;
+ }
+ }
+
+ if (dstBlueIndex >= 0) {
+ GLchan *dst = dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ CLAMPED_FLOAT_TO_CHAN(dst[dstBlueIndex], rgba[i][BCOMP]);
+ dst += dstComponents;
+ }
+ }
+
+ if (dstAlphaIndex >= 0) {
+ GLchan *dst = dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ CLAMPED_FLOAT_TO_CHAN(dst[dstAlphaIndex], rgba[i][ACOMP]);
+ dst += dstComponents;
+ }
+ }
+
+ if (dstIntensityIndex >= 0) {
+ GLchan *dst = dest;
+ GLuint i;
+ assert(dstIntensityIndex == 0);
+ assert(dstComponents == 1);
+ for (i = 0; i < n; i++) {
+ /* Intensity comes from red channel */
+ CLAMPED_FLOAT_TO_CHAN(dst[i], rgba[i][RCOMP]);
+ }
+ }
+
+ if (dstLuminanceIndex >= 0) {
+ GLchan *dst = dest;
+ GLuint i;
+ assert(dstLuminanceIndex == 0);
+ for (i = 0; i < n; i++) {
+ /* Luminance comes from red channel */
+ CLAMPED_FLOAT_TO_CHAN(dst[0], rgba[i][RCOMP]);
+ dst += dstComponents;
+ }
+ }
+ }
+}
+
+
+/**
+ * Same as _mesa_unpack_color_span_chan(), but return GLfloat data
+ * instead of GLchan.
+ */
+void
+_mesa_unpack_color_span_float( struct gl_context *ctx,
+ GLuint n, GLenum dstFormat, GLfloat dest[],
+ GLenum srcFormat, GLenum srcType,
+ const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking,
+ GLbitfield transferOps )
+{
+ ASSERT(dstFormat == GL_ALPHA ||
+ dstFormat == GL_LUMINANCE ||
+ dstFormat == GL_LUMINANCE_ALPHA ||
+ dstFormat == GL_INTENSITY ||
+ dstFormat == GL_RED ||
+ dstFormat == GL_RG ||
+ dstFormat == GL_RGB ||
+ dstFormat == GL_RGBA ||
+ dstFormat == GL_COLOR_INDEX);
+
+ ASSERT(srcFormat == GL_RED ||
+ srcFormat == GL_GREEN ||
+ srcFormat == GL_BLUE ||
+ srcFormat == GL_ALPHA ||
+ srcFormat == GL_LUMINANCE ||
+ srcFormat == GL_LUMINANCE_ALPHA ||
+ srcFormat == GL_INTENSITY ||
+ srcFormat == GL_RG ||
+ srcFormat == GL_RGB ||
+ srcFormat == GL_BGR ||
+ srcFormat == GL_RGBA ||
+ srcFormat == GL_BGRA ||
+ srcFormat == GL_ABGR_EXT ||
+ srcFormat == GL_RED_INTEGER_EXT ||
+ srcFormat == GL_GREEN_INTEGER_EXT ||
+ srcFormat == GL_BLUE_INTEGER_EXT ||
+ srcFormat == GL_ALPHA_INTEGER_EXT ||
+ srcFormat == GL_RGB_INTEGER_EXT ||
+ srcFormat == GL_RGBA_INTEGER_EXT ||
+ srcFormat == GL_BGR_INTEGER_EXT ||
+ srcFormat == GL_BGRA_INTEGER_EXT ||
+ srcFormat == GL_LUMINANCE_INTEGER_EXT ||
+ srcFormat == GL_LUMINANCE_ALPHA_INTEGER_EXT ||
+ srcFormat == GL_COLOR_INDEX);
+
+ ASSERT(srcType == GL_BITMAP ||
+ srcType == GL_UNSIGNED_BYTE ||
+ srcType == GL_BYTE ||
+ srcType == GL_UNSIGNED_SHORT ||
+ srcType == GL_SHORT ||
+ srcType == GL_UNSIGNED_INT ||
+ srcType == GL_INT ||
+ srcType == GL_HALF_FLOAT_ARB ||
+ srcType == GL_FLOAT ||
+ srcType == GL_UNSIGNED_BYTE_3_3_2 ||
+ srcType == GL_UNSIGNED_BYTE_2_3_3_REV ||
+ srcType == GL_UNSIGNED_SHORT_5_6_5 ||
+ srcType == GL_UNSIGNED_SHORT_5_6_5_REV ||
+ srcType == GL_UNSIGNED_SHORT_4_4_4_4 ||
+ srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV ||
+ srcType == GL_UNSIGNED_SHORT_5_5_5_1 ||
+ srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8 ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8_REV ||
+ srcType == GL_UNSIGNED_INT_10_10_10_2 ||
+ srcType == GL_UNSIGNED_INT_2_10_10_10_REV);
+
+ /* general solution, no special cases, yet */
+ {
+ GLint dstComponents;
+ GLint dstRedIndex, dstGreenIndex, dstBlueIndex, dstAlphaIndex;
+ GLint dstLuminanceIndex, dstIntensityIndex;
+ GLfloat rgba[MAX_WIDTH][4];
+
+ dstComponents = _mesa_components_in_format( dstFormat );
+ /* source & dest image formats should have been error checked by now */
+ assert(dstComponents > 0);
+
+ /*
+ * Extract image data and convert to RGBA floats
+ */
+ assert(n <= MAX_WIDTH);
+ if (srcFormat == GL_COLOR_INDEX) {
+ GLuint indexes[MAX_WIDTH];
+ extract_uint_indexes(n, indexes, srcFormat, srcType, source,
+ srcPacking);
+
+ if (dstFormat == GL_COLOR_INDEX) {
+ GLuint i;
+ _mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes);
+ /* convert to GLchan and return */
+ for (i = 0; i < n; i++) {
+ dest[i] = (GLchan) (indexes[i] & 0xff);
+ }
+ return;
+ }
+ else {
+ /* Convert indexes to RGBA */
+ if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
+ _mesa_shift_and_offset_ci(ctx, n, indexes);
+ }
+ _mesa_map_ci_to_rgba(ctx, n, indexes, rgba);
+ }
+
+ /* Don't do RGBA scale/bias or RGBA->RGBA mapping if starting
+ * with color indexes.
+ */
+ transferOps &= ~(IMAGE_SCALE_BIAS_BIT | IMAGE_MAP_COLOR_BIT);
+ }
+ else {
+ /* non-color index data */
+ extract_float_rgba(n, rgba, srcFormat, srcType, source,
+ srcPacking->SwapBytes);
+ }
+
+ if (transferOps) {
+ _mesa_apply_rgba_transfer_ops(ctx, transferOps, n, rgba);
+ }
+
+ /* Now determine which color channels we need to produce.
+ * And determine the dest index (offset) within each color tuple.
+ */
+ switch (dstFormat) {
+ case GL_ALPHA:
+ dstAlphaIndex = 0;
+ dstRedIndex = dstGreenIndex = dstBlueIndex = -1;
+ dstLuminanceIndex = dstIntensityIndex = -1;
+ break;
+ case GL_LUMINANCE:
+ dstLuminanceIndex = 0;
+ dstRedIndex = dstGreenIndex = dstBlueIndex = dstAlphaIndex = -1;
+ dstIntensityIndex = -1;
+ break;
+ case GL_LUMINANCE_ALPHA:
+ dstLuminanceIndex = 0;
+ dstAlphaIndex = 1;
+ dstRedIndex = dstGreenIndex = dstBlueIndex = -1;
+ dstIntensityIndex = -1;
+ break;
+ case GL_INTENSITY:
+ dstIntensityIndex = 0;
+ dstRedIndex = dstGreenIndex = dstBlueIndex = dstAlphaIndex = -1;
+ dstLuminanceIndex = -1;
+ break;
+ case GL_RED:
+ dstRedIndex = 0;
+ dstGreenIndex = dstBlueIndex = -1;
+ dstAlphaIndex = dstLuminanceIndex = dstIntensityIndex = -1;
+ break;
+ case GL_RG:
+ dstRedIndex = 0;
+ dstGreenIndex = 1;
+ dstBlueIndex = -1;
+ dstAlphaIndex = dstLuminanceIndex = dstIntensityIndex = -1;
+ break;
+ case GL_RGB:
+ dstRedIndex = 0;
+ dstGreenIndex = 1;
+ dstBlueIndex = 2;
+ dstAlphaIndex = dstLuminanceIndex = dstIntensityIndex = -1;
+ break;
+ case GL_RGBA:
+ dstRedIndex = 0;
+ dstGreenIndex = 1;
+ dstBlueIndex = 2;
+ dstAlphaIndex = 3;
+ dstLuminanceIndex = dstIntensityIndex = -1;
+ break;
+ default:
+ _mesa_problem(ctx, "bad dstFormat in _mesa_unpack_color_span_float()");
+ return;
+ }
+
+ /* Now pack results in the requested dstFormat */
+ if (dstRedIndex >= 0) {
+ GLfloat *dst = dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[dstRedIndex] = rgba[i][RCOMP];
+ dst += dstComponents;
+ }
+ }
+
+ if (dstGreenIndex >= 0) {
+ GLfloat *dst = dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[dstGreenIndex] = rgba[i][GCOMP];
+ dst += dstComponents;
+ }
+ }
+
+ if (dstBlueIndex >= 0) {
+ GLfloat *dst = dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[dstBlueIndex] = rgba[i][BCOMP];
+ dst += dstComponents;
+ }
+ }
+
+ if (dstAlphaIndex >= 0) {
+ GLfloat *dst = dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[dstAlphaIndex] = rgba[i][ACOMP];
+ dst += dstComponents;
+ }
+ }
+
+ if (dstIntensityIndex >= 0) {
+ GLfloat *dst = dest;
+ GLuint i;
+ assert(dstIntensityIndex == 0);
+ assert(dstComponents == 1);
+ for (i = 0; i < n; i++) {
+ /* Intensity comes from red channel */
+ dst[i] = rgba[i][RCOMP];
+ }
+ }
+
+ if (dstLuminanceIndex >= 0) {
+ GLfloat *dst = dest;
+ GLuint i;
+ assert(dstLuminanceIndex == 0);
+ for (i = 0; i < n; i++) {
+ /* Luminance comes from red channel */
+ dst[0] = rgba[i][RCOMP];
+ dst += dstComponents;
+ }
+ }
+ }
+}
+
+/**
+ * Similar to _mesa_unpack_color_span_float(), but for dudv data instead of rgba,
+ * directly return GLbyte data, no transfer ops apply.
+ */
+void
+_mesa_unpack_dudv_span_byte( struct gl_context *ctx,
+ GLuint n, GLenum dstFormat, GLbyte dest[],
+ GLenum srcFormat, GLenum srcType,
+ const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking,
+ GLbitfield transferOps )
+{
+ ASSERT(dstFormat == GL_DUDV_ATI);
+ ASSERT(srcFormat == GL_DUDV_ATI);
+
+ ASSERT(srcType == GL_UNSIGNED_BYTE ||
+ srcType == GL_BYTE ||
+ srcType == GL_UNSIGNED_SHORT ||
+ srcType == GL_SHORT ||
+ srcType == GL_UNSIGNED_INT ||
+ srcType == GL_INT ||
+ srcType == GL_HALF_FLOAT_ARB ||
+ srcType == GL_FLOAT);
+
+ /* general solution */
+ {
+ GLint dstComponents;
+ GLfloat rgba[MAX_WIDTH][4];
+ GLbyte *dst = dest;
+ GLuint i;
+
+ dstComponents = _mesa_components_in_format( dstFormat );
+ /* source & dest image formats should have been error checked by now */
+ assert(dstComponents > 0);
+
+ /*
+ * Extract image data and convert to RGBA floats
+ */
+ assert(n <= MAX_WIDTH);
+ extract_float_rgba(n, rgba, srcFormat, srcType, source,
+ srcPacking->SwapBytes);
+
+
+ /* Now determine which color channels we need to produce.
+ * And determine the dest index (offset) within each color tuple.
+ */
+
+ /* Now pack results in the requested dstFormat */
+ for (i = 0; i < n; i++) {
+ /* not sure - need clamp[-1,1] here? */
+ dst[0] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
+ dst[1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
+ dst += dstComponents;
+ }
+ }
+}
+
+/*
+ * Unpack a row of color index data from a client buffer according to
+ * the pixel unpacking parameters.
+ * This is (or will be) used by glDrawPixels, glTexImage[123]D, etc.
+ *
+ * Args: ctx - the context
+ * n - number of pixels
+ * dstType - destination data type
+ * dest - destination array
+ * srcType - source pixel type
+ * source - source data pointer
+ * srcPacking - pixel unpacking parameters
+ * transferOps - the pixel transfer operations to apply
+ */
+void
+_mesa_unpack_index_span( const struct gl_context *ctx, GLuint n,
+ GLenum dstType, GLvoid *dest,
+ GLenum srcType, const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking,
+ GLbitfield transferOps )
+{
+ ASSERT(srcType == GL_BITMAP ||
+ srcType == GL_UNSIGNED_BYTE ||
+ srcType == GL_BYTE ||
+ srcType == GL_UNSIGNED_SHORT ||
+ srcType == GL_SHORT ||
+ srcType == GL_UNSIGNED_INT ||
+ srcType == GL_INT ||
+ srcType == GL_HALF_FLOAT_ARB ||
+ srcType == GL_FLOAT);
+
+ ASSERT(dstType == GL_UNSIGNED_BYTE ||
+ dstType == GL_UNSIGNED_SHORT ||
+ dstType == GL_UNSIGNED_INT);
+
+
+ transferOps &= (IMAGE_MAP_COLOR_BIT | IMAGE_SHIFT_OFFSET_BIT);
+
+ /*
+ * Try simple cases first
+ */
+ if (transferOps == 0 && srcType == GL_UNSIGNED_BYTE
+ && dstType == GL_UNSIGNED_BYTE) {
+ memcpy(dest, source, n * sizeof(GLubyte));
+ }
+ else if (transferOps == 0 && srcType == GL_UNSIGNED_INT
+ && dstType == GL_UNSIGNED_INT && !srcPacking->SwapBytes) {
+ memcpy(dest, source, n * sizeof(GLuint));
+ }
+ else {
+ /*
+ * general solution
+ */
+ GLuint indexes[MAX_WIDTH];
+ assert(n <= MAX_WIDTH);
+
+ extract_uint_indexes(n, indexes, GL_COLOR_INDEX, srcType, source,
+ srcPacking);
+
+ if (transferOps)
+ _mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes);
+
+ /* convert to dest type */
+ switch (dstType) {
+ case GL_UNSIGNED_BYTE:
+ {
+ GLubyte *dst = (GLubyte *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = (GLubyte) (indexes[i] & 0xff);
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT:
+ {
+ GLuint *dst = (GLuint *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = (GLushort) (indexes[i] & 0xffff);
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT:
+ memcpy(dest, indexes, n * sizeof(GLuint));
+ break;
+ default:
+ _mesa_problem(ctx, "bad dstType in _mesa_unpack_index_span");
+ }
+ }
+}
+
+
+void
+_mesa_pack_index_span( const struct gl_context *ctx, GLuint n,
+ GLenum dstType, GLvoid *dest, const GLuint *source,
+ const struct gl_pixelstore_attrib *dstPacking,
+ GLbitfield transferOps )
+{
+ GLuint indexes[MAX_WIDTH];
+
+ ASSERT(n <= MAX_WIDTH);
+
+ transferOps &= (IMAGE_MAP_COLOR_BIT | IMAGE_SHIFT_OFFSET_BIT);
+
+ if (transferOps & (IMAGE_MAP_COLOR_BIT | IMAGE_SHIFT_OFFSET_BIT)) {
+ /* make a copy of input */
+ memcpy(indexes, source, n * sizeof(GLuint));
+ _mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes);
+ source = indexes;
+ }
+
+ switch (dstType) {
+ case GL_UNSIGNED_BYTE:
+ {
+ GLubyte *dst = (GLubyte *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ *dst++ = (GLubyte) source[i];
+ }
+ }
+ break;
+ case GL_BYTE:
+ {
+ GLbyte *dst = (GLbyte *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = (GLbyte) source[i];
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT:
+ {
+ GLushort *dst = (GLushort *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = (GLushort) source[i];
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap2( (GLushort *) dst, n );
+ }
+ }
+ break;
+ case GL_SHORT:
+ {
+ GLshort *dst = (GLshort *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = (GLshort) source[i];
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap2( (GLushort *) dst, n );
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT:
+ {
+ GLuint *dst = (GLuint *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = (GLuint) source[i];
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap4( (GLuint *) dst, n );
+ }
+ }
+ break;
+ case GL_INT:
+ {
+ GLint *dst = (GLint *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = (GLint) source[i];
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap4( (GLuint *) dst, n );
+ }
+ }
+ break;
+ case GL_FLOAT:
+ {
+ GLfloat *dst = (GLfloat *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = (GLfloat) source[i];
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap4( (GLuint *) dst, n );
+ }
+ }
+ break;
+ case GL_HALF_FLOAT_ARB:
+ {
+ GLhalfARB *dst = (GLhalfARB *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = _mesa_float_to_half((GLfloat) source[i]);
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap2( (GLushort *) dst, n );
+ }
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad type in _mesa_pack_index_span");
+ }
+}
+
+
+/*
+ * Unpack a row of stencil data from a client buffer according to
+ * the pixel unpacking parameters.
+ * This is (or will be) used by glDrawPixels
+ *
+ * Args: ctx - the context
+ * n - number of pixels
+ * dstType - destination data type
+ * dest - destination array
+ * srcType - source pixel type
+ * source - source data pointer
+ * srcPacking - pixel unpacking parameters
+ * transferOps - apply offset/bias/lookup ops?
+ */
+void
+_mesa_unpack_stencil_span( const struct gl_context *ctx, GLuint n,
+ GLenum dstType, GLvoid *dest,
+ GLenum srcType, const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking,
+ GLbitfield transferOps )
+{
+ ASSERT(srcType == GL_BITMAP ||
+ srcType == GL_UNSIGNED_BYTE ||
+ srcType == GL_BYTE ||
+ srcType == GL_UNSIGNED_SHORT ||
+ srcType == GL_SHORT ||
+ srcType == GL_UNSIGNED_INT ||
+ srcType == GL_INT ||
+ srcType == GL_UNSIGNED_INT_24_8_EXT ||
+ srcType == GL_HALF_FLOAT_ARB ||
+ srcType == GL_FLOAT);
+
+ ASSERT(dstType == GL_UNSIGNED_BYTE ||
+ dstType == GL_UNSIGNED_SHORT ||
+ dstType == GL_UNSIGNED_INT);
+
+ /* only shift and offset apply to stencil */
+ transferOps &= IMAGE_SHIFT_OFFSET_BIT;
+
+ /*
+ * Try simple cases first
+ */
+ if (transferOps == 0 &&
+ !ctx->Pixel.MapStencilFlag &&
+ srcType == GL_UNSIGNED_BYTE &&
+ dstType == GL_UNSIGNED_BYTE) {
+ memcpy(dest, source, n * sizeof(GLubyte));
+ }
+ else if (transferOps == 0 &&
+ !ctx->Pixel.MapStencilFlag &&
+ srcType == GL_UNSIGNED_INT &&
+ dstType == GL_UNSIGNED_INT &&
+ !srcPacking->SwapBytes) {
+ memcpy(dest, source, n * sizeof(GLuint));
+ }
+ else {
+ /*
+ * general solution
+ */
+ GLuint indexes[MAX_WIDTH];
+ assert(n <= MAX_WIDTH);
+
+ extract_uint_indexes(n, indexes, GL_STENCIL_INDEX, srcType, source,
+ srcPacking);
+
+ if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
+ /* shift and offset indexes */
+ _mesa_shift_and_offset_ci(ctx, n, indexes);
+ }
+
+ if (ctx->Pixel.MapStencilFlag) {
+ /* Apply stencil lookup table */
+ const GLuint mask = ctx->PixelMaps.StoS.Size - 1;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ indexes[i] = (GLuint)ctx->PixelMaps.StoS.Map[ indexes[i] & mask ];
+ }
+ }
+
+ /* convert to dest type */
+ switch (dstType) {
+ case GL_UNSIGNED_BYTE:
+ {
+ GLubyte *dst = (GLubyte *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = (GLubyte) (indexes[i] & 0xff);
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT:
+ {
+ GLuint *dst = (GLuint *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = (GLushort) (indexes[i] & 0xffff);
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT:
+ memcpy(dest, indexes, n * sizeof(GLuint));
+ break;
+ default:
+ _mesa_problem(ctx, "bad dstType in _mesa_unpack_stencil_span");
+ }
+ }
+}
+
+
+void
+_mesa_pack_stencil_span( const struct gl_context *ctx, GLuint n,
+ GLenum dstType, GLvoid *dest, const GLstencil *source,
+ const struct gl_pixelstore_attrib *dstPacking )
+{
+ GLstencil stencil[MAX_WIDTH];
+
+ ASSERT(n <= MAX_WIDTH);
+
+ if (ctx->Pixel.IndexShift || ctx->Pixel.IndexOffset ||
+ ctx->Pixel.MapStencilFlag) {
+ /* make a copy of input */
+ memcpy(stencil, source, n * sizeof(GLstencil));
+ _mesa_apply_stencil_transfer_ops(ctx, n, stencil);
+ source = stencil;
+ }
+
+ switch (dstType) {
+ case GL_UNSIGNED_BYTE:
+ if (sizeof(GLstencil) == 1) {
+ memcpy( dest, source, n );
+ }
+ else {
+ GLubyte *dst = (GLubyte *) dest;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ dst[i] = (GLubyte) source[i];
+ }
+ }
+ break;
+ case GL_BYTE:
+ {
+ GLbyte *dst = (GLbyte *) dest;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ dst[i] = (GLbyte) (source[i] & 0x7f);
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT:
+ {
+ GLushort *dst = (GLushort *) dest;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ dst[i] = (GLushort) source[i];
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap2( (GLushort *) dst, n );
+ }
+ }
+ break;
+ case GL_SHORT:
+ {
+ GLshort *dst = (GLshort *) dest;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ dst[i] = (GLshort) source[i];
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap2( (GLushort *) dst, n );
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT:
+ {
+ GLuint *dst = (GLuint *) dest;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ dst[i] = (GLuint) source[i];
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap4( (GLuint *) dst, n );
+ }
+ }
+ break;
+ case GL_INT:
+ {
+ GLint *dst = (GLint *) dest;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ dst[i] = (GLint) source[i];
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap4( (GLuint *) dst, n );
+ }
+ }
+ break;
+ case GL_FLOAT:
+ {
+ GLfloat *dst = (GLfloat *) dest;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ dst[i] = (GLfloat) source[i];
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap4( (GLuint *) dst, n );
+ }
+ }
+ break;
+ case GL_HALF_FLOAT_ARB:
+ {
+ GLhalfARB *dst = (GLhalfARB *) dest;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ dst[i] = _mesa_float_to_half( (float) source[i] );
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap2( (GLushort *) dst, n );
+ }
+ }
+ break;
+ case GL_BITMAP:
+ if (dstPacking->LsbFirst) {
+ GLubyte *dst = (GLubyte *) dest;
+ GLint shift = 0;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ if (shift == 0)
+ *dst = 0;
+ *dst |= ((source[i] != 0) << shift);
+ shift++;
+ if (shift == 8) {
+ shift = 0;
+ dst++;
+ }
+ }
+ }
+ else {
+ GLubyte *dst = (GLubyte *) dest;
+ GLint shift = 7;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ if (shift == 7)
+ *dst = 0;
+ *dst |= ((source[i] != 0) << shift);
+ shift--;
+ if (shift < 0) {
+ shift = 7;
+ dst++;
+ }
+ }
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad type in _mesa_pack_index_span");
+ }
+}
+
+#define DEPTH_VALUES(GLTYPE, GLTYPE2FLOAT) \
+ do { \
+ GLuint i; \
+ const GLTYPE *src = (const GLTYPE *)source; \
+ for (i = 0; i < n; i++) { \
+ GLTYPE value = src[i]; \
+ if (srcPacking->SwapBytes) { \
+ if (sizeof(GLTYPE) == 2) { \
+ SWAP2BYTE(value); \
+ } else if (sizeof(GLTYPE) == 4) { \
+ SWAP4BYTE(value); \
+ } \
+ } \
+ depthValues[i] = GLTYPE2FLOAT(value); \
+ } \
+ } while (0)
+
+
+/**
+ * Unpack a row of depth/z values from memory, returning GLushort, GLuint
+ * or GLfloat values.
+ * The glPixelTransfer (scale/bias) params will be applied.
+ *
+ * \param dstType one of GL_UNSIGNED_SHORT, GL_UNSIGNED_INT, GL_FLOAT
+ * \param depthMax max value for returned GLushort or GLuint values
+ * (ignored for GLfloat).
+ */
+void
+_mesa_unpack_depth_span( const struct gl_context *ctx, GLuint n,
+ GLenum dstType, GLvoid *dest, GLuint depthMax,
+ GLenum srcType, const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking )
+{
+ GLfloat depthTemp[MAX_WIDTH], *depthValues;
+ GLboolean needClamp = GL_FALSE;
+
+ /* Look for special cases first.
+ * Not only are these faster, they're less prone to numeric conversion
+ * problems. Otherwise, converting from an int type to a float then
+ * back to an int type can introduce errors that will show up as
+ * artifacts in things like depth peeling which uses glCopyTexImage.
+ */
+ if (ctx->Pixel.DepthScale == 1.0 && ctx->Pixel.DepthBias == 0.0) {
+ if (srcType == GL_UNSIGNED_INT && dstType == GL_UNSIGNED_SHORT) {
+ const GLuint *src = (const GLuint *) source;
+ GLushort *dst = (GLushort *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = src[i] >> 16;
+ }
+ return;
+ }
+ if (srcType == GL_UNSIGNED_SHORT
+ && dstType == GL_UNSIGNED_INT
+ && depthMax == 0xffffffff) {
+ const GLushort *src = (const GLushort *) source;
+ GLuint *dst = (GLuint *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = src[i] | (src[i] << 16);
+ }
+ return;
+ }
+ if (srcType == GL_UNSIGNED_INT_24_8
+ && dstType == GL_UNSIGNED_INT
+ && depthMax == 0xffffff) {
+ const GLuint *src = (const GLuint *) source;
+ GLuint *dst = (GLuint *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = src[i] >> 8;
+ }
+ return;
+ }
+ /* XXX may want to add additional cases here someday */
+ }
+
+ /* general case path follows */
+
+ if (dstType == GL_FLOAT) {
+ depthValues = (GLfloat *) dest;
+ }
+ else {
+ depthValues = depthTemp;
+ }
+
+ /* Convert incoming values to GLfloat. Some conversions will require
+ * clamping, below.
+ */
+ switch (srcType) {
+ case GL_BYTE:
+ DEPTH_VALUES(GLbyte, BYTE_TO_FLOAT);
+ needClamp = GL_TRUE;
+ break;
+ case GL_UNSIGNED_BYTE:
+ DEPTH_VALUES(GLubyte, UBYTE_TO_FLOAT);
+ break;
+ case GL_SHORT:
+ DEPTH_VALUES(GLshort, SHORT_TO_FLOAT);
+ needClamp = GL_TRUE;
+ break;
+ case GL_UNSIGNED_SHORT:
+ DEPTH_VALUES(GLushort, USHORT_TO_FLOAT);
+ break;
+ case GL_INT:
+ DEPTH_VALUES(GLint, INT_TO_FLOAT);
+ needClamp = GL_TRUE;
+ break;
+ case GL_UNSIGNED_INT:
+ DEPTH_VALUES(GLuint, UINT_TO_FLOAT);
+ break;
+ case GL_UNSIGNED_INT_24_8_EXT: /* GL_EXT_packed_depth_stencil */
+ if (dstType == GL_UNSIGNED_INT_24_8_EXT &&
+ depthMax == 0xffffff &&
+ ctx->Pixel.DepthScale == 1.0 &&
+ ctx->Pixel.DepthBias == 0.0) {
+ const GLuint *src = (const GLuint *) source;
+ GLuint *zValues = (GLuint *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ GLuint value = src[i];
+ if (srcPacking->SwapBytes) {
+ SWAP4BYTE(value);
+ }
+ zValues[i] = value & 0xffffff00;
+ }
+ return;
+ }
+ else {
+ const GLuint *src = (const GLuint *) source;
+ const GLfloat scale = 1.0f / 0xffffff;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ GLuint value = src[i];
+ if (srcPacking->SwapBytes) {
+ SWAP4BYTE(value);
+ }
+ depthValues[i] = (value >> 8) * scale;
+ }
+ }
+ break;
+ case GL_FLOAT:
+ DEPTH_VALUES(GLfloat, 1*);
+ needClamp = GL_TRUE;
+ break;
+ case GL_HALF_FLOAT_ARB:
+ {
+ GLuint i;
+ const GLhalfARB *src = (const GLhalfARB *) source;
+ for (i = 0; i < n; i++) {
+ GLhalfARB value = src[i];
+ if (srcPacking->SwapBytes) {
+ SWAP2BYTE(value);
+ }
+ depthValues[i] = _mesa_half_to_float(value);
+ }
+ needClamp = GL_TRUE;
+ }
+ break;
+ default:
+ _mesa_problem(NULL, "bad type in _mesa_unpack_depth_span()");
+ return;
+ }
+
+ /* apply depth scale and bias */
+ {
+ const GLfloat scale = ctx->Pixel.DepthScale;
+ const GLfloat bias = ctx->Pixel.DepthBias;
+ if (scale != 1.0 || bias != 0.0) {
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ depthValues[i] = depthValues[i] * scale + bias;
+ }
+ needClamp = GL_TRUE;
+ }
+ }
+
+ /* clamp to [0, 1] */
+ if (needClamp) {
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ depthValues[i] = (GLfloat)CLAMP(depthValues[i], 0.0, 1.0);
+ }
+ }
+
+ /*
+ * Convert values to dstType
+ */
+ if (dstType == GL_UNSIGNED_INT) {
+ GLuint *zValues = (GLuint *) dest;
+ GLuint i;
+ if (depthMax <= 0xffffff) {
+ /* no overflow worries */
+ for (i = 0; i < n; i++) {
+ zValues[i] = (GLuint) (depthValues[i] * (GLfloat) depthMax);
+ }
+ }
+ else {
+ /* need to use double precision to prevent overflow problems */
+ for (i = 0; i < n; i++) {
+ GLdouble z = depthValues[i] * (GLfloat) depthMax;
+ if (z >= (GLdouble) 0xffffffff)
+ zValues[i] = 0xffffffff;
+ else
+ zValues[i] = (GLuint) z;
+ }
+ }
+ }
+ else if (dstType == GL_UNSIGNED_SHORT) {
+ GLushort *zValues = (GLushort *) dest;
+ GLuint i;
+ ASSERT(depthMax <= 0xffff);
+ for (i = 0; i < n; i++) {
+ zValues[i] = (GLushort) (depthValues[i] * (GLfloat) depthMax);
+ }
+ }
+ else {
+ ASSERT(dstType == GL_FLOAT);
+ /*ASSERT(depthMax == 1.0F);*/
+ }
+}
+
+
+/*
+ * Pack an array of depth values. The values are floats in [0,1].
+ */
+void
+_mesa_pack_depth_span( const struct gl_context *ctx, GLuint n, GLvoid *dest,
+ GLenum dstType, const GLfloat *depthSpan,
+ const struct gl_pixelstore_attrib *dstPacking )
+{
+ GLfloat depthCopy[MAX_WIDTH];
+
+ ASSERT(n <= MAX_WIDTH);
+
+ if (ctx->Pixel.DepthScale != 1.0 || ctx->Pixel.DepthBias != 0.0) {
+ memcpy(depthCopy, depthSpan, n * sizeof(GLfloat));
+ _mesa_scale_and_bias_depth(ctx, n, depthCopy);
+ depthSpan = depthCopy;
+ }
+
+ switch (dstType) {
+ case GL_UNSIGNED_BYTE:
+ {
+ GLubyte *dst = (GLubyte *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = FLOAT_TO_UBYTE( depthSpan[i] );
+ }
+ }
+ break;
+ case GL_BYTE:
+ {
+ GLbyte *dst = (GLbyte *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = FLOAT_TO_BYTE( depthSpan[i] );
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT:
+ {
+ GLushort *dst = (GLushort *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ CLAMPED_FLOAT_TO_USHORT(dst[i], depthSpan[i]);
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap2( (GLushort *) dst, n );
+ }
+ }
+ break;
+ case GL_SHORT:
+ {
+ GLshort *dst = (GLshort *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = FLOAT_TO_SHORT( depthSpan[i] );
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap2( (GLushort *) dst, n );
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT:
+ {
+ GLuint *dst = (GLuint *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = FLOAT_TO_UINT( depthSpan[i] );
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap4( (GLuint *) dst, n );
+ }
+ }
+ break;
+ case GL_INT:
+ {
+ GLint *dst = (GLint *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = FLOAT_TO_INT( depthSpan[i] );
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap4( (GLuint *) dst, n );
+ }
+ }
+ break;
+ case GL_FLOAT:
+ {
+ GLfloat *dst = (GLfloat *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = depthSpan[i];
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap4( (GLuint *) dst, n );
+ }
+ }
+ break;
+ case GL_HALF_FLOAT_ARB:
+ {
+ GLhalfARB *dst = (GLhalfARB *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = _mesa_float_to_half(depthSpan[i]);
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap2( (GLushort *) dst, n );
+ }
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad type in _mesa_pack_depth_span");
+ }
+}
+
+
+
+/**
+ * Pack depth and stencil values as GL_DEPTH_STENCIL/GL_UNSIGNED_INT_24_8.
+ */
+void
+_mesa_pack_depth_stencil_span(const struct gl_context *ctx, GLuint n, GLuint *dest,
+ const GLfloat *depthVals,
+ const GLstencil *stencilVals,
+ const struct gl_pixelstore_attrib *dstPacking)
+{
+ GLfloat depthCopy[MAX_WIDTH];
+ GLstencil stencilCopy[MAX_WIDTH];
+ GLuint i;
+
+ ASSERT(n <= MAX_WIDTH);
+
+ if (ctx->Pixel.DepthScale != 1.0 || ctx->Pixel.DepthBias != 0.0) {
+ memcpy(depthCopy, depthVals, n * sizeof(GLfloat));
+ _mesa_scale_and_bias_depth(ctx, n, depthCopy);
+ depthVals = depthCopy;
+ }
+
+ if (ctx->Pixel.IndexShift ||
+ ctx->Pixel.IndexOffset ||
+ ctx->Pixel.MapStencilFlag) {
+ memcpy(stencilCopy, stencilVals, n * sizeof(GLstencil));
+ _mesa_apply_stencil_transfer_ops(ctx, n, stencilCopy);
+ stencilVals = stencilCopy;
+ }
+
+ for (i = 0; i < n; i++) {
+ GLuint z = (GLuint) (depthVals[i] * 0xffffff);
+ dest[i] = (z << 8) | (stencilVals[i] & 0xff);
+ }
+
+ if (dstPacking->SwapBytes) {
+ _mesa_swap4(dest, n);
+ }
+}
+
+
+
+
+/**
+ * Unpack image data. Apply byte swapping, byte flipping (bitmap).
+ * Return all image data in a contiguous block. This is used when we
+ * compile glDrawPixels, glTexImage, etc into a display list. We
+ * need a copy of the data in a standard format.
+ */
+void *
+_mesa_unpack_image( GLuint dimensions,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type, const GLvoid *pixels,
+ const struct gl_pixelstore_attrib *unpack )
+{
+ GLint bytesPerRow, compsPerRow;
+ GLboolean flipBytes, swap2, swap4;
+
+ if (!pixels)
+ return NULL; /* not necessarily an error */
+
+ if (width <= 0 || height <= 0 || depth <= 0)
+ return NULL; /* generate error later */
+
+ if (type == GL_BITMAP) {
+ bytesPerRow = (width + 7) >> 3;
+ flipBytes = unpack->LsbFirst;
+ swap2 = swap4 = GL_FALSE;
+ compsPerRow = 0;
+ }
+ else {
+ const GLint bytesPerPixel = _mesa_bytes_per_pixel(format, type);
+ GLint components = _mesa_components_in_format(format);
+ GLint bytesPerComp;
+
+ if (_mesa_type_is_packed(type))
+ components = 1;
+
+ if (bytesPerPixel <= 0 || components <= 0)
+ return NULL; /* bad format or type. generate error later */
+ bytesPerRow = bytesPerPixel * width;
+ bytesPerComp = bytesPerPixel / components;
+ flipBytes = GL_FALSE;
+ swap2 = (bytesPerComp == 2) && unpack->SwapBytes;
+ swap4 = (bytesPerComp == 4) && unpack->SwapBytes;
+ compsPerRow = components * width;
+ assert(compsPerRow >= width);
+ }
+
+ {
+ GLubyte *destBuffer
+ = (GLubyte *) malloc(bytesPerRow * height * depth);
+ GLubyte *dst;
+ GLint img, row;
+ if (!destBuffer)
+ return NULL; /* generate GL_OUT_OF_MEMORY later */
+
+ dst = destBuffer;
+ for (img = 0; img < depth; img++) {
+ for (row = 0; row < height; row++) {
+ const GLvoid *src = _mesa_image_address(dimensions, unpack, pixels,
+ width, height, format, type, img, row, 0);
+
+ if ((type == GL_BITMAP) && (unpack->SkipPixels & 0x7)) {
+ GLint i;
+ flipBytes = GL_FALSE;
+ if (unpack->LsbFirst) {
+ GLubyte srcMask = 1 << (unpack->SkipPixels & 0x7);
+ GLubyte dstMask = 128;
+ const GLubyte *s = src;
+ GLubyte *d = dst;
+ *d = 0;
+ for (i = 0; i < width; i++) {
+ if (*s & srcMask) {
+ *d |= dstMask;
+ }
+ if (srcMask == 128) {
+ srcMask = 1;
+ s++;
+ }
+ else {
+ srcMask = srcMask << 1;
+ }
+ if (dstMask == 1) {
+ dstMask = 128;
+ d++;
+ *d = 0;
+ }
+ else {
+ dstMask = dstMask >> 1;
+ }
+ }
+ }
+ else {
+ GLubyte srcMask = 128 >> (unpack->SkipPixels & 0x7);
+ GLubyte dstMask = 128;
+ const GLubyte *s = src;
+ GLubyte *d = dst;
+ *d = 0;
+ for (i = 0; i < width; i++) {
+ if (*s & srcMask) {
+ *d |= dstMask;
+ }
+ if (srcMask == 1) {
+ srcMask = 128;
+ s++;
+ }
+ else {
+ srcMask = srcMask >> 1;
+ }
+ if (dstMask == 1) {
+ dstMask = 128;
+ d++;
+ *d = 0;
+ }
+ else {
+ dstMask = dstMask >> 1;
+ }
+ }
+ }
+ }
+ else {
+ memcpy(dst, src, bytesPerRow);
+ }
+
+ /* byte flipping/swapping */
+ if (flipBytes) {
+ flip_bytes((GLubyte *) dst, bytesPerRow);
+ }
+ else if (swap2) {
+ _mesa_swap2((GLushort*) dst, compsPerRow);
+ }
+ else if (swap4) {
+ _mesa_swap4((GLuint*) dst, compsPerRow);
+ }
+ dst += bytesPerRow;
+ }
+ }
+ return destBuffer;
+ }
+}
+
diff --git a/src/mesa/main/pack.h b/src/mesa/main/pack.h
new file mode 100644
index 00000000000..3b24159fc2b
--- /dev/null
+++ b/src/mesa/main/pack.h
@@ -0,0 +1,140 @@
+/*
+ * Mesa 3-D graphics library
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2010 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef PACK_H
+#define PACK_H
+
+
+#include "mtypes.h"
+
+
+extern void
+_mesa_unpack_polygon_stipple(const GLubyte *pattern, GLuint dest[32],
+ const struct gl_pixelstore_attrib *unpacking);
+
+
+extern void
+_mesa_pack_polygon_stipple(const GLuint pattern[32], GLubyte *dest,
+ const struct gl_pixelstore_attrib *packing);
+
+
+extern GLvoid *
+_mesa_unpack_bitmap(GLint width, GLint height, const GLubyte *pixels,
+ const struct gl_pixelstore_attrib *packing);
+
+extern void
+_mesa_pack_bitmap(GLint width, GLint height, const GLubyte *source,
+ GLubyte *dest, const struct gl_pixelstore_attrib *packing);
+
+
+extern void
+_mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n,
+ GLfloat rgba[][4],
+ GLenum dstFormat, GLenum dstType, GLvoid *dstAddr,
+ const struct gl_pixelstore_attrib *dstPacking,
+ GLbitfield transferOps);
+
+
+extern void
+_mesa_unpack_color_span_chan(struct gl_context *ctx,
+ GLuint n, GLenum dstFormat, GLchan dest[],
+ GLenum srcFormat, GLenum srcType,
+ const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking,
+ GLbitfield transferOps);
+
+
+extern void
+_mesa_unpack_color_span_float(struct gl_context *ctx,
+ GLuint n, GLenum dstFormat, GLfloat dest[],
+ GLenum srcFormat, GLenum srcType,
+ const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking,
+ GLbitfield transferOps);
+
+extern void
+_mesa_unpack_dudv_span_byte(struct gl_context *ctx,
+ GLuint n, GLenum dstFormat, GLbyte dest[],
+ GLenum srcFormat, GLenum srcType,
+ const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking,
+ GLbitfield transferOps);
+
+extern void
+_mesa_unpack_index_span(const struct gl_context *ctx, GLuint n,
+ GLenum dstType, GLvoid *dest,
+ GLenum srcType, const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking,
+ GLbitfield transferOps);
+
+
+extern void
+_mesa_pack_index_span(const struct gl_context *ctx, GLuint n,
+ GLenum dstType, GLvoid *dest, const GLuint *source,
+ const struct gl_pixelstore_attrib *dstPacking,
+ GLbitfield transferOps);
+
+
+extern void
+_mesa_unpack_stencil_span(const struct gl_context *ctx, GLuint n,
+ GLenum dstType, GLvoid *dest,
+ GLenum srcType, const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking,
+ GLbitfield transferOps);
+
+extern void
+_mesa_pack_stencil_span(const struct gl_context *ctx, GLuint n,
+ GLenum dstType, GLvoid *dest, const GLstencil *source,
+ const struct gl_pixelstore_attrib *dstPacking);
+
+
+extern void
+_mesa_unpack_depth_span(const struct gl_context *ctx, GLuint n,
+ GLenum dstType, GLvoid *dest, GLuint depthMax,
+ GLenum srcType, const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking);
+
+extern void
+_mesa_pack_depth_span(const struct gl_context *ctx, GLuint n, GLvoid *dest,
+ GLenum dstType, const GLfloat *depthSpan,
+ const struct gl_pixelstore_attrib *dstPacking);
+
+
+extern void
+_mesa_pack_depth_stencil_span(const struct gl_context *ctx,
+ GLuint n, GLuint *dest,
+ const GLfloat *depthVals,
+ const GLstencil *stencilVals,
+ const struct gl_pixelstore_attrib *dstPacking);
+
+
+extern void *
+_mesa_unpack_image(GLuint dimensions,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type, const GLvoid *pixels,
+ const struct gl_pixelstore_attrib *unpack);
+
+
+#endif
diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c
index 1d378e4d9f7..5f824b34294 100644
--- a/src/mesa/main/pixel.c
+++ b/src/mesa/main/pixel.c
@@ -69,7 +69,7 @@ _mesa_PixelZoom( GLfloat xfactor, GLfloat yfactor )
* Return pointer to a pixelmap by name.
*/
static struct gl_pixelmap *
-get_pixelmap(GLcontext *ctx, GLenum map)
+get_pixelmap(struct gl_context *ctx, GLenum map)
{
switch (map) {
case GL_PIXEL_MAP_I_TO_I:
@@ -102,7 +102,7 @@ get_pixelmap(GLcontext *ctx, GLenum map)
* Helper routine used by the other _mesa_PixelMap() functions.
*/
static void
-store_pixelmap(GLcontext *ctx, GLenum map, GLsizei mapsize,
+store_pixelmap(struct gl_context *ctx, GLenum map, GLsizei mapsize,
const GLfloat *values)
{
GLint i;
@@ -143,7 +143,7 @@ store_pixelmap(GLcontext *ctx, GLenum map, GLsizei mapsize,
* Convenience wrapper for _mesa_validate_pbo_access() for gl[Get]PixelMap().
*/
static GLboolean
-validate_pbo_access(GLcontext *ctx, struct gl_pixelstore_attrib *pack,
+validate_pbo_access(struct gl_context *ctx, struct gl_pixelstore_attrib *pack,
GLsizei mapsize, GLenum format, GLenum type,
const GLvoid *ptr)
{
@@ -590,7 +590,7 @@ _mesa_PixelTransferi( GLenum pname, GLint param )
* pixel transfer operations are enabled.
*/
static void
-update_image_transfer_state(GLcontext *ctx)
+update_image_transfer_state(struct gl_context *ctx)
{
GLuint mask = 0;
@@ -613,7 +613,7 @@ update_image_transfer_state(GLcontext *ctx)
/**
* Update mesa pixel transfer derived state.
*/
-void _mesa_update_pixel( GLcontext *ctx, GLuint new_state )
+void _mesa_update_pixel( struct gl_context *ctx, GLuint new_state )
{
if (new_state & _MESA_NEW_TRANSFER_STATE)
update_image_transfer_state(ctx);
@@ -655,7 +655,7 @@ init_pixelmap(struct gl_pixelmap *map)
* Initialize the context's PIXEL attribute group.
*/
void
-_mesa_init_pixel( GLcontext *ctx )
+_mesa_init_pixel( struct gl_context *ctx )
{
/* Pixel group */
ctx->Pixel.RedBias = 0.0;
diff --git a/src/mesa/main/pixel.h b/src/mesa/main/pixel.h
index f4d3f1efdb0..03560835a8c 100644
--- a/src/mesa/main/pixel.h
+++ b/src/mesa/main/pixel.h
@@ -39,7 +39,7 @@
#if FEATURE_pixel_transfer
extern void
-_mesa_update_pixel( GLcontext *ctx, GLuint newstate );
+_mesa_update_pixel( struct gl_context *ctx, GLuint newstate );
extern void
_mesa_init_pixel_dispatch( struct _glapi_table * disp );
@@ -47,7 +47,7 @@ _mesa_init_pixel_dispatch( struct _glapi_table * disp );
#else /* FEATURE_pixel_transfer */
static INLINE void
-_mesa_update_pixel(GLcontext *ctx, GLuint newstate)
+_mesa_update_pixel(struct gl_context *ctx, GLuint newstate)
{
}
@@ -60,7 +60,7 @@ _mesa_init_pixel_dispatch(struct _glapi_table *disp)
extern void
-_mesa_init_pixel( GLcontext * ctx );
+_mesa_init_pixel( struct gl_context * ctx );
/*@}*/
diff --git a/src/mesa/main/pixelstore.c b/src/mesa/main/pixelstore.c
index ec585ef0cce..b16d27a4ea5 100644
--- a/src/mesa/main/pixelstore.c
+++ b/src/mesa/main/pixelstore.c
@@ -228,7 +228,7 @@ _mesa_PixelStoref( GLenum pname, GLfloat param )
* Initialize the context's pixel store state.
*/
void
-_mesa_init_pixelstore( GLcontext *ctx )
+_mesa_init_pixelstore( struct gl_context *ctx )
{
/* Pixel transfer */
ctx->Pack.Alignment = 4;
diff --git a/src/mesa/main/pixelstore.h b/src/mesa/main/pixelstore.h
index 47bff4276d1..cdef7de2613 100644
--- a/src/mesa/main/pixelstore.h
+++ b/src/mesa/main/pixelstore.h
@@ -45,7 +45,7 @@ _mesa_PixelStoref( GLenum pname, GLfloat param );
extern void
-_mesa_init_pixelstore( GLcontext *ctx );
+_mesa_init_pixelstore( struct gl_context *ctx );
#endif
diff --git a/src/mesa/main/pixeltransfer.c b/src/mesa/main/pixeltransfer.c
new file mode 100644
index 00000000000..711181fd89e
--- /dev/null
+++ b/src/mesa/main/pixeltransfer.c
@@ -0,0 +1,566 @@
+/*
+ * Mesa 3-D graphics library
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 2009-2010 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/**
+ * \file pixeltransfer.c
+ * Pixel transfer operations (scale, bias, table lookups, etc)
+ */
+
+
+#include "glheader.h"
+#include "colormac.h"
+#include "pixeltransfer.h"
+#include "imports.h"
+
+
+/*
+ * Apply scale and bias factors to an array of RGBA pixels.
+ */
+void
+_mesa_scale_and_bias_rgba(GLuint n, GLfloat rgba[][4],
+ GLfloat rScale, GLfloat gScale,
+ GLfloat bScale, GLfloat aScale,
+ GLfloat rBias, GLfloat gBias,
+ GLfloat bBias, GLfloat aBias)
+{
+ if (rScale != 1.0 || rBias != 0.0) {
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ rgba[i][RCOMP] = rgba[i][RCOMP] * rScale + rBias;
+ }
+ }
+ if (gScale != 1.0 || gBias != 0.0) {
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ rgba[i][GCOMP] = rgba[i][GCOMP] * gScale + gBias;
+ }
+ }
+ if (bScale != 1.0 || bBias != 0.0) {
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ rgba[i][BCOMP] = rgba[i][BCOMP] * bScale + bBias;
+ }
+ }
+ if (aScale != 1.0 || aBias != 0.0) {
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ rgba[i][ACOMP] = rgba[i][ACOMP] * aScale + aBias;
+ }
+ }
+}
+
+
+/*
+ * Apply pixel mapping to an array of floating point RGBA pixels.
+ */
+void
+_mesa_map_rgba( const struct gl_context *ctx, GLuint n, GLfloat rgba[][4] )
+{
+ const GLfloat rscale = (GLfloat) (ctx->PixelMaps.RtoR.Size - 1);
+ const GLfloat gscale = (GLfloat) (ctx->PixelMaps.GtoG.Size - 1);
+ const GLfloat bscale = (GLfloat) (ctx->PixelMaps.BtoB.Size - 1);
+ const GLfloat ascale = (GLfloat) (ctx->PixelMaps.AtoA.Size - 1);
+ const GLfloat *rMap = ctx->PixelMaps.RtoR.Map;
+ const GLfloat *gMap = ctx->PixelMaps.GtoG.Map;
+ const GLfloat *bMap = ctx->PixelMaps.BtoB.Map;
+ const GLfloat *aMap = ctx->PixelMaps.AtoA.Map;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ GLfloat r = CLAMP(rgba[i][RCOMP], 0.0F, 1.0F);
+ GLfloat g = CLAMP(rgba[i][GCOMP], 0.0F, 1.0F);
+ GLfloat b = CLAMP(rgba[i][BCOMP], 0.0F, 1.0F);
+ GLfloat a = CLAMP(rgba[i][ACOMP], 0.0F, 1.0F);
+ rgba[i][RCOMP] = rMap[IROUND(r * rscale)];
+ rgba[i][GCOMP] = gMap[IROUND(g * gscale)];
+ rgba[i][BCOMP] = bMap[IROUND(b * bscale)];
+ rgba[i][ACOMP] = aMap[IROUND(a * ascale)];
+ }
+}
+
+/**
+ * Apply a color table lookup to an array of floating point RGBA colors.
+ */
+void
+_mesa_lookup_rgba_float(const struct gl_color_table *table,
+ GLuint n, GLfloat rgba[][4])
+{
+ const GLint max = table->Size - 1;
+ const GLfloat scale = (GLfloat) max;
+ const GLfloat *lut = table->TableF;
+ GLuint i;
+
+ if (!table->TableF || table->Size == 0)
+ return;
+
+ switch (table->_BaseFormat) {
+ case GL_INTENSITY:
+ /* replace RGBA with I */
+ for (i = 0; i < n; i++) {
+ GLint j = IROUND(rgba[i][RCOMP] * scale);
+ GLfloat c = lut[CLAMP(j, 0, max)];
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] =
+ rgba[i][ACOMP] = c;
+ }
+ break;
+ case GL_LUMINANCE:
+ /* replace RGB with L */
+ for (i = 0; i < n; i++) {
+ GLint j = IROUND(rgba[i][RCOMP] * scale);
+ GLfloat c = lut[CLAMP(j, 0, max)];
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] = c;
+ }
+ break;
+ case GL_ALPHA:
+ /* replace A with A */
+ for (i = 0; i < n; i++) {
+ GLint j = IROUND(rgba[i][ACOMP] * scale);
+ rgba[i][ACOMP] = lut[CLAMP(j, 0, max)];
+ }
+ break;
+ case GL_LUMINANCE_ALPHA:
+ /* replace RGBA with LLLA */
+ for (i = 0; i < n; i++) {
+ GLint jL = IROUND(rgba[i][RCOMP] * scale);
+ GLint jA = IROUND(rgba[i][ACOMP] * scale);
+ GLfloat luminance, alpha;
+ jL = CLAMP(jL, 0, max);
+ jA = CLAMP(jA, 0, max);
+ luminance = lut[jL * 2 + 0];
+ alpha = lut[jA * 2 + 1];
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] = luminance;
+ rgba[i][ACOMP] = alpha;;
+ }
+ break;
+ case GL_RED:
+ /* replace RGB with RGB */
+ for (i = 0; i < n; i++) {
+ GLint jR = IROUND(rgba[i][RCOMP] * scale);
+ jR = CLAMP(jR, 0, max);
+ rgba[i][RCOMP] = lut[jR * 3 + 0];
+ }
+ break;
+ case GL_RG:
+ /* replace RG with RG */
+ for (i = 0; i < n; i++) {
+ GLint jR = IROUND(rgba[i][RCOMP] * scale);
+ GLint jG = IROUND(rgba[i][GCOMP] * scale);
+ jR = CLAMP(jR, 0, max);
+ jG = CLAMP(jG, 0, max);
+ rgba[i][RCOMP] = lut[jR * 3 + 0];
+ rgba[i][GCOMP] = lut[jG * 3 + 1];
+ }
+ break;
+ case GL_RGB:
+ /* replace RGB with RGB */
+ for (i = 0; i < n; i++) {
+ GLint jR = IROUND(rgba[i][RCOMP] * scale);
+ GLint jG = IROUND(rgba[i][GCOMP] * scale);
+ GLint jB = IROUND(rgba[i][BCOMP] * scale);
+ jR = CLAMP(jR, 0, max);
+ jG = CLAMP(jG, 0, max);
+ jB = CLAMP(jB, 0, max);
+ rgba[i][RCOMP] = lut[jR * 3 + 0];
+ rgba[i][GCOMP] = lut[jG * 3 + 1];
+ rgba[i][BCOMP] = lut[jB * 3 + 2];
+ }
+ break;
+ case GL_RGBA:
+ /* replace RGBA with RGBA */
+ for (i = 0; i < n; i++) {
+ GLint jR = IROUND(rgba[i][RCOMP] * scale);
+ GLint jG = IROUND(rgba[i][GCOMP] * scale);
+ GLint jB = IROUND(rgba[i][BCOMP] * scale);
+ GLint jA = IROUND(rgba[i][ACOMP] * scale);
+ jR = CLAMP(jR, 0, max);
+ jG = CLAMP(jG, 0, max);
+ jB = CLAMP(jB, 0, max);
+ jA = CLAMP(jA, 0, max);
+ rgba[i][RCOMP] = lut[jR * 4 + 0];
+ rgba[i][GCOMP] = lut[jG * 4 + 1];
+ rgba[i][BCOMP] = lut[jB * 4 + 2];
+ rgba[i][ACOMP] = lut[jA * 4 + 3];
+ }
+ break;
+ default:
+ _mesa_problem(NULL, "Bad format in _mesa_lookup_rgba_float");
+ return;
+ }
+}
+
+
+
+/**
+ * Apply a color table lookup to an array of ubyte/RGBA colors.
+ */
+void
+_mesa_lookup_rgba_ubyte(const struct gl_color_table *table,
+ GLuint n, GLubyte rgba[][4])
+{
+ const GLubyte *lut = table->TableUB;
+ const GLfloat scale = (GLfloat) (table->Size - 1) / (GLfloat)255.0;
+ GLuint i;
+
+ if (!table->TableUB || table->Size == 0)
+ return;
+
+ switch (table->_BaseFormat) {
+ case GL_INTENSITY:
+ /* replace RGBA with I */
+ if (table->Size == 256) {
+ for (i = 0; i < n; i++) {
+ const GLubyte c = lut[rgba[i][RCOMP]];
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] =
+ rgba[i][ACOMP] = c;
+ }
+ }
+ else {
+ for (i = 0; i < n; i++) {
+ GLint j = IROUND((GLfloat) rgba[i][RCOMP] * scale);
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] =
+ rgba[i][ACOMP] = lut[j];
+ }
+ }
+ break;
+ case GL_LUMINANCE:
+ /* replace RGB with L */
+ if (table->Size == 256) {
+ for (i = 0; i < n; i++) {
+ const GLubyte c = lut[rgba[i][RCOMP]];
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] = c;
+ }
+ }
+ else {
+ for (i = 0; i < n; i++) {
+ GLint j = IROUND((GLfloat) rgba[i][RCOMP] * scale);
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] = lut[j];
+ }
+ }
+ break;
+ case GL_ALPHA:
+ /* replace A with A */
+ if (table->Size == 256) {
+ for (i = 0; i < n; i++) {
+ rgba[i][ACOMP] = lut[rgba[i][ACOMP]];
+ }
+ }
+ else {
+ for (i = 0; i < n; i++) {
+ GLint j = IROUND((GLfloat) rgba[i][ACOMP] * scale);
+ rgba[i][ACOMP] = lut[j];
+ }
+ }
+ break;
+ case GL_LUMINANCE_ALPHA:
+ /* replace RGBA with LLLA */
+ if (table->Size == 256) {
+ for (i = 0; i < n; i++) {
+ GLubyte l = lut[rgba[i][RCOMP] * 2 + 0];
+ GLubyte a = lut[rgba[i][ACOMP] * 2 + 1];;
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] = l;
+ rgba[i][ACOMP] = a;
+ }
+ }
+ else {
+ for (i = 0; i < n; i++) {
+ GLint jL = IROUND((GLfloat) rgba[i][RCOMP] * scale);
+ GLint jA = IROUND((GLfloat) rgba[i][ACOMP] * scale);
+ GLubyte luminance = lut[jL * 2 + 0];
+ GLubyte alpha = lut[jA * 2 + 1];
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] = luminance;
+ rgba[i][ACOMP] = alpha;
+ }
+ }
+ break;
+ case GL_RGB:
+ if (table->Size == 256) {
+ for (i = 0; i < n; i++) {
+ rgba[i][RCOMP] = lut[rgba[i][RCOMP] * 3 + 0];
+ rgba[i][GCOMP] = lut[rgba[i][GCOMP] * 3 + 1];
+ rgba[i][BCOMP] = lut[rgba[i][BCOMP] * 3 + 2];
+ }
+ }
+ else {
+ for (i = 0; i < n; i++) {
+ GLint jR = IROUND((GLfloat) rgba[i][RCOMP] * scale);
+ GLint jG = IROUND((GLfloat) rgba[i][GCOMP] * scale);
+ GLint jB = IROUND((GLfloat) rgba[i][BCOMP] * scale);
+ rgba[i][RCOMP] = lut[jR * 3 + 0];
+ rgba[i][GCOMP] = lut[jG * 3 + 1];
+ rgba[i][BCOMP] = lut[jB * 3 + 2];
+ }
+ }
+ break;
+ case GL_RGBA:
+ if (table->Size == 256) {
+ for (i = 0; i < n; i++) {
+ rgba[i][RCOMP] = lut[rgba[i][RCOMP] * 4 + 0];
+ rgba[i][GCOMP] = lut[rgba[i][GCOMP] * 4 + 1];
+ rgba[i][BCOMP] = lut[rgba[i][BCOMP] * 4 + 2];
+ rgba[i][ACOMP] = lut[rgba[i][ACOMP] * 4 + 3];
+ }
+ }
+ else {
+ for (i = 0; i < n; i++) {
+ GLint jR = IROUND((GLfloat) rgba[i][RCOMP] * scale);
+ GLint jG = IROUND((GLfloat) rgba[i][GCOMP] * scale);
+ GLint jB = IROUND((GLfloat) rgba[i][BCOMP] * scale);
+ GLint jA = IROUND((GLfloat) rgba[i][ACOMP] * scale);
+ CLAMPED_FLOAT_TO_CHAN(rgba[i][RCOMP], lut[jR * 4 + 0]);
+ CLAMPED_FLOAT_TO_CHAN(rgba[i][GCOMP], lut[jG * 4 + 1]);
+ CLAMPED_FLOAT_TO_CHAN(rgba[i][BCOMP], lut[jB * 4 + 2]);
+ CLAMPED_FLOAT_TO_CHAN(rgba[i][ACOMP], lut[jA * 4 + 3]);
+ }
+ }
+ break;
+ default:
+ _mesa_problem(NULL, "Bad format in _mesa_lookup_rgba_chan");
+ return;
+ }
+}
+
+
+
+/*
+ * Map color indexes to float rgba values.
+ */
+void
+_mesa_map_ci_to_rgba( const struct gl_context *ctx, GLuint n,
+ const GLuint index[], GLfloat rgba[][4] )
+{
+ GLuint rmask = ctx->PixelMaps.ItoR.Size - 1;
+ GLuint gmask = ctx->PixelMaps.ItoG.Size - 1;
+ GLuint bmask = ctx->PixelMaps.ItoB.Size - 1;
+ GLuint amask = ctx->PixelMaps.ItoA.Size - 1;
+ const GLfloat *rMap = ctx->PixelMaps.ItoR.Map;
+ const GLfloat *gMap = ctx->PixelMaps.ItoG.Map;
+ const GLfloat *bMap = ctx->PixelMaps.ItoB.Map;
+ const GLfloat *aMap = ctx->PixelMaps.ItoA.Map;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ rgba[i][RCOMP] = rMap[index[i] & rmask];
+ rgba[i][GCOMP] = gMap[index[i] & gmask];
+ rgba[i][BCOMP] = bMap[index[i] & bmask];
+ rgba[i][ACOMP] = aMap[index[i] & amask];
+ }
+}
+
+
+/**
+ * Map ubyte color indexes to ubyte/RGBA values.
+ */
+void
+_mesa_map_ci8_to_rgba8(const struct gl_context *ctx,
+ GLuint n, const GLubyte index[],
+ GLubyte rgba[][4])
+{
+ GLuint rmask = ctx->PixelMaps.ItoR.Size - 1;
+ GLuint gmask = ctx->PixelMaps.ItoG.Size - 1;
+ GLuint bmask = ctx->PixelMaps.ItoB.Size - 1;
+ GLuint amask = ctx->PixelMaps.ItoA.Size - 1;
+ const GLubyte *rMap = ctx->PixelMaps.ItoR.Map8;
+ const GLubyte *gMap = ctx->PixelMaps.ItoG.Map8;
+ const GLubyte *bMap = ctx->PixelMaps.ItoB.Map8;
+ const GLubyte *aMap = ctx->PixelMaps.ItoA.Map8;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ rgba[i][RCOMP] = rMap[index[i] & rmask];
+ rgba[i][GCOMP] = gMap[index[i] & gmask];
+ rgba[i][BCOMP] = bMap[index[i] & bmask];
+ rgba[i][ACOMP] = aMap[index[i] & amask];
+ }
+}
+
+
+void
+_mesa_scale_and_bias_depth(const struct gl_context *ctx, GLuint n,
+ GLfloat depthValues[])
+{
+ const GLfloat scale = ctx->Pixel.DepthScale;
+ const GLfloat bias = ctx->Pixel.DepthBias;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ GLfloat d = depthValues[i] * scale + bias;
+ depthValues[i] = CLAMP(d, 0.0F, 1.0F);
+ }
+}
+
+
+void
+_mesa_scale_and_bias_depth_uint(const struct gl_context *ctx, GLuint n,
+ GLuint depthValues[])
+{
+ const GLdouble max = (double) 0xffffffff;
+ const GLdouble scale = ctx->Pixel.DepthScale;
+ const GLdouble bias = ctx->Pixel.DepthBias * max;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ GLdouble d = (GLdouble) depthValues[i] * scale + bias;
+ d = CLAMP(d, 0.0, max);
+ depthValues[i] = (GLuint) d;
+ }
+}
+
+/**
+ * Apply various pixel transfer operations to an array of RGBA pixels
+ * as indicated by the transferOps bitmask
+ */
+void
+_mesa_apply_rgba_transfer_ops(struct gl_context *ctx, GLbitfield transferOps,
+ GLuint n, GLfloat rgba[][4])
+{
+ /* scale & bias */
+ if (transferOps & IMAGE_SCALE_BIAS_BIT) {
+ _mesa_scale_and_bias_rgba(n, rgba,
+ ctx->Pixel.RedScale, ctx->Pixel.GreenScale,
+ ctx->Pixel.BlueScale, ctx->Pixel.AlphaScale,
+ ctx->Pixel.RedBias, ctx->Pixel.GreenBias,
+ ctx->Pixel.BlueBias, ctx->Pixel.AlphaBias);
+ }
+ /* color map lookup */
+ if (transferOps & IMAGE_MAP_COLOR_BIT) {
+ _mesa_map_rgba( ctx, n, rgba );
+ }
+
+ /* clamping to [0,1] */
+ if (transferOps & IMAGE_CLAMP_BIT) {
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ rgba[i][RCOMP] = CLAMP(rgba[i][RCOMP], 0.0F, 1.0F);
+ rgba[i][GCOMP] = CLAMP(rgba[i][GCOMP], 0.0F, 1.0F);
+ rgba[i][BCOMP] = CLAMP(rgba[i][BCOMP], 0.0F, 1.0F);
+ rgba[i][ACOMP] = CLAMP(rgba[i][ACOMP], 0.0F, 1.0F);
+ }
+ }
+}
+
+
+/*
+ * Apply color index shift and offset to an array of pixels.
+ */
+void
+_mesa_shift_and_offset_ci(const struct gl_context *ctx,
+ GLuint n, GLuint indexes[])
+{
+ GLint shift = ctx->Pixel.IndexShift;
+ GLint offset = ctx->Pixel.IndexOffset;
+ GLuint i;
+ if (shift > 0) {
+ for (i=0;i<n;i++) {
+ indexes[i] = (indexes[i] << shift) + offset;
+ }
+ }
+ else if (shift < 0) {
+ shift = -shift;
+ for (i=0;i<n;i++) {
+ indexes[i] = (indexes[i] >> shift) + offset;
+ }
+ }
+ else {
+ for (i=0;i<n;i++) {
+ indexes[i] = indexes[i] + offset;
+ }
+ }
+}
+
+
+
+/**
+ * Apply color index shift, offset and table lookup to an array
+ * of color indexes;
+ */
+void
+_mesa_apply_ci_transfer_ops(const struct gl_context *ctx,
+ GLbitfield transferOps,
+ GLuint n, GLuint indexes[])
+{
+ if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
+ _mesa_shift_and_offset_ci(ctx, n, indexes);
+ }
+ if (transferOps & IMAGE_MAP_COLOR_BIT) {
+ const GLuint mask = ctx->PixelMaps.ItoI.Size - 1;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ const GLuint j = indexes[i] & mask;
+ indexes[i] = IROUND(ctx->PixelMaps.ItoI.Map[j]);
+ }
+ }
+}
+
+
+/**
+ * Apply stencil index shift, offset and table lookup to an array
+ * of stencil values.
+ */
+void
+_mesa_apply_stencil_transfer_ops(const struct gl_context *ctx, GLuint n,
+ GLstencil stencil[])
+{
+ if (ctx->Pixel.IndexShift != 0 || ctx->Pixel.IndexOffset != 0) {
+ const GLint offset = ctx->Pixel.IndexOffset;
+ GLint shift = ctx->Pixel.IndexShift;
+ GLuint i;
+ if (shift > 0) {
+ for (i = 0; i < n; i++) {
+ stencil[i] = (stencil[i] << shift) + offset;
+ }
+ }
+ else if (shift < 0) {
+ shift = -shift;
+ for (i = 0; i < n; i++) {
+ stencil[i] = (stencil[i] >> shift) + offset;
+ }
+ }
+ else {
+ for (i = 0; i < n; i++) {
+ stencil[i] = stencil[i] + offset;
+ }
+ }
+ }
+ if (ctx->Pixel.MapStencilFlag) {
+ GLuint mask = ctx->PixelMaps.StoS.Size - 1;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ stencil[i] = (GLstencil)ctx->PixelMaps.StoS.Map[ stencil[i] & mask ];
+ }
+ }
+}
diff --git a/src/mesa/main/pixeltransfer.h b/src/mesa/main/pixeltransfer.h
new file mode 100644
index 00000000000..34f3e49ba76
--- /dev/null
+++ b/src/mesa/main/pixeltransfer.h
@@ -0,0 +1,90 @@
+/*
+ * Mesa 3-D graphics library
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 2009-2010 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef PIXELTRANSFER_H
+#define PIXELTRANSFER_H
+
+
+#include "mtypes.h"
+
+
+extern void
+_mesa_scale_and_bias_rgba(GLuint n, GLfloat rgba[][4],
+ GLfloat rScale, GLfloat gScale,
+ GLfloat bScale, GLfloat aScale,
+ GLfloat rBias, GLfloat gBias,
+ GLfloat bBias, GLfloat aBias);
+
+extern void
+_mesa_map_rgba(const struct gl_context *ctx, GLuint n, GLfloat rgba[][4]);
+
+extern void
+_mesa_lookup_rgba_float(const struct gl_color_table *table,
+ GLuint n, GLfloat rgba[][4]);
+
+extern void
+_mesa_lookup_rgba_ubyte(const struct gl_color_table *table,
+ GLuint n, GLubyte rgba[][4]);
+
+
+extern void
+_mesa_map_ci_to_rgba(const struct gl_context *ctx,
+ GLuint n, const GLuint index[], GLfloat rgba[][4]);
+
+
+extern void
+_mesa_map_ci8_to_rgba8(const struct gl_context *ctx,
+ GLuint n, const GLubyte index[],
+ GLubyte rgba[][4]);
+
+
+extern void
+_mesa_scale_and_bias_depth(const struct gl_context *ctx, GLuint n,
+ GLfloat depthValues[]);
+
+extern void
+_mesa_scale_and_bias_depth_uint(const struct gl_context *ctx, GLuint n,
+ GLuint depthValues[]);
+
+extern void
+_mesa_apply_rgba_transfer_ops(struct gl_context *ctx, GLbitfield transferOps,
+ GLuint n, GLfloat rgba[][4]);
+
+extern void
+_mesa_shift_and_offset_ci(const struct gl_context *ctx,
+ GLuint n, GLuint indexes[]);
+
+extern void
+_mesa_apply_ci_transfer_ops(const struct gl_context *ctx,
+ GLbitfield transferOps,
+ GLuint n, GLuint indexes[]);
+
+
+extern void
+_mesa_apply_stencil_transfer_ops(const struct gl_context *ctx, GLuint n,
+ GLstencil stencil[]);
+
+
+#endif
diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c
index eab9d13d6d9..87bfae27eba 100644
--- a/src/mesa/main/points.c
+++ b/src/mesa/main/points.c
@@ -245,11 +245,11 @@ _mesa_PointParameterfv( GLenum pname, const GLfloat *params)
*
* \param ctx GL context.
*
- * Initializes __GLcontextRec::Point and point related constants in
- * __GLcontextRec::Const.
+ * Initializes __struct gl_contextRec::Point and point related constants in
+ * __struct gl_contextRec::Const.
*/
void
-_mesa_init_point(GLcontext *ctx)
+_mesa_init_point(struct gl_context *ctx)
{
GLuint i;
diff --git a/src/mesa/main/points.h b/src/mesa/main/points.h
index 156641eab91..b222379b1b5 100644
--- a/src/mesa/main/points.h
+++ b/src/mesa/main/points.h
@@ -51,7 +51,7 @@ extern void GLAPIENTRY
_mesa_PointParameterfv( GLenum pname, const GLfloat *params );
extern void
-_mesa_init_point( GLcontext * ctx );
+_mesa_init_point( struct gl_context * ctx );
#endif
diff --git a/src/mesa/main/polygon.c b/src/mesa/main/polygon.c
index 30e4a606bb7..9c213b9b4c0 100644
--- a/src/mesa/main/polygon.c
+++ b/src/mesa/main/polygon.c
@@ -34,6 +34,7 @@
#include "context.h"
#include "image.h"
#include "enums.h"
+#include "pack.h"
#include "polygon.h"
#include "mtypes.h"
@@ -190,7 +191,7 @@ _mesa_PolygonMode( GLenum face, GLenum mode )
* too.
*/
void
-_mesa_polygon_stipple(GLcontext *ctx, const GLubyte *pattern)
+_mesa_polygon_stipple(struct gl_context *ctx, const GLubyte *pattern)
{
pattern = _mesa_map_validate_pbo_source(ctx, 2,
&ctx->Unpack, 32, 32, 1,
@@ -293,10 +294,10 @@ _mesa_PolygonOffsetEXT( GLfloat factor, GLfloat bias )
*
* \param ctx GL context.
*
- * Initializes __GLcontextRec::Polygon and __GLcontextRec::PolygonStipple
+ * Initializes __struct gl_contextRec::Polygon and __struct gl_contextRec::PolygonStipple
* attribute groups.
*/
-void _mesa_init_polygon( GLcontext * ctx )
+void _mesa_init_polygon( struct gl_context * ctx )
{
/* Polygon group */
ctx->Polygon.CullFlag = GL_FALSE;
diff --git a/src/mesa/main/polygon.h b/src/mesa/main/polygon.h
index 78e8394d053..ad0ac4cc3a7 100644
--- a/src/mesa/main/polygon.h
+++ b/src/mesa/main/polygon.h
@@ -36,7 +36,7 @@
extern void
-_mesa_polygon_stipple(GLcontext *ctx, const GLubyte *pattern);
+_mesa_polygon_stipple(struct gl_context *ctx, const GLubyte *pattern);
extern void GLAPIENTRY
@@ -61,6 +61,6 @@ extern void GLAPIENTRY
_mesa_GetPolygonStipple( GLubyte *mask );
extern void
-_mesa_init_polygon( GLcontext * ctx );
+_mesa_init_polygon( struct gl_context * ctx );
#endif
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index a907dac836b..88743977206 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -43,7 +43,7 @@
* \return pointer to new query_object object or NULL if out of memory.
*/
static struct gl_query_object *
-_mesa_new_query_object(GLcontext *ctx, GLuint id)
+_mesa_new_query_object(struct gl_context *ctx, GLuint id)
{
struct gl_query_object *q = MALLOC_STRUCT(gl_query_object);
(void) ctx;
@@ -62,7 +62,7 @@ _mesa_new_query_object(GLcontext *ctx, GLuint id)
* Called via ctx->Driver.BeginQuery().
*/
static void
-_mesa_begin_query(GLcontext *ctx, struct gl_query_object *q)
+_mesa_begin_query(struct gl_context *ctx, struct gl_query_object *q)
{
/* no-op */
}
@@ -73,7 +73,7 @@ _mesa_begin_query(GLcontext *ctx, struct gl_query_object *q)
* Called via ctx->Driver.EndQuery().
*/
static void
-_mesa_end_query(GLcontext *ctx, struct gl_query_object *q)
+_mesa_end_query(struct gl_context *ctx, struct gl_query_object *q)
{
q->Ready = GL_TRUE;
}
@@ -84,7 +84,7 @@ _mesa_end_query(GLcontext *ctx, struct gl_query_object *q)
* Called via ctx->Driver.WaitQuery().
*/
static void
-_mesa_wait_query(GLcontext *ctx, struct gl_query_object *q)
+_mesa_wait_query(struct gl_context *ctx, struct gl_query_object *q)
{
/* For software drivers, _mesa_end_query() should have completed the query.
* For real hardware, implement a proper WaitQuery() driver function,
@@ -99,7 +99,7 @@ _mesa_wait_query(GLcontext *ctx, struct gl_query_object *q)
* Called via ctx->Driver.CheckQuery().
*/
static void
-_mesa_check_query(GLcontext *ctx, struct gl_query_object *q)
+_mesa_check_query(struct gl_context *ctx, struct gl_query_object *q)
{
/* No-op for sw rendering.
* HW drivers may need to flush at this time.
@@ -112,7 +112,7 @@ _mesa_check_query(GLcontext *ctx, struct gl_query_object *q)
* Not removed from hash table here.
*/
static void
-_mesa_delete_query(GLcontext *ctx, struct gl_query_object *q)
+_mesa_delete_query(struct gl_context *ctx, struct gl_query_object *q)
{
free(q);
}
@@ -135,7 +135,7 @@ _mesa_init_query_object_functions(struct dd_function_table *driver)
* \return NULL if invalid target, else the address of binding point
*/
static struct gl_query_object **
-get_query_binding_point(GLcontext *ctx, GLenum target)
+get_query_binding_point(struct gl_context *ctx, GLenum target)
{
switch (target) {
case GL_SAMPLES_PASSED_ARB:
@@ -535,7 +535,7 @@ _mesa_init_queryobj_dispatch(struct _glapi_table *disp)
* Allocate/init the context state related to query objects.
*/
void
-_mesa_init_queryobj(GLcontext *ctx)
+_mesa_init_queryobj(struct gl_context *ctx)
{
ctx->Query.QueryObjects = _mesa_NewHashTable();
ctx->Query.CurrentOcclusionObject = NULL;
@@ -549,7 +549,7 @@ static void
delete_queryobj_cb(GLuint id, void *data, void *userData)
{
struct gl_query_object *q= (struct gl_query_object *) data;
- GLcontext *ctx = (GLcontext *)userData;
+ struct gl_context *ctx = (struct gl_context *)userData;
ctx->Driver.DeleteQuery(ctx, q);
}
@@ -558,7 +558,7 @@ delete_queryobj_cb(GLuint id, void *data, void *userData)
* Free the context state related to query objects.
*/
void
-_mesa_free_queryobj_data(GLcontext *ctx)
+_mesa_free_queryobj_data(struct gl_context *ctx)
{
_mesa_HashDeleteAll(ctx->Query.QueryObjects, delete_queryobj_cb, ctx);
_mesa_DeleteHashTable(ctx->Query.QueryObjects);
diff --git a/src/mesa/main/queryobj.h b/src/mesa/main/queryobj.h
index 8746ed15e99..e289625731a 100644
--- a/src/mesa/main/queryobj.h
+++ b/src/mesa/main/queryobj.h
@@ -34,7 +34,7 @@
#if FEATURE_queryobj
static INLINE struct gl_query_object *
-_mesa_lookup_query_object(GLcontext *ctx, GLuint id)
+_mesa_lookup_query_object(struct gl_context *ctx, GLuint id)
{
return (struct gl_query_object *)
_mesa_HashLookup(ctx->Query.QueryObjects, id);
@@ -68,7 +68,7 @@ _mesa_init_queryobj_dispatch(struct _glapi_table *disp);
#else /* FEATURE_queryobj */
static INLINE struct gl_query_object *
-_mesa_lookup_query_object(GLcontext *ctx, GLuint id)
+_mesa_lookup_query_object(struct gl_context *ctx, GLuint id)
{
return NULL;
}
@@ -86,10 +86,10 @@ _mesa_init_queryobj_dispatch(struct _glapi_table *disp)
#endif /* FEATURE_queryobj */
extern void
-_mesa_init_queryobj(GLcontext *ctx);
+_mesa_init_queryobj(struct gl_context *ctx);
extern void
-_mesa_free_queryobj_data(GLcontext *ctx);
+_mesa_free_queryobj_data(struct gl_context *ctx);
#endif /* QUERYOBJ_H */
diff --git a/src/mesa/main/rastpos.c b/src/mesa/main/rastpos.c
index 75c67f2693e..6f52f07dfab 100644
--- a/src/mesa/main/rastpos.c
+++ b/src/mesa/main/rastpos.c
@@ -545,10 +545,10 @@ _mesa_init_rastpos_dispatch(struct _glapi_table *disp)
* \param ctx GL context.
*
* Initialize the current raster position information in
- * __GLcontextRec::Current, and adds the extension entry points to the
+ * __struct gl_contextRec::Current, and adds the extension entry points to the
* dispatcher.
*/
-void _mesa_init_rastpos( GLcontext * ctx )
+void _mesa_init_rastpos( struct gl_context * ctx )
{
int i;
diff --git a/src/mesa/main/rastpos.h b/src/mesa/main/rastpos.h
index 4994616d40a..9b508eaedf5 100644
--- a/src/mesa/main/rastpos.h
+++ b/src/mesa/main/rastpos.h
@@ -50,7 +50,7 @@ _mesa_init_rastpos_dispatch(struct _glapi_table *disp)
#endif /* FEATURE_rastpos */
extern void
-_mesa_init_rastpos(GLcontext *ctx);
+_mesa_init_rastpos(struct gl_context *ctx);
/*@}*/
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index bb3fb9eb662..a5612e34ecf 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -28,6 +28,7 @@
#include "context.h"
#include "readpix.h"
#include "framebuffer.h"
+#include "formats.h"
#include "image.h"
#include "state.h"
@@ -40,7 +41,7 @@
* \return GL_TRUE if error detected, GL_FALSE if no errors
*/
GLboolean
-_mesa_error_check_format_type(GLcontext *ctx, GLenum format, GLenum type,
+_mesa_error_check_format_type(struct gl_context *ctx, GLenum format, GLenum type,
GLboolean drawing)
{
const char *readDraw = drawing ? "Draw" : "Read";
@@ -78,6 +79,16 @@ _mesa_error_check_format_type(GLcontext *ctx, GLenum format, GLenum type,
case GL_RGBA:
case GL_BGRA:
case GL_ABGR_EXT:
+ case GL_RED_INTEGER_EXT:
+ case GL_GREEN_INTEGER_EXT:
+ case GL_BLUE_INTEGER_EXT:
+ case GL_ALPHA_INTEGER_EXT:
+ case GL_RGB_INTEGER_EXT:
+ case GL_RGBA_INTEGER_EXT:
+ case GL_BGR_INTEGER_EXT:
+ case GL_BGRA_INTEGER_EXT:
+ case GL_LUMINANCE_INTEGER_EXT:
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
if (!drawing) {
/* reading */
if (!_mesa_source_buffer_exists(ctx, GL_COLOR)) {
@@ -175,6 +186,20 @@ _mesa_ReadPixels( GLint x, GLint y, GLsizei width, GLsizei height,
return;
}
+ /* Check that the destination format and source buffer are both
+ * integer-valued or both non-integer-valued.
+ */
+ if (ctx->Extensions.EXT_texture_integer && _mesa_is_color_format(format)) {
+ const struct gl_renderbuffer *rb = ctx->ReadBuffer->_ColorReadBuffer;
+ const GLboolean srcInteger = _mesa_is_format_integer_color(rb->Format);
+ const GLboolean dstInteger = _mesa_is_integer_format(format);
+ if (dstInteger != srcInteger) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glReadPixels(integer / non-integer format mismatch");
+ return;
+ }
+ }
+
if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
_mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
"glReadPixels(incomplete framebuffer)" );
diff --git a/src/mesa/main/readpix.h b/src/mesa/main/readpix.h
index 1bf02fb8e4d..0753e619fed 100644
--- a/src/mesa/main/readpix.h
+++ b/src/mesa/main/readpix.h
@@ -31,7 +31,7 @@
extern GLboolean
-_mesa_error_check_format_type(GLcontext *ctx, GLenum format, GLenum type,
+_mesa_error_check_format_type(struct gl_context *ctx, GLenum format, GLenum type,
GLboolean drawing);
extern void GLAPIENTRY
diff --git a/src/mesa/main/remap_helper.h b/src/mesa/main/remap_helper.h
index fe3e0fd9123..9034b10d488 100644
--- a/src/mesa/main/remap_helper.h
+++ b/src/mesa/main/remap_helper.h
@@ -424,4041 +424,4085 @@ static const char _mesa_function_pool[] =
"f\0"
"glPassThrough\0"
"\0"
- /* _mesa_function_pool[2740]: FramebufferTextureLayerEXT (will be remapped) */
+ /* _mesa_function_pool[2740]: TexParameterIivEXT (will be remapped) */
+ "iip\0"
+ "glTexParameterIivEXT\0"
+ "\0"
+ /* _mesa_function_pool[2766]: FramebufferTextureLayerEXT (will be remapped) */
"iiiii\0"
"glFramebufferTextureLayer\0"
"glFramebufferTextureLayerEXT\0"
"\0"
- /* _mesa_function_pool[2802]: GetListParameterfvSGIX (dynamic) */
+ /* _mesa_function_pool[2828]: GetListParameterfvSGIX (dynamic) */
"iip\0"
"glGetListParameterfvSGIX\0"
"\0"
- /* _mesa_function_pool[2832]: Viewport (offset 305) */
+ /* _mesa_function_pool[2858]: Viewport (offset 305) */
"iiii\0"
"glViewport\0"
"\0"
- /* _mesa_function_pool[2849]: VertexAttrib4NusvARB (will be remapped) */
+ /* _mesa_function_pool[2875]: VertexAttrib4NusvARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nusv\0"
"glVertexAttrib4NusvARB\0"
"\0"
- /* _mesa_function_pool[2896]: WindowPos4svMESA (will be remapped) */
+ /* _mesa_function_pool[2922]: WindowPos4svMESA (will be remapped) */
"p\0"
"glWindowPos4svMESA\0"
"\0"
- /* _mesa_function_pool[2918]: CreateProgramObjectARB (will be remapped) */
+ /* _mesa_function_pool[2944]: CreateProgramObjectARB (will be remapped) */
"\0"
"glCreateProgramObjectARB\0"
"\0"
- /* _mesa_function_pool[2945]: DeleteTransformFeedbacks (will be remapped) */
+ /* _mesa_function_pool[2971]: DeleteTransformFeedbacks (will be remapped) */
"ip\0"
"glDeleteTransformFeedbacks\0"
"\0"
- /* _mesa_function_pool[2976]: UniformMatrix4x3fv (will be remapped) */
+ /* _mesa_function_pool[3002]: UniformMatrix4x3fv (will be remapped) */
"iiip\0"
"glUniformMatrix4x3fv\0"
"\0"
- /* _mesa_function_pool[3003]: PrioritizeTextures (offset 331) */
+ /* _mesa_function_pool[3029]: PrioritizeTextures (offset 331) */
"ipp\0"
"glPrioritizeTextures\0"
"glPrioritizeTexturesEXT\0"
"\0"
- /* _mesa_function_pool[3053]: AsyncMarkerSGIX (dynamic) */
+ /* _mesa_function_pool[3079]: AsyncMarkerSGIX (dynamic) */
"i\0"
"glAsyncMarkerSGIX\0"
"\0"
- /* _mesa_function_pool[3074]: GlobalAlphaFactorubSUN (dynamic) */
+ /* _mesa_function_pool[3100]: GlobalAlphaFactorubSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorubSUN\0"
"\0"
- /* _mesa_function_pool[3102]: ClearDebugLogMESA (dynamic) */
+ /* _mesa_function_pool[3128]: ClearColorIuiEXT (will be remapped) */
+ "iiii\0"
+ "glClearColorIuiEXT\0"
+ "\0"
+ /* _mesa_function_pool[3153]: ClearDebugLogMESA (dynamic) */
"iii\0"
"glClearDebugLogMESA\0"
"\0"
- /* _mesa_function_pool[3127]: ResetHistogram (offset 369) */
+ /* _mesa_function_pool[3178]: ResetHistogram (offset 369) */
"i\0"
"glResetHistogram\0"
"glResetHistogramEXT\0"
"\0"
- /* _mesa_function_pool[3167]: GetProgramNamedParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[3218]: GetProgramNamedParameterfvNV (will be remapped) */
"iipp\0"
"glGetProgramNamedParameterfvNV\0"
"\0"
- /* _mesa_function_pool[3204]: PointParameterfEXT (will be remapped) */
+ /* _mesa_function_pool[3255]: PointParameterfEXT (will be remapped) */
"if\0"
"glPointParameterf\0"
"glPointParameterfARB\0"
"glPointParameterfEXT\0"
"glPointParameterfSGIS\0"
"\0"
- /* _mesa_function_pool[3290]: LoadIdentityDeformationMapSGIX (dynamic) */
+ /* _mesa_function_pool[3341]: LoadIdentityDeformationMapSGIX (dynamic) */
"i\0"
"glLoadIdentityDeformationMapSGIX\0"
"\0"
- /* _mesa_function_pool[3326]: GenFencesNV (will be remapped) */
+ /* _mesa_function_pool[3377]: GenFencesNV (will be remapped) */
"ip\0"
"glGenFencesNV\0"
"\0"
- /* _mesa_function_pool[3344]: ImageTransformParameterfHP (dynamic) */
+ /* _mesa_function_pool[3395]: ImageTransformParameterfHP (dynamic) */
"iif\0"
"glImageTransformParameterfHP\0"
"\0"
- /* _mesa_function_pool[3378]: MatrixIndexusvARB (dynamic) */
+ /* _mesa_function_pool[3429]: MatrixIndexusvARB (dynamic) */
"ip\0"
"glMatrixIndexusvARB\0"
"\0"
- /* _mesa_function_pool[3402]: DrawElementsBaseVertex (will be remapped) */
+ /* _mesa_function_pool[3453]: DrawElementsBaseVertex (will be remapped) */
"iiipi\0"
"glDrawElementsBaseVertex\0"
"\0"
- /* _mesa_function_pool[3434]: DisableVertexAttribArrayARB (will be remapped) */
+ /* _mesa_function_pool[3485]: DisableVertexAttribArrayARB (will be remapped) */
"i\0"
"glDisableVertexAttribArray\0"
"glDisableVertexAttribArrayARB\0"
"\0"
- /* _mesa_function_pool[3494]: TexCoord2sv (offset 109) */
+ /* _mesa_function_pool[3545]: TexCoord2sv (offset 109) */
"p\0"
"glTexCoord2sv\0"
"\0"
- /* _mesa_function_pool[3511]: Vertex4dv (offset 143) */
+ /* _mesa_function_pool[3562]: Vertex4dv (offset 143) */
"p\0"
"glVertex4dv\0"
"\0"
- /* _mesa_function_pool[3526]: StencilMaskSeparate (will be remapped) */
+ /* _mesa_function_pool[3577]: StencilMaskSeparate (will be remapped) */
"ii\0"
"glStencilMaskSeparate\0"
"\0"
- /* _mesa_function_pool[3552]: ProgramLocalParameter4dARB (will be remapped) */
+ /* _mesa_function_pool[3603]: ProgramLocalParameter4dARB (will be remapped) */
"iidddd\0"
"glProgramLocalParameter4dARB\0"
"\0"
- /* _mesa_function_pool[3589]: CompressedTexImage3DARB (will be remapped) */
+ /* _mesa_function_pool[3640]: CompressedTexImage3DARB (will be remapped) */
"iiiiiiiip\0"
"glCompressedTexImage3D\0"
"glCompressedTexImage3DARB\0"
"\0"
- /* _mesa_function_pool[3649]: Color3sv (offset 18) */
+ /* _mesa_function_pool[3700]: Color3sv (offset 18) */
"p\0"
"glColor3sv\0"
"\0"
- /* _mesa_function_pool[3663]: GetConvolutionParameteriv (offset 358) */
+ /* _mesa_function_pool[3714]: GetConvolutionParameteriv (offset 358) */
"iip\0"
"glGetConvolutionParameteriv\0"
"glGetConvolutionParameterivEXT\0"
"\0"
- /* _mesa_function_pool[3727]: VertexAttrib1fARB (will be remapped) */
+ /* _mesa_function_pool[3778]: VertexAttrib1fARB (will be remapped) */
"if\0"
"glVertexAttrib1f\0"
"glVertexAttrib1fARB\0"
"\0"
- /* _mesa_function_pool[3768]: Vertex2dv (offset 127) */
+ /* _mesa_function_pool[3819]: Vertex2dv (offset 127) */
"p\0"
"glVertex2dv\0"
"\0"
- /* _mesa_function_pool[3783]: TestFenceNV (will be remapped) */
+ /* _mesa_function_pool[3834]: TestFenceNV (will be remapped) */
"i\0"
"glTestFenceNV\0"
"\0"
- /* _mesa_function_pool[3800]: MultiTexCoord1fvARB (offset 379) */
+ /* _mesa_function_pool[3851]: MultiTexCoord1fvARB (offset 379) */
"ip\0"
"glMultiTexCoord1fv\0"
"glMultiTexCoord1fvARB\0"
"\0"
- /* _mesa_function_pool[3845]: TexCoord3iv (offset 115) */
+ /* _mesa_function_pool[3896]: TexCoord3iv (offset 115) */
"p\0"
"glTexCoord3iv\0"
"\0"
- /* _mesa_function_pool[3862]: ColorFragmentOp2ATI (will be remapped) */
+ /* _mesa_function_pool[3913]: ColorFragmentOp2ATI (will be remapped) */
"iiiiiiiiii\0"
"glColorFragmentOp2ATI\0"
"\0"
- /* _mesa_function_pool[3896]: SecondaryColorPointerListIBM (dynamic) */
+ /* _mesa_function_pool[3947]: SecondaryColorPointerListIBM (dynamic) */
"iiipi\0"
"glSecondaryColorPointerListIBM\0"
"\0"
- /* _mesa_function_pool[3934]: GetPixelTexGenParameterivSGIS (will be remapped) */
+ /* _mesa_function_pool[3985]: GetPixelTexGenParameterivSGIS (will be remapped) */
"ip\0"
"glGetPixelTexGenParameterivSGIS\0"
"\0"
- /* _mesa_function_pool[3970]: Color3fv (offset 14) */
+ /* _mesa_function_pool[4021]: Color3fv (offset 14) */
"p\0"
"glColor3fv\0"
"\0"
- /* _mesa_function_pool[3984]: VertexAttrib4fNV (will be remapped) */
+ /* _mesa_function_pool[4035]: VertexAttrib4fNV (will be remapped) */
"iffff\0"
"glVertexAttrib4fNV\0"
"\0"
- /* _mesa_function_pool[4010]: ReplacementCodeubSUN (dynamic) */
+ /* _mesa_function_pool[4061]: ReplacementCodeubSUN (dynamic) */
"i\0"
"glReplacementCodeubSUN\0"
"\0"
- /* _mesa_function_pool[4036]: FinishAsyncSGIX (dynamic) */
+ /* _mesa_function_pool[4087]: FinishAsyncSGIX (dynamic) */
"p\0"
"glFinishAsyncSGIX\0"
"\0"
- /* _mesa_function_pool[4057]: GetDebugLogMESA (dynamic) */
+ /* _mesa_function_pool[4108]: GetDebugLogMESA (dynamic) */
"iiiipp\0"
"glGetDebugLogMESA\0"
"\0"
- /* _mesa_function_pool[4083]: FogCoorddEXT (will be remapped) */
+ /* _mesa_function_pool[4134]: FogCoorddEXT (will be remapped) */
"d\0"
"glFogCoordd\0"
"glFogCoorddEXT\0"
"\0"
- /* _mesa_function_pool[4113]: BeginConditionalRenderNV (will be remapped) */
+ /* _mesa_function_pool[4164]: BeginConditionalRenderNV (will be remapped) */
"ii\0"
"glBeginConditionalRenderNV\0"
"\0"
- /* _mesa_function_pool[4144]: Color4ubVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[4195]: Color4ubVertex3fSUN (dynamic) */
"iiiifff\0"
"glColor4ubVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[4175]: FogCoordfEXT (will be remapped) */
+ /* _mesa_function_pool[4226]: FogCoordfEXT (will be remapped) */
"f\0"
"glFogCoordf\0"
"glFogCoordfEXT\0"
"\0"
- /* _mesa_function_pool[4205]: PointSize (offset 173) */
+ /* _mesa_function_pool[4256]: PointSize (offset 173) */
"f\0"
"glPointSize\0"
"\0"
- /* _mesa_function_pool[4220]: TexCoord2fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[4271]: TexCoord2fVertex3fSUN (dynamic) */
"fffff\0"
"glTexCoord2fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[4251]: PopName (offset 200) */
+ /* _mesa_function_pool[4302]: PopName (offset 200) */
"\0"
"glPopName\0"
"\0"
- /* _mesa_function_pool[4263]: GlobalAlphaFactoriSUN (dynamic) */
+ /* _mesa_function_pool[4314]: GlobalAlphaFactoriSUN (dynamic) */
"i\0"
"glGlobalAlphaFactoriSUN\0"
"\0"
- /* _mesa_function_pool[4290]: VertexAttrib2dNV (will be remapped) */
+ /* _mesa_function_pool[4341]: VertexAttrib2dNV (will be remapped) */
"idd\0"
"glVertexAttrib2dNV\0"
"\0"
- /* _mesa_function_pool[4314]: GetProgramInfoLog (will be remapped) */
+ /* _mesa_function_pool[4365]: GetProgramInfoLog (will be remapped) */
"iipp\0"
"glGetProgramInfoLog\0"
"\0"
- /* _mesa_function_pool[4340]: VertexAttrib4NbvARB (will be remapped) */
+ /* _mesa_function_pool[4391]: VertexAttrib4NbvARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nbv\0"
"glVertexAttrib4NbvARB\0"
"\0"
- /* _mesa_function_pool[4385]: GetActiveAttribARB (will be remapped) */
+ /* _mesa_function_pool[4436]: GetActiveAttribARB (will be remapped) */
"iiipppp\0"
"glGetActiveAttrib\0"
"glGetActiveAttribARB\0"
"\0"
- /* _mesa_function_pool[4433]: Vertex4sv (offset 149) */
+ /* _mesa_function_pool[4484]: Vertex4sv (offset 149) */
"p\0"
"glVertex4sv\0"
"\0"
- /* _mesa_function_pool[4448]: VertexAttrib4ubNV (will be remapped) */
+ /* _mesa_function_pool[4499]: VertexAttrib4ubNV (will be remapped) */
"iiiii\0"
"glVertexAttrib4ubNV\0"
"\0"
- /* _mesa_function_pool[4475]: TextureRangeAPPLE (will be remapped) */
+ /* _mesa_function_pool[4526]: TextureRangeAPPLE (will be remapped) */
"iip\0"
"glTextureRangeAPPLE\0"
"\0"
- /* _mesa_function_pool[4500]: GetTexEnvfv (offset 276) */
+ /* _mesa_function_pool[4551]: GetTexEnvfv (offset 276) */
"iip\0"
"glGetTexEnvfv\0"
"\0"
- /* _mesa_function_pool[4519]: BindTransformFeedback (will be remapped) */
+ /* _mesa_function_pool[4570]: BindTransformFeedback (will be remapped) */
"ii\0"
"glBindTransformFeedback\0"
"\0"
- /* _mesa_function_pool[4547]: TexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[4598]: TexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
"ffffffffffff\0"
"glTexCoord2fColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[4600]: Indexub (offset 315) */
+ /* _mesa_function_pool[4651]: Indexub (offset 315) */
"i\0"
"glIndexub\0"
"\0"
- /* _mesa_function_pool[4613]: ColorMaskIndexedEXT (will be remapped) */
+ /* _mesa_function_pool[4664]: ColorMaskIndexedEXT (will be remapped) */
"iiiii\0"
"glColorMaskIndexedEXT\0"
"\0"
- /* _mesa_function_pool[4642]: TexEnvi (offset 186) */
+ /* _mesa_function_pool[4693]: TexEnvi (offset 186) */
"iii\0"
"glTexEnvi\0"
"\0"
- /* _mesa_function_pool[4657]: GetClipPlane (offset 259) */
+ /* _mesa_function_pool[4708]: GetClipPlane (offset 259) */
"ip\0"
"glGetClipPlane\0"
"\0"
- /* _mesa_function_pool[4676]: CombinerParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[4727]: CombinerParameterfvNV (will be remapped) */
"ip\0"
"glCombinerParameterfvNV\0"
"\0"
- /* _mesa_function_pool[4704]: VertexAttribs3dvNV (will be remapped) */
+ /* _mesa_function_pool[4755]: VertexAttribs3dvNV (will be remapped) */
"iip\0"
"glVertexAttribs3dvNV\0"
"\0"
- /* _mesa_function_pool[4730]: VertexAttribs4fvNV (will be remapped) */
+ /* _mesa_function_pool[4781]: VertexAttribs4fvNV (will be remapped) */
"iip\0"
"glVertexAttribs4fvNV\0"
"\0"
- /* _mesa_function_pool[4756]: VertexArrayRangeNV (will be remapped) */
+ /* _mesa_function_pool[4807]: VertexArrayRangeNV (will be remapped) */
"ip\0"
"glVertexArrayRangeNV\0"
"\0"
- /* _mesa_function_pool[4781]: FragmentLightiSGIX (dynamic) */
+ /* _mesa_function_pool[4832]: FragmentLightiSGIX (dynamic) */
"iii\0"
"glFragmentLightiSGIX\0"
"\0"
- /* _mesa_function_pool[4807]: PolygonOffsetEXT (will be remapped) */
+ /* _mesa_function_pool[4858]: PolygonOffsetEXT (will be remapped) */
"ff\0"
"glPolygonOffsetEXT\0"
"\0"
- /* _mesa_function_pool[4830]: PollAsyncSGIX (dynamic) */
+ /* _mesa_function_pool[4881]: PollAsyncSGIX (dynamic) */
"p\0"
"glPollAsyncSGIX\0"
"\0"
- /* _mesa_function_pool[4849]: DeleteFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[4900]: DeleteFragmentShaderATI (will be remapped) */
"i\0"
"glDeleteFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[4878]: Scaled (offset 301) */
+ /* _mesa_function_pool[4929]: Scaled (offset 301) */
"ddd\0"
"glScaled\0"
"\0"
- /* _mesa_function_pool[4892]: ResumeTransformFeedback (will be remapped) */
+ /* _mesa_function_pool[4943]: ResumeTransformFeedback (will be remapped) */
"\0"
"glResumeTransformFeedback\0"
"\0"
- /* _mesa_function_pool[4920]: Scalef (offset 302) */
+ /* _mesa_function_pool[4971]: Scalef (offset 302) */
"fff\0"
"glScalef\0"
"\0"
- /* _mesa_function_pool[4934]: TexCoord2fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[4985]: TexCoord2fNormal3fVertex3fvSUN (dynamic) */
"ppp\0"
"glTexCoord2fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[4972]: MultTransposeMatrixdARB (will be remapped) */
+ /* _mesa_function_pool[5023]: MultTransposeMatrixdARB (will be remapped) */
"p\0"
"glMultTransposeMatrixd\0"
"glMultTransposeMatrixdARB\0"
"\0"
- /* _mesa_function_pool[5024]: ObjectUnpurgeableAPPLE (will be remapped) */
+ /* _mesa_function_pool[5075]: ObjectUnpurgeableAPPLE (will be remapped) */
"iii\0"
"glObjectUnpurgeableAPPLE\0"
"\0"
- /* _mesa_function_pool[5054]: AlphaFunc (offset 240) */
+ /* _mesa_function_pool[5105]: AlphaFunc (offset 240) */
"if\0"
"glAlphaFunc\0"
"\0"
- /* _mesa_function_pool[5070]: WindowPos2svMESA (will be remapped) */
+ /* _mesa_function_pool[5121]: WindowPos2svMESA (will be remapped) */
"p\0"
"glWindowPos2sv\0"
"glWindowPos2svARB\0"
"glWindowPos2svMESA\0"
"\0"
- /* _mesa_function_pool[5125]: EdgeFlag (offset 41) */
+ /* _mesa_function_pool[5176]: EdgeFlag (offset 41) */
"i\0"
"glEdgeFlag\0"
"\0"
- /* _mesa_function_pool[5139]: TexCoord2iv (offset 107) */
+ /* _mesa_function_pool[5190]: TexCoord2iv (offset 107) */
"p\0"
"glTexCoord2iv\0"
"\0"
- /* _mesa_function_pool[5156]: CompressedTexImage1DARB (will be remapped) */
+ /* _mesa_function_pool[5207]: CompressedTexImage1DARB (will be remapped) */
"iiiiiip\0"
"glCompressedTexImage1D\0"
"glCompressedTexImage1DARB\0"
"\0"
- /* _mesa_function_pool[5214]: Rotated (offset 299) */
+ /* _mesa_function_pool[5265]: Rotated (offset 299) */
"dddd\0"
"glRotated\0"
"\0"
- /* _mesa_function_pool[5230]: VertexAttrib2sNV (will be remapped) */
+ /* _mesa_function_pool[5281]: GetTexParameterIuivEXT (will be remapped) */
+ "iip\0"
+ "glGetTexParameterIuivEXT\0"
+ "\0"
+ /* _mesa_function_pool[5311]: VertexAttrib2sNV (will be remapped) */
"iii\0"
"glVertexAttrib2sNV\0"
"\0"
- /* _mesa_function_pool[5254]: ReadPixels (offset 256) */
+ /* _mesa_function_pool[5335]: ReadPixels (offset 256) */
"iiiiiip\0"
"glReadPixels\0"
"\0"
- /* _mesa_function_pool[5276]: EdgeFlagv (offset 42) */
+ /* _mesa_function_pool[5357]: EdgeFlagv (offset 42) */
"p\0"
"glEdgeFlagv\0"
"\0"
- /* _mesa_function_pool[5291]: NormalPointerListIBM (dynamic) */
+ /* _mesa_function_pool[5372]: NormalPointerListIBM (dynamic) */
"iipi\0"
"glNormalPointerListIBM\0"
"\0"
- /* _mesa_function_pool[5320]: IndexPointerEXT (will be remapped) */
+ /* _mesa_function_pool[5401]: IndexPointerEXT (will be remapped) */
"iiip\0"
"glIndexPointerEXT\0"
"\0"
- /* _mesa_function_pool[5344]: Color4iv (offset 32) */
+ /* _mesa_function_pool[5425]: Color4iv (offset 32) */
"p\0"
"glColor4iv\0"
"\0"
- /* _mesa_function_pool[5358]: TexParameterf (offset 178) */
+ /* _mesa_function_pool[5439]: TexParameterf (offset 178) */
"iif\0"
"glTexParameterf\0"
"\0"
- /* _mesa_function_pool[5379]: TexParameteri (offset 180) */
+ /* _mesa_function_pool[5460]: TexParameteri (offset 180) */
"iii\0"
"glTexParameteri\0"
"\0"
- /* _mesa_function_pool[5400]: NormalPointerEXT (will be remapped) */
+ /* _mesa_function_pool[5481]: NormalPointerEXT (will be remapped) */
"iiip\0"
"glNormalPointerEXT\0"
"\0"
- /* _mesa_function_pool[5425]: MultiTexCoord3dARB (offset 392) */
+ /* _mesa_function_pool[5506]: MultiTexCoord3dARB (offset 392) */
"iddd\0"
"glMultiTexCoord3d\0"
"glMultiTexCoord3dARB\0"
"\0"
- /* _mesa_function_pool[5470]: MultiTexCoord2iARB (offset 388) */
+ /* _mesa_function_pool[5551]: MultiTexCoord2iARB (offset 388) */
"iii\0"
"glMultiTexCoord2i\0"
"glMultiTexCoord2iARB\0"
"\0"
- /* _mesa_function_pool[5514]: DrawPixels (offset 257) */
+ /* _mesa_function_pool[5595]: DrawPixels (offset 257) */
"iiiip\0"
"glDrawPixels\0"
"\0"
- /* _mesa_function_pool[5534]: ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[5615]: ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (dynamic) */
"iffffffff\0"
"glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[5594]: MultiTexCoord2svARB (offset 391) */
+ /* _mesa_function_pool[5675]: MultiTexCoord2svARB (offset 391) */
"ip\0"
"glMultiTexCoord2sv\0"
"glMultiTexCoord2svARB\0"
"\0"
- /* _mesa_function_pool[5639]: ReplacementCodeubvSUN (dynamic) */
+ /* _mesa_function_pool[5720]: ReplacementCodeubvSUN (dynamic) */
"p\0"
"glReplacementCodeubvSUN\0"
"\0"
- /* _mesa_function_pool[5666]: Uniform3iARB (will be remapped) */
+ /* _mesa_function_pool[5747]: Uniform3iARB (will be remapped) */
"iiii\0"
"glUniform3i\0"
"glUniform3iARB\0"
"\0"
- /* _mesa_function_pool[5699]: DrawTransformFeedback (will be remapped) */
+ /* _mesa_function_pool[5780]: DrawTransformFeedback (will be remapped) */
"ii\0"
"glDrawTransformFeedback\0"
"\0"
- /* _mesa_function_pool[5727]: GetFragmentMaterialfvSGIX (dynamic) */
+ /* _mesa_function_pool[5808]: GetFragmentMaterialfvSGIX (dynamic) */
"iip\0"
"glGetFragmentMaterialfvSGIX\0"
"\0"
- /* _mesa_function_pool[5760]: GetShaderInfoLog (will be remapped) */
+ /* _mesa_function_pool[5841]: GetShaderInfoLog (will be remapped) */
"iipp\0"
"glGetShaderInfoLog\0"
"\0"
- /* _mesa_function_pool[5785]: WeightivARB (dynamic) */
+ /* _mesa_function_pool[5866]: WeightivARB (dynamic) */
"ip\0"
"glWeightivARB\0"
"\0"
- /* _mesa_function_pool[5803]: PollInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[5884]: PollInstrumentsSGIX (dynamic) */
"p\0"
"glPollInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[5828]: GlobalAlphaFactordSUN (dynamic) */
+ /* _mesa_function_pool[5909]: GlobalAlphaFactordSUN (dynamic) */
"d\0"
"glGlobalAlphaFactordSUN\0"
"\0"
- /* _mesa_function_pool[5855]: GetFinalCombinerInputParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[5936]: GetFinalCombinerInputParameterfvNV (will be remapped) */
"iip\0"
"glGetFinalCombinerInputParameterfvNV\0"
"\0"
- /* _mesa_function_pool[5897]: GenerateMipmapEXT (will be remapped) */
+ /* _mesa_function_pool[5978]: GenerateMipmapEXT (will be remapped) */
"i\0"
"glGenerateMipmap\0"
"glGenerateMipmapEXT\0"
"\0"
- /* _mesa_function_pool[5937]: GenLists (offset 5) */
+ /* _mesa_function_pool[6018]: GenLists (offset 5) */
"i\0"
"glGenLists\0"
"\0"
- /* _mesa_function_pool[5951]: SetFragmentShaderConstantATI (will be remapped) */
+ /* _mesa_function_pool[6032]: SetFragmentShaderConstantATI (will be remapped) */
"ip\0"
"glSetFragmentShaderConstantATI\0"
"\0"
- /* _mesa_function_pool[5986]: GetMapAttribParameterivNV (dynamic) */
+ /* _mesa_function_pool[6067]: GetMapAttribParameterivNV (dynamic) */
"iiip\0"
"glGetMapAttribParameterivNV\0"
"\0"
- /* _mesa_function_pool[6020]: CreateShaderObjectARB (will be remapped) */
+ /* _mesa_function_pool[6101]: CreateShaderObjectARB (will be remapped) */
"i\0"
"glCreateShaderObjectARB\0"
"\0"
- /* _mesa_function_pool[6047]: GetSharpenTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[6128]: GetSharpenTexFuncSGIS (dynamic) */
"ip\0"
"glGetSharpenTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[6075]: BufferDataARB (will be remapped) */
+ /* _mesa_function_pool[6156]: BufferDataARB (will be remapped) */
"iipi\0"
"glBufferData\0"
"glBufferDataARB\0"
"\0"
- /* _mesa_function_pool[6110]: FlushVertexArrayRangeNV (will be remapped) */
+ /* _mesa_function_pool[6191]: FlushVertexArrayRangeNV (will be remapped) */
"\0"
"glFlushVertexArrayRangeNV\0"
"\0"
- /* _mesa_function_pool[6138]: MapGrid2d (offset 226) */
+ /* _mesa_function_pool[6219]: MapGrid2d (offset 226) */
"iddidd\0"
"glMapGrid2d\0"
"\0"
- /* _mesa_function_pool[6158]: MapGrid2f (offset 227) */
+ /* _mesa_function_pool[6239]: MapGrid2f (offset 227) */
"iffiff\0"
"glMapGrid2f\0"
"\0"
- /* _mesa_function_pool[6178]: SampleMapATI (will be remapped) */
+ /* _mesa_function_pool[6259]: SampleMapATI (will be remapped) */
"iii\0"
"glSampleMapATI\0"
"\0"
- /* _mesa_function_pool[6198]: VertexPointerEXT (will be remapped) */
+ /* _mesa_function_pool[6279]: VertexPointerEXT (will be remapped) */
"iiiip\0"
"glVertexPointerEXT\0"
"\0"
- /* _mesa_function_pool[6224]: GetTexFilterFuncSGIS (dynamic) */
+ /* _mesa_function_pool[6305]: GetTexFilterFuncSGIS (dynamic) */
"iip\0"
"glGetTexFilterFuncSGIS\0"
"\0"
- /* _mesa_function_pool[6252]: Scissor (offset 176) */
+ /* _mesa_function_pool[6333]: Scissor (offset 176) */
"iiii\0"
"glScissor\0"
"\0"
- /* _mesa_function_pool[6268]: Fogf (offset 153) */
+ /* _mesa_function_pool[6349]: Fogf (offset 153) */
"if\0"
"glFogf\0"
"\0"
- /* _mesa_function_pool[6279]: ReplacementCodeuiColor4ubVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[6360]: ReplacementCodeuiColor4ubVertex3fvSUN (dynamic) */
"ppp\0"
"glReplacementCodeuiColor4ubVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[6324]: TexSubImage1D (offset 332) */
+ /* _mesa_function_pool[6405]: TexSubImage1D (offset 332) */
"iiiiiip\0"
"glTexSubImage1D\0"
"glTexSubImage1DEXT\0"
"\0"
- /* _mesa_function_pool[6368]: VertexAttrib1sARB (will be remapped) */
+ /* _mesa_function_pool[6449]: VertexAttrib1sARB (will be remapped) */
"ii\0"
"glVertexAttrib1s\0"
"glVertexAttrib1sARB\0"
"\0"
- /* _mesa_function_pool[6409]: FenceSync (will be remapped) */
+ /* _mesa_function_pool[6490]: FenceSync (will be remapped) */
"ii\0"
"glFenceSync\0"
"\0"
- /* _mesa_function_pool[6425]: Color4usv (offset 40) */
+ /* _mesa_function_pool[6506]: Color4usv (offset 40) */
"p\0"
"glColor4usv\0"
"\0"
- /* _mesa_function_pool[6440]: Fogi (offset 155) */
+ /* _mesa_function_pool[6521]: Fogi (offset 155) */
"ii\0"
"glFogi\0"
"\0"
- /* _mesa_function_pool[6451]: DepthRange (offset 288) */
+ /* _mesa_function_pool[6532]: DepthRange (offset 288) */
"dd\0"
"glDepthRange\0"
"\0"
- /* _mesa_function_pool[6468]: RasterPos3iv (offset 75) */
+ /* _mesa_function_pool[6549]: RasterPos3iv (offset 75) */
"p\0"
"glRasterPos3iv\0"
"\0"
- /* _mesa_function_pool[6486]: FinalCombinerInputNV (will be remapped) */
+ /* _mesa_function_pool[6567]: FinalCombinerInputNV (will be remapped) */
"iiii\0"
"glFinalCombinerInputNV\0"
"\0"
- /* _mesa_function_pool[6515]: TexCoord2i (offset 106) */
+ /* _mesa_function_pool[6596]: TexCoord2i (offset 106) */
"ii\0"
"glTexCoord2i\0"
"\0"
- /* _mesa_function_pool[6532]: PixelMapfv (offset 251) */
+ /* _mesa_function_pool[6613]: PixelMapfv (offset 251) */
"iip\0"
"glPixelMapfv\0"
"\0"
- /* _mesa_function_pool[6550]: Color4ui (offset 37) */
+ /* _mesa_function_pool[6631]: Color4ui (offset 37) */
"iiii\0"
"glColor4ui\0"
"\0"
- /* _mesa_function_pool[6567]: RasterPos3s (offset 76) */
+ /* _mesa_function_pool[6648]: RasterPos3s (offset 76) */
"iii\0"
"glRasterPos3s\0"
"\0"
- /* _mesa_function_pool[6586]: Color3usv (offset 24) */
+ /* _mesa_function_pool[6667]: Color3usv (offset 24) */
"p\0"
"glColor3usv\0"
"\0"
- /* _mesa_function_pool[6601]: FlushRasterSGIX (dynamic) */
+ /* _mesa_function_pool[6682]: FlushRasterSGIX (dynamic) */
"\0"
"glFlushRasterSGIX\0"
"\0"
- /* _mesa_function_pool[6621]: TexCoord2f (offset 104) */
+ /* _mesa_function_pool[6702]: TexCoord2f (offset 104) */
"ff\0"
"glTexCoord2f\0"
"\0"
- /* _mesa_function_pool[6638]: ReplacementCodeuiTexCoord2fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[6719]: ReplacementCodeuiTexCoord2fVertex3fSUN (dynamic) */
"ifffff\0"
"glReplacementCodeuiTexCoord2fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[6687]: TexCoord2d (offset 102) */
+ /* _mesa_function_pool[6768]: TexCoord2d (offset 102) */
"dd\0"
"glTexCoord2d\0"
"\0"
- /* _mesa_function_pool[6704]: RasterPos3d (offset 70) */
+ /* _mesa_function_pool[6785]: RasterPos3d (offset 70) */
"ddd\0"
"glRasterPos3d\0"
"\0"
- /* _mesa_function_pool[6723]: RasterPos3f (offset 72) */
+ /* _mesa_function_pool[6804]: RasterPos3f (offset 72) */
"fff\0"
"glRasterPos3f\0"
"\0"
- /* _mesa_function_pool[6742]: Uniform1fARB (will be remapped) */
+ /* _mesa_function_pool[6823]: Uniform1fARB (will be remapped) */
"if\0"
"glUniform1f\0"
"glUniform1fARB\0"
"\0"
- /* _mesa_function_pool[6773]: AreTexturesResident (offset 322) */
+ /* _mesa_function_pool[6854]: AreTexturesResident (offset 322) */
"ipp\0"
"glAreTexturesResident\0"
"glAreTexturesResidentEXT\0"
"\0"
- /* _mesa_function_pool[6825]: TexCoord2s (offset 108) */
+ /* _mesa_function_pool[6906]: TexCoord2s (offset 108) */
"ii\0"
"glTexCoord2s\0"
"\0"
- /* _mesa_function_pool[6842]: StencilOpSeparate (will be remapped) */
+ /* _mesa_function_pool[6923]: StencilOpSeparate (will be remapped) */
"iiii\0"
"glStencilOpSeparate\0"
"glStencilOpSeparateATI\0"
"\0"
- /* _mesa_function_pool[6891]: ColorTableParameteriv (offset 341) */
+ /* _mesa_function_pool[6972]: ColorTableParameteriv (offset 341) */
"iip\0"
"glColorTableParameteriv\0"
"glColorTableParameterivSGI\0"
"\0"
- /* _mesa_function_pool[6947]: FogCoordPointerListIBM (dynamic) */
+ /* _mesa_function_pool[7028]: FogCoordPointerListIBM (dynamic) */
"iipi\0"
"glFogCoordPointerListIBM\0"
"\0"
- /* _mesa_function_pool[6978]: WindowPos3dMESA (will be remapped) */
+ /* _mesa_function_pool[7059]: WindowPos3dMESA (will be remapped) */
"ddd\0"
"glWindowPos3d\0"
"glWindowPos3dARB\0"
"glWindowPos3dMESA\0"
"\0"
- /* _mesa_function_pool[7032]: Color4us (offset 39) */
+ /* _mesa_function_pool[7113]: Color4us (offset 39) */
"iiii\0"
"glColor4us\0"
"\0"
- /* _mesa_function_pool[7049]: PointParameterfvEXT (will be remapped) */
+ /* _mesa_function_pool[7130]: PointParameterfvEXT (will be remapped) */
"ip\0"
"glPointParameterfv\0"
"glPointParameterfvARB\0"
"glPointParameterfvEXT\0"
"glPointParameterfvSGIS\0"
"\0"
- /* _mesa_function_pool[7139]: Color3bv (offset 10) */
+ /* _mesa_function_pool[7220]: Color3bv (offset 10) */
"p\0"
"glColor3bv\0"
"\0"
- /* _mesa_function_pool[7153]: WindowPos2fvMESA (will be remapped) */
+ /* _mesa_function_pool[7234]: WindowPos2fvMESA (will be remapped) */
"p\0"
"glWindowPos2fv\0"
"glWindowPos2fvARB\0"
"glWindowPos2fvMESA\0"
"\0"
- /* _mesa_function_pool[7208]: SecondaryColor3bvEXT (will be remapped) */
+ /* _mesa_function_pool[7289]: SecondaryColor3bvEXT (will be remapped) */
"p\0"
"glSecondaryColor3bv\0"
"glSecondaryColor3bvEXT\0"
"\0"
- /* _mesa_function_pool[7254]: VertexPointerListIBM (dynamic) */
+ /* _mesa_function_pool[7335]: VertexPointerListIBM (dynamic) */
"iiipi\0"
"glVertexPointerListIBM\0"
"\0"
- /* _mesa_function_pool[7284]: GetProgramLocalParameterfvARB (will be remapped) */
+ /* _mesa_function_pool[7365]: GetProgramLocalParameterfvARB (will be remapped) */
"iip\0"
"glGetProgramLocalParameterfvARB\0"
"\0"
- /* _mesa_function_pool[7321]: FragmentMaterialfSGIX (dynamic) */
+ /* _mesa_function_pool[7402]: FragmentMaterialfSGIX (dynamic) */
"iif\0"
"glFragmentMaterialfSGIX\0"
"\0"
- /* _mesa_function_pool[7350]: TexCoord2fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[7431]: TexCoord2fNormal3fVertex3fSUN (dynamic) */
"ffffffff\0"
"glTexCoord2fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[7392]: RenderbufferStorageEXT (will be remapped) */
+ /* _mesa_function_pool[7473]: RenderbufferStorageEXT (will be remapped) */
"iiii\0"
"glRenderbufferStorage\0"
"glRenderbufferStorageEXT\0"
"\0"
- /* _mesa_function_pool[7445]: IsFenceNV (will be remapped) */
+ /* _mesa_function_pool[7526]: IsFenceNV (will be remapped) */
"i\0"
"glIsFenceNV\0"
"\0"
- /* _mesa_function_pool[7460]: AttachObjectARB (will be remapped) */
+ /* _mesa_function_pool[7541]: AttachObjectARB (will be remapped) */
"ii\0"
"glAttachObjectARB\0"
"\0"
- /* _mesa_function_pool[7482]: GetFragmentLightivSGIX (dynamic) */
+ /* _mesa_function_pool[7563]: GetFragmentLightivSGIX (dynamic) */
"iip\0"
"glGetFragmentLightivSGIX\0"
"\0"
- /* _mesa_function_pool[7512]: UniformMatrix2fvARB (will be remapped) */
+ /* _mesa_function_pool[7593]: UniformMatrix2fvARB (will be remapped) */
"iiip\0"
"glUniformMatrix2fv\0"
"glUniformMatrix2fvARB\0"
"\0"
- /* _mesa_function_pool[7559]: MultiTexCoord2fARB (offset 386) */
+ /* _mesa_function_pool[7640]: MultiTexCoord2fARB (offset 386) */
"iff\0"
"glMultiTexCoord2f\0"
"glMultiTexCoord2fARB\0"
"\0"
- /* _mesa_function_pool[7603]: ColorTable (offset 339) */
+ /* _mesa_function_pool[7684]: ColorTable (offset 339) */
"iiiiip\0"
"glColorTable\0"
"glColorTableSGI\0"
"glColorTableEXT\0"
"\0"
- /* _mesa_function_pool[7656]: IndexPointer (offset 314) */
+ /* _mesa_function_pool[7737]: IndexPointer (offset 314) */
"iip\0"
"glIndexPointer\0"
"\0"
- /* _mesa_function_pool[7676]: Accum (offset 213) */
+ /* _mesa_function_pool[7757]: Accum (offset 213) */
"if\0"
"glAccum\0"
"\0"
- /* _mesa_function_pool[7688]: GetTexImage (offset 281) */
+ /* _mesa_function_pool[7769]: GetTexImage (offset 281) */
"iiiip\0"
"glGetTexImage\0"
"\0"
- /* _mesa_function_pool[7709]: MapControlPointsNV (dynamic) */
+ /* _mesa_function_pool[7790]: MapControlPointsNV (dynamic) */
"iiiiiiiip\0"
"glMapControlPointsNV\0"
"\0"
- /* _mesa_function_pool[7741]: ConvolutionFilter2D (offset 349) */
+ /* _mesa_function_pool[7822]: ConvolutionFilter2D (offset 349) */
"iiiiiip\0"
"glConvolutionFilter2D\0"
"glConvolutionFilter2DEXT\0"
"\0"
- /* _mesa_function_pool[7797]: Finish (offset 216) */
+ /* _mesa_function_pool[7878]: Finish (offset 216) */
"\0"
"glFinish\0"
"\0"
- /* _mesa_function_pool[7808]: MapParameterfvNV (dynamic) */
+ /* _mesa_function_pool[7889]: MapParameterfvNV (dynamic) */
"iip\0"
"glMapParameterfvNV\0"
"\0"
- /* _mesa_function_pool[7832]: ClearStencil (offset 207) */
+ /* _mesa_function_pool[7913]: ClearStencil (offset 207) */
"i\0"
"glClearStencil\0"
"\0"
- /* _mesa_function_pool[7850]: VertexAttrib3dvARB (will be remapped) */
+ /* _mesa_function_pool[7931]: VertexAttrib3dvARB (will be remapped) */
"ip\0"
"glVertexAttrib3dv\0"
"glVertexAttrib3dvARB\0"
"\0"
- /* _mesa_function_pool[7893]: HintPGI (dynamic) */
+ /* _mesa_function_pool[7974]: HintPGI (dynamic) */
"ii\0"
"glHintPGI\0"
"\0"
- /* _mesa_function_pool[7907]: ConvolutionParameteriv (offset 353) */
+ /* _mesa_function_pool[7988]: ConvolutionParameteriv (offset 353) */
"iip\0"
"glConvolutionParameteriv\0"
"glConvolutionParameterivEXT\0"
"\0"
- /* _mesa_function_pool[7965]: Color4s (offset 33) */
+ /* _mesa_function_pool[8046]: Color4s (offset 33) */
"iiii\0"
"glColor4s\0"
"\0"
- /* _mesa_function_pool[7981]: InterleavedArrays (offset 317) */
+ /* _mesa_function_pool[8062]: InterleavedArrays (offset 317) */
"iip\0"
"glInterleavedArrays\0"
"\0"
- /* _mesa_function_pool[8006]: RasterPos2fv (offset 65) */
+ /* _mesa_function_pool[8087]: RasterPos2fv (offset 65) */
"p\0"
"glRasterPos2fv\0"
"\0"
- /* _mesa_function_pool[8024]: TexCoord1fv (offset 97) */
+ /* _mesa_function_pool[8105]: TexCoord1fv (offset 97) */
"p\0"
"glTexCoord1fv\0"
"\0"
- /* _mesa_function_pool[8041]: Vertex2d (offset 126) */
+ /* _mesa_function_pool[8122]: Vertex2d (offset 126) */
"dd\0"
"glVertex2d\0"
"\0"
- /* _mesa_function_pool[8056]: CullParameterdvEXT (dynamic) */
+ /* _mesa_function_pool[8137]: CullParameterdvEXT (dynamic) */
"ip\0"
"glCullParameterdvEXT\0"
"\0"
- /* _mesa_function_pool[8081]: ProgramNamedParameter4fNV (will be remapped) */
+ /* _mesa_function_pool[8162]: ProgramNamedParameter4fNV (will be remapped) */
"iipffff\0"
"glProgramNamedParameter4fNV\0"
"\0"
- /* _mesa_function_pool[8118]: Color3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[8199]: Color3fVertex3fSUN (dynamic) */
"ffffff\0"
"glColor3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[8147]: ProgramEnvParameter4fvARB (will be remapped) */
+ /* _mesa_function_pool[8228]: ProgramEnvParameter4fvARB (will be remapped) */
"iip\0"
"glProgramEnvParameter4fvARB\0"
"glProgramParameter4fvNV\0"
"\0"
- /* _mesa_function_pool[8204]: Color4i (offset 31) */
+ /* _mesa_function_pool[8285]: Color4i (offset 31) */
"iiii\0"
"glColor4i\0"
"\0"
- /* _mesa_function_pool[8220]: Color4f (offset 29) */
+ /* _mesa_function_pool[8301]: Color4f (offset 29) */
"ffff\0"
"glColor4f\0"
"\0"
- /* _mesa_function_pool[8236]: RasterPos4fv (offset 81) */
+ /* _mesa_function_pool[8317]: RasterPos4fv (offset 81) */
"p\0"
"glRasterPos4fv\0"
"\0"
- /* _mesa_function_pool[8254]: Color4d (offset 27) */
+ /* _mesa_function_pool[8335]: Color4d (offset 27) */
"dddd\0"
"glColor4d\0"
"\0"
- /* _mesa_function_pool[8270]: ClearIndex (offset 205) */
+ /* _mesa_function_pool[8351]: ClearIndex (offset 205) */
"f\0"
"glClearIndex\0"
"\0"
- /* _mesa_function_pool[8286]: Color4b (offset 25) */
+ /* _mesa_function_pool[8367]: Color4b (offset 25) */
"iiii\0"
"glColor4b\0"
"\0"
- /* _mesa_function_pool[8302]: LoadMatrixd (offset 292) */
+ /* _mesa_function_pool[8383]: LoadMatrixd (offset 292) */
"p\0"
"glLoadMatrixd\0"
"\0"
- /* _mesa_function_pool[8319]: FragmentLightModeliSGIX (dynamic) */
+ /* _mesa_function_pool[8400]: FragmentLightModeliSGIX (dynamic) */
"ii\0"
"glFragmentLightModeliSGIX\0"
"\0"
- /* _mesa_function_pool[8349]: RasterPos2dv (offset 63) */
+ /* _mesa_function_pool[8430]: RasterPos2dv (offset 63) */
"p\0"
"glRasterPos2dv\0"
"\0"
- /* _mesa_function_pool[8367]: ConvolutionParameterfv (offset 351) */
+ /* _mesa_function_pool[8448]: ConvolutionParameterfv (offset 351) */
"iip\0"
"glConvolutionParameterfv\0"
"glConvolutionParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[8425]: TbufferMask3DFX (dynamic) */
+ /* _mesa_function_pool[8506]: TbufferMask3DFX (dynamic) */
"i\0"
"glTbufferMask3DFX\0"
"\0"
- /* _mesa_function_pool[8446]: GetTexGendv (offset 278) */
+ /* _mesa_function_pool[8527]: GetTexGendv (offset 278) */
"iip\0"
"glGetTexGendv\0"
"\0"
- /* _mesa_function_pool[8465]: GetVertexAttribfvNV (will be remapped) */
+ /* _mesa_function_pool[8546]: GetVertexAttribfvNV (will be remapped) */
"iip\0"
"glGetVertexAttribfvNV\0"
"\0"
- /* _mesa_function_pool[8492]: BeginTransformFeedbackEXT (will be remapped) */
+ /* _mesa_function_pool[8573]: BeginTransformFeedbackEXT (will be remapped) */
"i\0"
"glBeginTransformFeedbackEXT\0"
"glBeginTransformFeedback\0"
"\0"
- /* _mesa_function_pool[8548]: LoadProgramNV (will be remapped) */
+ /* _mesa_function_pool[8629]: LoadProgramNV (will be remapped) */
"iiip\0"
"glLoadProgramNV\0"
"\0"
- /* _mesa_function_pool[8570]: WaitSync (will be remapped) */
+ /* _mesa_function_pool[8651]: WaitSync (will be remapped) */
"iii\0"
"glWaitSync\0"
"\0"
- /* _mesa_function_pool[8586]: EndList (offset 1) */
+ /* _mesa_function_pool[8667]: EndList (offset 1) */
"\0"
"glEndList\0"
"\0"
- /* _mesa_function_pool[8598]: VertexAttrib4fvNV (will be remapped) */
+ /* _mesa_function_pool[8679]: VertexAttrib4fvNV (will be remapped) */
"ip\0"
"glVertexAttrib4fvNV\0"
"\0"
- /* _mesa_function_pool[8622]: GetAttachedObjectsARB (will be remapped) */
+ /* _mesa_function_pool[8703]: GetAttachedObjectsARB (will be remapped) */
"iipp\0"
"glGetAttachedObjectsARB\0"
"\0"
- /* _mesa_function_pool[8652]: Uniform3fvARB (will be remapped) */
+ /* _mesa_function_pool[8733]: Uniform3fvARB (will be remapped) */
"iip\0"
"glUniform3fv\0"
"glUniform3fvARB\0"
"\0"
- /* _mesa_function_pool[8686]: EvalCoord1fv (offset 231) */
+ /* _mesa_function_pool[8767]: EvalCoord1fv (offset 231) */
"p\0"
"glEvalCoord1fv\0"
"\0"
- /* _mesa_function_pool[8704]: DrawRangeElements (offset 338) */
+ /* _mesa_function_pool[8785]: DrawRangeElements (offset 338) */
"iiiiip\0"
"glDrawRangeElements\0"
"glDrawRangeElementsEXT\0"
"\0"
- /* _mesa_function_pool[8755]: EvalMesh2 (offset 238) */
+ /* _mesa_function_pool[8836]: EvalMesh2 (offset 238) */
"iiiii\0"
"glEvalMesh2\0"
"\0"
- /* _mesa_function_pool[8774]: Vertex4fv (offset 145) */
+ /* _mesa_function_pool[8855]: Vertex4fv (offset 145) */
"p\0"
"glVertex4fv\0"
"\0"
- /* _mesa_function_pool[8789]: GenTransformFeedbacks (will be remapped) */
+ /* _mesa_function_pool[8870]: GenTransformFeedbacks (will be remapped) */
"ip\0"
"glGenTransformFeedbacks\0"
"\0"
- /* _mesa_function_pool[8817]: SpriteParameterfvSGIX (dynamic) */
+ /* _mesa_function_pool[8898]: SpriteParameterfvSGIX (dynamic) */
"ip\0"
"glSpriteParameterfvSGIX\0"
"\0"
- /* _mesa_function_pool[8845]: CheckFramebufferStatusEXT (will be remapped) */
+ /* _mesa_function_pool[8926]: CheckFramebufferStatusEXT (will be remapped) */
"i\0"
"glCheckFramebufferStatus\0"
"glCheckFramebufferStatusEXT\0"
"\0"
- /* _mesa_function_pool[8901]: GlobalAlphaFactoruiSUN (dynamic) */
+ /* _mesa_function_pool[8982]: GlobalAlphaFactoruiSUN (dynamic) */
"i\0"
"glGlobalAlphaFactoruiSUN\0"
"\0"
- /* _mesa_function_pool[8929]: GetHandleARB (will be remapped) */
+ /* _mesa_function_pool[9010]: GetHandleARB (will be remapped) */
"i\0"
"glGetHandleARB\0"
"\0"
- /* _mesa_function_pool[8947]: GetVertexAttribivARB (will be remapped) */
+ /* _mesa_function_pool[9028]: GetVertexAttribivARB (will be remapped) */
"iip\0"
"glGetVertexAttribiv\0"
"glGetVertexAttribivARB\0"
"\0"
- /* _mesa_function_pool[8995]: GetCombinerInputParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[9076]: GetCombinerInputParameterfvNV (will be remapped) */
"iiiip\0"
"glGetCombinerInputParameterfvNV\0"
"\0"
- /* _mesa_function_pool[9034]: CreateProgram (will be remapped) */
+ /* _mesa_function_pool[9115]: GetTexParameterIivEXT (will be remapped) */
+ "iip\0"
+ "glGetTexParameterIivEXT\0"
+ "\0"
+ /* _mesa_function_pool[9144]: CreateProgram (will be remapped) */
"\0"
"glCreateProgram\0"
"\0"
- /* _mesa_function_pool[9052]: LoadTransposeMatrixdARB (will be remapped) */
+ /* _mesa_function_pool[9162]: LoadTransposeMatrixdARB (will be remapped) */
"p\0"
"glLoadTransposeMatrixd\0"
"glLoadTransposeMatrixdARB\0"
"\0"
- /* _mesa_function_pool[9104]: GetMinmax (offset 364) */
+ /* _mesa_function_pool[9214]: GetMinmax (offset 364) */
"iiiip\0"
"glGetMinmax\0"
"glGetMinmaxEXT\0"
"\0"
- /* _mesa_function_pool[9138]: StencilFuncSeparate (will be remapped) */
+ /* _mesa_function_pool[9248]: StencilFuncSeparate (will be remapped) */
"iiii\0"
"glStencilFuncSeparate\0"
"\0"
- /* _mesa_function_pool[9166]: SecondaryColor3sEXT (will be remapped) */
+ /* _mesa_function_pool[9276]: SecondaryColor3sEXT (will be remapped) */
"iii\0"
"glSecondaryColor3s\0"
"glSecondaryColor3sEXT\0"
"\0"
- /* _mesa_function_pool[9212]: Color3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[9322]: Color3fVertex3fvSUN (dynamic) */
"pp\0"
"glColor3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[9238]: Normal3fv (offset 57) */
+ /* _mesa_function_pool[9348]: Normal3fv (offset 57) */
"p\0"
"glNormal3fv\0"
"\0"
- /* _mesa_function_pool[9253]: GlobalAlphaFactorbSUN (dynamic) */
+ /* _mesa_function_pool[9363]: GlobalAlphaFactorbSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorbSUN\0"
"\0"
- /* _mesa_function_pool[9280]: Color3us (offset 23) */
+ /* _mesa_function_pool[9390]: Color3us (offset 23) */
"iii\0"
"glColor3us\0"
"\0"
- /* _mesa_function_pool[9296]: ImageTransformParameterfvHP (dynamic) */
+ /* _mesa_function_pool[9406]: ImageTransformParameterfvHP (dynamic) */
"iip\0"
"glImageTransformParameterfvHP\0"
"\0"
- /* _mesa_function_pool[9331]: VertexAttrib4ivARB (will be remapped) */
+ /* _mesa_function_pool[9441]: VertexAttrib4ivARB (will be remapped) */
"ip\0"
"glVertexAttrib4iv\0"
"glVertexAttrib4ivARB\0"
"\0"
- /* _mesa_function_pool[9374]: End (offset 43) */
+ /* _mesa_function_pool[9484]: End (offset 43) */
"\0"
"glEnd\0"
"\0"
- /* _mesa_function_pool[9382]: VertexAttrib3fNV (will be remapped) */
+ /* _mesa_function_pool[9492]: VertexAttrib3fNV (will be remapped) */
"ifff\0"
"glVertexAttrib3fNV\0"
"\0"
- /* _mesa_function_pool[9407]: VertexAttribs2dvNV (will be remapped) */
+ /* _mesa_function_pool[9517]: VertexAttribs2dvNV (will be remapped) */
"iip\0"
"glVertexAttribs2dvNV\0"
"\0"
- /* _mesa_function_pool[9433]: GetQueryObjectui64vEXT (will be remapped) */
+ /* _mesa_function_pool[9543]: GetQueryObjectui64vEXT (will be remapped) */
"iip\0"
"glGetQueryObjectui64vEXT\0"
"\0"
- /* _mesa_function_pool[9463]: MultiTexCoord3fvARB (offset 395) */
+ /* _mesa_function_pool[9573]: MultiTexCoord3fvARB (offset 395) */
"ip\0"
"glMultiTexCoord3fv\0"
"glMultiTexCoord3fvARB\0"
"\0"
- /* _mesa_function_pool[9508]: SecondaryColor3dEXT (will be remapped) */
+ /* _mesa_function_pool[9618]: SecondaryColor3dEXT (will be remapped) */
"ddd\0"
"glSecondaryColor3d\0"
"glSecondaryColor3dEXT\0"
"\0"
- /* _mesa_function_pool[9554]: Color3ub (offset 19) */
+ /* _mesa_function_pool[9664]: Color3ub (offset 19) */
"iii\0"
"glColor3ub\0"
"\0"
- /* _mesa_function_pool[9570]: GetProgramParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[9680]: GetProgramParameterfvNV (will be remapped) */
"iiip\0"
"glGetProgramParameterfvNV\0"
"\0"
- /* _mesa_function_pool[9602]: TangentPointerEXT (dynamic) */
+ /* _mesa_function_pool[9712]: TangentPointerEXT (dynamic) */
"iip\0"
"glTangentPointerEXT\0"
"\0"
- /* _mesa_function_pool[9627]: Color4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[9737]: Color4fNormal3fVertex3fvSUN (dynamic) */
"ppp\0"
"glColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[9662]: GetInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[9772]: GetInstrumentsSGIX (dynamic) */
"\0"
"glGetInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[9685]: Color3ui (offset 21) */
+ /* _mesa_function_pool[9795]: Color3ui (offset 21) */
"iii\0"
"glColor3ui\0"
"\0"
- /* _mesa_function_pool[9701]: EvalMapsNV (dynamic) */
+ /* _mesa_function_pool[9811]: EvalMapsNV (dynamic) */
"ii\0"
"glEvalMapsNV\0"
"\0"
- /* _mesa_function_pool[9718]: TexSubImage2D (offset 333) */
+ /* _mesa_function_pool[9828]: TexSubImage2D (offset 333) */
"iiiiiiiip\0"
"glTexSubImage2D\0"
"glTexSubImage2DEXT\0"
"\0"
- /* _mesa_function_pool[9764]: FragmentLightivSGIX (dynamic) */
+ /* _mesa_function_pool[9874]: FragmentLightivSGIX (dynamic) */
"iip\0"
"glFragmentLightivSGIX\0"
"\0"
- /* _mesa_function_pool[9791]: GetTexParameterPointervAPPLE (will be remapped) */
+ /* _mesa_function_pool[9901]: GetTexParameterPointervAPPLE (will be remapped) */
"iip\0"
"glGetTexParameterPointervAPPLE\0"
"\0"
- /* _mesa_function_pool[9827]: TexGenfv (offset 191) */
+ /* _mesa_function_pool[9937]: TexGenfv (offset 191) */
"iip\0"
"glTexGenfv\0"
"\0"
- /* _mesa_function_pool[9843]: GetTransformFeedbackVaryingEXT (will be remapped) */
+ /* _mesa_function_pool[9953]: GetTransformFeedbackVaryingEXT (will be remapped) */
"iiipppp\0"
"glGetTransformFeedbackVaryingEXT\0"
"glGetTransformFeedbackVarying\0"
"\0"
- /* _mesa_function_pool[9915]: VertexAttrib4bvARB (will be remapped) */
+ /* _mesa_function_pool[10025]: VertexAttrib4bvARB (will be remapped) */
"ip\0"
"glVertexAttrib4bv\0"
"glVertexAttrib4bvARB\0"
"\0"
- /* _mesa_function_pool[9958]: AlphaFragmentOp2ATI (will be remapped) */
+ /* _mesa_function_pool[10068]: AlphaFragmentOp2ATI (will be remapped) */
"iiiiiiiii\0"
"glAlphaFragmentOp2ATI\0"
"\0"
- /* _mesa_function_pool[9991]: GetIntegerIndexedvEXT (will be remapped) */
+ /* _mesa_function_pool[10101]: GetIntegerIndexedvEXT (will be remapped) */
"iip\0"
"glGetIntegerIndexedvEXT\0"
"\0"
- /* _mesa_function_pool[10020]: MultiTexCoord4sARB (offset 406) */
+ /* _mesa_function_pool[10130]: MultiTexCoord4sARB (offset 406) */
"iiiii\0"
"glMultiTexCoord4s\0"
"glMultiTexCoord4sARB\0"
"\0"
- /* _mesa_function_pool[10066]: GetFragmentMaterialivSGIX (dynamic) */
+ /* _mesa_function_pool[10176]: GetFragmentMaterialivSGIX (dynamic) */
"iip\0"
"glGetFragmentMaterialivSGIX\0"
"\0"
- /* _mesa_function_pool[10099]: WindowPos4dMESA (will be remapped) */
+ /* _mesa_function_pool[10209]: WindowPos4dMESA (will be remapped) */
"dddd\0"
"glWindowPos4dMESA\0"
"\0"
- /* _mesa_function_pool[10123]: WeightPointerARB (dynamic) */
+ /* _mesa_function_pool[10233]: WeightPointerARB (dynamic) */
"iiip\0"
"glWeightPointerARB\0"
"\0"
- /* _mesa_function_pool[10148]: WindowPos2dMESA (will be remapped) */
+ /* _mesa_function_pool[10258]: WindowPos2dMESA (will be remapped) */
"dd\0"
"glWindowPos2d\0"
"glWindowPos2dARB\0"
"glWindowPos2dMESA\0"
"\0"
- /* _mesa_function_pool[10201]: FramebufferTexture3DEXT (will be remapped) */
+ /* _mesa_function_pool[10311]: FramebufferTexture3DEXT (will be remapped) */
"iiiiii\0"
"glFramebufferTexture3D\0"
"glFramebufferTexture3DEXT\0"
"\0"
- /* _mesa_function_pool[10258]: BlendEquation (offset 337) */
+ /* _mesa_function_pool[10368]: BlendEquation (offset 337) */
"i\0"
"glBlendEquation\0"
"glBlendEquationEXT\0"
"\0"
- /* _mesa_function_pool[10296]: VertexAttrib3dNV (will be remapped) */
+ /* _mesa_function_pool[10406]: VertexAttrib3dNV (will be remapped) */
"iddd\0"
"glVertexAttrib3dNV\0"
"\0"
- /* _mesa_function_pool[10321]: VertexAttrib3dARB (will be remapped) */
+ /* _mesa_function_pool[10431]: VertexAttrib3dARB (will be remapped) */
"iddd\0"
"glVertexAttrib3d\0"
"glVertexAttrib3dARB\0"
"\0"
- /* _mesa_function_pool[10364]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[10474]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
"ppppp\0"
"glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[10428]: VertexAttrib4fARB (will be remapped) */
+ /* _mesa_function_pool[10538]: VertexAttrib4fARB (will be remapped) */
"iffff\0"
"glVertexAttrib4f\0"
"glVertexAttrib4fARB\0"
"\0"
- /* _mesa_function_pool[10472]: GetError (offset 261) */
+ /* _mesa_function_pool[10582]: GetError (offset 261) */
"\0"
"glGetError\0"
"\0"
- /* _mesa_function_pool[10485]: IndexFuncEXT (dynamic) */
+ /* _mesa_function_pool[10595]: IndexFuncEXT (dynamic) */
"if\0"
"glIndexFuncEXT\0"
"\0"
- /* _mesa_function_pool[10504]: TexCoord3dv (offset 111) */
+ /* _mesa_function_pool[10614]: TexCoord3dv (offset 111) */
"p\0"
"glTexCoord3dv\0"
"\0"
- /* _mesa_function_pool[10521]: Indexdv (offset 45) */
+ /* _mesa_function_pool[10631]: Indexdv (offset 45) */
"p\0"
"glIndexdv\0"
"\0"
- /* _mesa_function_pool[10534]: FramebufferTexture2DEXT (will be remapped) */
+ /* _mesa_function_pool[10644]: FramebufferTexture2DEXT (will be remapped) */
"iiiii\0"
"glFramebufferTexture2D\0"
"glFramebufferTexture2DEXT\0"
"\0"
- /* _mesa_function_pool[10590]: Normal3s (offset 60) */
+ /* _mesa_function_pool[10700]: Normal3s (offset 60) */
"iii\0"
"glNormal3s\0"
"\0"
- /* _mesa_function_pool[10606]: GetObjectParameterivAPPLE (will be remapped) */
+ /* _mesa_function_pool[10716]: GetObjectParameterivAPPLE (will be remapped) */
"iiip\0"
"glGetObjectParameterivAPPLE\0"
"\0"
- /* _mesa_function_pool[10640]: PushName (offset 201) */
+ /* _mesa_function_pool[10750]: PushName (offset 201) */
"i\0"
"glPushName\0"
"\0"
- /* _mesa_function_pool[10654]: MultiTexCoord2dvARB (offset 385) */
+ /* _mesa_function_pool[10764]: MultiTexCoord2dvARB (offset 385) */
"ip\0"
"glMultiTexCoord2dv\0"
"glMultiTexCoord2dvARB\0"
"\0"
- /* _mesa_function_pool[10699]: CullParameterfvEXT (dynamic) */
+ /* _mesa_function_pool[10809]: CullParameterfvEXT (dynamic) */
"ip\0"
"glCullParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[10724]: Normal3i (offset 58) */
+ /* _mesa_function_pool[10834]: Normal3i (offset 58) */
"iii\0"
"glNormal3i\0"
"\0"
- /* _mesa_function_pool[10740]: ProgramNamedParameter4fvNV (will be remapped) */
+ /* _mesa_function_pool[10850]: ProgramNamedParameter4fvNV (will be remapped) */
"iipp\0"
"glProgramNamedParameter4fvNV\0"
"\0"
- /* _mesa_function_pool[10775]: SecondaryColorPointerEXT (will be remapped) */
+ /* _mesa_function_pool[10885]: SecondaryColorPointerEXT (will be remapped) */
"iiip\0"
"glSecondaryColorPointer\0"
"glSecondaryColorPointerEXT\0"
"\0"
- /* _mesa_function_pool[10832]: VertexAttrib4fvARB (will be remapped) */
+ /* _mesa_function_pool[10942]: VertexAttrib4fvARB (will be remapped) */
"ip\0"
"glVertexAttrib4fv\0"
"glVertexAttrib4fvARB\0"
"\0"
- /* _mesa_function_pool[10875]: ColorPointerListIBM (dynamic) */
+ /* _mesa_function_pool[10985]: ColorPointerListIBM (dynamic) */
"iiipi\0"
"glColorPointerListIBM\0"
"\0"
- /* _mesa_function_pool[10904]: GetActiveUniformARB (will be remapped) */
+ /* _mesa_function_pool[11014]: GetActiveUniformARB (will be remapped) */
"iiipppp\0"
"glGetActiveUniform\0"
"glGetActiveUniformARB\0"
"\0"
- /* _mesa_function_pool[10954]: ImageTransformParameteriHP (dynamic) */
+ /* _mesa_function_pool[11064]: ImageTransformParameteriHP (dynamic) */
"iii\0"
"glImageTransformParameteriHP\0"
"\0"
- /* _mesa_function_pool[10988]: Normal3b (offset 52) */
+ /* _mesa_function_pool[11098]: Normal3b (offset 52) */
"iii\0"
"glNormal3b\0"
"\0"
- /* _mesa_function_pool[11004]: Normal3d (offset 54) */
+ /* _mesa_function_pool[11114]: Normal3d (offset 54) */
"ddd\0"
"glNormal3d\0"
"\0"
- /* _mesa_function_pool[11020]: Normal3f (offset 56) */
+ /* _mesa_function_pool[11130]: Normal3f (offset 56) */
"fff\0"
"glNormal3f\0"
"\0"
- /* _mesa_function_pool[11036]: MultiTexCoord1svARB (offset 383) */
+ /* _mesa_function_pool[11146]: MultiTexCoord1svARB (offset 383) */
"ip\0"
"glMultiTexCoord1sv\0"
"glMultiTexCoord1svARB\0"
"\0"
- /* _mesa_function_pool[11081]: Indexi (offset 48) */
+ /* _mesa_function_pool[11191]: Indexi (offset 48) */
"i\0"
"glIndexi\0"
"\0"
- /* _mesa_function_pool[11093]: EGLImageTargetTexture2DOES (will be remapped) */
+ /* _mesa_function_pool[11203]: EGLImageTargetTexture2DOES (will be remapped) */
"ip\0"
"glEGLImageTargetTexture2DOES\0"
"\0"
- /* _mesa_function_pool[11126]: EndQueryARB (will be remapped) */
+ /* _mesa_function_pool[11236]: EndQueryARB (will be remapped) */
"i\0"
"glEndQuery\0"
"glEndQueryARB\0"
"\0"
- /* _mesa_function_pool[11154]: DeleteFencesNV (will be remapped) */
+ /* _mesa_function_pool[11264]: DeleteFencesNV (will be remapped) */
"ip\0"
"glDeleteFencesNV\0"
"\0"
- /* _mesa_function_pool[11175]: DeformationMap3dSGIX (dynamic) */
+ /* _mesa_function_pool[11285]: DeformationMap3dSGIX (dynamic) */
"iddiiddiiddiip\0"
"glDeformationMap3dSGIX\0"
"\0"
- /* _mesa_function_pool[11214]: BindBufferRangeEXT (will be remapped) */
+ /* _mesa_function_pool[11324]: BindBufferRangeEXT (will be remapped) */
"iiiii\0"
"glBindBufferRangeEXT\0"
"glBindBufferRange\0"
"\0"
- /* _mesa_function_pool[11260]: DepthMask (offset 211) */
+ /* _mesa_function_pool[11370]: DepthMask (offset 211) */
"i\0"
"glDepthMask\0"
"\0"
- /* _mesa_function_pool[11275]: IsShader (will be remapped) */
+ /* _mesa_function_pool[11385]: IsShader (will be remapped) */
"i\0"
"glIsShader\0"
"\0"
- /* _mesa_function_pool[11289]: Indexf (offset 46) */
+ /* _mesa_function_pool[11399]: Indexf (offset 46) */
"f\0"
"glIndexf\0"
"\0"
- /* _mesa_function_pool[11301]: GetImageTransformParameterivHP (dynamic) */
+ /* _mesa_function_pool[11411]: GetImageTransformParameterivHP (dynamic) */
"iip\0"
"glGetImageTransformParameterivHP\0"
"\0"
- /* _mesa_function_pool[11339]: Indexd (offset 44) */
+ /* _mesa_function_pool[11449]: Indexd (offset 44) */
"d\0"
"glIndexd\0"
"\0"
- /* _mesa_function_pool[11351]: GetMaterialiv (offset 270) */
+ /* _mesa_function_pool[11461]: GetMaterialiv (offset 270) */
"iip\0"
"glGetMaterialiv\0"
"\0"
- /* _mesa_function_pool[11372]: StencilOp (offset 244) */
+ /* _mesa_function_pool[11482]: StencilOp (offset 244) */
"iii\0"
"glStencilOp\0"
"\0"
- /* _mesa_function_pool[11389]: WindowPos4ivMESA (will be remapped) */
+ /* _mesa_function_pool[11499]: WindowPos4ivMESA (will be remapped) */
"p\0"
"glWindowPos4ivMESA\0"
"\0"
- /* _mesa_function_pool[11411]: FramebufferTextureLayer (dynamic) */
+ /* _mesa_function_pool[11521]: FramebufferTextureLayer (dynamic) */
"iiiii\0"
"glFramebufferTextureLayerARB\0"
"\0"
- /* _mesa_function_pool[11447]: MultiTexCoord3svARB (offset 399) */
+ /* _mesa_function_pool[11557]: MultiTexCoord3svARB (offset 399) */
"ip\0"
"glMultiTexCoord3sv\0"
"glMultiTexCoord3svARB\0"
"\0"
- /* _mesa_function_pool[11492]: TexEnvfv (offset 185) */
+ /* _mesa_function_pool[11602]: TexEnvfv (offset 185) */
"iip\0"
"glTexEnvfv\0"
"\0"
- /* _mesa_function_pool[11508]: MultiTexCoord4iARB (offset 404) */
+ /* _mesa_function_pool[11618]: MultiTexCoord4iARB (offset 404) */
"iiiii\0"
"glMultiTexCoord4i\0"
"glMultiTexCoord4iARB\0"
"\0"
- /* _mesa_function_pool[11554]: Indexs (offset 50) */
+ /* _mesa_function_pool[11664]: Indexs (offset 50) */
"i\0"
"glIndexs\0"
"\0"
- /* _mesa_function_pool[11566]: Binormal3ivEXT (dynamic) */
+ /* _mesa_function_pool[11676]: Binormal3ivEXT (dynamic) */
"p\0"
"glBinormal3ivEXT\0"
"\0"
- /* _mesa_function_pool[11586]: ResizeBuffersMESA (will be remapped) */
+ /* _mesa_function_pool[11696]: ResizeBuffersMESA (will be remapped) */
"\0"
"glResizeBuffersMESA\0"
"\0"
- /* _mesa_function_pool[11608]: GetUniformivARB (will be remapped) */
+ /* _mesa_function_pool[11718]: GetUniformivARB (will be remapped) */
"iip\0"
"glGetUniformiv\0"
"glGetUniformivARB\0"
"\0"
- /* _mesa_function_pool[11646]: PixelTexGenParameteriSGIS (will be remapped) */
+ /* _mesa_function_pool[11756]: PixelTexGenParameteriSGIS (will be remapped) */
"ii\0"
"glPixelTexGenParameteriSGIS\0"
"\0"
- /* _mesa_function_pool[11678]: VertexPointervINTEL (dynamic) */
+ /* _mesa_function_pool[11788]: VertexPointervINTEL (dynamic) */
"iip\0"
"glVertexPointervINTEL\0"
"\0"
- /* _mesa_function_pool[11705]: Vertex2i (offset 130) */
+ /* _mesa_function_pool[11815]: Vertex2i (offset 130) */
"ii\0"
"glVertex2i\0"
"\0"
- /* _mesa_function_pool[11720]: LoadMatrixf (offset 291) */
+ /* _mesa_function_pool[11830]: LoadMatrixf (offset 291) */
"p\0"
"glLoadMatrixf\0"
"\0"
- /* _mesa_function_pool[11737]: Vertex2f (offset 128) */
+ /* _mesa_function_pool[11847]: Vertex2f (offset 128) */
"ff\0"
"glVertex2f\0"
"\0"
- /* _mesa_function_pool[11752]: ReplacementCodeuiColor4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[11862]: ReplacementCodeuiColor4fNormal3fVertex3fvSUN (dynamic) */
"pppp\0"
"glReplacementCodeuiColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[11805]: Color4bv (offset 26) */
+ /* _mesa_function_pool[11915]: Color4bv (offset 26) */
"p\0"
"glColor4bv\0"
"\0"
- /* _mesa_function_pool[11819]: VertexPointer (offset 321) */
+ /* _mesa_function_pool[11929]: VertexPointer (offset 321) */
"iiip\0"
"glVertexPointer\0"
"\0"
- /* _mesa_function_pool[11841]: SecondaryColor3uiEXT (will be remapped) */
+ /* _mesa_function_pool[11951]: SecondaryColor3uiEXT (will be remapped) */
"iii\0"
"glSecondaryColor3ui\0"
"glSecondaryColor3uiEXT\0"
"\0"
- /* _mesa_function_pool[11889]: StartInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[11999]: StartInstrumentsSGIX (dynamic) */
"\0"
"glStartInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[11914]: SecondaryColor3usvEXT (will be remapped) */
+ /* _mesa_function_pool[12024]: SecondaryColor3usvEXT (will be remapped) */
"p\0"
"glSecondaryColor3usv\0"
"glSecondaryColor3usvEXT\0"
"\0"
- /* _mesa_function_pool[11962]: VertexAttrib2fvNV (will be remapped) */
+ /* _mesa_function_pool[12072]: VertexAttrib2fvNV (will be remapped) */
"ip\0"
"glVertexAttrib2fvNV\0"
"\0"
- /* _mesa_function_pool[11986]: ProgramLocalParameter4dvARB (will be remapped) */
+ /* _mesa_function_pool[12096]: ProgramLocalParameter4dvARB (will be remapped) */
"iip\0"
"glProgramLocalParameter4dvARB\0"
"\0"
- /* _mesa_function_pool[12021]: DeleteLists (offset 4) */
+ /* _mesa_function_pool[12131]: DeleteLists (offset 4) */
"ii\0"
"glDeleteLists\0"
"\0"
- /* _mesa_function_pool[12039]: LogicOp (offset 242) */
+ /* _mesa_function_pool[12149]: LogicOp (offset 242) */
"i\0"
"glLogicOp\0"
"\0"
- /* _mesa_function_pool[12052]: MatrixIndexuivARB (dynamic) */
+ /* _mesa_function_pool[12162]: MatrixIndexuivARB (dynamic) */
"ip\0"
"glMatrixIndexuivARB\0"
"\0"
- /* _mesa_function_pool[12076]: Vertex2s (offset 132) */
+ /* _mesa_function_pool[12186]: Vertex2s (offset 132) */
"ii\0"
"glVertex2s\0"
"\0"
- /* _mesa_function_pool[12091]: RenderbufferStorageMultisample (will be remapped) */
+ /* _mesa_function_pool[12201]: RenderbufferStorageMultisample (will be remapped) */
"iiiii\0"
"glRenderbufferStorageMultisample\0"
"glRenderbufferStorageMultisampleEXT\0"
"\0"
- /* _mesa_function_pool[12167]: TexCoord4fv (offset 121) */
+ /* _mesa_function_pool[12277]: TexCoord4fv (offset 121) */
"p\0"
"glTexCoord4fv\0"
"\0"
- /* _mesa_function_pool[12184]: Tangent3sEXT (dynamic) */
+ /* _mesa_function_pool[12294]: Tangent3sEXT (dynamic) */
"iii\0"
"glTangent3sEXT\0"
"\0"
- /* _mesa_function_pool[12204]: GlobalAlphaFactorfSUN (dynamic) */
+ /* _mesa_function_pool[12314]: GlobalAlphaFactorfSUN (dynamic) */
"f\0"
"glGlobalAlphaFactorfSUN\0"
"\0"
- /* _mesa_function_pool[12231]: MultiTexCoord3iARB (offset 396) */
+ /* _mesa_function_pool[12341]: MultiTexCoord3iARB (offset 396) */
"iiii\0"
"glMultiTexCoord3i\0"
"glMultiTexCoord3iARB\0"
"\0"
- /* _mesa_function_pool[12276]: IsProgram (will be remapped) */
+ /* _mesa_function_pool[12386]: IsProgram (will be remapped) */
"i\0"
"glIsProgram\0"
"\0"
- /* _mesa_function_pool[12291]: TexCoordPointerListIBM (dynamic) */
+ /* _mesa_function_pool[12401]: TexCoordPointerListIBM (dynamic) */
"iiipi\0"
"glTexCoordPointerListIBM\0"
"\0"
- /* _mesa_function_pool[12323]: GlobalAlphaFactorusSUN (dynamic) */
+ /* _mesa_function_pool[12433]: GlobalAlphaFactorusSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorusSUN\0"
"\0"
- /* _mesa_function_pool[12351]: VertexAttrib2dvNV (will be remapped) */
+ /* _mesa_function_pool[12461]: VertexAttrib2dvNV (will be remapped) */
"ip\0"
"glVertexAttrib2dvNV\0"
"\0"
- /* _mesa_function_pool[12375]: FramebufferRenderbufferEXT (will be remapped) */
+ /* _mesa_function_pool[12485]: FramebufferRenderbufferEXT (will be remapped) */
"iiii\0"
"glFramebufferRenderbuffer\0"
"glFramebufferRenderbufferEXT\0"
"\0"
- /* _mesa_function_pool[12436]: VertexAttrib1dvNV (will be remapped) */
+ /* _mesa_function_pool[12546]: VertexAttrib1dvNV (will be remapped) */
"ip\0"
"glVertexAttrib1dvNV\0"
"\0"
- /* _mesa_function_pool[12460]: GenTextures (offset 328) */
+ /* _mesa_function_pool[12570]: GenTextures (offset 328) */
"ip\0"
"glGenTextures\0"
"glGenTexturesEXT\0"
"\0"
- /* _mesa_function_pool[12495]: FramebufferTextureARB (will be remapped) */
+ /* _mesa_function_pool[12605]: FramebufferTextureARB (will be remapped) */
"iiii\0"
"glFramebufferTextureARB\0"
"\0"
- /* _mesa_function_pool[12525]: SetFenceNV (will be remapped) */
+ /* _mesa_function_pool[12635]: SetFenceNV (will be remapped) */
"ii\0"
"glSetFenceNV\0"
"\0"
- /* _mesa_function_pool[12542]: FramebufferTexture1DEXT (will be remapped) */
+ /* _mesa_function_pool[12652]: FramebufferTexture1DEXT (will be remapped) */
"iiiii\0"
"glFramebufferTexture1D\0"
"glFramebufferTexture1DEXT\0"
"\0"
- /* _mesa_function_pool[12598]: GetCombinerOutputParameterivNV (will be remapped) */
+ /* _mesa_function_pool[12708]: GetCombinerOutputParameterivNV (will be remapped) */
"iiip\0"
"glGetCombinerOutputParameterivNV\0"
"\0"
- /* _mesa_function_pool[12637]: PixelTexGenParameterivSGIS (will be remapped) */
+ /* _mesa_function_pool[12747]: PixelTexGenParameterivSGIS (will be remapped) */
"ip\0"
"glPixelTexGenParameterivSGIS\0"
"\0"
- /* _mesa_function_pool[12670]: TextureNormalEXT (dynamic) */
+ /* _mesa_function_pool[12780]: TextureNormalEXT (dynamic) */
"i\0"
"glTextureNormalEXT\0"
"\0"
- /* _mesa_function_pool[12692]: IndexPointerListIBM (dynamic) */
+ /* _mesa_function_pool[12802]: IndexPointerListIBM (dynamic) */
"iipi\0"
"glIndexPointerListIBM\0"
"\0"
- /* _mesa_function_pool[12720]: WeightfvARB (dynamic) */
+ /* _mesa_function_pool[12830]: WeightfvARB (dynamic) */
"ip\0"
"glWeightfvARB\0"
"\0"
- /* _mesa_function_pool[12738]: RasterPos2sv (offset 69) */
+ /* _mesa_function_pool[12848]: RasterPos2sv (offset 69) */
"p\0"
"glRasterPos2sv\0"
"\0"
- /* _mesa_function_pool[12756]: Color4ubv (offset 36) */
+ /* _mesa_function_pool[12866]: Color4ubv (offset 36) */
"p\0"
"glColor4ubv\0"
"\0"
- /* _mesa_function_pool[12771]: DrawBuffer (offset 202) */
+ /* _mesa_function_pool[12881]: DrawBuffer (offset 202) */
"i\0"
"glDrawBuffer\0"
"\0"
- /* _mesa_function_pool[12787]: TexCoord2fv (offset 105) */
+ /* _mesa_function_pool[12897]: TexCoord2fv (offset 105) */
"p\0"
"glTexCoord2fv\0"
"\0"
- /* _mesa_function_pool[12804]: WindowPos4fMESA (will be remapped) */
+ /* _mesa_function_pool[12914]: WindowPos4fMESA (will be remapped) */
"ffff\0"
"glWindowPos4fMESA\0"
"\0"
- /* _mesa_function_pool[12828]: TexCoord1sv (offset 101) */
+ /* _mesa_function_pool[12938]: TexCoord1sv (offset 101) */
"p\0"
"glTexCoord1sv\0"
"\0"
- /* _mesa_function_pool[12845]: WindowPos3dvMESA (will be remapped) */
+ /* _mesa_function_pool[12955]: WindowPos3dvMESA (will be remapped) */
"p\0"
"glWindowPos3dv\0"
"glWindowPos3dvARB\0"
"glWindowPos3dvMESA\0"
"\0"
- /* _mesa_function_pool[12900]: DepthFunc (offset 245) */
+ /* _mesa_function_pool[13010]: DepthFunc (offset 245) */
"i\0"
"glDepthFunc\0"
"\0"
- /* _mesa_function_pool[12915]: PixelMapusv (offset 253) */
+ /* _mesa_function_pool[13025]: PixelMapusv (offset 253) */
"iip\0"
"glPixelMapusv\0"
"\0"
- /* _mesa_function_pool[12934]: GetQueryObjecti64vEXT (will be remapped) */
+ /* _mesa_function_pool[13044]: GetQueryObjecti64vEXT (will be remapped) */
"iip\0"
"glGetQueryObjecti64vEXT\0"
"\0"
- /* _mesa_function_pool[12963]: MultiTexCoord1dARB (offset 376) */
+ /* _mesa_function_pool[13073]: MultiTexCoord1dARB (offset 376) */
"id\0"
"glMultiTexCoord1d\0"
"glMultiTexCoord1dARB\0"
"\0"
- /* _mesa_function_pool[13006]: PointParameterivNV (will be remapped) */
+ /* _mesa_function_pool[13116]: PointParameterivNV (will be remapped) */
"ip\0"
"glPointParameteriv\0"
"glPointParameterivNV\0"
"\0"
- /* _mesa_function_pool[13050]: BlendFunc (offset 241) */
+ /* _mesa_function_pool[13160]: BlendFunc (offset 241) */
"ii\0"
"glBlendFunc\0"
"\0"
- /* _mesa_function_pool[13066]: EndTransformFeedbackEXT (will be remapped) */
+ /* _mesa_function_pool[13176]: EndTransformFeedbackEXT (will be remapped) */
"\0"
"glEndTransformFeedbackEXT\0"
"glEndTransformFeedback\0"
"\0"
- /* _mesa_function_pool[13117]: Uniform2fvARB (will be remapped) */
+ /* _mesa_function_pool[13227]: Uniform2fvARB (will be remapped) */
"iip\0"
"glUniform2fv\0"
"glUniform2fvARB\0"
"\0"
- /* _mesa_function_pool[13151]: BufferParameteriAPPLE (will be remapped) */
+ /* _mesa_function_pool[13261]: BufferParameteriAPPLE (will be remapped) */
"iii\0"
"glBufferParameteriAPPLE\0"
"\0"
- /* _mesa_function_pool[13180]: MultiTexCoord3dvARB (offset 393) */
+ /* _mesa_function_pool[13290]: MultiTexCoord3dvARB (offset 393) */
"ip\0"
"glMultiTexCoord3dv\0"
"glMultiTexCoord3dvARB\0"
"\0"
- /* _mesa_function_pool[13225]: ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[13335]: ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (dynamic) */
"pppp\0"
"glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[13281]: DeleteObjectARB (will be remapped) */
+ /* _mesa_function_pool[13391]: DeleteObjectARB (will be remapped) */
"i\0"
"glDeleteObjectARB\0"
"\0"
- /* _mesa_function_pool[13302]: MatrixIndexPointerARB (dynamic) */
+ /* _mesa_function_pool[13412]: MatrixIndexPointerARB (dynamic) */
"iiip\0"
"glMatrixIndexPointerARB\0"
"\0"
- /* _mesa_function_pool[13332]: ProgramNamedParameter4dvNV (will be remapped) */
+ /* _mesa_function_pool[13442]: ProgramNamedParameter4dvNV (will be remapped) */
"iipp\0"
"glProgramNamedParameter4dvNV\0"
"\0"
- /* _mesa_function_pool[13367]: Tangent3fvEXT (dynamic) */
+ /* _mesa_function_pool[13477]: Tangent3fvEXT (dynamic) */
"p\0"
"glTangent3fvEXT\0"
"\0"
- /* _mesa_function_pool[13386]: Flush (offset 217) */
+ /* _mesa_function_pool[13496]: Flush (offset 217) */
"\0"
"glFlush\0"
"\0"
- /* _mesa_function_pool[13396]: Color4uiv (offset 38) */
+ /* _mesa_function_pool[13506]: Color4uiv (offset 38) */
"p\0"
"glColor4uiv\0"
"\0"
- /* _mesa_function_pool[13411]: GenVertexArrays (will be remapped) */
+ /* _mesa_function_pool[13521]: GenVertexArrays (will be remapped) */
"ip\0"
"glGenVertexArrays\0"
"\0"
- /* _mesa_function_pool[13433]: RasterPos3sv (offset 77) */
+ /* _mesa_function_pool[13543]: RasterPos3sv (offset 77) */
"p\0"
"glRasterPos3sv\0"
"\0"
- /* _mesa_function_pool[13451]: BindFramebufferEXT (will be remapped) */
+ /* _mesa_function_pool[13561]: BindFramebufferEXT (will be remapped) */
"ii\0"
"glBindFramebuffer\0"
"glBindFramebufferEXT\0"
"\0"
- /* _mesa_function_pool[13494]: ReferencePlaneSGIX (dynamic) */
+ /* _mesa_function_pool[13604]: ReferencePlaneSGIX (dynamic) */
"p\0"
"glReferencePlaneSGIX\0"
"\0"
- /* _mesa_function_pool[13518]: PushAttrib (offset 219) */
+ /* _mesa_function_pool[13628]: PushAttrib (offset 219) */
"i\0"
"glPushAttrib\0"
"\0"
- /* _mesa_function_pool[13534]: RasterPos2i (offset 66) */
+ /* _mesa_function_pool[13644]: RasterPos2i (offset 66) */
"ii\0"
"glRasterPos2i\0"
"\0"
- /* _mesa_function_pool[13552]: ValidateProgramARB (will be remapped) */
+ /* _mesa_function_pool[13662]: ValidateProgramARB (will be remapped) */
"i\0"
"glValidateProgram\0"
"glValidateProgramARB\0"
"\0"
- /* _mesa_function_pool[13594]: TexParameteriv (offset 181) */
+ /* _mesa_function_pool[13704]: TexParameteriv (offset 181) */
"iip\0"
"glTexParameteriv\0"
"\0"
- /* _mesa_function_pool[13616]: UnlockArraysEXT (will be remapped) */
+ /* _mesa_function_pool[13726]: UnlockArraysEXT (will be remapped) */
"\0"
"glUnlockArraysEXT\0"
"\0"
- /* _mesa_function_pool[13636]: TexCoord2fColor3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[13746]: TexCoord2fColor3fVertex3fSUN (dynamic) */
"ffffffff\0"
"glTexCoord2fColor3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[13677]: WindowPos3fvMESA (will be remapped) */
+ /* _mesa_function_pool[13787]: WindowPos3fvMESA (will be remapped) */
"p\0"
"glWindowPos3fv\0"
"glWindowPos3fvARB\0"
"glWindowPos3fvMESA\0"
"\0"
- /* _mesa_function_pool[13732]: RasterPos2f (offset 64) */
+ /* _mesa_function_pool[13842]: RasterPos2f (offset 64) */
"ff\0"
"glRasterPos2f\0"
"\0"
- /* _mesa_function_pool[13750]: VertexAttrib1svNV (will be remapped) */
+ /* _mesa_function_pool[13860]: VertexAttrib1svNV (will be remapped) */
"ip\0"
"glVertexAttrib1svNV\0"
"\0"
- /* _mesa_function_pool[13774]: RasterPos2d (offset 62) */
+ /* _mesa_function_pool[13884]: RasterPos2d (offset 62) */
"dd\0"
"glRasterPos2d\0"
"\0"
- /* _mesa_function_pool[13792]: RasterPos3fv (offset 73) */
+ /* _mesa_function_pool[13902]: RasterPos3fv (offset 73) */
"p\0"
"glRasterPos3fv\0"
"\0"
- /* _mesa_function_pool[13810]: CopyTexSubImage3D (offset 373) */
+ /* _mesa_function_pool[13920]: CopyTexSubImage3D (offset 373) */
"iiiiiiiii\0"
"glCopyTexSubImage3D\0"
"glCopyTexSubImage3DEXT\0"
"\0"
- /* _mesa_function_pool[13864]: VertexAttrib2dARB (will be remapped) */
+ /* _mesa_function_pool[13974]: VertexAttrib2dARB (will be remapped) */
"idd\0"
"glVertexAttrib2d\0"
"glVertexAttrib2dARB\0"
"\0"
- /* _mesa_function_pool[13906]: Color4ub (offset 35) */
+ /* _mesa_function_pool[14016]: Color4ub (offset 35) */
"iiii\0"
"glColor4ub\0"
"\0"
- /* _mesa_function_pool[13923]: GetInteger64v (will be remapped) */
+ /* _mesa_function_pool[14033]: GetInteger64v (will be remapped) */
"ip\0"
"glGetInteger64v\0"
"\0"
- /* _mesa_function_pool[13943]: TextureColorMaskSGIS (dynamic) */
+ /* _mesa_function_pool[14053]: TextureColorMaskSGIS (dynamic) */
"iiii\0"
"glTextureColorMaskSGIS\0"
"\0"
- /* _mesa_function_pool[13972]: RasterPos2s (offset 68) */
+ /* _mesa_function_pool[14082]: RasterPos2s (offset 68) */
"ii\0"
"glRasterPos2s\0"
"\0"
- /* _mesa_function_pool[13990]: GetColorTable (offset 343) */
+ /* _mesa_function_pool[14100]: GetColorTable (offset 343) */
"iiip\0"
"glGetColorTable\0"
"glGetColorTableSGI\0"
"glGetColorTableEXT\0"
"\0"
- /* _mesa_function_pool[14050]: SelectBuffer (offset 195) */
+ /* _mesa_function_pool[14160]: SelectBuffer (offset 195) */
"ip\0"
"glSelectBuffer\0"
"\0"
- /* _mesa_function_pool[14069]: Indexiv (offset 49) */
+ /* _mesa_function_pool[14179]: Indexiv (offset 49) */
"p\0"
"glIndexiv\0"
"\0"
- /* _mesa_function_pool[14082]: TexCoord3i (offset 114) */
+ /* _mesa_function_pool[14192]: TexCoord3i (offset 114) */
"iii\0"
"glTexCoord3i\0"
"\0"
- /* _mesa_function_pool[14100]: CopyColorTable (offset 342) */
+ /* _mesa_function_pool[14210]: CopyColorTable (offset 342) */
"iiiii\0"
"glCopyColorTable\0"
"glCopyColorTableSGI\0"
"\0"
- /* _mesa_function_pool[14144]: GetHistogramParameterfv (offset 362) */
+ /* _mesa_function_pool[14254]: GetHistogramParameterfv (offset 362) */
"iip\0"
"glGetHistogramParameterfv\0"
"glGetHistogramParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[14204]: Frustum (offset 289) */
+ /* _mesa_function_pool[14314]: Frustum (offset 289) */
"dddddd\0"
"glFrustum\0"
"\0"
- /* _mesa_function_pool[14222]: GetString (offset 275) */
+ /* _mesa_function_pool[14332]: GetString (offset 275) */
"i\0"
"glGetString\0"
"\0"
- /* _mesa_function_pool[14237]: ColorPointervINTEL (dynamic) */
+ /* _mesa_function_pool[14347]: ColorPointervINTEL (dynamic) */
"iip\0"
"glColorPointervINTEL\0"
"\0"
- /* _mesa_function_pool[14263]: TexEnvf (offset 184) */
+ /* _mesa_function_pool[14373]: TexEnvf (offset 184) */
"iif\0"
"glTexEnvf\0"
"\0"
- /* _mesa_function_pool[14278]: TexCoord3d (offset 110) */
+ /* _mesa_function_pool[14388]: TexCoord3d (offset 110) */
"ddd\0"
"glTexCoord3d\0"
"\0"
- /* _mesa_function_pool[14296]: AlphaFragmentOp1ATI (will be remapped) */
+ /* _mesa_function_pool[14406]: AlphaFragmentOp1ATI (will be remapped) */
"iiiiii\0"
"glAlphaFragmentOp1ATI\0"
"\0"
- /* _mesa_function_pool[14326]: TexCoord3f (offset 112) */
+ /* _mesa_function_pool[14436]: TexCoord3f (offset 112) */
"fff\0"
"glTexCoord3f\0"
"\0"
- /* _mesa_function_pool[14344]: MultiTexCoord3ivARB (offset 397) */
+ /* _mesa_function_pool[14454]: MultiTexCoord3ivARB (offset 397) */
"ip\0"
"glMultiTexCoord3iv\0"
"glMultiTexCoord3ivARB\0"
"\0"
- /* _mesa_function_pool[14389]: MultiTexCoord2sARB (offset 390) */
+ /* _mesa_function_pool[14499]: MultiTexCoord2sARB (offset 390) */
"iii\0"
"glMultiTexCoord2s\0"
"glMultiTexCoord2sARB\0"
"\0"
- /* _mesa_function_pool[14433]: VertexAttrib1dvARB (will be remapped) */
+ /* _mesa_function_pool[14543]: VertexAttrib1dvARB (will be remapped) */
"ip\0"
"glVertexAttrib1dv\0"
"glVertexAttrib1dvARB\0"
"\0"
- /* _mesa_function_pool[14476]: DeleteTextures (offset 327) */
+ /* _mesa_function_pool[14586]: DeleteTextures (offset 327) */
"ip\0"
"glDeleteTextures\0"
"glDeleteTexturesEXT\0"
"\0"
- /* _mesa_function_pool[14517]: TexCoordPointerEXT (will be remapped) */
+ /* _mesa_function_pool[14627]: TexCoordPointerEXT (will be remapped) */
"iiiip\0"
"glTexCoordPointerEXT\0"
"\0"
- /* _mesa_function_pool[14545]: TexSubImage4DSGIS (dynamic) */
+ /* _mesa_function_pool[14655]: TexSubImage4DSGIS (dynamic) */
"iiiiiiiiiiiip\0"
"glTexSubImage4DSGIS\0"
"\0"
- /* _mesa_function_pool[14580]: TexCoord3s (offset 116) */
+ /* _mesa_function_pool[14690]: TexCoord3s (offset 116) */
"iii\0"
"glTexCoord3s\0"
"\0"
- /* _mesa_function_pool[14598]: GetTexLevelParameteriv (offset 285) */
+ /* _mesa_function_pool[14708]: GetTexLevelParameteriv (offset 285) */
"iiip\0"
"glGetTexLevelParameteriv\0"
"\0"
- /* _mesa_function_pool[14629]: DrawArraysInstanced (will be remapped) */
+ /* _mesa_function_pool[14739]: DrawArraysInstanced (will be remapped) */
"iiii\0"
"glDrawArraysInstanced\0"
"glDrawArraysInstancedARB\0"
"glDrawArraysInstancedEXT\0"
"\0"
- /* _mesa_function_pool[14707]: CombinerStageParameterfvNV (dynamic) */
+ /* _mesa_function_pool[14817]: CombinerStageParameterfvNV (dynamic) */
"iip\0"
"glCombinerStageParameterfvNV\0"
"\0"
- /* _mesa_function_pool[14741]: StopInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[14851]: StopInstrumentsSGIX (dynamic) */
"i\0"
"glStopInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[14766]: TexCoord4fColor4fNormal3fVertex4fSUN (dynamic) */
+ /* _mesa_function_pool[14876]: TexCoord4fColor4fNormal3fVertex4fSUN (dynamic) */
"fffffffffffffff\0"
"glTexCoord4fColor4fNormal3fVertex4fSUN\0"
"\0"
- /* _mesa_function_pool[14822]: ClearAccum (offset 204) */
+ /* _mesa_function_pool[14932]: ClearAccum (offset 204) */
"ffff\0"
"glClearAccum\0"
"\0"
- /* _mesa_function_pool[14841]: DeformSGIX (dynamic) */
+ /* _mesa_function_pool[14951]: DeformSGIX (dynamic) */
"i\0"
"glDeformSGIX\0"
"\0"
- /* _mesa_function_pool[14857]: GetVertexAttribfvARB (will be remapped) */
+ /* _mesa_function_pool[14967]: GetVertexAttribfvARB (will be remapped) */
"iip\0"
"glGetVertexAttribfv\0"
"glGetVertexAttribfvARB\0"
"\0"
- /* _mesa_function_pool[14905]: SecondaryColor3ivEXT (will be remapped) */
+ /* _mesa_function_pool[15015]: SecondaryColor3ivEXT (will be remapped) */
"p\0"
"glSecondaryColor3iv\0"
"glSecondaryColor3ivEXT\0"
"\0"
- /* _mesa_function_pool[14951]: TexCoord4iv (offset 123) */
+ /* _mesa_function_pool[15061]: TexCoord4iv (offset 123) */
"p\0"
"glTexCoord4iv\0"
"\0"
- /* _mesa_function_pool[14968]: UniformMatrix4x2fv (will be remapped) */
+ /* _mesa_function_pool[15078]: UniformMatrix4x2fv (will be remapped) */
"iiip\0"
"glUniformMatrix4x2fv\0"
"\0"
- /* _mesa_function_pool[14995]: GetDetailTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[15105]: GetDetailTexFuncSGIS (dynamic) */
"ip\0"
"glGetDetailTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[15022]: GetCombinerStageParameterfvNV (dynamic) */
+ /* _mesa_function_pool[15132]: GetCombinerStageParameterfvNV (dynamic) */
"iip\0"
"glGetCombinerStageParameterfvNV\0"
"\0"
- /* _mesa_function_pool[15059]: PolygonOffset (offset 319) */
+ /* _mesa_function_pool[15169]: PolygonOffset (offset 319) */
"ff\0"
"glPolygonOffset\0"
"\0"
- /* _mesa_function_pool[15079]: BindVertexArray (will be remapped) */
+ /* _mesa_function_pool[15189]: BindVertexArray (will be remapped) */
"i\0"
"glBindVertexArray\0"
"\0"
- /* _mesa_function_pool[15100]: Color4ubVertex2fvSUN (dynamic) */
+ /* _mesa_function_pool[15210]: Color4ubVertex2fvSUN (dynamic) */
"pp\0"
"glColor4ubVertex2fvSUN\0"
"\0"
- /* _mesa_function_pool[15127]: Rectd (offset 86) */
+ /* _mesa_function_pool[15237]: Rectd (offset 86) */
"dddd\0"
"glRectd\0"
"\0"
- /* _mesa_function_pool[15141]: TexFilterFuncSGIS (dynamic) */
+ /* _mesa_function_pool[15251]: TexFilterFuncSGIS (dynamic) */
"iiip\0"
"glTexFilterFuncSGIS\0"
"\0"
- /* _mesa_function_pool[15167]: SampleMaskSGIS (will be remapped) */
+ /* _mesa_function_pool[15277]: SampleMaskSGIS (will be remapped) */
"fi\0"
"glSampleMaskSGIS\0"
"glSampleMaskEXT\0"
"\0"
- /* _mesa_function_pool[15204]: GetAttribLocationARB (will be remapped) */
+ /* _mesa_function_pool[15314]: GetAttribLocationARB (will be remapped) */
"ip\0"
"glGetAttribLocation\0"
"glGetAttribLocationARB\0"
"\0"
- /* _mesa_function_pool[15251]: RasterPos3i (offset 74) */
+ /* _mesa_function_pool[15361]: RasterPos3i (offset 74) */
"iii\0"
"glRasterPos3i\0"
"\0"
- /* _mesa_function_pool[15270]: VertexAttrib4ubvARB (will be remapped) */
+ /* _mesa_function_pool[15380]: VertexAttrib4ubvARB (will be remapped) */
"ip\0"
"glVertexAttrib4ubv\0"
"glVertexAttrib4ubvARB\0"
"\0"
- /* _mesa_function_pool[15315]: DetailTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[15425]: DetailTexFuncSGIS (dynamic) */
"iip\0"
"glDetailTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[15340]: Normal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[15450]: Normal3fVertex3fSUN (dynamic) */
"ffffff\0"
"glNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[15370]: CopyTexImage2D (offset 324) */
+ /* _mesa_function_pool[15480]: CopyTexImage2D (offset 324) */
"iiiiiiii\0"
"glCopyTexImage2D\0"
"glCopyTexImage2DEXT\0"
"\0"
- /* _mesa_function_pool[15417]: GetBufferPointervARB (will be remapped) */
+ /* _mesa_function_pool[15527]: GetBufferPointervARB (will be remapped) */
"iip\0"
"glGetBufferPointerv\0"
"glGetBufferPointervARB\0"
"\0"
- /* _mesa_function_pool[15465]: ProgramEnvParameter4fARB (will be remapped) */
+ /* _mesa_function_pool[15575]: ProgramEnvParameter4fARB (will be remapped) */
"iiffff\0"
"glProgramEnvParameter4fARB\0"
"glProgramParameter4fNV\0"
"\0"
- /* _mesa_function_pool[15523]: Uniform3ivARB (will be remapped) */
+ /* _mesa_function_pool[15633]: Uniform3ivARB (will be remapped) */
"iip\0"
"glUniform3iv\0"
"glUniform3ivARB\0"
"\0"
- /* _mesa_function_pool[15557]: Lightfv (offset 160) */
+ /* _mesa_function_pool[15667]: Lightfv (offset 160) */
"iip\0"
"glLightfv\0"
"\0"
- /* _mesa_function_pool[15572]: ClearDepth (offset 208) */
+ /* _mesa_function_pool[15682]: PrimitiveRestartIndexNV (will be remapped) */
+ "i\0"
+ "glPrimitiveRestartIndexNV\0"
+ "\0"
+ /* _mesa_function_pool[15711]: ClearDepth (offset 208) */
"d\0"
"glClearDepth\0"
"\0"
- /* _mesa_function_pool[15588]: GetFenceivNV (will be remapped) */
+ /* _mesa_function_pool[15727]: GetFenceivNV (will be remapped) */
"iip\0"
"glGetFenceivNV\0"
"\0"
- /* _mesa_function_pool[15608]: WindowPos4dvMESA (will be remapped) */
+ /* _mesa_function_pool[15747]: WindowPos4dvMESA (will be remapped) */
"p\0"
"glWindowPos4dvMESA\0"
"\0"
- /* _mesa_function_pool[15630]: ColorSubTable (offset 346) */
+ /* _mesa_function_pool[15769]: ColorSubTable (offset 346) */
"iiiiip\0"
"glColorSubTable\0"
"glColorSubTableEXT\0"
"\0"
- /* _mesa_function_pool[15673]: Color4fv (offset 30) */
+ /* _mesa_function_pool[15812]: Color4fv (offset 30) */
"p\0"
"glColor4fv\0"
"\0"
- /* _mesa_function_pool[15687]: MultiTexCoord4ivARB (offset 405) */
+ /* _mesa_function_pool[15826]: MultiTexCoord4ivARB (offset 405) */
"ip\0"
"glMultiTexCoord4iv\0"
"glMultiTexCoord4ivARB\0"
"\0"
- /* _mesa_function_pool[15732]: DrawElementsInstanced (will be remapped) */
+ /* _mesa_function_pool[15871]: DrawElementsInstanced (will be remapped) */
"iiipi\0"
"glDrawElementsInstanced\0"
"glDrawElementsInstancedARB\0"
"glDrawElementsInstancedEXT\0"
"\0"
- /* _mesa_function_pool[15817]: ColorPointer (offset 308) */
+ /* _mesa_function_pool[15956]: ColorPointer (offset 308) */
"iiip\0"
"glColorPointer\0"
"\0"
- /* _mesa_function_pool[15838]: Rects (offset 92) */
+ /* _mesa_function_pool[15977]: Rects (offset 92) */
"iiii\0"
"glRects\0"
"\0"
- /* _mesa_function_pool[15852]: GetMapAttribParameterfvNV (dynamic) */
+ /* _mesa_function_pool[15991]: GetMapAttribParameterfvNV (dynamic) */
"iiip\0"
"glGetMapAttribParameterfvNV\0"
"\0"
- /* _mesa_function_pool[15886]: Lightiv (offset 162) */
+ /* _mesa_function_pool[16025]: CreateShaderProgramEXT (will be remapped) */
+ "ip\0"
+ "glCreateShaderProgramEXT\0"
+ "\0"
+ /* _mesa_function_pool[16054]: ActiveProgramEXT (will be remapped) */
+ "i\0"
+ "glActiveProgramEXT\0"
+ "\0"
+ /* _mesa_function_pool[16076]: Lightiv (offset 162) */
"iip\0"
"glLightiv\0"
"\0"
- /* _mesa_function_pool[15901]: VertexAttrib4sARB (will be remapped) */
+ /* _mesa_function_pool[16091]: VertexAttrib4sARB (will be remapped) */
"iiiii\0"
"glVertexAttrib4s\0"
"glVertexAttrib4sARB\0"
"\0"
- /* _mesa_function_pool[15945]: GetQueryObjectuivARB (will be remapped) */
+ /* _mesa_function_pool[16135]: GetQueryObjectuivARB (will be remapped) */
"iip\0"
"glGetQueryObjectuiv\0"
"glGetQueryObjectuivARB\0"
"\0"
- /* _mesa_function_pool[15993]: GetTexParameteriv (offset 283) */
+ /* _mesa_function_pool[16183]: GetTexParameteriv (offset 283) */
"iip\0"
"glGetTexParameteriv\0"
"\0"
- /* _mesa_function_pool[16018]: MapParameterivNV (dynamic) */
+ /* _mesa_function_pool[16208]: MapParameterivNV (dynamic) */
"iip\0"
"glMapParameterivNV\0"
"\0"
- /* _mesa_function_pool[16042]: GenRenderbuffersEXT (will be remapped) */
+ /* _mesa_function_pool[16232]: GenRenderbuffersEXT (will be remapped) */
"ip\0"
"glGenRenderbuffers\0"
"glGenRenderbuffersEXT\0"
"\0"
- /* _mesa_function_pool[16087]: VertexAttrib2dvARB (will be remapped) */
+ /* _mesa_function_pool[16277]: VertexAttrib2dvARB (will be remapped) */
"ip\0"
"glVertexAttrib2dv\0"
"glVertexAttrib2dvARB\0"
"\0"
- /* _mesa_function_pool[16130]: EdgeFlagPointerEXT (will be remapped) */
+ /* _mesa_function_pool[16320]: EdgeFlagPointerEXT (will be remapped) */
"iip\0"
"glEdgeFlagPointerEXT\0"
"\0"
- /* _mesa_function_pool[16156]: VertexAttribs2svNV (will be remapped) */
+ /* _mesa_function_pool[16346]: VertexAttribs2svNV (will be remapped) */
"iip\0"
"glVertexAttribs2svNV\0"
"\0"
- /* _mesa_function_pool[16182]: WeightbvARB (dynamic) */
+ /* _mesa_function_pool[16372]: WeightbvARB (dynamic) */
"ip\0"
"glWeightbvARB\0"
"\0"
- /* _mesa_function_pool[16200]: VertexAttrib2fvARB (will be remapped) */
+ /* _mesa_function_pool[16390]: VertexAttrib2fvARB (will be remapped) */
"ip\0"
"glVertexAttrib2fv\0"
"glVertexAttrib2fvARB\0"
"\0"
- /* _mesa_function_pool[16243]: GetBufferParameterivARB (will be remapped) */
+ /* _mesa_function_pool[16433]: GetBufferParameterivARB (will be remapped) */
"iip\0"
"glGetBufferParameteriv\0"
"glGetBufferParameterivARB\0"
"\0"
- /* _mesa_function_pool[16297]: Rectdv (offset 87) */
+ /* _mesa_function_pool[16487]: Rectdv (offset 87) */
"pp\0"
"glRectdv\0"
"\0"
- /* _mesa_function_pool[16310]: ListParameteriSGIX (dynamic) */
+ /* _mesa_function_pool[16500]: ListParameteriSGIX (dynamic) */
"iii\0"
"glListParameteriSGIX\0"
"\0"
- /* _mesa_function_pool[16336]: ReplacementCodeuiColor4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[16526]: ReplacementCodeuiColor4fNormal3fVertex3fSUN (dynamic) */
"iffffffffff\0"
"glReplacementCodeuiColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[16395]: InstrumentsBufferSGIX (dynamic) */
+ /* _mesa_function_pool[16585]: InstrumentsBufferSGIX (dynamic) */
"ip\0"
"glInstrumentsBufferSGIX\0"
"\0"
- /* _mesa_function_pool[16423]: VertexAttrib4NivARB (will be remapped) */
+ /* _mesa_function_pool[16613]: VertexAttrib4NivARB (will be remapped) */
"ip\0"
"glVertexAttrib4Niv\0"
"glVertexAttrib4NivARB\0"
"\0"
- /* _mesa_function_pool[16468]: GetAttachedShaders (will be remapped) */
+ /* _mesa_function_pool[16658]: GetAttachedShaders (will be remapped) */
"iipp\0"
"glGetAttachedShaders\0"
"\0"
- /* _mesa_function_pool[16495]: GenVertexArraysAPPLE (will be remapped) */
+ /* _mesa_function_pool[16685]: GenVertexArraysAPPLE (will be remapped) */
"ip\0"
"glGenVertexArraysAPPLE\0"
"\0"
- /* _mesa_function_pool[16522]: Materialiv (offset 172) */
+ /* _mesa_function_pool[16712]: Materialiv (offset 172) */
"iip\0"
"glMaterialiv\0"
"\0"
- /* _mesa_function_pool[16540]: PushClientAttrib (offset 335) */
+ /* _mesa_function_pool[16730]: PushClientAttrib (offset 335) */
"i\0"
"glPushClientAttrib\0"
"\0"
- /* _mesa_function_pool[16562]: ProgramEnvParameters4fvEXT (will be remapped) */
+ /* _mesa_function_pool[16752]: ProgramEnvParameters4fvEXT (will be remapped) */
"iiip\0"
"glProgramEnvParameters4fvEXT\0"
"\0"
- /* _mesa_function_pool[16597]: TexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[16787]: TexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
"pppp\0"
"glTexCoord2fColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[16643]: WindowPos2iMESA (will be remapped) */
+ /* _mesa_function_pool[16833]: WindowPos2iMESA (will be remapped) */
"ii\0"
"glWindowPos2i\0"
"glWindowPos2iARB\0"
"glWindowPos2iMESA\0"
"\0"
- /* _mesa_function_pool[16696]: SecondaryColor3fvEXT (will be remapped) */
+ /* _mesa_function_pool[16886]: SecondaryColor3fvEXT (will be remapped) */
"p\0"
"glSecondaryColor3fv\0"
"glSecondaryColor3fvEXT\0"
"\0"
- /* _mesa_function_pool[16742]: PolygonMode (offset 174) */
+ /* _mesa_function_pool[16932]: PolygonMode (offset 174) */
"ii\0"
"glPolygonMode\0"
"\0"
- /* _mesa_function_pool[16760]: CompressedTexSubImage1DARB (will be remapped) */
+ /* _mesa_function_pool[16950]: CompressedTexSubImage1DARB (will be remapped) */
"iiiiiip\0"
"glCompressedTexSubImage1D\0"
"glCompressedTexSubImage1DARB\0"
"\0"
- /* _mesa_function_pool[16824]: GetVertexAttribivNV (will be remapped) */
+ /* _mesa_function_pool[17014]: GetVertexAttribivNV (will be remapped) */
"iip\0"
"glGetVertexAttribivNV\0"
"\0"
- /* _mesa_function_pool[16851]: GetProgramStringARB (will be remapped) */
+ /* _mesa_function_pool[17041]: GetProgramStringARB (will be remapped) */
"iip\0"
"glGetProgramStringARB\0"
"\0"
- /* _mesa_function_pool[16878]: TexBumpParameterfvATI (will be remapped) */
+ /* _mesa_function_pool[17068]: TexBumpParameterfvATI (will be remapped) */
"ip\0"
"glTexBumpParameterfvATI\0"
"\0"
- /* _mesa_function_pool[16906]: CompileShaderARB (will be remapped) */
+ /* _mesa_function_pool[17096]: CompileShaderARB (will be remapped) */
"i\0"
"glCompileShader\0"
"glCompileShaderARB\0"
"\0"
- /* _mesa_function_pool[16944]: DeleteShader (will be remapped) */
+ /* _mesa_function_pool[17134]: DeleteShader (will be remapped) */
"i\0"
"glDeleteShader\0"
"\0"
- /* _mesa_function_pool[16962]: DisableClientState (offset 309) */
+ /* _mesa_function_pool[17152]: DisableClientState (offset 309) */
"i\0"
"glDisableClientState\0"
"\0"
- /* _mesa_function_pool[16986]: TexGeni (offset 192) */
+ /* _mesa_function_pool[17176]: TexGeni (offset 192) */
"iii\0"
"glTexGeni\0"
"\0"
- /* _mesa_function_pool[17001]: TexGenf (offset 190) */
+ /* _mesa_function_pool[17191]: TexGenf (offset 190) */
"iif\0"
"glTexGenf\0"
"\0"
- /* _mesa_function_pool[17016]: Uniform3fARB (will be remapped) */
+ /* _mesa_function_pool[17206]: Uniform3fARB (will be remapped) */
"ifff\0"
"glUniform3f\0"
"glUniform3fARB\0"
"\0"
- /* _mesa_function_pool[17049]: TexGend (offset 188) */
+ /* _mesa_function_pool[17239]: TexGend (offset 188) */
"iid\0"
"glTexGend\0"
"\0"
- /* _mesa_function_pool[17064]: ListParameterfvSGIX (dynamic) */
+ /* _mesa_function_pool[17254]: ListParameterfvSGIX (dynamic) */
"iip\0"
"glListParameterfvSGIX\0"
"\0"
- /* _mesa_function_pool[17091]: GetPolygonStipple (offset 274) */
+ /* _mesa_function_pool[17281]: GetPolygonStipple (offset 274) */
"p\0"
"glGetPolygonStipple\0"
"\0"
- /* _mesa_function_pool[17114]: Tangent3dvEXT (dynamic) */
+ /* _mesa_function_pool[17304]: Tangent3dvEXT (dynamic) */
"p\0"
"glTangent3dvEXT\0"
"\0"
- /* _mesa_function_pool[17133]: BindBufferOffsetEXT (will be remapped) */
+ /* _mesa_function_pool[17323]: BindBufferOffsetEXT (will be remapped) */
"iiii\0"
"glBindBufferOffsetEXT\0"
"\0"
- /* _mesa_function_pool[17161]: WindowPos3sMESA (will be remapped) */
+ /* _mesa_function_pool[17351]: WindowPos3sMESA (will be remapped) */
"iii\0"
"glWindowPos3s\0"
"glWindowPos3sARB\0"
"glWindowPos3sMESA\0"
"\0"
- /* _mesa_function_pool[17215]: VertexAttrib2svNV (will be remapped) */
+ /* _mesa_function_pool[17405]: VertexAttrib2svNV (will be remapped) */
"ip\0"
"glVertexAttrib2svNV\0"
"\0"
- /* _mesa_function_pool[17239]: DisableIndexedEXT (will be remapped) */
+ /* _mesa_function_pool[17429]: DisableIndexedEXT (will be remapped) */
"ii\0"
"glDisableIndexedEXT\0"
"\0"
- /* _mesa_function_pool[17263]: BindBufferBaseEXT (will be remapped) */
+ /* _mesa_function_pool[17453]: BindBufferBaseEXT (will be remapped) */
"iii\0"
"glBindBufferBaseEXT\0"
"glBindBufferBase\0"
"\0"
- /* _mesa_function_pool[17305]: TexCoord2fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[17495]: TexCoord2fVertex3fvSUN (dynamic) */
"pp\0"
"glTexCoord2fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[17334]: WindowPos4sMESA (will be remapped) */
+ /* _mesa_function_pool[17524]: WindowPos4sMESA (will be remapped) */
"iiii\0"
"glWindowPos4sMESA\0"
"\0"
- /* _mesa_function_pool[17358]: VertexAttrib4NuivARB (will be remapped) */
+ /* _mesa_function_pool[17548]: VertexAttrib4NuivARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nuiv\0"
"glVertexAttrib4NuivARB\0"
"\0"
- /* _mesa_function_pool[17405]: ClientActiveTextureARB (offset 375) */
+ /* _mesa_function_pool[17595]: ClientActiveTextureARB (offset 375) */
"i\0"
"glClientActiveTexture\0"
"glClientActiveTextureARB\0"
"\0"
- /* _mesa_function_pool[17455]: PixelTexGenSGIX (will be remapped) */
+ /* _mesa_function_pool[17645]: PixelTexGenSGIX (will be remapped) */
"i\0"
"glPixelTexGenSGIX\0"
"\0"
- /* _mesa_function_pool[17476]: ReplacementCodeusvSUN (dynamic) */
+ /* _mesa_function_pool[17666]: ReplacementCodeusvSUN (dynamic) */
"p\0"
"glReplacementCodeusvSUN\0"
"\0"
- /* _mesa_function_pool[17503]: Uniform4fARB (will be remapped) */
+ /* _mesa_function_pool[17693]: Uniform4fARB (will be remapped) */
"iffff\0"
"glUniform4f\0"
"glUniform4fARB\0"
"\0"
- /* _mesa_function_pool[17537]: Color4sv (offset 34) */
+ /* _mesa_function_pool[17727]: Color4sv (offset 34) */
"p\0"
"glColor4sv\0"
"\0"
- /* _mesa_function_pool[17551]: FlushMappedBufferRange (will be remapped) */
+ /* _mesa_function_pool[17741]: FlushMappedBufferRange (will be remapped) */
"iii\0"
"glFlushMappedBufferRange\0"
"\0"
- /* _mesa_function_pool[17581]: IsProgramNV (will be remapped) */
+ /* _mesa_function_pool[17771]: IsProgramNV (will be remapped) */
"i\0"
"glIsProgramARB\0"
"glIsProgramNV\0"
"\0"
- /* _mesa_function_pool[17613]: FlushMappedBufferRangeAPPLE (will be remapped) */
+ /* _mesa_function_pool[17803]: FlushMappedBufferRangeAPPLE (will be remapped) */
"iii\0"
"glFlushMappedBufferRangeAPPLE\0"
"\0"
- /* _mesa_function_pool[17648]: PixelZoom (offset 246) */
+ /* _mesa_function_pool[17838]: PixelZoom (offset 246) */
"ff\0"
"glPixelZoom\0"
"\0"
- /* _mesa_function_pool[17664]: ReplacementCodePointerSUN (dynamic) */
+ /* _mesa_function_pool[17854]: ReplacementCodePointerSUN (dynamic) */
"iip\0"
"glReplacementCodePointerSUN\0"
"\0"
- /* _mesa_function_pool[17697]: ProgramEnvParameter4dARB (will be remapped) */
+ /* _mesa_function_pool[17887]: ProgramEnvParameter4dARB (will be remapped) */
"iidddd\0"
"glProgramEnvParameter4dARB\0"
"glProgramParameter4dNV\0"
"\0"
- /* _mesa_function_pool[17755]: ColorTableParameterfv (offset 340) */
+ /* _mesa_function_pool[17945]: ColorTableParameterfv (offset 340) */
"iip\0"
"glColorTableParameterfv\0"
"glColorTableParameterfvSGI\0"
"\0"
- /* _mesa_function_pool[17811]: FragmentLightModelfSGIX (dynamic) */
+ /* _mesa_function_pool[18001]: FragmentLightModelfSGIX (dynamic) */
"if\0"
"glFragmentLightModelfSGIX\0"
"\0"
- /* _mesa_function_pool[17841]: Binormal3bvEXT (dynamic) */
+ /* _mesa_function_pool[18031]: Binormal3bvEXT (dynamic) */
"p\0"
"glBinormal3bvEXT\0"
"\0"
- /* _mesa_function_pool[17861]: PixelMapuiv (offset 252) */
+ /* _mesa_function_pool[18051]: PixelMapuiv (offset 252) */
"iip\0"
"glPixelMapuiv\0"
"\0"
- /* _mesa_function_pool[17880]: Color3dv (offset 12) */
+ /* _mesa_function_pool[18070]: Color3dv (offset 12) */
"p\0"
"glColor3dv\0"
"\0"
- /* _mesa_function_pool[17894]: IsTexture (offset 330) */
+ /* _mesa_function_pool[18084]: IsTexture (offset 330) */
"i\0"
"glIsTexture\0"
"glIsTextureEXT\0"
"\0"
- /* _mesa_function_pool[17924]: VertexWeightfvEXT (dynamic) */
+ /* _mesa_function_pool[18114]: VertexWeightfvEXT (dynamic) */
"p\0"
"glVertexWeightfvEXT\0"
"\0"
- /* _mesa_function_pool[17947]: VertexAttrib1dARB (will be remapped) */
+ /* _mesa_function_pool[18137]: VertexAttrib1dARB (will be remapped) */
"id\0"
"glVertexAttrib1d\0"
"glVertexAttrib1dARB\0"
"\0"
- /* _mesa_function_pool[17988]: ImageTransformParameterivHP (dynamic) */
+ /* _mesa_function_pool[18178]: ImageTransformParameterivHP (dynamic) */
"iip\0"
"glImageTransformParameterivHP\0"
"\0"
- /* _mesa_function_pool[18023]: TexCoord4i (offset 122) */
+ /* _mesa_function_pool[18213]: TexCoord4i (offset 122) */
"iiii\0"
"glTexCoord4i\0"
"\0"
- /* _mesa_function_pool[18042]: DeleteQueriesARB (will be remapped) */
+ /* _mesa_function_pool[18232]: DeleteQueriesARB (will be remapped) */
"ip\0"
"glDeleteQueries\0"
"glDeleteQueriesARB\0"
"\0"
- /* _mesa_function_pool[18081]: Color4ubVertex2fSUN (dynamic) */
+ /* _mesa_function_pool[18271]: Color4ubVertex2fSUN (dynamic) */
"iiiiff\0"
"glColor4ubVertex2fSUN\0"
"\0"
- /* _mesa_function_pool[18111]: FragmentColorMaterialSGIX (dynamic) */
+ /* _mesa_function_pool[18301]: FragmentColorMaterialSGIX (dynamic) */
"ii\0"
"glFragmentColorMaterialSGIX\0"
"\0"
- /* _mesa_function_pool[18143]: CurrentPaletteMatrixARB (dynamic) */
+ /* _mesa_function_pool[18333]: CurrentPaletteMatrixARB (dynamic) */
"i\0"
"glCurrentPaletteMatrixARB\0"
"\0"
- /* _mesa_function_pool[18172]: GetMapdv (offset 266) */
+ /* _mesa_function_pool[18362]: GetMapdv (offset 266) */
"iip\0"
"glGetMapdv\0"
"\0"
- /* _mesa_function_pool[18188]: ObjectPurgeableAPPLE (will be remapped) */
+ /* _mesa_function_pool[18378]: ObjectPurgeableAPPLE (will be remapped) */
"iii\0"
"glObjectPurgeableAPPLE\0"
"\0"
- /* _mesa_function_pool[18216]: SamplePatternSGIS (will be remapped) */
+ /* _mesa_function_pool[18406]: SamplePatternSGIS (will be remapped) */
"i\0"
"glSamplePatternSGIS\0"
"glSamplePatternEXT\0"
"\0"
- /* _mesa_function_pool[18258]: PixelStoref (offset 249) */
+ /* _mesa_function_pool[18448]: PixelStoref (offset 249) */
"if\0"
"glPixelStoref\0"
"\0"
- /* _mesa_function_pool[18276]: IsQueryARB (will be remapped) */
+ /* _mesa_function_pool[18466]: IsQueryARB (will be remapped) */
"i\0"
"glIsQuery\0"
"glIsQueryARB\0"
"\0"
- /* _mesa_function_pool[18302]: ReplacementCodeuiColor4ubVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[18492]: ReplacementCodeuiColor4ubVertex3fSUN (dynamic) */
"iiiiifff\0"
"glReplacementCodeuiColor4ubVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[18351]: PixelStorei (offset 250) */
+ /* _mesa_function_pool[18541]: PixelStorei (offset 250) */
"ii\0"
"glPixelStorei\0"
"\0"
- /* _mesa_function_pool[18369]: VertexAttrib4usvARB (will be remapped) */
+ /* _mesa_function_pool[18559]: VertexAttrib4usvARB (will be remapped) */
"ip\0"
"glVertexAttrib4usv\0"
"glVertexAttrib4usvARB\0"
"\0"
- /* _mesa_function_pool[18414]: LinkProgramARB (will be remapped) */
+ /* _mesa_function_pool[18604]: LinkProgramARB (will be remapped) */
"i\0"
"glLinkProgram\0"
"glLinkProgramARB\0"
"\0"
- /* _mesa_function_pool[18448]: VertexAttrib2fNV (will be remapped) */
+ /* _mesa_function_pool[18638]: VertexAttrib2fNV (will be remapped) */
"iff\0"
"glVertexAttrib2fNV\0"
"\0"
- /* _mesa_function_pool[18472]: ShaderSourceARB (will be remapped) */
+ /* _mesa_function_pool[18662]: ShaderSourceARB (will be remapped) */
"iipp\0"
"glShaderSource\0"
"glShaderSourceARB\0"
"\0"
- /* _mesa_function_pool[18511]: FragmentMaterialiSGIX (dynamic) */
+ /* _mesa_function_pool[18701]: FragmentMaterialiSGIX (dynamic) */
"iii\0"
"glFragmentMaterialiSGIX\0"
"\0"
- /* _mesa_function_pool[18540]: EvalCoord2dv (offset 233) */
+ /* _mesa_function_pool[18730]: EvalCoord2dv (offset 233) */
"p\0"
"glEvalCoord2dv\0"
"\0"
- /* _mesa_function_pool[18558]: VertexAttrib3svARB (will be remapped) */
+ /* _mesa_function_pool[18748]: VertexAttrib3svARB (will be remapped) */
"ip\0"
"glVertexAttrib3sv\0"
"glVertexAttrib3svARB\0"
"\0"
- /* _mesa_function_pool[18601]: ColorMaterial (offset 151) */
+ /* _mesa_function_pool[18791]: ColorMaterial (offset 151) */
"ii\0"
"glColorMaterial\0"
"\0"
- /* _mesa_function_pool[18621]: CompressedTexSubImage3DARB (will be remapped) */
+ /* _mesa_function_pool[18811]: CompressedTexSubImage3DARB (will be remapped) */
"iiiiiiiiiip\0"
"glCompressedTexSubImage3D\0"
"glCompressedTexSubImage3DARB\0"
"\0"
- /* _mesa_function_pool[18689]: WindowPos2ivMESA (will be remapped) */
+ /* _mesa_function_pool[18879]: WindowPos2ivMESA (will be remapped) */
"p\0"
"glWindowPos2iv\0"
"glWindowPos2ivARB\0"
"glWindowPos2ivMESA\0"
"\0"
- /* _mesa_function_pool[18744]: IsFramebufferEXT (will be remapped) */
+ /* _mesa_function_pool[18934]: IsFramebufferEXT (will be remapped) */
"i\0"
"glIsFramebuffer\0"
"glIsFramebufferEXT\0"
"\0"
- /* _mesa_function_pool[18782]: Uniform4ivARB (will be remapped) */
+ /* _mesa_function_pool[18972]: Uniform4ivARB (will be remapped) */
"iip\0"
"glUniform4iv\0"
"glUniform4ivARB\0"
"\0"
- /* _mesa_function_pool[18816]: GetVertexAttribdvARB (will be remapped) */
+ /* _mesa_function_pool[19006]: GetVertexAttribdvARB (will be remapped) */
"iip\0"
"glGetVertexAttribdv\0"
"glGetVertexAttribdvARB\0"
"\0"
- /* _mesa_function_pool[18864]: TexBumpParameterivATI (will be remapped) */
+ /* _mesa_function_pool[19054]: TexBumpParameterivATI (will be remapped) */
"ip\0"
"glTexBumpParameterivATI\0"
"\0"
- /* _mesa_function_pool[18892]: GetSeparableFilter (offset 359) */
+ /* _mesa_function_pool[19082]: GetSeparableFilter (offset 359) */
"iiippp\0"
"glGetSeparableFilter\0"
"glGetSeparableFilterEXT\0"
"\0"
- /* _mesa_function_pool[18945]: Binormal3dEXT (dynamic) */
+ /* _mesa_function_pool[19135]: Binormal3dEXT (dynamic) */
"ddd\0"
"glBinormal3dEXT\0"
"\0"
- /* _mesa_function_pool[18966]: SpriteParameteriSGIX (dynamic) */
+ /* _mesa_function_pool[19156]: SpriteParameteriSGIX (dynamic) */
"ii\0"
"glSpriteParameteriSGIX\0"
"\0"
- /* _mesa_function_pool[18993]: RequestResidentProgramsNV (will be remapped) */
+ /* _mesa_function_pool[19183]: RequestResidentProgramsNV (will be remapped) */
"ip\0"
"glRequestResidentProgramsNV\0"
"\0"
- /* _mesa_function_pool[19025]: TagSampleBufferSGIX (dynamic) */
+ /* _mesa_function_pool[19215]: TagSampleBufferSGIX (dynamic) */
"\0"
"glTagSampleBufferSGIX\0"
"\0"
- /* _mesa_function_pool[19049]: TransformFeedbackVaryingsEXT (will be remapped) */
+ /* _mesa_function_pool[19239]: TransformFeedbackVaryingsEXT (will be remapped) */
"iipi\0"
"glTransformFeedbackVaryingsEXT\0"
"glTransformFeedbackVaryings\0"
"\0"
- /* _mesa_function_pool[19114]: FeedbackBuffer (offset 194) */
+ /* _mesa_function_pool[19304]: FeedbackBuffer (offset 194) */
"iip\0"
"glFeedbackBuffer\0"
"\0"
- /* _mesa_function_pool[19136]: RasterPos2iv (offset 67) */
+ /* _mesa_function_pool[19326]: RasterPos2iv (offset 67) */
"p\0"
"glRasterPos2iv\0"
"\0"
- /* _mesa_function_pool[19154]: TexImage1D (offset 182) */
+ /* _mesa_function_pool[19344]: TexImage1D (offset 182) */
"iiiiiiip\0"
"glTexImage1D\0"
"\0"
- /* _mesa_function_pool[19177]: ListParameterivSGIX (dynamic) */
+ /* _mesa_function_pool[19367]: ListParameterivSGIX (dynamic) */
"iip\0"
"glListParameterivSGIX\0"
"\0"
- /* _mesa_function_pool[19204]: MultiDrawElementsEXT (will be remapped) */
+ /* _mesa_function_pool[19394]: MultiDrawElementsEXT (will be remapped) */
"ipipi\0"
"glMultiDrawElements\0"
"glMultiDrawElementsEXT\0"
"\0"
- /* _mesa_function_pool[19254]: Color3s (offset 17) */
+ /* _mesa_function_pool[19444]: Color3s (offset 17) */
"iii\0"
"glColor3s\0"
"\0"
- /* _mesa_function_pool[19269]: Uniform1ivARB (will be remapped) */
+ /* _mesa_function_pool[19459]: Uniform1ivARB (will be remapped) */
"iip\0"
"glUniform1iv\0"
"glUniform1ivARB\0"
"\0"
- /* _mesa_function_pool[19303]: WindowPos2sMESA (will be remapped) */
+ /* _mesa_function_pool[19493]: WindowPos2sMESA (will be remapped) */
"ii\0"
"glWindowPos2s\0"
"glWindowPos2sARB\0"
"glWindowPos2sMESA\0"
"\0"
- /* _mesa_function_pool[19356]: WeightusvARB (dynamic) */
+ /* _mesa_function_pool[19546]: WeightusvARB (dynamic) */
"ip\0"
"glWeightusvARB\0"
"\0"
- /* _mesa_function_pool[19375]: TexCoordPointer (offset 320) */
+ /* _mesa_function_pool[19565]: TexCoordPointer (offset 320) */
"iiip\0"
"glTexCoordPointer\0"
"\0"
- /* _mesa_function_pool[19399]: FogCoordPointerEXT (will be remapped) */
+ /* _mesa_function_pool[19589]: FogCoordPointerEXT (will be remapped) */
"iip\0"
"glFogCoordPointer\0"
"glFogCoordPointerEXT\0"
"\0"
- /* _mesa_function_pool[19443]: IndexMaterialEXT (dynamic) */
+ /* _mesa_function_pool[19633]: IndexMaterialEXT (dynamic) */
"ii\0"
"glIndexMaterialEXT\0"
"\0"
- /* _mesa_function_pool[19466]: Color3i (offset 15) */
+ /* _mesa_function_pool[19656]: Color3i (offset 15) */
"iii\0"
"glColor3i\0"
"\0"
- /* _mesa_function_pool[19481]: FrontFace (offset 157) */
+ /* _mesa_function_pool[19671]: FrontFace (offset 157) */
"i\0"
"glFrontFace\0"
"\0"
- /* _mesa_function_pool[19496]: EvalCoord2d (offset 232) */
+ /* _mesa_function_pool[19686]: EvalCoord2d (offset 232) */
"dd\0"
"glEvalCoord2d\0"
"\0"
- /* _mesa_function_pool[19514]: SecondaryColor3ubvEXT (will be remapped) */
+ /* _mesa_function_pool[19704]: SecondaryColor3ubvEXT (will be remapped) */
"p\0"
"glSecondaryColor3ubv\0"
"glSecondaryColor3ubvEXT\0"
"\0"
- /* _mesa_function_pool[19562]: EvalCoord2f (offset 234) */
+ /* _mesa_function_pool[19752]: EvalCoord2f (offset 234) */
"ff\0"
"glEvalCoord2f\0"
"\0"
- /* _mesa_function_pool[19580]: VertexAttrib4dvARB (will be remapped) */
+ /* _mesa_function_pool[19770]: VertexAttrib4dvARB (will be remapped) */
"ip\0"
"glVertexAttrib4dv\0"
"glVertexAttrib4dvARB\0"
"\0"
- /* _mesa_function_pool[19623]: BindAttribLocationARB (will be remapped) */
+ /* _mesa_function_pool[19813]: BindAttribLocationARB (will be remapped) */
"iip\0"
"glBindAttribLocation\0"
"glBindAttribLocationARB\0"
"\0"
- /* _mesa_function_pool[19673]: Color3b (offset 9) */
+ /* _mesa_function_pool[19863]: Color3b (offset 9) */
"iii\0"
"glColor3b\0"
"\0"
- /* _mesa_function_pool[19688]: MultiTexCoord2dARB (offset 384) */
+ /* _mesa_function_pool[19878]: MultiTexCoord2dARB (offset 384) */
"idd\0"
"glMultiTexCoord2d\0"
"glMultiTexCoord2dARB\0"
"\0"
- /* _mesa_function_pool[19732]: ExecuteProgramNV (will be remapped) */
+ /* _mesa_function_pool[19922]: ExecuteProgramNV (will be remapped) */
"iip\0"
"glExecuteProgramNV\0"
"\0"
- /* _mesa_function_pool[19756]: Color3f (offset 13) */
+ /* _mesa_function_pool[19946]: Color3f (offset 13) */
"fff\0"
"glColor3f\0"
"\0"
- /* _mesa_function_pool[19771]: LightEnviSGIX (dynamic) */
+ /* _mesa_function_pool[19961]: LightEnviSGIX (dynamic) */
"ii\0"
"glLightEnviSGIX\0"
"\0"
- /* _mesa_function_pool[19791]: Color3d (offset 11) */
+ /* _mesa_function_pool[19981]: Color3d (offset 11) */
"ddd\0"
"glColor3d\0"
"\0"
- /* _mesa_function_pool[19806]: Normal3dv (offset 55) */
+ /* _mesa_function_pool[19996]: Normal3dv (offset 55) */
"p\0"
"glNormal3dv\0"
"\0"
- /* _mesa_function_pool[19821]: Lightf (offset 159) */
+ /* _mesa_function_pool[20011]: Lightf (offset 159) */
"iif\0"
"glLightf\0"
"\0"
- /* _mesa_function_pool[19835]: ReplacementCodeuiSUN (dynamic) */
+ /* _mesa_function_pool[20025]: ReplacementCodeuiSUN (dynamic) */
"i\0"
"glReplacementCodeuiSUN\0"
"\0"
- /* _mesa_function_pool[19861]: MatrixMode (offset 293) */
+ /* _mesa_function_pool[20051]: MatrixMode (offset 293) */
"i\0"
"glMatrixMode\0"
"\0"
- /* _mesa_function_pool[19877]: GetPixelMapusv (offset 273) */
+ /* _mesa_function_pool[20067]: GetPixelMapusv (offset 273) */
"ip\0"
"glGetPixelMapusv\0"
"\0"
- /* _mesa_function_pool[19898]: Lighti (offset 161) */
+ /* _mesa_function_pool[20088]: Lighti (offset 161) */
"iii\0"
"glLighti\0"
"\0"
- /* _mesa_function_pool[19912]: VertexAttribPointerNV (will be remapped) */
+ /* _mesa_function_pool[20102]: VertexAttribPointerNV (will be remapped) */
"iiiip\0"
"glVertexAttribPointerNV\0"
"\0"
- /* _mesa_function_pool[19943]: ProgramLocalParameters4fvEXT (will be remapped) */
+ /* _mesa_function_pool[20133]: ProgramLocalParameters4fvEXT (will be remapped) */
"iiip\0"
"glProgramLocalParameters4fvEXT\0"
"\0"
- /* _mesa_function_pool[19980]: GetBooleanIndexedvEXT (will be remapped) */
+ /* _mesa_function_pool[20170]: GetBooleanIndexedvEXT (will be remapped) */
"iip\0"
"glGetBooleanIndexedvEXT\0"
"\0"
- /* _mesa_function_pool[20009]: GetFramebufferAttachmentParameterivEXT (will be remapped) */
+ /* _mesa_function_pool[20199]: GetFramebufferAttachmentParameterivEXT (will be remapped) */
"iiip\0"
"glGetFramebufferAttachmentParameteriv\0"
"glGetFramebufferAttachmentParameterivEXT\0"
"\0"
- /* _mesa_function_pool[20094]: PixelTransformParameterfEXT (dynamic) */
+ /* _mesa_function_pool[20284]: PixelTransformParameterfEXT (dynamic) */
"iif\0"
"glPixelTransformParameterfEXT\0"
"\0"
- /* _mesa_function_pool[20129]: MultiTexCoord4dvARB (offset 401) */
+ /* _mesa_function_pool[20319]: MultiTexCoord4dvARB (offset 401) */
"ip\0"
"glMultiTexCoord4dv\0"
"glMultiTexCoord4dvARB\0"
"\0"
- /* _mesa_function_pool[20174]: PixelTransformParameteriEXT (dynamic) */
+ /* _mesa_function_pool[20364]: PixelTransformParameteriEXT (dynamic) */
"iii\0"
"glPixelTransformParameteriEXT\0"
"\0"
- /* _mesa_function_pool[20209]: GetDoublev (offset 260) */
+ /* _mesa_function_pool[20399]: GetDoublev (offset 260) */
"ip\0"
"glGetDoublev\0"
"\0"
- /* _mesa_function_pool[20226]: MultMatrixd (offset 295) */
+ /* _mesa_function_pool[20416]: MultMatrixd (offset 295) */
"p\0"
"glMultMatrixd\0"
"\0"
- /* _mesa_function_pool[20243]: MultMatrixf (offset 294) */
+ /* _mesa_function_pool[20433]: MultMatrixf (offset 294) */
"p\0"
"glMultMatrixf\0"
"\0"
- /* _mesa_function_pool[20260]: TexCoord2fColor4ubVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[20450]: TexCoord2fColor4ubVertex3fSUN (dynamic) */
"ffiiiifff\0"
"glTexCoord2fColor4ubVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[20303]: Uniform1iARB (will be remapped) */
+ /* _mesa_function_pool[20493]: Uniform1iARB (will be remapped) */
"ii\0"
"glUniform1i\0"
"glUniform1iARB\0"
"\0"
- /* _mesa_function_pool[20334]: VertexAttribPointerARB (will be remapped) */
+ /* _mesa_function_pool[20524]: VertexAttribPointerARB (will be remapped) */
"iiiiip\0"
"glVertexAttribPointer\0"
"glVertexAttribPointerARB\0"
"\0"
- /* _mesa_function_pool[20389]: VertexAttrib3sNV (will be remapped) */
+ /* _mesa_function_pool[20579]: VertexAttrib3sNV (will be remapped) */
"iiii\0"
"glVertexAttrib3sNV\0"
"\0"
- /* _mesa_function_pool[20414]: SharpenTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[20604]: SharpenTexFuncSGIS (dynamic) */
"iip\0"
"glSharpenTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[20440]: MultiTexCoord4fvARB (offset 403) */
+ /* _mesa_function_pool[20630]: MultiTexCoord4fvARB (offset 403) */
"ip\0"
"glMultiTexCoord4fv\0"
"glMultiTexCoord4fvARB\0"
"\0"
- /* _mesa_function_pool[20485]: UniformMatrix2x3fv (will be remapped) */
+ /* _mesa_function_pool[20675]: UniformMatrix2x3fv (will be remapped) */
"iiip\0"
"glUniformMatrix2x3fv\0"
"\0"
- /* _mesa_function_pool[20512]: TrackMatrixNV (will be remapped) */
+ /* _mesa_function_pool[20702]: TrackMatrixNV (will be remapped) */
"iiii\0"
"glTrackMatrixNV\0"
"\0"
- /* _mesa_function_pool[20534]: CombinerParameteriNV (will be remapped) */
+ /* _mesa_function_pool[20724]: CombinerParameteriNV (will be remapped) */
"ii\0"
"glCombinerParameteriNV\0"
"\0"
- /* _mesa_function_pool[20561]: DeleteAsyncMarkersSGIX (dynamic) */
+ /* _mesa_function_pool[20751]: DeleteAsyncMarkersSGIX (dynamic) */
"ii\0"
"glDeleteAsyncMarkersSGIX\0"
"\0"
- /* _mesa_function_pool[20590]: ReplacementCodeusSUN (dynamic) */
+ /* _mesa_function_pool[20780]: ReplacementCodeusSUN (dynamic) */
"i\0"
"glReplacementCodeusSUN\0"
"\0"
- /* _mesa_function_pool[20616]: IsAsyncMarkerSGIX (dynamic) */
+ /* _mesa_function_pool[20806]: IsAsyncMarkerSGIX (dynamic) */
"i\0"
"glIsAsyncMarkerSGIX\0"
"\0"
- /* _mesa_function_pool[20639]: FrameZoomSGIX (dynamic) */
+ /* _mesa_function_pool[20829]: FrameZoomSGIX (dynamic) */
"i\0"
"glFrameZoomSGIX\0"
"\0"
- /* _mesa_function_pool[20658]: Normal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[20848]: Normal3fVertex3fvSUN (dynamic) */
"pp\0"
"glNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[20685]: RasterPos4sv (offset 85) */
+ /* _mesa_function_pool[20875]: RasterPos4sv (offset 85) */
"p\0"
"glRasterPos4sv\0"
"\0"
- /* _mesa_function_pool[20703]: VertexAttrib4NsvARB (will be remapped) */
+ /* _mesa_function_pool[20893]: VertexAttrib4NsvARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nsv\0"
"glVertexAttrib4NsvARB\0"
"\0"
- /* _mesa_function_pool[20748]: VertexAttrib3fvARB (will be remapped) */
+ /* _mesa_function_pool[20938]: VertexAttrib3fvARB (will be remapped) */
"ip\0"
"glVertexAttrib3fv\0"
"glVertexAttrib3fvARB\0"
"\0"
- /* _mesa_function_pool[20791]: ClearColor (offset 206) */
+ /* _mesa_function_pool[20981]: ClearColor (offset 206) */
"ffff\0"
"glClearColor\0"
"\0"
- /* _mesa_function_pool[20810]: GetSynciv (will be remapped) */
+ /* _mesa_function_pool[21000]: GetSynciv (will be remapped) */
"iiipp\0"
"glGetSynciv\0"
"\0"
- /* _mesa_function_pool[20829]: DeleteFramebuffersEXT (will be remapped) */
+ /* _mesa_function_pool[21019]: ClearColorIiEXT (will be remapped) */
+ "iiii\0"
+ "glClearColorIiEXT\0"
+ "\0"
+ /* _mesa_function_pool[21043]: DeleteFramebuffersEXT (will be remapped) */
"ip\0"
"glDeleteFramebuffers\0"
"glDeleteFramebuffersEXT\0"
"\0"
- /* _mesa_function_pool[20878]: GlobalAlphaFactorsSUN (dynamic) */
+ /* _mesa_function_pool[21092]: GlobalAlphaFactorsSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorsSUN\0"
"\0"
- /* _mesa_function_pool[20905]: IsEnabledIndexedEXT (will be remapped) */
+ /* _mesa_function_pool[21119]: IsEnabledIndexedEXT (will be remapped) */
"ii\0"
"glIsEnabledIndexedEXT\0"
"\0"
- /* _mesa_function_pool[20931]: TexEnviv (offset 187) */
+ /* _mesa_function_pool[21145]: TexEnviv (offset 187) */
"iip\0"
"glTexEnviv\0"
"\0"
- /* _mesa_function_pool[20947]: TexSubImage3D (offset 372) */
+ /* _mesa_function_pool[21161]: TexSubImage3D (offset 372) */
"iiiiiiiiiip\0"
"glTexSubImage3D\0"
"glTexSubImage3DEXT\0"
"\0"
- /* _mesa_function_pool[20995]: Tangent3fEXT (dynamic) */
+ /* _mesa_function_pool[21209]: Tangent3fEXT (dynamic) */
"fff\0"
"glTangent3fEXT\0"
"\0"
- /* _mesa_function_pool[21015]: SecondaryColor3uivEXT (will be remapped) */
+ /* _mesa_function_pool[21229]: SecondaryColor3uivEXT (will be remapped) */
"p\0"
"glSecondaryColor3uiv\0"
"glSecondaryColor3uivEXT\0"
"\0"
- /* _mesa_function_pool[21063]: MatrixIndexubvARB (dynamic) */
+ /* _mesa_function_pool[21277]: MatrixIndexubvARB (dynamic) */
"ip\0"
"glMatrixIndexubvARB\0"
"\0"
- /* _mesa_function_pool[21087]: Color4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[21301]: Color4fNormal3fVertex3fSUN (dynamic) */
"ffffffffff\0"
"glColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[21128]: PixelTexGenParameterfSGIS (will be remapped) */
+ /* _mesa_function_pool[21342]: PixelTexGenParameterfSGIS (will be remapped) */
"if\0"
"glPixelTexGenParameterfSGIS\0"
"\0"
- /* _mesa_function_pool[21160]: CreateShader (will be remapped) */
+ /* _mesa_function_pool[21374]: CreateShader (will be remapped) */
"i\0"
"glCreateShader\0"
"\0"
- /* _mesa_function_pool[21178]: GetColorTableParameterfv (offset 344) */
+ /* _mesa_function_pool[21392]: GetColorTableParameterfv (offset 344) */
"iip\0"
"glGetColorTableParameterfv\0"
"glGetColorTableParameterfvSGI\0"
"glGetColorTableParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[21270]: FragmentLightModelfvSGIX (dynamic) */
+ /* _mesa_function_pool[21484]: FragmentLightModelfvSGIX (dynamic) */
"ip\0"
"glFragmentLightModelfvSGIX\0"
"\0"
- /* _mesa_function_pool[21301]: Bitmap (offset 8) */
+ /* _mesa_function_pool[21515]: Bitmap (offset 8) */
"iiffffp\0"
"glBitmap\0"
"\0"
- /* _mesa_function_pool[21319]: MultiTexCoord3fARB (offset 394) */
+ /* _mesa_function_pool[21533]: MultiTexCoord3fARB (offset 394) */
"ifff\0"
"glMultiTexCoord3f\0"
"glMultiTexCoord3fARB\0"
"\0"
- /* _mesa_function_pool[21364]: GetTexLevelParameterfv (offset 284) */
+ /* _mesa_function_pool[21578]: GetTexLevelParameterfv (offset 284) */
"iiip\0"
"glGetTexLevelParameterfv\0"
"\0"
- /* _mesa_function_pool[21395]: GetPixelTexGenParameterfvSGIS (will be remapped) */
+ /* _mesa_function_pool[21609]: GetPixelTexGenParameterfvSGIS (will be remapped) */
"ip\0"
"glGetPixelTexGenParameterfvSGIS\0"
"\0"
- /* _mesa_function_pool[21431]: GenFramebuffersEXT (will be remapped) */
+ /* _mesa_function_pool[21645]: GenFramebuffersEXT (will be remapped) */
"ip\0"
"glGenFramebuffers\0"
"glGenFramebuffersEXT\0"
"\0"
- /* _mesa_function_pool[21474]: GetProgramParameterdvNV (will be remapped) */
+ /* _mesa_function_pool[21688]: GetProgramParameterdvNV (will be remapped) */
"iiip\0"
"glGetProgramParameterdvNV\0"
"\0"
- /* _mesa_function_pool[21506]: Vertex2sv (offset 133) */
+ /* _mesa_function_pool[21720]: Vertex2sv (offset 133) */
"p\0"
"glVertex2sv\0"
"\0"
- /* _mesa_function_pool[21521]: GetIntegerv (offset 263) */
+ /* _mesa_function_pool[21735]: GetIntegerv (offset 263) */
"ip\0"
"glGetIntegerv\0"
"\0"
- /* _mesa_function_pool[21539]: IsVertexArrayAPPLE (will be remapped) */
+ /* _mesa_function_pool[21753]: IsVertexArrayAPPLE (will be remapped) */
"i\0"
"glIsVertexArray\0"
"glIsVertexArrayAPPLE\0"
"\0"
- /* _mesa_function_pool[21579]: FragmentLightfvSGIX (dynamic) */
+ /* _mesa_function_pool[21793]: FragmentLightfvSGIX (dynamic) */
"iip\0"
"glFragmentLightfvSGIX\0"
"\0"
- /* _mesa_function_pool[21606]: DetachShader (will be remapped) */
+ /* _mesa_function_pool[21820]: DetachShader (will be remapped) */
"ii\0"
"glDetachShader\0"
"\0"
- /* _mesa_function_pool[21625]: VertexAttrib4NubARB (will be remapped) */
+ /* _mesa_function_pool[21839]: VertexAttrib4NubARB (will be remapped) */
"iiiii\0"
"glVertexAttrib4Nub\0"
"glVertexAttrib4NubARB\0"
"\0"
- /* _mesa_function_pool[21673]: GetProgramEnvParameterfvARB (will be remapped) */
+ /* _mesa_function_pool[21887]: GetProgramEnvParameterfvARB (will be remapped) */
"iip\0"
"glGetProgramEnvParameterfvARB\0"
"\0"
- /* _mesa_function_pool[21708]: GetTrackMatrixivNV (will be remapped) */
+ /* _mesa_function_pool[21922]: GetTrackMatrixivNV (will be remapped) */
"iiip\0"
"glGetTrackMatrixivNV\0"
"\0"
- /* _mesa_function_pool[21735]: VertexAttrib3svNV (will be remapped) */
+ /* _mesa_function_pool[21949]: VertexAttrib3svNV (will be remapped) */
"ip\0"
"glVertexAttrib3svNV\0"
"\0"
- /* _mesa_function_pool[21759]: Uniform4fvARB (will be remapped) */
+ /* _mesa_function_pool[21973]: Uniform4fvARB (will be remapped) */
"iip\0"
"glUniform4fv\0"
"glUniform4fvARB\0"
"\0"
- /* _mesa_function_pool[21793]: MultTransposeMatrixfARB (will be remapped) */
+ /* _mesa_function_pool[22007]: MultTransposeMatrixfARB (will be remapped) */
"p\0"
"glMultTransposeMatrixf\0"
"glMultTransposeMatrixfARB\0"
"\0"
- /* _mesa_function_pool[21845]: GetTexEnviv (offset 277) */
+ /* _mesa_function_pool[22059]: GetTexEnviv (offset 277) */
"iip\0"
"glGetTexEnviv\0"
"\0"
- /* _mesa_function_pool[21864]: ColorFragmentOp1ATI (will be remapped) */
+ /* _mesa_function_pool[22078]: ColorFragmentOp1ATI (will be remapped) */
"iiiiiii\0"
"glColorFragmentOp1ATI\0"
"\0"
- /* _mesa_function_pool[21895]: GetUniformfvARB (will be remapped) */
+ /* _mesa_function_pool[22109]: GetUniformfvARB (will be remapped) */
"iip\0"
"glGetUniformfv\0"
"glGetUniformfvARB\0"
"\0"
- /* _mesa_function_pool[21933]: EGLImageTargetRenderbufferStorageOES (will be remapped) */
+ /* _mesa_function_pool[22147]: EGLImageTargetRenderbufferStorageOES (will be remapped) */
"ip\0"
"glEGLImageTargetRenderbufferStorageOES\0"
"\0"
- /* _mesa_function_pool[21976]: PopClientAttrib (offset 334) */
+ /* _mesa_function_pool[22190]: PopClientAttrib (offset 334) */
"\0"
"glPopClientAttrib\0"
"\0"
- /* _mesa_function_pool[21996]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[22210]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
"iffffffffffff\0"
"glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[22067]: DetachObjectARB (will be remapped) */
+ /* _mesa_function_pool[22281]: DetachObjectARB (will be remapped) */
"ii\0"
"glDetachObjectARB\0"
"\0"
- /* _mesa_function_pool[22089]: VertexBlendARB (dynamic) */
+ /* _mesa_function_pool[22303]: VertexBlendARB (dynamic) */
"i\0"
"glVertexBlendARB\0"
"\0"
- /* _mesa_function_pool[22109]: WindowPos3iMESA (will be remapped) */
+ /* _mesa_function_pool[22323]: WindowPos3iMESA (will be remapped) */
"iii\0"
"glWindowPos3i\0"
"glWindowPos3iARB\0"
"glWindowPos3iMESA\0"
"\0"
- /* _mesa_function_pool[22163]: SeparableFilter2D (offset 360) */
+ /* _mesa_function_pool[22377]: SeparableFilter2D (offset 360) */
"iiiiiipp\0"
"glSeparableFilter2D\0"
"glSeparableFilter2DEXT\0"
"\0"
- /* _mesa_function_pool[22216]: ProgramParameteriARB (will be remapped) */
+ /* _mesa_function_pool[22430]: ProgramParameteriARB (will be remapped) */
"iii\0"
"glProgramParameteriARB\0"
"\0"
- /* _mesa_function_pool[22244]: Map1d (offset 220) */
+ /* _mesa_function_pool[22458]: Map1d (offset 220) */
"iddiip\0"
"glMap1d\0"
"\0"
- /* _mesa_function_pool[22260]: Map1f (offset 221) */
+ /* _mesa_function_pool[22474]: Map1f (offset 221) */
"iffiip\0"
"glMap1f\0"
"\0"
- /* _mesa_function_pool[22276]: CompressedTexImage2DARB (will be remapped) */
+ /* _mesa_function_pool[22490]: CompressedTexImage2DARB (will be remapped) */
"iiiiiiip\0"
"glCompressedTexImage2D\0"
"glCompressedTexImage2DARB\0"
"\0"
- /* _mesa_function_pool[22335]: ArrayElement (offset 306) */
+ /* _mesa_function_pool[22549]: ArrayElement (offset 306) */
"i\0"
"glArrayElement\0"
"glArrayElementEXT\0"
"\0"
- /* _mesa_function_pool[22371]: TexImage2D (offset 183) */
+ /* _mesa_function_pool[22585]: TexImage2D (offset 183) */
"iiiiiiiip\0"
"glTexImage2D\0"
"\0"
- /* _mesa_function_pool[22395]: DepthBoundsEXT (will be remapped) */
+ /* _mesa_function_pool[22609]: DepthBoundsEXT (will be remapped) */
"dd\0"
"glDepthBoundsEXT\0"
"\0"
- /* _mesa_function_pool[22416]: ProgramParameters4fvNV (will be remapped) */
+ /* _mesa_function_pool[22630]: ProgramParameters4fvNV (will be remapped) */
"iiip\0"
"glProgramParameters4fvNV\0"
"\0"
- /* _mesa_function_pool[22447]: DeformationMap3fSGIX (dynamic) */
+ /* _mesa_function_pool[22661]: DeformationMap3fSGIX (dynamic) */
"iffiiffiiffiip\0"
"glDeformationMap3fSGIX\0"
"\0"
- /* _mesa_function_pool[22486]: GetProgramivNV (will be remapped) */
+ /* _mesa_function_pool[22700]: GetProgramivNV (will be remapped) */
"iip\0"
"glGetProgramivNV\0"
"\0"
- /* _mesa_function_pool[22508]: GetMinmaxParameteriv (offset 366) */
+ /* _mesa_function_pool[22722]: GetMinmaxParameteriv (offset 366) */
"iip\0"
"glGetMinmaxParameteriv\0"
"glGetMinmaxParameterivEXT\0"
"\0"
- /* _mesa_function_pool[22562]: PixelTransferf (offset 247) */
+ /* _mesa_function_pool[22776]: PixelTransferf (offset 247) */
"if\0"
"glPixelTransferf\0"
"\0"
- /* _mesa_function_pool[22583]: CopyTexImage1D (offset 323) */
+ /* _mesa_function_pool[22797]: CopyTexImage1D (offset 323) */
"iiiiiii\0"
"glCopyTexImage1D\0"
"glCopyTexImage1DEXT\0"
"\0"
- /* _mesa_function_pool[22629]: PushMatrix (offset 298) */
+ /* _mesa_function_pool[22843]: PushMatrix (offset 298) */
"\0"
"glPushMatrix\0"
"\0"
- /* _mesa_function_pool[22644]: Fogiv (offset 156) */
+ /* _mesa_function_pool[22858]: Fogiv (offset 156) */
"ip\0"
"glFogiv\0"
"\0"
- /* _mesa_function_pool[22656]: TexCoord1dv (offset 95) */
+ /* _mesa_function_pool[22870]: TexCoord1dv (offset 95) */
"p\0"
"glTexCoord1dv\0"
"\0"
- /* _mesa_function_pool[22673]: AlphaFragmentOp3ATI (will be remapped) */
+ /* _mesa_function_pool[22887]: AlphaFragmentOp3ATI (will be remapped) */
"iiiiiiiiiiii\0"
"glAlphaFragmentOp3ATI\0"
"\0"
- /* _mesa_function_pool[22709]: PixelTransferi (offset 248) */
+ /* _mesa_function_pool[22923]: PixelTransferi (offset 248) */
"ii\0"
"glPixelTransferi\0"
"\0"
- /* _mesa_function_pool[22730]: GetVertexAttribdvNV (will be remapped) */
+ /* _mesa_function_pool[22944]: GetVertexAttribdvNV (will be remapped) */
"iip\0"
"glGetVertexAttribdvNV\0"
"\0"
- /* _mesa_function_pool[22757]: VertexAttrib3fvNV (will be remapped) */
+ /* _mesa_function_pool[22971]: VertexAttrib3fvNV (will be remapped) */
"ip\0"
"glVertexAttrib3fvNV\0"
"\0"
- /* _mesa_function_pool[22781]: Rotatef (offset 300) */
+ /* _mesa_function_pool[22995]: Rotatef (offset 300) */
"ffff\0"
"glRotatef\0"
"\0"
- /* _mesa_function_pool[22797]: GetFinalCombinerInputParameterivNV (will be remapped) */
+ /* _mesa_function_pool[23011]: GetFinalCombinerInputParameterivNV (will be remapped) */
"iip\0"
"glGetFinalCombinerInputParameterivNV\0"
"\0"
- /* _mesa_function_pool[22839]: Vertex3i (offset 138) */
+ /* _mesa_function_pool[23053]: Vertex3i (offset 138) */
"iii\0"
"glVertex3i\0"
"\0"
- /* _mesa_function_pool[22855]: Vertex3f (offset 136) */
+ /* _mesa_function_pool[23069]: Vertex3f (offset 136) */
"fff\0"
"glVertex3f\0"
"\0"
- /* _mesa_function_pool[22871]: Clear (offset 203) */
+ /* _mesa_function_pool[23085]: Clear (offset 203) */
"i\0"
"glClear\0"
"\0"
- /* _mesa_function_pool[22882]: Vertex3d (offset 134) */
+ /* _mesa_function_pool[23096]: Vertex3d (offset 134) */
"ddd\0"
"glVertex3d\0"
"\0"
- /* _mesa_function_pool[22898]: GetMapParameterivNV (dynamic) */
+ /* _mesa_function_pool[23112]: GetMapParameterivNV (dynamic) */
"iip\0"
"glGetMapParameterivNV\0"
"\0"
- /* _mesa_function_pool[22925]: Uniform4iARB (will be remapped) */
+ /* _mesa_function_pool[23139]: Uniform4iARB (will be remapped) */
"iiiii\0"
"glUniform4i\0"
"glUniform4iARB\0"
"\0"
- /* _mesa_function_pool[22959]: ReadBuffer (offset 254) */
+ /* _mesa_function_pool[23173]: ReadBuffer (offset 254) */
"i\0"
"glReadBuffer\0"
"\0"
- /* _mesa_function_pool[22975]: ConvolutionParameteri (offset 352) */
+ /* _mesa_function_pool[23189]: ConvolutionParameteri (offset 352) */
"iii\0"
"glConvolutionParameteri\0"
"glConvolutionParameteriEXT\0"
"\0"
- /* _mesa_function_pool[23031]: Ortho (offset 296) */
+ /* _mesa_function_pool[23245]: Ortho (offset 296) */
"dddddd\0"
"glOrtho\0"
"\0"
- /* _mesa_function_pool[23047]: Binormal3sEXT (dynamic) */
+ /* _mesa_function_pool[23261]: Binormal3sEXT (dynamic) */
"iii\0"
"glBinormal3sEXT\0"
"\0"
- /* _mesa_function_pool[23068]: ListBase (offset 6) */
+ /* _mesa_function_pool[23282]: ListBase (offset 6) */
"i\0"
"glListBase\0"
"\0"
- /* _mesa_function_pool[23082]: Vertex3s (offset 140) */
+ /* _mesa_function_pool[23296]: Vertex3s (offset 140) */
"iii\0"
"glVertex3s\0"
"\0"
- /* _mesa_function_pool[23098]: ConvolutionParameterf (offset 350) */
+ /* _mesa_function_pool[23312]: ConvolutionParameterf (offset 350) */
"iif\0"
"glConvolutionParameterf\0"
"glConvolutionParameterfEXT\0"
"\0"
- /* _mesa_function_pool[23154]: GetColorTableParameteriv (offset 345) */
+ /* _mesa_function_pool[23368]: GetColorTableParameteriv (offset 345) */
"iip\0"
"glGetColorTableParameteriv\0"
"glGetColorTableParameterivSGI\0"
"glGetColorTableParameterivEXT\0"
"\0"
- /* _mesa_function_pool[23246]: ProgramEnvParameter4dvARB (will be remapped) */
+ /* _mesa_function_pool[23460]: ProgramEnvParameter4dvARB (will be remapped) */
"iip\0"
"glProgramEnvParameter4dvARB\0"
"glProgramParameter4dvNV\0"
"\0"
- /* _mesa_function_pool[23303]: ShadeModel (offset 177) */
+ /* _mesa_function_pool[23517]: ShadeModel (offset 177) */
"i\0"
"glShadeModel\0"
"\0"
- /* _mesa_function_pool[23319]: VertexAttribs2fvNV (will be remapped) */
+ /* _mesa_function_pool[23533]: VertexAttribs2fvNV (will be remapped) */
"iip\0"
"glVertexAttribs2fvNV\0"
"\0"
- /* _mesa_function_pool[23345]: Rectiv (offset 91) */
+ /* _mesa_function_pool[23559]: Rectiv (offset 91) */
"pp\0"
"glRectiv\0"
"\0"
- /* _mesa_function_pool[23358]: UseProgramObjectARB (will be remapped) */
+ /* _mesa_function_pool[23572]: UseProgramObjectARB (will be remapped) */
"i\0"
"glUseProgram\0"
"glUseProgramObjectARB\0"
"\0"
- /* _mesa_function_pool[23396]: GetMapParameterfvNV (dynamic) */
+ /* _mesa_function_pool[23610]: GetMapParameterfvNV (dynamic) */
"iip\0"
"glGetMapParameterfvNV\0"
"\0"
- /* _mesa_function_pool[23423]: EndConditionalRenderNV (will be remapped) */
+ /* _mesa_function_pool[23637]: EndConditionalRenderNV (will be remapped) */
"\0"
"glEndConditionalRenderNV\0"
"\0"
- /* _mesa_function_pool[23450]: PassTexCoordATI (will be remapped) */
+ /* _mesa_function_pool[23664]: PassTexCoordATI (will be remapped) */
"iii\0"
"glPassTexCoordATI\0"
"\0"
- /* _mesa_function_pool[23473]: DeleteProgram (will be remapped) */
+ /* _mesa_function_pool[23687]: DeleteProgram (will be remapped) */
"i\0"
"glDeleteProgram\0"
"\0"
- /* _mesa_function_pool[23492]: Tangent3ivEXT (dynamic) */
+ /* _mesa_function_pool[23706]: Tangent3ivEXT (dynamic) */
"p\0"
"glTangent3ivEXT\0"
"\0"
- /* _mesa_function_pool[23511]: Tangent3dEXT (dynamic) */
+ /* _mesa_function_pool[23725]: Tangent3dEXT (dynamic) */
"ddd\0"
"glTangent3dEXT\0"
"\0"
- /* _mesa_function_pool[23531]: SecondaryColor3dvEXT (will be remapped) */
+ /* _mesa_function_pool[23745]: SecondaryColor3dvEXT (will be remapped) */
"p\0"
"glSecondaryColor3dv\0"
"glSecondaryColor3dvEXT\0"
"\0"
- /* _mesa_function_pool[23577]: Vertex2fv (offset 129) */
+ /* _mesa_function_pool[23791]: Vertex2fv (offset 129) */
"p\0"
"glVertex2fv\0"
"\0"
- /* _mesa_function_pool[23592]: MultiDrawArraysEXT (will be remapped) */
+ /* _mesa_function_pool[23806]: MultiDrawArraysEXT (will be remapped) */
"ippi\0"
"glMultiDrawArrays\0"
"glMultiDrawArraysEXT\0"
"\0"
- /* _mesa_function_pool[23637]: BindRenderbufferEXT (will be remapped) */
+ /* _mesa_function_pool[23851]: BindRenderbufferEXT (will be remapped) */
"ii\0"
"glBindRenderbuffer\0"
"glBindRenderbufferEXT\0"
"\0"
- /* _mesa_function_pool[23682]: MultiTexCoord4dARB (offset 400) */
+ /* _mesa_function_pool[23896]: MultiTexCoord4dARB (offset 400) */
"idddd\0"
"glMultiTexCoord4d\0"
"glMultiTexCoord4dARB\0"
"\0"
- /* _mesa_function_pool[23728]: FramebufferTextureFaceARB (will be remapped) */
+ /* _mesa_function_pool[23942]: FramebufferTextureFaceARB (will be remapped) */
"iiiii\0"
"glFramebufferTextureFaceARB\0"
"\0"
- /* _mesa_function_pool[23763]: Vertex3sv (offset 141) */
+ /* _mesa_function_pool[23977]: Vertex3sv (offset 141) */
"p\0"
"glVertex3sv\0"
"\0"
- /* _mesa_function_pool[23778]: SecondaryColor3usEXT (will be remapped) */
+ /* _mesa_function_pool[23992]: SecondaryColor3usEXT (will be remapped) */
"iii\0"
"glSecondaryColor3us\0"
"glSecondaryColor3usEXT\0"
"\0"
- /* _mesa_function_pool[23826]: ProgramLocalParameter4fvARB (will be remapped) */
+ /* _mesa_function_pool[24040]: ProgramLocalParameter4fvARB (will be remapped) */
"iip\0"
"glProgramLocalParameter4fvARB\0"
"\0"
- /* _mesa_function_pool[23861]: DeleteProgramsNV (will be remapped) */
+ /* _mesa_function_pool[24075]: DeleteProgramsNV (will be remapped) */
"ip\0"
"glDeleteProgramsARB\0"
"glDeleteProgramsNV\0"
"\0"
- /* _mesa_function_pool[23904]: EvalMesh1 (offset 236) */
+ /* _mesa_function_pool[24118]: EvalMesh1 (offset 236) */
"iii\0"
"glEvalMesh1\0"
"\0"
- /* _mesa_function_pool[23921]: PauseTransformFeedback (will be remapped) */
+ /* _mesa_function_pool[24135]: PauseTransformFeedback (will be remapped) */
"\0"
"glPauseTransformFeedback\0"
"\0"
- /* _mesa_function_pool[23948]: MultiTexCoord1sARB (offset 382) */
+ /* _mesa_function_pool[24162]: MultiTexCoord1sARB (offset 382) */
"ii\0"
"glMultiTexCoord1s\0"
"glMultiTexCoord1sARB\0"
"\0"
- /* _mesa_function_pool[23991]: ReplacementCodeuiColor3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[24205]: ReplacementCodeuiColor3fVertex3fSUN (dynamic) */
"iffffff\0"
"glReplacementCodeuiColor3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[24038]: GetVertexAttribPointervNV (will be remapped) */
+ /* _mesa_function_pool[24252]: GetVertexAttribPointervNV (will be remapped) */
"iip\0"
"glGetVertexAttribPointerv\0"
"glGetVertexAttribPointervARB\0"
"glGetVertexAttribPointervNV\0"
"\0"
- /* _mesa_function_pool[24126]: VertexAttribs1fvNV (will be remapped) */
+ /* _mesa_function_pool[24340]: VertexAttribs1fvNV (will be remapped) */
"iip\0"
"glVertexAttribs1fvNV\0"
"\0"
- /* _mesa_function_pool[24152]: MultiTexCoord1dvARB (offset 377) */
+ /* _mesa_function_pool[24366]: MultiTexCoord1dvARB (offset 377) */
"ip\0"
"glMultiTexCoord1dv\0"
"glMultiTexCoord1dvARB\0"
"\0"
- /* _mesa_function_pool[24197]: Uniform2iARB (will be remapped) */
+ /* _mesa_function_pool[24411]: Uniform2iARB (will be remapped) */
"iii\0"
"glUniform2i\0"
"glUniform2iARB\0"
"\0"
- /* _mesa_function_pool[24229]: Vertex2iv (offset 131) */
+ /* _mesa_function_pool[24443]: Vertex2iv (offset 131) */
"p\0"
"glVertex2iv\0"
"\0"
- /* _mesa_function_pool[24244]: GetProgramStringNV (will be remapped) */
+ /* _mesa_function_pool[24458]: GetProgramStringNV (will be remapped) */
"iip\0"
"glGetProgramStringNV\0"
"\0"
- /* _mesa_function_pool[24270]: ColorPointerEXT (will be remapped) */
+ /* _mesa_function_pool[24484]: ColorPointerEXT (will be remapped) */
"iiiip\0"
"glColorPointerEXT\0"
"\0"
- /* _mesa_function_pool[24295]: LineWidth (offset 168) */
+ /* _mesa_function_pool[24509]: LineWidth (offset 168) */
"f\0"
"glLineWidth\0"
"\0"
- /* _mesa_function_pool[24310]: MapBufferARB (will be remapped) */
+ /* _mesa_function_pool[24524]: MapBufferARB (will be remapped) */
"ii\0"
"glMapBuffer\0"
"glMapBufferARB\0"
"\0"
- /* _mesa_function_pool[24341]: MultiDrawElementsBaseVertex (will be remapped) */
+ /* _mesa_function_pool[24555]: MultiDrawElementsBaseVertex (will be remapped) */
"ipipip\0"
"glMultiDrawElementsBaseVertex\0"
"\0"
- /* _mesa_function_pool[24379]: Binormal3svEXT (dynamic) */
+ /* _mesa_function_pool[24593]: TexParameterIuivEXT (will be remapped) */
+ "iip\0"
+ "glTexParameterIuivEXT\0"
+ "\0"
+ /* _mesa_function_pool[24620]: Binormal3svEXT (dynamic) */
"p\0"
"glBinormal3svEXT\0"
"\0"
- /* _mesa_function_pool[24399]: ApplyTextureEXT (dynamic) */
+ /* _mesa_function_pool[24640]: ApplyTextureEXT (dynamic) */
"i\0"
"glApplyTextureEXT\0"
"\0"
- /* _mesa_function_pool[24420]: TexGendv (offset 189) */
+ /* _mesa_function_pool[24661]: TexGendv (offset 189) */
"iip\0"
"glTexGendv\0"
"\0"
- /* _mesa_function_pool[24436]: EnableIndexedEXT (will be remapped) */
+ /* _mesa_function_pool[24677]: EnableIndexedEXT (will be remapped) */
"ii\0"
"glEnableIndexedEXT\0"
"\0"
- /* _mesa_function_pool[24459]: TextureMaterialEXT (dynamic) */
+ /* _mesa_function_pool[24700]: TextureMaterialEXT (dynamic) */
"ii\0"
"glTextureMaterialEXT\0"
"\0"
- /* _mesa_function_pool[24484]: TextureLightEXT (dynamic) */
+ /* _mesa_function_pool[24725]: TextureLightEXT (dynamic) */
"i\0"
"glTextureLightEXT\0"
"\0"
- /* _mesa_function_pool[24505]: ResetMinmax (offset 370) */
+ /* _mesa_function_pool[24746]: ResetMinmax (offset 370) */
"i\0"
"glResetMinmax\0"
"glResetMinmaxEXT\0"
"\0"
- /* _mesa_function_pool[24539]: SpriteParameterfSGIX (dynamic) */
+ /* _mesa_function_pool[24780]: SpriteParameterfSGIX (dynamic) */
"if\0"
"glSpriteParameterfSGIX\0"
"\0"
- /* _mesa_function_pool[24566]: EnableClientState (offset 313) */
+ /* _mesa_function_pool[24807]: EnableClientState (offset 313) */
"i\0"
"glEnableClientState\0"
"\0"
- /* _mesa_function_pool[24589]: VertexAttrib4sNV (will be remapped) */
+ /* _mesa_function_pool[24830]: VertexAttrib4sNV (will be remapped) */
"iiiii\0"
"glVertexAttrib4sNV\0"
"\0"
- /* _mesa_function_pool[24615]: GetConvolutionParameterfv (offset 357) */
+ /* _mesa_function_pool[24856]: GetConvolutionParameterfv (offset 357) */
"iip\0"
"glGetConvolutionParameterfv\0"
"glGetConvolutionParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[24679]: VertexAttribs4dvNV (will be remapped) */
+ /* _mesa_function_pool[24920]: VertexAttribs4dvNV (will be remapped) */
"iip\0"
"glVertexAttribs4dvNV\0"
"\0"
- /* _mesa_function_pool[24705]: MultiModeDrawArraysIBM (will be remapped) */
+ /* _mesa_function_pool[24946]: MultiModeDrawArraysIBM (will be remapped) */
"pppii\0"
"glMultiModeDrawArraysIBM\0"
"\0"
- /* _mesa_function_pool[24737]: VertexAttrib4dARB (will be remapped) */
+ /* _mesa_function_pool[24978]: VertexAttrib4dARB (will be remapped) */
"idddd\0"
"glVertexAttrib4d\0"
"glVertexAttrib4dARB\0"
"\0"
- /* _mesa_function_pool[24781]: GetTexBumpParameterfvATI (will be remapped) */
+ /* _mesa_function_pool[25022]: GetTexBumpParameterfvATI (will be remapped) */
"ip\0"
"glGetTexBumpParameterfvATI\0"
"\0"
- /* _mesa_function_pool[24812]: ProgramNamedParameter4dNV (will be remapped) */
+ /* _mesa_function_pool[25053]: ProgramNamedParameter4dNV (will be remapped) */
"iipdddd\0"
"glProgramNamedParameter4dNV\0"
"\0"
- /* _mesa_function_pool[24849]: GetMaterialfv (offset 269) */
+ /* _mesa_function_pool[25090]: GetMaterialfv (offset 269) */
"iip\0"
"glGetMaterialfv\0"
"\0"
- /* _mesa_function_pool[24870]: VertexWeightfEXT (dynamic) */
+ /* _mesa_function_pool[25111]: VertexWeightfEXT (dynamic) */
"f\0"
"glVertexWeightfEXT\0"
"\0"
- /* _mesa_function_pool[24892]: Binormal3fEXT (dynamic) */
+ /* _mesa_function_pool[25133]: Binormal3fEXT (dynamic) */
"fff\0"
"glBinormal3fEXT\0"
"\0"
- /* _mesa_function_pool[24913]: CallList (offset 2) */
+ /* _mesa_function_pool[25154]: CallList (offset 2) */
"i\0"
"glCallList\0"
"\0"
- /* _mesa_function_pool[24927]: Materialfv (offset 170) */
+ /* _mesa_function_pool[25168]: Materialfv (offset 170) */
"iip\0"
"glMaterialfv\0"
"\0"
- /* _mesa_function_pool[24945]: TexCoord3fv (offset 113) */
+ /* _mesa_function_pool[25186]: TexCoord3fv (offset 113) */
"p\0"
"glTexCoord3fv\0"
"\0"
- /* _mesa_function_pool[24962]: FogCoordfvEXT (will be remapped) */
+ /* _mesa_function_pool[25203]: FogCoordfvEXT (will be remapped) */
"p\0"
"glFogCoordfv\0"
"glFogCoordfvEXT\0"
"\0"
- /* _mesa_function_pool[24994]: MultiTexCoord1ivARB (offset 381) */
+ /* _mesa_function_pool[25235]: MultiTexCoord1ivARB (offset 381) */
"ip\0"
"glMultiTexCoord1iv\0"
"glMultiTexCoord1ivARB\0"
"\0"
- /* _mesa_function_pool[25039]: SecondaryColor3ubEXT (will be remapped) */
+ /* _mesa_function_pool[25280]: SecondaryColor3ubEXT (will be remapped) */
"iii\0"
"glSecondaryColor3ub\0"
"glSecondaryColor3ubEXT\0"
"\0"
- /* _mesa_function_pool[25087]: MultiTexCoord2ivARB (offset 389) */
+ /* _mesa_function_pool[25328]: MultiTexCoord2ivARB (offset 389) */
"ip\0"
"glMultiTexCoord2iv\0"
"glMultiTexCoord2ivARB\0"
"\0"
- /* _mesa_function_pool[25132]: FogFuncSGIS (dynamic) */
+ /* _mesa_function_pool[25373]: FogFuncSGIS (dynamic) */
"ip\0"
"glFogFuncSGIS\0"
"\0"
- /* _mesa_function_pool[25150]: CopyTexSubImage2D (offset 326) */
+ /* _mesa_function_pool[25391]: CopyTexSubImage2D (offset 326) */
"iiiiiiii\0"
"glCopyTexSubImage2D\0"
"glCopyTexSubImage2DEXT\0"
"\0"
- /* _mesa_function_pool[25203]: GetObjectParameterivARB (will be remapped) */
+ /* _mesa_function_pool[25444]: GetObjectParameterivARB (will be remapped) */
"iip\0"
"glGetObjectParameterivARB\0"
"\0"
- /* _mesa_function_pool[25234]: Color3iv (offset 16) */
+ /* _mesa_function_pool[25475]: Color3iv (offset 16) */
"p\0"
"glColor3iv\0"
"\0"
- /* _mesa_function_pool[25248]: TexCoord4fVertex4fSUN (dynamic) */
+ /* _mesa_function_pool[25489]: TexCoord4fVertex4fSUN (dynamic) */
"ffffffff\0"
"glTexCoord4fVertex4fSUN\0"
"\0"
- /* _mesa_function_pool[25282]: DrawElements (offset 311) */
+ /* _mesa_function_pool[25523]: DrawElements (offset 311) */
"iiip\0"
"glDrawElements\0"
"\0"
- /* _mesa_function_pool[25303]: BindVertexArrayAPPLE (will be remapped) */
+ /* _mesa_function_pool[25544]: BindVertexArrayAPPLE (will be remapped) */
"i\0"
"glBindVertexArrayAPPLE\0"
"\0"
- /* _mesa_function_pool[25329]: GetProgramLocalParameterdvARB (will be remapped) */
+ /* _mesa_function_pool[25570]: GetProgramLocalParameterdvARB (will be remapped) */
"iip\0"
"glGetProgramLocalParameterdvARB\0"
"\0"
- /* _mesa_function_pool[25366]: GetHistogramParameteriv (offset 363) */
+ /* _mesa_function_pool[25607]: GetHistogramParameteriv (offset 363) */
"iip\0"
"glGetHistogramParameteriv\0"
"glGetHistogramParameterivEXT\0"
"\0"
- /* _mesa_function_pool[25426]: MultiTexCoord1iARB (offset 380) */
+ /* _mesa_function_pool[25667]: MultiTexCoord1iARB (offset 380) */
"ii\0"
"glMultiTexCoord1i\0"
"glMultiTexCoord1iARB\0"
"\0"
- /* _mesa_function_pool[25469]: GetConvolutionFilter (offset 356) */
+ /* _mesa_function_pool[25710]: GetConvolutionFilter (offset 356) */
"iiip\0"
"glGetConvolutionFilter\0"
"glGetConvolutionFilterEXT\0"
"\0"
- /* _mesa_function_pool[25524]: GetProgramivARB (will be remapped) */
+ /* _mesa_function_pool[25765]: GetProgramivARB (will be remapped) */
"iip\0"
"glGetProgramivARB\0"
"\0"
- /* _mesa_function_pool[25547]: BlendFuncSeparateEXT (will be remapped) */
+ /* _mesa_function_pool[25788]: BlendFuncSeparateEXT (will be remapped) */
"iiii\0"
"glBlendFuncSeparate\0"
"glBlendFuncSeparateEXT\0"
"glBlendFuncSeparateINGR\0"
"\0"
- /* _mesa_function_pool[25620]: MapBufferRange (will be remapped) */
+ /* _mesa_function_pool[25861]: MapBufferRange (will be remapped) */
"iiii\0"
"glMapBufferRange\0"
"\0"
- /* _mesa_function_pool[25643]: ProgramParameters4dvNV (will be remapped) */
+ /* _mesa_function_pool[25884]: ProgramParameters4dvNV (will be remapped) */
"iiip\0"
"glProgramParameters4dvNV\0"
"\0"
- /* _mesa_function_pool[25674]: TexCoord2fColor3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[25915]: TexCoord2fColor3fVertex3fvSUN (dynamic) */
"ppp\0"
"glTexCoord2fColor3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[25711]: EvalPoint2 (offset 239) */
+ /* _mesa_function_pool[25952]: EvalPoint2 (offset 239) */
"ii\0"
"glEvalPoint2\0"
"\0"
- /* _mesa_function_pool[25728]: EvalPoint1 (offset 237) */
+ /* _mesa_function_pool[25969]: EvalPoint1 (offset 237) */
"i\0"
"glEvalPoint1\0"
"\0"
- /* _mesa_function_pool[25744]: Binormal3dvEXT (dynamic) */
+ /* _mesa_function_pool[25985]: Binormal3dvEXT (dynamic) */
"p\0"
"glBinormal3dvEXT\0"
"\0"
- /* _mesa_function_pool[25764]: PopMatrix (offset 297) */
+ /* _mesa_function_pool[26005]: PopMatrix (offset 297) */
"\0"
"glPopMatrix\0"
"\0"
- /* _mesa_function_pool[25778]: FinishFenceNV (will be remapped) */
+ /* _mesa_function_pool[26019]: FinishFenceNV (will be remapped) */
"i\0"
"glFinishFenceNV\0"
"\0"
- /* _mesa_function_pool[25797]: GetFogFuncSGIS (dynamic) */
+ /* _mesa_function_pool[26038]: GetFogFuncSGIS (dynamic) */
"p\0"
"glGetFogFuncSGIS\0"
"\0"
- /* _mesa_function_pool[25817]: GetUniformLocationARB (will be remapped) */
+ /* _mesa_function_pool[26058]: GetUniformLocationARB (will be remapped) */
"ip\0"
"glGetUniformLocation\0"
"glGetUniformLocationARB\0"
"\0"
- /* _mesa_function_pool[25866]: SecondaryColor3fEXT (will be remapped) */
+ /* _mesa_function_pool[26107]: SecondaryColor3fEXT (will be remapped) */
"fff\0"
"glSecondaryColor3f\0"
"glSecondaryColor3fEXT\0"
"\0"
- /* _mesa_function_pool[25912]: GetTexGeniv (offset 280) */
+ /* _mesa_function_pool[26153]: GetTexGeniv (offset 280) */
"iip\0"
"glGetTexGeniv\0"
"\0"
- /* _mesa_function_pool[25931]: CombinerInputNV (will be remapped) */
+ /* _mesa_function_pool[26172]: CombinerInputNV (will be remapped) */
"iiiiii\0"
"glCombinerInputNV\0"
"\0"
- /* _mesa_function_pool[25957]: VertexAttrib3sARB (will be remapped) */
+ /* _mesa_function_pool[26198]: VertexAttrib3sARB (will be remapped) */
"iiii\0"
"glVertexAttrib3s\0"
"glVertexAttrib3sARB\0"
"\0"
- /* _mesa_function_pool[26000]: IsTransformFeedback (will be remapped) */
+ /* _mesa_function_pool[26241]: IsTransformFeedback (will be remapped) */
"i\0"
"glIsTransformFeedback\0"
"\0"
- /* _mesa_function_pool[26025]: ReplacementCodeuiNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[26266]: ReplacementCodeuiNormal3fVertex3fvSUN (dynamic) */
"ppp\0"
"glReplacementCodeuiNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[26070]: Map2d (offset 222) */
+ /* _mesa_function_pool[26311]: Map2d (offset 222) */
"iddiiddiip\0"
"glMap2d\0"
"\0"
- /* _mesa_function_pool[26090]: Map2f (offset 223) */
+ /* _mesa_function_pool[26331]: Map2f (offset 223) */
"iffiiffiip\0"
"glMap2f\0"
"\0"
- /* _mesa_function_pool[26110]: ProgramStringARB (will be remapped) */
+ /* _mesa_function_pool[26351]: ProgramStringARB (will be remapped) */
"iiip\0"
"glProgramStringARB\0"
"\0"
- /* _mesa_function_pool[26135]: Vertex4s (offset 148) */
+ /* _mesa_function_pool[26376]: Vertex4s (offset 148) */
"iiii\0"
"glVertex4s\0"
"\0"
- /* _mesa_function_pool[26152]: TexCoord4fVertex4fvSUN (dynamic) */
+ /* _mesa_function_pool[26393]: TexCoord4fVertex4fvSUN (dynamic) */
"pp\0"
"glTexCoord4fVertex4fvSUN\0"
"\0"
- /* _mesa_function_pool[26181]: FragmentLightModelivSGIX (dynamic) */
+ /* _mesa_function_pool[26422]: FragmentLightModelivSGIX (dynamic) */
"ip\0"
"glFragmentLightModelivSGIX\0"
"\0"
- /* _mesa_function_pool[26212]: VertexAttrib1fNV (will be remapped) */
+ /* _mesa_function_pool[26453]: VertexAttrib1fNV (will be remapped) */
"if\0"
"glVertexAttrib1fNV\0"
"\0"
- /* _mesa_function_pool[26235]: Vertex4f (offset 144) */
+ /* _mesa_function_pool[26476]: Vertex4f (offset 144) */
"ffff\0"
"glVertex4f\0"
"\0"
- /* _mesa_function_pool[26252]: EvalCoord1d (offset 228) */
+ /* _mesa_function_pool[26493]: EvalCoord1d (offset 228) */
"d\0"
"glEvalCoord1d\0"
"\0"
- /* _mesa_function_pool[26269]: Vertex4d (offset 142) */
+ /* _mesa_function_pool[26510]: Vertex4d (offset 142) */
"dddd\0"
"glVertex4d\0"
"\0"
- /* _mesa_function_pool[26286]: RasterPos4dv (offset 79) */
+ /* _mesa_function_pool[26527]: RasterPos4dv (offset 79) */
"p\0"
"glRasterPos4dv\0"
"\0"
- /* _mesa_function_pool[26304]: FragmentLightfSGIX (dynamic) */
+ /* _mesa_function_pool[26545]: UseShaderProgramEXT (will be remapped) */
+ "ii\0"
+ "glUseShaderProgramEXT\0"
+ "\0"
+ /* _mesa_function_pool[26571]: FragmentLightfSGIX (dynamic) */
"iif\0"
"glFragmentLightfSGIX\0"
"\0"
- /* _mesa_function_pool[26330]: GetCompressedTexImageARB (will be remapped) */
+ /* _mesa_function_pool[26597]: GetCompressedTexImageARB (will be remapped) */
"iip\0"
"glGetCompressedTexImage\0"
"glGetCompressedTexImageARB\0"
"\0"
- /* _mesa_function_pool[26386]: GetTexGenfv (offset 279) */
+ /* _mesa_function_pool[26653]: GetTexGenfv (offset 279) */
"iip\0"
"glGetTexGenfv\0"
"\0"
- /* _mesa_function_pool[26405]: Vertex4i (offset 146) */
+ /* _mesa_function_pool[26672]: Vertex4i (offset 146) */
"iiii\0"
"glVertex4i\0"
"\0"
- /* _mesa_function_pool[26422]: VertexWeightPointerEXT (dynamic) */
+ /* _mesa_function_pool[26689]: VertexWeightPointerEXT (dynamic) */
"iiip\0"
"glVertexWeightPointerEXT\0"
"\0"
- /* _mesa_function_pool[26453]: GetHistogram (offset 361) */
+ /* _mesa_function_pool[26720]: GetHistogram (offset 361) */
"iiiip\0"
"glGetHistogram\0"
"glGetHistogramEXT\0"
"\0"
- /* _mesa_function_pool[26493]: ActiveStencilFaceEXT (will be remapped) */
+ /* _mesa_function_pool[26760]: ActiveStencilFaceEXT (will be remapped) */
"i\0"
"glActiveStencilFaceEXT\0"
"\0"
- /* _mesa_function_pool[26519]: StencilFuncSeparateATI (will be remapped) */
+ /* _mesa_function_pool[26786]: StencilFuncSeparateATI (will be remapped) */
"iiii\0"
"glStencilFuncSeparateATI\0"
"\0"
- /* _mesa_function_pool[26550]: Materialf (offset 169) */
+ /* _mesa_function_pool[26817]: Materialf (offset 169) */
"iif\0"
"glMaterialf\0"
"\0"
- /* _mesa_function_pool[26567]: GetShaderSourceARB (will be remapped) */
+ /* _mesa_function_pool[26834]: GetShaderSourceARB (will be remapped) */
"iipp\0"
"glGetShaderSource\0"
"glGetShaderSourceARB\0"
"\0"
- /* _mesa_function_pool[26612]: IglooInterfaceSGIX (dynamic) */
+ /* _mesa_function_pool[26879]: IglooInterfaceSGIX (dynamic) */
"ip\0"
"glIglooInterfaceSGIX\0"
"\0"
- /* _mesa_function_pool[26637]: Materiali (offset 171) */
+ /* _mesa_function_pool[26904]: Materiali (offset 171) */
"iii\0"
"glMateriali\0"
"\0"
- /* _mesa_function_pool[26654]: VertexAttrib4dNV (will be remapped) */
+ /* _mesa_function_pool[26921]: VertexAttrib4dNV (will be remapped) */
"idddd\0"
"glVertexAttrib4dNV\0"
"\0"
- /* _mesa_function_pool[26680]: MultiModeDrawElementsIBM (will be remapped) */
+ /* _mesa_function_pool[26947]: MultiModeDrawElementsIBM (will be remapped) */
"ppipii\0"
"glMultiModeDrawElementsIBM\0"
"\0"
- /* _mesa_function_pool[26715]: Indexsv (offset 51) */
+ /* _mesa_function_pool[26982]: Indexsv (offset 51) */
"p\0"
"glIndexsv\0"
"\0"
- /* _mesa_function_pool[26728]: MultiTexCoord4svARB (offset 407) */
+ /* _mesa_function_pool[26995]: MultiTexCoord4svARB (offset 407) */
"ip\0"
"glMultiTexCoord4sv\0"
"glMultiTexCoord4svARB\0"
"\0"
- /* _mesa_function_pool[26773]: LightModelfv (offset 164) */
+ /* _mesa_function_pool[27040]: LightModelfv (offset 164) */
"ip\0"
"glLightModelfv\0"
"\0"
- /* _mesa_function_pool[26792]: TexCoord2dv (offset 103) */
+ /* _mesa_function_pool[27059]: TexCoord2dv (offset 103) */
"p\0"
"glTexCoord2dv\0"
"\0"
- /* _mesa_function_pool[26809]: GenQueriesARB (will be remapped) */
+ /* _mesa_function_pool[27076]: GenQueriesARB (will be remapped) */
"ip\0"
"glGenQueries\0"
"glGenQueriesARB\0"
"\0"
- /* _mesa_function_pool[26842]: EvalCoord1dv (offset 229) */
+ /* _mesa_function_pool[27109]: EvalCoord1dv (offset 229) */
"p\0"
"glEvalCoord1dv\0"
"\0"
- /* _mesa_function_pool[26860]: ReplacementCodeuiVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[27127]: ReplacementCodeuiVertex3fSUN (dynamic) */
"ifff\0"
"glReplacementCodeuiVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[26897]: Translated (offset 303) */
+ /* _mesa_function_pool[27164]: Translated (offset 303) */
"ddd\0"
"glTranslated\0"
"\0"
- /* _mesa_function_pool[26915]: Translatef (offset 304) */
+ /* _mesa_function_pool[27182]: Translatef (offset 304) */
"fff\0"
"glTranslatef\0"
"\0"
- /* _mesa_function_pool[26933]: StencilMask (offset 209) */
+ /* _mesa_function_pool[27200]: StencilMask (offset 209) */
"i\0"
"glStencilMask\0"
"\0"
- /* _mesa_function_pool[26950]: Tangent3iEXT (dynamic) */
+ /* _mesa_function_pool[27217]: Tangent3iEXT (dynamic) */
"iii\0"
"glTangent3iEXT\0"
"\0"
- /* _mesa_function_pool[26970]: GetLightiv (offset 265) */
+ /* _mesa_function_pool[27237]: GetLightiv (offset 265) */
"iip\0"
"glGetLightiv\0"
"\0"
- /* _mesa_function_pool[26988]: DrawMeshArraysSUN (dynamic) */
+ /* _mesa_function_pool[27255]: DrawMeshArraysSUN (dynamic) */
"iiii\0"
"glDrawMeshArraysSUN\0"
"\0"
- /* _mesa_function_pool[27014]: IsList (offset 287) */
+ /* _mesa_function_pool[27281]: IsList (offset 287) */
"i\0"
"glIsList\0"
"\0"
- /* _mesa_function_pool[27026]: IsSync (will be remapped) */
+ /* _mesa_function_pool[27293]: IsSync (will be remapped) */
"i\0"
"glIsSync\0"
"\0"
- /* _mesa_function_pool[27038]: RenderMode (offset 196) */
+ /* _mesa_function_pool[27305]: RenderMode (offset 196) */
"i\0"
"glRenderMode\0"
"\0"
- /* _mesa_function_pool[27054]: GetMapControlPointsNV (dynamic) */
+ /* _mesa_function_pool[27321]: GetMapControlPointsNV (dynamic) */
"iiiiiip\0"
"glGetMapControlPointsNV\0"
"\0"
- /* _mesa_function_pool[27087]: DrawBuffersARB (will be remapped) */
+ /* _mesa_function_pool[27354]: DrawBuffersARB (will be remapped) */
"ip\0"
"glDrawBuffers\0"
"glDrawBuffersARB\0"
"glDrawBuffersATI\0"
"\0"
- /* _mesa_function_pool[27139]: ProgramLocalParameter4fARB (will be remapped) */
+ /* _mesa_function_pool[27406]: ProgramLocalParameter4fARB (will be remapped) */
"iiffff\0"
"glProgramLocalParameter4fARB\0"
"\0"
- /* _mesa_function_pool[27176]: SpriteParameterivSGIX (dynamic) */
+ /* _mesa_function_pool[27443]: SpriteParameterivSGIX (dynamic) */
"ip\0"
"glSpriteParameterivSGIX\0"
"\0"
- /* _mesa_function_pool[27204]: ProvokingVertexEXT (will be remapped) */
+ /* _mesa_function_pool[27471]: ProvokingVertexEXT (will be remapped) */
"i\0"
"glProvokingVertexEXT\0"
"glProvokingVertex\0"
"\0"
- /* _mesa_function_pool[27246]: MultiTexCoord1fARB (offset 378) */
+ /* _mesa_function_pool[27513]: MultiTexCoord1fARB (offset 378) */
"if\0"
"glMultiTexCoord1f\0"
"glMultiTexCoord1fARB\0"
"\0"
- /* _mesa_function_pool[27289]: LoadName (offset 198) */
+ /* _mesa_function_pool[27556]: LoadName (offset 198) */
"i\0"
"glLoadName\0"
"\0"
- /* _mesa_function_pool[27303]: VertexAttribs4ubvNV (will be remapped) */
+ /* _mesa_function_pool[27570]: VertexAttribs4ubvNV (will be remapped) */
"iip\0"
"glVertexAttribs4ubvNV\0"
"\0"
- /* _mesa_function_pool[27330]: WeightsvARB (dynamic) */
+ /* _mesa_function_pool[27597]: WeightsvARB (dynamic) */
"ip\0"
"glWeightsvARB\0"
"\0"
- /* _mesa_function_pool[27348]: Uniform1fvARB (will be remapped) */
+ /* _mesa_function_pool[27615]: Uniform1fvARB (will be remapped) */
"iip\0"
"glUniform1fv\0"
"glUniform1fvARB\0"
"\0"
- /* _mesa_function_pool[27382]: CopyTexSubImage1D (offset 325) */
+ /* _mesa_function_pool[27649]: CopyTexSubImage1D (offset 325) */
"iiiiii\0"
"glCopyTexSubImage1D\0"
"glCopyTexSubImage1DEXT\0"
"\0"
- /* _mesa_function_pool[27433]: CullFace (offset 152) */
+ /* _mesa_function_pool[27700]: CullFace (offset 152) */
"i\0"
"glCullFace\0"
"\0"
- /* _mesa_function_pool[27447]: BindTexture (offset 307) */
+ /* _mesa_function_pool[27714]: BindTexture (offset 307) */
"ii\0"
"glBindTexture\0"
"glBindTextureEXT\0"
"\0"
- /* _mesa_function_pool[27482]: BeginFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[27749]: BeginFragmentShaderATI (will be remapped) */
"\0"
"glBeginFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[27509]: MultiTexCoord4fARB (offset 402) */
+ /* _mesa_function_pool[27776]: MultiTexCoord4fARB (offset 402) */
"iffff\0"
"glMultiTexCoord4f\0"
"glMultiTexCoord4fARB\0"
"\0"
- /* _mesa_function_pool[27555]: VertexAttribs3svNV (will be remapped) */
+ /* _mesa_function_pool[27822]: VertexAttribs3svNV (will be remapped) */
"iip\0"
"glVertexAttribs3svNV\0"
"\0"
- /* _mesa_function_pool[27581]: StencilFunc (offset 243) */
+ /* _mesa_function_pool[27848]: StencilFunc (offset 243) */
"iii\0"
"glStencilFunc\0"
"\0"
- /* _mesa_function_pool[27600]: CopyPixels (offset 255) */
+ /* _mesa_function_pool[27867]: CopyPixels (offset 255) */
"iiiii\0"
"glCopyPixels\0"
"\0"
- /* _mesa_function_pool[27620]: Rectsv (offset 93) */
+ /* _mesa_function_pool[27887]: Rectsv (offset 93) */
"pp\0"
"glRectsv\0"
"\0"
- /* _mesa_function_pool[27633]: ReplacementCodeuivSUN (dynamic) */
+ /* _mesa_function_pool[27900]: ReplacementCodeuivSUN (dynamic) */
"p\0"
"glReplacementCodeuivSUN\0"
"\0"
- /* _mesa_function_pool[27660]: EnableVertexAttribArrayARB (will be remapped) */
+ /* _mesa_function_pool[27927]: EnableVertexAttribArrayARB (will be remapped) */
"i\0"
"glEnableVertexAttribArray\0"
"glEnableVertexAttribArrayARB\0"
"\0"
- /* _mesa_function_pool[27718]: NormalPointervINTEL (dynamic) */
+ /* _mesa_function_pool[27985]: NormalPointervINTEL (dynamic) */
"ip\0"
"glNormalPointervINTEL\0"
"\0"
- /* _mesa_function_pool[27744]: CopyConvolutionFilter2D (offset 355) */
+ /* _mesa_function_pool[28011]: CopyConvolutionFilter2D (offset 355) */
"iiiiii\0"
"glCopyConvolutionFilter2D\0"
"glCopyConvolutionFilter2DEXT\0"
"\0"
- /* _mesa_function_pool[27807]: WindowPos3ivMESA (will be remapped) */
+ /* _mesa_function_pool[28074]: WindowPos3ivMESA (will be remapped) */
"p\0"
"glWindowPos3iv\0"
"glWindowPos3ivARB\0"
"glWindowPos3ivMESA\0"
"\0"
- /* _mesa_function_pool[27862]: CopyBufferSubData (will be remapped) */
+ /* _mesa_function_pool[28129]: CopyBufferSubData (will be remapped) */
"iiiii\0"
"glCopyBufferSubData\0"
"\0"
- /* _mesa_function_pool[27889]: NormalPointer (offset 318) */
+ /* _mesa_function_pool[28156]: NormalPointer (offset 318) */
"iip\0"
"glNormalPointer\0"
"\0"
- /* _mesa_function_pool[27910]: TexParameterfv (offset 179) */
+ /* _mesa_function_pool[28177]: TexParameterfv (offset 179) */
"iip\0"
"glTexParameterfv\0"
"\0"
- /* _mesa_function_pool[27932]: IsBufferARB (will be remapped) */
+ /* _mesa_function_pool[28199]: IsBufferARB (will be remapped) */
"i\0"
"glIsBuffer\0"
"glIsBufferARB\0"
"\0"
- /* _mesa_function_pool[27960]: WindowPos4iMESA (will be remapped) */
+ /* _mesa_function_pool[28227]: WindowPos4iMESA (will be remapped) */
"iiii\0"
"glWindowPos4iMESA\0"
"\0"
- /* _mesa_function_pool[27984]: VertexAttrib4uivARB (will be remapped) */
+ /* _mesa_function_pool[28251]: VertexAttrib4uivARB (will be remapped) */
"ip\0"
"glVertexAttrib4uiv\0"
"glVertexAttrib4uivARB\0"
"\0"
- /* _mesa_function_pool[28029]: Tangent3bvEXT (dynamic) */
+ /* _mesa_function_pool[28296]: Tangent3bvEXT (dynamic) */
"p\0"
"glTangent3bvEXT\0"
"\0"
- /* _mesa_function_pool[28048]: UniformMatrix3x4fv (will be remapped) */
+ /* _mesa_function_pool[28315]: UniformMatrix3x4fv (will be remapped) */
"iiip\0"
"glUniformMatrix3x4fv\0"
"\0"
- /* _mesa_function_pool[28075]: ClipPlane (offset 150) */
+ /* _mesa_function_pool[28342]: ClipPlane (offset 150) */
"ip\0"
"glClipPlane\0"
"\0"
- /* _mesa_function_pool[28091]: Recti (offset 90) */
+ /* _mesa_function_pool[28358]: Recti (offset 90) */
"iiii\0"
"glRecti\0"
"\0"
- /* _mesa_function_pool[28105]: DrawRangeElementsBaseVertex (will be remapped) */
+ /* _mesa_function_pool[28372]: DrawRangeElementsBaseVertex (will be remapped) */
"iiiiipi\0"
"glDrawRangeElementsBaseVertex\0"
"\0"
- /* _mesa_function_pool[28144]: TexCoordPointervINTEL (dynamic) */
+ /* _mesa_function_pool[28411]: TexCoordPointervINTEL (dynamic) */
"iip\0"
"glTexCoordPointervINTEL\0"
"\0"
- /* _mesa_function_pool[28173]: DeleteBuffersARB (will be remapped) */
+ /* _mesa_function_pool[28440]: DeleteBuffersARB (will be remapped) */
"ip\0"
"glDeleteBuffers\0"
"glDeleteBuffersARB\0"
"\0"
- /* _mesa_function_pool[28212]: PixelTransformParameterfvEXT (dynamic) */
+ /* _mesa_function_pool[28479]: PixelTransformParameterfvEXT (dynamic) */
"iip\0"
"glPixelTransformParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[28248]: WindowPos4fvMESA (will be remapped) */
+ /* _mesa_function_pool[28515]: PrimitiveRestartNV (will be remapped) */
+ "\0"
+ "glPrimitiveRestartNV\0"
+ "\0"
+ /* _mesa_function_pool[28538]: WindowPos4fvMESA (will be remapped) */
"p\0"
"glWindowPos4fvMESA\0"
"\0"
- /* _mesa_function_pool[28270]: GetPixelMapuiv (offset 272) */
+ /* _mesa_function_pool[28560]: GetPixelMapuiv (offset 272) */
"ip\0"
"glGetPixelMapuiv\0"
"\0"
- /* _mesa_function_pool[28291]: Rectf (offset 88) */
+ /* _mesa_function_pool[28581]: Rectf (offset 88) */
"ffff\0"
"glRectf\0"
"\0"
- /* _mesa_function_pool[28305]: VertexAttrib1sNV (will be remapped) */
+ /* _mesa_function_pool[28595]: VertexAttrib1sNV (will be remapped) */
"ii\0"
"glVertexAttrib1sNV\0"
"\0"
- /* _mesa_function_pool[28328]: Indexfv (offset 47) */
+ /* _mesa_function_pool[28618]: Indexfv (offset 47) */
"p\0"
"glIndexfv\0"
"\0"
- /* _mesa_function_pool[28341]: SecondaryColor3svEXT (will be remapped) */
+ /* _mesa_function_pool[28631]: SecondaryColor3svEXT (will be remapped) */
"p\0"
"glSecondaryColor3sv\0"
"glSecondaryColor3svEXT\0"
"\0"
- /* _mesa_function_pool[28387]: LoadTransposeMatrixfARB (will be remapped) */
+ /* _mesa_function_pool[28677]: LoadTransposeMatrixfARB (will be remapped) */
"p\0"
"glLoadTransposeMatrixf\0"
"glLoadTransposeMatrixfARB\0"
"\0"
- /* _mesa_function_pool[28439]: GetPointerv (offset 329) */
+ /* _mesa_function_pool[28729]: GetPointerv (offset 329) */
"ip\0"
"glGetPointerv\0"
"glGetPointervEXT\0"
"\0"
- /* _mesa_function_pool[28474]: Tangent3bEXT (dynamic) */
+ /* _mesa_function_pool[28764]: Tangent3bEXT (dynamic) */
"iii\0"
"glTangent3bEXT\0"
"\0"
- /* _mesa_function_pool[28494]: CombinerParameterfNV (will be remapped) */
+ /* _mesa_function_pool[28784]: CombinerParameterfNV (will be remapped) */
"if\0"
"glCombinerParameterfNV\0"
"\0"
- /* _mesa_function_pool[28521]: IndexMask (offset 212) */
+ /* _mesa_function_pool[28811]: IndexMask (offset 212) */
"i\0"
"glIndexMask\0"
"\0"
- /* _mesa_function_pool[28536]: BindProgramNV (will be remapped) */
+ /* _mesa_function_pool[28826]: BindProgramNV (will be remapped) */
"ii\0"
"glBindProgramARB\0"
"glBindProgramNV\0"
"\0"
- /* _mesa_function_pool[28573]: VertexAttrib4svARB (will be remapped) */
+ /* _mesa_function_pool[28863]: VertexAttrib4svARB (will be remapped) */
"ip\0"
"glVertexAttrib4sv\0"
"glVertexAttrib4svARB\0"
"\0"
- /* _mesa_function_pool[28616]: GetFloatv (offset 262) */
+ /* _mesa_function_pool[28906]: GetFloatv (offset 262) */
"ip\0"
"glGetFloatv\0"
"\0"
- /* _mesa_function_pool[28632]: CreateDebugObjectMESA (dynamic) */
+ /* _mesa_function_pool[28922]: CreateDebugObjectMESA (dynamic) */
"\0"
"glCreateDebugObjectMESA\0"
"\0"
- /* _mesa_function_pool[28658]: GetShaderiv (will be remapped) */
+ /* _mesa_function_pool[28948]: GetShaderiv (will be remapped) */
"iip\0"
"glGetShaderiv\0"
"\0"
- /* _mesa_function_pool[28677]: ClientWaitSync (will be remapped) */
+ /* _mesa_function_pool[28967]: ClientWaitSync (will be remapped) */
"iii\0"
"glClientWaitSync\0"
"\0"
- /* _mesa_function_pool[28699]: TexCoord4s (offset 124) */
+ /* _mesa_function_pool[28989]: TexCoord4s (offset 124) */
"iiii\0"
"glTexCoord4s\0"
"\0"
- /* _mesa_function_pool[28718]: TexCoord3sv (offset 117) */
+ /* _mesa_function_pool[29008]: TexCoord3sv (offset 117) */
"p\0"
"glTexCoord3sv\0"
"\0"
- /* _mesa_function_pool[28735]: BindFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[29025]: BindFragmentShaderATI (will be remapped) */
"i\0"
"glBindFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[28762]: PopAttrib (offset 218) */
+ /* _mesa_function_pool[29052]: PopAttrib (offset 218) */
"\0"
"glPopAttrib\0"
"\0"
- /* _mesa_function_pool[28776]: Fogfv (offset 154) */
+ /* _mesa_function_pool[29066]: Fogfv (offset 154) */
"ip\0"
"glFogfv\0"
"\0"
- /* _mesa_function_pool[28788]: UnmapBufferARB (will be remapped) */
+ /* _mesa_function_pool[29078]: UnmapBufferARB (will be remapped) */
"i\0"
"glUnmapBuffer\0"
"glUnmapBufferARB\0"
"\0"
- /* _mesa_function_pool[28822]: InitNames (offset 197) */
+ /* _mesa_function_pool[29112]: InitNames (offset 197) */
"\0"
"glInitNames\0"
"\0"
- /* _mesa_function_pool[28836]: Normal3sv (offset 61) */
+ /* _mesa_function_pool[29126]: Normal3sv (offset 61) */
"p\0"
"glNormal3sv\0"
"\0"
- /* _mesa_function_pool[28851]: Minmax (offset 368) */
+ /* _mesa_function_pool[29141]: Minmax (offset 368) */
"iii\0"
"glMinmax\0"
"glMinmaxEXT\0"
"\0"
- /* _mesa_function_pool[28877]: TexCoord4d (offset 118) */
+ /* _mesa_function_pool[29167]: TexCoord4d (offset 118) */
"dddd\0"
"glTexCoord4d\0"
"\0"
- /* _mesa_function_pool[28896]: TexCoord4f (offset 120) */
+ /* _mesa_function_pool[29186]: TexCoord4f (offset 120) */
"ffff\0"
"glTexCoord4f\0"
"\0"
- /* _mesa_function_pool[28915]: FogCoorddvEXT (will be remapped) */
+ /* _mesa_function_pool[29205]: FogCoorddvEXT (will be remapped) */
"p\0"
"glFogCoorddv\0"
"glFogCoorddvEXT\0"
"\0"
- /* _mesa_function_pool[28947]: FinishTextureSUNX (dynamic) */
+ /* _mesa_function_pool[29237]: FinishTextureSUNX (dynamic) */
"\0"
"glFinishTextureSUNX\0"
"\0"
- /* _mesa_function_pool[28969]: GetFragmentLightfvSGIX (dynamic) */
+ /* _mesa_function_pool[29259]: GetFragmentLightfvSGIX (dynamic) */
"iip\0"
"glGetFragmentLightfvSGIX\0"
"\0"
- /* _mesa_function_pool[28999]: Binormal3fvEXT (dynamic) */
+ /* _mesa_function_pool[29289]: Binormal3fvEXT (dynamic) */
"p\0"
"glBinormal3fvEXT\0"
"\0"
- /* _mesa_function_pool[29019]: GetBooleanv (offset 258) */
+ /* _mesa_function_pool[29309]: GetBooleanv (offset 258) */
"ip\0"
"glGetBooleanv\0"
"\0"
- /* _mesa_function_pool[29037]: ColorFragmentOp3ATI (will be remapped) */
+ /* _mesa_function_pool[29327]: ColorFragmentOp3ATI (will be remapped) */
"iiiiiiiiiiiii\0"
"glColorFragmentOp3ATI\0"
"\0"
- /* _mesa_function_pool[29074]: Hint (offset 158) */
+ /* _mesa_function_pool[29364]: Hint (offset 158) */
"ii\0"
"glHint\0"
"\0"
- /* _mesa_function_pool[29085]: Color4dv (offset 28) */
+ /* _mesa_function_pool[29375]: Color4dv (offset 28) */
"p\0"
"glColor4dv\0"
"\0"
- /* _mesa_function_pool[29099]: VertexAttrib2svARB (will be remapped) */
+ /* _mesa_function_pool[29389]: VertexAttrib2svARB (will be remapped) */
"ip\0"
"glVertexAttrib2sv\0"
"glVertexAttrib2svARB\0"
"\0"
- /* _mesa_function_pool[29142]: AreProgramsResidentNV (will be remapped) */
+ /* _mesa_function_pool[29432]: AreProgramsResidentNV (will be remapped) */
"ipp\0"
"glAreProgramsResidentNV\0"
"\0"
- /* _mesa_function_pool[29171]: WindowPos3svMESA (will be remapped) */
+ /* _mesa_function_pool[29461]: WindowPos3svMESA (will be remapped) */
"p\0"
"glWindowPos3sv\0"
"glWindowPos3svARB\0"
"glWindowPos3svMESA\0"
"\0"
- /* _mesa_function_pool[29226]: CopyColorSubTable (offset 347) */
+ /* _mesa_function_pool[29516]: CopyColorSubTable (offset 347) */
"iiiii\0"
"glCopyColorSubTable\0"
"glCopyColorSubTableEXT\0"
"\0"
- /* _mesa_function_pool[29276]: WeightdvARB (dynamic) */
+ /* _mesa_function_pool[29566]: WeightdvARB (dynamic) */
"ip\0"
"glWeightdvARB\0"
"\0"
- /* _mesa_function_pool[29294]: DeleteRenderbuffersEXT (will be remapped) */
+ /* _mesa_function_pool[29584]: DeleteRenderbuffersEXT (will be remapped) */
"ip\0"
"glDeleteRenderbuffers\0"
"glDeleteRenderbuffersEXT\0"
"\0"
- /* _mesa_function_pool[29345]: VertexAttrib4NubvARB (will be remapped) */
+ /* _mesa_function_pool[29635]: VertexAttrib4NubvARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nubv\0"
"glVertexAttrib4NubvARB\0"
"\0"
- /* _mesa_function_pool[29392]: VertexAttrib3dvNV (will be remapped) */
+ /* _mesa_function_pool[29682]: VertexAttrib3dvNV (will be remapped) */
"ip\0"
"glVertexAttrib3dvNV\0"
"\0"
- /* _mesa_function_pool[29416]: GetObjectParameterfvARB (will be remapped) */
+ /* _mesa_function_pool[29706]: GetObjectParameterfvARB (will be remapped) */
"iip\0"
"glGetObjectParameterfvARB\0"
"\0"
- /* _mesa_function_pool[29447]: Vertex4iv (offset 147) */
+ /* _mesa_function_pool[29737]: Vertex4iv (offset 147) */
"p\0"
"glVertex4iv\0"
"\0"
- /* _mesa_function_pool[29462]: GetProgramEnvParameterdvARB (will be remapped) */
+ /* _mesa_function_pool[29752]: GetProgramEnvParameterdvARB (will be remapped) */
"iip\0"
"glGetProgramEnvParameterdvARB\0"
"\0"
- /* _mesa_function_pool[29497]: TexCoord4dv (offset 119) */
+ /* _mesa_function_pool[29787]: TexCoord4dv (offset 119) */
"p\0"
"glTexCoord4dv\0"
"\0"
- /* _mesa_function_pool[29514]: LockArraysEXT (will be remapped) */
+ /* _mesa_function_pool[29804]: LockArraysEXT (will be remapped) */
"ii\0"
"glLockArraysEXT\0"
"\0"
- /* _mesa_function_pool[29534]: Begin (offset 7) */
+ /* _mesa_function_pool[29824]: Begin (offset 7) */
"i\0"
"glBegin\0"
"\0"
- /* _mesa_function_pool[29545]: LightModeli (offset 165) */
+ /* _mesa_function_pool[29835]: LightModeli (offset 165) */
"ii\0"
"glLightModeli\0"
"\0"
- /* _mesa_function_pool[29563]: Rectfv (offset 89) */
+ /* _mesa_function_pool[29853]: Rectfv (offset 89) */
"pp\0"
"glRectfv\0"
"\0"
- /* _mesa_function_pool[29576]: LightModelf (offset 163) */
+ /* _mesa_function_pool[29866]: LightModelf (offset 163) */
"if\0"
"glLightModelf\0"
"\0"
- /* _mesa_function_pool[29594]: GetTexParameterfv (offset 282) */
+ /* _mesa_function_pool[29884]: GetTexParameterfv (offset 282) */
"iip\0"
"glGetTexParameterfv\0"
"\0"
- /* _mesa_function_pool[29619]: GetLightfv (offset 264) */
+ /* _mesa_function_pool[29909]: GetLightfv (offset 264) */
"iip\0"
"glGetLightfv\0"
"\0"
- /* _mesa_function_pool[29637]: PixelTransformParameterivEXT (dynamic) */
+ /* _mesa_function_pool[29927]: PixelTransformParameterivEXT (dynamic) */
"iip\0"
"glPixelTransformParameterivEXT\0"
"\0"
- /* _mesa_function_pool[29673]: BinormalPointerEXT (dynamic) */
+ /* _mesa_function_pool[29963]: BinormalPointerEXT (dynamic) */
"iip\0"
"glBinormalPointerEXT\0"
"\0"
- /* _mesa_function_pool[29699]: VertexAttrib1dNV (will be remapped) */
+ /* _mesa_function_pool[29989]: VertexAttrib1dNV (will be remapped) */
"id\0"
"glVertexAttrib1dNV\0"
"\0"
- /* _mesa_function_pool[29722]: GetCombinerInputParameterivNV (will be remapped) */
+ /* _mesa_function_pool[30012]: GetCombinerInputParameterivNV (will be remapped) */
"iiiip\0"
"glGetCombinerInputParameterivNV\0"
"\0"
- /* _mesa_function_pool[29761]: Disable (offset 214) */
+ /* _mesa_function_pool[30051]: Disable (offset 214) */
"i\0"
"glDisable\0"
"\0"
- /* _mesa_function_pool[29774]: MultiTexCoord2fvARB (offset 387) */
+ /* _mesa_function_pool[30064]: MultiTexCoord2fvARB (offset 387) */
"ip\0"
"glMultiTexCoord2fv\0"
"glMultiTexCoord2fvARB\0"
"\0"
- /* _mesa_function_pool[29819]: GetRenderbufferParameterivEXT (will be remapped) */
+ /* _mesa_function_pool[30109]: GetRenderbufferParameterivEXT (will be remapped) */
"iip\0"
"glGetRenderbufferParameteriv\0"
"glGetRenderbufferParameterivEXT\0"
"\0"
- /* _mesa_function_pool[29885]: CombinerParameterivNV (will be remapped) */
+ /* _mesa_function_pool[30175]: CombinerParameterivNV (will be remapped) */
"ip\0"
"glCombinerParameterivNV\0"
"\0"
- /* _mesa_function_pool[29913]: GenFragmentShadersATI (will be remapped) */
+ /* _mesa_function_pool[30203]: GenFragmentShadersATI (will be remapped) */
"i\0"
"glGenFragmentShadersATI\0"
"\0"
- /* _mesa_function_pool[29940]: DrawArrays (offset 310) */
+ /* _mesa_function_pool[30230]: DrawArrays (offset 310) */
"iii\0"
"glDrawArrays\0"
"glDrawArraysEXT\0"
"\0"
- /* _mesa_function_pool[29974]: WeightuivARB (dynamic) */
+ /* _mesa_function_pool[30264]: WeightuivARB (dynamic) */
"ip\0"
"glWeightuivARB\0"
"\0"
- /* _mesa_function_pool[29993]: VertexAttrib2sARB (will be remapped) */
+ /* _mesa_function_pool[30283]: VertexAttrib2sARB (will be remapped) */
"iii\0"
"glVertexAttrib2s\0"
"glVertexAttrib2sARB\0"
"\0"
- /* _mesa_function_pool[30035]: ColorMask (offset 210) */
+ /* _mesa_function_pool[30325]: ColorMask (offset 210) */
"iiii\0"
"glColorMask\0"
"\0"
- /* _mesa_function_pool[30053]: GenAsyncMarkersSGIX (dynamic) */
+ /* _mesa_function_pool[30343]: GenAsyncMarkersSGIX (dynamic) */
"i\0"
"glGenAsyncMarkersSGIX\0"
"\0"
- /* _mesa_function_pool[30078]: Tangent3svEXT (dynamic) */
+ /* _mesa_function_pool[30368]: Tangent3svEXT (dynamic) */
"p\0"
"glTangent3svEXT\0"
"\0"
- /* _mesa_function_pool[30097]: GetListParameterivSGIX (dynamic) */
+ /* _mesa_function_pool[30387]: GetListParameterivSGIX (dynamic) */
"iip\0"
"glGetListParameterivSGIX\0"
"\0"
- /* _mesa_function_pool[30127]: BindBufferARB (will be remapped) */
+ /* _mesa_function_pool[30417]: BindBufferARB (will be remapped) */
"ii\0"
"glBindBuffer\0"
"glBindBufferARB\0"
"\0"
- /* _mesa_function_pool[30160]: GetInfoLogARB (will be remapped) */
+ /* _mesa_function_pool[30450]: GetInfoLogARB (will be remapped) */
"iipp\0"
"glGetInfoLogARB\0"
"\0"
- /* _mesa_function_pool[30182]: RasterPos4iv (offset 83) */
+ /* _mesa_function_pool[30472]: RasterPos4iv (offset 83) */
"p\0"
"glRasterPos4iv\0"
"\0"
- /* _mesa_function_pool[30200]: Enable (offset 215) */
+ /* _mesa_function_pool[30490]: Enable (offset 215) */
"i\0"
"glEnable\0"
"\0"
- /* _mesa_function_pool[30212]: LineStipple (offset 167) */
+ /* _mesa_function_pool[30502]: LineStipple (offset 167) */
"ii\0"
"glLineStipple\0"
"\0"
- /* _mesa_function_pool[30230]: VertexAttribs4svNV (will be remapped) */
+ /* _mesa_function_pool[30520]: VertexAttribs4svNV (will be remapped) */
"iip\0"
"glVertexAttribs4svNV\0"
"\0"
- /* _mesa_function_pool[30256]: EdgeFlagPointerListIBM (dynamic) */
+ /* _mesa_function_pool[30546]: EdgeFlagPointerListIBM (dynamic) */
"ipi\0"
"glEdgeFlagPointerListIBM\0"
"\0"
- /* _mesa_function_pool[30286]: UniformMatrix3x2fv (will be remapped) */
+ /* _mesa_function_pool[30576]: UniformMatrix3x2fv (will be remapped) */
"iiip\0"
"glUniformMatrix3x2fv\0"
"\0"
- /* _mesa_function_pool[30313]: GetMinmaxParameterfv (offset 365) */
+ /* _mesa_function_pool[30603]: GetMinmaxParameterfv (offset 365) */
"iip\0"
"glGetMinmaxParameterfv\0"
"glGetMinmaxParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[30367]: VertexAttrib1fvARB (will be remapped) */
+ /* _mesa_function_pool[30657]: VertexAttrib1fvARB (will be remapped) */
"ip\0"
"glVertexAttrib1fv\0"
"glVertexAttrib1fvARB\0"
"\0"
- /* _mesa_function_pool[30410]: GenBuffersARB (will be remapped) */
+ /* _mesa_function_pool[30700]: GenBuffersARB (will be remapped) */
"ip\0"
"glGenBuffers\0"
"glGenBuffersARB\0"
"\0"
- /* _mesa_function_pool[30443]: VertexAttribs1svNV (will be remapped) */
+ /* _mesa_function_pool[30733]: VertexAttribs1svNV (will be remapped) */
"iip\0"
"glVertexAttribs1svNV\0"
"\0"
- /* _mesa_function_pool[30469]: Vertex3fv (offset 137) */
+ /* _mesa_function_pool[30759]: Vertex3fv (offset 137) */
"p\0"
"glVertex3fv\0"
"\0"
- /* _mesa_function_pool[30484]: GetTexBumpParameterivATI (will be remapped) */
+ /* _mesa_function_pool[30774]: GetTexBumpParameterivATI (will be remapped) */
"ip\0"
"glGetTexBumpParameterivATI\0"
"\0"
- /* _mesa_function_pool[30515]: Binormal3bEXT (dynamic) */
+ /* _mesa_function_pool[30805]: Binormal3bEXT (dynamic) */
"iii\0"
"glBinormal3bEXT\0"
"\0"
- /* _mesa_function_pool[30536]: FragmentMaterialivSGIX (dynamic) */
+ /* _mesa_function_pool[30826]: FragmentMaterialivSGIX (dynamic) */
"iip\0"
"glFragmentMaterialivSGIX\0"
"\0"
- /* _mesa_function_pool[30566]: IsRenderbufferEXT (will be remapped) */
+ /* _mesa_function_pool[30856]: IsRenderbufferEXT (will be remapped) */
"i\0"
"glIsRenderbuffer\0"
"glIsRenderbufferEXT\0"
"\0"
- /* _mesa_function_pool[30606]: GenProgramsNV (will be remapped) */
+ /* _mesa_function_pool[30896]: GenProgramsNV (will be remapped) */
"ip\0"
"glGenProgramsARB\0"
"glGenProgramsNV\0"
"\0"
- /* _mesa_function_pool[30643]: VertexAttrib4dvNV (will be remapped) */
+ /* _mesa_function_pool[30933]: VertexAttrib4dvNV (will be remapped) */
"ip\0"
"glVertexAttrib4dvNV\0"
"\0"
- /* _mesa_function_pool[30667]: EndFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[30957]: EndFragmentShaderATI (will be remapped) */
"\0"
"glEndFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[30692]: Binormal3iEXT (dynamic) */
+ /* _mesa_function_pool[30982]: Binormal3iEXT (dynamic) */
"iii\0"
"glBinormal3iEXT\0"
"\0"
- /* _mesa_function_pool[30713]: WindowPos2fMESA (will be remapped) */
+ /* _mesa_function_pool[31003]: WindowPos2fMESA (will be remapped) */
"ff\0"
"glWindowPos2f\0"
"glWindowPos2fARB\0"
@@ -4469,422 +4513,433 @@ static const char _mesa_function_pool[] =
/* these functions need to be remapped */
static const struct gl_function_pool_remap MESA_remap_table_functions[] = {
{ 1500, AttachShader_remap_index },
- { 9034, CreateProgram_remap_index },
- { 21160, CreateShader_remap_index },
- { 23473, DeleteProgram_remap_index },
- { 16944, DeleteShader_remap_index },
- { 21606, DetachShader_remap_index },
- { 16468, GetAttachedShaders_remap_index },
- { 4314, GetProgramInfoLog_remap_index },
+ { 9144, CreateProgram_remap_index },
+ { 21374, CreateShader_remap_index },
+ { 23687, DeleteProgram_remap_index },
+ { 17134, DeleteShader_remap_index },
+ { 21820, DetachShader_remap_index },
+ { 16658, GetAttachedShaders_remap_index },
+ { 4365, GetProgramInfoLog_remap_index },
{ 400, GetProgramiv_remap_index },
- { 5760, GetShaderInfoLog_remap_index },
- { 28658, GetShaderiv_remap_index },
- { 12276, IsProgram_remap_index },
- { 11275, IsShader_remap_index },
- { 9138, StencilFuncSeparate_remap_index },
- { 3526, StencilMaskSeparate_remap_index },
- { 6842, StencilOpSeparate_remap_index },
- { 20485, UniformMatrix2x3fv_remap_index },
+ { 5841, GetShaderInfoLog_remap_index },
+ { 28948, GetShaderiv_remap_index },
+ { 12386, IsProgram_remap_index },
+ { 11385, IsShader_remap_index },
+ { 9248, StencilFuncSeparate_remap_index },
+ { 3577, StencilMaskSeparate_remap_index },
+ { 6923, StencilOpSeparate_remap_index },
+ { 20675, UniformMatrix2x3fv_remap_index },
{ 2654, UniformMatrix2x4fv_remap_index },
- { 30286, UniformMatrix3x2fv_remap_index },
- { 28048, UniformMatrix3x4fv_remap_index },
- { 14968, UniformMatrix4x2fv_remap_index },
- { 2976, UniformMatrix4x3fv_remap_index },
- { 14629, DrawArraysInstanced_remap_index },
- { 15732, DrawElementsInstanced_remap_index },
- { 9052, LoadTransposeMatrixdARB_remap_index },
- { 28387, LoadTransposeMatrixfARB_remap_index },
- { 4972, MultTransposeMatrixdARB_remap_index },
- { 21793, MultTransposeMatrixfARB_remap_index },
+ { 30576, UniformMatrix3x2fv_remap_index },
+ { 28315, UniformMatrix3x4fv_remap_index },
+ { 15078, UniformMatrix4x2fv_remap_index },
+ { 3002, UniformMatrix4x3fv_remap_index },
+ { 14739, DrawArraysInstanced_remap_index },
+ { 15871, DrawElementsInstanced_remap_index },
+ { 9162, LoadTransposeMatrixdARB_remap_index },
+ { 28677, LoadTransposeMatrixfARB_remap_index },
+ { 5023, MultTransposeMatrixdARB_remap_index },
+ { 22007, MultTransposeMatrixfARB_remap_index },
{ 211, SampleCoverageARB_remap_index },
- { 5156, CompressedTexImage1DARB_remap_index },
- { 22276, CompressedTexImage2DARB_remap_index },
- { 3589, CompressedTexImage3DARB_remap_index },
- { 16760, CompressedTexSubImage1DARB_remap_index },
+ { 5207, CompressedTexImage1DARB_remap_index },
+ { 22490, CompressedTexImage2DARB_remap_index },
+ { 3640, CompressedTexImage3DARB_remap_index },
+ { 16950, CompressedTexSubImage1DARB_remap_index },
{ 1919, CompressedTexSubImage2DARB_remap_index },
- { 18621, CompressedTexSubImage3DARB_remap_index },
- { 26330, GetCompressedTexImageARB_remap_index },
- { 3434, DisableVertexAttribArrayARB_remap_index },
- { 27660, EnableVertexAttribArrayARB_remap_index },
- { 29462, GetProgramEnvParameterdvARB_remap_index },
- { 21673, GetProgramEnvParameterfvARB_remap_index },
- { 25329, GetProgramLocalParameterdvARB_remap_index },
- { 7284, GetProgramLocalParameterfvARB_remap_index },
- { 16851, GetProgramStringARB_remap_index },
- { 25524, GetProgramivARB_remap_index },
- { 18816, GetVertexAttribdvARB_remap_index },
- { 14857, GetVertexAttribfvARB_remap_index },
- { 8947, GetVertexAttribivARB_remap_index },
- { 17697, ProgramEnvParameter4dARB_remap_index },
- { 23246, ProgramEnvParameter4dvARB_remap_index },
- { 15465, ProgramEnvParameter4fARB_remap_index },
- { 8147, ProgramEnvParameter4fvARB_remap_index },
- { 3552, ProgramLocalParameter4dARB_remap_index },
- { 11986, ProgramLocalParameter4dvARB_remap_index },
- { 27139, ProgramLocalParameter4fARB_remap_index },
- { 23826, ProgramLocalParameter4fvARB_remap_index },
- { 26110, ProgramStringARB_remap_index },
- { 17947, VertexAttrib1dARB_remap_index },
- { 14433, VertexAttrib1dvARB_remap_index },
- { 3727, VertexAttrib1fARB_remap_index },
- { 30367, VertexAttrib1fvARB_remap_index },
- { 6368, VertexAttrib1sARB_remap_index },
+ { 18811, CompressedTexSubImage3DARB_remap_index },
+ { 26597, GetCompressedTexImageARB_remap_index },
+ { 3485, DisableVertexAttribArrayARB_remap_index },
+ { 27927, EnableVertexAttribArrayARB_remap_index },
+ { 29752, GetProgramEnvParameterdvARB_remap_index },
+ { 21887, GetProgramEnvParameterfvARB_remap_index },
+ { 25570, GetProgramLocalParameterdvARB_remap_index },
+ { 7365, GetProgramLocalParameterfvARB_remap_index },
+ { 17041, GetProgramStringARB_remap_index },
+ { 25765, GetProgramivARB_remap_index },
+ { 19006, GetVertexAttribdvARB_remap_index },
+ { 14967, GetVertexAttribfvARB_remap_index },
+ { 9028, GetVertexAttribivARB_remap_index },
+ { 17887, ProgramEnvParameter4dARB_remap_index },
+ { 23460, ProgramEnvParameter4dvARB_remap_index },
+ { 15575, ProgramEnvParameter4fARB_remap_index },
+ { 8228, ProgramEnvParameter4fvARB_remap_index },
+ { 3603, ProgramLocalParameter4dARB_remap_index },
+ { 12096, ProgramLocalParameter4dvARB_remap_index },
+ { 27406, ProgramLocalParameter4fARB_remap_index },
+ { 24040, ProgramLocalParameter4fvARB_remap_index },
+ { 26351, ProgramStringARB_remap_index },
+ { 18137, VertexAttrib1dARB_remap_index },
+ { 14543, VertexAttrib1dvARB_remap_index },
+ { 3778, VertexAttrib1fARB_remap_index },
+ { 30657, VertexAttrib1fvARB_remap_index },
+ { 6449, VertexAttrib1sARB_remap_index },
{ 2093, VertexAttrib1svARB_remap_index },
- { 13864, VertexAttrib2dARB_remap_index },
- { 16087, VertexAttrib2dvARB_remap_index },
+ { 13974, VertexAttrib2dARB_remap_index },
+ { 16277, VertexAttrib2dvARB_remap_index },
{ 1519, VertexAttrib2fARB_remap_index },
- { 16200, VertexAttrib2fvARB_remap_index },
- { 29993, VertexAttrib2sARB_remap_index },
- { 29099, VertexAttrib2svARB_remap_index },
- { 10321, VertexAttrib3dARB_remap_index },
- { 7850, VertexAttrib3dvARB_remap_index },
+ { 16390, VertexAttrib2fvARB_remap_index },
+ { 30283, VertexAttrib2sARB_remap_index },
+ { 29389, VertexAttrib2svARB_remap_index },
+ { 10431, VertexAttrib3dARB_remap_index },
+ { 7931, VertexAttrib3dvARB_remap_index },
{ 1606, VertexAttrib3fARB_remap_index },
- { 20748, VertexAttrib3fvARB_remap_index },
- { 25957, VertexAttrib3sARB_remap_index },
- { 18558, VertexAttrib3svARB_remap_index },
- { 4340, VertexAttrib4NbvARB_remap_index },
- { 16423, VertexAttrib4NivARB_remap_index },
- { 20703, VertexAttrib4NsvARB_remap_index },
- { 21625, VertexAttrib4NubARB_remap_index },
- { 29345, VertexAttrib4NubvARB_remap_index },
- { 17358, VertexAttrib4NuivARB_remap_index },
- { 2849, VertexAttrib4NusvARB_remap_index },
- { 9915, VertexAttrib4bvARB_remap_index },
- { 24737, VertexAttrib4dARB_remap_index },
- { 19580, VertexAttrib4dvARB_remap_index },
- { 10428, VertexAttrib4fARB_remap_index },
- { 10832, VertexAttrib4fvARB_remap_index },
- { 9331, VertexAttrib4ivARB_remap_index },
- { 15901, VertexAttrib4sARB_remap_index },
- { 28573, VertexAttrib4svARB_remap_index },
- { 15270, VertexAttrib4ubvARB_remap_index },
- { 27984, VertexAttrib4uivARB_remap_index },
- { 18369, VertexAttrib4usvARB_remap_index },
- { 20334, VertexAttribPointerARB_remap_index },
- { 30127, BindBufferARB_remap_index },
- { 6075, BufferDataARB_remap_index },
+ { 20938, VertexAttrib3fvARB_remap_index },
+ { 26198, VertexAttrib3sARB_remap_index },
+ { 18748, VertexAttrib3svARB_remap_index },
+ { 4391, VertexAttrib4NbvARB_remap_index },
+ { 16613, VertexAttrib4NivARB_remap_index },
+ { 20893, VertexAttrib4NsvARB_remap_index },
+ { 21839, VertexAttrib4NubARB_remap_index },
+ { 29635, VertexAttrib4NubvARB_remap_index },
+ { 17548, VertexAttrib4NuivARB_remap_index },
+ { 2875, VertexAttrib4NusvARB_remap_index },
+ { 10025, VertexAttrib4bvARB_remap_index },
+ { 24978, VertexAttrib4dARB_remap_index },
+ { 19770, VertexAttrib4dvARB_remap_index },
+ { 10538, VertexAttrib4fARB_remap_index },
+ { 10942, VertexAttrib4fvARB_remap_index },
+ { 9441, VertexAttrib4ivARB_remap_index },
+ { 16091, VertexAttrib4sARB_remap_index },
+ { 28863, VertexAttrib4svARB_remap_index },
+ { 15380, VertexAttrib4ubvARB_remap_index },
+ { 28251, VertexAttrib4uivARB_remap_index },
+ { 18559, VertexAttrib4usvARB_remap_index },
+ { 20524, VertexAttribPointerARB_remap_index },
+ { 30417, BindBufferARB_remap_index },
+ { 6156, BufferDataARB_remap_index },
{ 1421, BufferSubDataARB_remap_index },
- { 28173, DeleteBuffersARB_remap_index },
- { 30410, GenBuffersARB_remap_index },
- { 16243, GetBufferParameterivARB_remap_index },
- { 15417, GetBufferPointervARB_remap_index },
+ { 28440, DeleteBuffersARB_remap_index },
+ { 30700, GenBuffersARB_remap_index },
+ { 16433, GetBufferParameterivARB_remap_index },
+ { 15527, GetBufferPointervARB_remap_index },
{ 1374, GetBufferSubDataARB_remap_index },
- { 27932, IsBufferARB_remap_index },
- { 24310, MapBufferARB_remap_index },
- { 28788, UnmapBufferARB_remap_index },
+ { 28199, IsBufferARB_remap_index },
+ { 24524, MapBufferARB_remap_index },
+ { 29078, UnmapBufferARB_remap_index },
{ 307, BeginQueryARB_remap_index },
- { 18042, DeleteQueriesARB_remap_index },
- { 11126, EndQueryARB_remap_index },
- { 26809, GenQueriesARB_remap_index },
+ { 18232, DeleteQueriesARB_remap_index },
+ { 11236, EndQueryARB_remap_index },
+ { 27076, GenQueriesARB_remap_index },
{ 1811, GetQueryObjectivARB_remap_index },
- { 15945, GetQueryObjectuivARB_remap_index },
+ { 16135, GetQueryObjectuivARB_remap_index },
{ 1663, GetQueryivARB_remap_index },
- { 18276, IsQueryARB_remap_index },
- { 7460, AttachObjectARB_remap_index },
- { 16906, CompileShaderARB_remap_index },
- { 2918, CreateProgramObjectARB_remap_index },
- { 6020, CreateShaderObjectARB_remap_index },
- { 13281, DeleteObjectARB_remap_index },
- { 22067, DetachObjectARB_remap_index },
- { 10904, GetActiveUniformARB_remap_index },
- { 8622, GetAttachedObjectsARB_remap_index },
- { 8929, GetHandleARB_remap_index },
- { 30160, GetInfoLogARB_remap_index },
- { 29416, GetObjectParameterfvARB_remap_index },
- { 25203, GetObjectParameterivARB_remap_index },
- { 26567, GetShaderSourceARB_remap_index },
- { 25817, GetUniformLocationARB_remap_index },
- { 21895, GetUniformfvARB_remap_index },
- { 11608, GetUniformivARB_remap_index },
- { 18414, LinkProgramARB_remap_index },
- { 18472, ShaderSourceARB_remap_index },
- { 6742, Uniform1fARB_remap_index },
- { 27348, Uniform1fvARB_remap_index },
- { 20303, Uniform1iARB_remap_index },
- { 19269, Uniform1ivARB_remap_index },
+ { 18466, IsQueryARB_remap_index },
+ { 7541, AttachObjectARB_remap_index },
+ { 17096, CompileShaderARB_remap_index },
+ { 2944, CreateProgramObjectARB_remap_index },
+ { 6101, CreateShaderObjectARB_remap_index },
+ { 13391, DeleteObjectARB_remap_index },
+ { 22281, DetachObjectARB_remap_index },
+ { 11014, GetActiveUniformARB_remap_index },
+ { 8703, GetAttachedObjectsARB_remap_index },
+ { 9010, GetHandleARB_remap_index },
+ { 30450, GetInfoLogARB_remap_index },
+ { 29706, GetObjectParameterfvARB_remap_index },
+ { 25444, GetObjectParameterivARB_remap_index },
+ { 26834, GetShaderSourceARB_remap_index },
+ { 26058, GetUniformLocationARB_remap_index },
+ { 22109, GetUniformfvARB_remap_index },
+ { 11718, GetUniformivARB_remap_index },
+ { 18604, LinkProgramARB_remap_index },
+ { 18662, ShaderSourceARB_remap_index },
+ { 6823, Uniform1fARB_remap_index },
+ { 27615, Uniform1fvARB_remap_index },
+ { 20493, Uniform1iARB_remap_index },
+ { 19459, Uniform1ivARB_remap_index },
{ 2042, Uniform2fARB_remap_index },
- { 13117, Uniform2fvARB_remap_index },
- { 24197, Uniform2iARB_remap_index },
+ { 13227, Uniform2fvARB_remap_index },
+ { 24411, Uniform2iARB_remap_index },
{ 2162, Uniform2ivARB_remap_index },
- { 17016, Uniform3fARB_remap_index },
- { 8652, Uniform3fvARB_remap_index },
- { 5666, Uniform3iARB_remap_index },
- { 15523, Uniform3ivARB_remap_index },
- { 17503, Uniform4fARB_remap_index },
- { 21759, Uniform4fvARB_remap_index },
- { 22925, Uniform4iARB_remap_index },
- { 18782, Uniform4ivARB_remap_index },
- { 7512, UniformMatrix2fvARB_remap_index },
+ { 17206, Uniform3fARB_remap_index },
+ { 8733, Uniform3fvARB_remap_index },
+ { 5747, Uniform3iARB_remap_index },
+ { 15633, Uniform3ivARB_remap_index },
+ { 17693, Uniform4fARB_remap_index },
+ { 21973, Uniform4fvARB_remap_index },
+ { 23139, Uniform4iARB_remap_index },
+ { 18972, Uniform4ivARB_remap_index },
+ { 7593, UniformMatrix2fvARB_remap_index },
{ 17, UniformMatrix3fvARB_remap_index },
{ 2514, UniformMatrix4fvARB_remap_index },
- { 23358, UseProgramObjectARB_remap_index },
- { 13552, ValidateProgramARB_remap_index },
- { 19623, BindAttribLocationARB_remap_index },
- { 4385, GetActiveAttribARB_remap_index },
- { 15204, GetAttribLocationARB_remap_index },
- { 27087, DrawBuffersARB_remap_index },
- { 12091, RenderbufferStorageMultisample_remap_index },
- { 12495, FramebufferTextureARB_remap_index },
- { 23728, FramebufferTextureFaceARB_remap_index },
- { 22216, ProgramParameteriARB_remap_index },
- { 17551, FlushMappedBufferRange_remap_index },
- { 25620, MapBufferRange_remap_index },
- { 15079, BindVertexArray_remap_index },
- { 13411, GenVertexArrays_remap_index },
- { 27862, CopyBufferSubData_remap_index },
- { 28677, ClientWaitSync_remap_index },
+ { 23572, UseProgramObjectARB_remap_index },
+ { 13662, ValidateProgramARB_remap_index },
+ { 19813, BindAttribLocationARB_remap_index },
+ { 4436, GetActiveAttribARB_remap_index },
+ { 15314, GetAttribLocationARB_remap_index },
+ { 27354, DrawBuffersARB_remap_index },
+ { 12201, RenderbufferStorageMultisample_remap_index },
+ { 12605, FramebufferTextureARB_remap_index },
+ { 23942, FramebufferTextureFaceARB_remap_index },
+ { 22430, ProgramParameteriARB_remap_index },
+ { 17741, FlushMappedBufferRange_remap_index },
+ { 25861, MapBufferRange_remap_index },
+ { 15189, BindVertexArray_remap_index },
+ { 13521, GenVertexArrays_remap_index },
+ { 28129, CopyBufferSubData_remap_index },
+ { 28967, ClientWaitSync_remap_index },
{ 2433, DeleteSync_remap_index },
- { 6409, FenceSync_remap_index },
- { 13923, GetInteger64v_remap_index },
- { 20810, GetSynciv_remap_index },
- { 27026, IsSync_remap_index },
- { 8570, WaitSync_remap_index },
- { 3402, DrawElementsBaseVertex_remap_index },
- { 28105, DrawRangeElementsBaseVertex_remap_index },
- { 24341, MultiDrawElementsBaseVertex_remap_index },
- { 4519, BindTransformFeedback_remap_index },
- { 2945, DeleteTransformFeedbacks_remap_index },
- { 5699, DrawTransformFeedback_remap_index },
- { 8789, GenTransformFeedbacks_remap_index },
- { 26000, IsTransformFeedback_remap_index },
- { 23921, PauseTransformFeedback_remap_index },
- { 4892, ResumeTransformFeedback_remap_index },
- { 4807, PolygonOffsetEXT_remap_index },
- { 21395, GetPixelTexGenParameterfvSGIS_remap_index },
- { 3934, GetPixelTexGenParameterivSGIS_remap_index },
- { 21128, PixelTexGenParameterfSGIS_remap_index },
+ { 6490, FenceSync_remap_index },
+ { 14033, GetInteger64v_remap_index },
+ { 21000, GetSynciv_remap_index },
+ { 27293, IsSync_remap_index },
+ { 8651, WaitSync_remap_index },
+ { 3453, DrawElementsBaseVertex_remap_index },
+ { 28372, DrawRangeElementsBaseVertex_remap_index },
+ { 24555, MultiDrawElementsBaseVertex_remap_index },
+ { 4570, BindTransformFeedback_remap_index },
+ { 2971, DeleteTransformFeedbacks_remap_index },
+ { 5780, DrawTransformFeedback_remap_index },
+ { 8870, GenTransformFeedbacks_remap_index },
+ { 26241, IsTransformFeedback_remap_index },
+ { 24135, PauseTransformFeedback_remap_index },
+ { 4943, ResumeTransformFeedback_remap_index },
+ { 4858, PolygonOffsetEXT_remap_index },
+ { 21609, GetPixelTexGenParameterfvSGIS_remap_index },
+ { 3985, GetPixelTexGenParameterivSGIS_remap_index },
+ { 21342, PixelTexGenParameterfSGIS_remap_index },
{ 619, PixelTexGenParameterfvSGIS_remap_index },
- { 11646, PixelTexGenParameteriSGIS_remap_index },
- { 12637, PixelTexGenParameterivSGIS_remap_index },
- { 15167, SampleMaskSGIS_remap_index },
- { 18216, SamplePatternSGIS_remap_index },
- { 24270, ColorPointerEXT_remap_index },
- { 16130, EdgeFlagPointerEXT_remap_index },
- { 5320, IndexPointerEXT_remap_index },
- { 5400, NormalPointerEXT_remap_index },
- { 14517, TexCoordPointerEXT_remap_index },
- { 6198, VertexPointerEXT_remap_index },
- { 3204, PointParameterfEXT_remap_index },
- { 7049, PointParameterfvEXT_remap_index },
- { 29514, LockArraysEXT_remap_index },
- { 13616, UnlockArraysEXT_remap_index },
+ { 11756, PixelTexGenParameteriSGIS_remap_index },
+ { 12747, PixelTexGenParameterivSGIS_remap_index },
+ { 15277, SampleMaskSGIS_remap_index },
+ { 18406, SamplePatternSGIS_remap_index },
+ { 24484, ColorPointerEXT_remap_index },
+ { 16320, EdgeFlagPointerEXT_remap_index },
+ { 5401, IndexPointerEXT_remap_index },
+ { 5481, NormalPointerEXT_remap_index },
+ { 14627, TexCoordPointerEXT_remap_index },
+ { 6279, VertexPointerEXT_remap_index },
+ { 3255, PointParameterfEXT_remap_index },
+ { 7130, PointParameterfvEXT_remap_index },
+ { 29804, LockArraysEXT_remap_index },
+ { 13726, UnlockArraysEXT_remap_index },
{ 1190, SecondaryColor3bEXT_remap_index },
- { 7208, SecondaryColor3bvEXT_remap_index },
- { 9508, SecondaryColor3dEXT_remap_index },
- { 23531, SecondaryColor3dvEXT_remap_index },
- { 25866, SecondaryColor3fEXT_remap_index },
- { 16696, SecondaryColor3fvEXT_remap_index },
+ { 7289, SecondaryColor3bvEXT_remap_index },
+ { 9618, SecondaryColor3dEXT_remap_index },
+ { 23745, SecondaryColor3dvEXT_remap_index },
+ { 26107, SecondaryColor3fEXT_remap_index },
+ { 16886, SecondaryColor3fvEXT_remap_index },
{ 465, SecondaryColor3iEXT_remap_index },
- { 14905, SecondaryColor3ivEXT_remap_index },
- { 9166, SecondaryColor3sEXT_remap_index },
- { 28341, SecondaryColor3svEXT_remap_index },
- { 25039, SecondaryColor3ubEXT_remap_index },
- { 19514, SecondaryColor3ubvEXT_remap_index },
- { 11841, SecondaryColor3uiEXT_remap_index },
- { 21015, SecondaryColor3uivEXT_remap_index },
- { 23778, SecondaryColor3usEXT_remap_index },
- { 11914, SecondaryColor3usvEXT_remap_index },
- { 10775, SecondaryColorPointerEXT_remap_index },
- { 23592, MultiDrawArraysEXT_remap_index },
- { 19204, MultiDrawElementsEXT_remap_index },
- { 19399, FogCoordPointerEXT_remap_index },
- { 4083, FogCoorddEXT_remap_index },
- { 28915, FogCoorddvEXT_remap_index },
- { 4175, FogCoordfEXT_remap_index },
- { 24962, FogCoordfvEXT_remap_index },
- { 17455, PixelTexGenSGIX_remap_index },
- { 25547, BlendFuncSeparateEXT_remap_index },
- { 6110, FlushVertexArrayRangeNV_remap_index },
- { 4756, VertexArrayRangeNV_remap_index },
- { 25931, CombinerInputNV_remap_index },
+ { 15015, SecondaryColor3ivEXT_remap_index },
+ { 9276, SecondaryColor3sEXT_remap_index },
+ { 28631, SecondaryColor3svEXT_remap_index },
+ { 25280, SecondaryColor3ubEXT_remap_index },
+ { 19704, SecondaryColor3ubvEXT_remap_index },
+ { 11951, SecondaryColor3uiEXT_remap_index },
+ { 21229, SecondaryColor3uivEXT_remap_index },
+ { 23992, SecondaryColor3usEXT_remap_index },
+ { 12024, SecondaryColor3usvEXT_remap_index },
+ { 10885, SecondaryColorPointerEXT_remap_index },
+ { 23806, MultiDrawArraysEXT_remap_index },
+ { 19394, MultiDrawElementsEXT_remap_index },
+ { 19589, FogCoordPointerEXT_remap_index },
+ { 4134, FogCoorddEXT_remap_index },
+ { 29205, FogCoorddvEXT_remap_index },
+ { 4226, FogCoordfEXT_remap_index },
+ { 25203, FogCoordfvEXT_remap_index },
+ { 17645, PixelTexGenSGIX_remap_index },
+ { 25788, BlendFuncSeparateEXT_remap_index },
+ { 6191, FlushVertexArrayRangeNV_remap_index },
+ { 4807, VertexArrayRangeNV_remap_index },
+ { 26172, CombinerInputNV_remap_index },
{ 1985, CombinerOutputNV_remap_index },
- { 28494, CombinerParameterfNV_remap_index },
- { 4676, CombinerParameterfvNV_remap_index },
- { 20534, CombinerParameteriNV_remap_index },
- { 29885, CombinerParameterivNV_remap_index },
- { 6486, FinalCombinerInputNV_remap_index },
- { 8995, GetCombinerInputParameterfvNV_remap_index },
- { 29722, GetCombinerInputParameterivNV_remap_index },
+ { 28784, CombinerParameterfNV_remap_index },
+ { 4727, CombinerParameterfvNV_remap_index },
+ { 20724, CombinerParameteriNV_remap_index },
+ { 30175, CombinerParameterivNV_remap_index },
+ { 6567, FinalCombinerInputNV_remap_index },
+ { 9076, GetCombinerInputParameterfvNV_remap_index },
+ { 30012, GetCombinerInputParameterivNV_remap_index },
{ 172, GetCombinerOutputParameterfvNV_remap_index },
- { 12598, GetCombinerOutputParameterivNV_remap_index },
- { 5855, GetFinalCombinerInputParameterfvNV_remap_index },
- { 22797, GetFinalCombinerInputParameterivNV_remap_index },
- { 11586, ResizeBuffersMESA_remap_index },
- { 10148, WindowPos2dMESA_remap_index },
+ { 12708, GetCombinerOutputParameterivNV_remap_index },
+ { 5936, GetFinalCombinerInputParameterfvNV_remap_index },
+ { 23011, GetFinalCombinerInputParameterivNV_remap_index },
+ { 11696, ResizeBuffersMESA_remap_index },
+ { 10258, WindowPos2dMESA_remap_index },
{ 983, WindowPos2dvMESA_remap_index },
- { 30713, WindowPos2fMESA_remap_index },
- { 7153, WindowPos2fvMESA_remap_index },
- { 16643, WindowPos2iMESA_remap_index },
- { 18689, WindowPos2ivMESA_remap_index },
- { 19303, WindowPos2sMESA_remap_index },
- { 5070, WindowPos2svMESA_remap_index },
- { 6978, WindowPos3dMESA_remap_index },
- { 12845, WindowPos3dvMESA_remap_index },
+ { 31003, WindowPos2fMESA_remap_index },
+ { 7234, WindowPos2fvMESA_remap_index },
+ { 16833, WindowPos2iMESA_remap_index },
+ { 18879, WindowPos2ivMESA_remap_index },
+ { 19493, WindowPos2sMESA_remap_index },
+ { 5121, WindowPos2svMESA_remap_index },
+ { 7059, WindowPos3dMESA_remap_index },
+ { 12955, WindowPos3dvMESA_remap_index },
{ 511, WindowPos3fMESA_remap_index },
- { 13677, WindowPos3fvMESA_remap_index },
- { 22109, WindowPos3iMESA_remap_index },
- { 27807, WindowPos3ivMESA_remap_index },
- { 17161, WindowPos3sMESA_remap_index },
- { 29171, WindowPos3svMESA_remap_index },
- { 10099, WindowPos4dMESA_remap_index },
- { 15608, WindowPos4dvMESA_remap_index },
- { 12804, WindowPos4fMESA_remap_index },
- { 28248, WindowPos4fvMESA_remap_index },
- { 27960, WindowPos4iMESA_remap_index },
- { 11389, WindowPos4ivMESA_remap_index },
- { 17334, WindowPos4sMESA_remap_index },
- { 2896, WindowPos4svMESA_remap_index },
- { 24705, MultiModeDrawArraysIBM_remap_index },
- { 26680, MultiModeDrawElementsIBM_remap_index },
- { 11154, DeleteFencesNV_remap_index },
- { 25778, FinishFenceNV_remap_index },
- { 3326, GenFencesNV_remap_index },
- { 15588, GetFenceivNV_remap_index },
- { 7445, IsFenceNV_remap_index },
- { 12525, SetFenceNV_remap_index },
- { 3783, TestFenceNV_remap_index },
- { 29142, AreProgramsResidentNV_remap_index },
- { 28536, BindProgramNV_remap_index },
- { 23861, DeleteProgramsNV_remap_index },
- { 19732, ExecuteProgramNV_remap_index },
- { 30606, GenProgramsNV_remap_index },
- { 21474, GetProgramParameterdvNV_remap_index },
- { 9570, GetProgramParameterfvNV_remap_index },
- { 24244, GetProgramStringNV_remap_index },
- { 22486, GetProgramivNV_remap_index },
- { 21708, GetTrackMatrixivNV_remap_index },
- { 24038, GetVertexAttribPointervNV_remap_index },
- { 22730, GetVertexAttribdvNV_remap_index },
- { 8465, GetVertexAttribfvNV_remap_index },
- { 16824, GetVertexAttribivNV_remap_index },
- { 17581, IsProgramNV_remap_index },
- { 8548, LoadProgramNV_remap_index },
- { 25643, ProgramParameters4dvNV_remap_index },
- { 22416, ProgramParameters4fvNV_remap_index },
- { 18993, RequestResidentProgramsNV_remap_index },
- { 20512, TrackMatrixNV_remap_index },
- { 29699, VertexAttrib1dNV_remap_index },
- { 12436, VertexAttrib1dvNV_remap_index },
- { 26212, VertexAttrib1fNV_remap_index },
+ { 13787, WindowPos3fvMESA_remap_index },
+ { 22323, WindowPos3iMESA_remap_index },
+ { 28074, WindowPos3ivMESA_remap_index },
+ { 17351, WindowPos3sMESA_remap_index },
+ { 29461, WindowPos3svMESA_remap_index },
+ { 10209, WindowPos4dMESA_remap_index },
+ { 15747, WindowPos4dvMESA_remap_index },
+ { 12914, WindowPos4fMESA_remap_index },
+ { 28538, WindowPos4fvMESA_remap_index },
+ { 28227, WindowPos4iMESA_remap_index },
+ { 11499, WindowPos4ivMESA_remap_index },
+ { 17524, WindowPos4sMESA_remap_index },
+ { 2922, WindowPos4svMESA_remap_index },
+ { 24946, MultiModeDrawArraysIBM_remap_index },
+ { 26947, MultiModeDrawElementsIBM_remap_index },
+ { 11264, DeleteFencesNV_remap_index },
+ { 26019, FinishFenceNV_remap_index },
+ { 3377, GenFencesNV_remap_index },
+ { 15727, GetFenceivNV_remap_index },
+ { 7526, IsFenceNV_remap_index },
+ { 12635, SetFenceNV_remap_index },
+ { 3834, TestFenceNV_remap_index },
+ { 29432, AreProgramsResidentNV_remap_index },
+ { 28826, BindProgramNV_remap_index },
+ { 24075, DeleteProgramsNV_remap_index },
+ { 19922, ExecuteProgramNV_remap_index },
+ { 30896, GenProgramsNV_remap_index },
+ { 21688, GetProgramParameterdvNV_remap_index },
+ { 9680, GetProgramParameterfvNV_remap_index },
+ { 24458, GetProgramStringNV_remap_index },
+ { 22700, GetProgramivNV_remap_index },
+ { 21922, GetTrackMatrixivNV_remap_index },
+ { 24252, GetVertexAttribPointervNV_remap_index },
+ { 22944, GetVertexAttribdvNV_remap_index },
+ { 8546, GetVertexAttribfvNV_remap_index },
+ { 17014, GetVertexAttribivNV_remap_index },
+ { 17771, IsProgramNV_remap_index },
+ { 8629, LoadProgramNV_remap_index },
+ { 25884, ProgramParameters4dvNV_remap_index },
+ { 22630, ProgramParameters4fvNV_remap_index },
+ { 19183, RequestResidentProgramsNV_remap_index },
+ { 20702, TrackMatrixNV_remap_index },
+ { 29989, VertexAttrib1dNV_remap_index },
+ { 12546, VertexAttrib1dvNV_remap_index },
+ { 26453, VertexAttrib1fNV_remap_index },
{ 2284, VertexAttrib1fvNV_remap_index },
- { 28305, VertexAttrib1sNV_remap_index },
- { 13750, VertexAttrib1svNV_remap_index },
- { 4290, VertexAttrib2dNV_remap_index },
- { 12351, VertexAttrib2dvNV_remap_index },
- { 18448, VertexAttrib2fNV_remap_index },
- { 11962, VertexAttrib2fvNV_remap_index },
- { 5230, VertexAttrib2sNV_remap_index },
- { 17215, VertexAttrib2svNV_remap_index },
- { 10296, VertexAttrib3dNV_remap_index },
- { 29392, VertexAttrib3dvNV_remap_index },
- { 9382, VertexAttrib3fNV_remap_index },
- { 22757, VertexAttrib3fvNV_remap_index },
- { 20389, VertexAttrib3sNV_remap_index },
- { 21735, VertexAttrib3svNV_remap_index },
- { 26654, VertexAttrib4dNV_remap_index },
- { 30643, VertexAttrib4dvNV_remap_index },
- { 3984, VertexAttrib4fNV_remap_index },
- { 8598, VertexAttrib4fvNV_remap_index },
- { 24589, VertexAttrib4sNV_remap_index },
+ { 28595, VertexAttrib1sNV_remap_index },
+ { 13860, VertexAttrib1svNV_remap_index },
+ { 4341, VertexAttrib2dNV_remap_index },
+ { 12461, VertexAttrib2dvNV_remap_index },
+ { 18638, VertexAttrib2fNV_remap_index },
+ { 12072, VertexAttrib2fvNV_remap_index },
+ { 5311, VertexAttrib2sNV_remap_index },
+ { 17405, VertexAttrib2svNV_remap_index },
+ { 10406, VertexAttrib3dNV_remap_index },
+ { 29682, VertexAttrib3dvNV_remap_index },
+ { 9492, VertexAttrib3fNV_remap_index },
+ { 22971, VertexAttrib3fvNV_remap_index },
+ { 20579, VertexAttrib3sNV_remap_index },
+ { 21949, VertexAttrib3svNV_remap_index },
+ { 26921, VertexAttrib4dNV_remap_index },
+ { 30933, VertexAttrib4dvNV_remap_index },
+ { 4035, VertexAttrib4fNV_remap_index },
+ { 8679, VertexAttrib4fvNV_remap_index },
+ { 24830, VertexAttrib4sNV_remap_index },
{ 1332, VertexAttrib4svNV_remap_index },
- { 4448, VertexAttrib4ubNV_remap_index },
+ { 4499, VertexAttrib4ubNV_remap_index },
{ 773, VertexAttrib4ubvNV_remap_index },
- { 19912, VertexAttribPointerNV_remap_index },
+ { 20102, VertexAttribPointerNV_remap_index },
{ 2136, VertexAttribs1dvNV_remap_index },
- { 24126, VertexAttribs1fvNV_remap_index },
- { 30443, VertexAttribs1svNV_remap_index },
- { 9407, VertexAttribs2dvNV_remap_index },
- { 23319, VertexAttribs2fvNV_remap_index },
- { 16156, VertexAttribs2svNV_remap_index },
- { 4704, VertexAttribs3dvNV_remap_index },
+ { 24340, VertexAttribs1fvNV_remap_index },
+ { 30733, VertexAttribs1svNV_remap_index },
+ { 9517, VertexAttribs2dvNV_remap_index },
+ { 23533, VertexAttribs2fvNV_remap_index },
+ { 16346, VertexAttribs2svNV_remap_index },
+ { 4755, VertexAttribs3dvNV_remap_index },
{ 2016, VertexAttribs3fvNV_remap_index },
- { 27555, VertexAttribs3svNV_remap_index },
- { 24679, VertexAttribs4dvNV_remap_index },
- { 4730, VertexAttribs4fvNV_remap_index },
- { 30230, VertexAttribs4svNV_remap_index },
- { 27303, VertexAttribs4ubvNV_remap_index },
- { 24781, GetTexBumpParameterfvATI_remap_index },
- { 30484, GetTexBumpParameterivATI_remap_index },
- { 16878, TexBumpParameterfvATI_remap_index },
- { 18864, TexBumpParameterivATI_remap_index },
- { 14296, AlphaFragmentOp1ATI_remap_index },
- { 9958, AlphaFragmentOp2ATI_remap_index },
- { 22673, AlphaFragmentOp3ATI_remap_index },
- { 27482, BeginFragmentShaderATI_remap_index },
- { 28735, BindFragmentShaderATI_remap_index },
- { 21864, ColorFragmentOp1ATI_remap_index },
- { 3862, ColorFragmentOp2ATI_remap_index },
- { 29037, ColorFragmentOp3ATI_remap_index },
- { 4849, DeleteFragmentShaderATI_remap_index },
- { 30667, EndFragmentShaderATI_remap_index },
- { 29913, GenFragmentShadersATI_remap_index },
- { 23450, PassTexCoordATI_remap_index },
- { 6178, SampleMapATI_remap_index },
- { 5951, SetFragmentShaderConstantATI_remap_index },
+ { 27822, VertexAttribs3svNV_remap_index },
+ { 24920, VertexAttribs4dvNV_remap_index },
+ { 4781, VertexAttribs4fvNV_remap_index },
+ { 30520, VertexAttribs4svNV_remap_index },
+ { 27570, VertexAttribs4ubvNV_remap_index },
+ { 25022, GetTexBumpParameterfvATI_remap_index },
+ { 30774, GetTexBumpParameterivATI_remap_index },
+ { 17068, TexBumpParameterfvATI_remap_index },
+ { 19054, TexBumpParameterivATI_remap_index },
+ { 14406, AlphaFragmentOp1ATI_remap_index },
+ { 10068, AlphaFragmentOp2ATI_remap_index },
+ { 22887, AlphaFragmentOp3ATI_remap_index },
+ { 27749, BeginFragmentShaderATI_remap_index },
+ { 29025, BindFragmentShaderATI_remap_index },
+ { 22078, ColorFragmentOp1ATI_remap_index },
+ { 3913, ColorFragmentOp2ATI_remap_index },
+ { 29327, ColorFragmentOp3ATI_remap_index },
+ { 4900, DeleteFragmentShaderATI_remap_index },
+ { 30957, EndFragmentShaderATI_remap_index },
+ { 30203, GenFragmentShadersATI_remap_index },
+ { 23664, PassTexCoordATI_remap_index },
+ { 6259, SampleMapATI_remap_index },
+ { 6032, SetFragmentShaderConstantATI_remap_index },
{ 358, PointParameteriNV_remap_index },
- { 13006, PointParameterivNV_remap_index },
- { 26493, ActiveStencilFaceEXT_remap_index },
- { 25303, BindVertexArrayAPPLE_remap_index },
+ { 13116, PointParameterivNV_remap_index },
+ { 26760, ActiveStencilFaceEXT_remap_index },
+ { 25544, BindVertexArrayAPPLE_remap_index },
{ 2561, DeleteVertexArraysAPPLE_remap_index },
- { 16495, GenVertexArraysAPPLE_remap_index },
- { 21539, IsVertexArrayAPPLE_remap_index },
+ { 16685, GenVertexArraysAPPLE_remap_index },
+ { 21753, IsVertexArrayAPPLE_remap_index },
{ 814, GetProgramNamedParameterdvNV_remap_index },
- { 3167, GetProgramNamedParameterfvNV_remap_index },
- { 24812, ProgramNamedParameter4dNV_remap_index },
- { 13332, ProgramNamedParameter4dvNV_remap_index },
- { 8081, ProgramNamedParameter4fNV_remap_index },
- { 10740, ProgramNamedParameter4fvNV_remap_index },
- { 22395, DepthBoundsEXT_remap_index },
+ { 3218, GetProgramNamedParameterfvNV_remap_index },
+ { 25053, ProgramNamedParameter4dNV_remap_index },
+ { 13442, ProgramNamedParameter4dvNV_remap_index },
+ { 8162, ProgramNamedParameter4fNV_remap_index },
+ { 10850, ProgramNamedParameter4fvNV_remap_index },
+ { 15682, PrimitiveRestartIndexNV_remap_index },
+ { 28515, PrimitiveRestartNV_remap_index },
+ { 22609, DepthBoundsEXT_remap_index },
{ 1082, BlendEquationSeparateEXT_remap_index },
- { 13451, BindFramebufferEXT_remap_index },
- { 23637, BindRenderbufferEXT_remap_index },
- { 8845, CheckFramebufferStatusEXT_remap_index },
- { 20829, DeleteFramebuffersEXT_remap_index },
- { 29294, DeleteRenderbuffersEXT_remap_index },
- { 12375, FramebufferRenderbufferEXT_remap_index },
- { 12542, FramebufferTexture1DEXT_remap_index },
- { 10534, FramebufferTexture2DEXT_remap_index },
- { 10201, FramebufferTexture3DEXT_remap_index },
- { 21431, GenFramebuffersEXT_remap_index },
- { 16042, GenRenderbuffersEXT_remap_index },
- { 5897, GenerateMipmapEXT_remap_index },
- { 20009, GetFramebufferAttachmentParameterivEXT_remap_index },
- { 29819, GetRenderbufferParameterivEXT_remap_index },
- { 18744, IsFramebufferEXT_remap_index },
- { 30566, IsRenderbufferEXT_remap_index },
- { 7392, RenderbufferStorageEXT_remap_index },
+ { 13561, BindFramebufferEXT_remap_index },
+ { 23851, BindRenderbufferEXT_remap_index },
+ { 8926, CheckFramebufferStatusEXT_remap_index },
+ { 21043, DeleteFramebuffersEXT_remap_index },
+ { 29584, DeleteRenderbuffersEXT_remap_index },
+ { 12485, FramebufferRenderbufferEXT_remap_index },
+ { 12652, FramebufferTexture1DEXT_remap_index },
+ { 10644, FramebufferTexture2DEXT_remap_index },
+ { 10311, FramebufferTexture3DEXT_remap_index },
+ { 21645, GenFramebuffersEXT_remap_index },
+ { 16232, GenRenderbuffersEXT_remap_index },
+ { 5978, GenerateMipmapEXT_remap_index },
+ { 20199, GetFramebufferAttachmentParameterivEXT_remap_index },
+ { 30109, GetRenderbufferParameterivEXT_remap_index },
+ { 18934, IsFramebufferEXT_remap_index },
+ { 30856, IsRenderbufferEXT_remap_index },
+ { 7473, RenderbufferStorageEXT_remap_index },
{ 690, BlitFramebufferEXT_remap_index },
- { 13151, BufferParameteriAPPLE_remap_index },
- { 17613, FlushMappedBufferRangeAPPLE_remap_index },
- { 2740, FramebufferTextureLayerEXT_remap_index },
- { 4613, ColorMaskIndexedEXT_remap_index },
- { 17239, DisableIndexedEXT_remap_index },
- { 24436, EnableIndexedEXT_remap_index },
- { 19980, GetBooleanIndexedvEXT_remap_index },
- { 9991, GetIntegerIndexedvEXT_remap_index },
- { 20905, IsEnabledIndexedEXT_remap_index },
- { 4113, BeginConditionalRenderNV_remap_index },
- { 23423, EndConditionalRenderNV_remap_index },
- { 8492, BeginTransformFeedbackEXT_remap_index },
- { 17263, BindBufferBaseEXT_remap_index },
- { 17133, BindBufferOffsetEXT_remap_index },
- { 11214, BindBufferRangeEXT_remap_index },
- { 13066, EndTransformFeedbackEXT_remap_index },
- { 9843, GetTransformFeedbackVaryingEXT_remap_index },
- { 19049, TransformFeedbackVaryingsEXT_remap_index },
- { 27204, ProvokingVertexEXT_remap_index },
- { 9791, GetTexParameterPointervAPPLE_remap_index },
- { 4475, TextureRangeAPPLE_remap_index },
- { 10606, GetObjectParameterivAPPLE_remap_index },
- { 18188, ObjectPurgeableAPPLE_remap_index },
- { 5024, ObjectUnpurgeableAPPLE_remap_index },
- { 26519, StencilFuncSeparateATI_remap_index },
- { 16562, ProgramEnvParameters4fvEXT_remap_index },
- { 19943, ProgramLocalParameters4fvEXT_remap_index },
- { 12934, GetQueryObjecti64vEXT_remap_index },
- { 9433, GetQueryObjectui64vEXT_remap_index },
- { 21933, EGLImageTargetRenderbufferStorageOES_remap_index },
- { 11093, EGLImageTargetTexture2DOES_remap_index },
+ { 13261, BufferParameteriAPPLE_remap_index },
+ { 17803, FlushMappedBufferRangeAPPLE_remap_index },
+ { 2766, FramebufferTextureLayerEXT_remap_index },
+ { 4664, ColorMaskIndexedEXT_remap_index },
+ { 17429, DisableIndexedEXT_remap_index },
+ { 24677, EnableIndexedEXT_remap_index },
+ { 20170, GetBooleanIndexedvEXT_remap_index },
+ { 10101, GetIntegerIndexedvEXT_remap_index },
+ { 21119, IsEnabledIndexedEXT_remap_index },
+ { 21019, ClearColorIiEXT_remap_index },
+ { 3128, ClearColorIuiEXT_remap_index },
+ { 9115, GetTexParameterIivEXT_remap_index },
+ { 5281, GetTexParameterIuivEXT_remap_index },
+ { 2740, TexParameterIivEXT_remap_index },
+ { 24593, TexParameterIuivEXT_remap_index },
+ { 4164, BeginConditionalRenderNV_remap_index },
+ { 23637, EndConditionalRenderNV_remap_index },
+ { 8573, BeginTransformFeedbackEXT_remap_index },
+ { 17453, BindBufferBaseEXT_remap_index },
+ { 17323, BindBufferOffsetEXT_remap_index },
+ { 11324, BindBufferRangeEXT_remap_index },
+ { 13176, EndTransformFeedbackEXT_remap_index },
+ { 9953, GetTransformFeedbackVaryingEXT_remap_index },
+ { 19239, TransformFeedbackVaryingsEXT_remap_index },
+ { 27471, ProvokingVertexEXT_remap_index },
+ { 9901, GetTexParameterPointervAPPLE_remap_index },
+ { 4526, TextureRangeAPPLE_remap_index },
+ { 10716, GetObjectParameterivAPPLE_remap_index },
+ { 18378, ObjectPurgeableAPPLE_remap_index },
+ { 5075, ObjectUnpurgeableAPPLE_remap_index },
+ { 16054, ActiveProgramEXT_remap_index },
+ { 16025, CreateShaderProgramEXT_remap_index },
+ { 26545, UseShaderProgramEXT_remap_index },
+ { 26786, StencilFuncSeparateATI_remap_index },
+ { 16752, ProgramEnvParameters4fvEXT_remap_index },
+ { 20133, ProgramLocalParameters4fvEXT_remap_index },
+ { 13044, GetQueryObjecti64vEXT_remap_index },
+ { 9543, GetQueryObjectui64vEXT_remap_index },
+ { 22147, EGLImageTargetRenderbufferStorageOES_remap_index },
+ { 11203, EGLImageTargetTexture2DOES_remap_index },
{ -1, -1 }
};
@@ -4893,108 +4948,108 @@ static const struct gl_function_remap MESA_alt_functions[] = {
/* from GL_EXT_blend_color */
{ 2479, _gloffset_BlendColor },
/* from GL_EXT_blend_minmax */
- { 10258, _gloffset_BlendEquation },
+ { 10368, _gloffset_BlendEquation },
/* from GL_EXT_color_subtable */
- { 15630, _gloffset_ColorSubTable },
- { 29226, _gloffset_CopyColorSubTable },
+ { 15769, _gloffset_ColorSubTable },
+ { 29516, _gloffset_CopyColorSubTable },
/* from GL_EXT_convolution */
{ 252, _gloffset_ConvolutionFilter1D },
{ 2323, _gloffset_CopyConvolutionFilter1D },
- { 3663, _gloffset_GetConvolutionParameteriv },
- { 7741, _gloffset_ConvolutionFilter2D },
- { 7907, _gloffset_ConvolutionParameteriv },
- { 8367, _gloffset_ConvolutionParameterfv },
- { 18892, _gloffset_GetSeparableFilter },
- { 22163, _gloffset_SeparableFilter2D },
- { 22975, _gloffset_ConvolutionParameteri },
- { 23098, _gloffset_ConvolutionParameterf },
- { 24615, _gloffset_GetConvolutionParameterfv },
- { 25469, _gloffset_GetConvolutionFilter },
- { 27744, _gloffset_CopyConvolutionFilter2D },
+ { 3714, _gloffset_GetConvolutionParameteriv },
+ { 7822, _gloffset_ConvolutionFilter2D },
+ { 7988, _gloffset_ConvolutionParameteriv },
+ { 8448, _gloffset_ConvolutionParameterfv },
+ { 19082, _gloffset_GetSeparableFilter },
+ { 22377, _gloffset_SeparableFilter2D },
+ { 23189, _gloffset_ConvolutionParameteri },
+ { 23312, _gloffset_ConvolutionParameterf },
+ { 24856, _gloffset_GetConvolutionParameterfv },
+ { 25710, _gloffset_GetConvolutionFilter },
+ { 28011, _gloffset_CopyConvolutionFilter2D },
/* from GL_EXT_copy_texture */
- { 13810, _gloffset_CopyTexSubImage3D },
- { 15370, _gloffset_CopyTexImage2D },
- { 22583, _gloffset_CopyTexImage1D },
- { 25150, _gloffset_CopyTexSubImage2D },
- { 27382, _gloffset_CopyTexSubImage1D },
+ { 13920, _gloffset_CopyTexSubImage3D },
+ { 15480, _gloffset_CopyTexImage2D },
+ { 22797, _gloffset_CopyTexImage1D },
+ { 25391, _gloffset_CopyTexSubImage2D },
+ { 27649, _gloffset_CopyTexSubImage1D },
/* from GL_EXT_draw_range_elements */
- { 8704, _gloffset_DrawRangeElements },
+ { 8785, _gloffset_DrawRangeElements },
/* from GL_EXT_histogram */
{ 851, _gloffset_Histogram },
- { 3127, _gloffset_ResetHistogram },
- { 9104, _gloffset_GetMinmax },
- { 14144, _gloffset_GetHistogramParameterfv },
- { 22508, _gloffset_GetMinmaxParameteriv },
- { 24505, _gloffset_ResetMinmax },
- { 25366, _gloffset_GetHistogramParameteriv },
- { 26453, _gloffset_GetHistogram },
- { 28851, _gloffset_Minmax },
- { 30313, _gloffset_GetMinmaxParameterfv },
+ { 3178, _gloffset_ResetHistogram },
+ { 9214, _gloffset_GetMinmax },
+ { 14254, _gloffset_GetHistogramParameterfv },
+ { 22722, _gloffset_GetMinmaxParameteriv },
+ { 24746, _gloffset_ResetMinmax },
+ { 25607, _gloffset_GetHistogramParameteriv },
+ { 26720, _gloffset_GetHistogram },
+ { 29141, _gloffset_Minmax },
+ { 30603, _gloffset_GetMinmaxParameterfv },
/* from GL_EXT_paletted_texture */
- { 7603, _gloffset_ColorTable },
- { 13990, _gloffset_GetColorTable },
- { 21178, _gloffset_GetColorTableParameterfv },
- { 23154, _gloffset_GetColorTableParameteriv },
+ { 7684, _gloffset_ColorTable },
+ { 14100, _gloffset_GetColorTable },
+ { 21392, _gloffset_GetColorTableParameterfv },
+ { 23368, _gloffset_GetColorTableParameteriv },
/* from GL_EXT_subtexture */
- { 6324, _gloffset_TexSubImage1D },
- { 9718, _gloffset_TexSubImage2D },
+ { 6405, _gloffset_TexSubImage1D },
+ { 9828, _gloffset_TexSubImage2D },
/* from GL_EXT_texture3D */
{ 1697, _gloffset_TexImage3D },
- { 20947, _gloffset_TexSubImage3D },
+ { 21161, _gloffset_TexSubImage3D },
/* from GL_EXT_texture_object */
- { 3003, _gloffset_PrioritizeTextures },
- { 6773, _gloffset_AreTexturesResident },
- { 12460, _gloffset_GenTextures },
- { 14476, _gloffset_DeleteTextures },
- { 17894, _gloffset_IsTexture },
- { 27447, _gloffset_BindTexture },
+ { 3029, _gloffset_PrioritizeTextures },
+ { 6854, _gloffset_AreTexturesResident },
+ { 12570, _gloffset_GenTextures },
+ { 14586, _gloffset_DeleteTextures },
+ { 18084, _gloffset_IsTexture },
+ { 27714, _gloffset_BindTexture },
/* from GL_EXT_vertex_array */
- { 22335, _gloffset_ArrayElement },
- { 28439, _gloffset_GetPointerv },
- { 29940, _gloffset_DrawArrays },
+ { 22549, _gloffset_ArrayElement },
+ { 28729, _gloffset_GetPointerv },
+ { 30230, _gloffset_DrawArrays },
/* from GL_SGI_color_table */
- { 6891, _gloffset_ColorTableParameteriv },
- { 7603, _gloffset_ColorTable },
- { 13990, _gloffset_GetColorTable },
- { 14100, _gloffset_CopyColorTable },
- { 17755, _gloffset_ColorTableParameterfv },
- { 21178, _gloffset_GetColorTableParameterfv },
- { 23154, _gloffset_GetColorTableParameteriv },
+ { 6972, _gloffset_ColorTableParameteriv },
+ { 7684, _gloffset_ColorTable },
+ { 14100, _gloffset_GetColorTable },
+ { 14210, _gloffset_CopyColorTable },
+ { 17945, _gloffset_ColorTableParameterfv },
+ { 21392, _gloffset_GetColorTableParameterfv },
+ { 23368, _gloffset_GetColorTableParameteriv },
/* from GL_VERSION_1_3 */
{ 420, _gloffset_MultiTexCoord3sARB },
{ 652, _gloffset_ActiveTextureARB },
- { 3800, _gloffset_MultiTexCoord1fvARB },
- { 5425, _gloffset_MultiTexCoord3dARB },
- { 5470, _gloffset_MultiTexCoord2iARB },
- { 5594, _gloffset_MultiTexCoord2svARB },
- { 7559, _gloffset_MultiTexCoord2fARB },
- { 9463, _gloffset_MultiTexCoord3fvARB },
- { 10020, _gloffset_MultiTexCoord4sARB },
- { 10654, _gloffset_MultiTexCoord2dvARB },
- { 11036, _gloffset_MultiTexCoord1svARB },
- { 11447, _gloffset_MultiTexCoord3svARB },
- { 11508, _gloffset_MultiTexCoord4iARB },
- { 12231, _gloffset_MultiTexCoord3iARB },
- { 12963, _gloffset_MultiTexCoord1dARB },
- { 13180, _gloffset_MultiTexCoord3dvARB },
- { 14344, _gloffset_MultiTexCoord3ivARB },
- { 14389, _gloffset_MultiTexCoord2sARB },
- { 15687, _gloffset_MultiTexCoord4ivARB },
- { 17405, _gloffset_ClientActiveTextureARB },
- { 19688, _gloffset_MultiTexCoord2dARB },
- { 20129, _gloffset_MultiTexCoord4dvARB },
- { 20440, _gloffset_MultiTexCoord4fvARB },
- { 21319, _gloffset_MultiTexCoord3fARB },
- { 23682, _gloffset_MultiTexCoord4dARB },
- { 23948, _gloffset_MultiTexCoord1sARB },
- { 24152, _gloffset_MultiTexCoord1dvARB },
- { 24994, _gloffset_MultiTexCoord1ivARB },
- { 25087, _gloffset_MultiTexCoord2ivARB },
- { 25426, _gloffset_MultiTexCoord1iARB },
- { 26728, _gloffset_MultiTexCoord4svARB },
- { 27246, _gloffset_MultiTexCoord1fARB },
- { 27509, _gloffset_MultiTexCoord4fARB },
- { 29774, _gloffset_MultiTexCoord2fvARB },
+ { 3851, _gloffset_MultiTexCoord1fvARB },
+ { 5506, _gloffset_MultiTexCoord3dARB },
+ { 5551, _gloffset_MultiTexCoord2iARB },
+ { 5675, _gloffset_MultiTexCoord2svARB },
+ { 7640, _gloffset_MultiTexCoord2fARB },
+ { 9573, _gloffset_MultiTexCoord3fvARB },
+ { 10130, _gloffset_MultiTexCoord4sARB },
+ { 10764, _gloffset_MultiTexCoord2dvARB },
+ { 11146, _gloffset_MultiTexCoord1svARB },
+ { 11557, _gloffset_MultiTexCoord3svARB },
+ { 11618, _gloffset_MultiTexCoord4iARB },
+ { 12341, _gloffset_MultiTexCoord3iARB },
+ { 13073, _gloffset_MultiTexCoord1dARB },
+ { 13290, _gloffset_MultiTexCoord3dvARB },
+ { 14454, _gloffset_MultiTexCoord3ivARB },
+ { 14499, _gloffset_MultiTexCoord2sARB },
+ { 15826, _gloffset_MultiTexCoord4ivARB },
+ { 17595, _gloffset_ClientActiveTextureARB },
+ { 19878, _gloffset_MultiTexCoord2dARB },
+ { 20319, _gloffset_MultiTexCoord4dvARB },
+ { 20630, _gloffset_MultiTexCoord4fvARB },
+ { 21533, _gloffset_MultiTexCoord3fARB },
+ { 23896, _gloffset_MultiTexCoord4dARB },
+ { 24162, _gloffset_MultiTexCoord1sARB },
+ { 24366, _gloffset_MultiTexCoord1dvARB },
+ { 25235, _gloffset_MultiTexCoord1ivARB },
+ { 25328, _gloffset_MultiTexCoord2ivARB },
+ { 25667, _gloffset_MultiTexCoord1iARB },
+ { 26995, _gloffset_MultiTexCoord4svARB },
+ { 27513, _gloffset_MultiTexCoord1fARB },
+ { 27776, _gloffset_MultiTexCoord4fARB },
+ { 30064, _gloffset_MultiTexCoord2fvARB },
{ -1, -1 }
};
@@ -5002,7 +5057,7 @@ static const struct gl_function_remap MESA_alt_functions[] = {
#if defined(need_GL_3DFX_tbuffer)
static const struct gl_function_remap GL_3DFX_tbuffer_functions[] = {
- { 8425, -1 }, /* TbufferMask3DFX */
+ { 8506, -1 }, /* TbufferMask3DFX */
{ -1, -1 }
};
#endif
@@ -5073,7 +5128,7 @@ static const struct gl_function_remap GL_ARB_framebuffer_object_functions[] = {
#if defined(need_GL_ARB_geometry_shader4)
/* functions defined in MESA_remap_table_functions are excluded */
static const struct gl_function_remap GL_ARB_geometry_shader4_functions[] = {
- { 11411, -1 }, /* FramebufferTextureLayer */
+ { 11521, -1 }, /* FramebufferTextureLayer */
{ -1, -1 }
};
#endif
@@ -5087,11 +5142,11 @@ static const struct gl_function_remap GL_ARB_map_buffer_range_functions[] = {
#if defined(need_GL_ARB_matrix_palette)
static const struct gl_function_remap GL_ARB_matrix_palette_functions[] = {
- { 3378, -1 }, /* MatrixIndexusvARB */
- { 12052, -1 }, /* MatrixIndexuivARB */
- { 13302, -1 }, /* MatrixIndexPointerARB */
- { 18143, -1 }, /* CurrentPaletteMatrixARB */
- { 21063, -1 }, /* MatrixIndexubvARB */
+ { 3429, -1 }, /* MatrixIndexusvARB */
+ { 12162, -1 }, /* MatrixIndexuivARB */
+ { 13412, -1 }, /* MatrixIndexPointerARB */
+ { 18333, -1 }, /* CurrentPaletteMatrixARB */
+ { 21277, -1 }, /* MatrixIndexubvARB */
{ -1, -1 }
};
#endif
@@ -5169,15 +5224,15 @@ static const struct gl_function_remap GL_ARB_vertex_array_object_functions[] = {
#if defined(need_GL_ARB_vertex_blend)
static const struct gl_function_remap GL_ARB_vertex_blend_functions[] = {
{ 2265, -1 }, /* WeightubvARB */
- { 5785, -1 }, /* WeightivARB */
- { 10123, -1 }, /* WeightPointerARB */
- { 12720, -1 }, /* WeightfvARB */
- { 16182, -1 }, /* WeightbvARB */
- { 19356, -1 }, /* WeightusvARB */
- { 22089, -1 }, /* VertexBlendARB */
- { 27330, -1 }, /* WeightsvARB */
- { 29276, -1 }, /* WeightdvARB */
- { 29974, -1 }, /* WeightuivARB */
+ { 5866, -1 }, /* WeightivARB */
+ { 10233, -1 }, /* WeightPointerARB */
+ { 12830, -1 }, /* WeightfvARB */
+ { 16372, -1 }, /* WeightbvARB */
+ { 19546, -1 }, /* WeightusvARB */
+ { 22303, -1 }, /* VertexBlendARB */
+ { 27597, -1 }, /* WeightsvARB */
+ { 29566, -1 }, /* WeightdvARB */
+ { 30264, -1 }, /* WeightuivARB */
{ -1, -1 }
};
#endif
@@ -5268,15 +5323,15 @@ static const struct gl_function_remap GL_EXT_blend_func_separate_functions[] = {
#if defined(need_GL_EXT_blend_minmax)
static const struct gl_function_remap GL_EXT_blend_minmax_functions[] = {
- { 10258, _gloffset_BlendEquation },
+ { 10368, _gloffset_BlendEquation },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_color_subtable)
static const struct gl_function_remap GL_EXT_color_subtable_functions[] = {
- { 15630, _gloffset_ColorSubTable },
- { 29226, _gloffset_CopyColorSubTable },
+ { 15769, _gloffset_ColorSubTable },
+ { 29516, _gloffset_CopyColorSubTable },
{ -1, -1 }
};
#endif
@@ -5292,64 +5347,64 @@ static const struct gl_function_remap GL_EXT_compiled_vertex_array_functions[] =
static const struct gl_function_remap GL_EXT_convolution_functions[] = {
{ 252, _gloffset_ConvolutionFilter1D },
{ 2323, _gloffset_CopyConvolutionFilter1D },
- { 3663, _gloffset_GetConvolutionParameteriv },
- { 7741, _gloffset_ConvolutionFilter2D },
- { 7907, _gloffset_ConvolutionParameteriv },
- { 8367, _gloffset_ConvolutionParameterfv },
- { 18892, _gloffset_GetSeparableFilter },
- { 22163, _gloffset_SeparableFilter2D },
- { 22975, _gloffset_ConvolutionParameteri },
- { 23098, _gloffset_ConvolutionParameterf },
- { 24615, _gloffset_GetConvolutionParameterfv },
- { 25469, _gloffset_GetConvolutionFilter },
- { 27744, _gloffset_CopyConvolutionFilter2D },
+ { 3714, _gloffset_GetConvolutionParameteriv },
+ { 7822, _gloffset_ConvolutionFilter2D },
+ { 7988, _gloffset_ConvolutionParameteriv },
+ { 8448, _gloffset_ConvolutionParameterfv },
+ { 19082, _gloffset_GetSeparableFilter },
+ { 22377, _gloffset_SeparableFilter2D },
+ { 23189, _gloffset_ConvolutionParameteri },
+ { 23312, _gloffset_ConvolutionParameterf },
+ { 24856, _gloffset_GetConvolutionParameterfv },
+ { 25710, _gloffset_GetConvolutionFilter },
+ { 28011, _gloffset_CopyConvolutionFilter2D },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_coordinate_frame)
static const struct gl_function_remap GL_EXT_coordinate_frame_functions[] = {
- { 9602, -1 }, /* TangentPointerEXT */
- { 11566, -1 }, /* Binormal3ivEXT */
- { 12184, -1 }, /* Tangent3sEXT */
- { 13367, -1 }, /* Tangent3fvEXT */
- { 17114, -1 }, /* Tangent3dvEXT */
- { 17841, -1 }, /* Binormal3bvEXT */
- { 18945, -1 }, /* Binormal3dEXT */
- { 20995, -1 }, /* Tangent3fEXT */
- { 23047, -1 }, /* Binormal3sEXT */
- { 23492, -1 }, /* Tangent3ivEXT */
- { 23511, -1 }, /* Tangent3dEXT */
- { 24379, -1 }, /* Binormal3svEXT */
- { 24892, -1 }, /* Binormal3fEXT */
- { 25744, -1 }, /* Binormal3dvEXT */
- { 26950, -1 }, /* Tangent3iEXT */
- { 28029, -1 }, /* Tangent3bvEXT */
- { 28474, -1 }, /* Tangent3bEXT */
- { 28999, -1 }, /* Binormal3fvEXT */
- { 29673, -1 }, /* BinormalPointerEXT */
- { 30078, -1 }, /* Tangent3svEXT */
- { 30515, -1 }, /* Binormal3bEXT */
- { 30692, -1 }, /* Binormal3iEXT */
+ { 9712, -1 }, /* TangentPointerEXT */
+ { 11676, -1 }, /* Binormal3ivEXT */
+ { 12294, -1 }, /* Tangent3sEXT */
+ { 13477, -1 }, /* Tangent3fvEXT */
+ { 17304, -1 }, /* Tangent3dvEXT */
+ { 18031, -1 }, /* Binormal3bvEXT */
+ { 19135, -1 }, /* Binormal3dEXT */
+ { 21209, -1 }, /* Tangent3fEXT */
+ { 23261, -1 }, /* Binormal3sEXT */
+ { 23706, -1 }, /* Tangent3ivEXT */
+ { 23725, -1 }, /* Tangent3dEXT */
+ { 24620, -1 }, /* Binormal3svEXT */
+ { 25133, -1 }, /* Binormal3fEXT */
+ { 25985, -1 }, /* Binormal3dvEXT */
+ { 27217, -1 }, /* Tangent3iEXT */
+ { 28296, -1 }, /* Tangent3bvEXT */
+ { 28764, -1 }, /* Tangent3bEXT */
+ { 29289, -1 }, /* Binormal3fvEXT */
+ { 29963, -1 }, /* BinormalPointerEXT */
+ { 30368, -1 }, /* Tangent3svEXT */
+ { 30805, -1 }, /* Binormal3bEXT */
+ { 30982, -1 }, /* Binormal3iEXT */
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_copy_texture)
static const struct gl_function_remap GL_EXT_copy_texture_functions[] = {
- { 13810, _gloffset_CopyTexSubImage3D },
- { 15370, _gloffset_CopyTexImage2D },
- { 22583, _gloffset_CopyTexImage1D },
- { 25150, _gloffset_CopyTexSubImage2D },
- { 27382, _gloffset_CopyTexSubImage1D },
+ { 13920, _gloffset_CopyTexSubImage3D },
+ { 15480, _gloffset_CopyTexImage2D },
+ { 22797, _gloffset_CopyTexImage1D },
+ { 25391, _gloffset_CopyTexSubImage2D },
+ { 27649, _gloffset_CopyTexSubImage1D },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_cull_vertex)
static const struct gl_function_remap GL_EXT_cull_vertex_functions[] = {
- { 8056, -1 }, /* CullParameterdvEXT */
- { 10699, -1 }, /* CullParameterfvEXT */
+ { 8137, -1 }, /* CullParameterdvEXT */
+ { 10809, -1 }, /* CullParameterfvEXT */
{ -1, -1 }
};
#endif
@@ -5377,7 +5432,7 @@ static const struct gl_function_remap GL_EXT_draw_instanced_functions[] = {
#if defined(need_GL_EXT_draw_range_elements)
static const struct gl_function_remap GL_EXT_draw_range_elements_functions[] = {
- { 8704, _gloffset_DrawRangeElements },
+ { 8785, _gloffset_DrawRangeElements },
{ -1, -1 }
};
#endif
@@ -5420,38 +5475,38 @@ static const struct gl_function_remap GL_EXT_gpu_program_parameters_functions[]
#if defined(need_GL_EXT_histogram)
static const struct gl_function_remap GL_EXT_histogram_functions[] = {
{ 851, _gloffset_Histogram },
- { 3127, _gloffset_ResetHistogram },
- { 9104, _gloffset_GetMinmax },
- { 14144, _gloffset_GetHistogramParameterfv },
- { 22508, _gloffset_GetMinmaxParameteriv },
- { 24505, _gloffset_ResetMinmax },
- { 25366, _gloffset_GetHistogramParameteriv },
- { 26453, _gloffset_GetHistogram },
- { 28851, _gloffset_Minmax },
- { 30313, _gloffset_GetMinmaxParameterfv },
+ { 3178, _gloffset_ResetHistogram },
+ { 9214, _gloffset_GetMinmax },
+ { 14254, _gloffset_GetHistogramParameterfv },
+ { 22722, _gloffset_GetMinmaxParameteriv },
+ { 24746, _gloffset_ResetMinmax },
+ { 25607, _gloffset_GetHistogramParameteriv },
+ { 26720, _gloffset_GetHistogram },
+ { 29141, _gloffset_Minmax },
+ { 30603, _gloffset_GetMinmaxParameterfv },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_index_func)
static const struct gl_function_remap GL_EXT_index_func_functions[] = {
- { 10485, -1 }, /* IndexFuncEXT */
+ { 10595, -1 }, /* IndexFuncEXT */
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_index_material)
static const struct gl_function_remap GL_EXT_index_material_functions[] = {
- { 19443, -1 }, /* IndexMaterialEXT */
+ { 19633, -1 }, /* IndexMaterialEXT */
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_light_texture)
static const struct gl_function_remap GL_EXT_light_texture_functions[] = {
- { 24399, -1 }, /* ApplyTextureEXT */
- { 24459, -1 }, /* TextureMaterialEXT */
- { 24484, -1 }, /* TextureLightEXT */
+ { 24640, -1 }, /* ApplyTextureEXT */
+ { 24700, -1 }, /* TextureMaterialEXT */
+ { 24725, -1 }, /* TextureLightEXT */
{ -1, -1 }
};
#endif
@@ -5472,20 +5527,20 @@ static const struct gl_function_remap GL_EXT_multisample_functions[] = {
#if defined(need_GL_EXT_paletted_texture)
static const struct gl_function_remap GL_EXT_paletted_texture_functions[] = {
- { 7603, _gloffset_ColorTable },
- { 13990, _gloffset_GetColorTable },
- { 21178, _gloffset_GetColorTableParameterfv },
- { 23154, _gloffset_GetColorTableParameteriv },
+ { 7684, _gloffset_ColorTable },
+ { 14100, _gloffset_GetColorTable },
+ { 21392, _gloffset_GetColorTableParameterfv },
+ { 23368, _gloffset_GetColorTableParameteriv },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_pixel_transform)
static const struct gl_function_remap GL_EXT_pixel_transform_functions[] = {
- { 20094, -1 }, /* PixelTransformParameterfEXT */
- { 20174, -1 }, /* PixelTransformParameteriEXT */
- { 28212, -1 }, /* PixelTransformParameterfvEXT */
- { 29637, -1 }, /* PixelTransformParameterivEXT */
+ { 20284, -1 }, /* PixelTransformParameterfEXT */
+ { 20364, -1 }, /* PixelTransformParameteriEXT */
+ { 28479, -1 }, /* PixelTransformParameterfvEXT */
+ { 29927, -1 }, /* PixelTransformParameterivEXT */
{ -1, -1 }
};
#endif
@@ -5518,6 +5573,13 @@ static const struct gl_function_remap GL_EXT_secondary_color_functions[] = {
};
#endif
+#if defined(need_GL_EXT_separate_shader_objects)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_separate_shader_objects_functions[] = {
+ { -1, -1 }
+};
+#endif
+
#if defined(need_GL_EXT_stencil_two_side)
/* functions defined in MESA_remap_table_functions are excluded */
static const struct gl_function_remap GL_EXT_stencil_two_side_functions[] = {
@@ -5527,8 +5589,8 @@ static const struct gl_function_remap GL_EXT_stencil_two_side_functions[] = {
#if defined(need_GL_EXT_subtexture)
static const struct gl_function_remap GL_EXT_subtexture_functions[] = {
- { 6324, _gloffset_TexSubImage1D },
- { 9718, _gloffset_TexSubImage2D },
+ { 6405, _gloffset_TexSubImage1D },
+ { 9828, _gloffset_TexSubImage2D },
{ -1, -1 }
};
#endif
@@ -5536,7 +5598,7 @@ static const struct gl_function_remap GL_EXT_subtexture_functions[] = {
#if defined(need_GL_EXT_texture3D)
static const struct gl_function_remap GL_EXT_texture3D_functions[] = {
{ 1697, _gloffset_TexImage3D },
- { 20947, _gloffset_TexSubImage3D },
+ { 21161, _gloffset_TexSubImage3D },
{ -1, -1 }
};
#endif
@@ -5548,21 +5610,28 @@ static const struct gl_function_remap GL_EXT_texture_array_functions[] = {
};
#endif
+#if defined(need_GL_EXT_texture_integer)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_texture_integer_functions[] = {
+ { -1, -1 }
+};
+#endif
+
#if defined(need_GL_EXT_texture_object)
static const struct gl_function_remap GL_EXT_texture_object_functions[] = {
- { 3003, _gloffset_PrioritizeTextures },
- { 6773, _gloffset_AreTexturesResident },
- { 12460, _gloffset_GenTextures },
- { 14476, _gloffset_DeleteTextures },
- { 17894, _gloffset_IsTexture },
- { 27447, _gloffset_BindTexture },
+ { 3029, _gloffset_PrioritizeTextures },
+ { 6854, _gloffset_AreTexturesResident },
+ { 12570, _gloffset_GenTextures },
+ { 14586, _gloffset_DeleteTextures },
+ { 18084, _gloffset_IsTexture },
+ { 27714, _gloffset_BindTexture },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_texture_perturb_normal)
static const struct gl_function_remap GL_EXT_texture_perturb_normal_functions[] = {
- { 12670, -1 }, /* TextureNormalEXT */
+ { 12780, -1 }, /* TextureNormalEXT */
{ -1, -1 }
};
#endif
@@ -5584,18 +5653,18 @@ static const struct gl_function_remap GL_EXT_transform_feedback_functions[] = {
#if defined(need_GL_EXT_vertex_array)
/* functions defined in MESA_remap_table_functions are excluded */
static const struct gl_function_remap GL_EXT_vertex_array_functions[] = {
- { 22335, _gloffset_ArrayElement },
- { 28439, _gloffset_GetPointerv },
- { 29940, _gloffset_DrawArrays },
+ { 22549, _gloffset_ArrayElement },
+ { 28729, _gloffset_GetPointerv },
+ { 30230, _gloffset_DrawArrays },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_vertex_weighting)
static const struct gl_function_remap GL_EXT_vertex_weighting_functions[] = {
- { 17924, -1 }, /* VertexWeightfvEXT */
- { 24870, -1 }, /* VertexWeightfEXT */
- { 26422, -1 }, /* VertexWeightPointerEXT */
+ { 18114, -1 }, /* VertexWeightfvEXT */
+ { 25111, -1 }, /* VertexWeightfEXT */
+ { 26689, -1 }, /* VertexWeightPointerEXT */
{ -1, -1 }
};
#endif
@@ -5603,11 +5672,11 @@ static const struct gl_function_remap GL_EXT_vertex_weighting_functions[] = {
#if defined(need_GL_HP_image_transform)
static const struct gl_function_remap GL_HP_image_transform_functions[] = {
{ 2196, -1 }, /* GetImageTransformParameterfvHP */
- { 3344, -1 }, /* ImageTransformParameterfHP */
- { 9296, -1 }, /* ImageTransformParameterfvHP */
- { 10954, -1 }, /* ImageTransformParameteriHP */
- { 11301, -1 }, /* GetImageTransformParameterivHP */
- { 17988, -1 }, /* ImageTransformParameterivHP */
+ { 3395, -1 }, /* ImageTransformParameterfHP */
+ { 9406, -1 }, /* ImageTransformParameterfvHP */
+ { 11064, -1 }, /* ImageTransformParameteriHP */
+ { 11411, -1 }, /* GetImageTransformParameterivHP */
+ { 18178, -1 }, /* ImageTransformParameterivHP */
{ -1, -1 }
};
#endif
@@ -5621,14 +5690,14 @@ static const struct gl_function_remap GL_IBM_multimode_draw_arrays_functions[] =
#if defined(need_GL_IBM_vertex_array_lists)
static const struct gl_function_remap GL_IBM_vertex_array_lists_functions[] = {
- { 3896, -1 }, /* SecondaryColorPointerListIBM */
- { 5291, -1 }, /* NormalPointerListIBM */
- { 6947, -1 }, /* FogCoordPointerListIBM */
- { 7254, -1 }, /* VertexPointerListIBM */
- { 10875, -1 }, /* ColorPointerListIBM */
- { 12291, -1 }, /* TexCoordPointerListIBM */
- { 12692, -1 }, /* IndexPointerListIBM */
- { 30256, -1 }, /* EdgeFlagPointerListIBM */
+ { 3947, -1 }, /* SecondaryColorPointerListIBM */
+ { 5372, -1 }, /* NormalPointerListIBM */
+ { 7028, -1 }, /* FogCoordPointerListIBM */
+ { 7335, -1 }, /* VertexPointerListIBM */
+ { 10985, -1 }, /* ColorPointerListIBM */
+ { 12401, -1 }, /* TexCoordPointerListIBM */
+ { 12802, -1 }, /* IndexPointerListIBM */
+ { 30546, -1 }, /* EdgeFlagPointerListIBM */
{ -1, -1 }
};
#endif
@@ -5642,10 +5711,10 @@ static const struct gl_function_remap GL_INGR_blend_func_separate_functions[] =
#if defined(need_GL_INTEL_parallel_arrays)
static const struct gl_function_remap GL_INTEL_parallel_arrays_functions[] = {
- { 11678, -1 }, /* VertexPointervINTEL */
- { 14237, -1 }, /* ColorPointervINTEL */
- { 27718, -1 }, /* NormalPointervINTEL */
- { 28144, -1 }, /* TexCoordPointervINTEL */
+ { 11788, -1 }, /* VertexPointervINTEL */
+ { 14347, -1 }, /* ColorPointervINTEL */
+ { 27985, -1 }, /* NormalPointervINTEL */
+ { 28411, -1 }, /* TexCoordPointervINTEL */
{ -1, -1 }
};
#endif
@@ -5660,9 +5729,9 @@ static const struct gl_function_remap GL_MESA_resize_buffers_functions[] = {
#if defined(need_GL_MESA_shader_debug)
static const struct gl_function_remap GL_MESA_shader_debug_functions[] = {
{ 1561, -1 }, /* GetDebugLogLengthMESA */
- { 3102, -1 }, /* ClearDebugLogMESA */
- { 4057, -1 }, /* GetDebugLogMESA */
- { 28632, -1 }, /* CreateDebugObjectMESA */
+ { 3153, -1 }, /* ClearDebugLogMESA */
+ { 4108, -1 }, /* GetDebugLogMESA */
+ { 28922, -1 }, /* CreateDebugObjectMESA */
{ -1, -1 }
};
#endif
@@ -5683,15 +5752,15 @@ static const struct gl_function_remap GL_NV_condtitional_render_functions[] = {
#if defined(need_GL_NV_evaluators)
static const struct gl_function_remap GL_NV_evaluators_functions[] = {
- { 5986, -1 }, /* GetMapAttribParameterivNV */
- { 7709, -1 }, /* MapControlPointsNV */
- { 7808, -1 }, /* MapParameterfvNV */
- { 9701, -1 }, /* EvalMapsNV */
- { 15852, -1 }, /* GetMapAttribParameterfvNV */
- { 16018, -1 }, /* MapParameterivNV */
- { 22898, -1 }, /* GetMapParameterivNV */
- { 23396, -1 }, /* GetMapParameterfvNV */
- { 27054, -1 }, /* GetMapControlPointsNV */
+ { 6067, -1 }, /* GetMapAttribParameterivNV */
+ { 7790, -1 }, /* MapControlPointsNV */
+ { 7889, -1 }, /* MapParameterfvNV */
+ { 9811, -1 }, /* EvalMapsNV */
+ { 15991, -1 }, /* GetMapAttribParameterfvNV */
+ { 16208, -1 }, /* MapParameterivNV */
+ { 23112, -1 }, /* GetMapParameterivNV */
+ { 23610, -1 }, /* GetMapParameterfvNV */
+ { 27321, -1 }, /* GetMapControlPointsNV */
{ -1, -1 }
};
#endif
@@ -5717,6 +5786,13 @@ static const struct gl_function_remap GL_NV_point_sprite_functions[] = {
};
#endif
+#if defined(need_GL_NV_primitive_restart)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_NV_primitive_restart_functions[] = {
+ { -1, -1 }
+};
+#endif
+
#if defined(need_GL_NV_register_combiners)
/* functions defined in MESA_remap_table_functions are excluded */
static const struct gl_function_remap GL_NV_register_combiners_functions[] = {
@@ -5726,8 +5802,8 @@ static const struct gl_function_remap GL_NV_register_combiners_functions[] = {
#if defined(need_GL_NV_register_combiners2)
static const struct gl_function_remap GL_NV_register_combiners2_functions[] = {
- { 14707, -1 }, /* CombinerStageParameterfvNV */
- { 15022, -1 }, /* GetCombinerStageParameterfvNV */
+ { 14817, -1 }, /* CombinerStageParameterfvNV */
+ { 15132, -1 }, /* GetCombinerStageParameterfvNV */
{ -1, -1 }
};
#endif
@@ -5755,23 +5831,23 @@ static const struct gl_function_remap GL_OES_EGL_image_functions[] = {
#if defined(need_GL_PGI_misc_hints)
static const struct gl_function_remap GL_PGI_misc_hints_functions[] = {
- { 7893, -1 }, /* HintPGI */
+ { 7974, -1 }, /* HintPGI */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIS_detail_texture)
static const struct gl_function_remap GL_SGIS_detail_texture_functions[] = {
- { 14995, -1 }, /* GetDetailTexFuncSGIS */
- { 15315, -1 }, /* DetailTexFuncSGIS */
+ { 15105, -1 }, /* GetDetailTexFuncSGIS */
+ { 15425, -1 }, /* DetailTexFuncSGIS */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIS_fog_function)
static const struct gl_function_remap GL_SGIS_fog_function_functions[] = {
- { 25132, -1 }, /* FogFuncSGIS */
- { 25797, -1 }, /* GetFogFuncSGIS */
+ { 25373, -1 }, /* FogFuncSGIS */
+ { 26038, -1 }, /* GetFogFuncSGIS */
{ -1, -1 }
};
#endif
@@ -5799,8 +5875,8 @@ static const struct gl_function_remap GL_SGIS_point_parameters_functions[] = {
#if defined(need_GL_SGIS_sharpen_texture)
static const struct gl_function_remap GL_SGIS_sharpen_texture_functions[] = {
- { 6047, -1 }, /* GetSharpenTexFuncSGIS */
- { 20414, -1 }, /* SharpenTexFuncSGIS */
+ { 6128, -1 }, /* GetSharpenTexFuncSGIS */
+ { 20604, -1 }, /* SharpenTexFuncSGIS */
{ -1, -1 }
};
#endif
@@ -5808,41 +5884,41 @@ static const struct gl_function_remap GL_SGIS_sharpen_texture_functions[] = {
#if defined(need_GL_SGIS_texture4D)
static const struct gl_function_remap GL_SGIS_texture4D_functions[] = {
{ 933, -1 }, /* TexImage4DSGIS */
- { 14545, -1 }, /* TexSubImage4DSGIS */
+ { 14655, -1 }, /* TexSubImage4DSGIS */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIS_texture_color_mask)
static const struct gl_function_remap GL_SGIS_texture_color_mask_functions[] = {
- { 13943, -1 }, /* TextureColorMaskSGIS */
+ { 14053, -1 }, /* TextureColorMaskSGIS */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIS_texture_filter4)
static const struct gl_function_remap GL_SGIS_texture_filter4_functions[] = {
- { 6224, -1 }, /* GetTexFilterFuncSGIS */
- { 15141, -1 }, /* TexFilterFuncSGIS */
+ { 6305, -1 }, /* GetTexFilterFuncSGIS */
+ { 15251, -1 }, /* TexFilterFuncSGIS */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_async)
static const struct gl_function_remap GL_SGIX_async_functions[] = {
- { 3053, -1 }, /* AsyncMarkerSGIX */
- { 4036, -1 }, /* FinishAsyncSGIX */
- { 4830, -1 }, /* PollAsyncSGIX */
- { 20561, -1 }, /* DeleteAsyncMarkersSGIX */
- { 20616, -1 }, /* IsAsyncMarkerSGIX */
- { 30053, -1 }, /* GenAsyncMarkersSGIX */
+ { 3079, -1 }, /* AsyncMarkerSGIX */
+ { 4087, -1 }, /* FinishAsyncSGIX */
+ { 4881, -1 }, /* PollAsyncSGIX */
+ { 20751, -1 }, /* DeleteAsyncMarkersSGIX */
+ { 20806, -1 }, /* IsAsyncMarkerSGIX */
+ { 30343, -1 }, /* GenAsyncMarkersSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_flush_raster)
static const struct gl_function_remap GL_SGIX_flush_raster_functions[] = {
- { 6601, -1 }, /* FlushRasterSGIX */
+ { 6682, -1 }, /* FlushRasterSGIX */
{ -1, -1 }
};
#endif
@@ -5850,37 +5926,37 @@ static const struct gl_function_remap GL_SGIX_flush_raster_functions[] = {
#if defined(need_GL_SGIX_fragment_lighting)
static const struct gl_function_remap GL_SGIX_fragment_lighting_functions[] = {
{ 2449, -1 }, /* FragmentMaterialfvSGIX */
- { 4781, -1 }, /* FragmentLightiSGIX */
- { 5727, -1 }, /* GetFragmentMaterialfvSGIX */
- { 7321, -1 }, /* FragmentMaterialfSGIX */
- { 7482, -1 }, /* GetFragmentLightivSGIX */
- { 8319, -1 }, /* FragmentLightModeliSGIX */
- { 9764, -1 }, /* FragmentLightivSGIX */
- { 10066, -1 }, /* GetFragmentMaterialivSGIX */
- { 17811, -1 }, /* FragmentLightModelfSGIX */
- { 18111, -1 }, /* FragmentColorMaterialSGIX */
- { 18511, -1 }, /* FragmentMaterialiSGIX */
- { 19771, -1 }, /* LightEnviSGIX */
- { 21270, -1 }, /* FragmentLightModelfvSGIX */
- { 21579, -1 }, /* FragmentLightfvSGIX */
- { 26181, -1 }, /* FragmentLightModelivSGIX */
- { 26304, -1 }, /* FragmentLightfSGIX */
- { 28969, -1 }, /* GetFragmentLightfvSGIX */
- { 30536, -1 }, /* FragmentMaterialivSGIX */
+ { 4832, -1 }, /* FragmentLightiSGIX */
+ { 5808, -1 }, /* GetFragmentMaterialfvSGIX */
+ { 7402, -1 }, /* FragmentMaterialfSGIX */
+ { 7563, -1 }, /* GetFragmentLightivSGIX */
+ { 8400, -1 }, /* FragmentLightModeliSGIX */
+ { 9874, -1 }, /* FragmentLightivSGIX */
+ { 10176, -1 }, /* GetFragmentMaterialivSGIX */
+ { 18001, -1 }, /* FragmentLightModelfSGIX */
+ { 18301, -1 }, /* FragmentColorMaterialSGIX */
+ { 18701, -1 }, /* FragmentMaterialiSGIX */
+ { 19961, -1 }, /* LightEnviSGIX */
+ { 21484, -1 }, /* FragmentLightModelfvSGIX */
+ { 21793, -1 }, /* FragmentLightfvSGIX */
+ { 26422, -1 }, /* FragmentLightModelivSGIX */
+ { 26571, -1 }, /* FragmentLightfSGIX */
+ { 29259, -1 }, /* GetFragmentLightfvSGIX */
+ { 30826, -1 }, /* FragmentMaterialivSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_framezoom)
static const struct gl_function_remap GL_SGIX_framezoom_functions[] = {
- { 20639, -1 }, /* FrameZoomSGIX */
+ { 20829, -1 }, /* FrameZoomSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_igloo_interface)
static const struct gl_function_remap GL_SGIX_igloo_interface_functions[] = {
- { 26612, -1 }, /* IglooInterfaceSGIX */
+ { 26879, -1 }, /* IglooInterfaceSGIX */
{ -1, -1 }
};
#endif
@@ -5888,11 +5964,11 @@ static const struct gl_function_remap GL_SGIX_igloo_interface_functions[] = {
#if defined(need_GL_SGIX_instruments)
static const struct gl_function_remap GL_SGIX_instruments_functions[] = {
{ 2612, -1 }, /* ReadInstrumentsSGIX */
- { 5803, -1 }, /* PollInstrumentsSGIX */
- { 9662, -1 }, /* GetInstrumentsSGIX */
- { 11889, -1 }, /* StartInstrumentsSGIX */
- { 14741, -1 }, /* StopInstrumentsSGIX */
- { 16395, -1 }, /* InstrumentsBufferSGIX */
+ { 5884, -1 }, /* PollInstrumentsSGIX */
+ { 9772, -1 }, /* GetInstrumentsSGIX */
+ { 11999, -1 }, /* StartInstrumentsSGIX */
+ { 14851, -1 }, /* StopInstrumentsSGIX */
+ { 16585, -1 }, /* InstrumentsBufferSGIX */
{ -1, -1 }
};
#endif
@@ -5900,11 +5976,11 @@ static const struct gl_function_remap GL_SGIX_instruments_functions[] = {
#if defined(need_GL_SGIX_list_priority)
static const struct gl_function_remap GL_SGIX_list_priority_functions[] = {
{ 1164, -1 }, /* ListParameterfSGIX */
- { 2802, -1 }, /* GetListParameterfvSGIX */
- { 16310, -1 }, /* ListParameteriSGIX */
- { 17064, -1 }, /* ListParameterfvSGIX */
- { 19177, -1 }, /* ListParameterivSGIX */
- { 30097, -1 }, /* GetListParameterivSGIX */
+ { 2828, -1 }, /* GetListParameterfvSGIX */
+ { 16500, -1 }, /* ListParameteriSGIX */
+ { 17254, -1 }, /* ListParameterfvSGIX */
+ { 19367, -1 }, /* ListParameterivSGIX */
+ { 30387, -1 }, /* GetListParameterivSGIX */
{ -1, -1 }
};
#endif
@@ -5918,88 +5994,88 @@ static const struct gl_function_remap GL_SGIX_pixel_texture_functions[] = {
#if defined(need_GL_SGIX_polynomial_ffd)
static const struct gl_function_remap GL_SGIX_polynomial_ffd_functions[] = {
- { 3290, -1 }, /* LoadIdentityDeformationMapSGIX */
- { 11175, -1 }, /* DeformationMap3dSGIX */
- { 14841, -1 }, /* DeformSGIX */
- { 22447, -1 }, /* DeformationMap3fSGIX */
+ { 3341, -1 }, /* LoadIdentityDeformationMapSGIX */
+ { 11285, -1 }, /* DeformationMap3dSGIX */
+ { 14951, -1 }, /* DeformSGIX */
+ { 22661, -1 }, /* DeformationMap3fSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_reference_plane)
static const struct gl_function_remap GL_SGIX_reference_plane_functions[] = {
- { 13494, -1 }, /* ReferencePlaneSGIX */
+ { 13604, -1 }, /* ReferencePlaneSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_sprite)
static const struct gl_function_remap GL_SGIX_sprite_functions[] = {
- { 8817, -1 }, /* SpriteParameterfvSGIX */
- { 18966, -1 }, /* SpriteParameteriSGIX */
- { 24539, -1 }, /* SpriteParameterfSGIX */
- { 27176, -1 }, /* SpriteParameterivSGIX */
+ { 8898, -1 }, /* SpriteParameterfvSGIX */
+ { 19156, -1 }, /* SpriteParameteriSGIX */
+ { 24780, -1 }, /* SpriteParameterfSGIX */
+ { 27443, -1 }, /* SpriteParameterivSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_tag_sample_buffer)
static const struct gl_function_remap GL_SGIX_tag_sample_buffer_functions[] = {
- { 19025, -1 }, /* TagSampleBufferSGIX */
+ { 19215, -1 }, /* TagSampleBufferSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGI_color_table)
static const struct gl_function_remap GL_SGI_color_table_functions[] = {
- { 6891, _gloffset_ColorTableParameteriv },
- { 7603, _gloffset_ColorTable },
- { 13990, _gloffset_GetColorTable },
- { 14100, _gloffset_CopyColorTable },
- { 17755, _gloffset_ColorTableParameterfv },
- { 21178, _gloffset_GetColorTableParameterfv },
- { 23154, _gloffset_GetColorTableParameteriv },
+ { 6972, _gloffset_ColorTableParameteriv },
+ { 7684, _gloffset_ColorTable },
+ { 14100, _gloffset_GetColorTable },
+ { 14210, _gloffset_CopyColorTable },
+ { 17945, _gloffset_ColorTableParameterfv },
+ { 21392, _gloffset_GetColorTableParameterfv },
+ { 23368, _gloffset_GetColorTableParameteriv },
{ -1, -1 }
};
#endif
#if defined(need_GL_SUNX_constant_data)
static const struct gl_function_remap GL_SUNX_constant_data_functions[] = {
- { 28947, -1 }, /* FinishTextureSUNX */
+ { 29237, -1 }, /* FinishTextureSUNX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SUN_global_alpha)
static const struct gl_function_remap GL_SUN_global_alpha_functions[] = {
- { 3074, -1 }, /* GlobalAlphaFactorubSUN */
- { 4263, -1 }, /* GlobalAlphaFactoriSUN */
- { 5828, -1 }, /* GlobalAlphaFactordSUN */
- { 8901, -1 }, /* GlobalAlphaFactoruiSUN */
- { 9253, -1 }, /* GlobalAlphaFactorbSUN */
- { 12204, -1 }, /* GlobalAlphaFactorfSUN */
- { 12323, -1 }, /* GlobalAlphaFactorusSUN */
- { 20878, -1 }, /* GlobalAlphaFactorsSUN */
+ { 3100, -1 }, /* GlobalAlphaFactorubSUN */
+ { 4314, -1 }, /* GlobalAlphaFactoriSUN */
+ { 5909, -1 }, /* GlobalAlphaFactordSUN */
+ { 8982, -1 }, /* GlobalAlphaFactoruiSUN */
+ { 9363, -1 }, /* GlobalAlphaFactorbSUN */
+ { 12314, -1 }, /* GlobalAlphaFactorfSUN */
+ { 12433, -1 }, /* GlobalAlphaFactorusSUN */
+ { 21092, -1 }, /* GlobalAlphaFactorsSUN */
{ -1, -1 }
};
#endif
#if defined(need_GL_SUN_mesh_array)
static const struct gl_function_remap GL_SUN_mesh_array_functions[] = {
- { 26988, -1 }, /* DrawMeshArraysSUN */
+ { 27255, -1 }, /* DrawMeshArraysSUN */
{ -1, -1 }
};
#endif
#if defined(need_GL_SUN_triangle_list)
static const struct gl_function_remap GL_SUN_triangle_list_functions[] = {
- { 4010, -1 }, /* ReplacementCodeubSUN */
- { 5639, -1 }, /* ReplacementCodeubvSUN */
- { 17476, -1 }, /* ReplacementCodeusvSUN */
- { 17664, -1 }, /* ReplacementCodePointerSUN */
- { 19835, -1 }, /* ReplacementCodeuiSUN */
- { 20590, -1 }, /* ReplacementCodeusSUN */
- { 27633, -1 }, /* ReplacementCodeuivSUN */
+ { 4061, -1 }, /* ReplacementCodeubSUN */
+ { 5720, -1 }, /* ReplacementCodeubvSUN */
+ { 17666, -1 }, /* ReplacementCodeusvSUN */
+ { 17854, -1 }, /* ReplacementCodePointerSUN */
+ { 20025, -1 }, /* ReplacementCodeuiSUN */
+ { 20780, -1 }, /* ReplacementCodeusSUN */
+ { 27900, -1 }, /* ReplacementCodeuivSUN */
{ -1, -1 }
};
#endif
@@ -6013,39 +6089,39 @@ static const struct gl_function_remap GL_SUN_vertex_functions[] = {
{ 1872, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fvSUN */
{ 2385, -1 }, /* ReplacementCodeuiNormal3fVertex3fSUN */
{ 2681, -1 }, /* Color4ubVertex3fvSUN */
- { 4144, -1 }, /* Color4ubVertex3fSUN */
- { 4220, -1 }, /* TexCoord2fVertex3fSUN */
- { 4547, -1 }, /* TexCoord2fColor4fNormal3fVertex3fSUN */
- { 4934, -1 }, /* TexCoord2fNormal3fVertex3fvSUN */
- { 5534, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN */
- { 6279, -1 }, /* ReplacementCodeuiColor4ubVertex3fvSUN */
- { 6638, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fSUN */
- { 7350, -1 }, /* TexCoord2fNormal3fVertex3fSUN */
- { 8118, -1 }, /* Color3fVertex3fSUN */
- { 9212, -1 }, /* Color3fVertex3fvSUN */
- { 9627, -1 }, /* Color4fNormal3fVertex3fvSUN */
- { 10364, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN */
- { 11752, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fvSUN */
- { 13225, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN */
- { 13636, -1 }, /* TexCoord2fColor3fVertex3fSUN */
- { 14766, -1 }, /* TexCoord4fColor4fNormal3fVertex4fSUN */
- { 15100, -1 }, /* Color4ubVertex2fvSUN */
- { 15340, -1 }, /* Normal3fVertex3fSUN */
- { 16336, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fSUN */
- { 16597, -1 }, /* TexCoord2fColor4fNormal3fVertex3fvSUN */
- { 17305, -1 }, /* TexCoord2fVertex3fvSUN */
- { 18081, -1 }, /* Color4ubVertex2fSUN */
- { 18302, -1 }, /* ReplacementCodeuiColor4ubVertex3fSUN */
- { 20260, -1 }, /* TexCoord2fColor4ubVertex3fSUN */
- { 20658, -1 }, /* Normal3fVertex3fvSUN */
- { 21087, -1 }, /* Color4fNormal3fVertex3fSUN */
- { 21996, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN */
- { 23991, -1 }, /* ReplacementCodeuiColor3fVertex3fSUN */
- { 25248, -1 }, /* TexCoord4fVertex4fSUN */
- { 25674, -1 }, /* TexCoord2fColor3fVertex3fvSUN */
- { 26025, -1 }, /* ReplacementCodeuiNormal3fVertex3fvSUN */
- { 26152, -1 }, /* TexCoord4fVertex4fvSUN */
- { 26860, -1 }, /* ReplacementCodeuiVertex3fSUN */
+ { 4195, -1 }, /* Color4ubVertex3fSUN */
+ { 4271, -1 }, /* TexCoord2fVertex3fSUN */
+ { 4598, -1 }, /* TexCoord2fColor4fNormal3fVertex3fSUN */
+ { 4985, -1 }, /* TexCoord2fNormal3fVertex3fvSUN */
+ { 5615, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN */
+ { 6360, -1 }, /* ReplacementCodeuiColor4ubVertex3fvSUN */
+ { 6719, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fSUN */
+ { 7431, -1 }, /* TexCoord2fNormal3fVertex3fSUN */
+ { 8199, -1 }, /* Color3fVertex3fSUN */
+ { 9322, -1 }, /* Color3fVertex3fvSUN */
+ { 9737, -1 }, /* Color4fNormal3fVertex3fvSUN */
+ { 10474, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN */
+ { 11862, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fvSUN */
+ { 13335, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN */
+ { 13746, -1 }, /* TexCoord2fColor3fVertex3fSUN */
+ { 14876, -1 }, /* TexCoord4fColor4fNormal3fVertex4fSUN */
+ { 15210, -1 }, /* Color4ubVertex2fvSUN */
+ { 15450, -1 }, /* Normal3fVertex3fSUN */
+ { 16526, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fSUN */
+ { 16787, -1 }, /* TexCoord2fColor4fNormal3fVertex3fvSUN */
+ { 17495, -1 }, /* TexCoord2fVertex3fvSUN */
+ { 18271, -1 }, /* Color4ubVertex2fSUN */
+ { 18492, -1 }, /* ReplacementCodeuiColor4ubVertex3fSUN */
+ { 20450, -1 }, /* TexCoord2fColor4ubVertex3fSUN */
+ { 20848, -1 }, /* Normal3fVertex3fvSUN */
+ { 21301, -1 }, /* Color4fNormal3fVertex3fSUN */
+ { 22210, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN */
+ { 24205, -1 }, /* ReplacementCodeuiColor3fVertex3fSUN */
+ { 25489, -1 }, /* TexCoord4fVertex4fSUN */
+ { 25915, -1 }, /* TexCoord2fColor3fVertex3fvSUN */
+ { 26266, -1 }, /* ReplacementCodeuiNormal3fVertex3fvSUN */
+ { 26393, -1 }, /* TexCoord4fVertex4fvSUN */
+ { 27127, -1 }, /* ReplacementCodeuiVertex3fSUN */
{ -1, -1 }
};
#endif
@@ -6055,38 +6131,38 @@ static const struct gl_function_remap GL_SUN_vertex_functions[] = {
static const struct gl_function_remap GL_VERSION_1_3_functions[] = {
{ 420, _gloffset_MultiTexCoord3sARB },
{ 652, _gloffset_ActiveTextureARB },
- { 3800, _gloffset_MultiTexCoord1fvARB },
- { 5425, _gloffset_MultiTexCoord3dARB },
- { 5470, _gloffset_MultiTexCoord2iARB },
- { 5594, _gloffset_MultiTexCoord2svARB },
- { 7559, _gloffset_MultiTexCoord2fARB },
- { 9463, _gloffset_MultiTexCoord3fvARB },
- { 10020, _gloffset_MultiTexCoord4sARB },
- { 10654, _gloffset_MultiTexCoord2dvARB },
- { 11036, _gloffset_MultiTexCoord1svARB },
- { 11447, _gloffset_MultiTexCoord3svARB },
- { 11508, _gloffset_MultiTexCoord4iARB },
- { 12231, _gloffset_MultiTexCoord3iARB },
- { 12963, _gloffset_MultiTexCoord1dARB },
- { 13180, _gloffset_MultiTexCoord3dvARB },
- { 14344, _gloffset_MultiTexCoord3ivARB },
- { 14389, _gloffset_MultiTexCoord2sARB },
- { 15687, _gloffset_MultiTexCoord4ivARB },
- { 17405, _gloffset_ClientActiveTextureARB },
- { 19688, _gloffset_MultiTexCoord2dARB },
- { 20129, _gloffset_MultiTexCoord4dvARB },
- { 20440, _gloffset_MultiTexCoord4fvARB },
- { 21319, _gloffset_MultiTexCoord3fARB },
- { 23682, _gloffset_MultiTexCoord4dARB },
- { 23948, _gloffset_MultiTexCoord1sARB },
- { 24152, _gloffset_MultiTexCoord1dvARB },
- { 24994, _gloffset_MultiTexCoord1ivARB },
- { 25087, _gloffset_MultiTexCoord2ivARB },
- { 25426, _gloffset_MultiTexCoord1iARB },
- { 26728, _gloffset_MultiTexCoord4svARB },
- { 27246, _gloffset_MultiTexCoord1fARB },
- { 27509, _gloffset_MultiTexCoord4fARB },
- { 29774, _gloffset_MultiTexCoord2fvARB },
+ { 3851, _gloffset_MultiTexCoord1fvARB },
+ { 5506, _gloffset_MultiTexCoord3dARB },
+ { 5551, _gloffset_MultiTexCoord2iARB },
+ { 5675, _gloffset_MultiTexCoord2svARB },
+ { 7640, _gloffset_MultiTexCoord2fARB },
+ { 9573, _gloffset_MultiTexCoord3fvARB },
+ { 10130, _gloffset_MultiTexCoord4sARB },
+ { 10764, _gloffset_MultiTexCoord2dvARB },
+ { 11146, _gloffset_MultiTexCoord1svARB },
+ { 11557, _gloffset_MultiTexCoord3svARB },
+ { 11618, _gloffset_MultiTexCoord4iARB },
+ { 12341, _gloffset_MultiTexCoord3iARB },
+ { 13073, _gloffset_MultiTexCoord1dARB },
+ { 13290, _gloffset_MultiTexCoord3dvARB },
+ { 14454, _gloffset_MultiTexCoord3ivARB },
+ { 14499, _gloffset_MultiTexCoord2sARB },
+ { 15826, _gloffset_MultiTexCoord4ivARB },
+ { 17595, _gloffset_ClientActiveTextureARB },
+ { 19878, _gloffset_MultiTexCoord2dARB },
+ { 20319, _gloffset_MultiTexCoord4dvARB },
+ { 20630, _gloffset_MultiTexCoord4fvARB },
+ { 21533, _gloffset_MultiTexCoord3fARB },
+ { 23896, _gloffset_MultiTexCoord4dARB },
+ { 24162, _gloffset_MultiTexCoord1sARB },
+ { 24366, _gloffset_MultiTexCoord1dvARB },
+ { 25235, _gloffset_MultiTexCoord1ivARB },
+ { 25328, _gloffset_MultiTexCoord2ivARB },
+ { 25667, _gloffset_MultiTexCoord1iARB },
+ { 26995, _gloffset_MultiTexCoord4svARB },
+ { 27513, _gloffset_MultiTexCoord1fARB },
+ { 27776, _gloffset_MultiTexCoord4fARB },
+ { 30064, _gloffset_MultiTexCoord2fvARB },
{ -1, -1 }
};
#endif
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c
index 118fb52bb2e..dc8bc747874 100644
--- a/src/mesa/main/renderbuffer.c
+++ b/src/mesa/main/renderbuffer.c
@@ -61,7 +61,7 @@
*/
static void *
-get_pointer_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb,
+get_pointer_ubyte(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLint x, GLint y)
{
if (!rb->Data)
@@ -75,7 +75,7 @@ get_pointer_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb,
static void
-get_row_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+get_row_ubyte(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, void *values)
{
const GLubyte *src = (const GLubyte *) rb->Data + y * rb->Width + x;
@@ -85,7 +85,7 @@ get_row_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-get_values_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+get_values_ubyte(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLint x[], const GLint y[], void *values)
{
GLubyte *dst = (GLubyte *) values;
@@ -99,7 +99,7 @@ get_values_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_row_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+put_row_ubyte(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, const void *values, const GLubyte *mask)
{
const GLubyte *src = (const GLubyte *) values;
@@ -120,7 +120,7 @@ put_row_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_mono_row_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+put_mono_row_ubyte(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, const void *value, const GLubyte *mask)
{
const GLubyte val = *((const GLubyte *) value);
@@ -144,7 +144,7 @@ put_mono_row_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_values_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+put_values_ubyte(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLint x[], const GLint y[],
const void *values, const GLubyte *mask)
{
@@ -161,7 +161,7 @@ put_values_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_mono_values_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+put_mono_values_ubyte(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLint x[], const GLint y[],
const void *value, const GLubyte *mask)
{
@@ -183,7 +183,7 @@ put_mono_values_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
*/
static void *
-get_pointer_ushort(GLcontext *ctx, struct gl_renderbuffer *rb,
+get_pointer_ushort(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLint x, GLint y)
{
if (!rb->Data)
@@ -195,7 +195,7 @@ get_pointer_ushort(GLcontext *ctx, struct gl_renderbuffer *rb,
static void
-get_row_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+get_row_ushort(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, void *values)
{
const void *src = rb->GetPointer(ctx, rb, x, y);
@@ -205,7 +205,7 @@ get_row_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-get_values_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+get_values_ushort(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLint x[], const GLint y[], void *values)
{
GLushort *dst = (GLushort *) values;
@@ -219,7 +219,7 @@ get_values_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_row_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+put_row_ushort(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, const void *values, const GLubyte *mask)
{
const GLushort *src = (const GLushort *) values;
@@ -240,7 +240,7 @@ put_row_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_mono_row_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+put_mono_row_ushort(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, const void *value, const GLubyte *mask)
{
const GLushort val = *((const GLushort *) value);
@@ -264,7 +264,7 @@ put_mono_row_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_values_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+put_values_ushort(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLint x[], const GLint y[], const void *values,
const GLubyte *mask)
{
@@ -281,7 +281,7 @@ put_values_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_mono_values_ushort(GLcontext *ctx, struct gl_renderbuffer *rb,
+put_mono_values_ushort(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, const GLint x[], const GLint y[],
const void *value, const GLubyte *mask)
{
@@ -312,7 +312,7 @@ put_mono_values_ushort(GLcontext *ctx, struct gl_renderbuffer *rb,
*/
static void *
-get_pointer_uint(GLcontext *ctx, struct gl_renderbuffer *rb,
+get_pointer_uint(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLint x, GLint y)
{
if (!rb->Data)
@@ -324,7 +324,7 @@ get_pointer_uint(GLcontext *ctx, struct gl_renderbuffer *rb,
static void
-get_row_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+get_row_uint(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, void *values)
{
const void *src = rb->GetPointer(ctx, rb, x, y);
@@ -335,7 +335,7 @@ get_row_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-get_values_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+get_values_uint(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLint x[], const GLint y[], void *values)
{
GLuint *dst = (GLuint *) values;
@@ -350,7 +350,7 @@ get_values_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_row_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+put_row_uint(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, const void *values, const GLubyte *mask)
{
const GLuint *src = (const GLuint *) values;
@@ -372,7 +372,7 @@ put_row_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_mono_row_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+put_mono_row_uint(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, const void *value, const GLubyte *mask)
{
const GLuint val = *((const GLuint *) value);
@@ -397,7 +397,7 @@ put_mono_row_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_values_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+put_values_uint(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLint x[], const GLint y[], const void *values,
const GLubyte *mask)
{
@@ -415,7 +415,7 @@ put_values_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_mono_values_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+put_mono_values_uint(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLint x[], const GLint y[], const void *value,
const GLubyte *mask)
{
@@ -440,7 +440,7 @@ put_mono_values_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
*/
static void *
-get_pointer_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb,
+get_pointer_ubyte3(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLint x, GLint y)
{
ASSERT(rb->Format == MESA_FORMAT_RGB888);
@@ -452,7 +452,7 @@ get_pointer_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb,
static void
-get_row_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+get_row_ubyte3(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, void *values)
{
const GLubyte *src = (const GLubyte *) rb->Data + 3 * (y * rb->Width + x);
@@ -470,7 +470,7 @@ get_row_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-get_values_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+get_values_ubyte3(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLint x[], const GLint y[], void *values)
{
GLubyte *dst = (GLubyte *) values;
@@ -489,7 +489,7 @@ get_values_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_row_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+put_row_ubyte3(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, const void *values, const GLubyte *mask)
{
/* note: incoming values are RGB+A! */
@@ -509,7 +509,7 @@ put_row_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_row_rgb_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+put_row_rgb_ubyte3(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, const void *values, const GLubyte *mask)
{
/* note: incoming values are RGB+A! */
@@ -529,7 +529,7 @@ put_row_rgb_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_mono_row_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+put_mono_row_ubyte3(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, const void *value, const GLubyte *mask)
{
/* note: incoming value is RGB+A! */
@@ -557,7 +557,7 @@ put_mono_row_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_values_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+put_values_ubyte3(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLint x[], const GLint y[], const void *values,
const GLubyte *mask)
{
@@ -578,7 +578,7 @@ put_values_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_mono_values_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb,
+put_mono_values_ubyte3(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, const GLint x[], const GLint y[],
const void *value, const GLubyte *mask)
{
@@ -606,7 +606,7 @@ put_mono_values_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb,
*/
static void *
-get_pointer_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb,
+get_pointer_ubyte4(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLint x, GLint y)
{
if (!rb->Data)
@@ -618,7 +618,7 @@ get_pointer_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb,
static void
-get_row_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+get_row_ubyte4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, void *values)
{
const GLubyte *src = (const GLubyte *) rb->Data + 4 * (y * rb->Width + x);
@@ -629,7 +629,7 @@ get_row_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-get_values_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+get_values_ubyte4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLint x[], const GLint y[], void *values)
{
/* treat 4*GLubyte as 1*GLuint */
@@ -645,7 +645,7 @@ get_values_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_row_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+put_row_ubyte4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, const void *values, const GLubyte *mask)
{
/* treat 4*GLubyte as 1*GLuint */
@@ -668,7 +668,7 @@ put_row_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_row_rgb_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+put_row_rgb_ubyte4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, const void *values, const GLubyte *mask)
{
/* Store RGB values in RGBA buffer */
@@ -689,7 +689,7 @@ put_row_rgb_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_mono_row_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+put_mono_row_ubyte4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, const void *value, const GLubyte *mask)
{
/* treat 4*GLubyte as 1*GLuint */
@@ -722,7 +722,7 @@ put_mono_row_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_values_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+put_values_ubyte4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLint x[], const GLint y[], const void *values,
const GLubyte *mask)
{
@@ -741,7 +741,7 @@ put_values_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_mono_values_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb,
+put_mono_values_ubyte4(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, const GLint x[], const GLint y[],
const void *value, const GLubyte *mask)
{
@@ -765,7 +765,7 @@ put_mono_values_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb,
*/
static void *
-get_pointer_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb,
+get_pointer_ushort4(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLint x, GLint y)
{
if (!rb->Data)
@@ -776,7 +776,7 @@ get_pointer_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb,
static void
-get_row_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+get_row_ushort4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, void *values)
{
const GLshort *src = (const GLshort *) rb->Data + 4 * (y * rb->Width + x);
@@ -786,7 +786,7 @@ get_row_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-get_values_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+get_values_ushort4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLint x[], const GLint y[], void *values)
{
GLushort *dst = (GLushort *) values;
@@ -801,7 +801,7 @@ get_values_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_row_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+put_row_ushort4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, const void *values, const GLubyte *mask)
{
const GLushort *src = (const GLushort *) values;
@@ -825,7 +825,7 @@ put_row_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_row_rgb_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+put_row_rgb_ushort4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, const void *values, const GLubyte *mask)
{
/* Put RGB values in RGBA buffer */
@@ -850,7 +850,7 @@ put_row_rgb_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_mono_row_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+put_mono_row_ushort4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, const void *value, const GLubyte *mask)
{
const GLushort val0 = ((const GLushort *) value)[0];
@@ -878,7 +878,7 @@ put_mono_row_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_values_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+put_values_ushort4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLint x[], const GLint y[], const void *values,
const GLubyte *mask)
{
@@ -898,7 +898,7 @@ put_values_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_mono_values_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb,
+put_mono_values_ushort4(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, const GLint x[], const GLint y[],
const void *value, const GLubyte *mask)
{
@@ -936,7 +936,7 @@ put_mono_values_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb,
* Get/PutValues functions.
*/
GLboolean
-_mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
+_mesa_soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLenum internalFormat,
GLuint width, GLuint height)
{
@@ -1145,7 +1145,7 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
static GLboolean
-alloc_storage_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb,
+alloc_storage_alpha8(struct gl_context *ctx, struct gl_renderbuffer *arb,
GLenum internalFormat, GLuint width, GLuint height)
{
ASSERT(arb != arb->Wrapped);
@@ -1195,7 +1195,7 @@ delete_renderbuffer_alpha8(struct gl_renderbuffer *arb)
static void *
-get_pointer_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb,
+get_pointer_alpha8(struct gl_context *ctx, struct gl_renderbuffer *arb,
GLint x, GLint y)
{
return NULL; /* don't allow direct access! */
@@ -1203,7 +1203,7 @@ get_pointer_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb,
static void
-get_row_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count,
+get_row_alpha8(struct gl_context *ctx, struct gl_renderbuffer *arb, GLuint count,
GLint x, GLint y, void *values)
{
/* NOTE: 'values' is RGBA format! */
@@ -1222,7 +1222,7 @@ get_row_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count,
static void
-get_values_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count,
+get_values_alpha8(struct gl_context *ctx, struct gl_renderbuffer *arb, GLuint count,
const GLint x[], const GLint y[], void *values)
{
GLubyte *dst = (GLubyte *) values;
@@ -1240,7 +1240,7 @@ get_values_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count,
static void
-put_row_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count,
+put_row_alpha8(struct gl_context *ctx, struct gl_renderbuffer *arb, GLuint count,
GLint x, GLint y, const void *values, const GLubyte *mask)
{
const GLubyte *src = (const GLubyte *) values;
@@ -1260,7 +1260,7 @@ put_row_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count,
static void
-put_row_rgb_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count,
+put_row_rgb_alpha8(struct gl_context *ctx, struct gl_renderbuffer *arb, GLuint count,
GLint x, GLint y, const void *values, const GLubyte *mask)
{
const GLubyte *src = (const GLubyte *) values;
@@ -1280,7 +1280,7 @@ put_row_rgb_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count,
static void
-put_mono_row_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count,
+put_mono_row_alpha8(struct gl_context *ctx, struct gl_renderbuffer *arb, GLuint count,
GLint x, GLint y, const void *value, const GLubyte *mask)
{
const GLubyte val = ((const GLubyte *) value)[3];
@@ -1305,7 +1305,7 @@ put_mono_row_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count,
static void
-put_values_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count,
+put_values_alpha8(struct gl_context *ctx, struct gl_renderbuffer *arb, GLuint count,
const GLint x[], const GLint y[],
const void *values, const GLubyte *mask)
{
@@ -1326,7 +1326,7 @@ put_values_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count,
static void
-put_mono_values_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb,
+put_mono_values_alpha8(struct gl_context *ctx, struct gl_renderbuffer *arb,
GLuint count, const GLint x[], const GLint y[],
const void *value, const GLubyte *mask)
{
@@ -1368,7 +1368,7 @@ copy_buffer_alpha8(struct gl_renderbuffer* dst, struct gl_renderbuffer* src)
* direct buffer access is not supported.
*/
static void *
-nop_get_pointer(GLcontext *ctx, struct gl_renderbuffer *rb, GLint x, GLint y)
+nop_get_pointer(struct gl_context *ctx, struct gl_renderbuffer *rb, GLint x, GLint y)
{
return NULL;
}
@@ -1422,7 +1422,7 @@ _mesa_init_renderbuffer(struct gl_renderbuffer *rb, GLuint name)
* renderbuffers or window-system renderbuffers.
*/
struct gl_renderbuffer *
-_mesa_new_renderbuffer(GLcontext *ctx, GLuint name)
+_mesa_new_renderbuffer(struct gl_context *ctx, GLuint name)
{
struct gl_renderbuffer *rb = CALLOC_STRUCT(gl_renderbuffer);
if (rb) {
@@ -1453,7 +1453,7 @@ _mesa_delete_renderbuffer(struct gl_renderbuffer *rb)
* This would not be used for hardware-based renderbuffers.
*/
struct gl_renderbuffer *
-_mesa_new_soft_renderbuffer(GLcontext *ctx, GLuint name)
+_mesa_new_soft_renderbuffer(struct gl_context *ctx, GLuint name)
{
struct gl_renderbuffer *rb = _mesa_new_renderbuffer(ctx, name);
if (rb) {
@@ -1476,7 +1476,7 @@ _mesa_new_soft_renderbuffer(GLcontext *ctx, GLuint name)
* rendering!
*/
GLboolean
-_mesa_add_color_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb,
+_mesa_add_color_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb,
GLuint rgbBits, GLuint alphaBits,
GLboolean frontLeft, GLboolean backLeft,
GLboolean frontRight, GLboolean backRight)
@@ -1540,7 +1540,7 @@ _mesa_add_color_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb,
* rendering!
*/
GLboolean
-_mesa_add_alpha_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb,
+_mesa_add_alpha_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb,
GLuint alphaBits,
GLboolean frontLeft, GLboolean backLeft,
GLboolean frontRight, GLboolean backRight)
@@ -1624,7 +1624,7 @@ _mesa_add_alpha_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb,
* copy the back buffer alpha channel into the front buffer alpha channel.
*/
void
-_mesa_copy_soft_alpha_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb)
+_mesa_copy_soft_alpha_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb)
{
if (fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer &&
fb->Attachment[BUFFER_BACK_LEFT].Renderbuffer)
@@ -1648,7 +1648,7 @@ _mesa_copy_soft_alpha_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb)
* rendering!
*/
GLboolean
-_mesa_add_depth_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb,
+_mesa_add_depth_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
GLuint depthBits)
{
struct gl_renderbuffer *rb;
@@ -1696,7 +1696,7 @@ _mesa_add_depth_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb,
* rendering!
*/
GLboolean
-_mesa_add_stencil_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb,
+_mesa_add_stencil_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
GLuint stencilBits)
{
struct gl_renderbuffer *rb;
@@ -1735,7 +1735,7 @@ _mesa_add_stencil_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb,
* rendering!
*/
GLboolean
-_mesa_add_accum_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb,
+_mesa_add_accum_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
GLuint redBits, GLuint greenBits,
GLuint blueBits, GLuint alphaBits)
{
@@ -1776,7 +1776,7 @@ _mesa_add_accum_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb,
* NOTE: color-index aux buffers not supported.
*/
GLboolean
-_mesa_add_aux_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb,
+_mesa_add_aux_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb,
GLuint colorBits, GLuint numBuffers)
{
GLuint i;
@@ -1990,7 +1990,7 @@ _mesa_reference_renderbuffer(struct gl_renderbuffer **ptr,
* \return new depth/stencil renderbuffer
*/
struct gl_renderbuffer *
-_mesa_new_depthstencil_renderbuffer(GLcontext *ctx, GLuint name)
+_mesa_new_depthstencil_renderbuffer(struct gl_context *ctx, GLuint name)
{
struct gl_renderbuffer *dsrb;
diff --git a/src/mesa/main/renderbuffer.h b/src/mesa/main/renderbuffer.h
index bc92b269821..8791369dbee 100644
--- a/src/mesa/main/renderbuffer.h
+++ b/src/mesa/main/renderbuffer.h
@@ -36,52 +36,52 @@ extern void
_mesa_init_renderbuffer(struct gl_renderbuffer *rb, GLuint name);
extern struct gl_renderbuffer *
-_mesa_new_renderbuffer(GLcontext *ctx, GLuint name);
+_mesa_new_renderbuffer(struct gl_context *ctx, GLuint name);
extern void
_mesa_delete_renderbuffer(struct gl_renderbuffer *rb);
extern struct gl_renderbuffer *
-_mesa_new_soft_renderbuffer(GLcontext *ctx, GLuint name);
+_mesa_new_soft_renderbuffer(struct gl_context *ctx, GLuint name);
extern GLboolean
-_mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
+_mesa_soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLenum internalFormat,
GLuint width, GLuint height);
extern GLboolean
-_mesa_add_color_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb,
+_mesa_add_color_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb,
GLuint rgbBits, GLuint alphaBits,
GLboolean frontLeft, GLboolean backLeft,
GLboolean frontRight, GLboolean backRight);
extern GLboolean
-_mesa_add_alpha_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb,
+_mesa_add_alpha_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb,
GLuint alphaBits,
GLboolean frontLeft, GLboolean backLeft,
GLboolean frontRight, GLboolean backRight);
extern void
-_mesa_copy_soft_alpha_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb);
+_mesa_copy_soft_alpha_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb);
extern GLboolean
-_mesa_add_depth_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb,
+_mesa_add_depth_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
GLuint depthBits);
extern GLboolean
-_mesa_add_stencil_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb,
+_mesa_add_stencil_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
GLuint stencilBits);
extern GLboolean
-_mesa_add_accum_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb,
+_mesa_add_accum_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
GLuint redBits, GLuint greenBits,
GLuint blueBits, GLuint alphaBits);
extern GLboolean
-_mesa_add_aux_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb,
+_mesa_add_aux_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb,
GLuint bits, GLuint numBuffers);
extern void
@@ -105,7 +105,7 @@ _mesa_reference_renderbuffer(struct gl_renderbuffer **ptr,
struct gl_renderbuffer *rb);
extern struct gl_renderbuffer *
-_mesa_new_depthstencil_renderbuffer(GLcontext *ctx, GLuint name);
+_mesa_new_depthstencil_renderbuffer(struct gl_context *ctx, GLuint name);
#endif /* RENDERBUFFER_H */
diff --git a/src/mesa/main/scissor.c b/src/mesa/main/scissor.c
index 523f3c3ab83..4cf0bc2528c 100644
--- a/src/mesa/main/scissor.c
+++ b/src/mesa/main/scissor.c
@@ -58,12 +58,12 @@ _mesa_Scissor( GLint x, GLint y, GLsizei width, GLsizei height )
*
* \sa glScissor().
*
- * Verifies the parameters and updates __GLcontextRec::Scissor. On a
+ * Verifies the parameters and updates __struct gl_contextRec::Scissor. On a
* change flushes the vertices and notifies the driver via
* the dd_function_table::Scissor callback.
*/
void
-_mesa_set_scissor(GLcontext *ctx,
+_mesa_set_scissor(struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height)
{
if (x == ctx->Scissor.X &&
@@ -88,7 +88,7 @@ _mesa_set_scissor(GLcontext *ctx,
* \param ctx the GL context.
*/
void
-_mesa_init_scissor(GLcontext *ctx)
+_mesa_init_scissor(struct gl_context *ctx)
{
/* Scissor group */
ctx->Scissor.Enabled = GL_FALSE;
diff --git a/src/mesa/main/scissor.h b/src/mesa/main/scissor.h
index b852a2122d0..bd909019db2 100644
--- a/src/mesa/main/scissor.h
+++ b/src/mesa/main/scissor.h
@@ -35,12 +35,12 @@ _mesa_Scissor( GLint x, GLint y, GLsizei width, GLsizei height );
extern void
-_mesa_set_scissor(GLcontext *ctx,
+_mesa_set_scissor(struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height);
extern void
-_mesa_init_scissor(GLcontext *ctx);
+_mesa_init_scissor(struct gl_context *ctx);
#endif
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index c25d2a19747..e6c7f7aa3f8 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -47,7 +47,7 @@
#include "program/prog_parameter.h"
#include "program/prog_uniform.h"
#include "talloc.h"
-
+#include <stdbool.h>
/** Define this to enable shader substitution (see below) */
#define SHADER_SUBST 0
@@ -89,7 +89,7 @@ get_shader_flags(void)
* Initialize context's shader state.
*/
void
-_mesa_init_shader_state(GLcontext *ctx)
+_mesa_init_shader_state(struct gl_context *ctx)
{
/* Device drivers may override these to control what kind of instructions
* are generated by the GLSL compiler.
@@ -114,9 +114,14 @@ _mesa_init_shader_state(GLcontext *ctx)
* Free the per-context shader-related state.
*/
void
-_mesa_free_shader_state(GLcontext *ctx)
+_mesa_free_shader_state(struct gl_context *ctx)
{
- _mesa_reference_shader_program(ctx, &ctx->Shader.CurrentProgram, NULL);
+ _mesa_reference_shader_program(ctx, &ctx->Shader.CurrentVertexProgram, NULL);
+ _mesa_reference_shader_program(ctx, &ctx->Shader.CurrentGeometryProgram,
+ NULL);
+ _mesa_reference_shader_program(ctx, &ctx->Shader.CurrentFragmentProgram,
+ NULL);
+ _mesa_reference_shader_program(ctx, &ctx->Shader.ActiveProgram, NULL);
}
@@ -202,6 +207,35 @@ _mesa_copy_string(GLchar *dst, GLsizei maxLength,
/**
+ * Confirm that the a shader type is valid and supported by the implementation
+ *
+ * \param ctx Current GL context
+ * \param type Shader target
+ *
+ */
+static bool
+validate_shader_target(const struct gl_context *ctx, GLenum type)
+{
+ switch (type) {
+#if FEATURE_ARB_fragment_shader
+ case GL_FRAGMENT_SHADER:
+ return ctx->Extensions.ARB_fragment_shader;
+#endif
+#if FEATURE_ARB_vertex_shader
+ case GL_VERTEX_SHADER:
+ return ctx->Extensions.ARB_vertex_shader;
+#endif
+#if FEATURE_ARB_geometry_shader4
+ case GL_GEOMETRY_SHADER_ARB:
+ return ctx->Extensions.ARB_geometry_shader4;
+#endif
+ default:
+ return false;
+ }
+}
+
+
+/**
* Find the length of the longest transform feedback varying name
* which was specified with glTransformFeedbackVaryings().
*/
@@ -221,7 +255,7 @@ longest_feedback_varying_name(const struct gl_shader_program *shProg)
static GLboolean
-is_program(GLcontext *ctx, GLuint name)
+is_program(struct gl_context *ctx, GLuint name)
{
struct gl_shader_program *shProg = _mesa_lookup_shader_program(ctx, name);
return shProg ? GL_TRUE : GL_FALSE;
@@ -229,7 +263,7 @@ is_program(GLcontext *ctx, GLuint name)
static GLboolean
-is_shader(GLcontext *ctx, GLuint name)
+is_shader(struct gl_context *ctx, GLuint name)
{
struct gl_shader *shader = _mesa_lookup_shader(ctx, name);
return shader ? GL_TRUE : GL_FALSE;
@@ -240,7 +274,7 @@ is_shader(GLcontext *ctx, GLuint name)
* Attach shader to a shader program.
*/
static void
-attach_shader(GLcontext *ctx, GLuint program, GLuint shader)
+attach_shader(struct gl_context *ctx, GLuint program, GLuint shader)
{
struct gl_shader_program *shProg;
struct gl_shader *sh;
@@ -287,7 +321,7 @@ attach_shader(GLcontext *ctx, GLuint program, GLuint shader)
static GLint
-get_attrib_location(GLcontext *ctx, GLuint program, const GLchar *name)
+get_attrib_location(struct gl_context *ctx, GLuint program, const GLchar *name)
{
struct gl_shader_program *shProg
= _mesa_lookup_shader_program_err(ctx, program, "glGetAttribLocation");
@@ -320,7 +354,7 @@ get_attrib_location(GLcontext *ctx, GLuint program, const GLchar *name)
static void
-bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index,
+bind_attrib_location(struct gl_context *ctx, GLuint program, GLuint index,
const GLchar *name)
{
struct gl_shader_program *shProg;
@@ -371,24 +405,18 @@ bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index,
static GLuint
-create_shader(GLcontext *ctx, GLenum type)
+create_shader(struct gl_context *ctx, GLenum type)
{
struct gl_shader *sh;
GLuint name;
- name = _mesa_HashFindFreeKeyBlock(ctx->Shared->ShaderObjects, 1);
-
- switch (type) {
- case GL_FRAGMENT_SHADER:
- case GL_VERTEX_SHADER:
- case GL_GEOMETRY_SHADER_ARB:
- sh = ctx->Driver.NewShader(ctx, name, type);
- break;
- default:
+ if (!validate_shader_target(ctx, type)) {
_mesa_error(ctx, GL_INVALID_ENUM, "CreateShader(type)");
return 0;
}
+ name = _mesa_HashFindFreeKeyBlock(ctx->Shared->ShaderObjects, 1);
+ sh = ctx->Driver.NewShader(ctx, name, type);
_mesa_HashInsert(ctx->Shared->ShaderObjects, name, sh);
return name;
@@ -396,7 +424,7 @@ create_shader(GLcontext *ctx, GLenum type)
static GLuint
-create_shader_program(GLcontext *ctx)
+create_shader_program(struct gl_context *ctx)
{
GLuint name;
struct gl_shader_program *shProg;
@@ -418,7 +446,7 @@ create_shader_program(GLcontext *ctx)
* DeleteProgramARB.
*/
static void
-delete_shader_program(GLcontext *ctx, GLuint name)
+delete_shader_program(struct gl_context *ctx, GLuint name)
{
/*
* NOTE: deleting shaders/programs works a bit differently than
@@ -442,7 +470,7 @@ delete_shader_program(GLcontext *ctx, GLuint name)
static void
-delete_shader(GLcontext *ctx, GLuint shader)
+delete_shader(struct gl_context *ctx, GLuint shader)
{
struct gl_shader *sh;
@@ -458,7 +486,7 @@ delete_shader(GLcontext *ctx, GLuint shader)
static void
-detach_shader(GLcontext *ctx, GLuint program, GLuint shader)
+detach_shader(struct gl_context *ctx, GLuint program, GLuint shader)
{
struct gl_shader_program *shProg;
GLuint n;
@@ -526,7 +554,7 @@ detach_shader(GLcontext *ctx, GLuint program, GLuint shader)
static void
-get_active_attrib(GLcontext *ctx, GLuint program, GLuint index,
+get_active_attrib(struct gl_context *ctx, GLuint program, GLuint index,
GLsizei maxLength, GLsizei *length, GLint *size,
GLenum *type, GLchar *nameOut)
{
@@ -561,7 +589,7 @@ get_active_attrib(GLcontext *ctx, GLuint program, GLuint index,
* Return list of shaders attached to shader program.
*/
static void
-get_attached_shaders(GLcontext *ctx, GLuint program, GLsizei maxCount,
+get_attached_shaders(struct gl_context *ctx, GLuint program, GLsizei maxCount,
GLsizei *count, GLuint *obj)
{
struct gl_shader_program *shProg =
@@ -581,11 +609,11 @@ get_attached_shaders(GLcontext *ctx, GLuint program, GLsizei maxCount,
* glGetHandleARB() - return ID/name of currently bound shader program.
*/
static GLuint
-get_handle(GLcontext *ctx, GLenum pname)
+get_handle(struct gl_context *ctx, GLenum pname)
{
if (pname == GL_PROGRAM_OBJECT_ARB) {
- if (ctx->Shader.CurrentProgram)
- return ctx->Shader.CurrentProgram->Name;
+ if (ctx->Shader.ActiveProgram)
+ return ctx->Shader.ActiveProgram->Name;
else
return 0;
}
@@ -602,7 +630,7 @@ get_handle(GLcontext *ctx, GLenum pname)
* programs (see glGetProgramivARB).
*/
static void
-get_programiv(GLcontext *ctx, GLuint program, GLenum pname, GLint *params)
+get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, GLint *params)
{
const struct gl_program_parameter_list *attribs;
struct gl_shader_program *shProg
@@ -684,7 +712,7 @@ get_programiv(GLcontext *ctx, GLuint program, GLenum pname, GLint *params)
* glGetShaderiv() - get GLSL shader state
*/
static void
-get_shaderiv(GLcontext *ctx, GLuint name, GLenum pname, GLint *params)
+get_shaderiv(struct gl_context *ctx, GLuint name, GLenum pname, GLint *params)
{
struct gl_shader *shader =
_mesa_lookup_shader_err(ctx, name, "glGetShaderiv");
@@ -717,7 +745,7 @@ get_shaderiv(GLcontext *ctx, GLuint name, GLenum pname, GLint *params)
static void
-get_program_info_log(GLcontext *ctx, GLuint program, GLsizei bufSize,
+get_program_info_log(struct gl_context *ctx, GLuint program, GLsizei bufSize,
GLsizei *length, GLchar *infoLog)
{
struct gl_shader_program *shProg
@@ -731,7 +759,7 @@ get_program_info_log(GLcontext *ctx, GLuint program, GLsizei bufSize,
static void
-get_shader_info_log(GLcontext *ctx, GLuint shader, GLsizei bufSize,
+get_shader_info_log(struct gl_context *ctx, GLuint shader, GLsizei bufSize,
GLsizei *length, GLchar *infoLog)
{
struct gl_shader *sh = _mesa_lookup_shader(ctx, shader);
@@ -747,7 +775,7 @@ get_shader_info_log(GLcontext *ctx, GLuint shader, GLsizei bufSize,
* Return shader source code.
*/
static void
-get_shader_source(GLcontext *ctx, GLuint shader, GLsizei maxLength,
+get_shader_source(struct gl_context *ctx, GLuint shader, GLsizei maxLength,
GLsizei *length, GLchar *sourceOut)
{
struct gl_shader *sh;
@@ -763,7 +791,7 @@ get_shader_source(GLcontext *ctx, GLuint shader, GLsizei maxLength,
* Set/replace shader source code.
*/
static void
-shader_source(GLcontext *ctx, GLuint shader, const GLchar *source)
+shader_source(struct gl_context *ctx, GLuint shader, const GLchar *source)
{
struct gl_shader *sh;
@@ -787,7 +815,7 @@ shader_source(GLcontext *ctx, GLuint shader, const GLchar *source)
* Compile a shader.
*/
static void
-compile_shader(GLcontext *ctx, GLuint shaderObj)
+compile_shader(struct gl_context *ctx, GLuint shaderObj)
{
struct gl_shader *sh;
struct gl_shader_compiler_options *options;
@@ -812,7 +840,7 @@ compile_shader(GLcontext *ctx, GLuint shaderObj)
* Link a program's shaders.
*/
static void
-link_program(GLcontext *ctx, GLuint program)
+link_program(struct gl_context *ctx, GLuint program)
{
struct gl_shader_program *shProg;
struct gl_transform_feedback_object *obj =
@@ -822,7 +850,10 @@ link_program(GLcontext *ctx, GLuint program)
if (!shProg)
return;
- if (obj->Active && shProg == ctx->Shader.CurrentProgram) {
+ if (obj->Active
+ && (shProg == ctx->Shader.CurrentVertexProgram
+ || shProg == ctx->Shader.CurrentGeometryProgram
+ || shProg == ctx->Shader.CurrentFragmentProgram)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glLinkProgram(transform feedback active");
return;
@@ -885,14 +916,81 @@ print_shader_info(const struct gl_shader_program *shProg)
/**
+ * Use the named shader program for subsequent glUniform calls
+ */
+static void
+active_program(struct gl_context *ctx, struct gl_shader_program *shProg,
+ const char *caller)
+{
+ if ((shProg != NULL) && !shProg->LinkStatus) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "%s(program %u not linked)", caller, shProg->Name);
+ return;
+ }
+
+ if (ctx->Shader.ActiveProgram != shProg) {
+ _mesa_reference_shader_program(ctx, &ctx->Shader.ActiveProgram, shProg);
+ }
+}
+
+/**
+ */
+static bool
+use_shader_program(struct gl_context *ctx, GLenum type,
+ struct gl_shader_program *shProg)
+{
+ struct gl_shader_program **target;
+
+ switch (type) {
+#if FEATURE_ARB_vertex_shader
+ case GL_VERTEX_SHADER:
+ target = &ctx->Shader.CurrentVertexProgram;
+ if ((shProg == NULL)
+ || (shProg->_LinkedShaders[MESA_SHADER_VERTEX] == NULL)) {
+ shProg = NULL;
+ }
+ break;
+#endif
+#if FEATURE_ARB_geometry_shader4
+ case GL_GEOMETRY_SHADER_ARB:
+ target = &ctx->Shader.CurrentGeometryProgram;
+ if ((shProg == NULL)
+ || (shProg->_LinkedShaders[MESA_SHADER_GEOMETRY] == NULL)) {
+ shProg = NULL;
+ }
+ break;
+#endif
+#if FEATURE_ARB_fragment_shader
+ case GL_FRAGMENT_SHADER:
+ target = &ctx->Shader.CurrentFragmentProgram;
+ if ((shProg == NULL)
+ || (shProg->_LinkedShaders[MESA_SHADER_FRAGMENT] == NULL)) {
+ shProg = NULL;
+ }
+ break;
+#endif
+ default:
+ return false;
+ }
+
+ if (*target != shProg) {
+ _mesa_reference_shader_program(ctx, target, shProg);
+ return true;
+ }
+
+ return false;
+}
+
+/**
* Use the named shader program for subsequent rendering.
*/
void
-_mesa_use_program(GLcontext *ctx, GLuint program)
+_mesa_use_program(struct gl_context *ctx, GLuint program)
{
struct gl_shader_program *shProg;
struct gl_transform_feedback_object *obj =
ctx->TransformFeedback.CurrentObject;
+ bool changed = false;
if (obj->Active) {
_mesa_error(ctx, GL_INVALID_OPERATION,
@@ -900,12 +998,6 @@ _mesa_use_program(GLcontext *ctx, GLuint program)
return;
}
- if (ctx->Shader.CurrentProgram &&
- ctx->Shader.CurrentProgram->Name == program) {
- /* no-op */
- return;
- }
-
if (program) {
shProg = _mesa_lookup_shader_program_err(ctx, program, "glUseProgram");
if (!shProg) {
@@ -926,9 +1018,15 @@ _mesa_use_program(GLcontext *ctx, GLuint program)
shProg = NULL;
}
- if (ctx->Shader.CurrentProgram != shProg) {
+ changed = use_shader_program(ctx, GL_VERTEX_SHADER, shProg);
+ changed = use_shader_program(ctx, GL_GEOMETRY_SHADER_ARB, shProg)
+ || changed;
+ changed = use_shader_program(ctx, GL_FRAGMENT_SHADER, shProg)
+ || changed;
+ active_program(ctx, shProg, "glUseProgram");
+
+ if (changed) {
FLUSH_VERTICES(ctx, _NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS);
- _mesa_reference_shader_program(ctx, &ctx->Shader.CurrentProgram, shProg);
}
if (ctx->Driver.UseProgram)
@@ -943,7 +1041,7 @@ _mesa_use_program(GLcontext *ctx, GLuint program)
* \return GL_TRUE if valid, GL_FALSE if invalid
*/
static GLboolean
-validate_samplers(GLcontext *ctx, const struct gl_program *prog, char *errMsg)
+validate_samplers(const struct gl_program *prog, char *errMsg)
{
static const char *targetName[] = {
"TEXTURE_2D_ARRAY",
@@ -975,7 +1073,7 @@ validate_samplers(GLcontext *ctx, const struct gl_program *prog, char *errMsg)
assert(sampler < MAX_TEXTURE_IMAGE_UNITS);
unit = prog->SamplerUnits[sampler];
target = prog->SamplerTargets[sampler];
- if (targetUsed[unit] != -1 && targetUsed[unit] != target) {
+ if (targetUsed[unit] != -1 && targetUsed[unit] != (int) target) {
_mesa_snprintf(errMsg, 100,
"Texture unit %d is accessed both as %s and %s",
unit, targetName[targetUsed[unit]], targetName[target]);
@@ -995,8 +1093,7 @@ validate_samplers(GLcontext *ctx, const struct gl_program *prog, char *errMsg)
* \return GL_TRUE if valid, GL_FALSE if invalid (and set errMsg)
*/
static GLboolean
-validate_shader_program(GLcontext *ctx,
- const struct gl_shader_program *shProg,
+validate_shader_program(const struct gl_shader_program *shProg,
char *errMsg)
{
const struct gl_vertex_program *vp = shProg->VertexProgram;
@@ -1026,10 +1123,10 @@ validate_shader_program(GLcontext *ctx,
* Check: any two active samplers in the current program object are of
* different types, but refer to the same texture image unit,
*/
- if (vp && !validate_samplers(ctx, &vp->Base, errMsg)) {
+ if (vp && !validate_samplers(&vp->Base, errMsg)) {
return GL_FALSE;
}
- if (fp && !validate_samplers(ctx, &fp->Base, errMsg)) {
+ if (fp && !validate_samplers(&fp->Base, errMsg)) {
return GL_FALSE;
}
@@ -1041,7 +1138,7 @@ validate_shader_program(GLcontext *ctx,
* Called via glValidateProgram()
*/
static void
-validate_program(GLcontext *ctx, GLuint program)
+validate_program(struct gl_context *ctx, GLuint program)
{
struct gl_shader_program *shProg;
char errMsg[100];
@@ -1051,7 +1148,7 @@ validate_program(GLcontext *ctx, GLuint program)
return;
}
- shProg->Validated = validate_shader_program(ctx, shProg, errMsg);
+ shProg->Validated = validate_shader_program(shProg, errMsg);
if (!shProg->Validated) {
/* update info log */
if (shProg->InfoLog) {
@@ -1498,6 +1595,10 @@ _mesa_GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype,
GLint* range, GLint* precision)
{
GET_CURRENT_CONTEXT(ctx);
+ (void) shadertype;
+ (void) precisiontype;
+ (void) range;
+ (void) precision;
_mesa_error(ctx, GL_INVALID_OPERATION, __FUNCTION__);
}
@@ -1515,6 +1616,11 @@ _mesa_ShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat,
const void* binary, GLint length)
{
GET_CURRENT_CONTEXT(ctx);
+ (void) n;
+ (void) shaders;
+ (void) binaryformat;
+ (void) binary;
+ (void) length;
_mesa_error(ctx, GL_INVALID_OPERATION, __FUNCTION__);
}
@@ -1540,7 +1646,7 @@ _mesa_ProgramParameteriARB(GLuint program, GLenum pname,
switch (pname) {
case GL_GEOMETRY_VERTICES_OUT_ARB:
if (value < 1 ||
- value > ctx->Const.GeometryProgram.MaxGeometryOutputVertices) {
+ (unsigned) value > ctx->Const.GeometryProgram.MaxGeometryOutputVertices) {
_mesa_error(ctx, GL_INVALID_VALUE,
"glProgramParameteri(GL_GEOMETRY_VERTICES_OUT_ARB=%d",
value);
@@ -1587,6 +1693,101 @@ _mesa_ProgramParameteriARB(GLuint program, GLenum pname,
#endif
+void GLAPIENTRY
+_mesa_UseShaderProgramEXT(GLenum type, GLuint program)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_shader_program *shProg = NULL;
+ bool changed = false;
+
+ if (!validate_shader_target(ctx, type)) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glUseShaderProgramEXT(type)");
+ return;
+ }
+
+ if (ctx->TransformFeedback.CurrentObject->Active) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glUseShaderProgramEXT(transform feedback is active)");
+ return;
+ }
+
+ if (program) {
+ shProg = _mesa_lookup_shader_program_err(ctx, program,
+ "glUseShaderProgramEXT");
+ if (shProg == NULL)
+ return;
+
+ if (!shProg->LinkStatus) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glUseShaderProgramEXT(program not linked)");
+ return;
+ }
+ }
+
+ changed = use_shader_program(ctx, type, shProg);
+ if (changed)
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS);
+
+ if (ctx->Driver.UseProgram)
+ ctx->Driver.UseProgram(ctx, shProg);
+ return;
+}
+
+void GLAPIENTRY
+_mesa_ActiveProgramEXT(GLuint program)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_shader_program *shProg = (program != 0)
+ ? _mesa_lookup_shader_program_err(ctx, program, "glActiveProgramEXT")
+ : NULL;
+
+ active_program(ctx, shProg, "glActiveProgramEXT");
+ return;
+}
+
+GLuint GLAPIENTRY
+_mesa_CreateShaderProgramEXT(GLenum type, const GLchar *string)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ const GLuint shader = create_shader(ctx, type);
+ GLuint program = 0;
+
+ if (shader) {
+ shader_source(ctx, shader, _mesa_strdup(string));
+ compile_shader(ctx, shader);
+
+ program = create_shader_program(ctx);
+ if (program) {
+ struct gl_shader_program *shProg;
+ struct gl_shader *sh;
+ GLint compiled = GL_FALSE;
+
+ shProg = _mesa_lookup_shader_program(ctx, program);
+ sh = _mesa_lookup_shader(ctx, shader);
+
+ get_shaderiv(ctx, shader, GL_COMPILE_STATUS, &compiled);
+ if (compiled) {
+ attach_shader(ctx, program, shader);
+ link_program(ctx, program);
+ detach_shader(ctx, program, shader);
+
+#if 0
+ /* Possibly... */
+ if (active-user-defined-varyings-in-linked-program) {
+ append-error-to-info-log;
+ shProg->LinkStatus = GL_FALSE;
+ }
+#endif
+ }
+
+ shProg->InfoLog = talloc_strdup_append(shProg->InfoLog, sh->InfoLog);
+ }
+
+ delete_shader(ctx, shader);
+ }
+
+ return program;
+}
/**
* Plug in shader-related functions into API dispatch table.
@@ -1637,6 +1838,10 @@ _mesa_init_shader_dispatch(struct _glapi_table *exec)
#if FEATURE_ARB_geometry_shader4
SET_ProgramParameteriARB(exec, _mesa_ProgramParameteriARB);
#endif
+
+ SET_UseShaderProgramEXT(exec, _mesa_UseShaderProgramEXT);
+ SET_ActiveProgramEXT(exec, _mesa_ActiveProgramEXT);
+ SET_CreateShaderProgramEXT(exec, _mesa_CreateShaderProgramEXT);
#endif /* FEATURE_GL */
}
diff --git a/src/mesa/main/shaderapi.h b/src/mesa/main/shaderapi.h
index 16e22530de5..de67a9929ef 100644
--- a/src/mesa/main/shaderapi.h
+++ b/src/mesa/main/shaderapi.h
@@ -39,7 +39,7 @@ _mesa_copy_string(GLchar *dst, GLsizei maxLength,
GLsizei *length, const GLchar *src);
extern void
-_mesa_use_program(GLcontext *ctx, GLuint program);
+_mesa_use_program(struct gl_context *ctx, GLuint program);
extern void
@@ -166,4 +166,13 @@ extern void GLAPIENTRY
_mesa_ProgramParameteriARB(GLuint program, GLenum pname,
GLint value);
+extern void GLAPIENTRY
+_mesa_UseShaderProgramEXT(GLenum type, GLuint program);
+
+extern void GLAPIENTRY
+_mesa_ActiveProgramEXT(GLuint program);
+
+extern GLuint GLAPIENTRY
+_mesa_CreateShaderProgramEXT(GLenum type, const GLchar *string);
+
#endif /* SHADERAPI_H */
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c
index 2de8f279818..b6594cbe6f0 100644
--- a/src/mesa/main/shaderobj.c
+++ b/src/mesa/main/shaderobj.c
@@ -50,7 +50,7 @@
* Then set ptr to point to sh, incrementing its refcount.
*/
void
-_mesa_reference_shader(GLcontext *ctx, struct gl_shader **ptr,
+_mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
struct gl_shader *sh)
{
assert(ptr);
@@ -88,7 +88,7 @@ _mesa_reference_shader(GLcontext *ctx, struct gl_shader **ptr,
}
void
-_mesa_init_shader(GLcontext *ctx, struct gl_shader *shader)
+_mesa_init_shader(struct gl_context *ctx, struct gl_shader *shader)
{
shader->RefCount = 1;
}
@@ -98,7 +98,7 @@ _mesa_init_shader(GLcontext *ctx, struct gl_shader *shader)
* Called via ctx->Driver.NewShader()
*/
struct gl_shader *
-_mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type)
+_mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type)
{
struct gl_shader *shader;
assert(type == GL_FRAGMENT_SHADER || type == GL_VERTEX_SHADER ||
@@ -118,7 +118,7 @@ _mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type)
* Called via ctx->Driver.DeleteShader().
*/
static void
-_mesa_delete_shader(GLcontext *ctx, struct gl_shader *sh)
+_mesa_delete_shader(struct gl_context *ctx, struct gl_shader *sh)
{
if (sh->Source)
free((void *) sh->Source);
@@ -131,7 +131,7 @@ _mesa_delete_shader(GLcontext *ctx, struct gl_shader *sh)
* Lookup a GLSL shader object.
*/
struct gl_shader *
-_mesa_lookup_shader(GLcontext *ctx, GLuint name)
+_mesa_lookup_shader(struct gl_context *ctx, GLuint name)
{
if (name) {
struct gl_shader *sh = (struct gl_shader *)
@@ -153,7 +153,7 @@ _mesa_lookup_shader(GLcontext *ctx, GLuint name)
* As above, but record an error if shader is not found.
*/
struct gl_shader *
-_mesa_lookup_shader_err(GLcontext *ctx, GLuint name, const char *caller)
+_mesa_lookup_shader_err(struct gl_context *ctx, GLuint name, const char *caller)
{
if (!name) {
_mesa_error(ctx, GL_INVALID_VALUE, "%s", caller);
@@ -188,7 +188,7 @@ _mesa_lookup_shader_err(GLcontext *ctx, GLuint name, const char *caller)
* Then set ptr to point to shProg, incrementing its refcount.
*/
void
-_mesa_reference_shader_program(GLcontext *ctx,
+_mesa_reference_shader_program(struct gl_context *ctx,
struct gl_shader_program **ptr,
struct gl_shader_program *shProg)
{
@@ -230,7 +230,7 @@ _mesa_reference_shader_program(GLcontext *ctx,
}
void
-_mesa_init_shader_program(GLcontext *ctx, struct gl_shader_program *prog)
+_mesa_init_shader_program(struct gl_context *ctx, struct gl_shader_program *prog)
{
prog->Type = GL_SHADER_PROGRAM_MESA;
prog->RefCount = 1;
@@ -247,7 +247,7 @@ _mesa_init_shader_program(GLcontext *ctx, struct gl_shader_program *prog)
* Called via ctx->Driver.NewShaderProgram()
*/
static struct gl_shader_program *
-_mesa_new_shader_program(GLcontext *ctx, GLuint name)
+_mesa_new_shader_program(struct gl_context *ctx, GLuint name)
{
struct gl_shader_program *shProg;
shProg = talloc_zero(NULL, struct gl_shader_program);
@@ -263,7 +263,7 @@ _mesa_new_shader_program(GLcontext *ctx, GLuint name)
* Clear (free) the shader program state that gets produced by linking.
*/
void
-_mesa_clear_shader_program_data(GLcontext *ctx,
+_mesa_clear_shader_program_data(struct gl_context *ctx,
struct gl_shader_program *shProg)
{
_mesa_reference_vertprog(ctx, &shProg->VertexProgram, NULL);
@@ -287,7 +287,7 @@ _mesa_clear_shader_program_data(GLcontext *ctx,
* object itself.
*/
void
-_mesa_free_shader_program_data(GLcontext *ctx,
+_mesa_free_shader_program_data(struct gl_context *ctx,
struct gl_shader_program *shProg)
{
GLuint i;
@@ -326,10 +326,12 @@ _mesa_free_shader_program_data(GLcontext *ctx,
shProg->TransformFeedback.NumVarying = 0;
- for (i = 0; i < shProg->_NumLinkedShaders; i++) {
- ctx->Driver.DeleteShader(ctx, shProg->_LinkedShaders[i]);
+ for (i = 0; i < MESA_SHADER_TYPES; i++) {
+ if (shProg->_LinkedShaders[i] != NULL) {
+ ctx->Driver.DeleteShader(ctx, shProg->_LinkedShaders[i]);
+ shProg->_LinkedShaders[i] = NULL;
+ }
}
- shProg->_NumLinkedShaders = 0;
}
@@ -338,7 +340,7 @@ _mesa_free_shader_program_data(GLcontext *ctx,
* Called via ctx->Driver.DeleteShaderProgram().
*/
static void
-_mesa_delete_shader_program(GLcontext *ctx, struct gl_shader_program *shProg)
+_mesa_delete_shader_program(struct gl_context *ctx, struct gl_shader_program *shProg)
{
_mesa_free_shader_program_data(ctx, shProg);
@@ -350,7 +352,7 @@ _mesa_delete_shader_program(GLcontext *ctx, struct gl_shader_program *shProg)
* Lookup a GLSL program object.
*/
struct gl_shader_program *
-_mesa_lookup_shader_program(GLcontext *ctx, GLuint name)
+_mesa_lookup_shader_program(struct gl_context *ctx, GLuint name)
{
struct gl_shader_program *shProg;
if (name) {
@@ -373,7 +375,7 @@ _mesa_lookup_shader_program(GLcontext *ctx, GLuint name)
* As above, but record an error if program is not found.
*/
struct gl_shader_program *
-_mesa_lookup_shader_program_err(GLcontext *ctx, GLuint name,
+_mesa_lookup_shader_program_err(struct gl_context *ctx, GLuint name,
const char *caller)
{
if (!name) {
diff --git a/src/mesa/main/shaderobj.h b/src/mesa/main/shaderobj.h
index cbe7ae7b068..346a5b75175 100644
--- a/src/mesa/main/shaderobj.h
+++ b/src/mesa/main/shaderobj.h
@@ -27,6 +27,7 @@
#define SHADEROBJ_H
+#include "main/compiler.h"
#include "main/glheader.h"
#include "main/mtypes.h"
#include "program/ir_to_mesa.h"
@@ -39,50 +40,50 @@ extern "C" {
*/
extern void
-_mesa_init_shader_state(GLcontext * ctx);
+_mesa_init_shader_state(struct gl_context * ctx);
extern void
-_mesa_free_shader_state(GLcontext *ctx);
+_mesa_free_shader_state(struct gl_context *ctx);
extern void
-_mesa_reference_shader(GLcontext *ctx, struct gl_shader **ptr,
+_mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
struct gl_shader *sh);
extern struct gl_shader *
-_mesa_lookup_shader(GLcontext *ctx, GLuint name);
+_mesa_lookup_shader(struct gl_context *ctx, GLuint name);
extern struct gl_shader *
-_mesa_lookup_shader_err(GLcontext *ctx, GLuint name, const char *caller);
+_mesa_lookup_shader_err(struct gl_context *ctx, GLuint name, const char *caller);
extern void
-_mesa_reference_shader_program(GLcontext *ctx,
+_mesa_reference_shader_program(struct gl_context *ctx,
struct gl_shader_program **ptr,
struct gl_shader_program *shProg);
extern void
-_mesa_init_shader(GLcontext *ctx, struct gl_shader *shader);
+_mesa_init_shader(struct gl_context *ctx, struct gl_shader *shader);
extern struct gl_shader *
-_mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type);
+_mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type);
extern void
-_mesa_init_shader_program(GLcontext *ctx, struct gl_shader_program *prog);
+_mesa_init_shader_program(struct gl_context *ctx, struct gl_shader_program *prog);
extern struct gl_shader_program *
-_mesa_lookup_shader_program(GLcontext *ctx, GLuint name);
+_mesa_lookup_shader_program(struct gl_context *ctx, GLuint name);
extern struct gl_shader_program *
-_mesa_lookup_shader_program_err(GLcontext *ctx, GLuint name,
+_mesa_lookup_shader_program_err(struct gl_context *ctx, GLuint name,
const char *caller);
extern void
-_mesa_clear_shader_program_data(GLcontext *ctx,
+_mesa_clear_shader_program_data(struct gl_context *ctx,
struct gl_shader_program *shProg);
extern void
-_mesa_free_shader_program_data(GLcontext *ctx,
+_mesa_free_shader_program_data(struct gl_context *ctx,
struct gl_shader_program *shProg);
@@ -91,16 +92,16 @@ extern void
_mesa_init_shader_object_functions(struct dd_function_table *driver);
extern void
-_mesa_init_shader_state(GLcontext *ctx);
+_mesa_init_shader_state(struct gl_context *ctx);
extern void
-_mesa_free_shader_state(GLcontext *ctx);
+_mesa_free_shader_state(struct gl_context *ctx);
+
static INLINE GLuint
_mesa_shader_type_to_index(GLenum v)
{
- switch(v)
- {
+ switch (v) {
case GL_VERTEX_SHADER:
return MESA_SHADER_VERTEX;
case GL_FRAGMENT_SHADER:
@@ -108,25 +109,27 @@ _mesa_shader_type_to_index(GLenum v)
case GL_GEOMETRY_SHADER:
return MESA_SHADER_GEOMETRY;
default:
- ASSERT(0);
+ ASSERT(0 && "bad value in _mesa_shader_type_to_index()");
return ~0;
}
}
+
static INLINE GLenum
_mesa_shader_index_to_type(GLuint i)
{
- GLenum enums[MESA_SHADER_TYPES] = {
- GL_VERTEX_SHADER,
- GL_FRAGMENT_SHADER,
- GL_GEOMETRY_SHADER ,
+ static const GLenum enums[MESA_SHADER_TYPES] = {
+ GL_VERTEX_SHADER,
+ GL_FRAGMENT_SHADER,
+ GL_GEOMETRY_SHADER ,
};
- if(i >= MESA_SHADER_TYPES)
+ if (i >= MESA_SHADER_TYPES)
return 0;
else
return enums[i];
}
+
#ifdef __cplusplus
}
#endif
diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c
index a56c70fa7f6..3abee0178eb 100644
--- a/src/mesa/main/shared.c
+++ b/src/mesa/main/shared.c
@@ -52,7 +52,7 @@
* failure.
*/
struct gl_shared_state *
-_mesa_alloc_shared_state(GLcontext *ctx)
+_mesa_alloc_shared_state(struct gl_context *ctx)
{
struct gl_shared_state *shared;
GLuint i;
@@ -133,7 +133,7 @@ static void
delete_displaylist_cb(GLuint id, void *data, void *userData)
{
struct gl_display_list *list = (struct gl_display_list *) data;
- GLcontext *ctx = (GLcontext *) userData;
+ struct gl_context *ctx = (struct gl_context *) userData;
_mesa_delete_list(ctx, list);
}
@@ -145,7 +145,7 @@ static void
delete_texture_cb(GLuint id, void *data, void *userData)
{
struct gl_texture_object *texObj = (struct gl_texture_object *) data;
- GLcontext *ctx = (GLcontext *) userData;
+ struct gl_context *ctx = (struct gl_context *) userData;
ctx->Driver.DeleteTexture(ctx, texObj);
}
@@ -157,7 +157,7 @@ static void
delete_program_cb(GLuint id, void *data, void *userData)
{
struct gl_program *prog = (struct gl_program *) data;
- GLcontext *ctx = (GLcontext *) userData;
+ struct gl_context *ctx = (struct gl_context *) userData;
if(prog != &_mesa_DummyProgram) {
ASSERT(prog->RefCount == 1); /* should only be referenced by hash table */
prog->RefCount = 0; /* now going away */
@@ -175,7 +175,7 @@ static void
delete_fragshader_cb(GLuint id, void *data, void *userData)
{
struct ati_fragment_shader *shader = (struct ati_fragment_shader *) data;
- GLcontext *ctx = (GLcontext *) userData;
+ struct gl_context *ctx = (struct gl_context *) userData;
_mesa_delete_ati_fragment_shader(ctx, shader);
}
#endif
@@ -188,7 +188,7 @@ static void
delete_bufferobj_cb(GLuint id, void *data, void *userData)
{
struct gl_buffer_object *bufObj = (struct gl_buffer_object *) data;
- GLcontext *ctx = (GLcontext *) userData;
+ struct gl_context *ctx = (struct gl_context *) userData;
if (_mesa_bufferobj_mapped(bufObj)) {
ctx->Driver.UnmapBuffer(ctx, 0, bufObj);
bufObj->Pointer = NULL;
@@ -204,7 +204,7 @@ delete_bufferobj_cb(GLuint id, void *data, void *userData)
static void
free_shader_program_data_cb(GLuint id, void *data, void *userData)
{
- GLcontext *ctx = (GLcontext *) userData;
+ struct gl_context *ctx = (struct gl_context *) userData;
struct gl_shader_program *shProg = (struct gl_shader_program *) data;
if (shProg->Type == GL_SHADER_PROGRAM_MESA) {
@@ -220,7 +220,7 @@ free_shader_program_data_cb(GLuint id, void *data, void *userData)
static void
delete_shader_cb(GLuint id, void *data, void *userData)
{
- GLcontext *ctx = (GLcontext *) userData;
+ struct gl_context *ctx = (struct gl_context *) userData;
struct gl_shader *sh = (struct gl_shader *) data;
if (sh->Type == GL_FRAGMENT_SHADER || sh->Type == GL_VERTEX_SHADER) {
ctx->Driver.DeleteShader(ctx, sh);
@@ -280,7 +280,7 @@ delete_renderbuffer_cb(GLuint id, void *data, void *userData)
* \sa alloc_shared_state().
*/
static void
-free_shared_state(GLcontext *ctx, struct gl_shared_state *shared)
+free_shared_state(struct gl_context *ctx, struct gl_shared_state *shared)
{
GLuint i;
@@ -373,7 +373,7 @@ free_shared_state(GLcontext *ctx, struct gl_shared_state *shared)
* \sa free_shared_state().
*/
void
-_mesa_release_shared_state(GLcontext *ctx, struct gl_shared_state *shared)
+_mesa_release_shared_state(struct gl_context *ctx, struct gl_shared_state *shared)
{
GLint RefCount;
diff --git a/src/mesa/main/shared.h b/src/mesa/main/shared.h
index 5166a0ce51f..43f8a388e6f 100644
--- a/src/mesa/main/shared.h
+++ b/src/mesa/main/shared.h
@@ -28,11 +28,11 @@
#include "mtypes.h"
struct gl_shared_state *
-_mesa_alloc_shared_state(GLcontext *ctx);
+_mesa_alloc_shared_state(struct gl_context *ctx);
void
-_mesa_release_shared_state(GLcontext *ctx, struct gl_shared_state *shared);
+_mesa_release_shared_state(struct gl_context *ctx, struct gl_shared_state *shared);
#endif
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 4a3dffe4cf8..05f4165c44a 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -27,7 +27,7 @@
* \file state.c
* State management.
*
- * This file manages recalculation of derived values in GLcontext.
+ * This file manages recalculation of derived values in struct gl_context.
*/
@@ -51,7 +51,7 @@
static void
-update_separate_specular(GLcontext *ctx)
+update_separate_specular(struct gl_context *ctx)
{
if (NEED_SECONDARY_COLOR(ctx))
ctx->_TriangleCaps |= DD_SEPARATE_SPECULAR;
@@ -107,7 +107,7 @@ update_min(GLuint min, struct gl_client_array *array)
* Need to do this upon new array state or new buffer object state.
*/
static void
-update_arrays( GLcontext *ctx )
+update_arrays( struct gl_context *ctx )
{
struct gl_array_object *arrayObj = ctx->Array.ArrayObj;
GLuint i, min = ~0;
@@ -219,7 +219,7 @@ update_arrays( GLcontext *ctx )
* This needs to be done before texture state validation.
*/
static void
-update_program_enables(GLcontext *ctx)
+update_program_enables(struct gl_context *ctx)
{
/* These _Enabled flags indicate if the program is enabled AND valid. */
ctx->VertexProgram._Enabled = ctx->VertexProgram.Enabled
@@ -245,9 +245,11 @@ update_program_enables(GLcontext *ctx)
* or fragment program is being used.
*/
static GLbitfield
-update_program(GLcontext *ctx)
+update_program(struct gl_context *ctx)
{
- const struct gl_shader_program *shProg = ctx->Shader.CurrentProgram;
+ const struct gl_shader_program *vsProg = ctx->Shader.CurrentVertexProgram;
+ const struct gl_shader_program *gsProg = ctx->Shader.CurrentGeometryProgram;
+ const struct gl_shader_program *fsProg = ctx->Shader.CurrentFragmentProgram;
const struct gl_vertex_program *prevVP = ctx->VertexProgram._Current;
const struct gl_fragment_program *prevFP = ctx->FragmentProgram._Current;
const struct gl_geometry_program *prevGP = ctx->GeometryProgram._Current;
@@ -269,10 +271,10 @@ update_program(GLcontext *ctx)
* come up, or matter.
*/
- if (shProg && shProg->LinkStatus && shProg->FragmentProgram) {
+ if (fsProg && fsProg->LinkStatus && fsProg->FragmentProgram) {
/* Use shader programs */
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current,
- shProg->FragmentProgram);
+ fsProg->FragmentProgram);
}
else if (ctx->FragmentProgram._Enabled) {
/* use user-defined vertex program */
@@ -292,10 +294,10 @@ update_program(GLcontext *ctx)
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, NULL);
}
- if (shProg && shProg->LinkStatus && shProg->GeometryProgram) {
+ if (gsProg && gsProg->LinkStatus && gsProg->GeometryProgram) {
/* Use shader programs */
_mesa_reference_geomprog(ctx, &ctx->GeometryProgram._Current,
- shProg->GeometryProgram);
+ gsProg->GeometryProgram);
} else {
/* no fragment program */
_mesa_reference_geomprog(ctx, &ctx->GeometryProgram._Current, NULL);
@@ -305,10 +307,10 @@ update_program(GLcontext *ctx)
* _mesa_get_fixed_func_vertex_program() needs to know active
* fragprog inputs.
*/
- if (shProg && shProg->LinkStatus && shProg->VertexProgram) {
+ if (vsProg && vsProg->LinkStatus && vsProg->VertexProgram) {
/* Use shader programs */
_mesa_reference_vertprog(ctx, &ctx->VertexProgram._Current,
- shProg->VertexProgram);
+ vsProg->VertexProgram);
}
else if (ctx->VertexProgram._Enabled) {
/* use user-defined vertex program */
@@ -362,7 +364,7 @@ update_program(GLcontext *ctx)
* Examine shader constants and return either _NEW_PROGRAM_CONSTANTS or 0.
*/
static GLbitfield
-update_program_constants(GLcontext *ctx)
+update_program_constants(struct gl_context *ctx)
{
GLbitfield new_state = 0x0;
@@ -399,7 +401,7 @@ update_program_constants(GLcontext *ctx)
static void
-update_viewport_matrix(GLcontext *ctx)
+update_viewport_matrix(struct gl_context *ctx)
{
const GLfloat depthMax = ctx->DrawBuffer->_DepthMaxF;
@@ -421,7 +423,7 @@ update_viewport_matrix(GLcontext *ctx)
* Update derived multisample state.
*/
static void
-update_multisample(GLcontext *ctx)
+update_multisample(struct gl_context *ctx)
{
ctx->Multisample._Enabled = GL_FALSE;
if (ctx->Multisample.Enabled &&
@@ -435,7 +437,7 @@ update_multisample(GLcontext *ctx)
* Update derived color/blend/logicop state.
*/
static void
-update_color(GLcontext *ctx)
+update_color(struct gl_context *ctx)
{
/* This is needed to support 1.1's RGB logic ops AND
* 1.0's blending logicops.
@@ -449,7 +451,7 @@ update_color(GLcontext *ctx)
* in ctx->_TriangleCaps if needed.
*/
static void
-update_polygon(GLcontext *ctx)
+update_polygon(struct gl_context *ctx)
{
ctx->_TriangleCaps &= ~(DD_TRI_CULL_FRONT_BACK | DD_TRI_OFFSET);
@@ -471,7 +473,7 @@ update_polygon(GLcontext *ctx)
*/
#if 0
static void
-update_tricaps(GLcontext *ctx, GLbitfield new_state)
+update_tricaps(struct gl_context *ctx, GLbitfield new_state)
{
ctx->_TriangleCaps = 0;
@@ -540,7 +542,7 @@ update_tricaps(GLcontext *ctx, GLbitfield new_state)
/**
* Compute derived GL state.
- * If __GLcontextRec::NewState is non-zero then this function \b must
+ * If __struct gl_contextRec::NewState is non-zero then this function \b must
* be called before rendering anything.
*
* Calls dd_function_table::UpdateState to perform any internal state
@@ -551,7 +553,7 @@ update_tricaps(GLcontext *ctx, GLbitfield new_state)
* _mesa_update_lighting() and _mesa_update_tnl_spaces().
*/
void
-_mesa_update_state_locked( GLcontext *ctx )
+_mesa_update_state_locked( struct gl_context *ctx )
{
GLbitfield new_state = ctx->NewState;
GLbitfield prog_flags = _NEW_PROGRAM;
@@ -670,7 +672,7 @@ _mesa_update_state_locked( GLcontext *ctx )
/* This is the usual entrypoint for state updates:
*/
void
-_mesa_update_state( GLcontext *ctx )
+_mesa_update_state( struct gl_context *ctx )
{
_mesa_lock_context_textures(ctx);
_mesa_update_state_locked(ctx);
@@ -703,7 +705,7 @@ _mesa_update_state( GLcontext *ctx )
* Otherwise, the fp should track them as state values instead.
*/
void
-_mesa_set_varying_vp_inputs( GLcontext *ctx,
+_mesa_set_varying_vp_inputs( struct gl_context *ctx,
GLbitfield varying_inputs )
{
if (ctx->varying_vp_inputs != varying_inputs) {
@@ -721,7 +723,7 @@ _mesa_set_varying_vp_inputs( GLcontext *ctx,
* of ordinary varyings/inputs.
*/
void
-_mesa_set_vp_override(GLcontext *ctx, GLboolean flag)
+_mesa_set_vp_override(struct gl_context *ctx, GLboolean flag)
{
if (ctx->VertexProgram._Overriden != flag) {
ctx->VertexProgram._Overriden = flag;
diff --git a/src/mesa/main/state.h b/src/mesa/main/state.h
index 29db08a0b95..f0eb43d8ee3 100644
--- a/src/mesa/main/state.h
+++ b/src/mesa/main/state.h
@@ -29,21 +29,21 @@
#include "mtypes.h"
extern void
-_mesa_update_state(GLcontext *ctx);
+_mesa_update_state(struct gl_context *ctx);
/* As above but can only be called between _mesa_lock_context_textures() and
* _mesa_unlock_context_textures().
*/
extern void
-_mesa_update_state_locked(GLcontext *ctx);
+_mesa_update_state_locked(struct gl_context *ctx);
extern void
-_mesa_set_varying_vp_inputs(GLcontext *ctx, GLbitfield varying_inputs);
+_mesa_set_varying_vp_inputs(struct gl_context *ctx, GLbitfield varying_inputs);
extern void
-_mesa_set_vp_override(GLcontext *ctx, GLboolean flag);
+_mesa_set_vp_override(struct gl_context *ctx, GLboolean flag);
#endif
diff --git a/src/mesa/main/stencil.c b/src/mesa/main/stencil.c
index 15c98e20156..93e2e97ce0c 100644
--- a/src/mesa/main/stencil.c
+++ b/src/mesa/main/stencil.c
@@ -56,7 +56,7 @@
static GLboolean
-validate_stencil_op(GLcontext *ctx, GLenum op)
+validate_stencil_op(struct gl_context *ctx, GLenum op)
{
switch (op) {
case GL_KEEP:
@@ -79,7 +79,7 @@ validate_stencil_op(GLcontext *ctx, GLenum op)
static GLboolean
-validate_stencil_func(GLcontext *ctx, GLenum func)
+validate_stencil_func(struct gl_context *ctx, GLenum func)
{
switch (func) {
case GL_NEVER:
@@ -137,7 +137,7 @@ _mesa_ClearStencil( GLint s )
* \sa glStencilFunc().
*
* Verifies the parameters and updates the respective values in
- * __GLcontextRec::Stencil. On change flushes the vertices and notifies the
+ * __struct gl_contextRec::Stencil. On change flushes the vertices and notifies the
* driver via the dd_function_table::StencilFunc callback.
*/
void GLAPIENTRY
@@ -192,7 +192,7 @@ _mesa_StencilFuncSeparateATI( GLenum frontfunc, GLenum backfunc, GLint ref, GLui
* \sa glStencilFunc().
*
* Verifies the parameters and updates the respective values in
- * __GLcontextRec::Stencil. On change flushes the vertices and notifies the
+ * __struct gl_contextRec::Stencil. On change flushes the vertices and notifies the
* driver via the dd_function_table::StencilFunc callback.
*/
void GLAPIENTRY
@@ -312,7 +312,7 @@ _mesa_StencilMask( GLuint mask )
* \sa glStencilOp().
*
* Verifies the parameters and updates the respective fields in
- * __GLcontextRec::Stencil. On change flushes the vertices and notifies the
+ * __struct gl_contextRec::Stencil. On change flushes the vertices and notifies the
* driver via the dd_function_table::StencilOp callback.
*/
void GLAPIENTRY
@@ -532,7 +532,7 @@ _mesa_StencilMaskSeparate(GLenum face, GLuint mask)
* Update derived stencil state.
*/
void
-_mesa_update_stencil(GLcontext *ctx)
+_mesa_update_stencil(struct gl_context *ctx)
{
const GLint face = ctx->Stencil._BackFace;
@@ -556,10 +556,10 @@ _mesa_update_stencil(GLcontext *ctx)
*
* \param ctx GL context.
*
- * Initializes __GLcontextRec::Stencil attribute group.
+ * Initializes __struct gl_contextRec::Stencil attribute group.
*/
void
-_mesa_init_stencil(GLcontext *ctx)
+_mesa_init_stencil(struct gl_context *ctx)
{
ctx->Stencil.Enabled = GL_FALSE;
ctx->Stencil.TestTwoSide = GL_FALSE;
diff --git a/src/mesa/main/stencil.h b/src/mesa/main/stencil.h
index 252ac932acd..38a7183a811 100644
--- a/src/mesa/main/stencil.h
+++ b/src/mesa/main/stencil.h
@@ -71,10 +71,10 @@ _mesa_StencilMaskSeparate(GLenum face, GLuint mask);
extern void
-_mesa_update_stencil(GLcontext *ctx);
+_mesa_update_stencil(struct gl_context *ctx);
extern void
-_mesa_init_stencil( GLcontext * ctx );
+_mesa_init_stencil( struct gl_context * ctx );
#endif
diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c
index ac948cc1efe..2c8bcbeaf7c 100644
--- a/src/mesa/main/syncobj.c
+++ b/src/mesa/main/syncobj.c
@@ -66,7 +66,7 @@
#include "syncobj.h"
static struct gl_sync_object *
-_mesa_new_sync_object(GLcontext *ctx, GLenum type)
+_mesa_new_sync_object(struct gl_context *ctx, GLenum type)
{
struct gl_sync_object *s = MALLOC_STRUCT(gl_sync_object);
(void) ctx;
@@ -77,7 +77,7 @@ _mesa_new_sync_object(GLcontext *ctx, GLenum type)
static void
-_mesa_delete_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj)
+_mesa_delete_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj)
{
(void) ctx;
free(syncObj);
@@ -85,7 +85,7 @@ _mesa_delete_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj)
static void
-_mesa_fence_sync(GLcontext *ctx, struct gl_sync_object *syncObj,
+_mesa_fence_sync(struct gl_context *ctx, struct gl_sync_object *syncObj,
GLenum condition, GLbitfield flags)
{
(void) ctx;
@@ -97,7 +97,7 @@ _mesa_fence_sync(GLcontext *ctx, struct gl_sync_object *syncObj,
static void
-_mesa_check_sync(GLcontext *ctx, struct gl_sync_object *syncObj)
+_mesa_check_sync(struct gl_context *ctx, struct gl_sync_object *syncObj)
{
(void) ctx;
(void) syncObj;
@@ -109,7 +109,7 @@ _mesa_check_sync(GLcontext *ctx, struct gl_sync_object *syncObj)
static void
-_mesa_wait_sync(GLcontext *ctx, struct gl_sync_object *syncObj,
+_mesa_wait_sync(struct gl_context *ctx, struct gl_sync_object *syncObj,
GLbitfield flags, GLuint64 timeout)
{
(void) ctx;
@@ -155,7 +155,7 @@ _mesa_init_sync_dispatch(struct _glapi_table *disp)
* Allocate/init the context state related to sync objects.
*/
void
-_mesa_init_sync(GLcontext *ctx)
+_mesa_init_sync(struct gl_context *ctx)
{
(void) ctx;
}
@@ -165,7 +165,7 @@ _mesa_init_sync(GLcontext *ctx)
* Free the context state related to sync objects.
*/
void
-_mesa_free_sync_data(GLcontext *ctx)
+_mesa_free_sync_data(struct gl_context *ctx)
{
(void) ctx;
}
@@ -181,7 +181,7 @@ _mesa_validate_sync(struct gl_sync_object *syncObj)
void
-_mesa_ref_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj)
+_mesa_ref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj)
{
_glthread_LOCK_MUTEX(ctx->Shared->Mutex);
syncObj->RefCount++;
@@ -190,7 +190,7 @@ _mesa_ref_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj)
void
-_mesa_unref_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj)
+_mesa_unref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj)
{
_glthread_LOCK_MUTEX(ctx->Shared->Mutex);
syncObj->RefCount--;
diff --git a/src/mesa/main/syncobj.h b/src/mesa/main/syncobj.h
index 82e141d408b..f3c0046cf3d 100644
--- a/src/mesa/main/syncobj.h
+++ b/src/mesa/main/syncobj.h
@@ -44,16 +44,16 @@ extern void
_mesa_init_sync_dispatch(struct _glapi_table *disp);
extern void
-_mesa_init_sync(GLcontext *);
+_mesa_init_sync(struct gl_context *);
extern void
-_mesa_free_sync_data(GLcontext *);
+_mesa_free_sync_data(struct gl_context *);
extern void
-_mesa_ref_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj);
+_mesa_ref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj);
extern void
-_mesa_unref_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj);
+_mesa_unref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj);
extern GLboolean GLAPIENTRY
_mesa_IsSync(GLsync sync);
@@ -89,23 +89,23 @@ _mesa_init_sync_dispatch(struct _glapi_table *disp)
}
static INLINE void
-_mesa_init_sync(GLcontext *ctx)
+_mesa_init_sync(struct gl_context *ctx)
{
}
static INLINE void
-_mesa_free_sync_data(GLcontext *ctx)
+_mesa_free_sync_data(struct gl_context *ctx)
{
}
static INLINE void
-_mesa_ref_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj)
+_mesa_ref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj)
{
ASSERT_NO_FEATURE();
}
static INLINE void
-_mesa_unref_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj)
+_mesa_unref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj)
{
ASSERT_NO_FEATURE();
}
diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c
index e911524cbc5..e3d2a786b3e 100644
--- a/src/mesa/main/texcompress.c
+++ b/src/mesa/main/texcompress.c
@@ -50,7 +50,7 @@
* \return number of formats.
*/
GLuint
-_mesa_get_compressed_formats(GLcontext *ctx, GLint *formats, GLboolean all)
+_mesa_get_compressed_formats(struct gl_context *ctx, GLint *formats, GLboolean all)
{
GLuint n = 0;
if (ctx->Extensions.TDFX_texture_compression_FXT1) {
@@ -178,7 +178,7 @@ _mesa_glenum_to_compressed_format(GLenum format)
* internal format unchanged.
*/
GLenum
-_mesa_compressed_format_to_glenum(GLcontext *ctx, GLuint mesaFormat)
+_mesa_compressed_format_to_glenum(struct gl_context *ctx, GLuint mesaFormat)
{
switch (mesaFormat) {
#if FEATURE_texture_fxt1
diff --git a/src/mesa/main/texcompress.h b/src/mesa/main/texcompress.h
index 5e73a3149bd..83856429c54 100644
--- a/src/mesa/main/texcompress.h
+++ b/src/mesa/main/texcompress.h
@@ -31,13 +31,13 @@
#if _HAVE_FULL_GL
extern GLuint
-_mesa_get_compressed_formats(GLcontext *ctx, GLint *formats, GLboolean all);
+_mesa_get_compressed_formats(struct gl_context *ctx, GLint *formats, GLboolean all);
extern gl_format
_mesa_glenum_to_compressed_format(GLenum format);
extern GLenum
-_mesa_compressed_format_to_glenum(GLcontext *ctx, GLuint mesaFormat);
+_mesa_compressed_format_to_glenum(struct gl_context *ctx, GLuint mesaFormat);
extern GLubyte *
_mesa_compressed_image_address(GLint col, GLint row, GLint img,
diff --git a/src/mesa/main/texcompress_s3tc.c b/src/mesa/main/texcompress_s3tc.c
index 534a4247cf2..0e893a59fa3 100644
--- a/src/mesa/main/texcompress_s3tc.c
+++ b/src/mesa/main/texcompress_s3tc.c
@@ -104,7 +104,7 @@ static void *dxtlibhandle = NULL;
void
-_mesa_init_texture_s3tc( GLcontext *ctx )
+_mesa_init_texture_s3tc( struct gl_context *ctx )
{
/* called during context initialization */
ctx->Mesa_DXTn = GL_FALSE;
diff --git a/src/mesa/main/texcompress_s3tc.h b/src/mesa/main/texcompress_s3tc.h
index 2e7688d3669..d0a5b186b71 100644
--- a/src/mesa/main/texcompress_s3tc.h
+++ b/src/mesa/main/texcompress_s3tc.h
@@ -76,7 +76,7 @@ _mesa_fetch_texel_2d_f_srgba_dxt5(const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel);
extern void
-_mesa_init_texture_s3tc(GLcontext *ctx);
+_mesa_init_texture_s3tc(struct gl_context *ctx);
#else /* FEATURE_texture_s3tc */
@@ -97,7 +97,7 @@ _mesa_init_texture_s3tc(GLcontext *ctx);
#define _mesa_fetch_texel_2d_f_srgba_dxt5 NULL
static INLINE void
-_mesa_init_texture_s3tc(GLcontext *ctx)
+_mesa_init_texture_s3tc(struct gl_context *ctx)
{
}
diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c
index 3a55128c736..508dbf4887d 100644
--- a/src/mesa/main/texenv.c
+++ b/src/mesa/main/texenv.c
@@ -44,7 +44,7 @@
/** Set texture env mode */
static void
-set_env_mode(GLcontext *ctx,
+set_env_mode(struct gl_context *ctx,
struct gl_texture_unit *texUnit,
GLenum mode)
{
@@ -89,7 +89,7 @@ set_env_mode(GLcontext *ctx,
static void
-set_env_color(GLcontext *ctx,
+set_env_color(struct gl_context *ctx,
struct gl_texture_unit *texUnit,
const GLfloat *color)
{
@@ -107,7 +107,7 @@ set_env_color(GLcontext *ctx,
/** Set an RGB or A combiner mode/function */
static void
-set_combiner_mode(GLcontext *ctx,
+set_combiner_mode(struct gl_context *ctx,
struct gl_texture_unit *texUnit,
GLenum pname, GLenum mode)
{
@@ -181,7 +181,7 @@ set_combiner_mode(GLcontext *ctx,
/** Set an RGB or A combiner source term */
static void
-set_combiner_source(GLcontext *ctx,
+set_combiner_source(struct gl_context *ctx,
struct gl_texture_unit *texUnit,
GLenum pname, GLenum param)
{
@@ -274,7 +274,7 @@ set_combiner_source(GLcontext *ctx,
/** Set an RGB or A combiner operand term */
static void
-set_combiner_operand(GLcontext *ctx,
+set_combiner_operand(struct gl_context *ctx,
struct gl_texture_unit *texUnit,
GLenum pname, GLenum param)
{
@@ -360,7 +360,7 @@ set_combiner_operand(GLcontext *ctx,
static void
-set_combiner_scale(GLcontext *ctx,
+set_combiner_scale(struct gl_context *ctx,
struct gl_texture_unit *texUnit,
GLenum pname, GLfloat scale)
{
@@ -595,7 +595,7 @@ _mesa_TexEnviv( GLenum target, GLenum pname, const GLint *param )
* \return value of queried pname or -1 if error.
*/
static GLint
-get_texenvi(GLcontext *ctx, const struct gl_texture_unit *texUnit,
+get_texenvi(struct gl_context *ctx, const struct gl_texture_unit *texUnit,
GLenum pname)
{
switch (pname) {
diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c
index 20f02cefe94..a8bffe416d9 100644
--- a/src/mesa/main/texenvprogram.c
+++ b/src/mesa/main/texenvprogram.c
@@ -62,7 +62,7 @@ struct texenvprog_cache_item
};
static GLboolean
-texenv_doing_secondary_color(GLcontext *ctx)
+texenv_doing_secondary_color(struct gl_context *ctx)
{
if (ctx->Light.Enabled &&
(ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR))
@@ -307,12 +307,13 @@ static GLuint translate_tex_src_bit( GLbitfield bit )
* has access to. The bitmask is later reduced to just those which
* are actually referenced.
*/
-static GLbitfield get_fp_input_mask( GLcontext *ctx )
+static GLbitfield get_fp_input_mask( struct gl_context *ctx )
{
/* _NEW_PROGRAM */
- const GLboolean vertexShader = (ctx->Shader.CurrentProgram &&
- ctx->Shader.CurrentProgram->LinkStatus &&
- ctx->Shader.CurrentProgram->VertexProgram);
+ const GLboolean vertexShader =
+ (ctx->Shader.CurrentVertexProgram &&
+ ctx->Shader.CurrentVertexProgram->LinkStatus &&
+ ctx->Shader.CurrentVertexProgram->VertexProgram);
const GLboolean vertexProgram = ctx->VertexProgram._Enabled;
GLbitfield fp_inputs = 0x0;
@@ -377,7 +378,7 @@ static GLbitfield get_fp_input_mask( GLcontext *ctx )
* validation (see additional comments in state.c).
*/
if (vertexShader)
- vprog = ctx->Shader.CurrentProgram->VertexProgram;
+ vprog = ctx->Shader.CurrentVertexProgram->VertexProgram;
else
vprog = ctx->VertexProgram.Current;
@@ -407,7 +408,7 @@ static GLbitfield get_fp_input_mask( GLcontext *ctx )
* Examine current texture environment state and generate a unique
* key to identify it.
*/
-static GLuint make_state_key( GLcontext *ctx, struct state_key *key )
+static GLuint make_state_key( struct gl_context *ctx, struct state_key *key )
{
GLuint i, j;
GLbitfield inputs_referenced = FRAG_BIT_COL0;
@@ -663,7 +664,7 @@ static void reserve_temp( struct texenv_fragment_program *p, struct ureg r )
}
-static void release_temps(GLcontext *ctx, struct texenv_fragment_program *p )
+static void release_temps(struct gl_context *ctx, struct texenv_fragment_program *p )
{
GLuint max_temp = ctx->Const.FragmentProgram.MaxTemps;
@@ -1415,7 +1416,7 @@ load_texunit_bumpmap( struct texenv_fragment_program *p, GLuint unit )
* current texture env/combine mode.
*/
static void
-create_new_program(GLcontext *ctx, struct state_key *key,
+create_new_program(struct gl_context *ctx, struct state_key *key,
struct gl_fragment_program *program)
{
struct prog_instruction instBuffer[MAX_INSTRUCTIONS];
@@ -1526,7 +1527,7 @@ create_new_program(GLcontext *ctx, struct state_key *key,
emit_arith( &p, OPCODE_END, undef, WRITEMASK_XYZW, 0, undef, undef, undef);
if (key->fog_enabled) {
- /* Pull fog mode from GLcontext, the value in the state key is
+ /* Pull fog mode from struct gl_context, the value in the state key is
* a reduced value and not what is expected in FogOption
*/
p.program->FogOption = ctx->Fog.Mode;
@@ -1590,7 +1591,7 @@ create_new_program(GLcontext *ctx, struct state_key *key,
* fixed-function texture, fog and color-sum operations.
*/
struct gl_fragment_program *
-_mesa_get_fixed_func_fragment_program(GLcontext *ctx)
+_mesa_get_fixed_func_fragment_program(struct gl_context *ctx)
{
struct gl_fragment_program *prog;
struct state_key key;
diff --git a/src/mesa/main/texenvprogram.h b/src/mesa/main/texenvprogram.h
index 0a162d2e7a2..abfb916d21b 100644
--- a/src/mesa/main/texenvprogram.h
+++ b/src/mesa/main/texenvprogram.h
@@ -30,6 +30,6 @@
#include "mtypes.h"
extern struct gl_fragment_program *
-_mesa_get_fixed_func_fragment_program(GLcontext *ctx);
+_mesa_get_fixed_func_fragment_program(struct gl_context *ctx);
#endif
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index 24efb108bb6..894c0130b47 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -54,7 +54,7 @@
* will typically override this function with a specialized version.
*/
gl_format
-_mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
+_mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
GLenum format, GLenum type )
{
(void) format;
diff --git a/src/mesa/main/texformat.h b/src/mesa/main/texformat.h
index bda5fd6d8ce..8bd15076753 100644
--- a/src/mesa/main/texformat.h
+++ b/src/mesa/main/texformat.h
@@ -32,7 +32,7 @@
extern gl_format
-_mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
+_mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
GLenum format, GLenum type );
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index 00134ea9ffb..879ac529a01 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -35,6 +35,7 @@
#include "context.h"
#include "formats.h"
#include "image.h"
+#include "pack.h"
#include "texgetimage.h"
#include "teximage.h"
@@ -63,7 +64,7 @@ type_with_negative_values(GLenum type)
* glGetTexImage for color index pixels.
*/
static void
-get_tex_color_index(GLcontext *ctx, GLuint dimensions,
+get_tex_color_index(struct gl_context *ctx, GLuint dimensions,
GLenum format, GLenum type, GLvoid *pixels,
const struct gl_texture_image *texImage)
{
@@ -111,7 +112,7 @@ get_tex_color_index(GLcontext *ctx, GLuint dimensions,
* glGetTexImage for depth/Z pixels.
*/
static void
-get_tex_depth(GLcontext *ctx, GLuint dimensions,
+get_tex_depth(struct gl_context *ctx, GLuint dimensions,
GLenum format, GLenum type, GLvoid *pixels,
const struct gl_texture_image *texImage)
{
@@ -141,7 +142,7 @@ get_tex_depth(GLcontext *ctx, GLuint dimensions,
* glGetTexImage for depth/stencil pixels.
*/
static void
-get_tex_depth_stencil(GLcontext *ctx, GLuint dimensions,
+get_tex_depth_stencil(struct gl_context *ctx, GLuint dimensions,
GLenum format, GLenum type, GLvoid *pixels,
const struct gl_texture_image *texImage)
{
@@ -171,7 +172,7 @@ get_tex_depth_stencil(GLcontext *ctx, GLuint dimensions,
* glGetTexImage for YCbCr pixels.
*/
static void
-get_tex_ycbcr(GLcontext *ctx, GLuint dimensions,
+get_tex_ycbcr(struct gl_context *ctx, GLuint dimensions,
GLenum format, GLenum type, GLvoid *pixels,
const struct gl_texture_image *texImage)
{
@@ -234,7 +235,7 @@ linear_to_nonlinear(GLfloat cl)
* glGetTexImagefor sRGB pixels;
*/
static void
-get_tex_srgb(GLcontext *ctx, GLuint dimensions,
+get_tex_srgb(struct gl_context *ctx, GLuint dimensions,
GLenum format, GLenum type, GLvoid *pixels,
const struct gl_texture_image *texImage)
{
@@ -285,7 +286,7 @@ get_tex_srgb(GLcontext *ctx, GLuint dimensions,
static INLINE void
-get_tex_srgb(GLcontext *ctx, GLuint dimensions,
+get_tex_srgb(struct gl_context *ctx, GLuint dimensions,
GLenum format, GLenum type, GLvoid *pixels,
const struct gl_texture_image *texImage)
{
@@ -301,7 +302,7 @@ get_tex_srgb(GLcontext *ctx, GLuint dimensions,
* This is the slow way since we use texture sampling.
*/
static void
-get_tex_rgba(GLcontext *ctx, GLuint dimensions,
+get_tex_rgba(struct gl_context *ctx, GLuint dimensions,
GLenum format, GLenum type, GLvoid *pixels,
const struct gl_texture_image *texImage)
{
@@ -371,7 +372,7 @@ get_tex_rgba(GLcontext *ctx, GLuint dimensions,
* \return GL_TRUE if done, GL_FALSE otherwise
*/
static GLboolean
-get_tex_memcpy(GLcontext *ctx, GLenum format, GLenum type, GLvoid *pixels,
+get_tex_memcpy(struct gl_context *ctx, GLenum format, GLenum type, GLvoid *pixels,
const struct gl_texture_object *texObj,
const struct gl_texture_image *texImage)
{
@@ -451,7 +452,7 @@ get_tex_memcpy(GLcontext *ctx, GLenum format, GLenum type, GLvoid *pixels,
* The texture image must be mapped.
*/
void
-_mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level,
+_mesa_get_teximage(struct gl_context *ctx, GLenum target, GLint level,
GLenum format, GLenum type, GLvoid *pixels,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage)
@@ -528,7 +529,7 @@ _mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level,
* All error checking will have been done before this routine is called.
*/
void
-_mesa_get_compressed_teximage(GLcontext *ctx, GLenum target, GLint level,
+_mesa_get_compressed_teximage(struct gl_context *ctx, GLenum target, GLint level,
GLvoid *img,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage)
@@ -585,7 +586,7 @@ _mesa_get_compressed_teximage(GLcontext *ctx, GLenum target, GLint level,
* \return GL_TRUE if any error, GL_FALSE if no errors.
*/
static GLboolean
-getteximage_error_check(GLcontext *ctx, GLenum target, GLint level,
+getteximage_error_check(struct gl_context *ctx, GLenum target, GLint level,
GLenum format, GLenum type, GLvoid *pixels )
{
struct gl_texture_object *texObj;
@@ -771,7 +772,7 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
* \return GL_TRUE if any error, GL_FALSE if no errors.
*/
static GLboolean
-getcompressedteximage_error_check(GLcontext *ctx, GLenum target, GLint level,
+getcompressedteximage_error_check(struct gl_context *ctx, GLenum target, GLint level,
GLvoid *img)
{
struct gl_texture_object *texObj;
diff --git a/src/mesa/main/texgetimage.h b/src/mesa/main/texgetimage.h
index 866ab704945..81a3bbbd9a7 100644
--- a/src/mesa/main/texgetimage.h
+++ b/src/mesa/main/texgetimage.h
@@ -30,14 +30,14 @@
#include "mtypes.h"
extern void
-_mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level,
+_mesa_get_teximage(struct gl_context *ctx, GLenum target, GLint level,
GLenum format, GLenum type, GLvoid *pixels,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage);
extern void
-_mesa_get_compressed_teximage(GLcontext *ctx, GLenum target, GLint level,
+_mesa_get_compressed_teximage(struct gl_context *ctx, GLenum target, GLint level,
GLvoid *img,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage);
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 6c3f49f667b..2e9410f2717 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -127,7 +127,7 @@ logbase2( int n )
* XXX this could be static
*/
GLint
-_mesa_base_tex_format( GLcontext *ctx, GLint internalFormat )
+_mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
{
switch (internalFormat) {
case GL_ALPHA:
@@ -558,7 +558,7 @@ _mesa_set_tex_image(struct gl_texture_object *tObj,
* zero.
*/
struct gl_texture_image *
-_mesa_new_texture_image( GLcontext *ctx )
+_mesa_new_texture_image( struct gl_context *ctx )
{
(void) ctx;
return CALLOC_STRUCT(gl_texture_image);
@@ -574,7 +574,7 @@ _mesa_new_texture_image( GLcontext *ctx )
* Free the texture image data if it's not marked as client data.
*/
void
-_mesa_free_texture_image_data(GLcontext *ctx,
+_mesa_free_texture_image_data(struct gl_context *ctx,
struct gl_texture_image *texImage)
{
(void) ctx;
@@ -596,7 +596,7 @@ _mesa_free_texture_image_data(GLcontext *ctx,
* Free the texture image structure and the associated image data.
*/
void
-_mesa_delete_texture_image( GLcontext *ctx, struct gl_texture_image *texImage )
+_mesa_delete_texture_image( struct gl_context *ctx, struct gl_texture_image *texImage )
{
/* Free texImage->Data and/or any other driver-specific texture
* image storage.
@@ -646,7 +646,7 @@ _mesa_is_proxy_texture(GLenum target)
* \sa gl_texture_unit.
*/
struct gl_texture_object *
-_mesa_select_tex_object(GLcontext *ctx, const struct gl_texture_unit *texUnit,
+_mesa_select_tex_object(struct gl_context *ctx, const struct gl_texture_unit *texUnit,
GLenum target)
{
switch (target) {
@@ -703,7 +703,7 @@ _mesa_select_tex_object(GLcontext *ctx, const struct gl_texture_unit *texUnit,
* Return pointer to texture object for given target on current texture unit.
*/
struct gl_texture_object *
-_mesa_get_current_tex_object(GLcontext *ctx, GLenum target)
+_mesa_get_current_tex_object(struct gl_context *ctx, GLenum target)
{
struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
return _mesa_select_tex_object(ctx, texUnit, target);
@@ -723,7 +723,7 @@ _mesa_get_current_tex_object(GLcontext *ctx, GLenum target)
* \return pointer to the texture image structure, or NULL on failure.
*/
struct gl_texture_image *
-_mesa_select_tex_image(GLcontext *ctx, const struct gl_texture_object *texObj,
+_mesa_select_tex_image(struct gl_context *ctx, const struct gl_texture_object *texObj,
GLenum target, GLint level)
{
const GLuint face = _mesa_tex_target_to_face(target);
@@ -742,7 +742,7 @@ _mesa_select_tex_image(GLcontext *ctx, const struct gl_texture_object *texObj,
* out of memory.
*/
struct gl_texture_image *
-_mesa_get_tex_image(GLcontext *ctx, struct gl_texture_object *texObj,
+_mesa_get_tex_image(struct gl_context *ctx, struct gl_texture_object *texObj,
GLenum target, GLint level)
{
struct gl_texture_image *texImage;
@@ -772,7 +772,7 @@ _mesa_get_tex_image(GLcontext *ctx, struct gl_texture_object *texObj,
* level, or out of memory.
*/
struct gl_texture_image *
-_mesa_get_proxy_tex_image(GLcontext *ctx, GLenum target, GLint level)
+_mesa_get_proxy_tex_image(struct gl_context *ctx, GLenum target, GLint level)
{
struct gl_texture_image *texImage;
GLuint texIndex;
@@ -847,7 +847,7 @@ _mesa_get_proxy_tex_image(GLcontext *ctx, GLenum target, GLint level)
* \sa gl_constants.
*/
GLint
-_mesa_max_texture_levels(GLcontext *ctx, GLenum target)
+_mesa_max_texture_levels(struct gl_context *ctx, GLenum target)
{
switch (target) {
case GL_TEXTURE_1D:
@@ -993,7 +993,7 @@ clear_teximage_fields(struct gl_texture_image *img)
* Note: width, height and depth include the border.
*/
void
-_mesa_init_teximage_fields(GLcontext *ctx, GLenum target,
+_mesa_init_teximage_fields(struct gl_context *ctx, GLenum target,
struct gl_texture_image *img,
GLsizei width, GLsizei height, GLsizei depth,
GLint border, GLenum internalFormat)
@@ -1084,7 +1084,7 @@ _mesa_init_teximage_fields(GLcontext *ctx, GLenum target,
* fields are cleared so that its parent object will test incomplete.
*/
void
-_mesa_clear_texture_image(GLcontext *ctx, struct gl_texture_image *texImage)
+_mesa_clear_texture_image(struct gl_context *ctx, struct gl_texture_image *texImage)
{
ctx->Driver.FreeTexImageData(ctx, texImage);
clear_teximage_fields(texImage);
@@ -1116,7 +1116,7 @@ _mesa_clear_texture_image(GLcontext *ctx, struct gl_texture_image *texImage)
* \return GL_TRUE if the image is acceptable, GL_FALSE if not acceptable.
*/
GLboolean
-_mesa_test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level,
+_mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat, GLenum format, GLenum type,
GLint width, GLint height, GLint depth, GLint border)
{
@@ -1228,16 +1228,26 @@ _mesa_test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level,
* Helper function to determine whether a target supports compressed textures
*/
static GLboolean
-target_can_be_compressed(GLcontext *ctx, GLenum target)
+target_can_be_compressed(struct gl_context *ctx, GLenum target)
{
- return (((target == GL_TEXTURE_2D || target == GL_PROXY_TEXTURE_2D))
- || ((ctx->Extensions.ARB_texture_cube_map &&
- (target == GL_PROXY_TEXTURE_CUBE_MAP ||
- (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X &&
- target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z))))
- || ((ctx->Extensions.MESA_texture_array &&
- ((target == GL_PROXY_TEXTURE_2D_ARRAY_EXT) ||
- (target == GL_TEXTURE_2D_ARRAY_EXT)))));
+ switch (target) {
+ case GL_TEXTURE_2D:
+ case GL_PROXY_TEXTURE_2D:
+ return GL_TRUE;
+ case GL_PROXY_TEXTURE_CUBE_MAP:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_X:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
+ return ctx->Extensions.ARB_texture_cube_map;
+ case GL_PROXY_TEXTURE_2D_ARRAY_EXT:
+ case GL_TEXTURE_2D_ARRAY_EXT:
+ return ctx->Extensions.MESA_texture_array;
+ default:
+ return GL_FALSE;
+ }
}
@@ -1259,11 +1269,11 @@ target_can_be_compressed(GLcontext *ctx, GLenum target)
* \return GL_TRUE if an error was detected, or GL_FALSE if no errors.
*
* Verifies each of the parameters against the constants specified in
- * __GLcontextRec::Const and the supported extensions, and according to the
+ * __struct gl_contextRec::Const and the supported extensions, and according to the
* OpenGL specification.
*/
static GLboolean
-texture_error_check( GLcontext *ctx, GLenum target,
+texture_error_check( struct gl_context *ctx, GLenum target,
GLint level, GLint internalFormat,
GLenum format, GLenum type,
GLuint dimensions,
@@ -1392,11 +1402,15 @@ texture_error_check( GLcontext *ctx, GLenum target,
/* Check incoming image format and type */
if (!_mesa_is_legal_format_and_type(ctx, format, type)) {
- /* Yes, generate GL_INVALID_OPERATION, not GL_INVALID_ENUM, if there
- * is a type/format mismatch. See 1.2 spec page 94, sec 3.6.4.
+ /* Normally, GL_INVALID_OPERATION is generated by a format/type
+ * mismatch (see the 1.2 spec page 94, sec 3.6.4.). But with the
+ * GL_EXT_texture_integer extension, some combinations should generate
+ * GL_INVALID_ENUM instead (grr!).
*/
if (!isProxy) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
+ GLenum error = _mesa_is_integer_format(format)
+ ? GL_INVALID_ENUM : GL_INVALID_OPERATION;
+ _mesa_error(ctx, error,
"glTexImage%dD(incompatible format 0x%x, type 0x%x)",
dimensions, format, type);
}
@@ -1482,6 +1496,18 @@ texture_error_check( GLcontext *ctx, GLenum target,
}
}
+ /* additional checks for integer textures */
+ if (ctx->Extensions.EXT_texture_integer &&
+ (_mesa_is_integer_format(format) !=
+ _mesa_is_integer_format(internalFormat))) {
+ if (!isProxy) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glTexImage%dD(integer/non-integer format mismatch)",
+ dimensions);
+ }
+ return GL_TRUE;
+ }
+
/* if we get here, the parameters are OK */
return GL_FALSE;
}
@@ -1506,11 +1532,11 @@ texture_error_check( GLcontext *ctx, GLenum target,
* \return GL_TRUE if an error was detected, or GL_FALSE if no errors.
*
* Verifies each of the parameters against the constants specified in
- * __GLcontextRec::Const and the supported extensions, and according to the
+ * __struct gl_contextRec::Const and the supported extensions, and according to the
* OpenGL specification.
*/
static GLboolean
-subtexture_error_check( GLcontext *ctx, GLuint dimensions,
+subtexture_error_check( struct gl_context *ctx, GLuint dimensions,
GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLint width, GLint height, GLint depth,
@@ -1588,7 +1614,12 @@ subtexture_error_check( GLcontext *ctx, GLuint dimensions,
}
if (!_mesa_is_legal_format_and_type(ctx, format, type)) {
- _mesa_error(ctx, GL_INVALID_ENUM,
+ /* As with the glTexImage2D check above, the error code here
+ * depends on texture integer.
+ */
+ GLenum error = _mesa_is_integer_format(format)
+ ? GL_INVALID_OPERATION : GL_INVALID_ENUM;
+ _mesa_error(ctx, error,
"glTexSubImage%dD(incompatible format 0x%x, type 0x%x)",
dimensions, format, type);
return GL_TRUE;
@@ -1603,7 +1634,7 @@ subtexture_error_check( GLcontext *ctx, GLuint dimensions,
* \return GL_TRUE if error recorded, GL_FALSE otherwise
*/
static GLboolean
-subtexture_error_check2( GLcontext *ctx, GLuint dimensions,
+subtexture_error_check2( struct gl_context *ctx, GLuint dimensions,
GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLint width, GLint height, GLint depth,
@@ -1701,11 +1732,11 @@ subtexture_error_check2( GLcontext *ctx, GLuint dimensions,
* \return GL_TRUE if an error was detected, or GL_FALSE if no errors.
*
* Verifies each of the parameters against the constants specified in
- * __GLcontextRec::Const and the supported extensions, and according to the
+ * __struct gl_contextRec::Const and the supported extensions, and according to the
* OpenGL specification.
*/
static GLboolean
-copytexture_error_check( GLcontext *ctx, GLuint dimensions,
+copytexture_error_check( struct gl_context *ctx, GLuint dimensions,
GLenum target, GLint level, GLint internalFormat,
GLint width, GLint height, GLint border )
{
@@ -1880,7 +1911,7 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions,
* \return GL_TRUE if an error was detected, or GL_FALSE if no errors.
*/
static GLboolean
-copytexsubimage_error_check1( GLcontext *ctx, GLuint dimensions,
+copytexsubimage_error_check1( struct gl_context *ctx, GLuint dimensions,
GLenum target, GLint level)
{
/* Check that the source buffer is complete */
@@ -1954,7 +1985,7 @@ copytexsubimage_error_check1( GLcontext *ctx, GLuint dimensions,
* \param height image height given by the user.
*/
static GLboolean
-copytexsubimage_error_check2( GLcontext *ctx, GLuint dimensions,
+copytexsubimage_error_check2( struct gl_context *ctx, GLuint dimensions,
GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLsizei width, GLsizei height,
@@ -2073,6 +2104,19 @@ copytexsubimage_error_check2( GLcontext *ctx, GLuint dimensions,
}
}
+ /* If copying into an integer texture, the source buffer must also be
+ * integer-valued.
+ */
+ if (_mesa_is_format_integer_color(teximage->TexFormat)) {
+ struct gl_renderbuffer *rb = ctx->ReadBuffer->_ColorReadBuffer;
+ if (!_mesa_is_format_integer_color(rb->Format)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glCopyTexSubImage%dD(source buffer is not integer format)",
+ dimensions);
+ return GL_TRUE;
+ }
+ }
+
/* if we get here, the parameters are OK */
return GL_FALSE;
}
@@ -2081,7 +2125,7 @@ copytexsubimage_error_check2( GLcontext *ctx, GLuint dimensions,
/** Callback info for walking over FBO hash table */
struct cb_info
{
- GLcontext *ctx;
+ struct gl_context *ctx;
struct gl_texture_object *texObj;
GLuint level, face;
};
@@ -2095,7 +2139,7 @@ check_rtt_cb(GLuint key, void *data, void *userData)
{
struct gl_framebuffer *fb = (struct gl_framebuffer *) data;
const struct cb_info *info = (struct cb_info *) userData;
- GLcontext *ctx = info->ctx;
+ struct gl_context *ctx = info->ctx;
const struct gl_texture_object *texObj = info->texObj;
const GLuint level = info->level, face = info->face;
@@ -2127,7 +2171,7 @@ check_rtt_cb(GLuint key, void *data, void *userData)
* Any FBOs rendering into the texture must be re-validated.
*/
static void
-update_fbo_texture(GLcontext *ctx, struct gl_texture_object *texObj,
+update_fbo_texture(struct gl_context *ctx, struct gl_texture_object *texObj,
GLuint face, GLuint level)
{
/* Only check this texture if it's been marked as RenderToTexture */
@@ -2148,7 +2192,7 @@ update_fbo_texture(GLcontext *ctx, struct gl_texture_object *texObj,
* mipmap levels now.
*/
static INLINE void
-check_gen_mipmap(GLcontext *ctx, GLenum target,
+check_gen_mipmap(struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj, GLint level)
{
ASSERT(target != GL_TEXTURE_CUBE_MAP);
@@ -2214,7 +2258,7 @@ override_internal_format(GLenum internalFormat, GLint width, GLint height)
* comes up during automatic mipmap generation.
*/
void
-_mesa_choose_texture_format(GLcontext *ctx,
+_mesa_choose_texture_format(struct gl_context *ctx,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage,
GLenum target, GLint level,
@@ -2252,7 +2296,6 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
GLsizei width, GLint border, GLenum format,
GLenum type, const GLvoid *pixels )
{
- GLsizei postConvWidth = width;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
@@ -2272,7 +2315,7 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
const GLuint face = _mesa_tex_target_to_face(target);
if (texture_error_check(ctx, target, level, internalFormat,
- format, type, 1, postConvWidth, 1, 1, border)) {
+ format, type, 1, width, 1, 1, border)) {
return; /* error was recorded */
}
@@ -2295,7 +2338,7 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
clear_teximage_fields(texImage); /* not really needed, but helpful */
_mesa_init_teximage_fields(ctx, target, texImage,
- postConvWidth, 1, 1,
+ width, 1, 1,
border, internalFormat);
_mesa_choose_texture_format(ctx, texObj, texImage, target, level,
@@ -2327,7 +2370,7 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
struct gl_texture_image *texImage;
texImage = _mesa_get_proxy_tex_image(ctx, target, level);
if (texture_error_check(ctx, target, level, internalFormat,
- format, type, 1, postConvWidth, 1, 1, border)) {
+ format, type, 1, width, 1, 1, border)) {
/* when error, clear all proxy texture image parameters */
if (texImage)
clear_teximage_fields(texImage);
@@ -2338,7 +2381,7 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
_mesa_get_current_tex_object(ctx, target);
ASSERT(texImage);
_mesa_init_teximage_fields(ctx, target, texImage,
- postConvWidth, 1, 1,
+ width, 1, 1,
border, internalFormat);
_mesa_choose_texture_format(ctx, texObj, texImage, target, level,
internalFormat, format, type);
@@ -2357,7 +2400,6 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
GLenum format, GLenum type,
const GLvoid *pixels )
{
- GLsizei postConvWidth = width, postConvHeight = height;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
@@ -2384,8 +2426,7 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
const GLuint face = _mesa_tex_target_to_face(target);
if (texture_error_check(ctx, target, level, internalFormat,
- format, type, 2, postConvWidth, postConvHeight,
- 1, border)) {
+ format, type, 2, width, height, 1, border)) {
return; /* error was recorded */
}
@@ -2407,7 +2448,7 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
ASSERT(texImage->Data == NULL);
clear_teximage_fields(texImage); /* not really needed, but helpful */
_mesa_init_teximage_fields(ctx, target, texImage,
- postConvWidth, postConvHeight, 1,
+ width, height, 1,
border, internalFormat);
_mesa_choose_texture_format(ctx, texObj, texImage, target, level,
@@ -2445,8 +2486,7 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
struct gl_texture_image *texImage;
texImage = _mesa_get_proxy_tex_image(ctx, target, level);
if (texture_error_check(ctx, target, level, internalFormat,
- format, type, 2, postConvWidth, postConvHeight,
- 1, border)) {
+ format, type, 2, width, height, 1, border)) {
/* when error, clear all proxy texture image parameters */
if (texImage)
clear_teximage_fields(texImage);
@@ -2456,7 +2496,7 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
struct gl_texture_object *texObj =
_mesa_get_current_tex_object(ctx, target);
_mesa_init_teximage_fields(ctx, target, texImage,
- postConvWidth, postConvHeight, 1,
+ width, height, 1,
border, internalFormat);
_mesa_choose_texture_format(ctx, texObj, texImage, target, level,
internalFormat, format, type);
@@ -2643,7 +2683,6 @@ _mesa_TexSubImage1D( GLenum target, GLint level,
GLenum format, GLenum type,
const GLvoid *pixels )
{
- GLsizei postConvWidth = width;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
GET_CURRENT_CONTEXT(ctx);
@@ -2659,7 +2698,7 @@ _mesa_TexSubImage1D( GLenum target, GLint level,
_mesa_update_state(ctx);
if (subtexture_error_check(ctx, 1, target, level, xoffset, 0, 0,
- postConvWidth, 1, 1, format, type)) {
+ width, 1, 1, format, type)) {
return; /* error was detected */
}
@@ -2672,8 +2711,7 @@ _mesa_TexSubImage1D( GLenum target, GLint level,
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
if (subtexture_error_check2(ctx, 1, target, level, xoffset, 0, 0,
- postConvWidth, 1, 1,
- format, type, texImage)) {
+ width, 1, 1, format, type, texImage)) {
/* error was recorded */
}
else if (width > 0) {
@@ -2701,7 +2739,6 @@ _mesa_TexSubImage2D( GLenum target, GLint level,
GLenum format, GLenum type,
const GLvoid *pixels )
{
- GLsizei postConvWidth = width, postConvHeight = height;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
GET_CURRENT_CONTEXT(ctx);
@@ -2718,7 +2755,7 @@ _mesa_TexSubImage2D( GLenum target, GLint level,
_mesa_update_state(ctx);
if (subtexture_error_check(ctx, 2, target, level, xoffset, yoffset, 0,
- postConvWidth, postConvHeight, 1, format, type)) {
+ width, height, 1, format, type)) {
return; /* error was detected */
}
@@ -2729,8 +2766,7 @@ _mesa_TexSubImage2D( GLenum target, GLint level,
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
if (subtexture_error_check2(ctx, 2, target, level, xoffset, yoffset, 0,
- postConvWidth, postConvHeight, 1,
- format, type, texImage)) {
+ width, height, 1, format, type, texImage)) {
/* error was recorded */
}
else if (width > 0 && height >= 0) {
@@ -2823,7 +2859,6 @@ _mesa_CopyTexImage1D( GLenum target, GLint level,
{
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
- GLsizei postConvWidth = width;
const GLuint face = _mesa_tex_target_to_face(target);
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
@@ -2838,7 +2873,7 @@ _mesa_CopyTexImage1D( GLenum target, GLint level,
_mesa_update_state(ctx);
if (copytexture_error_check(ctx, 1, target, level, internalFormat,
- postConvWidth, 1, border))
+ width, 1, border))
return;
texObj = _mesa_get_current_tex_object(ctx, target);
@@ -2857,7 +2892,7 @@ _mesa_CopyTexImage1D( GLenum target, GLint level,
ASSERT(texImage->Data == NULL);
clear_teximage_fields(texImage); /* not really needed, but helpful */
- _mesa_init_teximage_fields(ctx, target, texImage, postConvWidth, 1, 1,
+ _mesa_init_teximage_fields(ctx, target, texImage, width, 1, 1,
border, internalFormat);
_mesa_choose_texture_format(ctx, texObj, texImage, target, level,
@@ -2892,7 +2927,6 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat,
{
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
- GLsizei postConvWidth = width, postConvHeight = height;
const GLuint face = _mesa_tex_target_to_face(target);
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
@@ -2907,7 +2941,7 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat,
_mesa_update_state(ctx);
if (copytexture_error_check(ctx, 2, target, level, internalFormat,
- postConvWidth, postConvHeight, border))
+ width, height, border))
return;
texObj = _mesa_get_current_tex_object(ctx, target);
@@ -2928,7 +2962,7 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat,
clear_teximage_fields(texImage); /* not really needed, but helpful */
_mesa_init_teximage_fields(ctx, target, texImage,
- postConvWidth, postConvHeight, 1,
+ width, height, 1,
border, internalFormat);
_mesa_choose_texture_format(ctx, texObj, texImage, target, level,
@@ -2961,7 +2995,6 @@ _mesa_CopyTexSubImage1D( GLenum target, GLint level,
{
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
- GLsizei postConvWidth = width;
GLint yoffset = 0;
GLsizei height = 1;
@@ -2986,8 +3019,7 @@ _mesa_CopyTexSubImage1D( GLenum target, GLint level,
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
if (copytexsubimage_error_check2(ctx, 1, target, level,
- xoffset, 0, 0, postConvWidth, 1,
- texImage)) {
+ xoffset, 0, 0, width, 1, texImage)) {
/* error was recorded */
}
else {
@@ -3018,7 +3050,6 @@ _mesa_CopyTexSubImage2D( GLenum target, GLint level,
{
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
- GLsizei postConvWidth = width, postConvHeight = height;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
@@ -3041,8 +3072,7 @@ _mesa_CopyTexSubImage2D( GLenum target, GLint level,
if (copytexsubimage_error_check2(ctx, 2, target, level,
xoffset, yoffset, 0,
- postConvWidth, postConvHeight,
- texImage)) {
+ width, height, texImage)) {
/* error was recorded */
}
else {
@@ -3074,7 +3104,6 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level,
{
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
- GLsizei postConvWidth = width, postConvHeight = height;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
@@ -3096,8 +3125,7 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level,
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
if (copytexsubimage_error_check2(ctx, 3, target, level, xoffset, yoffset,
- zoffset, postConvWidth, postConvHeight,
- texImage)) {
+ zoffset, width, height, texImage)) {
/* error was recored */
}
else {
@@ -3158,7 +3186,7 @@ get_compressed_block_size(GLenum glformat, GLuint *bw, GLuint *bh)
* \return error code or GL_NO_ERROR.
*/
static GLenum
-compressed_texture_error_check(GLcontext *ctx, GLint dimensions,
+compressed_texture_error_check(struct gl_context *ctx, GLint dimensions,
GLenum target, GLint level,
GLenum internalFormat, GLsizei width,
GLsizei height, GLsizei depth, GLint border,
@@ -3265,7 +3293,7 @@ compressed_texture_error_check(GLcontext *ctx, GLint dimensions,
* \return error code or GL_NO_ERROR.
*/
static GLenum
-compressed_subtexture_error_check(GLcontext *ctx, GLint dimensions,
+compressed_subtexture_error_check(struct gl_context *ctx, GLint dimensions,
GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLsizei width, GLsizei height, GLsizei depth,
@@ -3349,7 +3377,7 @@ compressed_subtexture_error_check(GLcontext *ctx, GLint dimensions,
* \return GL_TRUE if error found, GL_FALSE otherwise.
*/
static GLboolean
-compressed_subtexture_error_check2(GLcontext *ctx, GLuint dims,
+compressed_subtexture_error_check2(struct gl_context *ctx, GLuint dims,
GLsizei width, GLsizei height,
GLsizei depth, GLenum format,
struct gl_texture_image *texImage)
diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h
index 0dcacab3cd0..d4317c301b7 100644
--- a/src/mesa/main/teximage.h
+++ b/src/mesa/main/teximage.h
@@ -46,7 +46,7 @@ _mesa_free_texmemory(void *m);
/*@{*/
extern GLint
-_mesa_base_tex_format( GLcontext *ctx, GLint internalFormat );
+_mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat );
extern GLboolean
@@ -54,26 +54,26 @@ _mesa_is_proxy_texture(GLenum target);
extern struct gl_texture_image *
-_mesa_new_texture_image( GLcontext *ctx );
+_mesa_new_texture_image( struct gl_context *ctx );
extern void
-_mesa_delete_texture_image( GLcontext *ctx, struct gl_texture_image *teximage );
+_mesa_delete_texture_image( struct gl_context *ctx, struct gl_texture_image *teximage );
extern void
-_mesa_free_texture_image_data( GLcontext *ctx,
+_mesa_free_texture_image_data( struct gl_context *ctx,
struct gl_texture_image *texImage );
extern void
-_mesa_init_teximage_fields(GLcontext *ctx, GLenum target,
+_mesa_init_teximage_fields(struct gl_context *ctx, GLenum target,
struct gl_texture_image *img,
GLsizei width, GLsizei height, GLsizei depth,
GLint border, GLenum internalFormat);
extern void
-_mesa_choose_texture_format(GLcontext *ctx,
+_mesa_choose_texture_format(struct gl_context *ctx,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage,
GLenum target, GLint level,
@@ -81,7 +81,7 @@ _mesa_choose_texture_format(GLcontext *ctx,
extern void
-_mesa_clear_texture_image(GLcontext *ctx, struct gl_texture_image *texImage);
+_mesa_clear_texture_image(struct gl_context *ctx, struct gl_texture_image *texImage);
extern void
@@ -91,33 +91,33 @@ _mesa_set_tex_image(struct gl_texture_object *tObj,
extern struct gl_texture_object *
-_mesa_select_tex_object(GLcontext *ctx, const struct gl_texture_unit *texUnit,
+_mesa_select_tex_object(struct gl_context *ctx, const struct gl_texture_unit *texUnit,
GLenum target);
extern struct gl_texture_object *
-_mesa_get_current_tex_object(GLcontext *ctx, GLenum target);
+_mesa_get_current_tex_object(struct gl_context *ctx, GLenum target);
extern struct gl_texture_image *
-_mesa_select_tex_image(GLcontext *ctx, const struct gl_texture_object *texObj,
+_mesa_select_tex_image(struct gl_context *ctx, const struct gl_texture_object *texObj,
GLenum target, GLint level);
extern struct gl_texture_image *
-_mesa_get_tex_image(GLcontext *ctx, struct gl_texture_object *texObj,
+_mesa_get_tex_image(struct gl_context *ctx, struct gl_texture_object *texObj,
GLenum target, GLint level);
extern struct gl_texture_image *
-_mesa_get_proxy_tex_image(GLcontext *ctx, GLenum target, GLint level);
+_mesa_get_proxy_tex_image(struct gl_context *ctx, GLenum target, GLint level);
extern GLint
-_mesa_max_texture_levels(GLcontext *ctx, GLenum target);
+_mesa_max_texture_levels(struct gl_context *ctx, GLenum target);
extern GLboolean
-_mesa_test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level,
+_mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat, GLenum format, GLenum type,
GLint width, GLint height, GLint depth, GLint border);
@@ -130,7 +130,7 @@ _mesa_tex_target_to_face(GLenum target);
* Lock a texture for updating. See also _mesa_lock_context_textures().
*/
static INLINE void
-_mesa_lock_texture(GLcontext *ctx, struct gl_texture_object *texObj)
+_mesa_lock_texture(struct gl_context *ctx, struct gl_texture_object *texObj)
{
_glthread_LOCK_MUTEX(ctx->Shared->TexMutex);
ctx->Shared->TextureStateStamp++;
@@ -138,7 +138,7 @@ _mesa_lock_texture(GLcontext *ctx, struct gl_texture_object *texObj)
}
static INLINE void
-_mesa_unlock_texture(GLcontext *ctx, struct gl_texture_object *texObj)
+_mesa_unlock_texture(struct gl_context *ctx, struct gl_texture_object *texObj)
{
_glthread_UNLOCK_MUTEX(ctx->Shared->TexMutex);
}
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 1fedc870285..e08df0f7fed 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -53,7 +53,7 @@
* Return the gl_texture_object for a given ID.
*/
struct gl_texture_object *
-_mesa_lookup_texture(GLcontext *ctx, GLuint id)
+_mesa_lookup_texture(struct gl_context *ctx, GLuint id)
{
return (struct gl_texture_object *)
_mesa_HashLookup(ctx->Shared->TexObjects, id);
@@ -77,7 +77,7 @@ _mesa_lookup_texture(GLcontext *ctx, GLuint id)
* \return pointer to new texture object.
*/
struct gl_texture_object *
-_mesa_new_texture_object( GLcontext *ctx, GLuint name, GLenum target )
+_mesa_new_texture_object( struct gl_context *ctx, GLuint name, GLenum target )
{
struct gl_texture_object *obj;
(void) ctx;
@@ -149,7 +149,7 @@ _mesa_initialize_texture_object( struct gl_texture_object *obj,
* target it's getting bound to (GL_TEXTURE_1D/2D/etc).
*/
static void
-finish_texture_init(GLcontext *ctx, GLenum target,
+finish_texture_init(struct gl_context *ctx, GLenum target,
struct gl_texture_object *obj)
{
assert(obj->Target == 0);
@@ -181,7 +181,7 @@ finish_texture_init(GLcontext *ctx, GLenum target,
* \param texObj the texture object to delete.
*/
void
-_mesa_delete_texture_object( GLcontext *ctx, struct gl_texture_object *texObj )
+_mesa_delete_texture_object( struct gl_context *ctx, struct gl_texture_object *texObj )
{
GLuint i, face;
@@ -265,7 +265,7 @@ _mesa_copy_texture_object( struct gl_texture_object *dest,
* \sa _mesa_clear_texture_image().
*/
void
-_mesa_clear_texture_object(GLcontext *ctx, struct gl_texture_object *texObj)
+_mesa_clear_texture_object(struct gl_context *ctx, struct gl_texture_object *texObj)
{
GLuint i, j;
@@ -404,7 +404,7 @@ incomplete(const struct gl_texture_object *t, const char *why)
* present and has the expected size.
*/
void
-_mesa_test_texobj_completeness( const GLcontext *ctx,
+_mesa_test_texobj_completeness( const struct gl_context *ctx,
struct gl_texture_object *t )
{
const GLint baseLevel = t->BaseLevel;
@@ -696,7 +696,7 @@ _mesa_test_texobj_completeness( const GLcontext *ctx,
* \param invalidate_state also invalidate context state.
*/
void
-_mesa_dirty_texobj(GLcontext *ctx, struct gl_texture_object *texObj,
+_mesa_dirty_texobj(struct gl_context *ctx, struct gl_texture_object *texObj,
GLboolean invalidate_state)
{
texObj->_Complete = GL_FALSE;
@@ -712,7 +712,7 @@ _mesa_dirty_texobj(GLcontext *ctx, struct gl_texture_object *texObj,
* incomplete texture.
*/
struct gl_texture_object *
-_mesa_get_fallback_texture(GLcontext *ctx)
+_mesa_get_fallback_texture(struct gl_context *ctx)
{
if (!ctx->Shared->FallbackTex) {
/* create fallback texture now */
@@ -830,7 +830,7 @@ _mesa_GenTextures( GLsizei n, GLuint *textures )
* read framebuffer. If so, Unbind it.
*/
static void
-unbind_texobj_from_fbo(GLcontext *ctx, struct gl_texture_object *texObj)
+unbind_texobj_from_fbo(struct gl_context *ctx, struct gl_texture_object *texObj)
{
const GLuint n = (ctx->DrawBuffer == ctx->ReadBuffer) ? 1 : 2;
GLuint i;
@@ -855,7 +855,7 @@ unbind_texobj_from_fbo(GLcontext *ctx, struct gl_texture_object *texObj)
* unbind it if so (revert to default textures).
*/
static void
-unbind_texobj_from_texunits(GLcontext *ctx, struct gl_texture_object *texObj)
+unbind_texobj_from_texunits(struct gl_context *ctx, struct gl_texture_object *texObj)
{
GLuint u, tex;
@@ -1214,7 +1214,7 @@ _mesa_IsTexture( GLuint texture )
* See also _mesa_lock/unlock_texture() in teximage.h
*/
void
-_mesa_lock_context_textures( GLcontext *ctx )
+_mesa_lock_context_textures( struct gl_context *ctx )
{
_glthread_LOCK_MUTEX(ctx->Shared->TexMutex);
@@ -1226,7 +1226,7 @@ _mesa_lock_context_textures( GLcontext *ctx )
void
-_mesa_unlock_context_textures( GLcontext *ctx )
+_mesa_unlock_context_textures( struct gl_context *ctx )
{
assert(ctx->Shared->TextureStateStamp == ctx->TextureStateTimestamp);
_glthread_UNLOCK_MUTEX(ctx->Shared->TexMutex);
diff --git a/src/mesa/main/texobj.h b/src/mesa/main/texobj.h
index 9bfebd45c81..821b35caa36 100644
--- a/src/mesa/main/texobj.h
+++ b/src/mesa/main/texobj.h
@@ -41,45 +41,45 @@
/*@{*/
extern struct gl_texture_object *
-_mesa_lookup_texture(GLcontext *ctx, GLuint id);
+_mesa_lookup_texture(struct gl_context *ctx, GLuint id);
extern struct gl_texture_object *
-_mesa_new_texture_object( GLcontext *ctx, GLuint name, GLenum target );
+_mesa_new_texture_object( struct gl_context *ctx, GLuint name, GLenum target );
extern void
_mesa_initialize_texture_object( struct gl_texture_object *obj,
GLuint name, GLenum target );
extern void
-_mesa_delete_texture_object( GLcontext *ctx, struct gl_texture_object *obj );
+_mesa_delete_texture_object( struct gl_context *ctx, struct gl_texture_object *obj );
extern void
_mesa_copy_texture_object( struct gl_texture_object *dest,
const struct gl_texture_object *src );
extern void
-_mesa_clear_texture_object(GLcontext *ctx, struct gl_texture_object *obj);
+_mesa_clear_texture_object(struct gl_context *ctx, struct gl_texture_object *obj);
extern void
_mesa_reference_texobj(struct gl_texture_object **ptr,
struct gl_texture_object *tex);
extern void
-_mesa_test_texobj_completeness( const GLcontext *ctx,
+_mesa_test_texobj_completeness( const struct gl_context *ctx,
struct gl_texture_object *obj );
extern void
-_mesa_dirty_texobj(GLcontext *ctx, struct gl_texture_object *texObj,
+_mesa_dirty_texobj(struct gl_context *ctx, struct gl_texture_object *texObj,
GLboolean invalidate_state);
extern struct gl_texture_object *
-_mesa_get_fallback_texture(GLcontext *ctx);
+_mesa_get_fallback_texture(struct gl_context *ctx);
extern void
-_mesa_unlock_context_textures( GLcontext *ctx );
+_mesa_unlock_context_textures( struct gl_context *ctx );
extern void
-_mesa_lock_context_textures( GLcontext *ctx );
+_mesa_lock_context_textures( struct gl_context *ctx );
/*@}*/
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index e96ace73403..d5c83de97f7 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -47,7 +47,7 @@
* \return GL_TRUE if legal, GL_FALSE otherwise
*/
static GLboolean
-validate_texture_wrap_mode(GLcontext * ctx, GLenum target, GLenum wrap)
+validate_texture_wrap_mode(struct gl_context * ctx, GLenum target, GLenum wrap)
{
const struct gl_extensions * const e = & ctx->Extensions;
@@ -83,7 +83,7 @@ validate_texture_wrap_mode(GLcontext * ctx, GLenum target, GLenum wrap)
* Only the glGetTexLevelParameter() functions accept proxy targets.
*/
static struct gl_texture_object *
-get_texobj(GLcontext *ctx, GLenum target, GLboolean get)
+get_texobj(struct gl_context *ctx, GLenum target, GLboolean get)
{
struct gl_texture_unit *texUnit;
@@ -178,7 +178,7 @@ set_swizzle_component(GLuint *swizzle, GLuint comp, GLuint swz)
* per-texture derived state gets recomputed.
*/
static INLINE void
-flush(GLcontext *ctx, struct gl_texture_object *texObj)
+flush(struct gl_context *ctx, struct gl_texture_object *texObj)
{
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
texObj->_Complete = GL_FALSE;
@@ -190,7 +190,7 @@ flush(GLcontext *ctx, struct gl_texture_object *texObj)
* \return GL_TRUE if legal AND the value changed, GL_FALSE otherwise
*/
static GLboolean
-set_tex_parameteri(GLcontext *ctx,
+set_tex_parameteri(struct gl_context *ctx,
struct gl_texture_object *texObj,
GLenum pname, const GLint *params)
{
@@ -430,7 +430,7 @@ set_tex_parameteri(GLcontext *ctx,
* \return GL_TRUE if legal AND the value changed, GL_FALSE otherwise
*/
static GLboolean
-set_tex_parameterf(GLcontext *ctx,
+set_tex_parameterf(struct gl_context *ctx,
struct gl_texture_object *texObj,
GLenum pname, const GLfloat *params)
{
diff --git a/src/mesa/main/texrender.c b/src/mesa/main/texrender.c
index c68105b3951..8961b926487 100644
--- a/src/mesa/main/texrender.c
+++ b/src/mesa/main/texrender.c
@@ -31,7 +31,7 @@ struct texture_renderbuffer
* Get row of values from the renderbuffer that wraps a texture image.
*/
static void
-texture_get_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+texture_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, void *values)
{
const struct texture_renderbuffer *trb
@@ -100,7 +100,7 @@ texture_get_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-texture_get_values(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+texture_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLint x[], const GLint y[], void *values)
{
const struct texture_renderbuffer *trb
@@ -167,7 +167,7 @@ texture_get_values(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
* Put row of values into a renderbuffer that wraps a texture image.
*/
static void
-texture_put_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+texture_put_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, const void *values, const GLubyte *mask)
{
const struct texture_renderbuffer *trb
@@ -229,7 +229,7 @@ texture_put_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
* Put row of RGB values into a renderbuffer that wraps a texture image.
*/
static void
-texture_put_row_rgb(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+texture_put_row_rgb(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, const void *values, const GLubyte *mask)
{
const struct texture_renderbuffer *trb
@@ -289,7 +289,7 @@ texture_put_row_rgb(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-texture_put_mono_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+texture_put_mono_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, const void *value, const GLubyte *mask)
{
const struct texture_renderbuffer *trb
@@ -348,7 +348,7 @@ texture_put_mono_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-texture_put_values(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
+texture_put_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLint x[], const GLint y[], const void *values,
const GLubyte *mask)
{
@@ -407,7 +407,7 @@ texture_put_values(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-texture_put_mono_values(GLcontext *ctx, struct gl_renderbuffer *rb,
+texture_put_mono_values(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, const GLint x[], const GLint y[],
const void *value, const GLubyte *mask)
{
@@ -486,7 +486,7 @@ delete_texture_wrapper(struct gl_renderbuffer *rb)
* This allows rendering into the texture as if it were a renderbuffer.
*/
static void
-wrap_texture(GLcontext *ctx, struct gl_renderbuffer_attachment *att)
+wrap_texture(struct gl_context *ctx, struct gl_renderbuffer_attachment *att)
{
struct texture_renderbuffer *trb;
const GLuint name = 0;
@@ -525,7 +525,7 @@ wrap_texture(GLcontext *ctx, struct gl_renderbuffer_attachment *att)
* update the internal format info, etc.
*/
static void
-update_wrapper(GLcontext *ctx, const struct gl_renderbuffer_attachment *att)
+update_wrapper(struct gl_context *ctx, const struct gl_renderbuffer_attachment *att)
{
struct texture_renderbuffer *trb
= (struct texture_renderbuffer *) att->Renderbuffer;
@@ -609,7 +609,7 @@ update_wrapper(GLcontext *ctx, const struct gl_renderbuffer_attachment *att)
* \sa _mesa_framebuffer_renderbuffer
*/
void
-_mesa_render_texture(GLcontext *ctx,
+_mesa_render_texture(struct gl_context *ctx,
struct gl_framebuffer *fb,
struct gl_renderbuffer_attachment *att)
{
@@ -623,7 +623,7 @@ _mesa_render_texture(GLcontext *ctx,
void
-_mesa_finish_render_texture(GLcontext *ctx,
+_mesa_finish_render_texture(struct gl_context *ctx,
struct gl_renderbuffer_attachment *att)
{
/* do nothing */
diff --git a/src/mesa/main/texrender.h b/src/mesa/main/texrender.h
index 1e87d594a28..5e68fb03b57 100644
--- a/src/mesa/main/texrender.h
+++ b/src/mesa/main/texrender.h
@@ -4,12 +4,12 @@
#include "mtypes.h"
extern void
-_mesa_render_texture(GLcontext *ctx,
+_mesa_render_texture(struct gl_context *ctx,
struct gl_framebuffer *fb,
struct gl_renderbuffer_attachment *att);
extern void
-_mesa_finish_render_texture(GLcontext *ctx,
+_mesa_finish_render_texture(struct gl_context *ctx,
struct gl_renderbuffer_attachment *att);
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 30c978c1cdd..f4d77189f29 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -63,7 +63,7 @@ static const struct gl_tex_env_combine_state default_combine_state = {
* Used by glXCopyContext to copy texture state from one context to another.
*/
void
-_mesa_copy_texture_state( const GLcontext *src, GLcontext *dst )
+_mesa_copy_texture_state( const struct gl_context *src, struct gl_context *dst )
{
GLuint u, tex;
@@ -119,7 +119,7 @@ _mesa_copy_texture_state( const GLcontext *src, GLcontext *dst )
* For debugging
*/
void
-_mesa_print_texunit_state( GLcontext *ctx, GLuint unit )
+_mesa_print_texunit_state( struct gl_context *ctx, GLuint unit )
{
const struct gl_texture_unit *texUnit = ctx->Texture.Unit + unit;
printf("Texture Unit %d\n", unit);
@@ -363,7 +363,7 @@ _mesa_ClientActiveTextureARB(GLenum texture)
* \param ctx GL context.
*/
static void
-update_texture_matrices( GLcontext *ctx )
+update_texture_matrices( struct gl_context *ctx )
{
GLuint u;
@@ -386,7 +386,7 @@ update_texture_matrices( GLcontext *ctx )
* Examine texture unit's combine/env state to update derived state.
*/
static void
-update_tex_combine(GLcontext *ctx, struct gl_texture_unit *texUnit)
+update_tex_combine(struct gl_context *ctx, struct gl_texture_unit *texUnit)
{
struct gl_tex_env_combine_state *combine;
@@ -489,30 +489,35 @@ update_tex_combine(GLcontext *ctx, struct gl_texture_unit *texUnit)
* \param ctx GL context.
*/
static void
-update_texture_state( GLcontext *ctx )
+update_texture_state( struct gl_context *ctx )
{
GLuint unit;
struct gl_fragment_program *fprog = NULL;
struct gl_vertex_program *vprog = NULL;
GLbitfield enabledFragUnits = 0x0;
- if (ctx->Shader.CurrentProgram &&
- ctx->Shader.CurrentProgram->LinkStatus) {
- fprog = ctx->Shader.CurrentProgram->FragmentProgram;
- vprog = ctx->Shader.CurrentProgram->VertexProgram;
+ if (ctx->Shader.CurrentVertexProgram &&
+ ctx->Shader.CurrentVertexProgram->LinkStatus) {
+ vprog = ctx->Shader.CurrentVertexProgram->VertexProgram;
+ } else if (ctx->VertexProgram._Enabled) {
+ /* XXX enable this if/when non-shader vertex programs get
+ * texture fetches:
+ vprog = ctx->VertexProgram.Current;
+ */
}
- else {
- if (ctx->FragmentProgram._Enabled) {
- fprog = ctx->FragmentProgram.Current;
- }
- if (ctx->VertexProgram._Enabled) {
- /* XXX enable this if/when non-shader vertex programs get
- * texture fetches:
- vprog = ctx->VertexProgram.Current;
- */
- }
+
+ if (ctx->Shader.CurrentFragmentProgram &&
+ ctx->Shader.CurrentFragmentProgram->LinkStatus) {
+ fprog = ctx->Shader.CurrentFragmentProgram->FragmentProgram;
+ }
+ else if (ctx->FragmentProgram._Enabled) {
+ fprog = ctx->FragmentProgram.Current;
}
+ /* FINISHME: Geometry shader texture accesses should also be considered
+ * FINISHME: here.
+ */
+
/* TODO: only set this if there are actual changes */
ctx->NewState |= _NEW_TEXTURE;
@@ -653,7 +658,7 @@ update_texture_state( GLcontext *ctx )
* Update texture-related derived state.
*/
void
-_mesa_update_texture( GLcontext *ctx, GLuint new_state )
+_mesa_update_texture( struct gl_context *ctx, GLuint new_state )
{
if (new_state & _NEW_TEXTURE_MATRIX)
update_texture_matrices( ctx );
@@ -678,7 +683,7 @@ _mesa_update_texture( GLcontext *ctx, GLuint new_state )
* GL_FALSE.
*/
static GLboolean
-alloc_proxy_textures( GLcontext *ctx )
+alloc_proxy_textures( struct gl_context *ctx )
{
static const GLenum targets[] = {
GL_TEXTURE_1D,
@@ -716,7 +721,7 @@ alloc_proxy_textures( GLcontext *ctx )
* \param unit texture unit number to be initialized.
*/
static void
-init_texture_unit( GLcontext *ctx, GLuint unit )
+init_texture_unit( struct gl_context *ctx, GLuint unit )
{
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
GLuint tex;
@@ -764,7 +769,7 @@ init_texture_unit( GLcontext *ctx, GLuint unit )
* Initialize texture state for the given context.
*/
GLboolean
-_mesa_init_texture(GLcontext *ctx)
+_mesa_init_texture(struct gl_context *ctx)
{
GLuint u;
@@ -796,7 +801,7 @@ _mesa_init_texture(GLcontext *ctx)
* Free dynamically-allocted texture data attached to the given context.
*/
void
-_mesa_free_texture_data(GLcontext *ctx)
+_mesa_free_texture_data(struct gl_context *ctx)
{
GLuint u, tgt;
@@ -825,7 +830,7 @@ _mesa_free_texture_data(GLcontext *ctx)
* shared state.
*/
void
-_mesa_update_default_objects_texture(GLcontext *ctx)
+_mesa_update_default_objects_texture(struct gl_context *ctx)
{
GLuint u, tex;
diff --git a/src/mesa/main/texstate.h b/src/mesa/main/texstate.h
index 912cb677985..987123036a6 100644
--- a/src/mesa/main/texstate.h
+++ b/src/mesa/main/texstate.h
@@ -41,7 +41,7 @@
* This the texture unit set by glActiveTexture(), not glClientActiveTexture().
*/
static INLINE struct gl_texture_unit *
-_mesa_get_current_tex_unit(GLcontext *ctx)
+_mesa_get_current_tex_unit(struct gl_context *ctx)
{
ASSERT(ctx->Texture.CurrentUnit < Elements(ctx->Texture.Unit));
return &(ctx->Texture.Unit[ctx->Texture.CurrentUnit]);
@@ -49,10 +49,10 @@ _mesa_get_current_tex_unit(GLcontext *ctx)
extern void
-_mesa_copy_texture_state( const GLcontext *src, GLcontext *dst );
+_mesa_copy_texture_state( const struct gl_context *src, struct gl_context *dst );
extern void
-_mesa_print_texunit_state( GLcontext *ctx, GLuint unit );
+_mesa_print_texunit_state( struct gl_context *ctx, GLuint unit );
@@ -76,16 +76,16 @@ _mesa_ClientActiveTextureARB( GLenum target );
/*@{*/
extern void
-_mesa_update_texture( GLcontext *ctx, GLuint new_state );
+_mesa_update_texture( struct gl_context *ctx, GLuint new_state );
extern GLboolean
-_mesa_init_texture( GLcontext *ctx );
+_mesa_init_texture( struct gl_context *ctx );
extern void
-_mesa_free_texture_data( GLcontext *ctx );
+_mesa_free_texture_data( struct gl_context *ctx );
extern void
-_mesa_update_default_objects_texture(GLcontext *ctx);
+_mesa_update_default_objects_texture(struct gl_context *ctx);
/*@}*/
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 5ca36d955e2..fb34a005b3b 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -58,7 +58,9 @@
#include "image.h"
#include "macros.h"
#include "mipmap.h"
+#include "pack.h"
#include "imports.h"
+#include "pack.h"
#include "texcompress.h"
#include "texcompress_fxt1.h"
#include "texcompress_s3tc.h"
@@ -173,7 +175,6 @@ static const struct {
MAP4(0,1,2,3),
},
-
{
IDX_RED,
MAP4(0, ZERO, ZERO, ONE),
@@ -289,7 +290,7 @@ compute_component_mapping(GLenum inFormat, GLenum outFormat,
* Apply all needed pixel unpacking and pixel transfer operations.
* Note that there are both logicalBaseFormat and textureBaseFormat parameters.
* Suppose the user specifies GL_LUMINANCE as the internal texture format
- * but the graphics hardware doesn't support luminance textures. So, might
+ * but the graphics hardware doesn't support luminance textures. So, we might
* use an RGB hardware format instead.
* If logicalBaseFormat != textureBaseFormat we have some extra work to do.
*
@@ -308,7 +309,7 @@ compute_component_mapping(GLenum inFormat, GLenum outFormat,
* \return resulting image with format = textureBaseFormat and type = GLfloat.
*/
static GLfloat *
-make_temp_float_image(GLcontext *ctx, GLuint dims,
+make_temp_float_image(struct gl_context *ctx, GLuint dims,
GLenum logicalBaseFormat,
GLenum textureBaseFormat,
GLint srcWidth, GLint srcHeight, GLint srcDepth,
@@ -422,7 +423,7 @@ make_temp_float_image(GLcontext *ctx, GLuint dims,
* Apply all needed pixel unpacking and pixel transfer operations.
* Note that there are both logicalBaseFormat and textureBaseFormat parameters.
* Suppose the user specifies GL_LUMINANCE as the internal texture format
- * but the graphics hardware doesn't support luminance textures. So, might
+ * but the graphics hardware doesn't support luminance textures. So, we might
* use an RGB hardware format instead.
* If logicalBaseFormat != textureBaseFormat we have some extra work to do.
*
@@ -441,7 +442,7 @@ make_temp_float_image(GLcontext *ctx, GLuint dims,
* \return resulting image with format = textureBaseFormat and type = GLchan.
*/
GLchan *
-_mesa_make_temp_chan_image(GLcontext *ctx, GLuint dims,
+_mesa_make_temp_chan_image(struct gl_context *ctx, GLuint dims,
GLenum logicalBaseFormat,
GLenum textureBaseFormat,
GLint srcWidth, GLint srcHeight, GLint srcDepth,
@@ -675,7 +676,10 @@ swizzle_copy(GLubyte *dst, GLuint dstComponents, const GLubyte *src,
static const GLubyte map_identity[6] = { 0, 1, 2, 3, ZERO, ONE };
static const GLubyte map_3210[6] = { 3, 2, 1, 0, ZERO, ONE };
-/* Deal with the _REV input types:
+
+/**
+ * For 1-byte/pixel formats (or 8_8_8_8 packed formats), return a
+ * mapping array depending on endianness.
*/
static const GLubyte *
type_mapping( GLenum srcType )
@@ -693,7 +697,10 @@ type_mapping( GLenum srcType )
}
}
-/* Mapping required if input type is
+
+/**
+ * For 1-byte/pixel formats (or 8_8_8_8 packed formats), return a
+ * mapping array depending on pixelstore byte swapping state.
*/
static const GLubyte *
byteswap_mapping( GLboolean swapBytes,
@@ -720,7 +727,7 @@ byteswap_mapping( GLboolean swapBytes,
* Transfer a GLubyte texture image with component swizzling.
*/
static void
-_mesa_swizzle_ubyte_image(GLcontext *ctx,
+_mesa_swizzle_ubyte_image(struct gl_context *ctx,
GLuint dimensions,
GLenum srcFormat,
GLenum srcType,
@@ -807,7 +814,7 @@ _mesa_swizzle_ubyte_image(GLcontext *ctx,
* 1D, 2D and 3D images supported.
*/
static void
-memcpy_texture(GLcontext *ctx,
+memcpy_texture(struct gl_context *ctx,
GLuint dimensions,
gl_format dstFormat,
GLvoid *dstAddr,
@@ -1430,7 +1437,6 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
_mesa_swizzle_ubyte_image(ctx, dims,
srcFormat,
srcType,
-
baseInternalFormat,
dstmap, 4,
dstAddr, dstXoffset, dstYoffset, dstZoffset,
@@ -1923,6 +1929,9 @@ _mesa_texstore_argb1555(TEXSTORE_PARAMS)
}
+/**
+ * Do texstore for 2-channel, 8-bit/channel, unsigned normalized formats.
+ */
static GLboolean
_mesa_texstore_unorm88(TEXSTORE_PARAMS)
{
@@ -1955,7 +1964,6 @@ _mesa_texstore_unorm88(TEXSTORE_PARAMS)
srcType == GL_UNSIGNED_BYTE &&
can_swizzle(baseInternalFormat) &&
can_swizzle(srcFormat)) {
-
GLubyte dstmap[4];
/* dstmap - how to swizzle from RGBA to dst format:
@@ -2040,6 +2048,9 @@ _mesa_texstore_unorm88(TEXSTORE_PARAMS)
}
+/**
+ * Do texstore for 2-channel, 16-bit/channel, unsigned normalized formats.
+ */
static GLboolean
_mesa_texstore_unorm1616(TEXSTORE_PARAMS)
{
@@ -2392,7 +2403,6 @@ _mesa_texstore_a8(TEXSTORE_PARAMS)
srcType == GL_UNSIGNED_BYTE &&
can_swizzle(baseInternalFormat) &&
can_swizzle(srcFormat)) {
-
GLubyte dstmap[4];
/* dstmap - how to swizzle from RGBA to dst format:
@@ -2566,7 +2576,6 @@ _mesa_texstore_dudv8(TEXSTORE_PARAMS)
srcAddr, srcPacking);
}
else if (srcType == GL_BYTE) {
-
GLubyte dstmap[4];
/* dstmap - how to swizzle from RGBA to dst format:
@@ -2772,7 +2781,8 @@ _mesa_texstore_signed_rgbx8888(TEXSTORE_PARAMS)
/**
- * Store a texture in MESA_FORMAT_SIGNED_RGBA8888 or MESA_FORMAT_SIGNED_RGBA8888_REV
+ * Store a texture in MESA_FORMAT_SIGNED_RGBA8888 or
+ * MESA_FORMAT_SIGNED_RGBA8888_REV
*/
static GLboolean
_mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS)
@@ -2908,36 +2918,7 @@ _mesa_texstore_z24_s8(TEXSTORE_PARAMS)
ASSERT(srcFormat == GL_DEPTH_STENCIL_EXT || srcFormat == GL_DEPTH_COMPONENT);
ASSERT(srcFormat != GL_DEPTH_STENCIL_EXT || srcType == GL_UNSIGNED_INT_24_8_EXT);
- /* In case we only upload depth we need to preserve the stencil */
- if (srcFormat == GL_DEPTH_COMPONENT) {
- for (img = 0; img < srcDepth; img++) {
- GLuint *dstRow = (GLuint *) dstAddr
- + dstImageOffsets[dstZoffset + img]
- + dstYoffset * dstRowStride / sizeof(GLuint)
- + dstXoffset;
- const GLuint *src
- = (const GLuint *) _mesa_image_address(dims, srcPacking, srcAddr,
- srcWidth, srcHeight,
- srcFormat, srcType,
- img, 0, 0);
- for (row = 0; row < srcHeight; row++) {
- GLuint depth[MAX_WIDTH];
- GLint i;
- _mesa_unpack_depth_span(ctx, srcWidth,
- GL_UNSIGNED_INT, /* dst type */
- depth, /* dst addr */
- depthScale,
- srcType, src, srcPacking);
-
- for (i = 0; i < srcWidth; i++)
- dstRow[i] = depth[i] << 8 | (dstRow[i] & 0x000000FF);
-
- src += srcRowStride;
- dstRow += dstRowStride / sizeof(GLuint);
- }
- }
- }
- else if (ctx->Pixel.DepthScale == 1.0f &&
+ if (srcFormat != GL_DEPTH_COMPONENT && ctx->Pixel.DepthScale == 1.0f &&
ctx->Pixel.DepthBias == 0.0f &&
!srcPacking->SwapBytes) {
/* simple path */
@@ -2948,41 +2929,53 @@ _mesa_texstore_z24_s8(TEXSTORE_PARAMS)
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
}
- else {
- /* general path */
- const GLint srcRowStride
- = _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType)
- / sizeof(GLuint);
- GLint img, row;
-
+ else if (srcFormat == GL_DEPTH_COMPONENT) {
+ /* In case we only upload depth we need to preserve the stencil */
for (img = 0; img < srcDepth; img++) {
- GLuint *dstRow = (GLuint *) dstAddr
+ GLuint *dstRow = (GLuint *) dstAddr
+ dstImageOffsets[dstZoffset + img]
+ dstYoffset * dstRowStride / sizeof(GLuint)
+ dstXoffset;
const GLuint *src
= (const GLuint *) _mesa_image_address(dims, srcPacking, srcAddr,
- srcWidth, srcHeight,
- srcFormat, srcType,
- img, 0, 0);
+ srcWidth, srcHeight,
+ srcFormat, srcType,
+ img, 0, 0);
for (row = 0; row < srcHeight; row++) {
- GLubyte stencil[MAX_WIDTH];
+ GLuint depth[MAX_WIDTH];
+ GLubyte stencil[MAX_WIDTH];
GLint i;
- /* the 24 depth bits will be in the high position: */
- _mesa_unpack_depth_span(ctx, srcWidth,
- GL_UNSIGNED_INT_24_8_EXT, /* dst type */
- dstRow, /* dst addr */
- depthScale,
- srcType, src, srcPacking);
- /* get the 8-bit stencil values */
- _mesa_unpack_stencil_span(ctx, srcWidth,
- GL_UNSIGNED_BYTE, /* dst type */
- stencil, /* dst addr */
- srcType, src, srcPacking,
- ctx->_ImageTransferState);
- /* merge stencil values into depth values */
- for (i = 0; i < srcWidth; i++)
- dstRow[i] |= stencil[i];
+ GLboolean keepdepth = GL_FALSE, keepstencil = GL_FALSE;
+
+ if (srcFormat == GL_DEPTH_COMPONENT) { /* preserve stencil */
+ keepstencil = GL_TRUE;
+ }
+ else if (srcFormat == GL_STENCIL_INDEX) { /* preserve depth */
+ keepdepth = GL_TRUE;
+ }
+
+ if (keepdepth == GL_FALSE)
+ /* the 24 depth bits will be in the low position: */
+ _mesa_unpack_depth_span(ctx, srcWidth,
+ GL_UNSIGNED_INT, /* dst type */
+ keepstencil ? depth : dstRow, /* dst addr */
+ depthScale,
+ srcType, src, srcPacking);
+
+ if (keepstencil == GL_FALSE)
+ /* get the 8-bit stencil values */
+ _mesa_unpack_stencil_span(ctx, srcWidth,
+ GL_UNSIGNED_BYTE, /* dst type */
+ stencil, /* dst addr */
+ srcType, src, srcPacking,
+ ctx->_ImageTransferState);
+
+ for (i = 0; i < srcWidth; i++) {
+ if (keepstencil)
+ dstRow[i] = depth[i] << 8 | (dstRow[i] & 0x000000FF);
+ else
+ dstRow[i] = (dstRow[i] & 0xFFFFFF00) | (stencil[i] & 0xFF);
+ }
src += srcRowStride;
dstRow += dstRowStride / sizeof(GLuint);
@@ -3006,58 +2999,108 @@ _mesa_texstore_s8_z24(TEXSTORE_PARAMS)
GLint img, row;
ASSERT(dstFormat == MESA_FORMAT_S8_Z24);
- ASSERT(srcFormat == GL_DEPTH_STENCIL_EXT || srcFormat == GL_DEPTH_COMPONENT);
- ASSERT(srcFormat != GL_DEPTH_STENCIL_EXT || srcType == GL_UNSIGNED_INT_24_8_EXT);
+ ASSERT(srcFormat == GL_DEPTH_STENCIL_EXT ||
+ srcFormat == GL_DEPTH_COMPONENT ||
+ srcFormat == GL_STENCIL_INDEX);
+ ASSERT(srcFormat != GL_DEPTH_STENCIL_EXT ||
+ srcType == GL_UNSIGNED_INT_24_8_EXT);
- /* In case we only upload depth we need to preserve the stencil */
- if (srcFormat == GL_DEPTH_COMPONENT) {
- for (img = 0; img < srcDepth; img++) {
- GLuint *dstRow = (GLuint *) dstAddr
- + dstImageOffsets[dstZoffset + img]
- + dstYoffset * dstRowStride / sizeof(GLuint)
- + dstXoffset;
- const GLuint *src
- = (const GLuint *) _mesa_image_address(dims, srcPacking, srcAddr,
- srcWidth, srcHeight,
- srcFormat, srcType,
- img, 0, 0);
- for (row = 0; row < srcHeight; row++) {
- GLuint depth[MAX_WIDTH];
- GLint i;
- _mesa_unpack_depth_span(ctx, srcWidth,
- GL_UNSIGNED_INT, /* dst type */
- depth, /* dst addr */
- depthScale,
- srcType, src, srcPacking);
+ for (img = 0; img < srcDepth; img++) {
+ GLuint *dstRow = (GLuint *) dstAddr
+ + dstImageOffsets[dstZoffset + img]
+ + dstYoffset * dstRowStride / sizeof(GLuint)
+ + dstXoffset;
+ const GLuint *src
+ = (const GLuint *) _mesa_image_address(dims, srcPacking, srcAddr,
+ srcWidth, srcHeight,
+ srcFormat, srcType,
+ img, 0, 0);
+ for (row = 0; row < srcHeight; row++) {
+ GLuint depth[MAX_WIDTH];
+ GLubyte stencil[MAX_WIDTH];
+ GLint i;
+ GLboolean keepdepth = GL_FALSE, keepstencil = GL_FALSE;
+
+ if (srcFormat == GL_DEPTH_COMPONENT) { /* preserve stencil */
+ keepstencil = GL_TRUE;
+ }
+ else if (srcFormat == GL_STENCIL_INDEX) { /* preserve depth */
+ keepdepth = GL_TRUE;
+ }
- for (i = 0; i < srcWidth; i++)
- dstRow[i] = depth[i] | (dstRow[i] & 0xFF000000);
+ if (keepdepth == GL_FALSE)
+ /* the 24 depth bits will be in the low position: */
+ _mesa_unpack_depth_span(ctx, srcWidth,
+ GL_UNSIGNED_INT, /* dst type */
+ keepstencil ? depth : dstRow, /* dst addr */
+ depthScale,
+ srcType, src, srcPacking);
+
+ if (keepstencil == GL_FALSE)
+ /* get the 8-bit stencil values */
+ _mesa_unpack_stencil_span(ctx, srcWidth,
+ GL_UNSIGNED_BYTE, /* dst type */
+ stencil, /* dst addr */
+ srcType, src, srcPacking,
+ ctx->_ImageTransferState);
+
+ /* merge stencil values into depth values */
+ for (i = 0; i < srcWidth; i++) {
+ if (keepstencil)
+ dstRow[i] = depth[i] | (dstRow[i] & 0xFF000000);
+ else
+ dstRow[i] = (dstRow[i] & 0xFFFFFF) | (stencil[i] << 24);
- src += srcRowStride;
- dstRow += dstRowStride / sizeof(GLuint);
- }
+ }
+ src += srcRowStride;
+ dstRow += dstRowStride / sizeof(GLuint);
}
}
+ return GL_TRUE;
+}
+
+
+/**
+ * Store simple 8-bit/value stencil texture data.
+ */
+static GLboolean
+_mesa_texstore_s8(TEXSTORE_PARAMS)
+{
+ ASSERT(dstFormat == MESA_FORMAT_S8);
+ ASSERT(srcFormat == GL_STENCIL_INDEX);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == srcFormat &&
+ srcType == GL_UNSIGNED_BYTE) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
else {
+ const GLint srcRowStride
+ = _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType)
+ / sizeof(GLuint);
+ GLint img, row;
+
for (img = 0; img < srcDepth; img++) {
- GLuint *dstRow = (GLuint *) dstAddr
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ dstImageOffsets[dstZoffset + img]
+ dstYoffset * dstRowStride / sizeof(GLuint)
+ dstXoffset;
const GLuint *src
= (const GLuint *) _mesa_image_address(dims, srcPacking, srcAddr,
- srcWidth, srcHeight,
- srcFormat, srcType,
- img, 0, 0);
+ srcWidth, srcHeight,
+ srcFormat, srcType,
+ img, 0, 0);
for (row = 0; row < srcHeight; row++) {
GLubyte stencil[MAX_WIDTH];
GLint i;
- /* the 24 depth bits will be in the low position: */
- _mesa_unpack_depth_span(ctx, srcWidth,
- GL_UNSIGNED_INT, /* dst type */
- dstRow, /* dst addr */
- depthScale,
- srcType, src, srcPacking);
+
/* get the 8-bit stencil values */
_mesa_unpack_stencil_span(ctx, srcWidth,
GL_UNSIGNED_BYTE, /* dst type */
@@ -3066,16 +3109,19 @@ _mesa_texstore_s8_z24(TEXSTORE_PARAMS)
ctx->_ImageTransferState);
/* merge stencil values into depth values */
for (i = 0; i < srcWidth; i++)
- dstRow[i] |= stencil[i] << 24;
+ dstRow[i] = stencil[i];
src += srcRowStride;
- dstRow += dstRowStride / sizeof(GLuint);
+ dstRow += dstRowStride / sizeof(GLubyte);
}
}
+
}
+
return GL_TRUE;
}
+
/**
* Store an image in any of the formats:
* _mesa_texformat_rgba_float32
@@ -3150,6 +3196,7 @@ _mesa_texstore_rgba_float32(TEXSTORE_PARAMS)
}
+
/**
* As above, but store 16-bit floats.
*/
@@ -3613,12 +3660,12 @@ _mesa_texstore_srgb8(TEXSTORE_PARAMS)
newDstFormat = MESA_FORMAT_RGB888;
k = _mesa_texstore_rgb888(ctx, dims, baseInternalFormat,
- newDstFormat, dstAddr,
- dstXoffset, dstYoffset, dstZoffset,
- dstRowStride, dstImageOffsets,
- srcWidth, srcHeight, srcDepth,
- srcFormat, srcType,
- srcAddr, srcPacking);
+ newDstFormat, dstAddr,
+ dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride, dstImageOffsets,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType,
+ srcAddr, srcPacking);
return k;
}
@@ -3724,7 +3771,7 @@ _mesa_texstore_sla8(TEXSTORE_PARAMS)
/**
- * Table mapping MESA_FORMAT_8 to _mesa_texstore_*()
+ * Table mapping MESA_FORMAT_* to _mesa_texstore_*()
* XXX this is somewhat temporary.
*/
static const struct {
@@ -3772,7 +3819,7 @@ texstore_funcs[MESA_FORMAT_COUNT] =
{ MESA_FORMAT_X8_Z24, _mesa_texstore_x8_z24 },
{ MESA_FORMAT_Z24_X8, _mesa_texstore_z24_x8 },
{ MESA_FORMAT_Z32, _mesa_texstore_z32 },
- { MESA_FORMAT_S8, NULL/*_mesa_texstore_s8*/ },
+ { MESA_FORMAT_S8, _mesa_texstore_s8 },
{ MESA_FORMAT_SRGB8, _mesa_texstore_srgb8 },
{ MESA_FORMAT_SRGBA8, _mesa_texstore_srgba8 },
{ MESA_FORMAT_SARGB8, _mesa_texstore_sargb8 },
@@ -3894,7 +3941,7 @@ _mesa_texstore(TEXSTORE_PARAMS)
* The caller _must_ call _mesa_unmap_teximage_pbo() too!
*/
const GLvoid *
-_mesa_validate_pbo_teximage(GLcontext *ctx, GLuint dimensions,
+_mesa_validate_pbo_teximage(struct gl_context *ctx, GLuint dimensions,
GLsizei width, GLsizei height, GLsizei depth,
GLenum format, GLenum type, const GLvoid *pixels,
const struct gl_pixelstore_attrib *unpack,
@@ -3931,7 +3978,7 @@ _mesa_validate_pbo_teximage(GLcontext *ctx, GLuint dimensions,
* The caller _must_ call _mesa_unmap_teximage_pbo() too!
*/
const GLvoid *
-_mesa_validate_pbo_compressed_teximage(GLcontext *ctx,
+_mesa_validate_pbo_compressed_teximage(struct gl_context *ctx,
GLsizei imageSize, const GLvoid *pixels,
const struct gl_pixelstore_attrib *packing,
const char *funcName)
@@ -3965,7 +4012,7 @@ _mesa_validate_pbo_compressed_teximage(GLcontext *ctx,
* functions. It unmaps the PBO buffer if it was mapped earlier.
*/
void
-_mesa_unmap_teximage_pbo(GLcontext *ctx,
+_mesa_unmap_teximage_pbo(struct gl_context *ctx,
const struct gl_pixelstore_attrib *unpack)
{
if (_mesa_is_bufferobj(unpack->BufferObj)) {
@@ -4002,7 +4049,7 @@ texture_row_stride(const struct gl_texture_image *texImage)
* \sa _mesa_store_teximage2d()
*/
void
-_mesa_store_teximage1d(GLcontext *ctx, GLenum target, GLint level,
+_mesa_store_teximage1d(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -4056,7 +4103,7 @@ _mesa_store_teximage1d(GLcontext *ctx, GLenum target, GLint level,
* than VRAM. Device driver's can easily plug in their own replacement.
*/
void
-_mesa_store_teximage2d(GLcontext *ctx, GLenum target, GLint level,
+_mesa_store_teximage2d(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint border,
GLenum format, GLenum type, const void *pixels,
@@ -4109,7 +4156,7 @@ _mesa_store_teximage2d(GLcontext *ctx, GLenum target, GLint level,
* \sa _mesa_store_teximage2d()
*/
void
-_mesa_store_teximage3d(GLcontext *ctx, GLenum target, GLint level,
+_mesa_store_teximage3d(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint depth, GLint border,
GLenum format, GLenum type, const void *pixels,
@@ -4162,7 +4209,7 @@ _mesa_store_teximage3d(GLcontext *ctx, GLenum target, GLint level,
* and Driver.CopyTexSubImage1D().
*/
void
-_mesa_store_texsubimage1d(GLcontext *ctx, GLenum target, GLint level,
+_mesa_store_texsubimage1d(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint width,
GLenum format, GLenum type, const void *pixels,
const struct gl_pixelstore_attrib *packing,
@@ -4200,7 +4247,7 @@ _mesa_store_texsubimage1d(GLcontext *ctx, GLenum target, GLint level,
* and Driver.CopyTexSubImage2D().
*/
void
-_mesa_store_texsubimage2d(GLcontext *ctx, GLenum target, GLint level,
+_mesa_store_texsubimage2d(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLint width, GLint height,
GLenum format, GLenum type, const void *pixels,
@@ -4238,7 +4285,7 @@ _mesa_store_texsubimage2d(GLcontext *ctx, GLenum target, GLint level,
* and Driver.CopyTexSubImage3D().
*/
void
-_mesa_store_texsubimage3d(GLcontext *ctx, GLenum target, GLint level,
+_mesa_store_texsubimage3d(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLint width, GLint height, GLint depth,
GLenum format, GLenum type, const void *pixels,
@@ -4276,7 +4323,7 @@ _mesa_store_texsubimage3d(GLcontext *ctx, GLenum target, GLint level,
* Fallback for Driver.CompressedTexImage1D()
*/
void
-_mesa_store_compressed_teximage1d(GLcontext *ctx, GLenum target, GLint level,
+_mesa_store_compressed_teximage1d(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint border,
GLsizei imageSize, const GLvoid *data,
@@ -4299,7 +4346,7 @@ _mesa_store_compressed_teximage1d(GLcontext *ctx, GLenum target, GLint level,
* Fallback for Driver.CompressedTexImage2D()
*/
void
-_mesa_store_compressed_teximage2d(GLcontext *ctx, GLenum target, GLint level,
+_mesa_store_compressed_teximage2d(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint border,
GLsizei imageSize, const GLvoid *data,
@@ -4343,7 +4390,7 @@ _mesa_store_compressed_teximage2d(GLcontext *ctx, GLenum target, GLint level,
* Fallback for Driver.CompressedTexImage3D()
*/
void
-_mesa_store_compressed_teximage3d(GLcontext *ctx, GLenum target, GLint level,
+_mesa_store_compressed_teximage3d(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint depth,
GLint border,
@@ -4368,7 +4415,7 @@ _mesa_store_compressed_teximage3d(GLcontext *ctx, GLenum target, GLint level,
* Fallback for Driver.CompressedTexSubImage1D()
*/
void
-_mesa_store_compressed_texsubimage1d(GLcontext *ctx, GLenum target,
+_mesa_store_compressed_texsubimage1d(struct gl_context *ctx, GLenum target,
GLint level,
GLint xoffset, GLsizei width,
GLenum format,
@@ -4391,7 +4438,7 @@ _mesa_store_compressed_texsubimage1d(GLcontext *ctx, GLenum target,
* Fallback for Driver.CompressedTexSubImage2D()
*/
void
-_mesa_store_compressed_texsubimage2d(GLcontext *ctx, GLenum target,
+_mesa_store_compressed_texsubimage2d(struct gl_context *ctx, GLenum target,
GLint level,
GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height,
@@ -4452,7 +4499,7 @@ _mesa_store_compressed_texsubimage2d(GLcontext *ctx, GLenum target,
* Fallback for Driver.CompressedTexSubImage3D()
*/
void
-_mesa_store_compressed_texsubimage3d(GLcontext *ctx, GLenum target,
+_mesa_store_compressed_texsubimage3d(struct gl_context *ctx, GLenum target,
GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLsizei width, GLsizei height, GLsizei depth,
diff --git a/src/mesa/main/texstore.h b/src/mesa/main/texstore.h
index 3211086dd63..177ede423f5 100644
--- a/src/mesa/main/texstore.h
+++ b/src/mesa/main/texstore.h
@@ -56,7 +56,7 @@
* \param srcPacking source image packing parameters
*/
#define TEXSTORE_PARAMS \
- GLcontext *ctx, GLuint dims, \
+ struct gl_context *ctx, GLuint dims, \
GLenum baseInternalFormat, \
gl_format dstFormat, \
GLvoid *dstAddr, \
@@ -73,7 +73,7 @@ _mesa_texstore(TEXSTORE_PARAMS);
extern GLchan *
-_mesa_make_temp_chan_image(GLcontext *ctx, GLuint dims,
+_mesa_make_temp_chan_image(struct gl_context *ctx, GLuint dims,
GLenum logicalBaseFormat,
GLenum textureBaseFormat,
GLint srcWidth, GLint srcHeight, GLint srcDepth,
@@ -83,7 +83,7 @@ _mesa_make_temp_chan_image(GLcontext *ctx, GLuint dims,
extern void
-_mesa_store_teximage1d(GLcontext *ctx, GLenum target, GLint level,
+_mesa_store_teximage1d(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -93,7 +93,7 @@ _mesa_store_teximage1d(GLcontext *ctx, GLenum target, GLint level,
extern void
-_mesa_store_teximage2d(GLcontext *ctx, GLenum target, GLint level,
+_mesa_store_teximage2d(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -103,7 +103,7 @@ _mesa_store_teximage2d(GLcontext *ctx, GLenum target, GLint level,
extern void
-_mesa_store_teximage3d(GLcontext *ctx, GLenum target, GLint level,
+_mesa_store_teximage3d(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint depth, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -113,7 +113,7 @@ _mesa_store_teximage3d(GLcontext *ctx, GLenum target, GLint level,
extern void
-_mesa_store_texsubimage1d(GLcontext *ctx, GLenum target, GLint level,
+_mesa_store_texsubimage1d(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint width,
GLenum format, GLenum type, const GLvoid *pixels,
const struct gl_pixelstore_attrib *packing,
@@ -122,7 +122,7 @@ _mesa_store_texsubimage1d(GLcontext *ctx, GLenum target, GLint level,
extern void
-_mesa_store_texsubimage2d(GLcontext *ctx, GLenum target, GLint level,
+_mesa_store_texsubimage2d(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLint width, GLint height,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -132,7 +132,7 @@ _mesa_store_texsubimage2d(GLcontext *ctx, GLenum target, GLint level,
extern void
-_mesa_store_texsubimage3d(GLcontext *ctx, GLenum target, GLint level,
+_mesa_store_texsubimage3d(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLint width, GLint height, GLint depth,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -142,7 +142,7 @@ _mesa_store_texsubimage3d(GLcontext *ctx, GLenum target, GLint level,
extern void
-_mesa_store_compressed_teximage1d(GLcontext *ctx, GLenum target, GLint level,
+_mesa_store_compressed_teximage1d(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint border,
GLsizei imageSize, const GLvoid *data,
@@ -150,7 +150,7 @@ _mesa_store_compressed_teximage1d(GLcontext *ctx, GLenum target, GLint level,
struct gl_texture_image *texImage);
extern void
-_mesa_store_compressed_teximage2d(GLcontext *ctx, GLenum target, GLint level,
+_mesa_store_compressed_teximage2d(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint border,
GLsizei imageSize, const GLvoid *data,
@@ -158,7 +158,7 @@ _mesa_store_compressed_teximage2d(GLcontext *ctx, GLenum target, GLint level,
struct gl_texture_image *texImage);
extern void
-_mesa_store_compressed_teximage3d(GLcontext *ctx, GLenum target, GLint level,
+_mesa_store_compressed_teximage3d(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint depth,
GLint border,
@@ -168,7 +168,7 @@ _mesa_store_compressed_teximage3d(GLcontext *ctx, GLenum target, GLint level,
extern void
-_mesa_store_compressed_texsubimage1d(GLcontext *ctx, GLenum target,
+_mesa_store_compressed_texsubimage1d(struct gl_context *ctx, GLenum target,
GLint level,
GLint xoffset, GLsizei width,
GLenum format,
@@ -177,7 +177,7 @@ _mesa_store_compressed_texsubimage1d(GLcontext *ctx, GLenum target,
struct gl_texture_image *texImage);
extern void
-_mesa_store_compressed_texsubimage2d(GLcontext *ctx, GLenum target,
+_mesa_store_compressed_texsubimage2d(struct gl_context *ctx, GLenum target,
GLint level,
GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height,
@@ -187,7 +187,7 @@ _mesa_store_compressed_texsubimage2d(GLcontext *ctx, GLenum target,
struct gl_texture_image *texImage);
extern void
-_mesa_store_compressed_texsubimage3d(GLcontext *ctx, GLenum target,
+_mesa_store_compressed_texsubimage3d(struct gl_context *ctx, GLenum target,
GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLsizei width, GLsizei height, GLsizei depth,
@@ -198,20 +198,20 @@ _mesa_store_compressed_texsubimage3d(GLcontext *ctx, GLenum target,
extern const GLvoid *
-_mesa_validate_pbo_teximage(GLcontext *ctx, GLuint dimensions,
+_mesa_validate_pbo_teximage(struct gl_context *ctx, GLuint dimensions,
GLsizei width, GLsizei height, GLsizei depth,
GLenum format, GLenum type, const GLvoid *pixels,
const struct gl_pixelstore_attrib *unpack,
const char *funcName);
extern const GLvoid *
-_mesa_validate_pbo_compressed_teximage(GLcontext *ctx,
+_mesa_validate_pbo_compressed_teximage(struct gl_context *ctx,
GLsizei imageSize, const GLvoid *pixels,
const struct gl_pixelstore_attrib *packing,
const char *funcName);
extern void
-_mesa_unmap_teximage_pbo(GLcontext *ctx,
+_mesa_unmap_teximage_pbo(struct gl_context *ctx,
const struct gl_pixelstore_attrib *unpack);
diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c
index 5c8c1fd225f..d297b5ed712 100644
--- a/src/mesa/main/transformfeedback.c
+++ b/src/mesa/main/transformfeedback.c
@@ -95,7 +95,7 @@ reference_transform_feedback_object(struct gl_transform_feedback_object **ptr,
* \return GL_TRUE if the mode is OK, GL_FALSE otherwise.
*/
GLboolean
-_mesa_validate_primitive_mode(GLcontext *ctx, GLenum mode)
+_mesa_validate_primitive_mode(struct gl_context *ctx, GLenum mode)
{
if (ctx->TransformFeedback.CurrentObject->Active) {
switch (mode) {
@@ -120,7 +120,7 @@ _mesa_validate_primitive_mode(GLcontext *ctx, GLenum mode)
* \return GL_TRUE for success, GL_FALSE if error
*/
GLboolean
-_mesa_validate_transform_feedback_buffers(GLcontext *ctx)
+_mesa_validate_transform_feedback_buffers(struct gl_context *ctx)
{
/* XXX to do */
return GL_TRUE;
@@ -132,7 +132,7 @@ _mesa_validate_transform_feedback_buffers(GLcontext *ctx)
* Per-context init for transform feedback.
*/
void
-_mesa_init_transform_feedback(GLcontext *ctx)
+_mesa_init_transform_feedback(struct gl_context *ctx)
{
/* core mesa expects this, even a dummy one, to be available */
ASSERT(ctx->Driver.NewTransformFeedback);
@@ -162,7 +162,7 @@ _mesa_init_transform_feedback(GLcontext *ctx)
static void
delete_cb(GLuint key, void *data, void *userData)
{
- GLcontext *ctx = (GLcontext *) userData;
+ struct gl_context *ctx = (struct gl_context *) userData;
struct gl_transform_feedback_object *obj =
(struct gl_transform_feedback_object *) data;
@@ -174,7 +174,7 @@ delete_cb(GLuint key, void *data, void *userData)
* Per-context free/clean-up for transform feedback.
*/
void
-_mesa_free_transform_feedback(GLcontext *ctx)
+_mesa_free_transform_feedback(struct gl_context *ctx)
{
/* core mesa expects this, even a dummy one, to be available */
ASSERT(ctx->Driver.NewTransformFeedback);
@@ -200,15 +200,15 @@ _mesa_free_transform_feedback(GLcontext *ctx)
/* forward declarations */
static struct gl_transform_feedback_object *
-new_transform_feedback(GLcontext *ctx, GLuint name);
+new_transform_feedback(struct gl_context *ctx, GLuint name);
static void
-delete_transform_feedback(GLcontext *ctx,
+delete_transform_feedback(struct gl_context *ctx,
struct gl_transform_feedback_object *obj);
/* dummy per-context init/clean-up for transform feedback */
void
-_mesa_init_transform_feedback(GLcontext *ctx)
+_mesa_init_transform_feedback(struct gl_context *ctx)
{
ctx->TransformFeedback.DefaultObject = new_transform_feedback(ctx, 0);
ctx->TransformFeedback.CurrentObject = ctx->TransformFeedback.DefaultObject;
@@ -218,7 +218,7 @@ _mesa_init_transform_feedback(GLcontext *ctx)
}
void
-_mesa_free_transform_feedback(GLcontext *ctx)
+_mesa_free_transform_feedback(struct gl_context *ctx)
{
_mesa_reference_buffer_object(ctx,
&ctx->TransformFeedback.CurrentBuffer,
@@ -232,7 +232,7 @@ _mesa_free_transform_feedback(GLcontext *ctx)
/** Default fallback for ctx->Driver.NewTransformFeedback() */
static struct gl_transform_feedback_object *
-new_transform_feedback(GLcontext *ctx, GLuint name)
+new_transform_feedback(struct gl_context *ctx, GLuint name)
{
struct gl_transform_feedback_object *obj;
obj = CALLOC_STRUCT(gl_transform_feedback_object);
@@ -245,7 +245,7 @@ new_transform_feedback(GLcontext *ctx, GLuint name)
/** Default fallback for ctx->Driver.DeleteTransformFeedback() */
static void
-delete_transform_feedback(GLcontext *ctx,
+delete_transform_feedback(struct gl_context *ctx,
struct gl_transform_feedback_object *obj)
{
GLuint i;
@@ -263,7 +263,7 @@ delete_transform_feedback(GLcontext *ctx,
/** Default fallback for ctx->Driver.BeginTransformFeedback() */
static void
-begin_transform_feedback(GLcontext *ctx, GLenum mode,
+begin_transform_feedback(struct gl_context *ctx, GLenum mode,
struct gl_transform_feedback_object *obj)
{
/* nop */
@@ -271,7 +271,7 @@ begin_transform_feedback(GLcontext *ctx, GLenum mode,
/** Default fallback for ctx->Driver.EndTransformFeedback() */
static void
-end_transform_feedback(GLcontext *ctx,
+end_transform_feedback(struct gl_context *ctx,
struct gl_transform_feedback_object *obj)
{
/* nop */
@@ -279,7 +279,7 @@ end_transform_feedback(GLcontext *ctx,
/** Default fallback for ctx->Driver.PauseTransformFeedback() */
static void
-pause_transform_feedback(GLcontext *ctx,
+pause_transform_feedback(struct gl_context *ctx,
struct gl_transform_feedback_object *obj)
{
/* nop */
@@ -287,7 +287,7 @@ pause_transform_feedback(GLcontext *ctx,
/** Default fallback for ctx->Driver.ResumeTransformFeedback() */
static void
-resume_transform_feedback(GLcontext *ctx,
+resume_transform_feedback(struct gl_context *ctx,
struct gl_transform_feedback_object *obj)
{
/* nop */
@@ -295,7 +295,7 @@ resume_transform_feedback(GLcontext *ctx,
/** Default fallback for ctx->Driver.DrawTransformFeedback() */
static void
-draw_transform_feedback(GLcontext *ctx, GLenum mode,
+draw_transform_feedback(struct gl_context *ctx, GLenum mode,
struct gl_transform_feedback_object *obj)
{
/* XXX to do */
@@ -399,7 +399,7 @@ _mesa_EndTransformFeedback(void)
* Helper used by BindBufferRange() and BindBufferBase().
*/
static void
-bind_buffer_range(GLcontext *ctx, GLuint index,
+bind_buffer_range(struct gl_context *ctx, GLuint index,
struct gl_buffer_object *bufObj,
GLintptr offset, GLsizeiptr size)
{
@@ -698,7 +698,7 @@ _mesa_GetTransformFeedbackVarying(GLuint program, GLuint index,
static struct gl_transform_feedback_object *
-lookup_transform_feedback_object(GLcontext *ctx, GLuint name)
+lookup_transform_feedback_object(struct gl_context *ctx, GLuint name)
{
if (name == 0) {
return ctx->TransformFeedback.DefaultObject;
diff --git a/src/mesa/main/transformfeedback.h b/src/mesa/main/transformfeedback.h
index 4d38522d6d9..752cd4e201f 100644
--- a/src/mesa/main/transformfeedback.h
+++ b/src/mesa/main/transformfeedback.h
@@ -29,18 +29,18 @@
extern void
-_mesa_init_transform_feedback(GLcontext *ctx);
+_mesa_init_transform_feedback(struct gl_context *ctx);
extern void
-_mesa_free_transform_feedback(GLcontext *ctx);
+_mesa_free_transform_feedback(struct gl_context *ctx);
#if FEATURE_EXT_transform_feedback
extern GLboolean
-_mesa_validate_primitive_mode(GLcontext *ctx, GLenum mode);
+_mesa_validate_primitive_mode(struct gl_context *ctx, GLenum mode);
extern GLboolean
-_mesa_validate_transform_feedback_buffers(GLcontext *ctx);
+_mesa_validate_transform_feedback_buffers(struct gl_context *ctx);
extern void
@@ -106,13 +106,13 @@ _mesa_DrawTransformFeedback(GLenum mode, GLuint name);
#else /* FEATURE_EXT_transform_feedback */
static INLINE GLboolean
-_mesa_validate_primitive_mode(GLcontext *ctx, GLenum mode)
+_mesa_validate_primitive_mode(struct gl_context *ctx, GLenum mode)
{
return GL_TRUE;
}
static INLINE GLboolean
-_mesa_validate_transform_feedback_buffers(GLcontext *ctx)
+_mesa_validate_transform_feedback_buffers(struct gl_context *ctx)
{
return GL_TRUE;
}
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
index 87ce6e49388..b5bae0337b2 100644
--- a/src/mesa/main/uniforms.c
+++ b/src/mesa/main/uniforms.c
@@ -384,7 +384,7 @@ get_uniform_parameter(const struct gl_shader_program *shProg, GLuint index)
* Called by glGetActiveUniform().
*/
static void
-_mesa_get_active_uniform(GLcontext *ctx, GLuint program, GLuint index,
+_mesa_get_active_uniform(struct gl_context *ctx, GLuint program, GLuint index,
GLsizei maxLength, GLsizei *length, GLint *size,
GLenum *type, GLchar *nameOut)
{
@@ -527,7 +527,7 @@ get_uniform_rows_cols(const struct gl_program_parameter *p,
* to the shader program and return the program parameter position.
*/
static void
-lookup_uniform_parameter(GLcontext *ctx, GLuint program, GLint location,
+lookup_uniform_parameter(struct gl_context *ctx, GLuint program, GLint location,
struct gl_program **progOut, GLint *paramPosOut)
{
struct gl_shader_program *shProg
@@ -620,7 +620,7 @@ split_location_offset(GLint *location, GLint *offset)
* Called via glGetUniformfv().
*/
static void
-_mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location,
+_mesa_get_uniformfv(struct gl_context *ctx, GLuint program, GLint location,
GLfloat *params)
{
struct gl_program *prog;
@@ -653,7 +653,7 @@ _mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location,
* \sa _mesa_get_uniformfv, only difference is a cast.
*/
static void
-_mesa_get_uniformiv(GLcontext *ctx, GLuint program, GLint location,
+_mesa_get_uniformiv(struct gl_context *ctx, GLuint program, GLint location,
GLint *params)
{
struct gl_program *prog;
@@ -688,7 +688,7 @@ _mesa_get_uniformiv(GLcontext *ctx, GLuint program, GLint location,
* offset (used for arrays, structs).
*/
GLint
-_mesa_get_uniform_location(GLcontext *ctx, struct gl_shader_program *shProg,
+_mesa_get_uniform_location(struct gl_context *ctx, struct gl_shader_program *shProg,
const GLchar *name)
{
GLint offset = 0, location = -1;
@@ -837,7 +837,7 @@ compatible_types(GLenum userType, GLenum targetType)
* \param values the new values, of datatype 'type'
*/
static void
-set_program_uniform(GLcontext *ctx, struct gl_program *program,
+set_program_uniform(struct gl_context *ctx, struct gl_program *program,
GLint index, GLint offset,
GLenum type, GLsizei count, GLint elems,
const void *values)
@@ -980,7 +980,7 @@ set_program_uniform(GLcontext *ctx, struct gl_program *program,
* Called via glUniform*() functions.
*/
void
-_mesa_uniform(GLcontext *ctx, struct gl_shader_program *shProg,
+_mesa_uniform(struct gl_context *ctx, struct gl_shader_program *shProg,
GLint location, GLsizei count,
const GLvoid *values, GLenum type)
{
@@ -1084,7 +1084,7 @@ _mesa_uniform(GLcontext *ctx, struct gl_shader_program *shProg,
* Set a matrix-valued program parameter.
*/
static void
-set_program_uniform_matrix(GLcontext *ctx, struct gl_program *program,
+set_program_uniform_matrix(struct gl_context *ctx, struct gl_program *program,
GLuint index, GLuint offset,
GLuint count, GLuint rows, GLuint cols,
GLboolean transpose, const GLfloat *values)
@@ -1152,7 +1152,7 @@ set_program_uniform_matrix(GLcontext *ctx, struct gl_program *program,
* Note: cols=2, rows=4 ==> array[2] of vec4
*/
void
-_mesa_uniform_matrix(GLcontext *ctx, struct gl_shader_program *shProg,
+_mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg,
GLint cols, GLint rows,
GLint location, GLsizei count,
GLboolean transpose, const GLfloat *values)
@@ -1227,7 +1227,7 @@ void GLAPIENTRY
_mesa_Uniform1fARB(GLint location, GLfloat v0)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, &v0, GL_FLOAT);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, &v0, GL_FLOAT);
}
void GLAPIENTRY
@@ -1237,7 +1237,7 @@ _mesa_Uniform2fARB(GLint location, GLfloat v0, GLfloat v1)
GLfloat v[2];
v[0] = v0;
v[1] = v1;
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_FLOAT_VEC2);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_FLOAT_VEC2);
}
void GLAPIENTRY
@@ -1248,7 +1248,7 @@ _mesa_Uniform3fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
v[0] = v0;
v[1] = v1;
v[2] = v2;
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_FLOAT_VEC3);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_FLOAT_VEC3);
}
void GLAPIENTRY
@@ -1261,14 +1261,14 @@ _mesa_Uniform4fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2,
v[1] = v1;
v[2] = v2;
v[3] = v3;
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_FLOAT_VEC4);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_FLOAT_VEC4);
}
void GLAPIENTRY
_mesa_Uniform1iARB(GLint location, GLint v0)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, &v0, GL_INT);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, &v0, GL_INT);
}
void GLAPIENTRY
@@ -1278,7 +1278,7 @@ _mesa_Uniform2iARB(GLint location, GLint v0, GLint v1)
GLint v[2];
v[0] = v0;
v[1] = v1;
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_INT_VEC2);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_INT_VEC2);
}
void GLAPIENTRY
@@ -1289,7 +1289,7 @@ _mesa_Uniform3iARB(GLint location, GLint v0, GLint v1, GLint v2)
v[0] = v0;
v[1] = v1;
v[2] = v2;
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_INT_VEC3);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_INT_VEC3);
}
void GLAPIENTRY
@@ -1301,63 +1301,63 @@ _mesa_Uniform4iARB(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
v[1] = v1;
v[2] = v2;
v[3] = v3;
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_INT_VEC4);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_INT_VEC4);
}
void GLAPIENTRY
_mesa_Uniform1fvARB(GLint location, GLsizei count, const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_FLOAT);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT);
}
void GLAPIENTRY
_mesa_Uniform2fvARB(GLint location, GLsizei count, const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_FLOAT_VEC2);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT_VEC2);
}
void GLAPIENTRY
_mesa_Uniform3fvARB(GLint location, GLsizei count, const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_FLOAT_VEC3);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT_VEC3);
}
void GLAPIENTRY
_mesa_Uniform4fvARB(GLint location, GLsizei count, const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_FLOAT_VEC4);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT_VEC4);
}
void GLAPIENTRY
_mesa_Uniform1ivARB(GLint location, GLsizei count, const GLint * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_INT);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT);
}
void GLAPIENTRY
_mesa_Uniform2ivARB(GLint location, GLsizei count, const GLint * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_INT_VEC2);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT_VEC2);
}
void GLAPIENTRY
_mesa_Uniform3ivARB(GLint location, GLsizei count, const GLint * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_INT_VEC3);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT_VEC3);
}
void GLAPIENTRY
_mesa_Uniform4ivARB(GLint location, GLsizei count, const GLint * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_INT_VEC4);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT_VEC4);
}
@@ -1366,7 +1366,7 @@ void GLAPIENTRY
_mesa_Uniform1ui(GLint location, GLuint v0)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, &v0, GL_UNSIGNED_INT);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, &v0, GL_UNSIGNED_INT);
}
void GLAPIENTRY
@@ -1376,7 +1376,7 @@ _mesa_Uniform2ui(GLint location, GLuint v0, GLuint v1)
GLuint v[2];
v[0] = v0;
v[1] = v1;
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_UNSIGNED_INT_VEC2);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC2);
}
void GLAPIENTRY
@@ -1387,7 +1387,7 @@ _mesa_Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
v[0] = v0;
v[1] = v1;
v[2] = v2;
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_UNSIGNED_INT_VEC3);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC3);
}
void GLAPIENTRY
@@ -1399,35 +1399,35 @@ _mesa_Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
v[1] = v1;
v[2] = v2;
v[3] = v3;
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_UNSIGNED_INT_VEC4);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC4);
}
void GLAPIENTRY
_mesa_Uniform1uiv(GLint location, GLsizei count, const GLuint *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_UNSIGNED_INT);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT);
}
void GLAPIENTRY
_mesa_Uniform2uiv(GLint location, GLsizei count, const GLuint *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_UNSIGNED_INT_VEC2);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC2);
}
void GLAPIENTRY
_mesa_Uniform3uiv(GLint location, GLsizei count, const GLuint *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_UNSIGNED_INT_VEC3);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC3);
}
void GLAPIENTRY
_mesa_Uniform4uiv(GLint location, GLsizei count, const GLuint *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_UNSIGNED_INT_VEC4);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC4);
}
@@ -1437,7 +1437,7 @@ _mesa_UniformMatrix2fvARB(GLint location, GLsizei count, GLboolean transpose,
const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
2, 2, location, count, transpose, value);
}
@@ -1446,7 +1446,7 @@ _mesa_UniformMatrix3fvARB(GLint location, GLsizei count, GLboolean transpose,
const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
3, 3, location, count, transpose, value);
}
@@ -1455,7 +1455,7 @@ _mesa_UniformMatrix4fvARB(GLint location, GLsizei count, GLboolean transpose,
const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
4, 4, location, count, transpose, value);
}
@@ -1468,7 +1468,7 @@ _mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
2, 3, location, count, transpose, value);
}
@@ -1477,7 +1477,7 @@ _mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
3, 2, location, count, transpose, value);
}
@@ -1486,7 +1486,7 @@ _mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
2, 4, location, count, transpose, value);
}
@@ -1495,7 +1495,7 @@ _mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
4, 2, location, count, transpose, value);
}
@@ -1504,7 +1504,7 @@ _mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
3, 4, location, count, transpose, value);
}
@@ -1513,7 +1513,7 @@ _mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
4, 3, location, count, transpose, value);
}
diff --git a/src/mesa/main/uniforms.h b/src/mesa/main/uniforms.h
index ac2cf30d97e..64474363051 100644
--- a/src/mesa/main/uniforms.h
+++ b/src/mesa/main/uniforms.h
@@ -152,16 +152,16 @@ extern GLint GLAPIENTRY
_mesa_GetUniformLocationARB(GLhandleARB, const GLcharARB *);
GLint
-_mesa_get_uniform_location(GLcontext *ctx, struct gl_shader_program *shProg,
+_mesa_get_uniform_location(struct gl_context *ctx, struct gl_shader_program *shProg,
const GLchar *name);
void
-_mesa_uniform(GLcontext *ctx, struct gl_shader_program *shader_program,
+_mesa_uniform(struct gl_context *ctx, struct gl_shader_program *shader_program,
GLint location, GLsizei count,
const GLvoid *values, GLenum type);
void
-_mesa_uniform_matrix(GLcontext *ctx, struct gl_shader_program *shProg,
+_mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg,
GLint cols, GLint rows,
GLint location, GLsizei count,
GLboolean transpose, const GLfloat *values);
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index d19de7ff62a..56749355cdf 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -54,7 +54,7 @@
* \param ptr the address (or offset inside VBO) of the array data
*/
static void
-update_array(GLcontext *ctx, struct gl_client_array *array,
+update_array(struct gl_context *ctx, struct gl_client_array *array,
GLbitfield dirtyBit, GLsizei elementSize,
GLint size, GLenum type, GLenum format,
GLsizei stride, GLboolean normalized, const GLvoid *ptr)
@@ -778,7 +778,7 @@ _mesa_DisableVertexAttribArrayARB(GLuint index)
* not handle the 4-element GL_CURRENT_VERTEX_ATTRIB_ARB query.
*/
static GLuint
-get_vertex_array_attrib(GLcontext *ctx, GLuint index, GLenum pname,
+get_vertex_array_attrib(struct gl_context *ctx, GLuint index, GLenum pname,
const char *caller)
{
const struct gl_client_array *array;
@@ -1315,15 +1315,16 @@ _mesa_MultiModeDrawElementsIBM( const GLenum * mode, const GLsizei * count,
/**
- * GL 3.1 glPrimitiveRestartIndex().
+ * GL_NV_primitive_restart and GL 3.1
*/
void GLAPIENTRY
_mesa_PrimitiveRestartIndex(GLuint index)
{
GET_CURRENT_CONTEXT(ctx);
- if (ctx->VersionMajor * 10 + ctx->VersionMinor < 31) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glPrimitiveRestartIndex()");
+ if (!ctx->Extensions.NV_primitive_restart &&
+ ctx->VersionMajor * 10 + ctx->VersionMinor < 31) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glPrimitiveRestartIndexNV()");
return;
}
@@ -1339,7 +1340,7 @@ _mesa_PrimitiveRestartIndex(GLuint index)
* Copy one client vertex array to another.
*/
void
-_mesa_copy_client_array(GLcontext *ctx,
+_mesa_copy_client_array(struct gl_context *ctx,
struct gl_client_array *dst,
struct gl_client_array *src)
{
@@ -1380,7 +1381,7 @@ print_array(const char *name, GLint index, const struct gl_client_array *array)
* Print current vertex object/array info. For debug.
*/
void
-_mesa_print_arrays(GLcontext *ctx)
+_mesa_print_arrays(struct gl_context *ctx)
{
struct gl_array_object *arrayObj = ctx->Array.ArrayObj;
GLuint i;
@@ -1408,7 +1409,7 @@ _mesa_print_arrays(GLcontext *ctx)
* Initialize vertex array state for given context.
*/
void
-_mesa_init_varray(GLcontext *ctx)
+_mesa_init_varray(struct gl_context *ctx)
{
ctx->Array.DefaultArrayObj = _mesa_new_array_object(ctx, 0);
_mesa_reference_array_object(ctx, &ctx->Array.ArrayObj,
@@ -1426,7 +1427,7 @@ static void
delete_arrayobj_cb(GLuint id, void *data, void *userData)
{
struct gl_array_object *arrayObj = (struct gl_array_object *) data;
- GLcontext *ctx = (GLcontext *) userData;
+ struct gl_context *ctx = (struct gl_context *) userData;
_mesa_delete_array_object(ctx, arrayObj);
}
@@ -1435,7 +1436,7 @@ delete_arrayobj_cb(GLuint id, void *data, void *userData)
* Free vertex array state for given context.
*/
void
-_mesa_free_varray_data(GLcontext *ctx)
+_mesa_free_varray_data(struct gl_context *ctx)
{
_mesa_HashDeleteAll(ctx->Array.Objects, delete_arrayobj_cb, ctx);
_mesa_DeleteHashTable(ctx->Array.Objects);
diff --git a/src/mesa/main/varray.h b/src/mesa/main/varray.h
index c7c3e3ec70c..a5fa33fa00e 100644
--- a/src/mesa/main/varray.h
+++ b/src/mesa/main/varray.h
@@ -216,19 +216,19 @@ _mesa_PrimitiveRestartIndex(GLuint index);
extern void
-_mesa_copy_client_array(GLcontext *ctx,
+_mesa_copy_client_array(struct gl_context *ctx,
struct gl_client_array *dst,
struct gl_client_array *src);
extern void
-_mesa_print_arrays(GLcontext *ctx);
+_mesa_print_arrays(struct gl_context *ctx);
extern void
-_mesa_init_varray( GLcontext * ctx );
+_mesa_init_varray( struct gl_context * ctx );
extern void
-_mesa_free_varray_data(GLcontext *ctx);
+_mesa_free_varray_data(struct gl_context *ctx);
#else
diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c
index 692e8733c60..69a28da84c6 100644
--- a/src/mesa/main/version.c
+++ b/src/mesa/main/version.c
@@ -32,7 +32,7 @@
* Return major and minor version numbers.
*/
static void
-compute_version(GLcontext *ctx)
+compute_version(struct gl_context *ctx)
{
GLuint major, minor;
static const int max = 100;
@@ -187,7 +187,7 @@ compute_version(GLcontext *ctx)
}
static void
-compute_version_es1(GLcontext *ctx)
+compute_version_es1(struct gl_context *ctx)
{
static const int max = 100;
@@ -223,7 +223,7 @@ compute_version_es1(GLcontext *ctx)
}
static void
-compute_version_es2(GLcontext *ctx)
+compute_version_es2(struct gl_context *ctx)
{
static const int max = 100;
@@ -264,7 +264,7 @@ compute_version_es2(GLcontext *ctx)
* or to perform version check for GLX_ARB_create_context_profile.
*/
void
-_mesa_compute_version(GLcontext *ctx)
+_mesa_compute_version(struct gl_context *ctx)
{
if (ctx->VersionMajor)
return;
diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h
index 004036de98d..6552a3a7843 100644
--- a/src/mesa/main/version.h
+++ b/src/mesa/main/version.h
@@ -54,7 +54,7 @@
extern void
-_mesa_compute_version(GLcontext *ctx);
+_mesa_compute_version(struct gl_context *ctx);
#endif /* VERSION_H */
diff --git a/src/mesa/main/viewport.c b/src/mesa/main/viewport.c
index 309308c983b..4747022d0b4 100644
--- a/src/mesa/main/viewport.c
+++ b/src/mesa/main/viewport.c
@@ -60,7 +60,7 @@ _mesa_Viewport(GLint x, GLint y, GLsizei width, GLsizei height)
* \param height height of the viewport rectangle.
*/
void
-_mesa_set_viewport(GLcontext *ctx, GLint x, GLint y,
+_mesa_set_viewport(struct gl_context *ctx, GLint x, GLint y,
GLsizei width, GLsizei height)
{
if (MESA_VERBOSE & VERBOSE_API)
@@ -151,7 +151,7 @@ _mesa_DepthRange(GLclampd nearval, GLclampd farval)
* Initialize the context viewport attribute group.
* \param ctx the GL context.
*/
-void _mesa_init_viewport(GLcontext *ctx)
+void _mesa_init_viewport(struct gl_context *ctx)
{
GLfloat depthMax = 65535.0F; /* sorf of arbitrary */
@@ -173,7 +173,7 @@ void _mesa_init_viewport(GLcontext *ctx)
* Free the context viewport attribute group data.
* \param ctx the GL context.
*/
-void _mesa_free_viewport_data(GLcontext *ctx)
+void _mesa_free_viewport_data(struct gl_context *ctx)
{
_math_matrix_dtr(&ctx->Viewport._WindowMap);
}
diff --git a/src/mesa/main/viewport.h b/src/mesa/main/viewport.h
index ec054a7c597..ccfa37588b8 100644
--- a/src/mesa/main/viewport.h
+++ b/src/mesa/main/viewport.h
@@ -35,7 +35,7 @@ _mesa_Viewport(GLint x, GLint y, GLsizei width, GLsizei height);
extern void
-_mesa_set_viewport(GLcontext *ctx, GLint x, GLint y,
+_mesa_set_viewport(struct gl_context *ctx, GLint x, GLint y,
GLsizei width, GLsizei height);
@@ -44,11 +44,11 @@ _mesa_DepthRange(GLclampd nearval, GLclampd farval);
extern void
-_mesa_init_viewport(GLcontext *ctx);
+_mesa_init_viewport(struct gl_context *ctx);
extern void
-_mesa_free_viewport_data(GLcontext *ctx);
+_mesa_free_viewport_data(struct gl_context *ctx);
#endif
diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c
index ca352e88e6b..9236bf81a20 100644
--- a/src/mesa/main/vtxfmt.c
+++ b/src/mesa/main/vtxfmt.c
@@ -34,51 +34,11 @@
#include "vtxfmt.h"
#include "eval.h"
#include "dlist.h"
+#include "main/dispatch.h"
#if FEATURE_beginend
-
-/* The neutral vertex format. This wraps all tnl module functions,
- * verifying that the currently-installed module is valid and then
- * installing the function pointers in a lazy fashion. It records the
- * function pointers that have been swapped out, which allows a fast
- * restoration of the neutral module in almost all cases -- a typical
- * app might only require 4-6 functions to be modified from the neutral
- * baseline, and only restoring these is certainly preferable to doing
- * the entire module's 60 or so function pointers.
- */
-
-#define PRE_LOOPBACK( FUNC ) \
-{ \
- GET_CURRENT_CONTEXT(ctx); \
- struct gl_tnl_module * const tnl = &(ctx->TnlModule); \
- const int tmp_offset = _gloffset_ ## FUNC ; \
- \
- ASSERT( tnl->Current ); \
- ASSERT( tnl->SwapCount < NUM_VERTEX_FORMAT_ENTRIES ); \
- ASSERT( tmp_offset >= 0 ); \
- \
- if (tnl->SwapCount == 0) \
- ctx->Driver.BeginVertices( ctx ); \
- \
- /* Save the swapped function's dispatch entry so it can be */ \
- /* restored later. */ \
- tnl->Swapped[tnl->SwapCount].location = & (((_glapi_proc *)ctx->Exec)[tmp_offset]); \
- tnl->Swapped[tnl->SwapCount].function = (_glapi_proc)TAG(FUNC); \
- tnl->SwapCount++; \
- \
- if ( 0 ) \
- _mesa_debug(ctx, " swapping gl" #FUNC"...\n" ); \
- \
- /* Install the tnl function pointer. */ \
- SET_ ## FUNC(ctx->Exec, tnl->Current->FUNC); \
-}
-
-#define TAG(x) neutral_##x
-#include "vtxfmt_tmp.h"
-
-
/**
* Use the per-vertex functions found in <vfmt> to initialze the given
* API dispatch table.
@@ -132,7 +92,10 @@ install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt )
SET_Begin(tab, vfmt->Begin);
SET_End(tab, vfmt->End);
+ SET_PrimitiveRestartNV(tab, vfmt->PrimitiveRestartNV);
+
SET_Rectf(tab, vfmt->Rectf);
+
SET_DrawArrays(tab, vfmt->DrawArrays);
SET_DrawElements(tab, vfmt->DrawElements);
SET_DrawRangeElements(tab, vfmt->DrawRangeElements);
@@ -165,38 +128,17 @@ install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt )
}
-void _mesa_init_exec_vtxfmt( GLcontext *ctx )
+void _mesa_install_exec_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt )
{
- install_vtxfmt( ctx->Exec, &neutral_vtxfmt );
- ctx->TnlModule.SwapCount = 0;
+ if (ctx->API == API_OPENGL)
+ install_vtxfmt( ctx->Exec, vfmt );
}
-void _mesa_install_exec_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt )
+void _mesa_install_save_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt )
{
- ctx->TnlModule.Current = vfmt;
- _mesa_restore_exec_vtxfmt( ctx );
-}
-
-
-void _mesa_install_save_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt )
-{
- install_vtxfmt( ctx->Save, vfmt );
-}
-
-
-void _mesa_restore_exec_vtxfmt( GLcontext *ctx )
-{
- struct gl_tnl_module *tnl = &(ctx->TnlModule);
- GLuint i;
-
- /* Restore the neutral tnl module wrapper.
- */
- for ( i = 0 ; i < tnl->SwapCount ; i++ ) {
- *(tnl->Swapped[i].location) = tnl->Swapped[i].function;
- }
-
- tnl->SwapCount = 0;
+ if (ctx->API == API_OPENGL)
+ install_vtxfmt( ctx->Save, vfmt );
}
diff --git a/src/mesa/main/vtxfmt.h b/src/mesa/main/vtxfmt.h
index aad38b87c35..147385cee96 100644
--- a/src/mesa/main/vtxfmt.h
+++ b/src/mesa/main/vtxfmt.h
@@ -38,32 +38,18 @@
#if FEATURE_beginend
-extern void _mesa_init_exec_vtxfmt( GLcontext *ctx );
-
-extern void _mesa_install_exec_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt );
-extern void _mesa_install_save_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt );
-
-extern void _mesa_restore_exec_vtxfmt( GLcontext *ctx );
+extern void _mesa_install_exec_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt );
+extern void _mesa_install_save_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt );
#else /* FEATURE_beginend */
static INLINE void
-_mesa_init_exec_vtxfmt( GLcontext *ctx )
-{
-}
-
-static INLINE void
-_mesa_install_exec_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt )
-{
-}
-
-static INLINE void
-_mesa_install_save_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt )
+_mesa_install_exec_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt )
{
}
static INLINE void
-_mesa_restore_exec_vtxfmt( GLcontext *ctx )
+_mesa_install_save_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt )
{
}
diff --git a/src/mesa/main/vtxfmt_tmp.h b/src/mesa/main/vtxfmt_tmp.h
deleted file mode 100644
index 9ec6ea49aa2..00000000000
--- a/src/mesa/main/vtxfmt_tmp.h
+++ /dev/null
@@ -1,603 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.3
- *
- * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- * Gareth Hughes
- */
-
-#ifndef PRE_LOOPBACK
-#define PRE_LOOPBACK( FUNC )
-#endif
-
-#include "main/dispatch.h"
-
-static void GLAPIENTRY TAG(ArrayElement)( GLint i )
-{
- PRE_LOOPBACK( ArrayElement );
- CALL_ArrayElement(GET_DISPATCH(), ( i ));
-}
-
-static void GLAPIENTRY TAG(Color3f)( GLfloat r, GLfloat g, GLfloat b )
-{
- PRE_LOOPBACK( Color3f );
- CALL_Color3f(GET_DISPATCH(), ( r, g, b ));
-}
-
-static void GLAPIENTRY TAG(Color3fv)( const GLfloat *v )
-{
- PRE_LOOPBACK( Color3fv );
- CALL_Color3fv(GET_DISPATCH(), ( v ));
-}
-
-static void GLAPIENTRY TAG(Color4f)( GLfloat r, GLfloat g, GLfloat b, GLfloat a )
-{
- PRE_LOOPBACK( Color4f );
- CALL_Color4f(GET_DISPATCH(), ( r, g, b, a ));
-}
-
-static void GLAPIENTRY TAG(Color4fv)( const GLfloat *v )
-{
- PRE_LOOPBACK( Color4fv );
- CALL_Color4fv(GET_DISPATCH(), ( v ));
-}
-
-static void GLAPIENTRY TAG(EdgeFlag)( GLboolean e )
-{
- PRE_LOOPBACK( EdgeFlag );
- CALL_EdgeFlag(GET_DISPATCH(), ( e ));
-}
-
-static void GLAPIENTRY TAG(EvalCoord1f)( GLfloat s )
-{
- PRE_LOOPBACK( EvalCoord1f );
- CALL_EvalCoord1f(GET_DISPATCH(), ( s ));
-}
-
-static void GLAPIENTRY TAG(EvalCoord1fv)( const GLfloat *v )
-{
- PRE_LOOPBACK( EvalCoord1fv );
- CALL_EvalCoord1fv(GET_DISPATCH(), ( v ));
-}
-
-static void GLAPIENTRY TAG(EvalCoord2f)( GLfloat s, GLfloat t )
-{
- PRE_LOOPBACK( EvalCoord2f );
- CALL_EvalCoord2f(GET_DISPATCH(), ( s, t ));
-}
-
-static void GLAPIENTRY TAG(EvalCoord2fv)( const GLfloat *v )
-{
- PRE_LOOPBACK( EvalCoord2fv );
- CALL_EvalCoord2fv(GET_DISPATCH(), ( v ));
-}
-
-static void GLAPIENTRY TAG(EvalPoint1)( GLint i )
-{
- PRE_LOOPBACK( EvalPoint1 );
- CALL_EvalPoint1(GET_DISPATCH(), ( i ));
-}
-
-static void GLAPIENTRY TAG(EvalPoint2)( GLint i, GLint j )
-{
- PRE_LOOPBACK( EvalPoint2 );
- CALL_EvalPoint2(GET_DISPATCH(), ( i, j ));
-}
-
-static void GLAPIENTRY TAG(FogCoordfEXT)( GLfloat f )
-{
- PRE_LOOPBACK( FogCoordfEXT );
- CALL_FogCoordfEXT(GET_DISPATCH(), ( f ));
-}
-
-static void GLAPIENTRY TAG(FogCoordfvEXT)( const GLfloat *v )
-{
- PRE_LOOPBACK( FogCoordfvEXT );
- CALL_FogCoordfvEXT(GET_DISPATCH(), ( v ));
-}
-
-static void GLAPIENTRY TAG(Indexf)( GLfloat f )
-{
- PRE_LOOPBACK( Indexf );
- CALL_Indexf(GET_DISPATCH(), ( f ));
-}
-
-static void GLAPIENTRY TAG(Indexfv)( const GLfloat *v )
-{
- PRE_LOOPBACK( Indexfv );
- CALL_Indexfv(GET_DISPATCH(), ( v ));
-}
-
-static void GLAPIENTRY TAG(Materialfv)( GLenum face, GLenum pname, const GLfloat *v )
-{
- PRE_LOOPBACK( Materialfv );
- CALL_Materialfv(GET_DISPATCH(), ( face, pname, v ));
-}
-
-static void GLAPIENTRY TAG(MultiTexCoord1fARB)( GLenum target, GLfloat a )
-{
- PRE_LOOPBACK( MultiTexCoord1fARB );
- CALL_MultiTexCoord1fARB(GET_DISPATCH(), ( target, a ));
-}
-
-static void GLAPIENTRY TAG(MultiTexCoord1fvARB)( GLenum target, const GLfloat *tc )
-{
- PRE_LOOPBACK( MultiTexCoord1fvARB );
- CALL_MultiTexCoord1fvARB(GET_DISPATCH(), ( target, tc ));
-}
-
-static void GLAPIENTRY TAG(MultiTexCoord2fARB)( GLenum target, GLfloat s, GLfloat t )
-{
- PRE_LOOPBACK( MultiTexCoord2fARB );
- CALL_MultiTexCoord2fARB(GET_DISPATCH(), ( target, s, t ));
-}
-
-static void GLAPIENTRY TAG(MultiTexCoord2fvARB)( GLenum target, const GLfloat *tc )
-{
- PRE_LOOPBACK( MultiTexCoord2fvARB );
- CALL_MultiTexCoord2fvARB(GET_DISPATCH(), ( target, tc ));
-}
-
-static void GLAPIENTRY TAG(MultiTexCoord3fARB)( GLenum target, GLfloat s,
- GLfloat t, GLfloat r )
-{
- PRE_LOOPBACK( MultiTexCoord3fARB );
- CALL_MultiTexCoord3fARB(GET_DISPATCH(), ( target, s, t, r ));
-}
-
-static void GLAPIENTRY TAG(MultiTexCoord3fvARB)( GLenum target, const GLfloat *tc )
-{
- PRE_LOOPBACK( MultiTexCoord3fvARB );
- CALL_MultiTexCoord3fvARB(GET_DISPATCH(), ( target, tc ));
-}
-
-static void GLAPIENTRY TAG(MultiTexCoord4fARB)( GLenum target, GLfloat s,
- GLfloat t, GLfloat r, GLfloat q )
-{
- PRE_LOOPBACK( MultiTexCoord4fARB );
- CALL_MultiTexCoord4fARB(GET_DISPATCH(), ( target, s, t, r, q ));
-}
-
-static void GLAPIENTRY TAG(MultiTexCoord4fvARB)( GLenum target, const GLfloat *tc )
-{
- PRE_LOOPBACK( MultiTexCoord4fvARB );
- CALL_MultiTexCoord4fvARB(GET_DISPATCH(), ( target, tc ));
-}
-
-static void GLAPIENTRY TAG(Normal3f)( GLfloat x, GLfloat y, GLfloat z )
-{
- PRE_LOOPBACK( Normal3f );
- CALL_Normal3f(GET_DISPATCH(), ( x, y, z ));
-}
-
-static void GLAPIENTRY TAG(Normal3fv)( const GLfloat *v )
-{
- PRE_LOOPBACK( Normal3fv );
- CALL_Normal3fv(GET_DISPATCH(), ( v ));
-}
-
-static void GLAPIENTRY TAG(SecondaryColor3fEXT)( GLfloat r, GLfloat g, GLfloat b )
-{
- PRE_LOOPBACK( SecondaryColor3fEXT );
- CALL_SecondaryColor3fEXT(GET_DISPATCH(), ( r, g, b ));
-}
-
-static void GLAPIENTRY TAG(SecondaryColor3fvEXT)( const GLfloat *v )
-{
- PRE_LOOPBACK( SecondaryColor3fvEXT );
- CALL_SecondaryColor3fvEXT(GET_DISPATCH(), ( v ));
-}
-
-static void GLAPIENTRY TAG(TexCoord1f)( GLfloat s )
-{
- PRE_LOOPBACK( TexCoord1f );
- CALL_TexCoord1f(GET_DISPATCH(), ( s ));
-}
-
-static void GLAPIENTRY TAG(TexCoord1fv)( const GLfloat *tc )
-{
- PRE_LOOPBACK( TexCoord1fv );
- CALL_TexCoord1fv(GET_DISPATCH(), ( tc ));
-}
-
-static void GLAPIENTRY TAG(TexCoord2f)( GLfloat s, GLfloat t )
-{
- PRE_LOOPBACK( TexCoord2f );
- CALL_TexCoord2f(GET_DISPATCH(), ( s, t ));
-}
-
-static void GLAPIENTRY TAG(TexCoord2fv)( const GLfloat *tc )
-{
- PRE_LOOPBACK( TexCoord2fv );
- CALL_TexCoord2fv(GET_DISPATCH(), ( tc ));
-}
-
-static void GLAPIENTRY TAG(TexCoord3f)( GLfloat s, GLfloat t, GLfloat r )
-{
- PRE_LOOPBACK( TexCoord3f );
- CALL_TexCoord3f(GET_DISPATCH(), ( s, t, r ));
-}
-
-static void GLAPIENTRY TAG(TexCoord3fv)( const GLfloat *tc )
-{
- PRE_LOOPBACK( TexCoord3fv );
- CALL_TexCoord3fv(GET_DISPATCH(), ( tc ));
-}
-
-static void GLAPIENTRY TAG(TexCoord4f)( GLfloat s, GLfloat t, GLfloat r, GLfloat q )
-{
- PRE_LOOPBACK( TexCoord4f );
- CALL_TexCoord4f(GET_DISPATCH(), ( s, t, r, q ));
-}
-
-static void GLAPIENTRY TAG(TexCoord4fv)( const GLfloat *tc )
-{
- PRE_LOOPBACK( TexCoord4fv );
- CALL_TexCoord4fv(GET_DISPATCH(), ( tc ));
-}
-
-static void GLAPIENTRY TAG(Vertex2f)( GLfloat x, GLfloat y )
-{
- PRE_LOOPBACK( Vertex2f );
- CALL_Vertex2f(GET_DISPATCH(), ( x, y ));
-}
-
-static void GLAPIENTRY TAG(Vertex2fv)( const GLfloat *v )
-{
- PRE_LOOPBACK( Vertex2fv );
- CALL_Vertex2fv(GET_DISPATCH(), ( v ));
-}
-
-static void GLAPIENTRY TAG(Vertex3f)( GLfloat x, GLfloat y, GLfloat z )
-{
- PRE_LOOPBACK( Vertex3f );
- CALL_Vertex3f(GET_DISPATCH(), ( x, y, z ));
-}
-
-static void GLAPIENTRY TAG(Vertex3fv)( const GLfloat *v )
-{
- PRE_LOOPBACK( Vertex3fv );
- CALL_Vertex3fv(GET_DISPATCH(), ( v ));
-}
-
-static void GLAPIENTRY TAG(Vertex4f)( GLfloat x, GLfloat y, GLfloat z, GLfloat w )
-{
- PRE_LOOPBACK( Vertex4f );
- CALL_Vertex4f(GET_DISPATCH(), ( x, y, z, w ));
-}
-
-static void GLAPIENTRY TAG(Vertex4fv)( const GLfloat *v )
-{
- PRE_LOOPBACK( Vertex4fv );
- CALL_Vertex4fv(GET_DISPATCH(), ( v ));
-}
-
-static void GLAPIENTRY TAG(CallList)( GLuint i )
-{
- PRE_LOOPBACK( CallList );
- CALL_CallList(GET_DISPATCH(), ( i ));
-}
-
-static void GLAPIENTRY TAG(CallLists)( GLsizei sz, GLenum type, const GLvoid *v )
-{
- PRE_LOOPBACK( CallLists );
- CALL_CallLists(GET_DISPATCH(), ( sz, type, v ));
-}
-
-static void GLAPIENTRY TAG(Begin)( GLenum mode )
-{
- PRE_LOOPBACK( Begin );
- CALL_Begin(GET_DISPATCH(), ( mode ));
-}
-
-static void GLAPIENTRY TAG(End)( void )
-{
- PRE_LOOPBACK( End );
- CALL_End(GET_DISPATCH(), ());
-}
-
-static void GLAPIENTRY TAG(Rectf)( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 )
-{
- PRE_LOOPBACK( Rectf );
- CALL_Rectf(GET_DISPATCH(), ( x1, y1, x2, y2 ));
-}
-
-static void GLAPIENTRY TAG(DrawArrays)( GLenum mode, GLint start, GLsizei count )
-{
- PRE_LOOPBACK( DrawArrays );
- CALL_DrawArrays(GET_DISPATCH(), ( mode, start, count ));
-}
-
-static void GLAPIENTRY TAG(DrawElements)( GLenum mode, GLsizei count, GLenum type,
- const GLvoid *indices )
-{
- PRE_LOOPBACK( DrawElements );
- CALL_DrawElements(GET_DISPATCH(), ( mode, count, type, indices ));
-}
-
-static void GLAPIENTRY TAG(MultiDrawElementsEXT)( GLenum mode,
- const GLsizei *count,
- GLenum type,
- const GLvoid **indices,
- GLsizei primcount)
-{
- PRE_LOOPBACK( MultiDrawElementsEXT );
- CALL_MultiDrawElementsEXT(GET_DISPATCH(), ( mode, count, type, indices,
- primcount ));
-}
-
-static void GLAPIENTRY TAG(DrawRangeElements)( GLenum mode, GLuint start,
- GLuint end, GLsizei count,
- GLenum type, const GLvoid *indices )
-{
- PRE_LOOPBACK( DrawRangeElements );
- CALL_DrawRangeElements(GET_DISPATCH(), ( mode, start, end, count, type, indices ));
-}
-
-static void GLAPIENTRY TAG(DrawElementsBaseVertex)( GLenum mode,
- GLsizei count,
- GLenum type,
- const GLvoid *indices,
- GLint basevertex)
-{
- PRE_LOOPBACK( DrawElementsBaseVertex );
- CALL_DrawElementsBaseVertex(GET_DISPATCH(), ( mode, count, type,
- indices, basevertex ));
-}
-
-static void GLAPIENTRY TAG(DrawRangeElementsBaseVertex)( GLenum mode,
- GLuint start,
- GLuint end,
- GLsizei count,
- GLenum type,
- const GLvoid *indices,
- GLint basevertex)
-{
- PRE_LOOPBACK( DrawRangeElementsBaseVertex );
- CALL_DrawRangeElementsBaseVertex(GET_DISPATCH(), ( mode, start, end,
- count, type, indices,
- basevertex ));
-}
-
-static void GLAPIENTRY TAG(MultiDrawElementsBaseVertex)( GLenum mode,
- const GLsizei *count,
- GLenum type,
- const GLvoid **indices,
- GLsizei primcount,
- const GLint *basevertex)
-{
- PRE_LOOPBACK( MultiDrawElementsBaseVertex );
- CALL_MultiDrawElementsBaseVertex(GET_DISPATCH(), ( mode, count, type,
- indices,
- primcount, basevertex ));
-}
-
-static void GLAPIENTRY
-TAG(DrawArraysInstanced)(GLenum mode, GLint first,
- GLsizei count, GLsizei primcount)
-{
- PRE_LOOPBACK( DrawArraysInstanced );
- CALL_DrawArraysInstanced(GET_DISPATCH(), (mode, first, count, primcount));
-}
-
-static void GLAPIENTRY
-TAG(DrawElementsInstanced)(GLenum mode, GLsizei count,
- GLenum type, const GLvoid *indices,
- GLsizei primcount)
-{
- PRE_LOOPBACK( DrawElementsInstanced );
- CALL_DrawElementsInstanced(GET_DISPATCH(),
- (mode, count, type, indices, primcount));
-}
-
-
-static void GLAPIENTRY TAG(EvalMesh1)( GLenum mode, GLint i1, GLint i2 )
-{
- PRE_LOOPBACK( EvalMesh1 );
- CALL_EvalMesh1(GET_DISPATCH(), ( mode, i1, i2 ));
-}
-
-static void GLAPIENTRY TAG(EvalMesh2)( GLenum mode, GLint i1, GLint i2,
- GLint j1, GLint j2 )
-{
- PRE_LOOPBACK( EvalMesh2 );
- CALL_EvalMesh2(GET_DISPATCH(), ( mode, i1, i2, j1, j2 ));
-}
-
-static void GLAPIENTRY TAG(VertexAttrib1fNV)( GLuint index, GLfloat x )
-{
- PRE_LOOPBACK( VertexAttrib1fNV );
- CALL_VertexAttrib1fNV(GET_DISPATCH(), ( index, x ));
-}
-
-static void GLAPIENTRY TAG(VertexAttrib1fvNV)( GLuint index, const GLfloat *v )
-{
- PRE_LOOPBACK( VertexAttrib1fvNV );
- CALL_VertexAttrib1fvNV(GET_DISPATCH(), ( index, v ));
-}
-
-static void GLAPIENTRY TAG(VertexAttrib2fNV)( GLuint index, GLfloat x, GLfloat y )
-{
- PRE_LOOPBACK( VertexAttrib2fNV );
- CALL_VertexAttrib2fNV(GET_DISPATCH(), ( index, x, y ));
-}
-
-static void GLAPIENTRY TAG(VertexAttrib2fvNV)( GLuint index, const GLfloat *v )
-{
- PRE_LOOPBACK( VertexAttrib2fvNV );
- CALL_VertexAttrib2fvNV(GET_DISPATCH(), ( index, v ));
-}
-
-static void GLAPIENTRY TAG(VertexAttrib3fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z )
-{
- PRE_LOOPBACK( VertexAttrib3fNV );
- CALL_VertexAttrib3fNV(GET_DISPATCH(), ( index, x, y, z ));
-}
-
-static void GLAPIENTRY TAG(VertexAttrib3fvNV)( GLuint index, const GLfloat *v )
-{
- PRE_LOOPBACK( VertexAttrib3fvNV );
- CALL_VertexAttrib3fvNV(GET_DISPATCH(), ( index, v ));
-}
-
-static void GLAPIENTRY TAG(VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w )
-{
- PRE_LOOPBACK( VertexAttrib4fNV );
- CALL_VertexAttrib4fNV(GET_DISPATCH(), ( index, x, y, z, w ));
-}
-
-static void GLAPIENTRY TAG(VertexAttrib4fvNV)( GLuint index, const GLfloat *v )
-{
- PRE_LOOPBACK( VertexAttrib4fvNV );
- CALL_VertexAttrib4fvNV(GET_DISPATCH(), ( index, v ));
-}
-
-
-static void GLAPIENTRY TAG(VertexAttrib1fARB)( GLuint index, GLfloat x )
-{
- PRE_LOOPBACK( VertexAttrib1fARB );
- CALL_VertexAttrib1fARB(GET_DISPATCH(), ( index, x ));
-}
-
-static void GLAPIENTRY TAG(VertexAttrib1fvARB)( GLuint index, const GLfloat *v )
-{
- PRE_LOOPBACK( VertexAttrib1fvARB );
- CALL_VertexAttrib1fvARB(GET_DISPATCH(), ( index, v ));
-}
-
-static void GLAPIENTRY TAG(VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y )
-{
- PRE_LOOPBACK( VertexAttrib2fARB );
- CALL_VertexAttrib2fARB(GET_DISPATCH(), ( index, x, y ));
-}
-
-static void GLAPIENTRY TAG(VertexAttrib2fvARB)( GLuint index, const GLfloat *v )
-{
- PRE_LOOPBACK( VertexAttrib2fvARB );
- CALL_VertexAttrib2fvARB(GET_DISPATCH(), ( index, v ));
-}
-
-static void GLAPIENTRY TAG(VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z )
-{
- PRE_LOOPBACK( VertexAttrib3fARB );
- CALL_VertexAttrib3fARB(GET_DISPATCH(), ( index, x, y, z ));
-}
-
-static void GLAPIENTRY TAG(VertexAttrib3fvARB)( GLuint index, const GLfloat *v )
-{
- PRE_LOOPBACK( VertexAttrib3fvARB );
- CALL_VertexAttrib3fvARB(GET_DISPATCH(), ( index, v ));
-}
-
-static void GLAPIENTRY TAG(VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w )
-{
- PRE_LOOPBACK( VertexAttrib4fARB );
- CALL_VertexAttrib4fARB(GET_DISPATCH(), ( index, x, y, z, w ));
-}
-
-static void GLAPIENTRY TAG(VertexAttrib4fvARB)( GLuint index, const GLfloat *v )
-{
- PRE_LOOPBACK( VertexAttrib4fvARB );
- CALL_VertexAttrib4fvARB(GET_DISPATCH(), ( index, v ));
-}
-
-
-static GLvertexformat TAG(vtxfmt) = {
- TAG(ArrayElement),
- TAG(Color3f),
- TAG(Color3fv),
- TAG(Color4f),
- TAG(Color4fv),
- TAG(EdgeFlag),
- TAG(EvalCoord1f),
- TAG(EvalCoord1fv),
- TAG(EvalCoord2f),
- TAG(EvalCoord2fv),
- TAG(EvalPoint1),
- TAG(EvalPoint2),
- TAG(FogCoordfEXT),
- TAG(FogCoordfvEXT),
- TAG(Indexf),
- TAG(Indexfv),
- TAG(Materialfv),
- TAG(MultiTexCoord1fARB),
- TAG(MultiTexCoord1fvARB),
- TAG(MultiTexCoord2fARB),
- TAG(MultiTexCoord2fvARB),
- TAG(MultiTexCoord3fARB),
- TAG(MultiTexCoord3fvARB),
- TAG(MultiTexCoord4fARB),
- TAG(MultiTexCoord4fvARB),
- TAG(Normal3f),
- TAG(Normal3fv),
- TAG(SecondaryColor3fEXT),
- TAG(SecondaryColor3fvEXT),
- TAG(TexCoord1f),
- TAG(TexCoord1fv),
- TAG(TexCoord2f),
- TAG(TexCoord2fv),
- TAG(TexCoord3f),
- TAG(TexCoord3fv),
- TAG(TexCoord4f),
- TAG(TexCoord4fv),
- TAG(Vertex2f),
- TAG(Vertex2fv),
- TAG(Vertex3f),
- TAG(Vertex3fv),
- TAG(Vertex4f),
- TAG(Vertex4fv),
- TAG(CallList),
- TAG(CallLists),
- TAG(Begin),
- TAG(End),
- TAG(VertexAttrib1fNV),
- TAG(VertexAttrib1fvNV),
- TAG(VertexAttrib2fNV),
- TAG(VertexAttrib2fvNV),
- TAG(VertexAttrib3fNV),
- TAG(VertexAttrib3fvNV),
- TAG(VertexAttrib4fNV),
- TAG(VertexAttrib4fvNV),
- TAG(VertexAttrib1fARB),
- TAG(VertexAttrib1fvARB),
- TAG(VertexAttrib2fARB),
- TAG(VertexAttrib2fvARB),
- TAG(VertexAttrib3fARB),
- TAG(VertexAttrib3fvARB),
- TAG(VertexAttrib4fARB),
- TAG(VertexAttrib4fvARB),
- TAG(Rectf),
- TAG(DrawArrays),
- TAG(DrawElements),
- TAG(DrawRangeElements),
- TAG(MultiDrawElementsEXT),
- TAG(DrawElementsBaseVertex),
- TAG(DrawRangeElementsBaseVertex),
- TAG(MultiDrawElementsBaseVertex),
- TAG(DrawArraysInstanced),
- TAG(DrawElementsInstanced),
- TAG(EvalMesh1),
- TAG(EvalMesh2)
-};
-
-#undef TAG
-#undef PRE_LOOPBACK
diff --git a/src/mesa/program/arbprogparse.c b/src/mesa/program/arbprogparse.c
index f834aaf5686..ca63e72c085 100644
--- a/src/mesa/program/arbprogparse.c
+++ b/src/mesa/program/arbprogparse.c
@@ -64,7 +64,7 @@ having three separate program parameter arrays.
void
-_mesa_parse_arb_fragment_program(GLcontext* ctx, GLenum target,
+_mesa_parse_arb_fragment_program(struct gl_context* ctx, GLenum target,
const GLvoid *str, GLsizei len,
struct gl_fragment_program *program)
{
@@ -162,7 +162,7 @@ _mesa_parse_arb_fragment_program(GLcontext* ctx, GLenum target,
* object unchanged.
*/
void
-_mesa_parse_arb_vertex_program(GLcontext *ctx, GLenum target,
+_mesa_parse_arb_vertex_program(struct gl_context *ctx, GLenum target,
const GLvoid *str, GLsizei len,
struct gl_vertex_program *program)
{
diff --git a/src/mesa/program/arbprogparse.h b/src/mesa/program/arbprogparse.h
index 980d39fb9fe..08e25a1c168 100644
--- a/src/mesa/program/arbprogparse.h
+++ b/src/mesa/program/arbprogparse.h
@@ -29,12 +29,12 @@
#include "main/mtypes.h"
extern void
-_mesa_parse_arb_vertex_program(GLcontext *ctx, GLenum target,
+_mesa_parse_arb_vertex_program(struct gl_context *ctx, GLenum target,
const GLvoid *str, GLsizei len,
struct gl_vertex_program *program);
extern void
-_mesa_parse_arb_fragment_program(GLcontext *ctx, GLenum target,
+_mesa_parse_arb_fragment_program(struct gl_context *ctx, GLenum target,
const GLvoid *str, GLsizei len,
struct gl_fragment_program *program);
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 5c92bc9865d..bdd3fd92ffc 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -26,8 +26,7 @@
/**
* \file ir_to_mesa.cpp
*
- * Translates the IR to ARB_fragment_program text if possible,
- * printing the result
+ * Translate GLSL IR to Mesa's gl_program representation.
*/
#include <stdio.h>
@@ -184,7 +183,7 @@ public:
function_entry *current_function;
- GLcontext *ctx;
+ struct gl_context *ctx;
struct gl_program *prog;
struct gl_shader_program *shader_program;
struct gl_shader_compiler_options *options;
@@ -288,19 +287,22 @@ ir_to_mesa_dst_reg ir_to_mesa_address_reg = {
PROGRAM_ADDRESS, 0, WRITEMASK_X, COND_TR, NULL
};
-static void fail_link(struct gl_shader_program *prog, const char *fmt, ...) PRINTFLIKE(2, 3);
+static void
+fail_link(struct gl_shader_program *prog, const char *fmt, ...) PRINTFLIKE(2, 3);
-static void fail_link(struct gl_shader_program *prog, const char *fmt, ...)
- {
- va_list args;
- va_start(args, fmt);
- prog->InfoLog = talloc_vasprintf_append(prog->InfoLog, fmt, args);
- va_end(args);
+static void
+fail_link(struct gl_shader_program *prog, const char *fmt, ...)
+{
+ va_list args;
+ va_start(args, fmt);
+ prog->InfoLog = talloc_vasprintf_append(prog->InfoLog, fmt, args);
+ va_end(args);
- prog->LinkStatus = GL_FALSE;
- }
+ prog->LinkStatus = GL_FALSE;
+}
-static int swizzle_for_size(int size)
+static int
+swizzle_for_size(int size)
{
int size_swizzles[4] = {
MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_X, SWIZZLE_X, SWIZZLE_X),
@@ -309,6 +311,7 @@ static int swizzle_for_size(int size)
MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W),
};
+ assert((size >= 1) && (size <= 4));
return size_swizzles[size - 1];
}
@@ -1127,6 +1130,7 @@ ir_to_mesa_visitor::visit(ir_expression *ir)
case ir_binop_bit_and:
case ir_binop_bit_xor:
case ir_binop_bit_or:
+ case ir_unop_round_even:
assert(!"GLSL 1.30 features unsupported");
break;
}
@@ -2159,7 +2163,7 @@ add_uniforms_to_parameters_list(struct gl_shader_program *shader_program,
}
static void
-set_uniform_initializer(GLcontext *ctx, void *mem_ctx,
+set_uniform_initializer(struct gl_context *ctx, void *mem_ctx,
struct gl_shader_program *shader_program,
const char *name, const glsl_type *type,
ir_constant *val)
@@ -2229,13 +2233,17 @@ set_uniform_initializer(GLcontext *ctx, void *mem_ctx,
}
static void
-set_uniform_initializers(GLcontext *ctx,
+set_uniform_initializers(struct gl_context *ctx,
struct gl_shader_program *shader_program)
{
void *mem_ctx = NULL;
- for (unsigned int i = 0; i < shader_program->_NumLinkedShaders; i++) {
+ for (unsigned int i = 0; i < MESA_SHADER_TYPES; i++) {
struct gl_shader *shader = shader_program->_LinkedShaders[i];
+
+ if (shader == NULL)
+ continue;
+
foreach_iter(exec_list_iterator, iter, *shader->ir) {
ir_instruction *ir = (ir_instruction *)iter.get();
ir_variable *var = ir->as_variable();
@@ -2254,8 +2262,12 @@ set_uniform_initializers(GLcontext *ctx,
talloc_free(mem_ctx);
}
+
+/**
+ * Convert a shader's GLSL IR into a Mesa gl_program.
+ */
struct gl_program *
-get_mesa_program(GLcontext *ctx, struct gl_shader_program *shader_program,
+get_mesa_program(struct gl_context *ctx, struct gl_shader_program *shader_program,
struct gl_shader *shader)
{
ir_to_mesa_visitor v;
@@ -2344,10 +2356,12 @@ get_mesa_program(GLcontext *ctx, struct gl_shader_program *shader_program,
mesa_instruction_annotation = talloc_array(v.mem_ctx, ir_instruction *,
num_instructions);
+ /* Convert ir_mesa_instructions into prog_instructions.
+ */
mesa_inst = mesa_instructions;
i = 0;
foreach_iter(exec_list_iterator, iter, v.instructions) {
- ir_to_mesa_instruction *inst = (ir_to_mesa_instruction *)iter.get();
+ const ir_to_mesa_instruction *inst = (ir_to_mesa_instruction *)iter.get();
mesa_inst->Opcode = inst->op;
mesa_inst->CondUpdate = inst->cond_update;
@@ -2368,6 +2382,7 @@ get_mesa_program(GLcontext *ctx, struct gl_shader_program *shader_program,
if (mesa_inst->DstReg.RelAddr)
prog->IndirectRegisterFiles |= 1 << mesa_inst->DstReg.File;
+ /* Update program's bitmask of indirectly accessed register files */
for (unsigned src = 0; src < 3; src++)
if (mesa_inst->SrcReg[src].RelAddr)
prog->IndirectRegisterFiles |= 1 << mesa_inst->SrcReg[src].File;
@@ -2429,8 +2444,14 @@ get_mesa_program(GLcontext *ctx, struct gl_shader_program *shader_program,
}
extern "C" {
+
+/**
+ * Called via ctx->Driver.CompilerShader().
+ * This is a no-op.
+ * XXX can we remove the ctx->Driver.CompileShader() hook?
+ */
GLboolean
-_mesa_ir_compile_shader(GLcontext *ctx, struct gl_shader *shader)
+_mesa_ir_compile_shader(struct gl_context *ctx, struct gl_shader *shader)
{
assert(shader->CompileStatus);
(void) ctx;
@@ -2438,15 +2459,25 @@ _mesa_ir_compile_shader(GLcontext *ctx, struct gl_shader *shader)
return GL_TRUE;
}
+
+/**
+ * Link a shader.
+ * Called via ctx->Driver.LinkShader()
+ * This actually involves converting GLSL IR into Mesa gl_programs with
+ * code lowering and other optimizations.
+ */
GLboolean
-_mesa_ir_link_shader(GLcontext *ctx, struct gl_shader_program *prog)
+_mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
{
assert(prog->LinkStatus);
- for (unsigned i = 0; i < prog->_NumLinkedShaders; i++) {
+ for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) {
+ if (prog->_LinkedShaders[i] == NULL)
+ continue;
+
bool progress;
exec_list *ir = prog->_LinkedShaders[i]->ir;
- struct gl_shader_compiler_options *options =
+ const struct gl_shader_compiler_options *options =
&ctx->ShaderCompilerOptions[_mesa_shader_type_to_index(prog->_LinkedShaders[i]->Type)];
do {
@@ -2487,10 +2518,13 @@ _mesa_ir_link_shader(GLcontext *ctx, struct gl_shader_program *prog)
validate_ir_tree(ir);
}
- for (unsigned i = 0; i < prog->_NumLinkedShaders; i++) {
+ for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) {
struct gl_program *linked_prog;
bool ok = true;
+ if (prog->_LinkedShaders[i] == NULL)
+ continue;
+
linked_prog = get_mesa_program(ctx, prog, prog->_LinkedShaders[i]);
switch (prog->_LinkedShaders[i]->Type) {
@@ -2516,8 +2550,12 @@ _mesa_ir_link_shader(GLcontext *ctx, struct gl_shader_program *prog)
return GL_TRUE;
}
+
+/**
+ * Compile a GLSL shader. Called via glCompileShader().
+ */
void
-_mesa_glsl_compile_shader(GLcontext *ctx, struct gl_shader *shader)
+_mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader)
{
struct _mesa_glsl_parse_state *state =
new(shader) _mesa_glsl_parse_state(ctx, shader->Type, shader);
@@ -2600,8 +2638,12 @@ _mesa_glsl_compile_shader(GLcontext *ctx, struct gl_shader *shader)
}
}
+
+/**
+ * Link a GLSL shader program. Called via glLinkProgram().
+ */
void
-_mesa_glsl_link_shader(GLcontext *ctx, struct gl_shader_program *prog)
+_mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
{
unsigned int i;
diff --git a/src/mesa/program/ir_to_mesa.h b/src/mesa/program/ir_to_mesa.h
index ecaacde4bb0..7197615f949 100644
--- a/src/mesa/program/ir_to_mesa.h
+++ b/src/mesa/program/ir_to_mesa.h
@@ -28,10 +28,10 @@ extern "C" {
#include "main/config.h"
#include "main/mtypes.h"
-void _mesa_glsl_compile_shader(GLcontext *ctx, struct gl_shader *sh);
-void _mesa_glsl_link_shader(GLcontext *ctx, struct gl_shader_program *prog);
-GLboolean _mesa_ir_compile_shader(GLcontext *ctx, struct gl_shader *shader);
-GLboolean _mesa_ir_link_shader(GLcontext *ctx, struct gl_shader_program *prog);
+void _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *sh);
+void _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog);
+GLboolean _mesa_ir_compile_shader(struct gl_context *ctx, struct gl_shader *shader);
+GLboolean _mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog);
#ifdef __cplusplus
}
diff --git a/src/mesa/program/nvfragparse.c b/src/mesa/program/nvfragparse.c
index 0de3c5804d2..8516b5fc1ff 100644
--- a/src/mesa/program/nvfragparse.c
+++ b/src/mesa/program/nvfragparse.c
@@ -141,7 +141,7 @@ static const struct instruction_pattern Instructions[] = {
* _successfully_ parsed the program text.
*/
struct parse_state {
- GLcontext *ctx;
+ struct gl_context *ctx;
const GLubyte *start; /* start of program string */
const GLubyte *pos; /* current position */
const GLubyte *curLine;
@@ -1463,7 +1463,7 @@ Parse_InstructionSequence(struct parse_state *parseState,
* indicates the position of the error in 'str'.
*/
void
-_mesa_parse_nv_fragment_program(GLcontext *ctx, GLenum dstTarget,
+_mesa_parse_nv_fragment_program(struct gl_context *ctx, GLenum dstTarget,
const GLubyte *str, GLsizei len,
struct gl_fragment_program *program)
{
diff --git a/src/mesa/program/nvfragparse.h b/src/mesa/program/nvfragparse.h
index e28a6c49349..3e85dd2c30b 100644
--- a/src/mesa/program/nvfragparse.h
+++ b/src/mesa/program/nvfragparse.h
@@ -33,7 +33,7 @@
#include "main/mtypes.h"
extern void
-_mesa_parse_nv_fragment_program(GLcontext *ctx, GLenum target,
+_mesa_parse_nv_fragment_program(struct gl_context *ctx, GLenum target,
const GLubyte *str, GLsizei len,
struct gl_fragment_program *program);
diff --git a/src/mesa/program/nvvertparse.c b/src/mesa/program/nvvertparse.c
index 1ac83d0e59d..bdd44a45133 100644
--- a/src/mesa/program/nvvertparse.c
+++ b/src/mesa/program/nvvertparse.c
@@ -54,7 +54,7 @@
* program attributes.
*/
struct parse_state {
- GLcontext *ctx;
+ struct gl_context *ctx;
const GLubyte *start;
const GLubyte *pos;
const GLubyte *curLine;
@@ -1282,7 +1282,7 @@ Parse_Program(struct parse_state *parseState,
* indicates the position of the error in 'str'.
*/
void
-_mesa_parse_nv_vertex_program(GLcontext *ctx, GLenum dstTarget,
+_mesa_parse_nv_vertex_program(struct gl_context *ctx, GLenum dstTarget,
const GLubyte *str, GLsizei len,
struct gl_vertex_program *program)
{
diff --git a/src/mesa/program/nvvertparse.h b/src/mesa/program/nvvertparse.h
index 91ef79e6c3c..e98e867320f 100644
--- a/src/mesa/program/nvvertparse.h
+++ b/src/mesa/program/nvvertparse.h
@@ -32,7 +32,7 @@
#include "main/mtypes.h"
extern void
-_mesa_parse_nv_vertex_program(GLcontext *ctx, GLenum target,
+_mesa_parse_nv_vertex_program(struct gl_context *ctx, GLenum target,
const GLubyte *str, GLsizei len,
struct gl_vertex_program *program);
diff --git a/src/mesa/program/prog_cache.c b/src/mesa/program/prog_cache.c
index 8af689754bb..56ca59890de 100644
--- a/src/mesa/program/prog_cache.c
+++ b/src/mesa/program/prog_cache.c
@@ -104,7 +104,7 @@ rehash(struct gl_program_cache *cache)
static void
-clear_cache(GLcontext *ctx, struct gl_program_cache *cache)
+clear_cache(struct gl_context *ctx, struct gl_program_cache *cache)
{
struct cache_item *c, *next;
GLuint i;
@@ -145,7 +145,7 @@ _mesa_new_program_cache(void)
void
-_mesa_delete_program_cache(GLcontext *ctx, struct gl_program_cache *cache)
+_mesa_delete_program_cache(struct gl_context *ctx, struct gl_program_cache *cache)
{
clear_cache(ctx, cache);
free(cache->items);
@@ -178,7 +178,7 @@ _mesa_search_program_cache(struct gl_program_cache *cache,
void
-_mesa_program_cache_insert(GLcontext *ctx,
+_mesa_program_cache_insert(struct gl_context *ctx,
struct gl_program_cache *cache,
const void *key, GLuint keysize,
struct gl_program *program)
diff --git a/src/mesa/program/prog_cache.h b/src/mesa/program/prog_cache.h
index bfe8f99d445..4907ae3030e 100644
--- a/src/mesa/program/prog_cache.h
+++ b/src/mesa/program/prog_cache.h
@@ -41,7 +41,7 @@ extern struct gl_program_cache *
_mesa_new_program_cache(void);
extern void
-_mesa_delete_program_cache(GLcontext *ctx, struct gl_program_cache *pc);
+_mesa_delete_program_cache(struct gl_context *ctx, struct gl_program_cache *pc);
extern struct gl_program *
@@ -49,7 +49,7 @@ _mesa_search_program_cache(struct gl_program_cache *cache,
const void *key, GLuint keysize);
extern void
-_mesa_program_cache_insert(GLcontext *ctx,
+_mesa_program_cache_insert(struct gl_context *ctx,
struct gl_program_cache *cache,
const void *key, GLuint keysize,
struct gl_program *program);
diff --git a/src/mesa/program/prog_execute.c b/src/mesa/program/prog_execute.c
index 2ae5bc572af..1d97a077f52 100644
--- a/src/mesa/program/prog_execute.c
+++ b/src/mesa/program/prog_execute.c
@@ -296,7 +296,7 @@ fetch_vector4ui(const struct prog_src_register *source,
* XXX this currently only works for fragment program input attribs.
*/
static void
-fetch_vector4_deriv(GLcontext * ctx,
+fetch_vector4_deriv(struct gl_context * ctx,
const struct prog_src_register *source,
const struct gl_program_machine *machine,
char xOrY, GLfloat result[4])
@@ -380,7 +380,7 @@ fetch_vector1ui(const struct prog_src_register *source,
* Fetch texel from texture. Use partial derivatives when possible.
*/
static INLINE void
-fetch_texel(GLcontext *ctx,
+fetch_texel(struct gl_context *ctx,
const struct gl_program_machine *machine,
const struct prog_instruction *inst,
const GLfloat texcoord[4], GLfloat lodBias,
@@ -630,7 +630,7 @@ store_vector4ui(const struct prog_instruction *inst,
* \return GL_TRUE if program completed or GL_FALSE if program executed KIL.
*/
GLboolean
-_mesa_execute_program(GLcontext * ctx,
+_mesa_execute_program(struct gl_context * ctx,
const struct gl_program *program,
struct gl_program_machine *machine)
{
diff --git a/src/mesa/program/prog_execute.h b/src/mesa/program/prog_execute.h
index f59b65176ff..cefd468c36b 100644
--- a/src/mesa/program/prog_execute.h
+++ b/src/mesa/program/prog_execute.h
@@ -29,10 +29,10 @@
#include "main/mtypes.h"
-typedef void (*FetchTexelLodFunc)(GLcontext *ctx, const GLfloat texcoord[4],
+typedef void (*FetchTexelLodFunc)(struct gl_context *ctx, const GLfloat texcoord[4],
GLfloat lambda, GLuint unit, GLfloat color[4]);
-typedef void (*FetchTexelDerivFunc)(GLcontext *ctx, const GLfloat texcoord[4],
+typedef void (*FetchTexelDerivFunc)(struct gl_context *ctx, const GLfloat texcoord[4],
const GLfloat texdx[4],
const GLfloat texdy[4],
GLfloat lodBias,
@@ -74,11 +74,11 @@ struct gl_program_machine
extern void
-_mesa_get_program_register(GLcontext *ctx, gl_register_file file,
+_mesa_get_program_register(struct gl_context *ctx, gl_register_file file,
GLuint index, GLfloat val[4]);
extern GLboolean
-_mesa_execute_program(GLcontext *ctx,
+_mesa_execute_program(struct gl_context *ctx,
const struct gl_program *program,
struct gl_program_machine *machine);
diff --git a/src/mesa/program/prog_optimize.c b/src/mesa/program/prog_optimize.c
index 0dc779073db..96971f2eda4 100644
--- a/src/mesa/program/prog_optimize.c
+++ b/src/mesa/program/prog_optimize.c
@@ -1216,7 +1216,7 @@ _mesa_reallocate_registers(struct gl_program *prog)
#if 0
static void
-print_it(GLcontext *ctx, struct gl_program *program, const char *txt) {
+print_it(struct gl_context *ctx, struct gl_program *program, const char *txt) {
fprintf(stderr, "%s (%u inst):\n", txt, program->NumInstructions);
_mesa_print_program(program);
_mesa_print_program_parameters(ctx, program);
@@ -1230,7 +1230,7 @@ print_it(GLcontext *ctx, struct gl_program *program, const char *txt) {
* instructions, temp regs, etc.
*/
void
-_mesa_optimize_program(GLcontext *ctx, struct gl_program *program)
+_mesa_optimize_program(struct gl_context *ctx, struct gl_program *program)
{
GLboolean any_change;
diff --git a/src/mesa/program/prog_optimize.h b/src/mesa/program/prog_optimize.h
index 06cd9cb2c20..00f1080449b 100644
--- a/src/mesa/program/prog_optimize.h
+++ b/src/mesa/program/prog_optimize.h
@@ -41,6 +41,6 @@ _mesa_find_temp_intervals(const struct prog_instruction *instructions,
GLint intEnd[MAX_PROGRAM_TEMPS]);
extern void
-_mesa_optimize_program(GLcontext *ctx, struct gl_program *program);
+_mesa_optimize_program(struct gl_context *ctx, struct gl_program *program);
#endif
diff --git a/src/mesa/program/prog_print.c b/src/mesa/program/prog_print.c
index 00aa6de963b..79c01020eb2 100644
--- a/src/mesa/program/prog_print.c
+++ b/src/mesa/program/prog_print.c
@@ -909,7 +909,7 @@ binary(GLbitfield64 val)
*/
static void
_mesa_fprint_program_parameters(FILE *f,
- GLcontext *ctx,
+ struct gl_context *ctx,
const struct gl_program *prog)
{
GLuint i;
@@ -951,7 +951,7 @@ _mesa_fprint_program_parameters(FILE *f,
* Print all of a program's parameters/fields to stderr.
*/
void
-_mesa_print_program_parameters(GLcontext *ctx, const struct gl_program *prog)
+_mesa_print_program_parameters(struct gl_context *ctx, const struct gl_program *prog)
{
_mesa_fprint_program_parameters(stderr, ctx, prog);
}
diff --git a/src/mesa/program/prog_print.h b/src/mesa/program/prog_print.h
index 78b90aeb4d6..f080b3fd2e6 100644
--- a/src/mesa/program/prog_print.h
+++ b/src/mesa/program/prog_print.h
@@ -100,7 +100,7 @@ _mesa_fprint_program_opt(FILE *f,
GLboolean lineNumbers);
extern void
-_mesa_print_program_parameters(GLcontext *ctx, const struct gl_program *prog);
+_mesa_print_program_parameters(struct gl_context *ctx, const struct gl_program *prog);
extern void
_mesa_print_parameter_list(const struct gl_program_parameter_list *list);
diff --git a/src/mesa/program/prog_statevars.c b/src/mesa/program/prog_statevars.c
index c6fb42b9a69..baac29ff0dd 100644
--- a/src/mesa/program/prog_statevars.c
+++ b/src/mesa/program/prog_statevars.c
@@ -46,7 +46,7 @@
* The program parser will produce the state[] values.
*/
static void
-_mesa_fetch_state(GLcontext *ctx, const gl_state_index state[],
+_mesa_fetch_state(struct gl_context *ctx, const gl_state_index state[],
GLfloat *value)
{
switch (state[0]) {
@@ -1049,7 +1049,7 @@ _mesa_program_state_string(const gl_state_index state[STATE_LENGTH])
* This would be called at glBegin time when using a fragment program.
*/
void
-_mesa_load_state_parameters(GLcontext *ctx,
+_mesa_load_state_parameters(struct gl_context *ctx,
struct gl_program_parameter_list *paramList)
{
GLuint i;
@@ -1103,7 +1103,7 @@ load_transpose_matrix(GLfloat registers[][4], GLuint pos,
* glBegin/glEnd, not per-vertex.
*/
void
-_mesa_load_tracked_matrices(GLcontext *ctx)
+_mesa_load_tracked_matrices(struct gl_context *ctx)
{
GLuint i;
diff --git a/src/mesa/program/prog_statevars.h b/src/mesa/program/prog_statevars.h
index cfce226fb49..6e5be53630c 100644
--- a/src/mesa/program/prog_statevars.h
+++ b/src/mesa/program/prog_statevars.h
@@ -125,7 +125,7 @@ typedef enum gl_state_index_ {
extern void
-_mesa_load_state_parameters(GLcontext *ctx,
+_mesa_load_state_parameters(struct gl_context *ctx,
struct gl_program_parameter_list *paramList);
@@ -138,7 +138,7 @@ _mesa_program_state_string(const gl_state_index state[STATE_LENGTH]);
extern void
-_mesa_load_tracked_matrices(GLcontext *ctx);
+_mesa_load_tracked_matrices(struct gl_context *ctx);
#endif /* PROG_STATEVARS_H */
diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c
index 06b9539bda6..4cacde9aed1 100644
--- a/src/mesa/program/program.c
+++ b/src/mesa/program/program.c
@@ -49,7 +49,7 @@ struct gl_program _mesa_DummyProgram;
* Init context's vertex/fragment program state
*/
void
-_mesa_init_program(GLcontext *ctx)
+_mesa_init_program(struct gl_context *ctx)
{
GLuint i;
@@ -128,7 +128,7 @@ _mesa_init_program(GLcontext *ctx)
* Free a context's vertex/fragment program state
*/
void
-_mesa_free_program_data(GLcontext *ctx)
+_mesa_free_program_data(struct gl_context *ctx)
{
#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program
_mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current, NULL);
@@ -161,7 +161,7 @@ _mesa_free_program_data(GLcontext *ctx)
* shared state.
*/
void
-_mesa_update_default_objects_program(GLcontext *ctx)
+_mesa_update_default_objects_program(struct gl_context *ctx)
{
#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program
_mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current,
@@ -203,7 +203,7 @@ _mesa_update_default_objects_program(GLcontext *ctx)
* This is generally called from within the parsers.
*/
void
-_mesa_set_program_error(GLcontext *ctx, GLint pos, const char *string)
+_mesa_set_program_error(struct gl_context *ctx, GLint pos, const char *string)
{
ctx->Program.ErrorPos = pos;
free((void *) ctx->Program.ErrorString);
@@ -260,7 +260,7 @@ _mesa_find_line_column(const GLubyte *string, const GLubyte *pos,
* Initialize a new vertex/fragment program object.
*/
static struct gl_program *
-_mesa_init_program_struct( GLcontext *ctx, struct gl_program *prog,
+_mesa_init_program_struct( struct gl_context *ctx, struct gl_program *prog,
GLenum target, GLuint id)
{
(void) ctx;
@@ -286,7 +286,7 @@ _mesa_init_program_struct( GLcontext *ctx, struct gl_program *prog,
* Initialize a new fragment program object.
*/
struct gl_program *
-_mesa_init_fragment_program( GLcontext *ctx, struct gl_fragment_program *prog,
+_mesa_init_fragment_program( struct gl_context *ctx, struct gl_fragment_program *prog,
GLenum target, GLuint id)
{
if (prog)
@@ -300,7 +300,7 @@ _mesa_init_fragment_program( GLcontext *ctx, struct gl_fragment_program *prog,
* Initialize a new vertex program object.
*/
struct gl_program *
-_mesa_init_vertex_program( GLcontext *ctx, struct gl_vertex_program *prog,
+_mesa_init_vertex_program( struct gl_context *ctx, struct gl_vertex_program *prog,
GLenum target, GLuint id)
{
if (prog)
@@ -314,7 +314,7 @@ _mesa_init_vertex_program( GLcontext *ctx, struct gl_vertex_program *prog,
* Initialize a new geometry program object.
*/
struct gl_program *
-_mesa_init_geometry_program( GLcontext *ctx, struct gl_geometry_program *prog,
+_mesa_init_geometry_program( struct gl_context *ctx, struct gl_geometry_program *prog,
GLenum target, GLuint id)
{
if (prog)
@@ -337,7 +337,7 @@ _mesa_init_geometry_program( GLcontext *ctx, struct gl_geometry_program *prog,
* \return pointer to new program object
*/
struct gl_program *
-_mesa_new_program(GLcontext *ctx, GLenum target, GLuint id)
+_mesa_new_program(struct gl_context *ctx, GLenum target, GLuint id)
{
struct gl_program *prog;
switch (target) {
@@ -372,7 +372,7 @@ _mesa_new_program(GLcontext *ctx, GLenum target, GLuint id)
* by a device driver function.
*/
void
-_mesa_delete_program(GLcontext *ctx, struct gl_program *prog)
+_mesa_delete_program(struct gl_context *ctx, struct gl_program *prog)
{
(void) ctx;
ASSERT(prog);
@@ -406,7 +406,7 @@ _mesa_delete_program(GLcontext *ctx, struct gl_program *prog)
* casts elsewhere.
*/
struct gl_program *
-_mesa_lookup_program(GLcontext *ctx, GLuint id)
+_mesa_lookup_program(struct gl_context *ctx, GLuint id)
{
if (id)
return (struct gl_program *) _mesa_HashLookup(ctx->Shared->Programs, id);
@@ -419,7 +419,7 @@ _mesa_lookup_program(GLcontext *ctx, GLuint id)
* Reference counting for vertex/fragment programs
*/
void
-_mesa_reference_program(GLcontext *ctx,
+_mesa_reference_program(struct gl_context *ctx,
struct gl_program **ptr,
struct gl_program *prog)
{
@@ -486,7 +486,7 @@ _mesa_reference_program(GLcontext *ctx,
* made by a device driver.
*/
struct gl_program *
-_mesa_clone_program(GLcontext *ctx, const struct gl_program *prog)
+_mesa_clone_program(struct gl_context *ctx, const struct gl_program *prog)
{
struct gl_program *clone;
@@ -729,7 +729,7 @@ adjust_param_indexes(struct prog_instruction *inst, GLuint numInst,
* the first program go to the inputs of the second program.
*/
struct gl_program *
-_mesa_combine_programs(GLcontext *ctx,
+_mesa_combine_programs(struct gl_context *ctx,
const struct gl_program *progA,
const struct gl_program *progB)
{
@@ -796,7 +796,7 @@ _mesa_combine_programs(GLcontext *ctx,
if (p->Type == PROGRAM_STATE_VAR &&
p->StateIndexes[0] == STATE_INTERNAL &&
p->StateIndexes[1] == STATE_CURRENT_ATTRIB &&
- p->StateIndexes[2] == VERT_ATTRIB_COLOR0) {
+ (int) p->StateIndexes[2] == (int) VERT_ATTRIB_COLOR0) {
progB_inputsRead |= FRAG_BIT_COL0;
progB_colorFile = PROGRAM_STATE_VAR;
progB_colorIndex = i;
@@ -923,7 +923,7 @@ _mesa_find_free_register(const GLboolean used[],
* behaviour.
*/
void
-_mesa_postprocess_program(GLcontext *ctx, struct gl_program *prog)
+_mesa_postprocess_program(struct gl_context *ctx, struct gl_program *prog)
{
static const GLfloat white[4] = { 0.5, 0.5, 0.5, 0.5 };
GLuint i;
diff --git a/src/mesa/program/program.h b/src/mesa/program/program.h
index 03b1066f326..70cc2c3aaed 100644
--- a/src/mesa/program/program.h
+++ b/src/mesa/program/program.h
@@ -48,16 +48,16 @@ extern struct gl_program _mesa_DummyProgram;
extern void
-_mesa_init_program(GLcontext *ctx);
+_mesa_init_program(struct gl_context *ctx);
extern void
-_mesa_free_program_data(GLcontext *ctx);
+_mesa_free_program_data(struct gl_context *ctx);
extern void
-_mesa_update_default_objects_program(GLcontext *ctx);
+_mesa_update_default_objects_program(struct gl_context *ctx);
extern void
-_mesa_set_program_error(GLcontext *ctx, GLint pos, const char *string);
+_mesa_set_program_error(struct gl_context *ctx, GLint pos, const char *string);
extern const GLubyte *
_mesa_find_line_column(const GLubyte *string, const GLubyte *pos,
@@ -65,36 +65,36 @@ _mesa_find_line_column(const GLubyte *string, const GLubyte *pos,
extern struct gl_program *
-_mesa_init_vertex_program(GLcontext *ctx,
+_mesa_init_vertex_program(struct gl_context *ctx,
struct gl_vertex_program *prog,
GLenum target, GLuint id);
extern struct gl_program *
-_mesa_init_fragment_program(GLcontext *ctx,
+_mesa_init_fragment_program(struct gl_context *ctx,
struct gl_fragment_program *prog,
GLenum target, GLuint id);
extern struct gl_program *
-_mesa_init_geometry_program(GLcontext *ctx,
+_mesa_init_geometry_program(struct gl_context *ctx,
struct gl_geometry_program *prog,
GLenum target, GLuint id);
extern struct gl_program *
-_mesa_new_program(GLcontext *ctx, GLenum target, GLuint id);
+_mesa_new_program(struct gl_context *ctx, GLenum target, GLuint id);
extern void
-_mesa_delete_program(GLcontext *ctx, struct gl_program *prog);
+_mesa_delete_program(struct gl_context *ctx, struct gl_program *prog);
extern struct gl_program *
-_mesa_lookup_program(GLcontext *ctx, GLuint id);
+_mesa_lookup_program(struct gl_context *ctx, GLuint id);
extern void
-_mesa_reference_program(GLcontext *ctx,
+_mesa_reference_program(struct gl_context *ctx,
struct gl_program **ptr,
struct gl_program *prog);
static INLINE void
-_mesa_reference_vertprog(GLcontext *ctx,
+_mesa_reference_vertprog(struct gl_context *ctx,
struct gl_vertex_program **ptr,
struct gl_vertex_program *prog)
{
@@ -103,7 +103,7 @@ _mesa_reference_vertprog(GLcontext *ctx,
}
static INLINE void
-_mesa_reference_fragprog(GLcontext *ctx,
+_mesa_reference_fragprog(struct gl_context *ctx,
struct gl_fragment_program **ptr,
struct gl_fragment_program *prog)
{
@@ -112,7 +112,7 @@ _mesa_reference_fragprog(GLcontext *ctx,
}
static INLINE void
-_mesa_reference_geomprog(GLcontext *ctx,
+_mesa_reference_geomprog(struct gl_context *ctx,
struct gl_geometry_program **ptr,
struct gl_geometry_program *prog)
{
@@ -121,24 +121,24 @@ _mesa_reference_geomprog(GLcontext *ctx,
}
extern struct gl_program *
-_mesa_clone_program(GLcontext *ctx, const struct gl_program *prog);
+_mesa_clone_program(struct gl_context *ctx, const struct gl_program *prog);
static INLINE struct gl_vertex_program *
-_mesa_clone_vertex_program(GLcontext *ctx,
+_mesa_clone_vertex_program(struct gl_context *ctx,
const struct gl_vertex_program *prog)
{
return (struct gl_vertex_program *) _mesa_clone_program(ctx, &prog->Base);
}
static INLINE struct gl_geometry_program *
-_mesa_clone_geometry_program(GLcontext *ctx,
+_mesa_clone_geometry_program(struct gl_context *ctx,
const struct gl_geometry_program *prog)
{
return (struct gl_geometry_program *) _mesa_clone_program(ctx, &prog->Base);
}
static INLINE struct gl_fragment_program *
-_mesa_clone_fragment_program(GLcontext *ctx,
+_mesa_clone_fragment_program(struct gl_context *ctx,
const struct gl_fragment_program *prog)
{
return (struct gl_fragment_program *) _mesa_clone_program(ctx, &prog->Base);
@@ -152,7 +152,7 @@ extern GLboolean
_mesa_delete_instructions(struct gl_program *prog, GLuint start, GLuint count);
extern struct gl_program *
-_mesa_combine_programs(GLcontext *ctx,
+_mesa_combine_programs(struct gl_context *ctx,
const struct gl_program *progA,
const struct gl_program *progB);
@@ -166,7 +166,7 @@ _mesa_find_free_register(const GLboolean used[],
GLuint maxRegs, GLuint firstReg);
extern void
-_mesa_postprocess_program(GLcontext *ctx, struct gl_program *prog);
+_mesa_postprocess_program(struct gl_context *ctx, struct gl_program *prog);
/* keep these in the same order as TGSI_PROCESSOR_* */
diff --git a/src/mesa/program/program_parse.tab.c b/src/mesa/program/program_parse.tab.c
index 08ead30defe..baef311d0c1 100644
--- a/src/mesa/program/program_parse.tab.c
+++ b/src/mesa/program/program_parse.tab.c
@@ -5604,7 +5604,7 @@ yyerror(YYLTYPE *locp, struct asm_parser_state *state, const char *s)
GLboolean
-_mesa_parse_arb_program(GLcontext *ctx, GLenum target, const GLubyte *str,
+_mesa_parse_arb_program(struct gl_context *ctx, GLenum target, const GLubyte *str,
GLsizei len, struct asm_parser_state *state)
{
struct asm_instruction *inst;
diff --git a/src/mesa/program/program_parse.y b/src/mesa/program/program_parse.y
index cf621ae4244..784ea28c17a 100644
--- a/src/mesa/program/program_parse.y
+++ b/src/mesa/program/program_parse.y
@@ -2643,7 +2643,7 @@ yyerror(YYLTYPE *locp, struct asm_parser_state *state, const char *s)
GLboolean
-_mesa_parse_arb_program(GLcontext *ctx, GLenum target, const GLubyte *str,
+_mesa_parse_arb_program(struct gl_context *ctx, GLenum target, const GLubyte *str,
GLsizei len, struct asm_parser_state *state)
{
struct asm_instruction *inst;
diff --git a/src/mesa/program/program_parser.h b/src/mesa/program/program_parser.h
index be952d4b9c8..d689eef7958 100644
--- a/src/mesa/program/program_parser.h
+++ b/src/mesa/program/program_parser.h
@@ -24,10 +24,7 @@
#include "main/config.h"
-#ifndef MTYPES_H
-struct __GLcontextRec;
-typedef struct __GLcontextRec GLcontext;
-#endif
+struct gl_context;
enum asm_type {
at_none,
@@ -131,7 +128,7 @@ struct asm_instruction {
struct asm_parser_state {
- GLcontext *ctx;
+ struct gl_context *ctx;
struct gl_program *prog;
/**
@@ -237,7 +234,7 @@ typedef struct YYLTYPE {
#define YYLTYPE_IS_TRIVIAL 1
-extern GLboolean _mesa_parse_arb_program(GLcontext *ctx, GLenum target,
+extern GLboolean _mesa_parse_arb_program(struct gl_context *ctx, GLenum target,
const GLubyte *str, GLsizei len, struct asm_parser_state *state);
diff --git a/src/mesa/program/programopt.c b/src/mesa/program/programopt.c
index fb2ebe6338f..f92881f8337 100644
--- a/src/mesa/program/programopt.c
+++ b/src/mesa/program/programopt.c
@@ -46,7 +46,7 @@
* May be used to implement the position_invariant option.
*/
static void
-_mesa_insert_mvp_dp4_code(GLcontext *ctx, struct gl_vertex_program *vprog)
+_mesa_insert_mvp_dp4_code(struct gl_context *ctx, struct gl_vertex_program *vprog)
{
struct prog_instruction *newInst;
const GLuint origLen = vprog->Base.NumInstructions;
@@ -114,7 +114,7 @@ _mesa_insert_mvp_dp4_code(GLcontext *ctx, struct gl_vertex_program *vprog)
static void
-_mesa_insert_mvp_mad_code(GLcontext *ctx, struct gl_vertex_program *vprog)
+_mesa_insert_mvp_mad_code(struct gl_context *ctx, struct gl_vertex_program *vprog)
{
struct prog_instruction *newInst;
const GLuint origLen = vprog->Base.NumInstructions;
@@ -216,7 +216,7 @@ _mesa_insert_mvp_mad_code(GLcontext *ctx, struct gl_vertex_program *vprog)
void
-_mesa_insert_mvp_code(GLcontext *ctx, struct gl_vertex_program *vprog)
+_mesa_insert_mvp_code(struct gl_context *ctx, struct gl_vertex_program *vprog)
{
if (ctx->mvp_with_dp4)
_mesa_insert_mvp_dp4_code( ctx, vprog );
@@ -238,7 +238,7 @@ _mesa_insert_mvp_code(GLcontext *ctx, struct gl_vertex_program *vprog)
* to vertex programs too.
*/
void
-_mesa_append_fog_code(GLcontext *ctx, struct gl_fragment_program *fprog)
+_mesa_append_fog_code(struct gl_context *ctx, struct gl_fragment_program *fprog)
{
static const gl_state_index fogPStateOpt[STATE_LENGTH]
= { STATE_INTERNAL, STATE_FOG_PARAMS_OPTIMIZED, 0, 0, 0 };
@@ -585,7 +585,7 @@ _mesa_remove_output_reads(struct gl_program *prog, gl_register_file type)
* This is for debug/test purposes.
*/
void
-_mesa_nop_fragment_program(GLcontext *ctx, struct gl_fragment_program *prog)
+_mesa_nop_fragment_program(struct gl_context *ctx, struct gl_fragment_program *prog)
{
struct prog_instruction *inst;
GLuint inputAttr;
@@ -626,7 +626,7 @@ _mesa_nop_fragment_program(GLcontext *ctx, struct gl_fragment_program *prog)
* transforms vertex position and emits color.
*/
void
-_mesa_nop_vertex_program(GLcontext *ctx, struct gl_vertex_program *prog)
+_mesa_nop_vertex_program(struct gl_context *ctx, struct gl_vertex_program *prog)
{
struct prog_instruction *inst;
GLuint inputAttr;
diff --git a/src/mesa/program/programopt.h b/src/mesa/program/programopt.h
index 4af6357f976..ef6f1bd0794 100644
--- a/src/mesa/program/programopt.h
+++ b/src/mesa/program/programopt.h
@@ -29,10 +29,10 @@
#include "main/mtypes.h"
extern void
-_mesa_insert_mvp_code(GLcontext *ctx, struct gl_vertex_program *vprog);
+_mesa_insert_mvp_code(struct gl_context *ctx, struct gl_vertex_program *vprog);
extern void
-_mesa_append_fog_code(GLcontext *ctx, struct gl_fragment_program *fprog);
+_mesa_append_fog_code(struct gl_context *ctx, struct gl_fragment_program *fprog);
extern void
_mesa_count_texture_indirections(struct gl_program *prog);
@@ -44,10 +44,10 @@ extern void
_mesa_remove_output_reads(struct gl_program *prog, gl_register_file type);
extern void
-_mesa_nop_fragment_program(GLcontext *ctx, struct gl_fragment_program *prog);
+_mesa_nop_fragment_program(struct gl_context *ctx, struct gl_fragment_program *prog);
extern void
-_mesa_nop_vertex_program(GLcontext *ctx, struct gl_vertex_program *prog);
+_mesa_nop_vertex_program(struct gl_context *ctx, struct gl_vertex_program *prog);
#endif /* PROGRAMOPT_H */
diff --git a/src/mesa/program/register_allocate.c b/src/mesa/program/register_allocate.c
index 03f04697bfb..ada6e356419 100644
--- a/src/mesa/program/register_allocate.c
+++ b/src/mesa/program/register_allocate.c
@@ -72,6 +72,7 @@ struct ra_node {
unsigned int adjacency_count;
unsigned int reg;
GLboolean in_stack;
+ float spill_cost;
};
struct ra_graph {
@@ -359,3 +360,66 @@ ra_get_node_reg(struct ra_graph *g, unsigned int n)
{
return g->nodes[n].reg;
}
+
+static float
+ra_get_spill_benefit(struct ra_graph *g, unsigned int n)
+{
+ int j;
+ float benefit = 0;
+ int n_class = g->nodes[n].class;
+
+ /* Define the benefit of eliminating an interference between n, j
+ * through spilling as q(C, B) / p(C). This is similar to the
+ * "count number of edges" approach of traditional graph coloring,
+ * but takes classes into account.
+ */
+ for (j = 0; j < g->count; j++) {
+ if (j != n && g->nodes[n].adjacency[j]) {
+ unsigned int j_class = g->nodes[j].class;
+ benefit += ((float)g->regs->classes[n_class]->q[j_class] /
+ g->regs->classes[n_class]->p);
+ break;
+ }
+ }
+
+ return benefit;
+}
+
+/**
+ * Returns a node number to be spilled according to the cost/benefit using
+ * the pq test, or -1 if there are no spillable nodes.
+ */
+int
+ra_get_best_spill_node(struct ra_graph *g)
+{
+ unsigned int best_node = -1;
+ unsigned int best_benefit = 0.0;
+ unsigned int n;
+
+ for (n = 0; n < g->count; n++) {
+ float cost = g->nodes[n].spill_cost;
+ float benefit;
+
+ if (cost <= 0.0)
+ continue;
+
+ benefit = ra_get_spill_benefit(g, n);
+
+ if (benefit / cost > best_benefit) {
+ best_benefit = benefit / cost;
+ best_node = n;
+ }
+ }
+
+ return best_node;
+}
+
+/**
+ * Only nodes with a spill cost set (cost != 0.0) will be considered
+ * for register spilling.
+ */
+void
+ra_set_node_spill_cost(struct ra_graph *g, unsigned int n, float cost)
+{
+ g->nodes[n].spill_cost = cost;
+}
diff --git a/src/mesa/program/register_allocate.h b/src/mesa/program/register_allocate.h
index 42647b50b8f..198b89f2d7d 100644
--- a/src/mesa/program/register_allocate.h
+++ b/src/mesa/program/register_allocate.h
@@ -65,5 +65,7 @@ GLboolean ra_select(struct ra_graph *g);
GLboolean ra_allocate_no_spills(struct ra_graph *g);
unsigned int ra_get_node_reg(struct ra_graph *g, unsigned int n);
+void ra_set_node_spill_cost(struct ra_graph *g, unsigned int n, float cost);
+int ra_get_best_spill_node(struct ra_graph *g);
/** @} */
diff --git a/src/mesa/sources.mak b/src/mesa/sources.mak
index 11a93d47f6d..9a78a23aa7e 100644
--- a/src/mesa/sources.mak
+++ b/src/mesa/sources.mak
@@ -58,8 +58,10 @@ MAIN_SOURCES = \
main/mm.c \
main/multisample.c \
main/nvprogram.c \
+ main/pack.c \
main/pixel.c \
main/pixelstore.c \
+ main/pixeltransfer.c \
main/points.c \
main/polygon.c \
main/queryobj.c \
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index e389e57346b..e29ab46ef99 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -109,7 +109,7 @@ static void xor_states( struct st_state_flags *result,
*/
static void check_program_state( struct st_context *st )
{
- GLcontext *ctx = st->ctx;
+ struct gl_context *ctx = st->ctx;
if (ctx->VertexProgram._Current != &st->vp->Base)
st->dirty.st |= ST_NEW_VERTEX_PROGRAM;
diff --git a/src/mesa/state_tracker/st_atom.h b/src/mesa/state_tracker/st_atom.h
index c7a04951bff..6a5ea365ebc 100644
--- a/src/mesa/state_tracker/st_atom.h
+++ b/src/mesa/state_tracker/st_atom.h
@@ -67,6 +67,6 @@ extern const struct st_tracked_state st_update_vs_constants;
extern const struct st_tracked_state st_update_pixel_transfer;
-uint st_compare_func_to_pipe(GLenum func);
+GLuint st_compare_func_to_pipe(GLenum func);
#endif
diff --git a/src/mesa/state_tracker/st_atom_blend.c b/src/mesa/state_tracker/st_atom_blend.c
index 21403605805..a8ec4adce77 100644
--- a/src/mesa/state_tracker/st_atom_blend.c
+++ b/src/mesa/state_tracker/st_atom_blend.c
@@ -156,7 +156,7 @@ translate_logicop(GLenum logicop)
* Figure out if colormasks are different per rt.
*/
static GLboolean
-colormask_per_rt(GLcontext *ctx)
+colormask_per_rt(struct gl_context *ctx)
{
/* a bit suboptimal have to compare lots of values */
unsigned i;
@@ -172,7 +172,7 @@ colormask_per_rt(GLcontext *ctx)
* Figure out if blend enables are different per rt.
*/
static GLboolean
-blend_per_rt(GLcontext *ctx)
+blend_per_rt(struct gl_context *ctx)
{
if (ctx->Color.BlendEnabled &&
(ctx->Color.BlendEnabled != ((1 << ctx->Const.MaxDrawBuffers) - 1))) {
diff --git a/src/mesa/state_tracker/st_atom_depth.c b/src/mesa/state_tracker/st_atom_depth.c
index 1616e945fea..aaee432a216 100644
--- a/src/mesa/state_tracker/st_atom_depth.c
+++ b/src/mesa/state_tracker/st_atom_depth.c
@@ -97,7 +97,7 @@ update_depth_stencil_alpha(struct st_context *st)
{
struct pipe_depth_stencil_alpha_state *dsa = &st->state.depth_stencil;
struct pipe_stencil_ref sr;
- GLcontext *ctx = st->ctx;
+ struct gl_context *ctx = st->ctx;
memset(dsa, 0, sizeof(*dsa));
memset(&sr, 0, sizeof(sr));
diff --git a/src/mesa/state_tracker/st_atom_pixeltransfer.c b/src/mesa/state_tracker/st_atom_pixeltransfer.c
index 081b6b3e233..6be03376d01 100644
--- a/src/mesa/state_tracker/st_atom_pixeltransfer.c
+++ b/src/mesa/state_tracker/st_atom_pixeltransfer.c
@@ -69,7 +69,7 @@ struct state_key
};
static void
-make_state_key(GLcontext *ctx, struct state_key *key)
+make_state_key(struct gl_context *ctx, struct state_key *key)
{
memset(key, 0, sizeof(*key));
@@ -85,7 +85,7 @@ make_state_key(GLcontext *ctx, struct state_key *key)
static struct pipe_resource *
-create_color_map_texture(GLcontext *ctx)
+create_color_map_texture(struct gl_context *ctx)
{
struct st_context *st = st_context(ctx);
struct pipe_context *pipe = st->pipe;
@@ -108,7 +108,7 @@ create_color_map_texture(GLcontext *ctx)
* Update the pixelmap texture with the contents of the R/G/B/A pixel maps.
*/
static void
-load_color_map_texture(GLcontext *ctx, struct pipe_resource *pt)
+load_color_map_texture(struct gl_context *ctx, struct pipe_resource *pt)
{
struct st_context *st = st_context(ctx);
struct pipe_context *pipe = st->pipe;
@@ -157,7 +157,7 @@ load_color_map_texture(GLcontext *ctx, struct pipe_resource *pt)
* Returns a fragment program which implements the current pixel transfer ops.
*/
static struct gl_fragment_program *
-get_pixel_transfer_program(GLcontext *ctx, const struct state_key *key)
+get_pixel_transfer_program(struct gl_context *ctx, const struct state_key *key)
{
struct st_context *st = st_context(ctx);
struct prog_instruction inst[MAX_INST];
@@ -320,7 +320,7 @@ get_pixel_transfer_program(GLcontext *ctx, const struct state_key *key)
static void
update_pixel_transfer(struct st_context *st)
{
- GLcontext *ctx = st->ctx;
+ struct gl_context *ctx = st->ctx;
struct state_key key;
struct gl_fragment_program *fp;
diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c
index 0fe333ae8aa..f92ca13d5e4 100644
--- a/src/mesa/state_tracker/st_atom_rasterizer.c
+++ b/src/mesa/state_tracker/st_atom_rasterizer.c
@@ -57,7 +57,7 @@ static GLuint translate_fill( GLenum mode )
static void update_raster_state( struct st_context *st )
{
- GLcontext *ctx = st->ctx;
+ struct gl_context *ctx = st->ctx;
struct pipe_rasterizer_state *raster = &st->state.rasterizer;
const struct gl_vertex_program *vertProg = ctx->VertexProgram._Current;
const struct gl_fragment_program *fragProg = ctx->FragmentProgram._Current;
@@ -96,9 +96,8 @@ static void update_raster_state( struct st_context *st )
*/
if (ctx->VertexProgram._Current) {
if (ctx->VertexProgram._Enabled ||
- (ctx->Shader.CurrentProgram &&
- ctx->Shader.CurrentProgram->VertexProgram &&
- ctx->Shader.CurrentProgram->LinkStatus)) {
+ (ctx->Shader.CurrentVertexProgram &&
+ ctx->Shader.CurrentVertexProgram->LinkStatus)) {
/* user-defined vertex program or shader */
raster->light_twoside = ctx->VertexProgram.TwoSideEnabled;
}
diff --git a/src/mesa/state_tracker/st_atom_viewport.c b/src/mesa/state_tracker/st_atom_viewport.c
index 0b6c34ca2cb..d10f1840df6 100644
--- a/src/mesa/state_tracker/st_atom_viewport.c
+++ b/src/mesa/state_tracker/st_atom_viewport.c
@@ -41,7 +41,7 @@
static void
update_viewport( struct st_context *st )
{
- GLcontext *ctx = st->ctx;
+ struct gl_context *ctx = st->ctx;
GLfloat yScale, yBias;
/* _NEW_BUFFERS
diff --git a/src/mesa/state_tracker/st_cb_accum.c b/src/mesa/state_tracker/st_cb_accum.c
index 425e7987d33..6c5caf42e35 100644
--- a/src/mesa/state_tracker/st_cb_accum.c
+++ b/src/mesa/state_tracker/st_cb_accum.c
@@ -55,7 +55,7 @@
void
-st_clear_accum_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
+st_clear_accum_buffer(struct gl_context *ctx, struct gl_renderbuffer *rb)
{
struct st_renderbuffer *acc_strb = st_renderbuffer(rb);
const GLint xpos = ctx->DrawBuffer->_Xmin;
@@ -96,7 +96,7 @@ st_clear_accum_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
/** For ADD/MULT */
static void
-accum_mad(GLcontext *ctx, GLfloat scale, GLfloat bias,
+accum_mad(struct gl_context *ctx, GLfloat scale, GLfloat bias,
GLint xpos, GLint ypos, GLint width, GLint height,
struct st_renderbuffer *acc_strb)
{
@@ -219,7 +219,7 @@ accum_load(struct st_context *st, GLfloat value,
static void
-accum_return(GLcontext *ctx, GLfloat value,
+accum_return(struct gl_context *ctx, GLfloat value,
GLint xpos, GLint ypos, GLint width, GLint height,
struct st_renderbuffer *acc_strb,
struct st_renderbuffer *color_strb)
@@ -286,7 +286,7 @@ accum_return(GLcontext *ctx, GLfloat value,
static void
-st_Accum(GLcontext *ctx, GLenum op, GLfloat value)
+st_Accum(struct gl_context *ctx, GLenum op, GLfloat value)
{
struct st_context *st = st_context(ctx);
struct st_renderbuffer *acc_strb
diff --git a/src/mesa/state_tracker/st_cb_accum.h b/src/mesa/state_tracker/st_cb_accum.h
index 06425dc8a35..b8c9c350031 100644
--- a/src/mesa/state_tracker/st_cb_accum.h
+++ b/src/mesa/state_tracker/st_cb_accum.h
@@ -35,7 +35,7 @@
#if FEATURE_accum
extern void
-st_clear_accum_buffer(GLcontext *ctx, struct gl_renderbuffer *rb);
+st_clear_accum_buffer(struct gl_context *ctx, struct gl_renderbuffer *rb);
extern void st_init_accum_functions(struct dd_function_table *functions);
@@ -44,7 +44,7 @@ extern void st_init_accum_functions(struct dd_function_table *functions);
#include "main/compiler.h"
static INLINE void
-st_clear_accum_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
+st_clear_accum_buffer(struct gl_context *ctx, struct gl_renderbuffer *rb)
{
ASSERT_NO_FEATURE();
}
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c
index 8da5cbb5e68..3c0ee6c2883 100644
--- a/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/src/mesa/state_tracker/st_cb_bitmap.c
@@ -113,7 +113,7 @@ struct bitmap_cache
* This program will be combined with the user's fragment program.
*/
static struct st_fragment_program *
-make_bitmap_fragment_program(GLcontext *ctx, GLuint samplerIndex)
+make_bitmap_fragment_program(struct gl_context *ctx, GLuint samplerIndex)
{
struct st_context *st = st_context(ctx);
struct st_fragment_program *stfp;
@@ -187,7 +187,7 @@ find_free_bit(uint bitfield)
* Combine basic bitmap fragment program with the user-defined program.
*/
static struct st_fragment_program *
-combined_bitmap_fragment_program(GLcontext *ctx)
+combined_bitmap_fragment_program(struct gl_context *ctx)
{
struct st_context *st = st_context(ctx);
struct st_fragment_program *stfp = st->fp;
@@ -256,7 +256,7 @@ unpack_bitmap(struct st_context *st,
* Create a texture which represents a bitmap image.
*/
static struct pipe_resource *
-make_bitmap_texture(GLcontext *ctx, GLsizei width, GLsizei height,
+make_bitmap_texture(struct gl_context *ctx, GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack,
const GLubyte *bitmap)
{
@@ -403,7 +403,7 @@ setup_bitmap_vertex_data(struct st_context *st, bool normalized,
* Render a glBitmap by drawing a textured quad
*/
static void
-draw_bitmap_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
+draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
GLsizei width, GLsizei height,
struct pipe_sampler_view *sv,
const GLfloat *color)
@@ -737,7 +737,7 @@ accum_bitmap(struct st_context *st,
* Called via ctx->Driver.Bitmap()
*/
static void
-st_Bitmap(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
+st_Bitmap(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack, const GLubyte *bitmap )
{
struct st_context *st = st_context(ctx);
diff --git a/src/mesa/state_tracker/st_cb_blit.c b/src/mesa/state_tracker/st_cb_blit.c
index 536748402f4..af41835326a 100644
--- a/src/mesa/state_tracker/st_cb_blit.c
+++ b/src/mesa/state_tracker/st_cb_blit.c
@@ -61,7 +61,7 @@ st_destroy_blit(struct st_context *st)
#if FEATURE_EXT_framebuffer_blit
static void
-st_BlitFramebuffer(GLcontext *ctx,
+st_BlitFramebuffer(struct gl_context *ctx,
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
GLbitfield mask, GLenum filter)
diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c
index 7991a93a1e6..27540c36ce7 100644
--- a/src/mesa/state_tracker/st_cb_bufferobjects.c
+++ b/src/mesa/state_tracker/st_cb_bufferobjects.c
@@ -51,7 +51,7 @@
* internal structure where somehow shared.
*/
static struct gl_buffer_object *
-st_bufferobj_alloc(GLcontext *ctx, GLuint name, GLenum target)
+st_bufferobj_alloc(struct gl_context *ctx, GLuint name, GLenum target)
{
struct st_buffer_object *st_obj = ST_CALLOC_STRUCT(st_buffer_object);
@@ -70,7 +70,7 @@ st_bufferobj_alloc(GLcontext *ctx, GLuint name, GLenum target)
* Called via glDeleteBuffersARB().
*/
static void
-st_bufferobj_free(GLcontext *ctx, struct gl_buffer_object *obj)
+st_bufferobj_free(struct gl_context *ctx, struct gl_buffer_object *obj)
{
struct st_buffer_object *st_obj = st_buffer_object(obj);
@@ -92,7 +92,7 @@ st_bufferobj_free(GLcontext *ctx, struct gl_buffer_object *obj)
* Called via glBufferSubDataARB().
*/
static void
-st_bufferobj_subdata(GLcontext *ctx,
+st_bufferobj_subdata(struct gl_context *ctx,
GLenum target,
GLintptrARB offset,
GLsizeiptrARB size,
@@ -132,7 +132,7 @@ st_bufferobj_subdata(GLcontext *ctx,
* Called via glGetBufferSubDataARB().
*/
static void
-st_bufferobj_get_subdata(GLcontext *ctx,
+st_bufferobj_get_subdata(struct gl_context *ctx,
GLenum target,
GLintptrARB offset,
GLsizeiptrARB size,
@@ -161,7 +161,7 @@ st_bufferobj_get_subdata(GLcontext *ctx,
* \return GL_TRUE for success, GL_FALSE if out of memory
*/
static GLboolean
-st_bufferobj_data(GLcontext *ctx,
+st_bufferobj_data(struct gl_context *ctx,
GLenum target,
GLsizeiptrARB size,
const GLvoid * data,
@@ -214,7 +214,7 @@ st_bufferobj_data(GLcontext *ctx,
* Called via glMapBufferARB().
*/
static void *
-st_bufferobj_map(GLcontext *ctx, GLenum target, GLenum access,
+st_bufferobj_map(struct gl_context *ctx, GLenum target, GLenum access,
struct gl_buffer_object *obj)
{
struct st_buffer_object *st_obj = st_buffer_object(obj);
@@ -257,7 +257,7 @@ st_bufferobj_zero_length_range = 0;
* Called via glMapBufferRange().
*/
static void *
-st_bufferobj_map_range(GLcontext *ctx, GLenum target,
+st_bufferobj_map_range(struct gl_context *ctx, GLenum target,
GLintptr offset, GLsizeiptr length, GLbitfield access,
struct gl_buffer_object *obj)
{
@@ -317,7 +317,7 @@ st_bufferobj_map_range(GLcontext *ctx, GLenum target,
static void
-st_bufferobj_flush_mapped_range(GLcontext *ctx, GLenum target,
+st_bufferobj_flush_mapped_range(struct gl_context *ctx, GLenum target,
GLintptr offset, GLsizeiptr length,
struct gl_buffer_object *obj)
{
@@ -342,7 +342,7 @@ st_bufferobj_flush_mapped_range(GLcontext *ctx, GLenum target,
* Called via glUnmapBufferARB().
*/
static GLboolean
-st_bufferobj_unmap(GLcontext *ctx, GLenum target, struct gl_buffer_object *obj)
+st_bufferobj_unmap(struct gl_context *ctx, GLenum target, struct gl_buffer_object *obj)
{
struct pipe_context *pipe = st_context(ctx)->pipe;
struct st_buffer_object *st_obj = st_buffer_object(obj);
@@ -362,7 +362,7 @@ st_bufferobj_unmap(GLcontext *ctx, GLenum target, struct gl_buffer_object *obj)
* Called via glCopyBufferSubData().
*/
static void
-st_copy_buffer_subdata(GLcontext *ctx,
+st_copy_buffer_subdata(struct gl_context *ctx,
struct gl_buffer_object *src,
struct gl_buffer_object *dst,
GLintptr readOffset, GLintptr writeOffset,
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index 246ab2e9579..bd1dd78b23c 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -191,7 +191,7 @@ draw_quad(struct st_context *st,
* ctx->DrawBuffer->_X/Ymin/max fields.
*/
static void
-clear_with_quad(GLcontext *ctx,
+clear_with_quad(struct gl_context *ctx,
GLboolean color, GLboolean depth, GLboolean stencil)
{
struct st_context *st = st_context(ctx);
@@ -316,7 +316,7 @@ clear_with_quad(GLcontext *ctx,
* Determine if we need to clear the depth buffer by drawing a quad.
*/
static INLINE GLboolean
-check_clear_color_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
+check_clear_color_with_quad(struct gl_context *ctx, struct gl_renderbuffer *rb)
{
if (ctx->Scissor.Enabled &&
(ctx->Scissor.X != 0 ||
@@ -340,7 +340,7 @@ check_clear_color_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
* drawing a quad.
*/
static INLINE GLboolean
-check_clear_depth_stencil_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
+check_clear_depth_stencil_with_quad(struct gl_context *ctx, struct gl_renderbuffer *rb)
{
const GLuint stencilMax = 0xff;
GLboolean maskStencil
@@ -368,7 +368,7 @@ check_clear_depth_stencil_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
* Determine if we need to clear the depth buffer by drawing a quad.
*/
static INLINE GLboolean
-check_clear_depth_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb,
+check_clear_depth_with_quad(struct gl_context *ctx, struct gl_renderbuffer *rb,
boolean ds_separate)
{
const struct st_renderbuffer *strb = st_renderbuffer(rb);
@@ -392,7 +392,7 @@ check_clear_depth_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb,
* Determine if we need to clear the stencil buffer by drawing a quad.
*/
static INLINE GLboolean
-check_clear_stencil_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb,
+check_clear_stencil_with_quad(struct gl_context *ctx, struct gl_renderbuffer *rb,
boolean ds_separate)
{
const struct st_renderbuffer *strb = st_renderbuffer(rb);
@@ -447,7 +447,7 @@ st_flush_clear(struct st_context *st)
* Called via ctx->Driver.Clear()
*/
static void
-st_Clear(GLcontext *ctx, GLbitfield mask)
+st_Clear(struct gl_context *ctx, GLbitfield mask)
{
static const GLbitfield BUFFER_BITS_DS
= (BUFFER_BIT_DEPTH | BUFFER_BIT_STENCIL);
diff --git a/src/mesa/state_tracker/st_cb_condrender.c b/src/mesa/state_tracker/st_cb_condrender.c
index b509d43b7c6..7766ead48b5 100644
--- a/src/mesa/state_tracker/st_cb_condrender.c
+++ b/src/mesa/state_tracker/st_cb_condrender.c
@@ -47,7 +47,7 @@
* Called via ctx->Driver.BeginConditionalRender()
*/
static void
-st_BeginConditionalRender(GLcontext *ctx, struct gl_query_object *q,
+st_BeginConditionalRender(struct gl_context *ctx, struct gl_query_object *q,
GLenum mode)
{
struct st_query_object *stq = st_query_object(q);
@@ -80,7 +80,7 @@ st_BeginConditionalRender(GLcontext *ctx, struct gl_query_object *q,
* Called via ctx->Driver.BeginConditionalRender()
*/
static void
-st_EndConditionalRender(GLcontext *ctx, struct gl_query_object *q)
+st_EndConditionalRender(struct gl_context *ctx, struct gl_query_object *q)
{
struct pipe_context *pipe = st_context(ctx)->pipe;
(void) q;
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index fb1fec1aefd..122d8f07654 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -34,31 +34,32 @@
#include "main/image.h"
#include "main/bufferobj.h"
#include "main/macros.h"
+#include "main/pack.h"
#include "main/texformat.h"
#include "main/texstore.h"
#include "program/program.h"
#include "program/prog_print.h"
+#include "program/prog_instruction.h"
-#include "st_debug.h"
-#include "st_context.h"
#include "st_atom.h"
#include "st_atom_constbuf.h"
-#include "st_program.h"
#include "st_cb_drawpixels.h"
#include "st_cb_readpixels.h"
#include "st_cb_fbo.h"
+#include "st_context.h"
+#include "st_debug.h"
#include "st_format.h"
+#include "st_program.h"
#include "st_texture.h"
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
-#include "util/u_inlines.h"
#include "tgsi/tgsi_ureg.h"
-#include "util/u_tile.h"
#include "util/u_draw_quad.h"
#include "util/u_format.h"
+#include "util/u_inlines.h"
#include "util/u_math.h"
-#include "program/prog_instruction.h"
+#include "util/u_tile.h"
#include "cso_cache/cso_context.h"
@@ -96,7 +97,7 @@ is_passthrough_program(const struct gl_fragment_program *prog)
* \return pointer to Gallium driver fragment shader
*/
static void *
-combined_drawpix_fragment_program(GLcontext *ctx)
+combined_drawpix_fragment_program(struct gl_context *ctx)
{
struct st_context *st = st_context(ctx);
struct st_fragment_program *stfp;
@@ -162,20 +163,27 @@ combined_drawpix_fragment_program(GLcontext *ctx)
/**
- * Create fragment shader that does a TEX() instruction to get a Z
- * value, then writes to FRAG_RESULT_DEPTH.
+ * Create fragment shader that does a TEX() instruction to get a Z and/or
+ * stencil value value, then writes to FRAG_RESULT_DEPTH/FRAG_RESULT_STENCIL.
+ * Used for glDrawPixels(GL_DEPTH_COMPONENT / GL_STENCIL_INDEX).
* Pass fragment color through as-is.
* \return pointer to the Gallium driver fragment shader
*/
static void *
-make_fragment_shader_z(struct st_context *st)
+make_fragment_shader_z_stencil(struct st_context *st, GLboolean write_depth,
+ GLboolean write_stencil)
{
- GLcontext *ctx = st->ctx;
+ struct gl_context *ctx = st->ctx;
struct gl_program *p;
+ struct st_fragment_program *stp;
GLuint ic = 0;
+ const GLuint shaderIndex = write_depth * 2 + write_stencil;
- if (st->drawpix.z_shader) {
- return st->drawpix.z_shader->driver_shader;
+ assert(shaderIndex < Elements(st->drawpix.shaders));
+
+ if (st->drawpix.shaders[shaderIndex]) {
+ /* already have the proper shader */
+ return st->drawpix.shaders[shaderIndex]->driver_shader;
}
/*
@@ -185,7 +193,8 @@ make_fragment_shader_z(struct st_context *st)
if (!p)
return NULL;
- p->NumInstructions = 3;
+ p->NumInstructions = write_depth ? 2 : 1;
+ p->NumInstructions += write_stencil ? 1 : 0;
p->Instructions = _mesa_alloc_instructions(p->NumInstructions);
if (!p->Instructions) {
@@ -194,24 +203,31 @@ make_fragment_shader_z(struct st_context *st)
}
_mesa_init_instructions(p->Instructions, p->NumInstructions);
- /* TEX result.depth, fragment.texcoord[0], texture[0], 2D; */
- p->Instructions[ic].Opcode = OPCODE_TEX;
- p->Instructions[ic].DstReg.File = PROGRAM_OUTPUT;
- p->Instructions[ic].DstReg.Index = FRAG_RESULT_DEPTH;
- p->Instructions[ic].DstReg.WriteMask = WRITEMASK_Z;
- p->Instructions[ic].SrcReg[0].File = PROGRAM_INPUT;
- p->Instructions[ic].SrcReg[0].Index = FRAG_ATTRIB_TEX0;
- p->Instructions[ic].TexSrcUnit = 0;
- p->Instructions[ic].TexSrcTarget = TEXTURE_2D_INDEX;
- ic++;
-
- /* MOV result.color, fragment.color */
- p->Instructions[ic].Opcode = OPCODE_MOV;
- p->Instructions[ic].DstReg.File = PROGRAM_OUTPUT;
- p->Instructions[ic].DstReg.Index = FRAG_RESULT_COLOR;
- p->Instructions[ic].SrcReg[0].File = PROGRAM_INPUT;
- p->Instructions[ic].SrcReg[0].Index = FRAG_ATTRIB_COL0;
- ic++;
+ if (write_depth) {
+ /* TEX result.depth, fragment.texcoord[0], texture[0], 2D; */
+ p->Instructions[ic].Opcode = OPCODE_TEX;
+ p->Instructions[ic].DstReg.File = PROGRAM_OUTPUT;
+ p->Instructions[ic].DstReg.Index = FRAG_RESULT_DEPTH;
+ p->Instructions[ic].DstReg.WriteMask = WRITEMASK_Z;
+ p->Instructions[ic].SrcReg[0].File = PROGRAM_INPUT;
+ p->Instructions[ic].SrcReg[0].Index = FRAG_ATTRIB_TEX0;
+ p->Instructions[ic].TexSrcUnit = 0;
+ p->Instructions[ic].TexSrcTarget = TEXTURE_2D_INDEX;
+ ic++;
+ }
+
+ if (write_stencil) {
+ /* TEX result.stencil, fragment.texcoord[0], texture[0], 2D; */
+ p->Instructions[ic].Opcode = OPCODE_TEX;
+ p->Instructions[ic].DstReg.File = PROGRAM_OUTPUT;
+ p->Instructions[ic].DstReg.Index = FRAG_RESULT_STENCIL;
+ p->Instructions[ic].DstReg.WriteMask = WRITEMASK_Y;
+ p->Instructions[ic].SrcReg[0].File = PROGRAM_INPUT;
+ p->Instructions[ic].SrcReg[0].Index = FRAG_ATTRIB_TEX0;
+ p->Instructions[ic].TexSrcUnit = 1;
+ p->Instructions[ic].TexSrcTarget = TEXTURE_2D_INDEX;
+ ic++;
+ }
/* END; */
p->Instructions[ic++].Opcode = OPCODE_END;
@@ -219,13 +235,24 @@ make_fragment_shader_z(struct st_context *st)
assert(ic == p->NumInstructions);
p->InputsRead = FRAG_BIT_TEX0 | FRAG_BIT_COL0;
- p->OutputsWritten = (1 << FRAG_RESULT_COLOR) | (1 << FRAG_RESULT_DEPTH);
- p->SamplersUsed = 0x1; /* sampler 0 (bit 0) is used */
+ p->OutputsWritten = 0;
+ if (write_depth)
+ p->OutputsWritten |= (1 << FRAG_RESULT_DEPTH);
+ if (write_stencil)
+ p->OutputsWritten |= (1 << FRAG_RESULT_STENCIL);
+
+ p->SamplersUsed = 0x1; /* sampler 0 (bit 0) is used */
+ if (write_stencil)
+ p->SamplersUsed |= 1 << 1;
+
+ stp = st_fragment_program((struct gl_fragment_program *) p);
- st->drawpix.z_shader = (struct st_fragment_program *) p;
- st_translate_fragment_program(st, st->drawpix.z_shader);
+ /* save the new shader */
+ st->drawpix.shaders[shaderIndex] = stp;
- return st->drawpix.z_shader->driver_shader;
+ st_translate_fragment_program(st, stp);
+
+ return stp->driver_shader;
}
@@ -239,8 +266,7 @@ make_passthrough_vertex_shader(struct st_context *st,
GLboolean passColor)
{
if (!st->drawpix.vert_shaders[passColor]) {
- struct ureg_program *ureg =
- ureg_create( TGSI_PROCESSOR_VERTEX );
+ struct ureg_program *ureg = ureg_create( TGSI_PROCESSOR_VERTEX );
if (ureg == NULL)
return NULL;
@@ -273,8 +299,8 @@ make_passthrough_vertex_shader(struct st_context *st,
/**
- * Return a texture internalFormat for drawing/copying an image
- * of the given type.
+ * Return a texture base format for drawing/copying an image
+ * of the given format.
*/
static GLenum
base_format(GLenum format)
@@ -293,6 +319,47 @@ base_format(GLenum format)
/**
+ * Return a texture internalFormat for drawing/copying an image
+ * of the given format and type.
+ */
+static GLenum
+internal_format(GLenum format, GLenum type)
+{
+ switch (format) {
+ case GL_DEPTH_COMPONENT:
+ return GL_DEPTH_COMPONENT;
+ case GL_DEPTH_STENCIL:
+ return GL_DEPTH_STENCIL;
+ case GL_STENCIL_INDEX:
+ return GL_STENCIL_INDEX;
+ default:
+ if (_mesa_is_integer_format(format)) {
+ switch (type) {
+ case GL_BYTE:
+ return GL_RGBA8I;
+ case GL_UNSIGNED_BYTE:
+ return GL_RGBA8UI;
+ case GL_SHORT:
+ return GL_RGBA16I;
+ case GL_UNSIGNED_SHORT:
+ return GL_RGBA16UI;
+ case GL_INT:
+ return GL_RGBA32I;
+ case GL_UNSIGNED_INT:
+ return GL_RGBA32UI;
+ default:
+ assert(0 && "Unexpected type in internal_format()");
+ return GL_RGBA_INTEGER;
+ }
+ }
+ else {
+ return GL_RGBA;
+ }
+ }
+}
+
+
+/**
* Create a temporary texture to hold an image of the given size.
* If width, height are not POT and the driver only handles POT textures,
* allocate the next larger size of texture that is POT.
@@ -320,17 +387,19 @@ make_texture(struct st_context *st,
const struct gl_pixelstore_attrib *unpack,
const GLvoid *pixels)
{
- GLcontext *ctx = st->ctx;
+ struct gl_context *ctx = st->ctx;
struct pipe_context *pipe = st->pipe;
gl_format mformat;
struct pipe_resource *pt;
enum pipe_format pipeFormat;
GLuint cpp;
- GLenum baseFormat;
+ GLenum baseFormat, intFormat;
baseFormat = base_format(format);
+ intFormat = internal_format(format, type);
- mformat = st_ChooseTextureFormat(ctx, baseFormat, format, type);
+ mformat = st_ChooseTextureFormat_renderable(ctx, intFormat,
+ format, type, GL_FALSE);
assert(mformat);
pipeFormat = st_mesa_format_to_pipe_format(mformat);
@@ -405,7 +474,7 @@ make_texture(struct st_context *st,
* \param invertTex if true, flip texcoords vertically
*/
static void
-draw_quad(GLcontext *ctx, GLfloat x0, GLfloat y0, GLfloat z,
+draw_quad(struct gl_context *ctx, GLfloat x0, GLfloat y0, GLfloat z,
GLfloat x1, GLfloat y1, const GLfloat *color,
GLboolean invertTex, GLfloat maxXcoord, GLfloat maxYcoord)
{
@@ -495,30 +564,34 @@ draw_quad(GLcontext *ctx, GLfloat x0, GLfloat y0, GLfloat z,
static void
-draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
+draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
GLsizei width, GLsizei height,
GLfloat zoomX, GLfloat zoomY,
- struct pipe_sampler_view *sv,
+ struct pipe_sampler_view **sv,
+ int num_sampler_view,
void *driver_vp,
void *driver_fp,
const GLfloat *color,
- GLboolean invertTex)
+ GLboolean invertTex,
+ GLboolean write_depth, GLboolean write_stencil)
{
struct st_context *st = st_context(ctx);
struct pipe_context *pipe = st->pipe;
struct cso_context *cso = st->cso_context;
GLfloat x0, y0, x1, y1;
GLsizei maxSize;
- boolean normalized = sv->texture->target != PIPE_TEXTURE_RECT;
+ boolean normalized = sv[0]->texture->target != PIPE_TEXTURE_RECT;
/* limit checks */
/* XXX if DrawPixels image is larger than max texture size, break
* it up into chunks.
*/
- maxSize = 1 << (pipe->screen->get_param(pipe->screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS) - 1);
+ maxSize = 1 << (pipe->screen->get_param(pipe->screen,
+ PIPE_CAP_MAX_TEXTURE_2D_LEVELS) - 1);
assert(width <= maxSize);
assert(height <= maxSize);
+ cso_save_depth_stencil_alpha(cso);
cso_save_rasterizer(cso);
cso_save_viewport(cso);
cso_save_samplers(cso);
@@ -536,6 +609,24 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
cso_set_rasterizer(cso, &rasterizer);
}
+ if (write_depth || write_stencil)
+ {
+ struct pipe_depth_stencil_alpha_state dsa;
+ memset(&dsa, 0, sizeof(dsa));
+ if (write_depth) {
+ dsa.depth.enabled = 1;
+ dsa.depth.func = PIPE_FUNC_ALWAYS;
+ dsa.depth.writemask = 1;
+ }
+ if (write_stencil) {
+ dsa.stencil[0].enabled = 1;
+ dsa.stencil[0].func = PIPE_FUNC_ALWAYS;
+ dsa.stencil[0].writemask = 0xff;
+ dsa.stencil[0].zpass_op = PIPE_STENCIL_OP_REPLACE;
+ }
+ cso_set_depth_stencil_alpha(cso, &dsa);
+ }
+
/* fragment shader state: TEX lookup program */
cso_set_fragment_shader_handle(cso, driver_fp);
@@ -556,7 +647,7 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
sampler.normalized_coords = normalized;
cso_single_sampler(cso, 0, &sampler);
- if (st->pixel_xfer.pixelmap_enabled) {
+ if (num_sampler_view > 1) {
cso_single_sampler(cso, 1, &sampler);
}
cso_single_sampler_done(cso);
@@ -581,15 +672,7 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
cso_set_vertex_elements(cso, 3, st->velems_util_draw);
/* texture state: */
- if (st->pixel_xfer.pixelmap_enabled) {
- struct pipe_sampler_view *sampler_views[2];
- sampler_views[0] = sv;
- sampler_views[1] = st->pixel_xfer.pixelmap_sampler_view;
- cso_set_fragment_sampler_views(cso, 2, sampler_views);
- }
- else {
- cso_set_fragment_sampler_views(cso, 1, &sv);
- }
+ cso_set_fragment_sampler_views(cso, num_sampler_view, sv);
/* Compute Gallium window coords (y=0=top) with pixel zoom.
* Recall that these coords are transformed by the current
@@ -609,10 +692,11 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
z = z * 2.0 - 1.0;
draw_quad(ctx, x0, y0, z, x1, y1, color, invertTex,
- normalized ? ((GLfloat) width / sv->texture->width0) : (GLfloat)width,
- normalized ? ((GLfloat) height / sv->texture->height0) : (GLfloat)height);
+ normalized ? ((GLfloat) width / sv[0]->texture->width0) : (GLfloat)width,
+ normalized ? ((GLfloat) height / sv[0]->texture->height0) : (GLfloat)height);
/* restore state */
+ cso_restore_depth_stencil_alpha(cso);
cso_restore_rasterizer(cso);
cso_restore_viewport(cso);
cso_restore_samplers(cso);
@@ -623,8 +707,12 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
}
+/**
+ * Software fallback to do glDrawPixels(GL_STENCIL_INDEX) when we
+ * can't use a fragment shader to write stencil values.
+ */
static void
-draw_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
+draw_stencil_pixels(struct gl_context *ctx, GLint x, GLint y,
GLsizei width, GLsizei height, GLenum format, GLenum type,
const struct gl_pixelstore_attrib *unpack,
const GLvoid *pixels)
@@ -655,7 +743,8 @@ draw_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
}
if(format != GL_DEPTH_STENCIL &&
- util_format_get_component_bits(strb->format, UTIL_FORMAT_COLORSPACE_ZS, 0) != 0)
+ util_format_get_component_bits(strb->format,
+ UTIL_FORMAT_COLORSPACE_ZS, 0) != 0)
usage = PIPE_TRANSFER_READ_WRITE;
else
usage = PIPE_TRANSFER_WRITE;
@@ -773,19 +862,44 @@ draw_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
* Called via ctx->Driver.DrawPixels()
*/
static void
-st_DrawPixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
+st_DrawPixels(struct gl_context *ctx, GLint x, GLint y,
+ GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *unpack, const GLvoid *pixels)
{
void *driver_vp, *driver_fp;
struct st_context *st = st_context(ctx);
const GLfloat *color;
-
- if (format == GL_STENCIL_INDEX ||
- format == GL_DEPTH_STENCIL) {
- draw_stencil_pixels(ctx, x, y, width, height, format, type,
- unpack, pixels);
- return;
+ struct pipe_context *pipe = st->pipe;
+ GLboolean write_stencil = GL_FALSE, write_depth = GL_FALSE;
+ struct pipe_sampler_view *sv[2];
+ int num_sampler_view = 1;
+ enum pipe_format stencil_format = PIPE_FORMAT_NONE;
+
+ if (format == GL_DEPTH_STENCIL)
+ write_stencil = write_depth = GL_TRUE;
+ else if (format == GL_STENCIL_INDEX)
+ write_stencil = GL_TRUE;
+ else if (format == GL_DEPTH_COMPONENT)
+ write_depth = GL_TRUE;
+
+ if (write_stencil) {
+ enum pipe_format tex_format;
+ /* can we write to stencil if not fallback */
+ if (!pipe->screen->get_param(pipe->screen, PIPE_CAP_SHADER_STENCIL_EXPORT))
+ goto stencil_fallback;
+
+ tex_format = st_choose_format(st->pipe->screen, base_format(format),
+ PIPE_TEXTURE_2D,
+ 0, PIPE_BIND_SAMPLER_VIEW);
+ if (tex_format == PIPE_FORMAT_Z24_UNORM_S8_USCALED)
+ stencil_format = PIPE_FORMAT_X24S8_USCALED;
+ else if (tex_format == PIPE_FORMAT_S8_USCALED_Z24_UNORM)
+ stencil_format = PIPE_FORMAT_S8X24_USCALED;
+ else
+ stencil_format = PIPE_FORMAT_S8_USCALED;
+ if (stencil_format == PIPE_FORMAT_NONE)
+ goto stencil_fallback;
}
/* Mesa state should be up to date by now */
@@ -793,8 +907,8 @@ st_DrawPixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
st_validate_state(st);
- if (format == GL_DEPTH_COMPONENT) {
- driver_fp = make_fragment_shader_z(st);
+ if (write_depth || write_stencil) {
+ driver_fp = make_fragment_shader_z_stencil(st, write_depth, write_stencil);
driver_vp = make_passthrough_vertex_shader(st, GL_TRUE);
color = ctx->Current.RasterColor;
}
@@ -802,6 +916,10 @@ st_DrawPixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
driver_fp = combined_drawpix_fragment_program(ctx);
driver_vp = make_passthrough_vertex_shader(st, GL_FALSE);
color = NULL;
+ if (st->pixel_xfer.pixelmap_enabled) {
+ sv[1] = st->pixel_xfer.pixelmap_sampler_view;
+ num_sampler_view++;
+ }
}
/* draw with textured quad */
@@ -809,26 +927,44 @@ st_DrawPixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
struct pipe_resource *pt
= make_texture(st, width, height, format, type, unpack, pixels);
if (pt) {
- struct pipe_sampler_view *sv = st_create_texture_sampler_view(st->pipe, pt);
+ sv[0] = st_create_texture_sampler_view(st->pipe, pt);
+
+ if (sv[0]) {
+ if (write_stencil) {
+ sv[1] = st_create_texture_sampler_view_format(st->pipe, pt,
+ stencil_format);
+ num_sampler_view++;
+ }
- if (sv) {
draw_textured_quad(ctx, x, y, ctx->Current.RasterPos[2],
- width, height, ctx->Pixel.ZoomX, ctx->Pixel.ZoomY,
+ width, height,
+ ctx->Pixel.ZoomX, ctx->Pixel.ZoomY,
sv,
- driver_vp,
+ num_sampler_view,
+ driver_vp,
driver_fp,
- color, GL_FALSE);
- pipe_sampler_view_reference(&sv, NULL);
+ color, GL_FALSE, write_depth, write_stencil);
+ pipe_sampler_view_reference(&sv[0], NULL);
+ if (num_sampler_view > 1)
+ pipe_sampler_view_reference(&sv[1], NULL);
}
pipe_resource_reference(&pt, NULL);
}
}
+ return;
+
+stencil_fallback:
+ draw_stencil_pixels(ctx, x, y, width, height, format, type,
+ unpack, pixels);
}
+/**
+ * Software fallback for glCopyPixels(GL_STENCIL).
+ */
static void
-copy_stencil_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
+copy_stencil_pixels(struct gl_context *ctx, GLint srcx, GLint srcy,
GLsizei width, GLsizei height,
GLint dstx, GLint dsty)
{
@@ -858,7 +994,8 @@ copy_stencil_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
GL_STENCIL_INDEX, GL_UNSIGNED_BYTE,
&ctx->DefaultPacking, buffer);
- if(util_format_get_component_bits(rbDraw->format, UTIL_FORMAT_COLORSPACE_ZS, 0) != 0)
+ if (util_format_get_component_bits(rbDraw->format,
+ UTIL_FORMAT_COLORSPACE_ZS, 0) != 0)
usage = PIPE_TRANSFER_READ_WRITE;
else
usage = PIPE_TRANSFER_WRITE;
@@ -935,7 +1072,7 @@ copy_stencil_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
static void
-st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
+st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
GLsizei width, GLsizei height,
GLint dstx, GLint dsty, GLenum type)
{
@@ -945,7 +1082,8 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
struct st_renderbuffer *rbRead;
void *driver_vp, *driver_fp;
struct pipe_resource *pt;
- struct pipe_sampler_view *sv;
+ struct pipe_sampler_view *sv[2];
+ int num_sampler_view = 1;
GLfloat *color;
enum pipe_format srcFormat, texFormat;
GLboolean invertTex = GL_FALSE;
@@ -966,12 +1104,16 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
color = NULL;
driver_fp = combined_drawpix_fragment_program(ctx);
driver_vp = make_passthrough_vertex_shader(st, GL_FALSE);
+ if (st->pixel_xfer.pixelmap_enabled) {
+ sv[1] = st->pixel_xfer.pixelmap_sampler_view;
+ num_sampler_view++;
+ }
}
else {
assert(type == GL_DEPTH);
rbRead = st_renderbuffer(ctx->ReadBuffer->_DepthBuffer);
color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
- driver_fp = make_fragment_shader_z(st);
+ driver_fp = make_fragment_shader_z_stencil(st, GL_TRUE, GL_FALSE);
driver_vp = make_passthrough_vertex_shader(st, GL_TRUE);
}
@@ -986,7 +1128,8 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
srcFormat = rbRead->texture->format;
- if (screen->is_format_supported(screen, srcFormat, st->internal_target, sample_count,
+ if (screen->is_format_supported(screen, srcFormat, st->internal_target,
+ sample_count,
PIPE_BIND_SAMPLER_VIEW, 0)) {
texFormat = srcFormat;
}
@@ -1031,8 +1174,8 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
if (!pt)
return;
- sv = st_create_texture_sampler_view(st->pipe, pt);
- if (!sv) {
+ sv[0] = st_create_texture_sampler_view(st->pipe, pt);
+ if (!sv[0]) {
pipe_resource_reference(&pt, NULL);
return;
}
@@ -1102,13 +1245,14 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
*/
draw_textured_quad(ctx, dstx, dsty, ctx->Current.RasterPos[2],
width, height, ctx->Pixel.ZoomX, ctx->Pixel.ZoomY,
- sv,
+ sv,
+ num_sampler_view,
driver_vp,
driver_fp,
- color, invertTex);
+ color, invertTex, GL_FALSE, GL_FALSE);
pipe_resource_reference(&pt, NULL);
- pipe_sampler_view_reference(&sv, NULL);
+ pipe_sampler_view_reference(&sv[0], NULL);
}
@@ -1123,7 +1267,13 @@ void st_init_drawpixels_functions(struct dd_function_table *functions)
void
st_destroy_drawpix(struct st_context *st)
{
- st_reference_fragprog(st, &st->drawpix.z_shader, NULL);
+ GLuint i;
+
+ for (i = 0; i < Elements(st->drawpix.shaders); i++) {
+ if (st->drawpix.shaders[i])
+ st_reference_fragprog(st, &st->drawpix.shaders[i], NULL);
+ }
+
st_reference_fragprog(st, &st->pixel_xfer.combined_prog, NULL);
if (st->drawpix.vert_shaders[0])
ureg_free_tokens(st->drawpix.vert_shaders[0]);
diff --git a/src/mesa/state_tracker/st_cb_drawtex.c b/src/mesa/state_tracker/st_cb_drawtex.c
index c99a8d792ed..6cad7d3216e 100644
--- a/src/mesa/state_tracker/st_cb_drawtex.c
+++ b/src/mesa/state_tracker/st_cb_drawtex.c
@@ -100,7 +100,7 @@ lookup_shader(struct pipe_context *pipe,
}
static void
-st_DrawTex(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
+st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
GLfloat width, GLfloat height)
{
struct st_context *st = ctx->st;
diff --git a/src/mesa/state_tracker/st_cb_eglimage.c b/src/mesa/state_tracker/st_cb_eglimage.c
index 3145416383b..298f8a5b12b 100644
--- a/src/mesa/state_tracker/st_cb_eglimage.c
+++ b/src/mesa/state_tracker/st_cb_eglimage.c
@@ -71,7 +71,7 @@ st_pipe_format_to_base_format(enum pipe_format format)
}
static void
-st_egl_image_target_renderbuffer_storage(GLcontext *ctx,
+st_egl_image_target_renderbuffer_storage(struct gl_context *ctx,
struct gl_renderbuffer *rb,
GLeglImageOES image_handle)
{
@@ -98,7 +98,7 @@ st_egl_image_target_renderbuffer_storage(GLcontext *ctx,
}
static void
-st_bind_surface(GLcontext *ctx, GLenum target,
+st_bind_surface(struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage,
struct pipe_surface *ps)
@@ -139,7 +139,7 @@ st_bind_surface(GLcontext *ctx, GLenum target,
}
static void
-st_egl_image_target_texture_2d(GLcontext *ctx, GLenum target,
+st_egl_image_target_texture_2d(struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage,
GLeglImageOES image_handle)
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index ac1f6812b85..9425f07aee6 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -60,7 +60,7 @@
* during window resize.
*/
static GLboolean
-st_renderbuffer_alloc_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
+st_renderbuffer_alloc_storage(struct gl_context * ctx, struct gl_renderbuffer *rb,
GLenum internalFormat,
GLuint width, GLuint height)
{
@@ -164,7 +164,7 @@ st_renderbuffer_delete(struct gl_renderbuffer *rb)
* gl_renderbuffer::GetPointer()
*/
static void *
-null_get_pointer(GLcontext * ctx, struct gl_renderbuffer *rb,
+null_get_pointer(struct gl_context * ctx, struct gl_renderbuffer *rb,
GLint x, GLint y)
{
/* By returning NULL we force all software rendering to go through
@@ -181,7 +181,7 @@ null_get_pointer(GLcontext * ctx, struct gl_renderbuffer *rb,
* Called via ctx->Driver.NewFramebuffer()
*/
static struct gl_framebuffer *
-st_new_framebuffer(GLcontext *ctx, GLuint name)
+st_new_framebuffer(struct gl_context *ctx, GLuint name)
{
/* XXX not sure we need to subclass gl_framebuffer for pipe */
return _mesa_new_framebuffer(ctx, name);
@@ -192,7 +192,7 @@ st_new_framebuffer(GLcontext *ctx, GLuint name)
* Called via ctx->Driver.NewRenderbuffer()
*/
static struct gl_renderbuffer *
-st_new_renderbuffer(GLcontext *ctx, GLuint name)
+st_new_renderbuffer(struct gl_context *ctx, GLuint name)
{
struct st_renderbuffer *strb = ST_CALLOC_STRUCT(st_renderbuffer);
if (strb) {
@@ -297,7 +297,7 @@ st_new_renderbuffer_fb(enum pipe_format format, int samples, boolean sw)
* Called via ctx->Driver.BindFramebufferEXT().
*/
static void
-st_bind_framebuffer(GLcontext *ctx, GLenum target,
+st_bind_framebuffer(struct gl_context *ctx, GLenum target,
struct gl_framebuffer *fb, struct gl_framebuffer *fbread)
{
@@ -307,7 +307,7 @@ st_bind_framebuffer(GLcontext *ctx, GLenum target,
* Called by ctx->Driver.FramebufferRenderbuffer
*/
static void
-st_framebuffer_renderbuffer(GLcontext *ctx,
+st_framebuffer_renderbuffer(struct gl_context *ctx,
struct gl_framebuffer *fb,
GLenum attachment,
struct gl_renderbuffer *rb)
@@ -321,7 +321,7 @@ st_framebuffer_renderbuffer(GLcontext *ctx,
* Called by ctx->Driver.RenderTexture
*/
static void
-st_render_texture(GLcontext *ctx,
+st_render_texture(struct gl_context *ctx,
struct gl_framebuffer *fb,
struct gl_renderbuffer_attachment *att)
{
@@ -411,7 +411,7 @@ st_render_texture(GLcontext *ctx,
* Called via ctx->Driver.FinishRenderTexture.
*/
static void
-st_finish_render_texture(GLcontext *ctx,
+st_finish_render_texture(struct gl_context *ctx,
struct gl_renderbuffer_attachment *att)
{
struct st_context *st = st_context(ctx);
@@ -490,7 +490,7 @@ st_is_depth_stencil_combined(const struct gl_renderbuffer_attachment *depth,
* For Gallium we only supports combined Z+stencil, not separate buffers.
*/
static void
-st_validate_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb)
+st_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
{
struct st_context *st = st_context(ctx);
struct pipe_screen *screen = st->pipe->screen;
@@ -544,10 +544,10 @@ st_validate_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb)
* Called via glDrawBuffer.
*/
static void
-st_DrawBuffers(GLcontext *ctx, GLsizei count, const GLenum *buffers)
+st_DrawBuffers(struct gl_context *ctx, GLsizei count, const GLenum *buffers)
{
struct st_context *st = st_context(ctx);
- GLframebuffer *fb = ctx->DrawBuffer;
+ struct gl_framebuffer *fb = ctx->DrawBuffer;
GLuint i;
(void) count;
@@ -565,10 +565,10 @@ st_DrawBuffers(GLcontext *ctx, GLsizei count, const GLenum *buffers)
* Called via glReadBuffer.
*/
static void
-st_ReadBuffer(GLcontext *ctx, GLenum buffer)
+st_ReadBuffer(struct gl_context *ctx, GLenum buffer)
{
struct st_context *st = st_context(ctx);
- GLframebuffer *fb = ctx->ReadBuffer;
+ struct gl_framebuffer *fb = ctx->ReadBuffer;
(void) buffer;
diff --git a/src/mesa/state_tracker/st_cb_feedback.c b/src/mesa/state_tracker/st_cb_feedback.c
index e57730b5ecd..5c01856f033 100644
--- a/src/mesa/state_tracker/st_cb_feedback.c
+++ b/src/mesa/state_tracker/st_cb_feedback.c
@@ -62,7 +62,7 @@
struct feedback_stage
{
struct draw_stage stage; /**< Base class */
- GLcontext *ctx; /**< Rendering context */
+ struct gl_context *ctx; /**< Rendering context */
GLboolean reset_stipple_counter;
};
@@ -79,7 +79,7 @@ feedback_stage( struct draw_stage *stage )
static void
-feedback_vertex(GLcontext *ctx, const struct draw_context *draw,
+feedback_vertex(struct gl_context *ctx, const struct draw_context *draw,
const struct vertex_header *v)
{
const struct st_context *st = st_context(ctx);
@@ -179,7 +179,7 @@ feedback_destroy( struct draw_stage *stage )
* Create GL feedback drawing stage.
*/
static struct draw_stage *
-draw_glfeedback_stage(GLcontext *ctx, struct draw_context *draw)
+draw_glfeedback_stage(struct gl_context *ctx, struct draw_context *draw)
{
struct feedback_stage *fs = ST_CALLOC_STRUCT(feedback_stage);
@@ -252,7 +252,7 @@ select_destroy( struct draw_stage *stage )
* Create GL selection mode drawing stage.
*/
static struct draw_stage *
-draw_glselect_stage(GLcontext *ctx, struct draw_context *draw)
+draw_glselect_stage(struct gl_context *ctx, struct draw_context *draw)
{
struct feedback_stage *fs = ST_CALLOC_STRUCT(feedback_stage);
@@ -271,7 +271,7 @@ draw_glselect_stage(GLcontext *ctx, struct draw_context *draw)
static void
-st_RenderMode(GLcontext *ctx, GLenum newMode )
+st_RenderMode(struct gl_context *ctx, GLenum newMode )
{
struct st_context *st = st_context(ctx);
struct draw_context *draw = st->draw;
diff --git a/src/mesa/state_tracker/st_cb_flush.c b/src/mesa/state_tracker/st_cb_flush.c
index 8c9959f9544..5a2343d3aec 100644
--- a/src/mesa/state_tracker/st_cb_flush.c
+++ b/src/mesa/state_tracker/st_cb_flush.c
@@ -51,7 +51,7 @@
static INLINE GLboolean
is_front_buffer_dirty(struct st_context *st)
{
- GLframebuffer *fb = st->ctx->DrawBuffer;
+ struct gl_framebuffer *fb = st->ctx->DrawBuffer;
struct st_renderbuffer *strb
= st_renderbuffer(fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer);
return strb && strb->defined;
@@ -64,7 +64,7 @@ is_front_buffer_dirty(struct st_context *st)
static void
display_front_buffer(struct st_context *st)
{
- GLframebuffer *fb = st->ctx->DrawBuffer;
+ struct gl_framebuffer *fb = st->ctx->DrawBuffer;
struct st_renderbuffer *strb
= st_renderbuffer(fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer);
@@ -113,7 +113,7 @@ void st_finish( struct st_context *st )
/**
* Called via ctx->Driver.Flush()
*/
-static void st_glFlush(GLcontext *ctx)
+static void st_glFlush(struct gl_context *ctx)
{
struct st_context *st = st_context(ctx);
@@ -133,7 +133,7 @@ static void st_glFlush(GLcontext *ctx)
/**
* Called via ctx->Driver.Finish()
*/
-static void st_glFinish(GLcontext *ctx)
+static void st_glFinish(struct gl_context *ctx)
{
struct st_context *st = st_context(ctx);
diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c
index 6aa7e79af95..4d83fcc6ccb 100644
--- a/src/mesa/state_tracker/st_cb_program.c
+++ b/src/mesa/state_tracker/st_cb_program.c
@@ -53,7 +53,7 @@ static GLuint SerialNo = 1;
* Called via ctx->Driver.BindProgram() to bind an ARB vertex or
* fragment program.
*/
-static void st_bind_program( GLcontext *ctx,
+static void st_bind_program( struct gl_context *ctx,
GLenum target,
struct gl_program *prog )
{
@@ -77,7 +77,7 @@ static void st_bind_program( GLcontext *ctx,
* Called via ctx->Driver.UseProgram() to bind a linked GLSL program
* (vertex shader + fragment shader).
*/
-static void st_use_program( GLcontext *ctx, struct gl_shader_program *shProg)
+static void st_use_program( struct gl_context *ctx, struct gl_shader_program *shProg)
{
struct st_context *st = st_context(ctx);
@@ -92,7 +92,7 @@ static void st_use_program( GLcontext *ctx, struct gl_shader_program *shProg)
* Called via ctx->Driver.NewProgram() to allocate a new vertex or
* fragment program.
*/
-static struct gl_program *st_new_program( GLcontext *ctx,
+static struct gl_program *st_new_program( struct gl_context *ctx,
GLenum target,
GLuint id )
{
@@ -139,7 +139,7 @@ static struct gl_program *st_new_program( GLcontext *ctx,
void
-st_delete_program(GLcontext *ctx, struct gl_program *prog)
+st_delete_program(struct gl_context *ctx, struct gl_program *prog)
{
struct st_context *st = st_context(ctx);
@@ -195,7 +195,7 @@ st_delete_program(GLcontext *ctx, struct gl_program *prog)
}
-static GLboolean st_is_program_native( GLcontext *ctx,
+static GLboolean st_is_program_native( struct gl_context *ctx,
GLenum target,
struct gl_program *prog )
{
@@ -203,7 +203,7 @@ static GLboolean st_is_program_native( GLcontext *ctx,
}
-static GLboolean st_program_string_notify( GLcontext *ctx,
+static GLboolean st_program_string_notify( struct gl_context *ctx,
GLenum target,
struct gl_program *prog )
{
diff --git a/src/mesa/state_tracker/st_cb_program.h b/src/mesa/state_tracker/st_cb_program.h
index 0fd179ef3df..004afb6d812 100644
--- a/src/mesa/state_tracker/st_cb_program.h
+++ b/src/mesa/state_tracker/st_cb_program.h
@@ -37,7 +37,7 @@ extern void
st_init_program_functions(struct dd_function_table *functions);
extern void
-st_delete_program(GLcontext *ctx, struct gl_program *prog);
+st_delete_program(struct gl_context *ctx, struct gl_program *prog);
#endif
diff --git a/src/mesa/state_tracker/st_cb_queryobj.c b/src/mesa/state_tracker/st_cb_queryobj.c
index e423d9d8a51..aa31b3710b5 100644
--- a/src/mesa/state_tracker/st_cb_queryobj.c
+++ b/src/mesa/state_tracker/st_cb_queryobj.c
@@ -35,7 +35,6 @@
#include "main/imports.h"
#include "main/context.h"
-#include "main/image.h"
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
@@ -46,7 +45,7 @@
#if FEATURE_queryobj
static struct gl_query_object *
-st_NewQueryObject(GLcontext *ctx, GLuint id)
+st_NewQueryObject(struct gl_context *ctx, GLuint id)
{
struct st_query_object *stq = ST_CALLOC_STRUCT(st_query_object);
if (stq) {
@@ -62,7 +61,7 @@ st_NewQueryObject(GLcontext *ctx, GLuint id)
static void
-st_DeleteQuery(GLcontext *ctx, struct gl_query_object *q)
+st_DeleteQuery(struct gl_context *ctx, struct gl_query_object *q)
{
struct pipe_context *pipe = st_context(ctx)->pipe;
struct st_query_object *stq = st_query_object(q);
@@ -77,7 +76,7 @@ st_DeleteQuery(GLcontext *ctx, struct gl_query_object *q)
static void
-st_BeginQuery(GLcontext *ctx, struct gl_query_object *q)
+st_BeginQuery(struct gl_context *ctx, struct gl_query_object *q)
{
struct pipe_context *pipe = st_context(ctx)->pipe;
struct st_query_object *stq = st_query_object(q);
@@ -121,7 +120,7 @@ st_BeginQuery(GLcontext *ctx, struct gl_query_object *q)
static void
-st_EndQuery(GLcontext *ctx, struct gl_query_object *q)
+st_EndQuery(struct gl_context *ctx, struct gl_query_object *q)
{
struct pipe_context *pipe = st_context(ctx)->pipe;
struct st_query_object *stq = st_query_object(q);
@@ -131,7 +130,7 @@ st_EndQuery(GLcontext *ctx, struct gl_query_object *q)
static void
-st_WaitQuery(GLcontext *ctx, struct gl_query_object *q)
+st_WaitQuery(struct gl_context *ctx, struct gl_query_object *q)
{
struct pipe_context *pipe = st_context(ctx)->pipe;
struct st_query_object *stq = st_query_object(q);
@@ -153,7 +152,7 @@ st_WaitQuery(GLcontext *ctx, struct gl_query_object *q)
static void
-st_CheckQuery(GLcontext *ctx, struct gl_query_object *q)
+st_CheckQuery(struct gl_context *ctx, struct gl_query_object *q)
{
struct pipe_context *pipe = st_context(ctx)->pipe;
struct st_query_object *stq = st_query_object(q);
diff --git a/src/mesa/state_tracker/st_cb_rasterpos.c b/src/mesa/state_tracker/st_cb_rasterpos.c
index e5f7b6f91e2..15a4f602d1d 100644
--- a/src/mesa/state_tracker/st_cb_rasterpos.c
+++ b/src/mesa/state_tracker/st_cb_rasterpos.c
@@ -57,7 +57,7 @@
struct rastpos_stage
{
struct draw_stage stage; /**< Base class */
- GLcontext *ctx; /**< Rendering context */
+ struct gl_context *ctx; /**< Rendering context */
/* vertex attrib info we can setup once and re-use */
struct gl_client_array array[VERT_ATTRIB_MAX];
@@ -110,7 +110,7 @@ rastpos_destroy(struct draw_stage *stage)
* else copy the current attrib.
*/
static void
-update_attrib(GLcontext *ctx, const GLuint *outputMapping,
+update_attrib(struct gl_context *ctx, const GLuint *outputMapping,
const struct vertex_header *vert,
GLfloat *dest,
GLuint result, GLuint defaultAttrib)
@@ -132,7 +132,7 @@ static void
rastpos_point(struct draw_stage *stage, struct prim_header *prim)
{
struct rastpos_stage *rs = rastpos_stage(stage);
- GLcontext *ctx = rs->ctx;
+ struct gl_context *ctx = rs->ctx;
struct st_context *st = st_context(ctx);
const GLfloat height = (GLfloat) ctx->DrawBuffer->Height;
const GLuint *outputMapping = st->vertex_result_to_slot;
@@ -177,7 +177,7 @@ rastpos_point(struct draw_stage *stage, struct prim_header *prim)
* Create rasterpos "drawing" stage.
*/
static struct rastpos_stage *
-new_draw_rastpos_stage(GLcontext *ctx, struct draw_context *draw)
+new_draw_rastpos_stage(struct gl_context *ctx, struct draw_context *draw)
{
struct rastpos_stage *rs = ST_CALLOC_STRUCT(rastpos_stage);
GLuint i;
@@ -219,7 +219,7 @@ new_draw_rastpos_stage(GLcontext *ctx, struct draw_context *draw)
static void
-st_RasterPos(GLcontext *ctx, const GLfloat v[4])
+st_RasterPos(struct gl_context *ctx, const GLfloat v[4])
{
struct st_context *st = st_context(ctx);
struct draw_context *draw = st->draw;
diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c
index d9e9a527f63..bcd46ac9d54 100644
--- a/src/mesa/state_tracker/st_cb_readpixels.c
+++ b/src/mesa/state_tracker/st_cb_readpixels.c
@@ -37,6 +37,7 @@
#include "main/bufferobj.h"
#include "main/context.h"
#include "main/image.h"
+#include "main/pack.h"
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
@@ -55,7 +56,7 @@
* For color/depth we use get_tile(). For stencil, map the stencil buffer.
*/
void
-st_read_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
+st_read_stencil_pixels(struct gl_context *ctx, GLint x, GLint y,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *packing,
@@ -174,7 +175,7 @@ st_read_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
* commands.
*/
struct st_renderbuffer *
-st_get_color_read_renderbuffer(GLcontext *ctx)
+st_get_color_read_renderbuffer(struct gl_context *ctx)
{
struct gl_framebuffer *fb = ctx->ReadBuffer;
struct st_renderbuffer *strb =
@@ -189,7 +190,7 @@ st_get_color_read_renderbuffer(GLcontext *ctx)
* \return GL_TRUE for success, GL_FALSE for failure
*/
static GLboolean
-st_fast_readpixels(GLcontext *ctx, struct st_renderbuffer *strb,
+st_fast_readpixels(struct gl_context *ctx, struct st_renderbuffer *strb,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *pack,
@@ -320,7 +321,7 @@ st_fast_readpixels(GLcontext *ctx, struct st_renderbuffer *strb,
* Image transfer ops are done in software too.
*/
static void
-st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
+st_readpixels(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *pack,
GLvoid *dest)
diff --git a/src/mesa/state_tracker/st_cb_readpixels.h b/src/mesa/state_tracker/st_cb_readpixels.h
index 9e1f7b4925e..83c9b659e3d 100644
--- a/src/mesa/state_tracker/st_cb_readpixels.h
+++ b/src/mesa/state_tracker/st_cb_readpixels.h
@@ -34,10 +34,10 @@
struct dd_function_table;
extern struct st_renderbuffer *
-st_get_color_read_renderbuffer(GLcontext *ctx);
+st_get_color_read_renderbuffer(struct gl_context *ctx);
extern void
-st_read_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
+st_read_stencil_pixels(struct gl_context *ctx, GLint x, GLint y,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *packing,
diff --git a/src/mesa/state_tracker/st_cb_strings.c b/src/mesa/state_tracker/st_cb_strings.c
index 0fcb427f30a..21323798fd0 100644
--- a/src/mesa/state_tracker/st_cb_strings.c
+++ b/src/mesa/state_tracker/st_cb_strings.c
@@ -42,7 +42,7 @@
#define ST_VERSION_STRING "0.4"
static const GLubyte *
-st_get_string(GLcontext * ctx, GLenum name)
+st_get_string(struct gl_context * ctx, GLenum name)
{
struct st_context *st = st_context(ctx);
struct pipe_screen *screen = st->pipe->screen;
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 9d232d417e4..4c2f7d78960 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -34,6 +34,8 @@
#include "main/imports.h"
#include "main/macros.h"
#include "main/mipmap.h"
+#include "main/pack.h"
+#include "main/pixeltransfer.h"
#include "main/texcompress.h"
#include "main/texfetch.h"
#include "main/texgetimage.h"
@@ -94,7 +96,7 @@ gl_target_to_pipe(GLenum target)
/** called via ctx->Driver.NewTextureImage() */
static struct gl_texture_image *
-st_NewTextureImage(GLcontext * ctx)
+st_NewTextureImage(struct gl_context * ctx)
{
DBG("%s\n", __FUNCTION__);
(void) ctx;
@@ -104,7 +106,7 @@ st_NewTextureImage(GLcontext * ctx)
/** called via ctx->Driver.NewTextureObject() */
static struct gl_texture_object *
-st_NewTextureObject(GLcontext * ctx, GLuint name, GLenum target)
+st_NewTextureObject(struct gl_context * ctx, GLuint name, GLenum target)
{
struct st_texture_object *obj = ST_CALLOC_STRUCT(st_texture_object);
@@ -116,7 +118,7 @@ st_NewTextureObject(GLcontext * ctx, GLuint name, GLenum target)
/** called via ctx->Driver.DeleteTextureObject() */
static void
-st_DeleteTextureObject(GLcontext *ctx,
+st_DeleteTextureObject(struct gl_context *ctx,
struct gl_texture_object *texObj)
{
struct st_context *st = st_context(ctx);
@@ -140,7 +142,7 @@ st_DeleteTextureObject(GLcontext *ctx,
/** called via ctx->Driver.FreeTexImageData() */
static void
-st_FreeTextureImageData(GLcontext * ctx, struct gl_texture_image *texImage)
+st_FreeTextureImageData(struct gl_context * ctx, struct gl_texture_image *texImage)
{
struct st_texture_image *stImage = st_texture_image(texImage);
@@ -411,7 +413,7 @@ strip_texture_border(GLint border,
* \return GL_TRUE for success, GL_FALSE for failure
*/
static GLboolean
-compress_with_blit(GLcontext * ctx,
+compress_with_blit(struct gl_context * ctx,
GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLint width, GLint height, GLint depth,
@@ -522,7 +524,7 @@ compress_with_blit(GLcontext * ctx,
* Do glTexImage1/2/3D().
*/
static void
-st_TexImage(GLcontext * ctx,
+st_TexImage(struct gl_context * ctx,
GLint dims,
GLenum target, GLint level,
GLint internalFormat,
@@ -779,7 +781,7 @@ done:
static void
-st_TexImage3D(GLcontext * ctx,
+st_TexImage3D(struct gl_context * ctx,
GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint depth,
@@ -796,7 +798,7 @@ st_TexImage3D(GLcontext * ctx,
static void
-st_TexImage2D(GLcontext * ctx,
+st_TexImage2D(struct gl_context * ctx,
GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint border,
@@ -811,7 +813,7 @@ st_TexImage2D(GLcontext * ctx,
static void
-st_TexImage1D(GLcontext * ctx,
+st_TexImage1D(struct gl_context * ctx,
GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint border,
@@ -826,7 +828,7 @@ st_TexImage1D(GLcontext * ctx,
static void
-st_CompressedTexImage2D(GLcontext *ctx, GLenum target, GLint level,
+st_CompressedTexImage2D(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint border,
GLsizei imageSize, const GLvoid *data,
@@ -844,7 +846,7 @@ st_CompressedTexImage2D(GLcontext *ctx, GLenum target, GLint level,
* a textured quad. Store the results in the user's buffer.
*/
static void
-decompress_with_blit(GLcontext * ctx, GLenum target, GLint level,
+decompress_with_blit(struct gl_context * ctx, GLenum target, GLint level,
GLenum format, GLenum type, GLvoid *pixels,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage)
@@ -940,7 +942,7 @@ decompress_with_blit(GLcontext * ctx, GLenum target, GLint level,
* then unmap it.
*/
static void
-st_get_tex_image(GLcontext * ctx, GLenum target, GLint level,
+st_get_tex_image(struct gl_context * ctx, GLenum target, GLint level,
GLenum format, GLenum type, GLvoid * pixels,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage, GLboolean compressed_dst)
@@ -1031,7 +1033,7 @@ st_get_tex_image(GLcontext * ctx, GLenum target, GLint level,
static void
-st_GetTexImage(GLcontext * ctx, GLenum target, GLint level,
+st_GetTexImage(struct gl_context * ctx, GLenum target, GLint level,
GLenum format, GLenum type, GLvoid * pixels,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage)
@@ -1042,7 +1044,7 @@ st_GetTexImage(GLcontext * ctx, GLenum target, GLint level,
static void
-st_GetCompressedTexImage(GLcontext *ctx, GLenum target, GLint level,
+st_GetCompressedTexImage(struct gl_context *ctx, GLenum target, GLint level,
GLvoid *pixels,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage)
@@ -1054,7 +1056,7 @@ st_GetCompressedTexImage(GLcontext *ctx, GLenum target, GLint level,
static void
-st_TexSubimage(GLcontext *ctx, GLint dims, GLenum target, GLint level,
+st_TexSubimage(struct gl_context *ctx, GLint dims, GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLint width, GLint height, GLint depth,
GLenum format, GLenum type, const void *pixels,
@@ -1160,7 +1162,7 @@ done:
static void
-st_TexSubImage3D(GLcontext *ctx, GLenum target, GLint level,
+st_TexSubImage3D(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLsizei width, GLsizei height, GLsizei depth,
GLenum format, GLenum type, const GLvoid *pixels,
@@ -1175,7 +1177,7 @@ st_TexSubImage3D(GLcontext *ctx, GLenum target, GLint level,
static void
-st_TexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
+st_TexSubImage2D(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height,
GLenum format, GLenum type, const GLvoid * pixels,
@@ -1190,7 +1192,7 @@ st_TexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
static void
-st_TexSubImage1D(GLcontext *ctx, GLenum target, GLint level,
+st_TexSubImage1D(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLsizei width, GLenum format, GLenum type,
const GLvoid * pixels,
const struct gl_pixelstore_attrib *packing,
@@ -1203,7 +1205,7 @@ st_TexSubImage1D(GLcontext *ctx, GLenum target, GLint level,
static void
-st_CompressedTexSubImage1D(GLcontext *ctx, GLenum target, GLint level,
+st_CompressedTexSubImage1D(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLsizei width,
GLenum format,
GLsizei imageSize, const GLvoid *data,
@@ -1215,7 +1217,7 @@ st_CompressedTexSubImage1D(GLcontext *ctx, GLenum target, GLint level,
static void
-st_CompressedTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
+st_CompressedTexSubImage2D(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLsizei width, GLint height,
GLenum format,
@@ -1270,7 +1272,7 @@ st_CompressedTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
static void
-st_CompressedTexSubImage3D(GLcontext *ctx, GLenum target, GLint level,
+st_CompressedTexSubImage3D(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLsizei width, GLint height, GLint depth,
GLenum format,
@@ -1291,7 +1293,7 @@ st_CompressedTexSubImage3D(GLcontext *ctx, GLenum target, GLint level,
* Note: srcY=0=TOP of renderbuffer
*/
static void
-fallback_copy_texsubimage(GLcontext *ctx, GLenum target, GLint level,
+fallback_copy_texsubimage(struct gl_context *ctx, GLenum target, GLint level,
struct st_renderbuffer *strb,
struct st_texture_image *stImage,
GLenum baseFormat,
@@ -1416,7 +1418,7 @@ fallback_copy_texsubimage(GLcontext *ctx, GLenum target, GLint level,
* If the src/dest are incompatible, return 0.
*/
static unsigned
-compatible_src_dst_formats(GLcontext *ctx,
+compatible_src_dst_formats(struct gl_context *ctx,
const struct gl_renderbuffer *src,
const struct gl_texture_image *dst)
{
@@ -1483,7 +1485,7 @@ compatible_src_dst_formats(GLcontext *ctx,
* Note: srcY=0=Bottom of renderbuffer (GL convention)
*/
static void
-st_copy_texsubimage(GLcontext *ctx,
+st_copy_texsubimage(struct gl_context *ctx,
GLenum target, GLint level,
GLint destX, GLint destY, GLint destZ,
GLint srcX, GLint srcY,
@@ -1670,7 +1672,7 @@ st_copy_texsubimage(GLcontext *ctx,
static void
-st_CopyTexImage1D(GLcontext * ctx, GLenum target, GLint level,
+st_CopyTexImage1D(struct gl_context * ctx, GLenum target, GLint level,
GLenum internalFormat,
GLint x, GLint y, GLsizei width, GLint border)
{
@@ -1696,7 +1698,7 @@ st_CopyTexImage1D(GLcontext * ctx, GLenum target, GLint level,
static void
-st_CopyTexImage2D(GLcontext * ctx, GLenum target, GLint level,
+st_CopyTexImage2D(struct gl_context * ctx, GLenum target, GLint level,
GLenum internalFormat,
GLint x, GLint y, GLsizei width, GLsizei height,
GLint border)
@@ -1723,7 +1725,7 @@ st_CopyTexImage2D(GLcontext * ctx, GLenum target, GLint level,
static void
-st_CopyTexSubImage1D(GLcontext * ctx, GLenum target, GLint level,
+st_CopyTexSubImage1D(struct gl_context * ctx, GLenum target, GLint level,
GLint xoffset, GLint x, GLint y, GLsizei width)
{
const GLint yoffset = 0, zoffset = 0;
@@ -1735,7 +1737,7 @@ st_CopyTexSubImage1D(GLcontext * ctx, GLenum target, GLint level,
static void
-st_CopyTexSubImage2D(GLcontext * ctx, GLenum target, GLint level,
+st_CopyTexSubImage2D(struct gl_context * ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLint x, GLint y, GLsizei width, GLsizei height)
{
@@ -1747,7 +1749,7 @@ st_CopyTexSubImage2D(GLcontext * ctx, GLenum target, GLint level,
static void
-st_CopyTexSubImage3D(GLcontext * ctx, GLenum target, GLint level,
+st_CopyTexSubImage3D(struct gl_context * ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLint x, GLint y, GLsizei width, GLsizei height)
{
@@ -1812,7 +1814,7 @@ copy_image_data_to_texture(struct st_context *st,
* \return GL_TRUE for success, GL_FALSE for failure (out of mem)
*/
GLboolean
-st_finalize_texture(GLcontext *ctx,
+st_finalize_texture(struct gl_context *ctx,
struct pipe_context *pipe,
struct gl_texture_object *tObj)
{
diff --git a/src/mesa/state_tracker/st_cb_texture.h b/src/mesa/state_tracker/st_cb_texture.h
index 6942478e815..60987055eb1 100644
--- a/src/mesa/state_tracker/st_cb_texture.h
+++ b/src/mesa/state_tracker/st_cb_texture.h
@@ -38,7 +38,7 @@ struct pipe_context;
struct st_context;
extern GLboolean
-st_finalize_texture(GLcontext *ctx,
+st_finalize_texture(struct gl_context *ctx,
struct pipe_context *pipe,
struct gl_texture_object *tObj);
diff --git a/src/mesa/state_tracker/st_cb_viewport.c b/src/mesa/state_tracker/st_cb_viewport.c
index a1fe45cac46..049755e45c0 100644
--- a/src/mesa/state_tracker/st_cb_viewport.c
+++ b/src/mesa/state_tracker/st_cb_viewport.c
@@ -34,19 +34,19 @@
#include "util/u_atomic.h"
/**
- * Cast wrapper to convert a GLframebuffer to an st_framebuffer.
- * Return NULL if the GLframebuffer is a user-created framebuffer.
+ * Cast wrapper to convert a struct gl_framebuffer to an st_framebuffer.
+ * Return NULL if the struct gl_framebuffer is a user-created framebuffer.
* We'll only return non-null for window system framebuffers.
* Note that this function may fail.
*/
static INLINE struct st_framebuffer *
-st_ws_framebuffer(GLframebuffer *fb)
+st_ws_framebuffer(struct gl_framebuffer *fb)
{
/* FBO cannot be casted. See st_new_framebuffer */
return (struct st_framebuffer *) ((fb && !fb->Name) ? fb : NULL);
}
-static void st_viewport(GLcontext * ctx, GLint x, GLint y,
+static void st_viewport(struct gl_context * ctx, GLint x, GLint y,
GLsizei width, GLsizei height)
{
struct st_context *st = ctx->st;
diff --git a/src/mesa/state_tracker/st_cb_xformfb.c b/src/mesa/state_tracker/st_cb_xformfb.c
index 749e88e8dbc..838a0a4a934 100644
--- a/src/mesa/state_tracker/st_cb_xformfb.c
+++ b/src/mesa/state_tracker/st_cb_xformfb.c
@@ -44,7 +44,7 @@
#if 0
static struct gl_transform_feedback_object *
-st_new_transform_feedback(GLcontext *ctx, GLuint name)
+st_new_transform_feedback(struct gl_context *ctx, GLuint name)
{
struct gl_transform_feedback_object *obj;
obj = CALLOC_STRUCT(gl_transform_feedback_object);
@@ -58,7 +58,7 @@ st_new_transform_feedback(GLcontext *ctx, GLuint name)
#if 0
static void
-st_delete_transform_feedback(GLcontext *ctx,
+st_delete_transform_feedback(struct gl_context *ctx,
struct gl_transform_feedback_object *obj)
{
GLuint i;
@@ -73,7 +73,7 @@ st_delete_transform_feedback(GLcontext *ctx,
static void
-st_begin_transform_feedback(GLcontext *ctx, GLenum mode,
+st_begin_transform_feedback(struct gl_context *ctx, GLenum mode,
struct gl_transform_feedback_object *obj)
{
/* to-do */
@@ -81,7 +81,7 @@ st_begin_transform_feedback(GLcontext *ctx, GLenum mode,
static void
-st_end_transform_feedback(GLcontext *ctx,
+st_end_transform_feedback(struct gl_context *ctx,
struct gl_transform_feedback_object *obj)
{
/* to-do */
@@ -89,7 +89,7 @@ st_end_transform_feedback(GLcontext *ctx,
static void
-st_pause_transform_feedback(GLcontext *ctx,
+st_pause_transform_feedback(struct gl_context *ctx,
struct gl_transform_feedback_object *obj)
{
/* to-do */
@@ -97,7 +97,7 @@ st_pause_transform_feedback(GLcontext *ctx,
static void
-st_resume_transform_feedback(GLcontext *ctx,
+st_resume_transform_feedback(struct gl_context *ctx,
struct gl_transform_feedback_object *obj)
{
/* to-do */
@@ -105,7 +105,7 @@ st_resume_transform_feedback(GLcontext *ctx,
static void
-st_draw_transform_feedback(GLcontext *ctx, GLenum mode,
+st_draw_transform_feedback(struct gl_context *ctx, GLenum mode,
struct gl_transform_feedback_object *obj)
{
/* XXX to do */
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 3b046962efe..75fd69540f3 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -69,7 +69,7 @@ DEBUG_GET_ONCE_BOOL_OPTION(mesa_mvp_dp4, "MESA_MVP_DP4", FALSE)
/**
* Called via ctx->Driver.UpdateState()
*/
-void st_invalidate_state(GLcontext * ctx, GLuint new_state)
+void st_invalidate_state(struct gl_context * ctx, GLuint new_state)
{
struct st_context *st = st_context(ctx);
@@ -97,7 +97,7 @@ st_get_msaa(void)
static struct st_context *
-st_create_context_priv( GLcontext *ctx, struct pipe_context *pipe )
+st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe )
{
uint i;
struct st_context *st = ST_CALLOC_STRUCT( st_context );
@@ -163,11 +163,11 @@ st_create_context_priv( GLcontext *ctx, struct pipe_context *pipe )
struct st_context *st_create_context(gl_api api, struct pipe_context *pipe,
- const __GLcontextModes *visual,
+ const struct gl_config *visual,
struct st_context *share)
{
- GLcontext *ctx;
- GLcontext *shareCtx = share ? share->ctx : NULL;
+ struct gl_context *ctx;
+ struct gl_context *shareCtx = share ? share->ctx : NULL;
struct dd_function_table funcs;
memset(&funcs, 0, sizeof(funcs));
@@ -221,7 +221,7 @@ void st_destroy_context( struct st_context *st )
{
struct pipe_context *pipe = st->pipe;
struct cso_context *cso = st->cso_context;
- GLcontext *ctx = st->ctx;
+ struct gl_context *ctx = st->ctx;
GLuint i;
/* need to unbind and destroy CSO objects before anything else */
diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h
index 991feee3001..d342c0cff1e 100644
--- a/src/mesa/state_tracker/st_context.h
+++ b/src/mesa/state_tracker/st_context.h
@@ -68,7 +68,7 @@ struct st_context
{
struct st_context_iface iface;
- GLcontext *ctx;
+ struct gl_context *ctx;
struct pipe_context *pipe;
@@ -160,7 +160,7 @@ struct st_context
/** for glDraw/CopyPixels */
struct {
- struct st_fragment_program *z_shader;
+ struct st_fragment_program *shaders[4];
void *vert_shaders[2]; /**< ureg shaders */
} drawpix;
@@ -195,19 +195,19 @@ struct st_context
/* Need this so that we can implement Mesa callbacks in this module.
*/
-static INLINE struct st_context *st_context(GLcontext *ctx)
+static INLINE struct st_context *st_context(struct gl_context *ctx)
{
return ctx->st;
}
/**
- * Wrapper for GLframebuffer.
+ * Wrapper for struct gl_framebuffer.
* This is an opaque type to the outside world.
*/
struct st_framebuffer
{
- GLframebuffer Base;
+ struct gl_framebuffer Base;
void *Private;
struct st_framebuffer_iface *iface;
@@ -219,7 +219,7 @@ struct st_framebuffer
extern void st_init_driver_functions(struct dd_function_table *functions);
-void st_invalidate_state(GLcontext * ctx, GLuint new_state);
+void st_invalidate_state(struct gl_context * ctx, GLuint new_state);
@@ -260,7 +260,7 @@ st_get_msaa(void);
extern struct st_context *
st_create_context(gl_api api, struct pipe_context *pipe,
- const __GLcontextModes *visual,
+ const struct gl_config *visual,
struct st_context *share);
extern void
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index 318e08886c7..61a0e1b0877 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -341,7 +341,7 @@ get_arrays_bounds(const struct st_vertex_program *vp,
* \param velements returns vertex element info
*/
static void
-setup_interleaved_attribs(GLcontext *ctx,
+setup_interleaved_attribs(struct gl_context *ctx,
const struct st_vertex_program *vp,
const struct st_vp_varient *vpv,
const struct gl_client_array **arrays,
@@ -407,7 +407,7 @@ setup_interleaved_attribs(GLcontext *ctx,
* \param velements returns vertex element info
*/
static void
-setup_non_interleaved_attribs(GLcontext *ctx,
+setup_non_interleaved_attribs(struct gl_context *ctx,
const struct st_vertex_program *vp,
const struct st_vp_varient *vpv,
const struct gl_client_array **arrays,
@@ -496,7 +496,7 @@ setup_non_interleaved_attribs(GLcontext *ctx,
static void
-setup_index_buffer(GLcontext *ctx,
+setup_index_buffer(struct gl_context *ctx,
const struct _mesa_index_buffer *ib,
struct pipe_index_buffer *ibuffer)
{
@@ -545,13 +545,23 @@ setup_index_buffer(GLcontext *ctx,
* issue a warning.
*/
static void
-check_uniforms(GLcontext *ctx)
+check_uniforms(struct gl_context *ctx)
{
- const struct gl_shader_program *shProg = ctx->Shader.CurrentProgram;
- if (shProg && shProg->LinkStatus) {
- GLuint i;
- for (i = 0; i < shProg->Uniforms->NumUniforms; i++) {
- const struct gl_uniform *u = &shProg->Uniforms->Uniforms[i];
+ struct gl_shader_program *shProg[3] = {
+ ctx->Shader.CurrentVertexProgram,
+ ctx->Shader.CurrentGeometryProgram,
+ ctx->Shader.CurrentFragmentProgram,
+ };
+ unsigned j;
+
+ for (j = 0; j < 3; j++) {
+ unsigned i;
+
+ if (shProg[j] == NULL || !shProg[j]->LinkStatus)
+ continue;
+
+ for (i = 0; i < shProg[j]->Uniforms->NumUniforms; i++) {
+ const struct gl_uniform *u = &shProg[j]->Uniforms->Uniforms[i];
if (!u->Initialized) {
_mesa_warning(ctx,
"Using shader with uninitialized uniform: %s",
@@ -567,7 +577,7 @@ check_uniforms(GLcontext *ctx)
* the corresponding Gallium type.
*/
static unsigned
-translate_prim(const GLcontext *ctx, unsigned prim)
+translate_prim(const struct gl_context *ctx, unsigned prim)
{
/* GL prims should match Gallium prims, spot-check a few */
assert(GL_POINTS == PIPE_PRIM_POINTS);
@@ -595,7 +605,7 @@ translate_prim(const GLcontext *ctx, unsigned prim)
* Basically, translate the information into the format expected by gallium.
*/
void
-st_draw_vbo(GLcontext *ctx,
+st_draw_vbo(struct gl_context *ctx,
const struct gl_client_array **arrays,
const struct _mesa_prim *prims,
GLuint nr_prims,
@@ -703,6 +713,9 @@ st_draw_vbo(GLcontext *ctx,
}
}
+ info.primitive_restart = st->ctx->Array.PrimitiveRestart;
+ info.restart_index = st->ctx->Array.RestartIndex;
+
/* do actual drawing */
for (i = 0; i < nr_prims; i++) {
info.mode = translate_prim( ctx, prims[i].mode );
@@ -736,7 +749,7 @@ st_draw_vbo(GLcontext *ctx,
void st_init_draw( struct st_context *st )
{
- GLcontext *ctx = st->ctx;
+ struct gl_context *ctx = st->ctx;
vbo_set_draw_func(ctx, st_draw_vbo);
diff --git a/src/mesa/state_tracker/st_draw.h b/src/mesa/state_tracker/st_draw.h
index f36184487a6..2e4c468cff5 100644
--- a/src/mesa/state_tracker/st_draw.h
+++ b/src/mesa/state_tracker/st_draw.h
@@ -47,7 +47,7 @@ void st_init_draw( struct st_context *st );
void st_destroy_draw( struct st_context *st );
extern void
-st_draw_vbo(GLcontext *ctx,
+st_draw_vbo(struct gl_context *ctx,
const struct gl_client_array **arrays,
const struct _mesa_prim *prims,
GLuint nr_prims,
@@ -57,7 +57,7 @@ st_draw_vbo(GLcontext *ctx,
GLuint max_index);
extern void
-st_feedback_draw_vbo(GLcontext *ctx,
+st_feedback_draw_vbo(struct gl_context *ctx,
const struct gl_client_array **arrays,
const struct _mesa_prim *prims,
GLuint nr_prims,
diff --git a/src/mesa/state_tracker/st_draw_feedback.c b/src/mesa/state_tracker/st_draw_feedback.c
index df05c7f70df..7f392fc4916 100644
--- a/src/mesa/state_tracker/st_draw_feedback.c
+++ b/src/mesa/state_tracker/st_draw_feedback.c
@@ -52,7 +52,7 @@
* GL_SELECT or GL_FEEDBACK mode or for glRasterPos.
*/
static void
-set_feedback_vertex_format(GLcontext *ctx)
+set_feedback_vertex_format(struct gl_context *ctx)
{
#if 0
struct st_context *st = st_context(ctx);
@@ -90,7 +90,7 @@ set_feedback_vertex_format(GLcontext *ctx)
* Might move this into the failover module some day.
*/
void
-st_feedback_draw_vbo(GLcontext *ctx,
+st_feedback_draw_vbo(struct gl_context *ctx,
const struct gl_client_array **arrays,
const struct _mesa_prim *prims,
GLuint nr_prims,
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 9b09601bbc5..2720f446450 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -204,7 +204,7 @@ void st_init_limits(struct st_context *st)
void st_init_extensions(struct st_context *st)
{
struct pipe_screen *screen = st->pipe->screen;
- GLcontext *ctx = st->ctx;
+ struct gl_context *ctx = st->ctx;
/*
* Extensions that are supported by all Gallium drivers:
@@ -432,7 +432,15 @@ void st_init_extensions(struct st_context *st)
ctx->Extensions.ARB_geometry_shader4 = GL_TRUE;
}
+ if (screen->get_param(screen, PIPE_CAP_PRIMITIVE_RESTART)) {
+ ctx->Extensions.NV_primitive_restart = GL_TRUE;
+ }
+
if (screen->get_param(screen, PIPE_CAP_DEPTH_CLAMP)) {
ctx->Extensions.ARB_depth_clamp = GL_TRUE;
}
+
+ if (screen->get_param(screen, PIPE_CAP_SHADER_STENCIL_EXPORT)) {
+ ctx->Extensions.ARB_shader_stencil_export = GL_TRUE;
+ }
}
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index b7c54cef841..955d821a657 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -210,6 +210,25 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
return PIPE_FORMAT_R8G8_UNORM;
case MESA_FORMAT_RG1616:
return PIPE_FORMAT_R16G16_UNORM;
+ case MESA_FORMAT_RGBA_16:
+ return PIPE_FORMAT_R16G16B16A16_UNORM;
+
+ /* signed int formats */
+ case MESA_FORMAT_RGBA_INT8:
+ return PIPE_FORMAT_R8G8B8A8_SSCALED;
+ case MESA_FORMAT_RGBA_INT16:
+ return PIPE_FORMAT_R16G16B16A16_SSCALED;
+ case MESA_FORMAT_RGBA_INT32:
+ return PIPE_FORMAT_R32G32B32A32_SSCALED;
+
+ /* unsigned int formats */
+ case MESA_FORMAT_RGBA_UINT8:
+ return PIPE_FORMAT_R8G8B8A8_USCALED;
+ case MESA_FORMAT_RGBA_UINT16:
+ return PIPE_FORMAT_R16G16B16A16_USCALED;
+ case MESA_FORMAT_RGBA_UINT32:
+ return PIPE_FORMAT_R32G32B32A32_USCALED;
+
default:
assert(0);
return PIPE_FORMAT_NONE;
@@ -253,6 +272,8 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
case PIPE_FORMAT_S8_USCALED:
return MESA_FORMAT_S8;
+ case PIPE_FORMAT_R16G16B16A16_UNORM:
+ return MESA_FORMAT_RGBA_16;
case PIPE_FORMAT_R16G16B16A16_SNORM:
return MESA_FORMAT_SIGNED_RGBA_16;
@@ -316,6 +337,23 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
return MESA_FORMAT_RG88;
case PIPE_FORMAT_R16G16_UNORM:
return MESA_FORMAT_RG1616;
+
+ /* signed int formats */
+ case PIPE_FORMAT_R8G8B8A8_SSCALED:
+ return MESA_FORMAT_RGBA_INT8;
+ case PIPE_FORMAT_R16G16B16A16_SSCALED:
+ return MESA_FORMAT_RGBA_INT16;
+ case PIPE_FORMAT_R32G32B32A32_SSCALED:
+ return MESA_FORMAT_RGBA_INT32;
+
+ /* unsigned int formats */
+ case PIPE_FORMAT_R8G8B8A8_USCALED:
+ return MESA_FORMAT_RGBA_UINT8;
+ case PIPE_FORMAT_R16G16B16A16_USCALED:
+ return MESA_FORMAT_RGBA_UINT16;
+ case PIPE_FORMAT_R32G32B32A32_USCALED:
+ return MESA_FORMAT_RGBA_UINT32;
+
default:
assert(0);
return MESA_FORMAT_NONE;
@@ -435,14 +473,19 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_RGBA:
case GL_RGBA8:
case GL_RGB10_A2:
- case GL_RGBA12:
return default_rgba_format( screen, target, sample_count, bindings,
geom_flags );
+
case 3:
case GL_RGB:
return default_rgb_format( screen, target, sample_count, bindings,
geom_flags );
+ case GL_RGBA12:
case GL_RGBA16:
+ if (screen->is_format_supported( screen, PIPE_FORMAT_R16G16B16A16_UNORM,
+ target, sample_count, bindings,
+ geom_flags ))
+ return PIPE_FORMAT_R16G16B16A16_UNORM;
return default_rgba_format( screen, target, sample_count, bindings,
geom_flags );
@@ -547,6 +590,8 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
}
return PIPE_FORMAT_NONE;
+ case GL_COMPRESSED_RED:
+ case GL_COMPRESSED_RG:
case GL_COMPRESSED_RGB:
/* can only sample from compressed formats */
if (bindings & ~PIPE_BIND_SAMPLER_VIEW)
@@ -754,6 +799,92 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
return PIPE_FORMAT_RGTC2_SNORM;
return PIPE_FORMAT_NONE;
+ /* signed/unsigned integer formats.
+ * XXX Mesa only has formats for RGBA signed/unsigned integer formats.
+ * If/when new formats are added this code should be updated.
+ */
+ case GL_RED_INTEGER_EXT:
+ case GL_GREEN_INTEGER_EXT:
+ case GL_BLUE_INTEGER_EXT:
+ case GL_ALPHA_INTEGER_EXT:
+ case GL_RGB_INTEGER_EXT:
+ case GL_RGBA_INTEGER_EXT:
+ case GL_BGR_INTEGER_EXT:
+ case GL_BGRA_INTEGER_EXT:
+ case GL_LUMINANCE_INTEGER_EXT:
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ /* fall-through */
+ case GL_RGBA8I_EXT:
+ case GL_RGB8I_EXT:
+ case GL_ALPHA8I_EXT:
+ case GL_INTENSITY8I_EXT:
+ case GL_LUMINANCE8I_EXT:
+ case GL_LUMINANCE_ALPHA8I_EXT:
+ if (screen->is_format_supported(screen, PIPE_FORMAT_R8G8B8A8_SSCALED,
+ target,
+ sample_count, bindings, geom_flags))
+ return PIPE_FORMAT_R8G8B8A8_SSCALED;
+ return PIPE_FORMAT_NONE;
+ case GL_RGBA16I_EXT:
+ case GL_RGB16I_EXT:
+ case GL_ALPHA16I_EXT:
+ case GL_INTENSITY16I_EXT:
+ case GL_LUMINANCE16I_EXT:
+ case GL_LUMINANCE_ALPHA16I_EXT:
+ if (screen->is_format_supported(screen, PIPE_FORMAT_R16G16B16A16_SSCALED,
+ target,
+ sample_count, bindings, geom_flags))
+ return PIPE_FORMAT_R16G16B16A16_SSCALED;
+ return PIPE_FORMAT_NONE;
+ case GL_RGBA32I_EXT:
+ case GL_RGB32I_EXT:
+ case GL_ALPHA32I_EXT:
+ case GL_INTENSITY32I_EXT:
+ case GL_LUMINANCE32I_EXT:
+ case GL_LUMINANCE_ALPHA32I_EXT:
+ /* xxx */
+ if (screen->is_format_supported(screen, PIPE_FORMAT_R32G32B32A32_SSCALED,
+ target,
+ sample_count, bindings, geom_flags))
+ return PIPE_FORMAT_R32G32B32A32_SSCALED;
+ return PIPE_FORMAT_NONE;
+
+ case GL_RGBA8UI_EXT:
+ case GL_RGB8UI_EXT:
+ case GL_ALPHA8UI_EXT:
+ case GL_INTENSITY8UI_EXT:
+ case GL_LUMINANCE8UI_EXT:
+ case GL_LUMINANCE_ALPHA8UI_EXT:
+ if (screen->is_format_supported(screen, PIPE_FORMAT_R8G8B8A8_USCALED,
+ target,
+ sample_count, bindings, geom_flags))
+ return PIPE_FORMAT_R8G8B8A8_USCALED;
+ return PIPE_FORMAT_NONE;
+
+ case GL_RGBA16UI_EXT:
+ case GL_RGB16UI_EXT:
+ case GL_ALPHA16UI_EXT:
+ case GL_INTENSITY16UI_EXT:
+ case GL_LUMINANCE16UI_EXT:
+ case GL_LUMINANCE_ALPHA16UI_EXT:
+ if (screen->is_format_supported(screen, PIPE_FORMAT_R16G16B16A16_USCALED,
+ target,
+ sample_count, bindings, geom_flags))
+ return PIPE_FORMAT_R16G16B16A16_USCALED;
+ return PIPE_FORMAT_NONE;
+
+ case GL_RGBA32UI_EXT:
+ case GL_RGB32UI_EXT:
+ case GL_ALPHA32UI_EXT:
+ case GL_INTENSITY32UI_EXT:
+ case GL_LUMINANCE32UI_EXT:
+ case GL_LUMINANCE_ALPHA32UI_EXT:
+ if (screen->is_format_supported(screen, PIPE_FORMAT_R32G32B32A32_USCALED,
+ target,
+ sample_count, bindings, geom_flags))
+ return PIPE_FORMAT_R32G32B32A32_USCALED;
+ return PIPE_FORMAT_NONE;
+
default:
return PIPE_FORMAT_NONE;
}
@@ -781,8 +912,8 @@ st_choose_renderbuffer_format(struct pipe_screen *screen,
* Called via ctx->Driver.chooseTextureFormat().
*/
gl_format
-st_ChooseTextureFormat(GLcontext *ctx, GLint internalFormat,
- GLenum format, GLenum type)
+st_ChooseTextureFormat_renderable(struct gl_context *ctx, GLint internalFormat,
+ GLenum format, GLenum type, GLboolean renderable)
{
struct pipe_screen *screen = st_context(ctx)->pipe->screen;
enum pipe_format pFormat;
@@ -794,11 +925,14 @@ st_ChooseTextureFormat(GLcontext *ctx, GLint internalFormat,
/* GL textures may wind up being render targets, but we don't know
* that in advance. Specify potential render target flags now.
*/
- if (_mesa_is_depth_format(internalFormat) ||
- _mesa_is_depthstencil_format(internalFormat))
- bindings = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_DEPTH_STENCIL;
- else
- bindings = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET;
+ bindings = PIPE_BIND_SAMPLER_VIEW;
+ if (renderable == GL_TRUE) {
+ if (_mesa_is_depth_format(internalFormat) ||
+ _mesa_is_depth_or_stencil_format(internalFormat))
+ bindings |= PIPE_BIND_DEPTH_STENCIL;
+ else
+ bindings |= PIPE_BIND_RENDER_TARGET;
+ }
pFormat = st_choose_format(screen, internalFormat,
PIPE_TEXTURE_2D, 0, bindings);
@@ -817,6 +951,13 @@ st_ChooseTextureFormat(GLcontext *ctx, GLint internalFormat,
return st_pipe_format_to_mesa_format(pFormat);
}
+gl_format
+st_ChooseTextureFormat(struct gl_context *ctx, GLint internalFormat,
+ GLenum format, GLenum type)
+{
+ return st_ChooseTextureFormat_renderable(ctx, internalFormat,
+ format, type, GL_TRUE);
+}
/**
* Test if a gallium format is equivalent to a GL format/type.
diff --git a/src/mesa/state_tracker/st_format.h b/src/mesa/state_tracker/st_format.h
index 841c58cadc8..43fa59b1006 100644
--- a/src/mesa/state_tracker/st_format.h
+++ b/src/mesa/state_tracker/st_format.h
@@ -59,8 +59,12 @@ st_choose_renderbuffer_format(struct pipe_screen *screen,
GLenum internalFormat, unsigned sample_count);
+gl_format
+st_ChooseTextureFormat_renderable(struct gl_context *ctx, GLint internalFormat,
+ GLenum format, GLenum type, GLboolean renderable);
+
extern gl_format
-st_ChooseTextureFormat(GLcontext * ctx, GLint internalFormat,
+st_ChooseTextureFormat(struct gl_context * ctx, GLint internalFormat,
GLenum format, GLenum type);
diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c
index 2d587df6055..fe31418ddd1 100644
--- a/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/src/mesa/state_tracker/st_gen_mipmap.c
@@ -155,7 +155,7 @@ compress_image(enum pipe_format format,
* Software fallback for generate mipmap levels.
*/
static void
-fallback_generate_mipmap(GLcontext *ctx, GLenum target,
+fallback_generate_mipmap(struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj)
{
struct pipe_context *pipe = st_context(ctx)->pipe;
@@ -276,7 +276,7 @@ fallback_generate_mipmap(GLcontext *ctx, GLenum target,
* levels should be generated.
*/
static GLuint
-compute_num_levels(GLcontext *ctx,
+compute_num_levels(struct gl_context *ctx,
struct gl_texture_object *texObj,
GLenum target)
{
@@ -311,7 +311,7 @@ compute_num_levels(GLcontext *ctx,
* Called via ctx->Driver.GenerateMipmap().
*/
void
-st_generate_mipmap(GLcontext *ctx, GLenum target,
+st_generate_mipmap(struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj)
{
struct st_context *st = st_context(ctx);
diff --git a/src/mesa/state_tracker/st_gen_mipmap.h b/src/mesa/state_tracker/st_gen_mipmap.h
index 016bf3f4bba..3ba091da151 100644
--- a/src/mesa/state_tracker/st_gen_mipmap.h
+++ b/src/mesa/state_tracker/st_gen_mipmap.h
@@ -43,7 +43,7 @@ st_destroy_generate_mipmap(struct st_context *st);
extern void
-st_generate_mipmap(GLcontext *ctx, GLenum target,
+st_generate_mipmap(struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj);
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index cd418a03661..183477a3f31 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
@@ -54,13 +54,13 @@
#include "st_manager.h"
/**
- * Cast wrapper to convert a GLframebuffer to an st_framebuffer.
- * Return NULL if the GLframebuffer is a user-created framebuffer.
+ * Cast wrapper to convert a struct gl_framebuffer to an st_framebuffer.
+ * Return NULL if the struct gl_framebuffer is a user-created framebuffer.
* We'll only return non-null for window system framebuffers.
* Note that this function may fail.
*/
static INLINE struct st_framebuffer *
-st_ws_framebuffer(GLframebuffer *fb)
+st_ws_framebuffer(struct gl_framebuffer *fb)
{
/* FBO cannot be casted. See st_new_framebuffer */
return (struct st_framebuffer *) ((fb && !fb->Name) ? fb : NULL);
@@ -296,11 +296,11 @@ st_framebuffer_add_renderbuffer(struct st_framebuffer *stfb,
}
/**
- * Intialize a __GLcontextModes from a visual.
+ * Intialize a struct gl_config from a visual.
*/
static void
st_visual_to_context_mode(const struct st_visual *visual,
- __GLcontextModes *mode)
+ struct gl_config *mode)
{
memset(mode, 0, sizeof(*mode));
@@ -420,7 +420,7 @@ static struct st_framebuffer *
st_framebuffer_create(struct st_framebuffer_iface *stfbi)
{
struct st_framebuffer *stfb;
- __GLcontextModes mode;
+ struct gl_config mode;
gl_buffer_index idx;
stfb = CALLOC_STRUCT(st_framebuffer);
@@ -429,7 +429,7 @@ st_framebuffer_create(struct st_framebuffer_iface *stfbi)
/* for FBO-only context */
if (!stfbi) {
- GLframebuffer *base = _mesa_get_incomplete_framebuffer();
+ struct gl_framebuffer *base = _mesa_get_incomplete_framebuffer();
stfb->Base = *base;
@@ -471,8 +471,8 @@ static void
st_framebuffer_reference(struct st_framebuffer **ptr,
struct st_framebuffer *stfb)
{
- GLframebuffer *fb = &stfb->Base;
- _mesa_reference_framebuffer((GLframebuffer **) ptr, fb);
+ struct gl_framebuffer *fb = &stfb->Base;
+ _mesa_reference_framebuffer((struct gl_framebuffer **) ptr, fb);
}
static void
@@ -516,7 +516,7 @@ st_context_teximage(struct st_context_iface *stctxi, enum st_texture_type target
struct pipe_resource *tex, boolean mipmap)
{
struct st_context *st = (struct st_context *) stctxi;
- GLcontext *ctx = st->ctx;
+ struct gl_context *ctx = st->ctx;
struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
@@ -625,7 +625,7 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi,
struct st_context *shared_ctx = (struct st_context *) shared_stctxi;
struct st_context *st;
struct pipe_context *pipe;
- __GLcontextModes mode;
+ struct gl_config mode;
gl_api api;
if (!(stapi->profile_mask & (1 << attribs->profile)))
@@ -832,7 +832,7 @@ st_manager_validate_framebuffers(struct st_context *st)
* Add a color renderbuffer on demand.
*/
boolean
-st_manager_add_color_renderbuffer(struct st_context *st, GLframebuffer *fb,
+st_manager_add_color_renderbuffer(struct st_context *st, struct gl_framebuffer *fb,
gl_buffer_index idx)
{
struct st_framebuffer *stfb = st_ws_framebuffer(fb);
diff --git a/src/mesa/state_tracker/st_manager.h b/src/mesa/state_tracker/st_manager.h
index 48a9d4d99a6..6a94978390a 100644
--- a/src/mesa/state_tracker/st_manager.h
+++ b/src/mesa/state_tracker/st_manager.h
@@ -46,7 +46,7 @@ void
st_manager_validate_framebuffers(struct st_context *st);
boolean
-st_manager_add_color_renderbuffer(struct st_context *st, GLframebuffer *fb,
+st_manager_add_color_renderbuffer(struct st_context *st, struct gl_framebuffer *fb,
gl_buffer_index idx);
#endif /* ST_MANAGER_H */
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c
index 0ed822b8c27..c5c239b2c95 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.c
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c
@@ -924,7 +924,7 @@ emit_edgeflags( struct st_translate *t,
*/
enum pipe_error
st_translate_mesa_program(
- GLcontext *ctx,
+ struct gl_context *ctx,
uint procType,
struct ureg_program *ureg,
const struct gl_program *program,
@@ -1002,6 +1002,13 @@ st_translate_mesa_program(
t->outputs[i] = ureg_writemask( t->outputs[i],
TGSI_WRITEMASK_Z );
break;
+ case TGSI_SEMANTIC_STENCIL:
+ t->outputs[i] = ureg_DECL_output( ureg,
+ TGSI_SEMANTIC_STENCIL, /* Stencil */
+ outputSemanticIndex[i] );
+ t->outputs[i] = ureg_writemask( t->outputs[i],
+ TGSI_WRITEMASK_Y );
+ break;
case TGSI_SEMANTIC_COLOR:
t->outputs[i] = ureg_DECL_output( ureg,
TGSI_SEMANTIC_COLOR,
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.h b/src/mesa/state_tracker/st_mesa_to_tgsi.h
index ca076ce3622..9bfd4960b60 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.h
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.h
@@ -44,7 +44,7 @@ struct gl_program;
enum pipe_error
st_translate_mesa_program(
- GLcontext *ctx,
+ struct gl_context *ctx,
uint procType,
struct ureg_program *ureg,
const struct gl_program *program,
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 18a7bbe0f90..76799287fe1 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -398,11 +398,20 @@ st_translate_fragment_program(struct st_context *st,
outputsWritten &= ~(1 << FRAG_RESULT_DEPTH);
}
+ if (outputsWritten & BITFIELD64_BIT(FRAG_RESULT_STENCIL)) {
+ fs_output_semantic_name[fs_num_outputs] = TGSI_SEMANTIC_STENCIL;
+ fs_output_semantic_index[fs_num_outputs] = 0;
+ outputMapping[FRAG_RESULT_STENCIL] = fs_num_outputs;
+ fs_num_outputs++;
+ outputsWritten &= ~(1 << FRAG_RESULT_STENCIL);
+ }
+
/* handle remaning outputs (color) */
for (attr = 0; attr < FRAG_RESULT_MAX; attr++) {
if (outputsWritten & BITFIELD64_BIT(attr)) {
switch (attr) {
case FRAG_RESULT_DEPTH:
+ case FRAG_RESULT_STENCIL:
/* handled above */
assert(0);
break;
@@ -707,14 +716,44 @@ st_translate_geometry_program(struct st_context *st,
* Debug- print current shader text
*/
void
-st_print_shaders(GLcontext *ctx)
+st_print_shaders(struct gl_context *ctx)
{
- struct gl_shader_program *shProg = ctx->Shader.CurrentProgram;
- if (shProg) {
- GLuint i;
- for (i = 0; i < shProg->NumShaders; i++) {
- printf("GLSL shader %u of %u:\n", i, shProg->NumShaders);
- printf("%s\n", shProg->Shaders[i]->Source);
+ struct gl_shader_program *shProg[3] = {
+ ctx->Shader.CurrentVertexProgram,
+ ctx->Shader.CurrentGeometryProgram,
+ ctx->Shader.CurrentFragmentProgram,
+ };
+ unsigned j;
+
+ for (j = 0; j < 3; j++) {
+ unsigned i;
+
+ if (shProg[j] == NULL)
+ continue;
+
+ for (i = 0; i < shProg[j]->NumShaders; i++) {
+ struct gl_shader *sh;
+
+ switch (shProg[j]->Shaders[i]->Type) {
+ case GL_VERTEX_SHADER:
+ sh = (i != 0) ? NULL : shProg[j]->Shaders[i];
+ break;
+ case GL_GEOMETRY_SHADER_ARB:
+ sh = (i != 1) ? NULL : shProg[j]->Shaders[i];
+ break;
+ case GL_FRAGMENT_SHADER:
+ sh = (i != 2) ? NULL : shProg[j]->Shaders[i];
+ break;
+ default:
+ assert(0);
+ sh = NULL;
+ break;
+ }
+
+ if (sh != NULL) {
+ printf("GLSL shader %u of %u:\n", i, shProg[j]->NumShaders);
+ printf("%s\n", sh->Source);
+ }
}
}
}
diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h
index 3805b9a725e..72dbc715fe1 100644
--- a/src/mesa/state_tracker/st_program.h
+++ b/src/mesa/state_tracker/st_program.h
@@ -223,7 +223,7 @@ st_vp_release_varients( struct st_context *st,
struct st_vertex_program *stvp );
extern void
-st_print_shaders(GLcontext *ctx);
+st_print_shaders(struct gl_context *ctx);
#endif
diff --git a/src/mesa/state_tracker/st_texture.h b/src/mesa/state_tracker/st_texture.h
index ed5d271597c..c78901c0360 100644
--- a/src/mesa/state_tracker/st_texture.h
+++ b/src/mesa/state_tracker/st_texture.h
@@ -134,6 +134,20 @@ st_create_texture_sampler_view(struct pipe_context *pipe,
static INLINE struct pipe_sampler_view *
+st_create_texture_sampler_view_format(struct pipe_context *pipe,
+ struct pipe_resource *texture,
+ enum pipe_format format)
+{
+ struct pipe_sampler_view templ;
+
+ u_sampler_view_default_template(&templ,
+ texture,
+ format);
+
+ return pipe->create_sampler_view(pipe, texture, &templ);
+}
+
+static INLINE struct pipe_sampler_view *
st_get_texture_sampler_view(struct st_texture_object *stObj,
struct pipe_context *pipe)
diff --git a/src/mesa/swrast/NOTES b/src/mesa/swrast/NOTES
index f906e41b955..ea373aa1272 100644
--- a/src/mesa/swrast/NOTES
+++ b/src/mesa/swrast/NOTES
@@ -21,24 +21,24 @@ STATE
To create and destroy the module:
- GLboolean _swrast_CreateContext( GLcontext *ctx );
- void _swrast_DestroyContext( GLcontext *ctx );
+ GLboolean _swrast_CreateContext( struct gl_context *ctx );
+ void _swrast_DestroyContext( struct gl_context *ctx );
This module tracks state changes internally and maintains derived
values based on the current state. For this to work, the driver
ensure the following funciton is called whenever the state changes and
the swsetup module is 'awake':
- void _swrast_InvalidateState( GLcontext *ctx, GLuint new_state );
+ void _swrast_InvalidateState( struct gl_context *ctx, GLuint new_state );
There is no explicit call to put the swrast module to sleep.
CUSTOMIZATION
- void (*choose_point)( GLcontext * );
- void (*choose_line)( GLcontext * );
- void (*choose_triangle)( GLcontext * );
+ void (*choose_point)( struct gl_context * );
+ void (*choose_line)( struct gl_context * );
+ void (*choose_triangle)( struct gl_context * );
Drivers may add additional triangle/line/point functions to swrast by
overriding these functions. It is necessary for the driver to be very
diff --git a/src/mesa/swrast/s_aaline.c b/src/mesa/swrast/s_aaline.c
index 6ba4604e690..65b9af06aff 100644
--- a/src/mesa/swrast/s_aaline.c
+++ b/src/mesa/swrast/s_aaline.c
@@ -323,7 +323,7 @@ compute_coveragef(const struct LineInfo *info,
}
-typedef void (*plot_func)(GLcontext *ctx, struct LineInfo *line,
+typedef void (*plot_func)(struct gl_context *ctx, struct LineInfo *line,
int ix, int iy);
@@ -332,7 +332,7 @@ typedef void (*plot_func)(GLcontext *ctx, struct LineInfo *line,
* Draw an AA line segment (called many times per line when stippling)
*/
static void
-segment(GLcontext *ctx,
+segment(struct gl_context *ctx,
struct LineInfo *line,
plot_func plot,
GLfloat t0, GLfloat t1)
@@ -472,7 +472,7 @@ segment(GLcontext *ctx,
void
-_swrast_choose_aa_line_function(GLcontext *ctx)
+_swrast_choose_aa_line_function(struct gl_context *ctx)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
diff --git a/src/mesa/swrast/s_aaline.h b/src/mesa/swrast/s_aaline.h
index 922eb230e51..f7d92c52412 100644
--- a/src/mesa/swrast/s_aaline.h
+++ b/src/mesa/swrast/s_aaline.h
@@ -32,7 +32,7 @@
extern void
-_swrast_choose_aa_line_function(GLcontext *ctx);
+_swrast_choose_aa_line_function(struct gl_context *ctx);
#endif
diff --git a/src/mesa/swrast/s_aalinetemp.h b/src/mesa/swrast/s_aalinetemp.h
index c28d47a671d..d99d9d3d904 100644
--- a/src/mesa/swrast/s_aalinetemp.h
+++ b/src/mesa/swrast/s_aalinetemp.h
@@ -34,7 +34,7 @@
* \param iy - integer fragment window Y coordiante
*/
static void
-NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy)
+NAME(plot)(struct gl_context *ctx, struct LineInfo *line, int ix, int iy)
{
const SWcontext *swrast = SWRAST_CONTEXT(ctx);
const GLfloat fx = (GLfloat) ix;
@@ -103,7 +103,7 @@ NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy)
* Line setup
*/
static void
-NAME(line)(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1)
+NAME(line)(struct gl_context *ctx, const SWvertex *v0, const SWvertex *v1)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLfloat tStart, tEnd; /* segment start, end along line length */
diff --git a/src/mesa/swrast/s_aatriangle.c b/src/mesa/swrast/s_aatriangle.c
index 175316790d7..c597808e40e 100644
--- a/src/mesa/swrast/s_aatriangle.c
+++ b/src/mesa/swrast/s_aatriangle.c
@@ -268,7 +268,7 @@ compute_coveragef(const GLfloat v0[3], const GLfloat v1[3],
static void
-rgba_aa_tri(GLcontext *ctx,
+rgba_aa_tri(struct gl_context *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2)
@@ -279,7 +279,7 @@ rgba_aa_tri(GLcontext *ctx,
static void
-general_aa_tri(GLcontext *ctx,
+general_aa_tri(struct gl_context *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2)
@@ -296,7 +296,7 @@ general_aa_tri(GLcontext *ctx,
* appropriate antialiased triangle rasterizer function.
*/
void
-_swrast_set_aa_triangle_function(GLcontext *ctx)
+_swrast_set_aa_triangle_function(struct gl_context *ctx)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
diff --git a/src/mesa/swrast/s_aatriangle.h b/src/mesa/swrast/s_aatriangle.h
index 9aed41a1915..746e456f5f4 100644
--- a/src/mesa/swrast/s_aatriangle.h
+++ b/src/mesa/swrast/s_aatriangle.h
@@ -32,7 +32,7 @@
extern void
-_swrast_set_aa_triangle_function(GLcontext *ctx);
+_swrast_set_aa_triangle_function(struct gl_context *ctx);
#endif
diff --git a/src/mesa/swrast/s_aatritemp.h b/src/mesa/swrast/s_aatritemp.h
index 5c1c6d9044b..91d4f7a10ab 100644
--- a/src/mesa/swrast/s_aatritemp.h
+++ b/src/mesa/swrast/s_aatritemp.h
@@ -36,7 +36,7 @@
* DO_ATTRIBS - if defined, compute texcoords, varying, etc.
*/
-/*void triangle( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint pv )*/
+/*void triangle( struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint pv )*/
{
const SWcontext *swrast = SWRAST_CONTEXT(ctx);
const GLfloat *p0 = v0->attrib[FRAG_ATTRIB_WPOS];
diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c
index 854e106b7f0..88d107a17da 100644
--- a/src/mesa/swrast/s_accum.c
+++ b/src/mesa/swrast/s_accum.c
@@ -78,7 +78,7 @@
* representing the range[-1, 1].
*/
static void
-rescale_accum( GLcontext *ctx )
+rescale_accum( struct gl_context *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
struct gl_renderbuffer *rb
@@ -125,7 +125,7 @@ rescale_accum( GLcontext *ctx )
* Clear the accumulation Buffer.
*/
void
-_swrast_clear_accum_buffer( GLcontext *ctx, struct gl_renderbuffer *rb )
+_swrast_clear_accum_buffer( struct gl_context *ctx, struct gl_renderbuffer *rb )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLuint x, y, width, height;
@@ -179,7 +179,7 @@ _swrast_clear_accum_buffer( GLcontext *ctx, struct gl_renderbuffer *rb )
static void
-accum_add(GLcontext *ctx, GLfloat value,
+accum_add(struct gl_context *ctx, GLfloat value,
GLint xpos, GLint ypos, GLint width, GLint height )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -222,7 +222,7 @@ accum_add(GLcontext *ctx, GLfloat value,
static void
-accum_mult(GLcontext *ctx, GLfloat mult,
+accum_mult(struct gl_context *ctx, GLfloat mult,
GLint xpos, GLint ypos, GLint width, GLint height )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -265,7 +265,7 @@ accum_mult(GLcontext *ctx, GLfloat mult,
static void
-accum_accum(GLcontext *ctx, GLfloat value,
+accum_accum(struct gl_context *ctx, GLfloat value,
GLint xpos, GLint ypos, GLint width, GLint height )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -341,7 +341,7 @@ accum_accum(GLcontext *ctx, GLfloat value,
static void
-accum_load(GLcontext *ctx, GLfloat value,
+accum_load(struct gl_context *ctx, GLfloat value,
GLint xpos, GLint ypos, GLint width, GLint height )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -423,7 +423,7 @@ accum_load(GLcontext *ctx, GLfloat value,
static void
-accum_return(GLcontext *ctx, GLfloat value,
+accum_return(struct gl_context *ctx, GLfloat value,
GLint xpos, GLint ypos, GLint width, GLint height )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -540,7 +540,7 @@ accum_return(GLcontext *ctx, GLfloat value,
* Software fallback for glAccum.
*/
void
-_swrast_Accum(GLcontext *ctx, GLenum op, GLfloat value)
+_swrast_Accum(struct gl_context *ctx, GLenum op, GLfloat value)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLint xpos, ypos, width, height;
diff --git a/src/mesa/swrast/s_accum.h b/src/mesa/swrast/s_accum.h
index 42e38cf02b3..071644b64fa 100644
--- a/src/mesa/swrast/s_accum.h
+++ b/src/mesa/swrast/s_accum.h
@@ -31,7 +31,7 @@
extern void
-_swrast_clear_accum_buffer(GLcontext *ctx, struct gl_renderbuffer *rb);
+_swrast_clear_accum_buffer(struct gl_context *ctx, struct gl_renderbuffer *rb);
#endif
diff --git a/src/mesa/swrast/s_alpha.c b/src/mesa/swrast/s_alpha.c
index 509477433a5..df2181ba968 100644
--- a/src/mesa/swrast/s_alpha.c
+++ b/src/mesa/swrast/s_alpha.c
@@ -90,7 +90,7 @@ do { \
* 1 if one or more pixels passed the alpha test.
*/
GLint
-_swrast_alpha_test(const GLcontext *ctx, SWspan *span)
+_swrast_alpha_test(const struct gl_context *ctx, SWspan *span)
{
const GLuint n = span->end;
GLubyte *mask = span->array->mask;
diff --git a/src/mesa/swrast/s_alpha.h b/src/mesa/swrast/s_alpha.h
index 239484a9743..7cd6d800b29 100644
--- a/src/mesa/swrast/s_alpha.h
+++ b/src/mesa/swrast/s_alpha.h
@@ -33,7 +33,7 @@
extern GLint
-_swrast_alpha_test( const GLcontext *ctx, SWspan *span );
+_swrast_alpha_test( const struct gl_context *ctx, SWspan *span );
#endif
diff --git a/src/mesa/swrast/s_atifragshader.c b/src/mesa/swrast/s_atifragshader.c
index 1338b6802d4..1eb026e0092 100644
--- a/src/mesa/swrast/s_atifragshader.c
+++ b/src/mesa/swrast/s_atifragshader.c
@@ -43,7 +43,7 @@ struct atifs_machine
* Fetch a texel.
*/
static void
-fetch_texel(GLcontext * ctx, const GLfloat texcoord[4], GLfloat lambda,
+fetch_texel(struct gl_context * ctx, const GLfloat texcoord[4], GLfloat lambda,
GLuint unit, GLfloat color[4])
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -272,7 +272,7 @@ handle_pass_op(struct atifs_machine *machine, struct atifs_setupinst *texinst,
}
static void
-handle_sample_op(GLcontext * ctx, struct atifs_machine *machine,
+handle_sample_op(struct gl_context * ctx, struct atifs_machine *machine,
struct atifs_setupinst *texinst, const SWspan *span,
GLuint column, GLuint idx)
{
@@ -311,7 +311,7 @@ do { \
* \param column - which pixel [i] we're operating on in the span
*/
static void
-execute_shader(GLcontext *ctx, const struct ati_fragment_shader *shader,
+execute_shader(struct gl_context *ctx, const struct ati_fragment_shader *shader,
struct atifs_machine *machine, const SWspan *span,
GLuint column)
{
@@ -555,7 +555,7 @@ execute_shader(GLcontext *ctx, const struct ati_fragment_shader *shader,
* Init fragment shader virtual machine state.
*/
static void
-init_machine(GLcontext * ctx, struct atifs_machine *machine,
+init_machine(struct gl_context * ctx, struct atifs_machine *machine,
const struct ati_fragment_shader *shader,
const SWspan *span, GLuint col)
{
@@ -577,7 +577,7 @@ init_machine(GLcontext * ctx, struct atifs_machine *machine,
* Execute the current ATI shader program, operating on the given span.
*/
void
-_swrast_exec_fragment_shader(GLcontext * ctx, SWspan *span)
+_swrast_exec_fragment_shader(struct gl_context * ctx, SWspan *span)
{
const struct ati_fragment_shader *shader = ctx->ATIFragmentShader.Current;
struct atifs_machine machine;
diff --git a/src/mesa/swrast/s_atifragshader.h b/src/mesa/swrast/s_atifragshader.h
index cce455a0465..39a6e64ed92 100644
--- a/src/mesa/swrast/s_atifragshader.h
+++ b/src/mesa/swrast/s_atifragshader.h
@@ -32,7 +32,7 @@
extern void
-_swrast_exec_fragment_shader( GLcontext *ctx, SWspan *span );
+_swrast_exec_fragment_shader( struct gl_context *ctx, SWspan *span );
#endif
diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c
index da730213aca..21488d3ba3e 100644
--- a/src/mesa/swrast/s_bitmap.c
+++ b/src/mesa/swrast/s_bitmap.c
@@ -45,7 +45,7 @@
* All parameter error checking will have been done before this is called.
*/
void
-_swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
+_swrast_Bitmap( struct gl_context *ctx, GLint px, GLint py,
GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack,
const GLubyte *bitmap )
@@ -144,7 +144,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
* draw or skip.
*/
void
-_swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
+_swrast_Bitmap( struct gl_context *ctx, GLint px, GLint py,
GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack,
const GLubyte *bitmap )
diff --git a/src/mesa/swrast/s_blend.c b/src/mesa/swrast/s_blend.c
index 5b090c72c79..1a550c445d3 100644
--- a/src/mesa/swrast/s_blend.c
+++ b/src/mesa/swrast/s_blend.c
@@ -70,7 +70,7 @@
* Any chanType ok.
*/
static void _BLENDAPI
-blend_noop(GLcontext *ctx, GLuint n, const GLubyte mask[],
+blend_noop(struct gl_context *ctx, GLuint n, const GLubyte mask[],
GLvoid *src, const GLvoid *dst, GLenum chanType)
{
GLint bytes;
@@ -98,7 +98,7 @@ blend_noop(GLcontext *ctx, GLuint n, const GLubyte mask[],
* Any chanType ok.
*/
static void _BLENDAPI
-blend_replace(GLcontext *ctx, GLuint n, const GLubyte mask[],
+blend_replace(struct gl_context *ctx, GLuint n, const GLubyte mask[],
GLvoid *src, const GLvoid *dst, GLenum chanType)
{
ASSERT(ctx->Color.BlendEquationRGB == GL_FUNC_ADD);
@@ -118,7 +118,7 @@ blend_replace(GLcontext *ctx, GLuint n, const GLubyte mask[],
* glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA).
*/
static void _BLENDAPI
-blend_transparency_ubyte(GLcontext *ctx, GLuint n, const GLubyte mask[],
+blend_transparency_ubyte(struct gl_context *ctx, GLuint n, const GLubyte mask[],
GLvoid *src, const GLvoid *dst, GLenum chanType)
{
GLubyte (*rgba)[4] = (GLubyte (*)[4]) src;
@@ -163,7 +163,7 @@ blend_transparency_ubyte(GLcontext *ctx, GLuint n, const GLubyte mask[],
static void _BLENDAPI
-blend_transparency_ushort(GLcontext *ctx, GLuint n, const GLubyte mask[],
+blend_transparency_ushort(struct gl_context *ctx, GLuint n, const GLubyte mask[],
GLvoid *src, const GLvoid *dst, GLenum chanType)
{
GLushort (*rgba)[4] = (GLushort (*)[4]) src;
@@ -201,7 +201,7 @@ blend_transparency_ushort(GLcontext *ctx, GLuint n, const GLubyte mask[],
static void _BLENDAPI
-blend_transparency_float(GLcontext *ctx, GLuint n, const GLubyte mask[],
+blend_transparency_float(struct gl_context *ctx, GLuint n, const GLubyte mask[],
GLvoid *src, const GLvoid *dst, GLenum chanType)
{
GLfloat (*rgba)[4] = (GLfloat (*)[4]) src;
@@ -243,7 +243,7 @@ blend_transparency_float(GLcontext *ctx, GLuint n, const GLubyte mask[],
* Any chanType ok.
*/
static void _BLENDAPI
-blend_add(GLcontext *ctx, GLuint n, const GLubyte mask[],
+blend_add(struct gl_context *ctx, GLuint n, const GLubyte mask[],
GLvoid *src, const GLvoid *dst, GLenum chanType)
{
GLuint i;
@@ -309,7 +309,7 @@ blend_add(GLcontext *ctx, GLuint n, const GLubyte mask[],
* Any chanType ok.
*/
static void _BLENDAPI
-blend_min(GLcontext *ctx, GLuint n, const GLubyte mask[],
+blend_min(struct gl_context *ctx, GLuint n, const GLubyte mask[],
GLvoid *src, const GLvoid *dst, GLenum chanType)
{
GLuint i;
@@ -362,7 +362,7 @@ blend_min(GLcontext *ctx, GLuint n, const GLubyte mask[],
* Any chanType ok.
*/
static void _BLENDAPI
-blend_max(GLcontext *ctx, GLuint n, const GLubyte mask[],
+blend_max(struct gl_context *ctx, GLuint n, const GLubyte mask[],
GLvoid *src, const GLvoid *dst, GLenum chanType)
{
GLuint i;
@@ -416,7 +416,7 @@ blend_max(GLcontext *ctx, GLuint n, const GLubyte mask[],
* Any chanType ok.
*/
static void _BLENDAPI
-blend_modulate(GLcontext *ctx, GLuint n, const GLubyte mask[],
+blend_modulate(struct gl_context *ctx, GLuint n, const GLubyte mask[],
GLvoid *src, const GLvoid *dst, GLenum chanType)
{
GLuint i;
@@ -471,7 +471,7 @@ blend_modulate(GLcontext *ctx, GLuint n, const GLubyte mask[],
* \param dest array of pixels from the dest color buffer
*/
static void
-blend_general_float(GLcontext *ctx, GLuint n, const GLubyte mask[],
+blend_general_float(struct gl_context *ctx, GLuint n, const GLubyte mask[],
GLfloat rgba[][4], GLfloat dest[][4],
GLenum chanType)
{
@@ -816,7 +816,7 @@ blend_general_float(GLcontext *ctx, GLuint n, const GLubyte mask[],
* Do any blending operation, any chanType.
*/
static void
-blend_general(GLcontext *ctx, GLuint n, const GLubyte mask[],
+blend_general(struct gl_context *ctx, GLuint n, const GLubyte mask[],
void *src, const void *dst, GLenum chanType)
{
GLfloat rgbaF[MAX_WIDTH][4], destF[MAX_WIDTH][4];
@@ -892,7 +892,7 @@ blend_general(GLcontext *ctx, GLuint n, const GLubyte mask[],
* Result: the ctx->Color.BlendFunc pointer is updated.
*/
void
-_swrast_choose_blend_func(GLcontext *ctx, GLenum chanType)
+_swrast_choose_blend_func(struct gl_context *ctx, GLenum chanType)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
const GLenum eq = ctx->Color.BlendEquationRGB;
@@ -985,7 +985,7 @@ _swrast_choose_blend_func(GLcontext *ctx, GLenum chanType)
* pixel coordinates.
*/
void
-_swrast_blend_span(GLcontext *ctx, struct gl_renderbuffer *rb, SWspan *span)
+_swrast_blend_span(struct gl_context *ctx, struct gl_renderbuffer *rb, SWspan *span)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
void *rbPixels;
diff --git a/src/mesa/swrast/s_blend.h b/src/mesa/swrast/s_blend.h
index 9cedde3bf20..8b06dd5031e 100644
--- a/src/mesa/swrast/s_blend.h
+++ b/src/mesa/swrast/s_blend.h
@@ -32,11 +32,11 @@
extern void
-_swrast_blend_span(GLcontext *ctx, struct gl_renderbuffer *rb, SWspan *span);
+_swrast_blend_span(struct gl_context *ctx, struct gl_renderbuffer *rb, SWspan *span);
extern void
-_swrast_choose_blend_func(GLcontext *ctx, GLenum chanType);
+_swrast_choose_blend_func(struct gl_context *ctx, GLenum chanType);
#endif
diff --git a/src/mesa/swrast/s_blit.c b/src/mesa/swrast/s_blit.c
index 753f3136f55..d943e09b29f 100644
--- a/src/mesa/swrast/s_blit.c
+++ b/src/mesa/swrast/s_blit.c
@@ -103,7 +103,7 @@ RESAMPLE(resample_row_16, GLuint, 4)
* Blit color, depth or stencil with GL_NEAREST filtering.
*/
static void
-blit_nearest(GLcontext *ctx,
+blit_nearest(struct gl_context *ctx,
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
GLbitfield buffer)
@@ -316,7 +316,7 @@ resample_linear_row_ub(GLint srcWidth, GLint dstWidth,
* Bilinear filtered blit (color only).
*/
static void
-blit_linear(GLcontext *ctx,
+blit_linear(struct gl_context *ctx,
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1)
{
@@ -455,7 +455,7 @@ blit_linear(GLcontext *ctx,
* XXX we could easily support vertical flipping here.
*/
static void
-simple_blit(GLcontext *ctx,
+simple_blit(struct gl_context *ctx,
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
GLbitfield buffer)
@@ -556,7 +556,7 @@ simple_blit(GLcontext *ctx,
* Software fallback for glBlitFramebufferEXT().
*/
void
-_swrast_BlitFramebuffer(GLcontext *ctx,
+_swrast_BlitFramebuffer(struct gl_context *ctx,
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
GLbitfield mask, GLenum filter)
diff --git a/src/mesa/swrast/s_clear.c b/src/mesa/swrast/s_clear.c
index efe500ae2b1..75805f9605d 100644
--- a/src/mesa/swrast/s_clear.c
+++ b/src/mesa/swrast/s_clear.c
@@ -40,7 +40,7 @@
* Clear the color buffer when glColorMask is in effect.
*/
static void
-clear_rgba_buffer_with_masking(GLcontext *ctx, struct gl_renderbuffer *rb,
+clear_rgba_buffer_with_masking(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint buf)
{
const GLint x = ctx->DrawBuffer->_Xmin;
@@ -106,7 +106,7 @@ clear_rgba_buffer_with_masking(GLcontext *ctx, struct gl_renderbuffer *rb,
* Clear an rgba color buffer without channel masking.
*/
static void
-clear_rgba_buffer(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint buf)
+clear_rgba_buffer(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint buf)
{
const GLint x = ctx->DrawBuffer->_Xmin;
const GLint y = ctx->DrawBuffer->_Ymin;
@@ -159,7 +159,7 @@ clear_rgba_buffer(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint buf)
* clear its own color buffers for some reason (such as with masking).
*/
static void
-clear_color_buffers(GLcontext *ctx)
+clear_color_buffers(struct gl_context *ctx)
{
GLuint buf;
@@ -186,7 +186,7 @@ clear_color_buffers(GLcontext *ctx)
* \param all if GL_TRUE, clear whole buffer, else clear specified region.
*/
void
-_swrast_Clear(GLcontext *ctx, GLbitfield buffers)
+_swrast_Clear(struct gl_context *ctx, GLbitfield buffers)
{
#ifdef DEBUG_FOO
{
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index f76a2b68ecd..491fcfcdbbf 100644
--- a/src/mesa/swrast/s_context.c
+++ b/src/mesa/swrast/s_context.c
@@ -50,7 +50,7 @@
* stenciling, logic-op, fog, etc?).
*/
static void
-_swrast_update_rasterflags( GLcontext *ctx )
+_swrast_update_rasterflags( struct gl_context *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLbitfield rasterMask = 0;
@@ -129,7 +129,7 @@ _swrast_update_rasterflags( GLcontext *ctx )
* factors in.
*/
static void
-_swrast_update_polygon( GLcontext *ctx )
+_swrast_update_polygon( struct gl_context *ctx )
{
GLfloat backface_sign;
@@ -165,7 +165,7 @@ _swrast_update_polygon( GLcontext *ctx )
* fog blend factors (from the fog coords) per-fragment.
*/
static void
-_swrast_update_fog_hint( GLcontext *ctx )
+_swrast_update_fog_hint( struct gl_context *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
swrast->_PreferPixelFog = (!swrast->AllowVertexFog ||
@@ -180,7 +180,7 @@ _swrast_update_fog_hint( GLcontext *ctx )
* Update the swrast->_TextureCombinePrimary flag.
*/
static void
-_swrast_update_texture_env( GLcontext *ctx )
+_swrast_update_texture_env( struct gl_context *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLuint i;
@@ -211,7 +211,7 @@ _swrast_update_texture_env( GLcontext *ctx )
* lots of fragments.
*/
static void
-_swrast_update_deferred_texture(GLcontext *ctx)
+_swrast_update_deferred_texture(struct gl_context *ctx)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
if (ctx->Color.AlphaEnabled) {
@@ -243,7 +243,7 @@ _swrast_update_deferred_texture(GLcontext *ctx)
* Update swrast->_FogColor and swrast->_FogEnable values.
*/
static void
-_swrast_update_fog_state( GLcontext *ctx )
+_swrast_update_fog_state( struct gl_context *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
const struct gl_fragment_program *fp = ctx->FragmentProgram._Current;
@@ -268,7 +268,7 @@ _swrast_update_fog_state( GLcontext *ctx )
* program parameters with current state values.
*/
static void
-_swrast_update_fragment_program(GLcontext *ctx, GLbitfield newState)
+_swrast_update_fragment_program(struct gl_context *ctx, GLbitfield newState)
{
const struct gl_fragment_program *fp = ctx->FragmentProgram._Current;
if (fp) {
@@ -282,7 +282,7 @@ _swrast_update_fragment_program(GLcontext *ctx, GLbitfield newState)
* add per vertex instead of per-fragment.
*/
static void
-_swrast_update_specular_vertex_add(GLcontext *ctx)
+_swrast_update_specular_vertex_add(struct gl_context *ctx)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLboolean separateSpecular = ctx->Fog.ColorSumEnabled ||
@@ -346,7 +346,7 @@ _swrast_update_specular_vertex_add(GLcontext *ctx)
* after a state change.
*/
static void
-_swrast_validate_triangle( GLcontext *ctx,
+_swrast_validate_triangle( struct gl_context *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
@@ -371,7 +371,7 @@ _swrast_validate_triangle( GLcontext *ctx,
* line routine. Then call it.
*/
static void
-_swrast_validate_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 )
+_swrast_validate_line( struct gl_context *ctx, const SWvertex *v0, const SWvertex *v1 )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -392,7 +392,7 @@ _swrast_validate_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 )
* point routine. Then call it.
*/
static void
-_swrast_validate_point( GLcontext *ctx, const SWvertex *v0 )
+_swrast_validate_point( struct gl_context *ctx, const SWvertex *v0 )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -413,7 +413,7 @@ _swrast_validate_point( GLcontext *ctx, const SWvertex *v0 )
* function, then call it.
*/
static void _ASMAPI
-_swrast_validate_blend_func(GLcontext *ctx, GLuint n, const GLubyte mask[],
+_swrast_validate_blend_func(struct gl_context *ctx, GLuint n, const GLubyte mask[],
GLvoid *src, const GLvoid *dst,
GLenum chanType )
{
@@ -431,7 +431,7 @@ _swrast_validate_blend_func(GLcontext *ctx, GLuint n, const GLubyte mask[],
* for subsequent rendering.
*/
static void
-_swrast_validate_texture_images(GLcontext *ctx)
+_swrast_validate_texture_images(struct gl_context *ctx)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLuint u;
@@ -470,7 +470,7 @@ _swrast_validate_texture_images(GLcontext *ctx)
* from software to hardware rendering.
*/
void
-_swrast_eject_texture_images(GLcontext *ctx)
+_swrast_eject_texture_images(struct gl_context *ctx)
{
GLuint u;
@@ -504,14 +504,14 @@ _swrast_eject_texture_images(GLcontext *ctx)
static void
-_swrast_sleep( GLcontext *ctx, GLbitfield new_state )
+_swrast_sleep( struct gl_context *ctx, GLbitfield new_state )
{
(void) ctx; (void) new_state;
}
static void
-_swrast_invalidate_state( GLcontext *ctx, GLbitfield new_state )
+_swrast_invalidate_state( struct gl_context *ctx, GLbitfield new_state )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLuint i;
@@ -546,7 +546,7 @@ _swrast_invalidate_state( GLcontext *ctx, GLbitfield new_state )
void
-_swrast_update_texture_samplers(GLcontext *ctx)
+_swrast_update_texture_samplers(struct gl_context *ctx)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLuint u;
@@ -569,7 +569,7 @@ _swrast_update_texture_samplers(GLcontext *ctx)
* swrast->_ActiveAtttribMask.
*/
static void
-_swrast_update_active_attribs(GLcontext *ctx)
+_swrast_update_active_attribs(struct gl_context *ctx)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLuint attribsMask;
@@ -626,7 +626,7 @@ _swrast_update_active_attribs(GLcontext *ctx)
void
-_swrast_validate_derived( GLcontext *ctx )
+_swrast_validate_derived( struct gl_context *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -681,7 +681,7 @@ _swrast_validate_derived( GLcontext *ctx )
/* Public entrypoints: See also s_accum.c, s_bitmap.c, etc.
*/
void
-_swrast_Quad( GLcontext *ctx,
+_swrast_Quad( struct gl_context *ctx,
const SWvertex *v0, const SWvertex *v1,
const SWvertex *v2, const SWvertex *v3 )
{
@@ -697,7 +697,7 @@ _swrast_Quad( GLcontext *ctx,
}
void
-_swrast_Triangle( GLcontext *ctx, const SWvertex *v0,
+_swrast_Triangle( struct gl_context *ctx, const SWvertex *v0,
const SWvertex *v1, const SWvertex *v2 )
{
if (SWRAST_DEBUG) {
@@ -710,7 +710,7 @@ _swrast_Triangle( GLcontext *ctx, const SWvertex *v0,
}
void
-_swrast_Line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 )
+_swrast_Line( struct gl_context *ctx, const SWvertex *v0, const SWvertex *v1 )
{
if (SWRAST_DEBUG) {
_mesa_debug(ctx, "_swrast_Line\n");
@@ -721,7 +721,7 @@ _swrast_Line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 )
}
void
-_swrast_Point( GLcontext *ctx, const SWvertex *v0 )
+_swrast_Point( struct gl_context *ctx, const SWvertex *v0 )
{
if (SWRAST_DEBUG) {
_mesa_debug(ctx, "_swrast_Point\n");
@@ -731,7 +731,7 @@ _swrast_Point( GLcontext *ctx, const SWvertex *v0 )
}
void
-_swrast_InvalidateState( GLcontext *ctx, GLbitfield new_state )
+_swrast_InvalidateState( struct gl_context *ctx, GLbitfield new_state )
{
if (SWRAST_DEBUG) {
_mesa_debug(ctx, "_swrast_InvalidateState\n");
@@ -740,7 +740,7 @@ _swrast_InvalidateState( GLcontext *ctx, GLbitfield new_state )
}
void
-_swrast_ResetLineStipple( GLcontext *ctx )
+_swrast_ResetLineStipple( struct gl_context *ctx )
{
if (SWRAST_DEBUG) {
_mesa_debug(ctx, "_swrast_ResetLineStipple\n");
@@ -749,13 +749,13 @@ _swrast_ResetLineStipple( GLcontext *ctx )
}
void
-_swrast_SetFacing(GLcontext *ctx, GLuint facing)
+_swrast_SetFacing(struct gl_context *ctx, GLuint facing)
{
SWRAST_CONTEXT(ctx)->PointLineFacing = facing;
}
void
-_swrast_allow_vertex_fog( GLcontext *ctx, GLboolean value )
+_swrast_allow_vertex_fog( struct gl_context *ctx, GLboolean value )
{
if (SWRAST_DEBUG) {
_mesa_debug(ctx, "_swrast_allow_vertex_fog %d\n", value);
@@ -765,7 +765,7 @@ _swrast_allow_vertex_fog( GLcontext *ctx, GLboolean value )
}
void
-_swrast_allow_pixel_fog( GLcontext *ctx, GLboolean value )
+_swrast_allow_pixel_fog( struct gl_context *ctx, GLboolean value )
{
if (SWRAST_DEBUG) {
_mesa_debug(ctx, "_swrast_allow_pixel_fog %d\n", value);
@@ -776,7 +776,7 @@ _swrast_allow_pixel_fog( GLcontext *ctx, GLboolean value )
GLboolean
-_swrast_CreateContext( GLcontext *ctx )
+_swrast_CreateContext( struct gl_context *ctx )
{
GLuint i;
SWcontext *swrast = (SWcontext *)CALLOC(sizeof(SWcontext));
@@ -848,7 +848,7 @@ _swrast_CreateContext( GLcontext *ctx )
}
void
-_swrast_DestroyContext( GLcontext *ctx )
+_swrast_DestroyContext( struct gl_context *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -867,14 +867,14 @@ _swrast_DestroyContext( GLcontext *ctx )
struct swrast_device_driver *
-_swrast_GetDeviceDriverReference( GLcontext *ctx )
+_swrast_GetDeviceDriverReference( struct gl_context *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
return &swrast->Driver;
}
void
-_swrast_flush( GLcontext *ctx )
+_swrast_flush( struct gl_context *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
/* flush any pending fragments from rendering points */
@@ -885,7 +885,7 @@ _swrast_flush( GLcontext *ctx )
}
void
-_swrast_render_primitive( GLcontext *ctx, GLenum prim )
+_swrast_render_primitive( struct gl_context *ctx, GLenum prim )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
if (swrast->Primitive == GL_POINTS && prim != GL_POINTS) {
@@ -896,7 +896,7 @@ _swrast_render_primitive( GLcontext *ctx, GLenum prim )
void
-_swrast_render_start( GLcontext *ctx )
+_swrast_render_start( struct gl_context *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
if (swrast->Driver.SpanRenderStart)
@@ -905,7 +905,7 @@ _swrast_render_start( GLcontext *ctx )
}
void
-_swrast_render_finish( GLcontext *ctx )
+_swrast_render_finish( struct gl_context *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
if (swrast->Driver.SpanRenderFinish)
@@ -918,7 +918,7 @@ _swrast_render_finish( GLcontext *ctx )
#define SWRAST_DEBUG_VERTICES 0
void
-_swrast_print_vertex( GLcontext *ctx, const SWvertex *v )
+_swrast_print_vertex( struct gl_context *ctx, const SWvertex *v )
{
GLuint i;
diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h
index 6d81f74768f..5dbdd609adb 100644
--- a/src/mesa/swrast/s_context.h
+++ b/src/mesa/swrast/s_context.h
@@ -50,26 +50,26 @@
#include "s_span.h"
-typedef void (*texture_sample_func)(GLcontext *ctx,
+typedef void (*texture_sample_func)(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoords[][4],
const GLfloat lambda[], GLfloat rgba[][4]);
-typedef void (_ASMAPIP blend_func)( GLcontext *ctx, GLuint n,
+typedef void (_ASMAPIP blend_func)( struct gl_context *ctx, GLuint n,
const GLubyte mask[],
GLvoid *src, const GLvoid *dst,
GLenum chanType);
-typedef void (*swrast_point_func)( GLcontext *ctx, const SWvertex *);
+typedef void (*swrast_point_func)( struct gl_context *ctx, const SWvertex *);
-typedef void (*swrast_line_func)( GLcontext *ctx,
+typedef void (*swrast_line_func)( struct gl_context *ctx,
const SWvertex *, const SWvertex *);
-typedef void (*swrast_tri_func)( GLcontext *ctx, const SWvertex *,
+typedef void (*swrast_tri_func)( struct gl_context *ctx, const SWvertex *,
const SWvertex *, const SWvertex *);
-typedef void (*validate_texture_image_func)(GLcontext *ctx,
+typedef void (*validate_texture_image_func)(struct gl_context *ctx,
struct gl_texture_object *texObj,
GLuint face, GLuint level);
@@ -160,7 +160,7 @@ typedef struct
GLenum Primitive; /* current primitive being drawn (ala glBegin) */
GLboolean SpecularVertexAdd; /**< Add specular/secondary color per vertex */
- void (*InvalidateState)( GLcontext *ctx, GLbitfield new_state );
+ void (*InvalidateState)( struct gl_context *ctx, GLbitfield new_state );
/**
* When the NewState mask intersects these masks, we invalidate the
@@ -177,9 +177,9 @@ typedef struct
* Will be called when the GL state change mask intersects the above masks.
*/
/*@{*/
- void (*choose_point)( GLcontext * );
- void (*choose_line)( GLcontext * );
- void (*choose_triangle)( GLcontext * );
+ void (*choose_point)( struct gl_context * );
+ void (*choose_line)( struct gl_context * );
+ void (*choose_triangle)( struct gl_context * );
/*@}*/
/**
@@ -234,22 +234,22 @@ typedef struct
extern void
-_swrast_validate_derived( GLcontext *ctx );
+_swrast_validate_derived( struct gl_context *ctx );
extern void
-_swrast_update_texture_samplers(GLcontext *ctx);
+_swrast_update_texture_samplers(struct gl_context *ctx);
-/** Return SWcontext for the given GLcontext */
+/** Return SWcontext for the given struct gl_context */
static INLINE SWcontext *
-SWRAST_CONTEXT(GLcontext *ctx)
+SWRAST_CONTEXT(struct gl_context *ctx)
{
return (SWcontext *) ctx->swrast_context;
}
/** const version of above */
static INLINE const SWcontext *
-CONST_SWRAST_CONTEXT(const GLcontext *ctx)
+CONST_SWRAST_CONTEXT(const struct gl_context *ctx)
{
return (const SWcontext *) ctx->swrast_context;
}
@@ -261,7 +261,7 @@ CONST_SWRAST_CONTEXT(const GLcontext *ctx)
* driver's opportunity to map renderbuffers and textures.
*/
static INLINE void
-swrast_render_start(GLcontext *ctx)
+swrast_render_start(struct gl_context *ctx)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
if (swrast->Driver.SpanRenderStart)
@@ -271,7 +271,7 @@ swrast_render_start(GLcontext *ctx)
/** Called after framebuffer reading/writing */
static INLINE void
-swrast_render_finish(GLcontext *ctx)
+swrast_render_finish(struct gl_context *ctx)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
if (swrast->Driver.SpanRenderFinish)
diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c
index c35494e3857..46d63792822 100644
--- a/src/mesa/swrast/s_copypix.c
+++ b/src/mesa/swrast/s_copypix.c
@@ -27,8 +27,8 @@
#include "main/context.h"
#include "main/colormac.h"
#include "main/condrender.h"
-#include "main/image.h"
#include "main/macros.h"
+#include "main/pixeltransfer.h"
#include "main/imports.h"
#include "s_context.h"
@@ -96,7 +96,7 @@ regions_overlap(GLint srcx, GLint srcy,
* RGBA copypixels
*/
static void
-copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
+copy_rgba_pixels(struct gl_context *ctx, GLint srcx, GLint srcy,
GLint width, GLint height, GLint destx, GLint desty)
{
GLfloat *tmpImage, *p;
@@ -205,7 +205,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
* Z scale and bias.
*/
static void
-scale_and_bias_z(GLcontext *ctx, GLuint width,
+scale_and_bias_z(struct gl_context *ctx, GLuint width,
const GLfloat depth[], GLuint z[])
{
const GLuint depthMax = ctx->DrawBuffer->_DepthMax;
@@ -240,7 +240,7 @@ scale_and_bias_z(GLcontext *ctx, GLuint width,
* TODO: Optimize!!!!
*/
static void
-copy_depth_pixels( GLcontext *ctx, GLint srcx, GLint srcy,
+copy_depth_pixels( struct gl_context *ctx, GLint srcx, GLint srcy,
GLint width, GLint height,
GLint destx, GLint desty )
{
@@ -334,7 +334,7 @@ copy_depth_pixels( GLcontext *ctx, GLint srcx, GLint srcy,
static void
-copy_stencil_pixels( GLcontext *ctx, GLint srcx, GLint srcy,
+copy_stencil_pixels( struct gl_context *ctx, GLint srcx, GLint srcy,
GLint width, GLint height,
GLint destx, GLint desty )
{
@@ -427,7 +427,7 @@ copy_stencil_pixels( GLcontext *ctx, GLint srcx, GLint srcy,
* CopyPixels function.
*/
static void
-copy_depth_stencil_pixels(GLcontext *ctx,
+copy_depth_stencil_pixels(struct gl_context *ctx,
const GLint srcX, const GLint srcY,
const GLint width, const GLint height,
const GLint destX, const GLint destY)
@@ -602,7 +602,7 @@ copy_depth_stencil_pixels(GLcontext *ctx,
* Try to do a fast copy pixels.
*/
static GLboolean
-fast_copy_pixels(GLcontext *ctx,
+fast_copy_pixels(struct gl_context *ctx,
GLint srcX, GLint srcY, GLsizei width, GLsizei height,
GLint dstX, GLint dstY, GLenum type)
{
@@ -684,7 +684,7 @@ fast_copy_pixels(GLcontext *ctx,
* By time we get here, all parameters will have been error-checked.
*/
void
-_swrast_CopyPixels( GLcontext *ctx,
+_swrast_CopyPixels( struct gl_context *ctx,
GLint srcx, GLint srcy, GLsizei width, GLsizei height,
GLint destx, GLint desty, GLenum type )
{
diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c
index f952fd6baa7..58440cb97bd 100644
--- a/src/mesa/swrast/s_depth.c
+++ b/src/mesa/swrast/s_depth.c
@@ -40,7 +40,7 @@
* Return: number of fragments which pass the test.
*/
static GLuint
-depth_test_span16( GLcontext *ctx, GLuint n,
+depth_test_span16( struct gl_context *ctx, GLuint n,
GLushort zbuffer[], const GLuint z[], GLubyte mask[] )
{
GLuint passed = 0;
@@ -269,7 +269,7 @@ depth_test_span16( GLcontext *ctx, GLuint n,
static GLuint
-depth_test_span32( GLcontext *ctx, GLuint n,
+depth_test_span32( struct gl_context *ctx, GLuint n,
GLuint zbuffer[], const GLuint z[], GLubyte mask[] )
{
GLuint passed = 0;
@@ -506,7 +506,7 @@ depth_test_span32( GLcontext *ctx, GLuint n,
* [0,1] range.
*/
void
-_swrast_depth_clamp_span( GLcontext *ctx, SWspan *span )
+_swrast_depth_clamp_span( struct gl_context *ctx, SWspan *span )
{
struct gl_framebuffer *fb = ctx->DrawBuffer;
const GLuint count = span->end;
@@ -552,7 +552,7 @@ _swrast_depth_clamp_span( GLcontext *ctx, SWspan *span )
* Apply depth test to span of fragments.
*/
static GLuint
-depth_test_span( GLcontext *ctx, SWspan *span)
+depth_test_span( struct gl_context *ctx, SWspan *span)
{
struct gl_framebuffer *fb = ctx->DrawBuffer;
struct gl_renderbuffer *rb = fb->_DepthBuffer;
@@ -610,7 +610,7 @@ depth_test_span( GLcontext *ctx, SWspan *span)
* Do depth testing for an array of fragments at assorted locations.
*/
static void
-direct_depth_test_pixels16(GLcontext *ctx, GLushort *zStart, GLuint stride,
+direct_depth_test_pixels16(struct gl_context *ctx, GLushort *zStart, GLuint stride,
GLuint n, const GLint x[], const GLint y[],
const GLuint z[], GLubyte mask[] )
{
@@ -856,7 +856,7 @@ direct_depth_test_pixels16(GLcontext *ctx, GLushort *zStart, GLuint stride,
* Do depth testing for an array of fragments with direct access to zbuffer.
*/
static void
-direct_depth_test_pixels32(GLcontext *ctx, GLuint *zStart, GLuint stride,
+direct_depth_test_pixels32(struct gl_context *ctx, GLuint *zStart, GLuint stride,
GLuint n, const GLint x[], const GLint y[],
const GLuint z[], GLubyte mask[] )
{
@@ -1100,7 +1100,7 @@ direct_depth_test_pixels32(GLcontext *ctx, GLuint *zStart, GLuint stride,
static GLuint
-depth_test_pixels( GLcontext *ctx, SWspan *span )
+depth_test_pixels( struct gl_context *ctx, SWspan *span )
{
struct gl_framebuffer *fb = ctx->DrawBuffer;
struct gl_renderbuffer *rb = fb->_DepthBuffer;
@@ -1150,7 +1150,7 @@ depth_test_pixels( GLcontext *ctx, SWspan *span )
* \return approx number of pixels that passed (only zero is reliable)
*/
GLuint
-_swrast_depth_test_span( GLcontext *ctx, SWspan *span)
+_swrast_depth_test_span( struct gl_context *ctx, SWspan *span)
{
if (span->arrayMask & SPAN_XY)
return depth_test_pixels(ctx, span);
@@ -1167,7 +1167,7 @@ _swrast_depth_test_span( GLcontext *ctx, SWspan *span)
* \return GL_TRUE if any fragments pass, GL_FALSE if no fragments pass
*/
GLboolean
-_swrast_depth_bounds_test( GLcontext *ctx, SWspan *span )
+_swrast_depth_bounds_test( struct gl_context *ctx, SWspan *span )
{
struct gl_framebuffer *fb = ctx->DrawBuffer;
struct gl_renderbuffer *rb = fb->_DepthBuffer;
@@ -1252,7 +1252,7 @@ _swrast_depth_bounds_test( GLcontext *ctx, SWspan *span )
* _swrast_ReadPixels.
*/
void
-_swrast_read_depth_span_float( GLcontext *ctx, struct gl_renderbuffer *rb,
+_swrast_read_depth_span_float( struct gl_context *ctx, struct gl_renderbuffer *rb,
GLint n, GLint x, GLint y, GLfloat depth[] )
{
const GLfloat scale = 1.0F / ctx->DrawBuffer->_DepthMaxF;
@@ -1318,7 +1318,7 @@ _swrast_read_depth_span_float( GLcontext *ctx, struct gl_renderbuffer *rb,
* As above, but return 32-bit GLuint values.
*/
void
-_swrast_read_depth_span_uint( GLcontext *ctx, struct gl_renderbuffer *rb,
+_swrast_read_depth_span_uint( struct gl_context *ctx, struct gl_renderbuffer *rb,
GLint n, GLint x, GLint y, GLuint depth[] )
{
GLuint depthBits;
@@ -1400,7 +1400,7 @@ _swrast_read_depth_span_uint( GLcontext *ctx, struct gl_renderbuffer *rb,
* Clear the given z/depth renderbuffer.
*/
void
-_swrast_clear_depth_buffer( GLcontext *ctx, struct gl_renderbuffer *rb )
+_swrast_clear_depth_buffer( struct gl_context *ctx, struct gl_renderbuffer *rb )
{
GLuint clearValue;
GLint x, y, width, height;
diff --git a/src/mesa/swrast/s_depth.h b/src/mesa/swrast/s_depth.h
index 878d242f5e5..e5dae7ef865 100644
--- a/src/mesa/swrast/s_depth.h
+++ b/src/mesa/swrast/s_depth.h
@@ -32,27 +32,27 @@
extern GLuint
-_swrast_depth_test_span( GLcontext *ctx, SWspan *span);
+_swrast_depth_test_span( struct gl_context *ctx, SWspan *span);
extern void
-_swrast_depth_clamp_span( GLcontext *ctx, SWspan *span );
+_swrast_depth_clamp_span( struct gl_context *ctx, SWspan *span );
extern GLboolean
-_swrast_depth_bounds_test( GLcontext *ctx, SWspan *span );
+_swrast_depth_bounds_test( struct gl_context *ctx, SWspan *span );
extern void
-_swrast_read_depth_span_float( GLcontext *ctx, struct gl_renderbuffer *rb,
+_swrast_read_depth_span_float( struct gl_context *ctx, struct gl_renderbuffer *rb,
GLint n, GLint x, GLint y, GLfloat depth[] );
extern void
-_swrast_read_depth_span_uint( GLcontext *ctx, struct gl_renderbuffer *rb,
+_swrast_read_depth_span_uint( struct gl_context *ctx, struct gl_renderbuffer *rb,
GLint n, GLint x, GLint y, GLuint depth[] );
extern void
-_swrast_clear_depth_buffer( GLcontext *ctx, struct gl_renderbuffer *rb );
+_swrast_clear_depth_buffer( struct gl_context *ctx, struct gl_renderbuffer *rb );
#endif
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index 7778820c5cd..4e9b5307cc7 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -28,8 +28,10 @@
#include "main/condrender.h"
#include "main/context.h"
#include "main/image.h"
-#include "main/macros.h"
#include "main/imports.h"
+#include "main/macros.h"
+#include "main/pack.h"
+#include "main/pixeltransfer.h"
#include "main/state.h"
#include "s_context.h"
@@ -44,7 +46,7 @@
* Return: GL_TRUE if success, GL_FALSE if slow path must be used instead
*/
static GLboolean
-fast_draw_rgba_pixels(GLcontext *ctx, GLint x, GLint y,
+fast_draw_rgba_pixels(struct gl_context *ctx, GLint x, GLint y,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *userUnpack,
@@ -310,7 +312,7 @@ fast_draw_rgba_pixels(GLcontext *ctx, GLint x, GLint y,
* Draw stencil image.
*/
static void
-draw_stencil_pixels( GLcontext *ctx, GLint x, GLint y,
+draw_stencil_pixels( struct gl_context *ctx, GLint x, GLint y,
GLsizei width, GLsizei height,
GLenum type,
const struct gl_pixelstore_attrib *unpack,
@@ -354,7 +356,7 @@ draw_stencil_pixels( GLcontext *ctx, GLint x, GLint y,
* Draw depth image.
*/
static void
-draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
+draw_depth_pixels( struct gl_context *ctx, GLint x, GLint y,
GLsizei width, GLsizei height,
GLenum type,
const struct gl_pixelstore_attrib *unpack,
@@ -460,7 +462,7 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
* Draw RGBA image.
*/
static void
-draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
+draw_rgba_pixels( struct gl_context *ctx, GLint x, GLint y,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *unpack,
@@ -557,7 +559,7 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
* color buffer(s).
*/
static void
-draw_depth_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
+draw_depth_stencil_pixels(struct gl_context *ctx, GLint x, GLint y,
GLsizei width, GLsizei height, GLenum type,
const struct gl_pixelstore_attrib *unpack,
const GLvoid *pixels)
@@ -687,7 +689,7 @@ draw_depth_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
* By time we get here, all error checking will have been done.
*/
void
-_swrast_DrawPixels( GLcontext *ctx,
+_swrast_DrawPixels( struct gl_context *ctx,
GLint x, GLint y,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
@@ -751,7 +753,7 @@ _swrast_DrawPixels( GLcontext *ctx,
type, unpack, pixels);
break;
default:
- _mesa_problem(ctx, "unexpected format in _swrast_DrawPixels");
+ _mesa_problem(ctx, "unexpected format 0x%x in _swrast_DrawPixels", format);
/* don't return yet, clean-up */
}
diff --git a/src/mesa/swrast/s_feedback.c b/src/mesa/swrast/s_feedback.c
index 6ac8ac73b0b..00f92d463c3 100644
--- a/src/mesa/swrast/s_feedback.c
+++ b/src/mesa/swrast/s_feedback.c
@@ -34,7 +34,7 @@
static void
-feedback_vertex(GLcontext * ctx, const SWvertex * v, const SWvertex * pv)
+feedback_vertex(struct gl_context * ctx, const SWvertex * v, const SWvertex * pv)
{
GLfloat win[4];
const GLfloat *vtc = v->attrib[FRAG_ATTRIB_TEX0];
@@ -53,7 +53,7 @@ feedback_vertex(GLcontext * ctx, const SWvertex * v, const SWvertex * pv)
* Put triangle in feedback buffer.
*/
void
-_swrast_feedback_triangle(GLcontext *ctx, const SWvertex *v0,
+_swrast_feedback_triangle(struct gl_context *ctx, const SWvertex *v0,
const SWvertex *v1, const SWvertex *v2)
{
if (!_swrast_culltriangle(ctx, v0, v1, v2)) {
@@ -75,7 +75,7 @@ _swrast_feedback_triangle(GLcontext *ctx, const SWvertex *v0,
void
-_swrast_feedback_line(GLcontext *ctx, const SWvertex *v0,
+_swrast_feedback_line(struct gl_context *ctx, const SWvertex *v0,
const SWvertex *v1)
{
GLenum token = GL_LINE_TOKEN;
@@ -100,7 +100,7 @@ _swrast_feedback_line(GLcontext *ctx, const SWvertex *v0,
void
-_swrast_feedback_point(GLcontext *ctx, const SWvertex *v)
+_swrast_feedback_point(struct gl_context *ctx, const SWvertex *v)
{
_mesa_feedback_token(ctx, (GLfloat) (GLint) GL_POINT_TOKEN);
feedback_vertex(ctx, v, v);
@@ -108,7 +108,7 @@ _swrast_feedback_point(GLcontext *ctx, const SWvertex *v)
void
-_swrast_select_triangle(GLcontext *ctx, const SWvertex *v0,
+_swrast_select_triangle(struct gl_context *ctx, const SWvertex *v0,
const SWvertex *v1, const SWvertex *v2)
{
if (!_swrast_culltriangle(ctx, v0, v1, v2)) {
@@ -122,7 +122,7 @@ _swrast_select_triangle(GLcontext *ctx, const SWvertex *v0,
void
-_swrast_select_line(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1)
+_swrast_select_line(struct gl_context *ctx, const SWvertex *v0, const SWvertex *v1)
{
const GLfloat zs = 1.0F / ctx->DrawBuffer->_DepthMaxF;
_mesa_update_hitflag( ctx, v0->attrib[FRAG_ATTRIB_WPOS][2] * zs );
@@ -131,7 +131,7 @@ _swrast_select_line(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1)
void
-_swrast_select_point(GLcontext *ctx, const SWvertex *v)
+_swrast_select_point(struct gl_context *ctx, const SWvertex *v)
{
const GLfloat zs = 1.0F / ctx->DrawBuffer->_DepthMaxF;
_mesa_update_hitflag( ctx, v->attrib[FRAG_ATTRIB_WPOS][2] * zs );
diff --git a/src/mesa/swrast/s_feedback.h b/src/mesa/swrast/s_feedback.h
index 9feab75dbb0..6bfd49735cc 100644
--- a/src/mesa/swrast/s_feedback.h
+++ b/src/mesa/swrast/s_feedback.h
@@ -31,20 +31,20 @@
#include "swrast.h"
-extern void _swrast_feedback_point( GLcontext *ctx, const SWvertex *v );
+extern void _swrast_feedback_point( struct gl_context *ctx, const SWvertex *v );
-extern void _swrast_feedback_line( GLcontext *ctx,
+extern void _swrast_feedback_line( struct gl_context *ctx,
const SWvertex *v1, const SWvertex *v2 );
-extern void _swrast_feedback_triangle( GLcontext *ctx, const SWvertex *v0,
+extern void _swrast_feedback_triangle( struct gl_context *ctx, const SWvertex *v0,
const SWvertex *v1, const SWvertex *v2 );
-extern void _swrast_select_point( GLcontext *ctx, const SWvertex *v );
+extern void _swrast_select_point( struct gl_context *ctx, const SWvertex *v );
-extern void _swrast_select_line( GLcontext *ctx,
+extern void _swrast_select_line( struct gl_context *ctx,
const SWvertex *v1, const SWvertex *v2 );
-extern void _swrast_select_triangle( GLcontext *ctx, const SWvertex *v0,
+extern void _swrast_select_triangle( struct gl_context *ctx, const SWvertex *v0,
const SWvertex *v1, const SWvertex *v2 );
#endif
diff --git a/src/mesa/swrast/s_fog.c b/src/mesa/swrast/s_fog.c
index 689500a613a..d808e2b2a2b 100644
--- a/src/mesa/swrast/s_fog.c
+++ b/src/mesa/swrast/s_fog.c
@@ -35,7 +35,7 @@
* Used to convert current raster distance to a fog factor in [0,1].
*/
GLfloat
-_swrast_z_to_fogfactor(GLcontext *ctx, GLfloat z)
+_swrast_z_to_fogfactor(struct gl_context *ctx, GLfloat z)
{
GLfloat d, f;
@@ -129,7 +129,7 @@ else { \
* _PreferPixelFog should be in sync with that state!
*/
void
-_swrast_fog_rgba_span( const GLcontext *ctx, SWspan *span )
+_swrast_fog_rgba_span( const struct gl_context *ctx, SWspan *span )
{
const SWcontext *swrast = CONST_SWRAST_CONTEXT(ctx);
GLfloat rFog, gFog, bFog;
diff --git a/src/mesa/swrast/s_fog.h b/src/mesa/swrast/s_fog.h
index a496746d106..ebc3513f496 100644
--- a/src/mesa/swrast/s_fog.h
+++ b/src/mesa/swrast/s_fog.h
@@ -33,9 +33,9 @@
extern GLfloat
-_swrast_z_to_fogfactor(GLcontext *ctx, GLfloat z);
+_swrast_z_to_fogfactor(struct gl_context *ctx, GLfloat z);
extern void
-_swrast_fog_rgba_span( const GLcontext *ctx, SWspan *span );
+_swrast_fog_rgba_span( const struct gl_context *ctx, SWspan *span );
#endif
diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c
index 9facb44d9bf..e391043f4d9 100644
--- a/src/mesa/swrast/s_fragprog.c
+++ b/src/mesa/swrast/s_fragprog.c
@@ -62,7 +62,7 @@ swizzle_texel(const GLfloat texel[4], GLfloat colorOut[4], GLuint swizzle)
* Called via machine->FetchTexelLod()
*/
static void
-fetch_texel_lod( GLcontext *ctx, const GLfloat texcoord[4], GLfloat lambda,
+fetch_texel_lod( struct gl_context *ctx, const GLfloat texcoord[4], GLfloat lambda,
GLuint unit, GLfloat color[4] )
{
const struct gl_texture_object *texObj = ctx->Texture.Unit[unit]._Current;
@@ -92,7 +92,7 @@ fetch_texel_lod( GLcontext *ctx, const GLfloat texcoord[4], GLfloat lambda,
* otherwise zero.
*/
static void
-fetch_texel_deriv( GLcontext *ctx, const GLfloat texcoord[4],
+fetch_texel_deriv( struct gl_context *ctx, const GLfloat texcoord[4],
const GLfloat texdx[4], const GLfloat texdy[4],
GLfloat lodBias, GLuint unit, GLfloat color[4] )
{
@@ -140,7 +140,7 @@ fetch_texel_deriv( GLcontext *ctx, const GLfloat texcoord[4],
* \param col which element (column) of the span we'll operate on
*/
static void
-init_machine(GLcontext *ctx, struct gl_program_machine *machine,
+init_machine(struct gl_context *ctx, struct gl_program_machine *machine,
const struct gl_fragment_program *program,
const SWspan *span, GLuint col)
{
@@ -169,7 +169,7 @@ init_machine(GLcontext *ctx, struct gl_program_machine *machine,
machine->Samplers = program->Base.SamplerUnits;
/* if running a GLSL program (not ARB_fragment_program) */
- if (ctx->Shader.CurrentProgram) {
+ if (ctx->Shader.CurrentFragmentProgram) {
/* Store front/back facing value */
machine->Attribs[FRAG_ATTRIB_FACE][col][0] = 1.0F - span->facing;
}
@@ -194,7 +194,7 @@ init_machine(GLcontext *ctx, struct gl_program_machine *machine,
* Run fragment program on the pixels in span from 'start' to 'end' - 1.
*/
static void
-run_program(GLcontext *ctx, SWspan *span, GLuint start, GLuint end)
+run_program(struct gl_context *ctx, SWspan *span, GLuint start, GLuint end)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
const struct gl_fragment_program *program = ctx->FragmentProgram._Current;
@@ -253,7 +253,7 @@ run_program(GLcontext *ctx, SWspan *span, GLuint start, GLuint end)
* in the given span.
*/
void
-_swrast_exec_fragment_program( GLcontext *ctx, SWspan *span )
+_swrast_exec_fragment_program( struct gl_context *ctx, SWspan *span )
{
const struct gl_fragment_program *program = ctx->FragmentProgram._Current;
diff --git a/src/mesa/swrast/s_fragprog.h b/src/mesa/swrast/s_fragprog.h
index 92b9d01e173..689d3fc82e4 100644
--- a/src/mesa/swrast/s_fragprog.h
+++ b/src/mesa/swrast/s_fragprog.h
@@ -32,7 +32,7 @@
extern void
-_swrast_exec_fragment_program(GLcontext *ctx, SWspan *span);
+_swrast_exec_fragment_program(struct gl_context *ctx, SWspan *span);
#endif /* S_FRAGPROG_H */
diff --git a/src/mesa/swrast/s_lines.c b/src/mesa/swrast/s_lines.c
index 7db5af4ae1c..95a2a5d96fc 100644
--- a/src/mesa/swrast/s_lines.c
+++ b/src/mesa/swrast/s_lines.c
@@ -38,7 +38,7 @@
* Init the mask[] array to implement a line stipple.
*/
static void
-compute_stipple_mask( GLcontext *ctx, GLuint len, GLubyte mask[] )
+compute_stipple_mask( struct gl_context *ctx, GLuint len, GLubyte mask[] )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLuint i;
@@ -60,7 +60,7 @@ compute_stipple_mask( GLcontext *ctx, GLuint len, GLubyte mask[] )
* To draw a wide line we can simply redraw the span N times, side by side.
*/
static void
-draw_wide_line( GLcontext *ctx, SWspan *span, GLboolean xMajor )
+draw_wide_line( struct gl_context *ctx, SWspan *span, GLboolean xMajor )
{
const GLint width = (GLint) CLAMP(ctx->Line.Width,
ctx->Const.MinLineWidth,
@@ -160,7 +160,7 @@ draw_wide_line( GLcontext *ctx, SWspan *span, GLboolean xMajor )
void
-_swrast_add_spec_terms_line(GLcontext *ctx,
+_swrast_add_spec_terms_line(struct gl_context *ctx,
const SWvertex *v0, const SWvertex *v1)
{
SWvertex *ncv0 = (SWvertex *)v0;
@@ -222,7 +222,7 @@ do { \
* tests to this code.
*/
void
-_swrast_choose_line( GLcontext *ctx )
+_swrast_choose_line( struct gl_context *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLboolean specular = (ctx->Fog.ColorSumEnabled ||
diff --git a/src/mesa/swrast/s_lines.h b/src/mesa/swrast/s_lines.h
index 22979a02b60..a4c98a8558b 100644
--- a/src/mesa/swrast/s_lines.h
+++ b/src/mesa/swrast/s_lines.h
@@ -30,10 +30,10 @@
#include "swrast.h"
void
-_swrast_choose_line( GLcontext *ctx );
+_swrast_choose_line( struct gl_context *ctx );
void
-_swrast_add_spec_terms_line( GLcontext *ctx,
+_swrast_add_spec_terms_line( struct gl_context *ctx,
const SWvertex *v0,
const SWvertex *v1 );
diff --git a/src/mesa/swrast/s_linetemp.h b/src/mesa/swrast/s_linetemp.h
index 033431df232..f9f2d293412 100644
--- a/src/mesa/swrast/s_linetemp.h
+++ b/src/mesa/swrast/s_linetemp.h
@@ -63,7 +63,7 @@
static void
-NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 )
+NAME( struct gl_context *ctx, const SWvertex *vert0, const SWvertex *vert1 )
{
const SWcontext *swrast = SWRAST_CONTEXT(ctx);
SWspan span;
diff --git a/src/mesa/swrast/s_logic.c b/src/mesa/swrast/s_logic.c
index c36a16e665c..b93b4b7af30 100644
--- a/src/mesa/swrast/s_logic.c
+++ b/src/mesa/swrast/s_logic.c
@@ -158,7 +158,7 @@ do { \
static INLINE void
-logicop_uint1(GLcontext *ctx, GLuint n, GLuint src[], const GLuint dest[],
+logicop_uint1(struct gl_context *ctx, GLuint n, GLuint src[], const GLuint dest[],
const GLubyte mask[])
{
LOGIC_OP_LOOP(ctx->Color.LogicOp, 1);
@@ -166,7 +166,7 @@ logicop_uint1(GLcontext *ctx, GLuint n, GLuint src[], const GLuint dest[],
static INLINE void
-logicop_uint2(GLcontext *ctx, GLuint n, GLuint src[], const GLuint dest[],
+logicop_uint2(struct gl_context *ctx, GLuint n, GLuint src[], const GLuint dest[],
const GLubyte mask[])
{
LOGIC_OP_LOOP(ctx->Color.LogicOp, 2);
@@ -174,7 +174,7 @@ logicop_uint2(GLcontext *ctx, GLuint n, GLuint src[], const GLuint dest[],
static INLINE void
-logicop_uint4(GLcontext *ctx, GLuint n, GLuint src[], const GLuint dest[],
+logicop_uint4(struct gl_context *ctx, GLuint n, GLuint src[], const GLuint dest[],
const GLubyte mask[])
{
LOGIC_OP_LOOP(ctx->Color.LogicOp, 4);
@@ -188,7 +188,7 @@ logicop_uint4(GLcontext *ctx, GLuint n, GLuint src[], const GLuint dest[],
* pixel coordinates.
*/
void
-_swrast_logicop_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
+_swrast_logicop_rgba_span(struct gl_context *ctx, struct gl_renderbuffer *rb,
SWspan *span)
{
void *rbPixels;
diff --git a/src/mesa/swrast/s_logic.h b/src/mesa/swrast/s_logic.h
index d609513348d..95c7fe3e150 100644
--- a/src/mesa/swrast/s_logic.h
+++ b/src/mesa/swrast/s_logic.h
@@ -31,7 +31,7 @@
#include "s_span.h"
extern void
-_swrast_logicop_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
+_swrast_logicop_rgba_span(struct gl_context *ctx, struct gl_renderbuffer *rb,
SWspan *span);
diff --git a/src/mesa/swrast/s_masking.c b/src/mesa/swrast/s_masking.c
index e38d90f199e..2e68f8c4bd7 100644
--- a/src/mesa/swrast/s_masking.c
+++ b/src/mesa/swrast/s_masking.c
@@ -40,7 +40,7 @@
* Apply the color mask to a span of rgba values.
*/
void
-_swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
+_swrast_mask_rgba_span(struct gl_context *ctx, struct gl_renderbuffer *rb,
SWspan *span, GLuint buf)
{
const GLuint n = span->end;
diff --git a/src/mesa/swrast/s_masking.h b/src/mesa/swrast/s_masking.h
index cb000da0fd8..3712c82163b 100644
--- a/src/mesa/swrast/s_masking.h
+++ b/src/mesa/swrast/s_masking.h
@@ -32,7 +32,7 @@
extern void
-_swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
+_swrast_mask_rgba_span(struct gl_context *ctx, struct gl_renderbuffer *rb,
SWspan *span, GLuint buf);
#endif
diff --git a/src/mesa/swrast/s_points.c b/src/mesa/swrast/s_points.c
index 12431662c47..06c6ef4ef7a 100644
--- a/src/mesa/swrast/s_points.c
+++ b/src/mesa/swrast/s_points.c
@@ -52,7 +52,7 @@
* Must also clamp to user-defined range and implmentation limits.
*/
static INLINE GLfloat
-get_size(const GLcontext *ctx, const SWvertex *vert, GLboolean smoothed)
+get_size(const struct gl_context *ctx, const SWvertex *vert, GLboolean smoothed)
{
GLfloat size;
@@ -80,7 +80,7 @@ get_size(const GLcontext *ctx, const SWvertex *vert, GLboolean smoothed)
* Draw a point sprite
*/
static void
-sprite_point(GLcontext *ctx, const SWvertex *vert)
+sprite_point(struct gl_context *ctx, const SWvertex *vert)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
SWspan span;
@@ -240,7 +240,7 @@ sprite_point(GLcontext *ctx, const SWvertex *vert)
* Draw smooth/antialiased point. RGB or CI mode.
*/
static void
-smooth_point(GLcontext *ctx, const SWvertex *vert)
+smooth_point(struct gl_context *ctx, const SWvertex *vert)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
SWspan span;
@@ -360,7 +360,7 @@ smooth_point(GLcontext *ctx, const SWvertex *vert)
* Draw large (size >= 1) non-AA point. RGB or CI mode.
*/
static void
-large_point(GLcontext *ctx, const SWvertex *vert)
+large_point(struct gl_context *ctx, const SWvertex *vert)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
SWspan span;
@@ -449,7 +449,7 @@ large_point(GLcontext *ctx, const SWvertex *vert)
* Draw size=1, single-pixel point
*/
static void
-pixel_point(GLcontext *ctx, const SWvertex *vert)
+pixel_point(struct gl_context *ctx, const SWvertex *vert)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
/*
@@ -513,7 +513,7 @@ pixel_point(GLcontext *ctx, const SWvertex *vert)
* primary color.
*/
void
-_swrast_add_spec_terms_point(GLcontext *ctx, const SWvertex *v0)
+_swrast_add_spec_terms_point(struct gl_context *ctx, const SWvertex *v0)
{
SWvertex *ncv0 = (SWvertex *) v0; /* cast away const */
GLfloat rSum, gSum, bSum;
@@ -539,7 +539,7 @@ _swrast_add_spec_terms_point(GLcontext *ctx, const SWvertex *v0)
* Examine current state to determine which point drawing function to use.
*/
void
-_swrast_choose_point(GLcontext *ctx)
+_swrast_choose_point(struct gl_context *ctx)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
const GLfloat size = CLAMP(ctx->Point.Size,
diff --git a/src/mesa/swrast/s_points.h b/src/mesa/swrast/s_points.h
index 9e39c601efb..0b6550e8018 100644
--- a/src/mesa/swrast/s_points.h
+++ b/src/mesa/swrast/s_points.h
@@ -30,10 +30,10 @@
#include "swrast.h"
extern void
-_swrast_choose_point( GLcontext *ctx );
+_swrast_choose_point( struct gl_context *ctx );
extern void
-_swrast_add_spec_terms_point( GLcontext *ctx,
+_swrast_add_spec_terms_point( struct gl_context *ctx,
const SWvertex *v0 );
#endif
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
index b0a3d36420a..5e6356c0d54 100644
--- a/src/mesa/swrast/s_readpix.c
+++ b/src/mesa/swrast/s_readpix.c
@@ -29,8 +29,9 @@
#include "main/feedback.h"
#include "main/formats.h"
#include "main/image.h"
-#include "main/macros.h"
#include "main/imports.h"
+#include "main/macros.h"
+#include "main/pack.h"
#include "main/state.h"
#include "s_context.h"
@@ -43,7 +44,7 @@
* Read pixels for format=GL_DEPTH_COMPONENT.
*/
static void
-read_depth_pixels( GLcontext *ctx,
+read_depth_pixels( struct gl_context *ctx,
GLint x, GLint y,
GLsizei width, GLsizei height,
GLenum type, GLvoid *pixels,
@@ -139,7 +140,7 @@ read_depth_pixels( GLcontext *ctx,
* Read pixels for format=GL_STENCIL_INDEX.
*/
static void
-read_stencil_pixels( GLcontext *ctx,
+read_stencil_pixels( struct gl_context *ctx,
GLint x, GLint y,
GLsizei width, GLsizei height,
GLenum type, GLvoid *pixels,
@@ -177,7 +178,7 @@ read_stencil_pixels( GLcontext *ctx,
* \return GL_TRUE if success, GL_FALSE if unable to do the readpixels
*/
static GLboolean
-fast_read_rgba_pixels( GLcontext *ctx,
+fast_read_rgba_pixels( struct gl_context *ctx,
GLint x, GLint y,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
@@ -297,7 +298,7 @@ adjust_colors(const struct gl_framebuffer *fb, GLuint n, GLfloat rgba[][4])
* Read R, G, B, A, RGB, L, or LA pixels.
*/
static void
-read_rgba_pixels( GLcontext *ctx,
+read_rgba_pixels( struct gl_context *ctx,
GLint x, GLint y,
GLsizei width, GLsizei height,
GLenum format, GLenum type, GLvoid *pixels,
@@ -362,7 +363,7 @@ read_rgba_pixels( GLcontext *ctx,
* depth and stencil buffers really exist.
*/
static void
-read_depth_stencil_pixels(GLcontext *ctx,
+read_depth_stencil_pixels(struct gl_context *ctx,
GLint x, GLint y,
GLsizei width, GLsizei height,
GLenum type, GLvoid *pixels,
@@ -453,7 +454,7 @@ read_depth_stencil_pixels(GLcontext *ctx,
* By time we get here, all error checking will have been done.
*/
void
-_swrast_ReadPixels( GLcontext *ctx,
+_swrast_ReadPixels( struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *packing,
@@ -513,7 +514,7 @@ _swrast_ReadPixels( GLcontext *ctx,
type, pixels, &clippedPacking);
break;
default:
- _mesa_problem(ctx, "unexpected format in _swrast_ReadPixels");
+ _mesa_problem(ctx, "unexpected format 0x%x in _swrast_ReadPixels", format);
/* don't return yet, clean-up */
}
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index 28c82990e08..3240b135774 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -57,7 +57,7 @@
* and glBitmap.
*/
void
-_swrast_span_default_attribs(GLcontext *ctx, SWspan *span)
+_swrast_span_default_attribs(struct gl_context *ctx, SWspan *span)
{
GLchan r, g, b, a;
/* Z*/
@@ -163,7 +163,7 @@ _swrast_span_default_attribs(GLcontext *ctx, SWspan *span)
* should have computed attrStart/Step values for FRAG_ATTRIB_WPOS[3]!
*/
static INLINE void
-interpolate_active_attribs(GLcontext *ctx, SWspan *span, GLbitfield attrMask)
+interpolate_active_attribs(struct gl_context *ctx, SWspan *span, GLbitfield attrMask)
{
const SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -210,7 +210,7 @@ interpolate_active_attribs(GLcontext *ctx, SWspan *span, GLbitfield attrMask)
* color array.
*/
static INLINE void
-interpolate_int_colors(GLcontext *ctx, SWspan *span)
+interpolate_int_colors(struct gl_context *ctx, SWspan *span)
{
const GLuint n = span->end;
GLuint i;
@@ -370,7 +370,7 @@ interpolate_float_colors(SWspan *span)
* Fill in the span.zArray array from the span->z, zStep values.
*/
void
-_swrast_span_interpolate_z( const GLcontext *ctx, SWspan *span )
+_swrast_span_interpolate_z( const struct gl_context *ctx, SWspan *span )
{
const GLuint n = span->end;
GLuint i;
@@ -460,7 +460,7 @@ _swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy,
* texels with (s/q, t/q, r/q).
*/
static void
-interpolate_texcoords(GLcontext *ctx, SWspan *span)
+interpolate_texcoords(struct gl_context *ctx, SWspan *span)
{
const GLuint maxUnit
= (ctx->Texture._EnabledCoordUnits > 1) ? ctx->Const.MaxTextureUnits : 1;
@@ -601,7 +601,7 @@ interpolate_texcoords(GLcontext *ctx, SWspan *span)
* Fill in the arrays->attribs[FRAG_ATTRIB_WPOS] array.
*/
static INLINE void
-interpolate_wpos(GLcontext *ctx, SWspan *span)
+interpolate_wpos(struct gl_context *ctx, SWspan *span)
{
GLfloat (*wpos)[4] = span->array->attribs[FRAG_ATTRIB_WPOS];
GLuint i;
@@ -635,7 +635,7 @@ interpolate_wpos(GLcontext *ctx, SWspan *span)
* Apply the current polygon stipple pattern to a span of pixels.
*/
static INLINE void
-stipple_polygon_span(GLcontext *ctx, SWspan *span)
+stipple_polygon_span(struct gl_context *ctx, SWspan *span)
{
GLubyte *mask = span->array->mask;
@@ -680,7 +680,7 @@ stipple_polygon_span(GLcontext *ctx, SWspan *span)
* GL_FALSE nothing visible
*/
static INLINE GLuint
-clip_span( GLcontext *ctx, SWspan *span )
+clip_span( struct gl_context *ctx, SWspan *span )
{
const GLint xmin = ctx->DrawBuffer->_Xmin;
const GLint xmax = ctx->DrawBuffer->_Xmax;
@@ -807,7 +807,7 @@ clip_span( GLcontext *ctx, SWspan *span )
* Result is float color array (FRAG_ATTRIB_COL0).
*/
static INLINE void
-add_specular(GLcontext *ctx, SWspan *span)
+add_specular(struct gl_context *ctx, SWspan *span)
{
const SWcontext *swrast = SWRAST_CONTEXT(ctx);
const GLubyte *mask = span->array->mask;
@@ -951,7 +951,7 @@ convert_color_type(SWspan *span, GLenum newType, GLuint output)
* Apply fragment shader, fragment program or normal texturing to span.
*/
static INLINE void
-shade_texture_span(GLcontext *ctx, SWspan *span)
+shade_texture_span(struct gl_context *ctx, SWspan *span)
{
GLbitfield inputsRead;
@@ -1029,7 +1029,7 @@ shade_texture_span(GLcontext *ctx, SWspan *span)
* to their original values before returning.
*/
void
-_swrast_write_rgba_span( GLcontext *ctx, SWspan *span)
+_swrast_write_rgba_span( struct gl_context *ctx, SWspan *span)
{
const SWcontext *swrast = SWRAST_CONTEXT(ctx);
const GLuint *colorMask = (GLuint *) ctx->Color.ColorMask;
@@ -1304,7 +1304,7 @@ end:
* \param rgba the returned colors
*/
void
-_swrast_read_rgba_span( GLcontext *ctx, struct gl_renderbuffer *rb,
+_swrast_read_rgba_span( struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y, GLenum dstType,
GLvoid *rgba)
{
@@ -1373,7 +1373,7 @@ _swrast_read_rgba_span( GLcontext *ctx, struct gl_renderbuffer *rb,
* values array.
*/
void
-_swrast_get_values(GLcontext *ctx, struct gl_renderbuffer *rb,
+_swrast_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, const GLint x[], const GLint y[],
void *values, GLuint valueSize)
{
@@ -1409,7 +1409,7 @@ _swrast_get_values(GLcontext *ctx, struct gl_renderbuffer *rb,
* \param valueSize size of each value (pixel) in bytes
*/
void
-_swrast_put_row(GLcontext *ctx, struct gl_renderbuffer *rb,
+_swrast_put_row(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, GLint x, GLint y,
const GLvoid *values, GLuint valueSize)
{
@@ -1444,7 +1444,7 @@ _swrast_put_row(GLcontext *ctx, struct gl_renderbuffer *rb,
* \param valueSize size of each value (pixel) in bytes
*/
void
-_swrast_get_row(GLcontext *ctx, struct gl_renderbuffer *rb,
+_swrast_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, GLint x, GLint y,
GLvoid *values, GLuint valueSize)
{
@@ -1479,7 +1479,7 @@ _swrast_get_row(GLcontext *ctx, struct gl_renderbuffer *rb,
* \return pointer to the colors we read.
*/
void *
-_swrast_get_dest_rgba(GLcontext *ctx, struct gl_renderbuffer *rb,
+_swrast_get_dest_rgba(struct gl_context *ctx, struct gl_renderbuffer *rb,
SWspan *span)
{
const GLuint pixelSize = RGBA_PIXEL_SIZE(span->array->ChanType);
diff --git a/src/mesa/swrast/s_span.h b/src/mesa/swrast/s_span.h
index aaf1fec2a8b..18e275ec8ab 100644
--- a/src/mesa/swrast/s_span.h
+++ b/src/mesa/swrast/s_span.h
@@ -176,10 +176,10 @@ do { \
extern void
-_swrast_span_default_attribs(GLcontext *ctx, SWspan *span);
+_swrast_span_default_attribs(struct gl_context *ctx, SWspan *span);
extern void
-_swrast_span_interpolate_z( const GLcontext *ctx, SWspan *span );
+_swrast_span_interpolate_z( const struct gl_context *ctx, SWspan *span );
extern GLfloat
_swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy,
@@ -188,31 +188,31 @@ _swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy,
extern void
-_swrast_write_rgba_span( GLcontext *ctx, SWspan *span);
+_swrast_write_rgba_span( struct gl_context *ctx, SWspan *span);
extern void
-_swrast_read_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
+_swrast_read_rgba_span(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y, GLenum type, GLvoid *rgba);
extern void
-_swrast_get_values(GLcontext *ctx, struct gl_renderbuffer *rb,
+_swrast_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, const GLint x[], const GLint y[],
void *values, GLuint valueSize);
extern void
-_swrast_put_row(GLcontext *ctx, struct gl_renderbuffer *rb,
+_swrast_put_row(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, GLint x, GLint y,
const GLvoid *values, GLuint valueSize);
extern void
-_swrast_get_row(GLcontext *ctx, struct gl_renderbuffer *rb,
+_swrast_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, GLint x, GLint y,
GLvoid *values, GLuint valueSize);
extern void *
-_swrast_get_dest_rgba(GLcontext *ctx, struct gl_renderbuffer *rb,
+_swrast_get_dest_rgba(struct gl_context *ctx, struct gl_renderbuffer *rb,
SWspan *span);
#endif
diff --git a/src/mesa/swrast/s_spantemp.h b/src/mesa/swrast/s_spantemp.h
index 2948a90f6bb..8a9485085ef 100644
--- a/src/mesa/swrast/s_spantemp.h
+++ b/src/mesa/swrast/s_spantemp.h
@@ -51,7 +51,7 @@
static void
-NAME(get_row)( GLcontext *ctx, struct gl_renderbuffer *rb,
+NAME(get_row)( struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, GLint x, GLint y, void *values )
{
#ifdef SPAN_VARS
@@ -69,7 +69,7 @@ NAME(get_row)( GLcontext *ctx, struct gl_renderbuffer *rb,
static void
-NAME(get_values)( GLcontext *ctx, struct gl_renderbuffer *rb,
+NAME(get_values)( struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, const GLint x[], const GLint y[], void *values )
{
#ifdef SPAN_VARS
@@ -86,7 +86,7 @@ NAME(get_values)( GLcontext *ctx, struct gl_renderbuffer *rb,
static void
-NAME(put_row)( GLcontext *ctx, struct gl_renderbuffer *rb,
+NAME(put_row)( struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, GLint x, GLint y,
const void *values, const GLubyte mask[] )
{
@@ -115,7 +115,7 @@ NAME(put_row)( GLcontext *ctx, struct gl_renderbuffer *rb,
static void
-NAME(put_row_rgb)( GLcontext *ctx, struct gl_renderbuffer *rb,
+NAME(put_row_rgb)( struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, GLint x, GLint y,
const void *values, const GLubyte mask[] )
{
@@ -140,7 +140,7 @@ NAME(put_row_rgb)( GLcontext *ctx, struct gl_renderbuffer *rb,
static void
-NAME(put_mono_row)( GLcontext *ctx, struct gl_renderbuffer *rb,
+NAME(put_mono_row)( struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, GLint x, GLint y,
const void *value, const GLubyte mask[] )
{
@@ -169,7 +169,7 @@ NAME(put_mono_row)( GLcontext *ctx, struct gl_renderbuffer *rb,
static void
-NAME(put_values)( GLcontext *ctx, struct gl_renderbuffer *rb,
+NAME(put_values)( struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, const GLint x[], const GLint y[],
const void *values, const GLubyte mask[] )
{
@@ -190,7 +190,7 @@ NAME(put_values)( GLcontext *ctx, struct gl_renderbuffer *rb,
static void
-NAME(put_mono_values)( GLcontext *ctx, struct gl_renderbuffer *rb,
+NAME(put_mono_values)( struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, const GLint x[], const GLint y[],
const void *value, const GLubyte mask[] )
{
diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c
index aa74b21ee80..5bec71c057b 100644
--- a/src/mesa/swrast/s_stencil.c
+++ b/src/mesa/swrast/s_stencil.c
@@ -61,7 +61,7 @@ ENDIF
* Output: stencil - modified values
*/
static void
-apply_stencil_op( const GLcontext *ctx, GLenum oper, GLuint face,
+apply_stencil_op( const struct gl_context *ctx, GLenum oper, GLuint face,
GLuint n, GLstencil stencil[], const GLubyte mask[] )
{
const GLstencil ref = ctx->Stencil.Ref[face];
@@ -225,7 +225,7 @@ apply_stencil_op( const GLcontext *ctx, GLenum oper, GLuint face,
* Return: GL_FALSE = all pixels failed, GL_TRUE = zero or more pixels passed.
*/
static GLboolean
-do_stencil_test( GLcontext *ctx, GLuint face, GLuint n, GLstencil stencil[],
+do_stencil_test( struct gl_context *ctx, GLuint face, GLuint n, GLstencil stencil[],
GLubyte mask[] )
{
GLubyte fail[MAX_WIDTH];
@@ -418,7 +418,7 @@ compute_pass_fail_masks(GLuint n, const GLubyte origMask[],
*
*/
static GLboolean
-stencil_and_ztest_span(GLcontext *ctx, SWspan *span, GLuint face)
+stencil_and_ztest_span(struct gl_context *ctx, SWspan *span, GLuint face)
{
struct gl_framebuffer *fb = ctx->DrawBuffer;
struct gl_renderbuffer *rb = fb->_StencilBuffer;
@@ -524,7 +524,7 @@ stencil_and_ztest_span(GLcontext *ctx, SWspan *span, GLuint face)
* mask - array [n] of flag: 1=apply operator, 0=don't apply operator
*/
static void
-apply_stencil_op_to_pixels( GLcontext *ctx,
+apply_stencil_op_to_pixels( struct gl_context *ctx,
GLuint n, const GLint x[], const GLint y[],
GLenum oper, GLuint face, const GLubyte mask[] )
{
@@ -698,7 +698,7 @@ apply_stencil_op_to_pixels( GLcontext *ctx,
* \return GL_FALSE = all pixels failed, GL_TRUE = zero or more pixels passed.
*/
static GLboolean
-stencil_test_pixels( GLcontext *ctx, GLuint face, GLuint n,
+stencil_test_pixels( struct gl_context *ctx, GLuint face, GLuint n,
const GLint x[], const GLint y[], GLubyte mask[] )
{
const struct gl_framebuffer *fb = ctx->DrawBuffer;
@@ -897,7 +897,7 @@ stencil_test_pixels( GLcontext *ctx, GLuint face, GLuint n,
* GL_TRUE - one or more fragments passed the testing
*/
static GLboolean
-stencil_and_ztest_pixels( GLcontext *ctx, SWspan *span, GLuint face )
+stencil_and_ztest_pixels( struct gl_context *ctx, SWspan *span, GLuint face )
{
GLubyte passMask[MAX_WIDTH], failMask[MAX_WIDTH], origMask[MAX_WIDTH];
struct gl_framebuffer *fb = ctx->DrawBuffer;
@@ -990,7 +990,7 @@ stencil_and_ztest_pixels( GLcontext *ctx, SWspan *span, GLuint face )
* GL_FALSE = all fragments failed.
*/
GLboolean
-_swrast_stencil_and_ztest_span(GLcontext *ctx, SWspan *span)
+_swrast_stencil_and_ztest_span(struct gl_context *ctx, SWspan *span)
{
const GLuint face = (span->facing == 0) ? 0 : ctx->Stencil._BackFace;
@@ -1042,7 +1042,7 @@ clip_span(GLuint bufferWidth, GLuint bufferHeight,
* Output: stencil - the array of stencil values
*/
void
-_swrast_read_stencil_span(GLcontext *ctx, struct gl_renderbuffer *rb,
+_swrast_read_stencil_span(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLint n, GLint x, GLint y, GLstencil stencil[])
{
if (y < 0 || y >= (GLint) rb->Height ||
@@ -1079,7 +1079,7 @@ _swrast_read_stencil_span(GLcontext *ctx, struct gl_renderbuffer *rb,
* stencil - the array of stencil values
*/
void
-_swrast_write_stencil_span(GLcontext *ctx, GLint n, GLint x, GLint y,
+_swrast_write_stencil_span(struct gl_context *ctx, GLint n, GLint x, GLint y,
const GLstencil stencil[] )
{
struct gl_framebuffer *fb = ctx->DrawBuffer;
@@ -1128,7 +1128,7 @@ _swrast_write_stencil_span(GLcontext *ctx, GLint n, GLint x, GLint y,
* Clear the stencil buffer.
*/
void
-_swrast_clear_stencil_buffer( GLcontext *ctx, struct gl_renderbuffer *rb )
+_swrast_clear_stencil_buffer( struct gl_context *ctx, struct gl_renderbuffer *rb )
{
const GLubyte stencilBits = ctx->DrawBuffer->Visual.stencilBits;
const GLuint mask = ctx->Stencil.WriteMask[0];
diff --git a/src/mesa/swrast/s_stencil.h b/src/mesa/swrast/s_stencil.h
index c076ebbe2a1..00f5179e046 100644
--- a/src/mesa/swrast/s_stencil.h
+++ b/src/mesa/swrast/s_stencil.h
@@ -33,21 +33,21 @@
extern GLboolean
-_swrast_stencil_and_ztest_span(GLcontext *ctx, SWspan *span);
+_swrast_stencil_and_ztest_span(struct gl_context *ctx, SWspan *span);
extern void
-_swrast_read_stencil_span(GLcontext *ctx, struct gl_renderbuffer *rb,
+_swrast_read_stencil_span(struct gl_context *ctx, struct gl_renderbuffer *rb,
GLint n, GLint x, GLint y, GLstencil stencil[]);
extern void
-_swrast_write_stencil_span( GLcontext *ctx, GLint n, GLint x, GLint y,
+_swrast_write_stencil_span( struct gl_context *ctx, GLint n, GLint x, GLint y,
const GLstencil stencil[] );
extern void
-_swrast_clear_stencil_buffer( GLcontext *ctx, struct gl_renderbuffer *rb );
+_swrast_clear_stencil_buffer( struct gl_context *ctx, struct gl_renderbuffer *rb );
#endif
diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c
index 2ac0aaa246d..1836d074aee 100644
--- a/src/mesa/swrast/s_texcombine.c
+++ b/src/mesa/swrast/s_texcombine.c
@@ -27,8 +27,8 @@
#include "main/glheader.h"
#include "main/context.h"
#include "main/colormac.h"
-#include "main/image.h"
#include "main/imports.h"
+#include "main/pixeltransfer.h"
#include "program/prog_instruction.h"
#include "s_context.h"
@@ -72,7 +72,7 @@ get_texel_array(SWcontext *swrast, GLuint unit)
* \param rgba incoming/result fragment colors
*/
static void
-texture_combine( GLcontext *ctx, GLuint unit, GLuint n,
+texture_combine( struct gl_context *ctx, GLuint unit, GLuint n,
const float4_array primary_rgba,
const GLfloat *texelBuffer,
GLchan (*rgbaChan)[4] )
@@ -556,7 +556,7 @@ swizzle_texels(GLuint swizzle, GLuint count, float4_array texels)
* Apply texture mapping to a span of fragments.
*/
void
-_swrast_texture_span( GLcontext *ctx, SWspan *span )
+_swrast_texture_span( struct gl_context *ctx, SWspan *span )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLfloat primary_rgba[MAX_WIDTH][4];
diff --git a/src/mesa/swrast/s_texcombine.h b/src/mesa/swrast/s_texcombine.h
index 4f5dfbe1afe..5f47ebecbf1 100644
--- a/src/mesa/swrast/s_texcombine.h
+++ b/src/mesa/swrast/s_texcombine.h
@@ -31,6 +31,6 @@
#include "s_span.h"
extern void
-_swrast_texture_span( GLcontext *ctx, SWspan *span );
+_swrast_texture_span( struct gl_context *ctx, SWspan *span );
#endif
diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c
index e5ffe8fa5c5..ec281776d0d 100644
--- a/src/mesa/swrast/s_texfilter.c
+++ b/src/mesa/swrast/s_texfilter.c
@@ -798,7 +798,7 @@ get_border_color(const struct gl_texture_object *tObj,
* Return the texture sample for coordinate (s) using GL_NEAREST filter.
*/
static INLINE void
-sample_1d_nearest(GLcontext *ctx,
+sample_1d_nearest(struct gl_context *ctx,
const struct gl_texture_object *tObj,
const struct gl_texture_image *img,
const GLfloat texcoord[4], GLfloat rgba[4])
@@ -822,7 +822,7 @@ sample_1d_nearest(GLcontext *ctx,
* Return the texture sample for coordinate (s) using GL_LINEAR filter.
*/
static INLINE void
-sample_1d_linear(GLcontext *ctx,
+sample_1d_linear(struct gl_context *ctx,
const struct gl_texture_object *tObj,
const struct gl_texture_image *img,
const GLfloat texcoord[4], GLfloat rgba[4])
@@ -863,7 +863,7 @@ sample_1d_linear(GLcontext *ctx,
static void
-sample_1d_nearest_mipmap_nearest(GLcontext *ctx,
+sample_1d_nearest_mipmap_nearest(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -878,7 +878,7 @@ sample_1d_nearest_mipmap_nearest(GLcontext *ctx,
static void
-sample_1d_linear_mipmap_nearest(GLcontext *ctx,
+sample_1d_linear_mipmap_nearest(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -893,7 +893,7 @@ sample_1d_linear_mipmap_nearest(GLcontext *ctx,
static void
-sample_1d_nearest_mipmap_linear(GLcontext *ctx,
+sample_1d_nearest_mipmap_linear(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -918,7 +918,7 @@ sample_1d_nearest_mipmap_linear(GLcontext *ctx,
static void
-sample_1d_linear_mipmap_linear(GLcontext *ctx,
+sample_1d_linear_mipmap_linear(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -944,7 +944,7 @@ sample_1d_linear_mipmap_linear(GLcontext *ctx,
/** Sample 1D texture, nearest filtering for both min/magnification */
static void
-sample_nearest_1d( GLcontext *ctx,
+sample_nearest_1d( struct gl_context *ctx,
const struct gl_texture_object *tObj, GLuint n,
const GLfloat texcoords[][4], const GLfloat lambda[],
GLfloat rgba[][4] )
@@ -960,7 +960,7 @@ sample_nearest_1d( GLcontext *ctx,
/** Sample 1D texture, linear filtering for both min/magnification */
static void
-sample_linear_1d( GLcontext *ctx,
+sample_linear_1d( struct gl_context *ctx,
const struct gl_texture_object *tObj, GLuint n,
const GLfloat texcoords[][4], const GLfloat lambda[],
GLfloat rgba[][4] )
@@ -976,7 +976,7 @@ sample_linear_1d( GLcontext *ctx,
/** Sample 1D texture, using lambda to choose between min/magnification */
static void
-sample_lambda_1d( GLcontext *ctx,
+sample_lambda_1d( struct gl_context *ctx,
const struct gl_texture_object *tObj, GLuint n,
const GLfloat texcoords[][4],
const GLfloat lambda[], GLfloat rgba[][4] )
@@ -1055,7 +1055,7 @@ sample_lambda_1d( GLcontext *ctx,
* Return the texture sample for coordinate (s,t) using GL_NEAREST filter.
*/
static INLINE void
-sample_2d_nearest(GLcontext *ctx,
+sample_2d_nearest(struct gl_context *ctx,
const struct gl_texture_object *tObj,
const struct gl_texture_image *img,
const GLfloat texcoord[4],
@@ -1088,7 +1088,7 @@ sample_2d_nearest(GLcontext *ctx,
* New sampling code contributed by Lynn Quam <[email protected]>.
*/
static INLINE void
-sample_2d_linear(GLcontext *ctx,
+sample_2d_linear(struct gl_context *ctx,
const struct gl_texture_object *tObj,
const struct gl_texture_image *img,
const GLfloat texcoord[4],
@@ -1152,7 +1152,7 @@ sample_2d_linear(GLcontext *ctx,
* We don't have to worry about the texture border.
*/
static INLINE void
-sample_2d_linear_repeat(GLcontext *ctx,
+sample_2d_linear_repeat(struct gl_context *ctx,
const struct gl_texture_object *tObj,
const struct gl_texture_image *img,
const GLfloat texcoord[4],
@@ -1185,7 +1185,7 @@ sample_2d_linear_repeat(GLcontext *ctx,
static void
-sample_2d_nearest_mipmap_nearest(GLcontext *ctx,
+sample_2d_nearest_mipmap_nearest(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -1199,7 +1199,7 @@ sample_2d_nearest_mipmap_nearest(GLcontext *ctx,
static void
-sample_2d_linear_mipmap_nearest(GLcontext *ctx,
+sample_2d_linear_mipmap_nearest(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -1214,7 +1214,7 @@ sample_2d_linear_mipmap_nearest(GLcontext *ctx,
static void
-sample_2d_nearest_mipmap_linear(GLcontext *ctx,
+sample_2d_nearest_mipmap_linear(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -1239,7 +1239,7 @@ sample_2d_nearest_mipmap_linear(GLcontext *ctx,
static void
-sample_2d_linear_mipmap_linear( GLcontext *ctx,
+sample_2d_linear_mipmap_linear( struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4] )
@@ -1264,7 +1264,7 @@ sample_2d_linear_mipmap_linear( GLcontext *ctx,
static void
-sample_2d_linear_mipmap_linear_repeat(GLcontext *ctx,
+sample_2d_linear_mipmap_linear_repeat(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -1294,7 +1294,7 @@ sample_2d_linear_mipmap_linear_repeat(GLcontext *ctx,
/** Sample 2D texture, nearest filtering for both min/magnification */
static void
-sample_nearest_2d(GLcontext *ctx,
+sample_nearest_2d(struct gl_context *ctx,
const struct gl_texture_object *tObj, GLuint n,
const GLfloat texcoords[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -1310,7 +1310,7 @@ sample_nearest_2d(GLcontext *ctx,
/** Sample 2D texture, linear filtering for both min/magnification */
static void
-sample_linear_2d(GLcontext *ctx,
+sample_linear_2d(struct gl_context *ctx,
const struct gl_texture_object *tObj, GLuint n,
const GLfloat texcoords[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -1343,7 +1343,7 @@ sample_linear_2d(GLcontext *ctx,
* Format = GL_RGB
*/
static void
-opt_sample_rgb_2d(GLcontext *ctx,
+opt_sample_rgb_2d(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoords[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -1384,7 +1384,7 @@ opt_sample_rgb_2d(GLcontext *ctx,
* Format = GL_RGBA
*/
static void
-opt_sample_rgba_2d(GLcontext *ctx,
+opt_sample_rgba_2d(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoords[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -1419,7 +1419,7 @@ opt_sample_rgba_2d(GLcontext *ctx,
/** Sample 2D texture, using lambda to choose between min/magnification */
static void
-sample_lambda_2d(GLcontext *ctx,
+sample_lambda_2d(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoords[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -1540,7 +1540,7 @@ sample_lambda_2d(GLcontext *ctx,
* Return the texture sample for coordinate (s,t,r) using GL_NEAREST filter.
*/
static INLINE void
-sample_3d_nearest(GLcontext *ctx,
+sample_3d_nearest(struct gl_context *ctx,
const struct gl_texture_object *tObj,
const struct gl_texture_image *img,
const GLfloat texcoord[4],
@@ -1572,7 +1572,7 @@ sample_3d_nearest(GLcontext *ctx,
* Return the texture sample for coordinate (s,t,r) using GL_LINEAR filter.
*/
static void
-sample_3d_linear(GLcontext *ctx,
+sample_3d_linear(struct gl_context *ctx,
const struct gl_texture_object *tObj,
const struct gl_texture_image *img,
const GLfloat texcoord[4],
@@ -1666,7 +1666,7 @@ sample_3d_linear(GLcontext *ctx,
static void
-sample_3d_nearest_mipmap_nearest(GLcontext *ctx,
+sample_3d_nearest_mipmap_nearest(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4] )
@@ -1680,7 +1680,7 @@ sample_3d_nearest_mipmap_nearest(GLcontext *ctx,
static void
-sample_3d_linear_mipmap_nearest(GLcontext *ctx,
+sample_3d_linear_mipmap_nearest(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -1695,7 +1695,7 @@ sample_3d_linear_mipmap_nearest(GLcontext *ctx,
static void
-sample_3d_nearest_mipmap_linear(GLcontext *ctx,
+sample_3d_nearest_mipmap_linear(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -1720,7 +1720,7 @@ sample_3d_nearest_mipmap_linear(GLcontext *ctx,
static void
-sample_3d_linear_mipmap_linear(GLcontext *ctx,
+sample_3d_linear_mipmap_linear(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -1746,7 +1746,7 @@ sample_3d_linear_mipmap_linear(GLcontext *ctx,
/** Sample 3D texture, nearest filtering for both min/magnification */
static void
-sample_nearest_3d(GLcontext *ctx,
+sample_nearest_3d(struct gl_context *ctx,
const struct gl_texture_object *tObj, GLuint n,
const GLfloat texcoords[][4], const GLfloat lambda[],
GLfloat rgba[][4])
@@ -1762,7 +1762,7 @@ sample_nearest_3d(GLcontext *ctx,
/** Sample 3D texture, linear filtering for both min/magnification */
static void
-sample_linear_3d(GLcontext *ctx,
+sample_linear_3d(struct gl_context *ctx,
const struct gl_texture_object *tObj, GLuint n,
const GLfloat texcoords[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -1778,7 +1778,7 @@ sample_linear_3d(GLcontext *ctx,
/** Sample 3D texture, using lambda to choose between min/magnification */
static void
-sample_lambda_3d(GLcontext *ctx,
+sample_lambda_3d(struct gl_context *ctx,
const struct gl_texture_object *tObj, GLuint n,
const GLfloat texcoords[][4], const GLfloat lambda[],
GLfloat rgba[][4])
@@ -1933,7 +1933,7 @@ choose_cube_face(const struct gl_texture_object *texObj,
static void
-sample_nearest_cube(GLcontext *ctx,
+sample_nearest_cube(struct gl_context *ctx,
const struct gl_texture_object *tObj, GLuint n,
const GLfloat texcoords[][4], const GLfloat lambda[],
GLfloat rgba[][4])
@@ -1951,7 +1951,7 @@ sample_nearest_cube(GLcontext *ctx,
static void
-sample_linear_cube(GLcontext *ctx,
+sample_linear_cube(struct gl_context *ctx,
const struct gl_texture_object *tObj, GLuint n,
const GLfloat texcoords[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -1969,7 +1969,7 @@ sample_linear_cube(GLcontext *ctx,
static void
-sample_cube_nearest_mipmap_nearest(GLcontext *ctx,
+sample_cube_nearest_mipmap_nearest(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -1998,7 +1998,7 @@ sample_cube_nearest_mipmap_nearest(GLcontext *ctx,
static void
-sample_cube_linear_mipmap_nearest(GLcontext *ctx,
+sample_cube_linear_mipmap_nearest(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -2017,7 +2017,7 @@ sample_cube_linear_mipmap_nearest(GLcontext *ctx,
static void
-sample_cube_nearest_mipmap_linear(GLcontext *ctx,
+sample_cube_nearest_mipmap_linear(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -2046,7 +2046,7 @@ sample_cube_nearest_mipmap_linear(GLcontext *ctx,
static void
-sample_cube_linear_mipmap_linear(GLcontext *ctx,
+sample_cube_linear_mipmap_linear(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -2076,7 +2076,7 @@ sample_cube_linear_mipmap_linear(GLcontext *ctx,
/** Sample cube texture, using lambda to choose between min/magnification */
static void
-sample_lambda_cube(GLcontext *ctx,
+sample_lambda_cube(struct gl_context *ctx,
const struct gl_texture_object *tObj, GLuint n,
const GLfloat texcoords[][4], const GLfloat lambda[],
GLfloat rgba[][4])
@@ -2150,7 +2150,7 @@ sample_lambda_cube(GLcontext *ctx,
static void
-sample_nearest_rect(GLcontext *ctx,
+sample_nearest_rect(struct gl_context *ctx,
const struct gl_texture_object *tObj, GLuint n,
const GLfloat texcoords[][4], const GLfloat lambda[],
GLfloat rgba[][4])
@@ -2184,7 +2184,7 @@ sample_nearest_rect(GLcontext *ctx,
static void
-sample_linear_rect(GLcontext *ctx,
+sample_linear_rect(struct gl_context *ctx,
const struct gl_texture_object *tObj, GLuint n,
const GLfloat texcoords[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -2250,7 +2250,7 @@ sample_linear_rect(GLcontext *ctx,
/** Sample Rect texture, using lambda to choose between min/magnification */
static void
-sample_lambda_rect(GLcontext *ctx,
+sample_lambda_rect(struct gl_context *ctx,
const struct gl_texture_object *tObj, GLuint n,
const GLfloat texcoords[][4], const GLfloat lambda[],
GLfloat rgba[][4])
@@ -2294,7 +2294,7 @@ sample_lambda_rect(GLcontext *ctx,
* Return the texture sample for coordinate (s,t,r) using GL_NEAREST filter.
*/
static void
-sample_2d_array_nearest(GLcontext *ctx,
+sample_2d_array_nearest(struct gl_context *ctx,
const struct gl_texture_object *tObj,
const struct gl_texture_image *img,
const GLfloat texcoord[4],
@@ -2327,7 +2327,7 @@ sample_2d_array_nearest(GLcontext *ctx,
* Return the texture sample for coordinate (s,t,r) using GL_LINEAR filter.
*/
static void
-sample_2d_array_linear(GLcontext *ctx,
+sample_2d_array_linear(struct gl_context *ctx,
const struct gl_texture_object *tObj,
const struct gl_texture_image *img,
const GLfloat texcoord[4],
@@ -2397,7 +2397,7 @@ sample_2d_array_linear(GLcontext *ctx,
static void
-sample_2d_array_nearest_mipmap_nearest(GLcontext *ctx,
+sample_2d_array_nearest_mipmap_nearest(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -2412,7 +2412,7 @@ sample_2d_array_nearest_mipmap_nearest(GLcontext *ctx,
static void
-sample_2d_array_linear_mipmap_nearest(GLcontext *ctx,
+sample_2d_array_linear_mipmap_nearest(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -2428,7 +2428,7 @@ sample_2d_array_linear_mipmap_nearest(GLcontext *ctx,
static void
-sample_2d_array_nearest_mipmap_linear(GLcontext *ctx,
+sample_2d_array_nearest_mipmap_linear(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -2455,7 +2455,7 @@ sample_2d_array_nearest_mipmap_linear(GLcontext *ctx,
static void
-sample_2d_array_linear_mipmap_linear(GLcontext *ctx,
+sample_2d_array_linear_mipmap_linear(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -2483,7 +2483,7 @@ sample_2d_array_linear_mipmap_linear(GLcontext *ctx,
/** Sample 2D Array texture, nearest filtering for both min/magnification */
static void
-sample_nearest_2d_array(GLcontext *ctx,
+sample_nearest_2d_array(struct gl_context *ctx,
const struct gl_texture_object *tObj, GLuint n,
const GLfloat texcoords[][4], const GLfloat lambda[],
GLfloat rgba[][4])
@@ -2500,7 +2500,7 @@ sample_nearest_2d_array(GLcontext *ctx,
/** Sample 2D Array texture, linear filtering for both min/magnification */
static void
-sample_linear_2d_array(GLcontext *ctx,
+sample_linear_2d_array(struct gl_context *ctx,
const struct gl_texture_object *tObj, GLuint n,
const GLfloat texcoords[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -2516,7 +2516,7 @@ sample_linear_2d_array(GLcontext *ctx,
/** Sample 2D Array texture, using lambda to choose between min/magnification */
static void
-sample_lambda_2d_array(GLcontext *ctx,
+sample_lambda_2d_array(struct gl_context *ctx,
const struct gl_texture_object *tObj, GLuint n,
const GLfloat texcoords[][4], const GLfloat lambda[],
GLfloat rgba[][4])
@@ -2604,7 +2604,7 @@ sample_lambda_2d_array(GLcontext *ctx,
* Return the texture sample for coordinate (s,t,r) using GL_NEAREST filter.
*/
static void
-sample_1d_array_nearest(GLcontext *ctx,
+sample_1d_array_nearest(struct gl_context *ctx,
const struct gl_texture_object *tObj,
const struct gl_texture_image *img,
const GLfloat texcoord[4],
@@ -2634,7 +2634,7 @@ sample_1d_array_nearest(GLcontext *ctx,
* Return the texture sample for coordinate (s,t,r) using GL_LINEAR filter.
*/
static void
-sample_1d_array_linear(GLcontext *ctx,
+sample_1d_array_linear(struct gl_context *ctx,
const struct gl_texture_object *tObj,
const struct gl_texture_image *img,
const GLfloat texcoord[4],
@@ -2683,7 +2683,7 @@ sample_1d_array_linear(GLcontext *ctx,
static void
-sample_1d_array_nearest_mipmap_nearest(GLcontext *ctx,
+sample_1d_array_nearest_mipmap_nearest(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -2698,7 +2698,7 @@ sample_1d_array_nearest_mipmap_nearest(GLcontext *ctx,
static void
-sample_1d_array_linear_mipmap_nearest(GLcontext *ctx,
+sample_1d_array_linear_mipmap_nearest(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -2714,7 +2714,7 @@ sample_1d_array_linear_mipmap_nearest(GLcontext *ctx,
static void
-sample_1d_array_nearest_mipmap_linear(GLcontext *ctx,
+sample_1d_array_nearest_mipmap_linear(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -2739,7 +2739,7 @@ sample_1d_array_nearest_mipmap_linear(GLcontext *ctx,
static void
-sample_1d_array_linear_mipmap_linear(GLcontext *ctx,
+sample_1d_array_linear_mipmap_linear(struct gl_context *ctx,
const struct gl_texture_object *tObj,
GLuint n, const GLfloat texcoord[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -2765,7 +2765,7 @@ sample_1d_array_linear_mipmap_linear(GLcontext *ctx,
/** Sample 1D Array texture, nearest filtering for both min/magnification */
static void
-sample_nearest_1d_array(GLcontext *ctx,
+sample_nearest_1d_array(struct gl_context *ctx,
const struct gl_texture_object *tObj, GLuint n,
const GLfloat texcoords[][4], const GLfloat lambda[],
GLfloat rgba[][4])
@@ -2781,7 +2781,7 @@ sample_nearest_1d_array(GLcontext *ctx,
/** Sample 1D Array texture, linear filtering for both min/magnification */
static void
-sample_linear_1d_array(GLcontext *ctx,
+sample_linear_1d_array(struct gl_context *ctx,
const struct gl_texture_object *tObj, GLuint n,
const GLfloat texcoords[][4],
const GLfloat lambda[], GLfloat rgba[][4])
@@ -2797,7 +2797,7 @@ sample_linear_1d_array(GLcontext *ctx,
/** Sample 1D Array texture, using lambda to choose between min/magnification */
static void
-sample_lambda_1d_array(GLcontext *ctx,
+sample_lambda_1d_array(struct gl_context *ctx,
const struct gl_texture_object *tObj, GLuint n,
const GLfloat texcoords[][4], const GLfloat lambda[],
GLfloat rgba[][4])
@@ -2995,7 +2995,7 @@ choose_depth_texture_level(const struct gl_texture_object *tObj, GLfloat lambda)
* check for minification vs. magnification, etc.
*/
static void
-sample_depth_texture( GLcontext *ctx,
+sample_depth_texture( struct gl_context *ctx,
const struct gl_texture_object *tObj, GLuint n,
const GLfloat texcoords[][4], const GLfloat lambda[],
GLfloat texel[][4] )
@@ -3164,7 +3164,7 @@ sample_depth_texture( GLcontext *ctx,
* Note: fragment programs don't observe the texture enable/disable flags.
*/
static void
-null_sample_func( GLcontext *ctx,
+null_sample_func( struct gl_context *ctx,
const struct gl_texture_object *tObj, GLuint n,
const GLfloat texcoords[][4], const GLfloat lambda[],
GLfloat rgba[][4])
@@ -3187,7 +3187,7 @@ null_sample_func( GLcontext *ctx,
* Choose the texture sampling function for the given texture object.
*/
texture_sample_func
-_swrast_choose_texture_sample_func( GLcontext *ctx,
+_swrast_choose_texture_sample_func( struct gl_context *ctx,
const struct gl_texture_object *t )
{
if (!t || !t->_Complete) {
diff --git a/src/mesa/swrast/s_texfilter.h b/src/mesa/swrast/s_texfilter.h
index eceab59658e..34520f22948 100644
--- a/src/mesa/swrast/s_texfilter.h
+++ b/src/mesa/swrast/s_texfilter.h
@@ -32,7 +32,7 @@
extern texture_sample_func
-_swrast_choose_texture_sample_func( GLcontext *ctx,
+_swrast_choose_texture_sample_func( struct gl_context *ctx,
const struct gl_texture_object *tObj );
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index d1b369bcdf0..85513e1f204 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -49,7 +49,7 @@
* \return GL_TRUE if the triangle is to be culled, GL_FALSE otherwise.
*/
GLboolean
-_swrast_culltriangle( GLcontext *ctx,
+_swrast_culltriangle( struct gl_context *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
@@ -256,7 +256,7 @@ ilerp_2d(GLint ia, GLint ib, GLint v00, GLint v10, GLint v01, GLint v11)
* texture env modes.
*/
static INLINE void
-affine_span(GLcontext *ctx, SWspan *span,
+affine_span(struct gl_context *ctx, SWspan *span,
struct affine_info *info)
{
GLchan sample[4]; /* the filtered texture sample */
@@ -591,7 +591,7 @@ struct persp_info
static INLINE void
-fast_persp_span(GLcontext *ctx, SWspan *span,
+fast_persp_span(struct gl_context *ctx, SWspan *span,
struct persp_info *info)
{
GLchan sample[4]; /* the filtered texture sample */
@@ -903,7 +903,7 @@ fast_persp_span(GLcontext *ctx, SWspan *span,
static void
-nodraw_triangle( GLcontext *ctx,
+nodraw_triangle( struct gl_context *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
@@ -919,7 +919,7 @@ nodraw_triangle( GLcontext *ctx,
* Inefficient, but seldom needed.
*/
void
-_swrast_add_spec_terms_triangle(GLcontext *ctx, const SWvertex *v0,
+_swrast_add_spec_terms_triangle(struct gl_context *ctx, const SWvertex *v0,
const SWvertex *v1, const SWvertex *v2)
{
SWvertex *ncv0 = (SWvertex *)v0; /* drop const qualifier */
@@ -992,7 +992,7 @@ do { \
* remove tests to this code.
*/
void
-_swrast_choose_triangle( GLcontext *ctx )
+_swrast_choose_triangle( struct gl_context *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
diff --git a/src/mesa/swrast/s_triangle.h b/src/mesa/swrast/s_triangle.h
index b81932c7304..46e23d42083 100644
--- a/src/mesa/swrast/s_triangle.h
+++ b/src/mesa/swrast/s_triangle.h
@@ -32,16 +32,16 @@
extern GLboolean
-_swrast_culltriangle( GLcontext *ctx,
+_swrast_culltriangle( struct gl_context *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2);
extern void
-_swrast_choose_triangle( GLcontext *ctx );
+_swrast_choose_triangle( struct gl_context *ctx );
extern void
-_swrast_add_spec_terms_triangle( GLcontext *ctx,
+_swrast_add_spec_terms_triangle( struct gl_context *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 );
diff --git a/src/mesa/swrast/s_tritemp.h b/src/mesa/swrast/s_tritemp.h
index 0aa8739f4f2..4d6309b82ac 100644
--- a/src/mesa/swrast/s_tritemp.h
+++ b/src/mesa/swrast/s_tritemp.h
@@ -108,7 +108,7 @@ do { \
#endif
-static void NAME(GLcontext *ctx, const SWvertex *v0,
+static void NAME(struct gl_context *ctx, const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
{
diff --git a/src/mesa/swrast/s_zoom.c b/src/mesa/swrast/s_zoom.c
index f224627d50e..4e04691cd76 100644
--- a/src/mesa/swrast/s_zoom.c
+++ b/src/mesa/swrast/s_zoom.c
@@ -45,7 +45,7 @@
* \return GL_TRUE if any zoomed pixels visible, GL_FALSE if totally clipped
*/
static GLboolean
-compute_zoomed_bounds(GLcontext *ctx, GLint imageX, GLint imageY,
+compute_zoomed_bounds(struct gl_context *ctx, GLint imageX, GLint imageY,
GLint spanX, GLint spanY, GLint width,
GLint *x0, GLint *x1, GLint *y0, GLint *y1)
{
@@ -127,7 +127,7 @@ unzoom_x(GLfloat zoomX, GLint imageX, GLint zx)
* index/depth_span().
*/
static void
-zoom_span( GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span,
+zoom_span( struct gl_context *ctx, GLint imgX, GLint imgY, const SWspan *span,
const GLvoid *src, GLenum format )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -320,7 +320,7 @@ zoom_span( GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span,
void
-_swrast_write_zoomed_rgba_span(GLcontext *ctx, GLint imgX, GLint imgY,
+_swrast_write_zoomed_rgba_span(struct gl_context *ctx, GLint imgX, GLint imgY,
const SWspan *span, const GLvoid *rgba)
{
zoom_span(ctx, imgX, imgY, span, rgba, GL_RGBA);
@@ -328,7 +328,7 @@ _swrast_write_zoomed_rgba_span(GLcontext *ctx, GLint imgX, GLint imgY,
void
-_swrast_write_zoomed_rgb_span(GLcontext *ctx, GLint imgX, GLint imgY,
+_swrast_write_zoomed_rgb_span(struct gl_context *ctx, GLint imgX, GLint imgY,
const SWspan *span, const GLvoid *rgb)
{
zoom_span(ctx, imgX, imgY, span, rgb, GL_RGB);
@@ -336,7 +336,7 @@ _swrast_write_zoomed_rgb_span(GLcontext *ctx, GLint imgX, GLint imgY,
void
-_swrast_write_zoomed_depth_span(GLcontext *ctx, GLint imgX, GLint imgY,
+_swrast_write_zoomed_depth_span(struct gl_context *ctx, GLint imgX, GLint imgY,
const SWspan *span)
{
zoom_span(ctx, imgX, imgY, span,
@@ -349,7 +349,7 @@ _swrast_write_zoomed_depth_span(GLcontext *ctx, GLint imgX, GLint imgY,
* No per-fragment operations are applied.
*/
void
-_swrast_write_zoomed_stencil_span(GLcontext *ctx, GLint imgX, GLint imgY,
+_swrast_write_zoomed_stencil_span(struct gl_context *ctx, GLint imgX, GLint imgY,
GLint width, GLint spanX, GLint spanY,
const GLstencil stencil[])
{
@@ -386,7 +386,7 @@ _swrast_write_zoomed_stencil_span(GLcontext *ctx, GLint imgX, GLint imgY,
* No per-fragment operations are applied.
*/
void
-_swrast_write_zoomed_z_span(GLcontext *ctx, GLint imgX, GLint imgY,
+_swrast_write_zoomed_z_span(struct gl_context *ctx, GLint imgX, GLint imgY,
GLint width, GLint spanX, GLint spanY,
const GLvoid *z)
{
diff --git a/src/mesa/swrast/s_zoom.h b/src/mesa/swrast/s_zoom.h
index 09f624efad5..581ea178e89 100644
--- a/src/mesa/swrast/s_zoom.h
+++ b/src/mesa/swrast/s_zoom.h
@@ -30,25 +30,25 @@
extern void
-_swrast_write_zoomed_rgba_span(GLcontext *ctx, GLint imgX, GLint imgY,
+_swrast_write_zoomed_rgba_span(struct gl_context *ctx, GLint imgX, GLint imgY,
const SWspan *span, const GLvoid *rgba);
extern void
-_swrast_write_zoomed_rgb_span(GLcontext *ctx, GLint imgX, GLint imgY,
+_swrast_write_zoomed_rgb_span(struct gl_context *ctx, GLint imgX, GLint imgY,
const SWspan *span, const GLvoid *rgb);
extern void
-_swrast_write_zoomed_depth_span(GLcontext *ctx, GLint imgX, GLint imgY,
+_swrast_write_zoomed_depth_span(struct gl_context *ctx, GLint imgX, GLint imgY,
const SWspan *span);
extern void
-_swrast_write_zoomed_stencil_span(GLcontext *ctx, GLint imgX, GLint imgY,
+_swrast_write_zoomed_stencil_span(struct gl_context *ctx, GLint imgX, GLint imgY,
GLint width, GLint spanX, GLint spanY,
const GLstencil stencil[]);
extern void
-_swrast_write_zoomed_z_span(GLcontext *ctx, GLint imgX, GLint imgY,
+_swrast_write_zoomed_z_span(struct gl_context *ctx, GLint imgX, GLint imgY,
GLint width, GLint spanX, GLint spanY,
const GLvoid *z);
diff --git a/src/mesa/swrast/swrast.h b/src/mesa/swrast/swrast.h
index c01cf7d1f0b..9b88c70220e 100644
--- a/src/mesa/swrast/swrast.h
+++ b/src/mesa/swrast/swrast.h
@@ -85,32 +85,32 @@ struct swrast_device_driver;
*/
extern GLboolean
-_swrast_CreateContext( GLcontext *ctx );
+_swrast_CreateContext( struct gl_context *ctx );
extern void
-_swrast_DestroyContext( GLcontext *ctx );
+_swrast_DestroyContext( struct gl_context *ctx );
/* Get a (non-const) reference to the device driver struct for swrast.
*/
extern struct swrast_device_driver *
-_swrast_GetDeviceDriverReference( GLcontext *ctx );
+_swrast_GetDeviceDriverReference( struct gl_context *ctx );
extern void
-_swrast_Bitmap( GLcontext *ctx,
+_swrast_Bitmap( struct gl_context *ctx,
GLint px, GLint py,
GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack,
const GLubyte *bitmap );
extern void
-_swrast_CopyPixels( GLcontext *ctx,
+_swrast_CopyPixels( struct gl_context *ctx,
GLint srcx, GLint srcy,
GLint destx, GLint desty,
GLsizei width, GLsizei height,
GLenum type );
extern void
-_swrast_DrawPixels( GLcontext *ctx,
+_swrast_DrawPixels( struct gl_context *ctx,
GLint x, GLint y,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
@@ -118,37 +118,37 @@ _swrast_DrawPixels( GLcontext *ctx,
const GLvoid *pixels );
extern void
-_swrast_ReadPixels( GLcontext *ctx,
+_swrast_ReadPixels( struct gl_context *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
GLenum format, GLenum type,
const struct gl_pixelstore_attrib *unpack,
GLvoid *pixels );
extern void
-_swrast_BlitFramebuffer(GLcontext *ctx,
+_swrast_BlitFramebuffer(struct gl_context *ctx,
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
GLbitfield mask, GLenum filter);
extern void
-_swrast_Clear(GLcontext *ctx, GLbitfield buffers);
+_swrast_Clear(struct gl_context *ctx, GLbitfield buffers);
extern void
-_swrast_Accum(GLcontext *ctx, GLenum op, GLfloat value);
+_swrast_Accum(struct gl_context *ctx, GLenum op, GLfloat value);
/* Reset the stipple counter
*/
extern void
-_swrast_ResetLineStipple( GLcontext *ctx );
+_swrast_ResetLineStipple( struct gl_context *ctx );
/**
* Indicates front/back facing for subsequent points/lines when drawing
* unfilled polygons. Needed for two-side stencil.
*/
extern void
-_swrast_SetFacing(GLcontext *ctx, GLuint facing);
+_swrast_SetFacing(struct gl_context *ctx, GLuint facing);
/* These will always render the correct point/line/triangle for the
* current state.
@@ -156,54 +156,54 @@ _swrast_SetFacing(GLcontext *ctx, GLuint facing);
* For flatshaded primitives, the provoking vertex is the final one.
*/
extern void
-_swrast_Point( GLcontext *ctx, const SWvertex *v );
+_swrast_Point( struct gl_context *ctx, const SWvertex *v );
extern void
-_swrast_Line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 );
+_swrast_Line( struct gl_context *ctx, const SWvertex *v0, const SWvertex *v1 );
extern void
-_swrast_Triangle( GLcontext *ctx, const SWvertex *v0,
+_swrast_Triangle( struct gl_context *ctx, const SWvertex *v0,
const SWvertex *v1, const SWvertex *v2 );
extern void
-_swrast_Quad( GLcontext *ctx,
+_swrast_Quad( struct gl_context *ctx,
const SWvertex *v0, const SWvertex *v1,
const SWvertex *v2, const SWvertex *v3);
extern void
-_swrast_flush( GLcontext *ctx );
+_swrast_flush( struct gl_context *ctx );
extern void
-_swrast_render_primitive( GLcontext *ctx, GLenum mode );
+_swrast_render_primitive( struct gl_context *ctx, GLenum mode );
extern void
-_swrast_render_start( GLcontext *ctx );
+_swrast_render_start( struct gl_context *ctx );
extern void
-_swrast_render_finish( GLcontext *ctx );
+_swrast_render_finish( struct gl_context *ctx );
/* Tell the software rasterizer about core state changes.
*/
extern void
-_swrast_InvalidateState( GLcontext *ctx, GLbitfield new_state );
+_swrast_InvalidateState( struct gl_context *ctx, GLbitfield new_state );
/* Configure software rasterizer to match hardware rasterizer characteristics:
*/
extern void
-_swrast_allow_vertex_fog( GLcontext *ctx, GLboolean value );
+_swrast_allow_vertex_fog( struct gl_context *ctx, GLboolean value );
extern void
-_swrast_allow_pixel_fog( GLcontext *ctx, GLboolean value );
+_swrast_allow_pixel_fog( struct gl_context *ctx, GLboolean value );
/* Debug:
*/
extern void
-_swrast_print_vertex( GLcontext *ctx, const SWvertex *v );
+_swrast_print_vertex( struct gl_context *ctx, const SWvertex *v );
extern void
-_swrast_eject_texture_images(GLcontext *ctx);
+_swrast_eject_texture_images(struct gl_context *ctx);
@@ -223,8 +223,8 @@ struct swrast_device_driver {
* these functions. Locking in that case must be organized by the
* driver by other mechanisms.
*/
- void (*SpanRenderStart)(GLcontext *ctx);
- void (*SpanRenderFinish)(GLcontext *ctx);
+ void (*SpanRenderStart)(struct gl_context *ctx);
+ void (*SpanRenderFinish)(struct gl_context *ctx);
};
diff --git a/src/mesa/swrast_setup/NOTES b/src/mesa/swrast_setup/NOTES
index c6cb4ab3484..bdf57c39ef8 100644
--- a/src/mesa/swrast_setup/NOTES
+++ b/src/mesa/swrast_setup/NOTES
@@ -28,15 +28,15 @@ STATE
To create and destroy the module:
- GLboolean _swsetup_CreateContext( GLcontext *ctx );
- void _swsetup_DestroyContext( GLcontext *ctx );
+ GLboolean _swsetup_CreateContext( struct gl_context *ctx );
+ void _swsetup_DestroyContext( struct gl_context *ctx );
The module is not active by default, and must be installed by calling
_swrast_Wakeup(). This function installs internal swrast_setup
functions into all the tnl->Driver.Render driver hooks, thus taking
over the task of rasterization entirely:
- void _swrast_Wakeup( GLcontext *ctx );
+ void _swrast_Wakeup( struct gl_context *ctx );
This module tracks state changes internally and maintains derived
@@ -44,7 +44,7 @@ values based on the current state. For this to work, the driver
ensure the following funciton is called whenever the state changes and
the swsetup module is 'awake':
- void _swsetup_InvalidateState( GLcontext *ctx, GLuint new_state );
+ void _swsetup_InvalidateState( struct gl_context *ctx, GLuint new_state );
There is no explicit call to put the swsetup module to sleep. Simply
install other function pointers into all the tnl->Driver.Render.*
@@ -54,8 +54,8 @@ DRIVER INTERFACE
The module offers a minimal driver interface:
- void (*Start)( GLcontext *ctx );
- void (*Finish)( GLcontext *ctx );
+ void (*Start)( struct gl_context *ctx );
+ void (*Finish)( struct gl_context *ctx );
These are called before and after the completion of all swrast drawing
activity. As swrast doesn't call callbacks during triangle, line or
diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c
index 0fcb7c77af0..5da2e1eabee 100644
--- a/src/mesa/swrast_setup/ss_context.c
+++ b/src/mesa/swrast_setup/ss_context.c
@@ -47,7 +47,7 @@
GLboolean
-_swsetup_CreateContext( GLcontext *ctx )
+_swsetup_CreateContext( struct gl_context *ctx )
{
SScontext *swsetup = (SScontext *)CALLOC(sizeof(SScontext));
@@ -67,7 +67,7 @@ _swsetup_CreateContext( GLcontext *ctx )
}
void
-_swsetup_DestroyContext( GLcontext *ctx )
+_swsetup_DestroyContext( struct gl_context *ctx )
{
SScontext *swsetup = SWSETUP_CONTEXT(ctx);
@@ -80,7 +80,7 @@ _swsetup_DestroyContext( GLcontext *ctx )
}
static void
-_swsetup_RenderPrimitive( GLcontext *ctx, GLenum mode )
+_swsetup_RenderPrimitive( struct gl_context *ctx, GLenum mode )
{
SWSETUP_CONTEXT(ctx)->render_prim = mode;
_swrast_render_primitive( ctx, mode );
@@ -108,7 +108,7 @@ do { \
* _tnl_install_attrs().
*/
static void
-setup_vertex_format(GLcontext *ctx)
+setup_vertex_format(struct gl_context *ctx)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
SScontext *swsetup = SWSETUP_CONTEXT(ctx);
@@ -184,7 +184,7 @@ setup_vertex_format(GLcontext *ctx)
* Called via tnl->Driver.Render.Start.
*/
static void
-_swsetup_RenderStart( GLcontext *ctx )
+_swsetup_RenderStart( struct gl_context *ctx )
{
SScontext *swsetup = SWSETUP_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -217,13 +217,13 @@ _swsetup_RenderStart( GLcontext *ctx )
* It's called when we finish rendering a vertex buffer.
*/
static void
-_swsetup_RenderFinish( GLcontext *ctx )
+_swsetup_RenderFinish( struct gl_context *ctx )
{
_swrast_render_finish( ctx );
}
void
-_swsetup_InvalidateState( GLcontext *ctx, GLuint new_state )
+_swsetup_InvalidateState( struct gl_context *ctx, GLuint new_state )
{
SScontext *swsetup = SWSETUP_CONTEXT(ctx);
swsetup->NewState |= new_state;
@@ -232,7 +232,7 @@ _swsetup_InvalidateState( GLcontext *ctx, GLuint new_state )
void
-_swsetup_Wakeup( GLcontext *ctx )
+_swsetup_Wakeup( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
SScontext *swsetup = SWSETUP_CONTEXT(ctx);
@@ -267,7 +267,7 @@ _swsetup_Wakeup( GLcontext *ctx )
* Populate a swrast SWvertex from an attrib-style vertex.
*/
void
-_swsetup_Translate( GLcontext *ctx, const void *vertex, SWvertex *dest )
+_swsetup_Translate( struct gl_context *ctx, const void *vertex, SWvertex *dest )
{
const GLfloat *m = ctx->Viewport._WindowMap.m;
GLfloat tmp[4];
diff --git a/src/mesa/swrast_setup/ss_triangle.c b/src/mesa/swrast_setup/ss_triangle.c
index f22bc52f0a8..5d1c70e9481 100644
--- a/src/mesa/swrast_setup/ss_triangle.c
+++ b/src/mesa/swrast_setup/ss_triangle.c
@@ -47,7 +47,7 @@ static tnl_quad_func quad_tab[SS_MAX_TRIFUNC];
/*
* Render a triangle respecting edge flags.
*/
-typedef void (* swsetup_edge_render_prim_tri)(GLcontext *ctx,
+typedef void (* swsetup_edge_render_prim_tri)(struct gl_context *ctx,
const GLubyte *ef,
GLuint e0,
GLuint e1,
@@ -60,7 +60,7 @@ typedef void (* swsetup_edge_render_prim_tri)(GLcontext *ctx,
* Render a triangle using lines and respecting edge flags.
*/
static void
-_swsetup_edge_render_line_tri(GLcontext *ctx,
+_swsetup_edge_render_line_tri(struct gl_context *ctx,
const GLubyte *ef,
GLuint e0,
GLuint e1,
@@ -86,7 +86,7 @@ _swsetup_edge_render_line_tri(GLcontext *ctx,
* Render a triangle using points and respecting edge flags.
*/
static void
-_swsetup_edge_render_point_tri(GLcontext *ctx,
+_swsetup_edge_render_point_tri(struct gl_context *ctx,
const GLubyte *ef,
GLuint e0,
GLuint e1,
@@ -105,7 +105,7 @@ _swsetup_edge_render_point_tri(GLcontext *ctx,
/*
* Render a triangle respecting cull and shade model.
*/
-static void _swsetup_render_tri(GLcontext *ctx,
+static void _swsetup_render_tri(struct gl_context *ctx,
GLuint e0,
GLuint e1,
GLuint e2,
@@ -195,7 +195,7 @@ static void _swsetup_render_tri(GLcontext *ctx,
#include "ss_tritmp.h"
-void _swsetup_trifuncs_init( GLcontext *ctx )
+void _swsetup_trifuncs_init( struct gl_context *ctx )
{
(void) ctx;
@@ -210,7 +210,7 @@ void _swsetup_trifuncs_init( GLcontext *ctx )
}
-static void swsetup_points( GLcontext *ctx, GLuint first, GLuint last )
+static void swsetup_points( struct gl_context *ctx, GLuint first, GLuint last )
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
SWvertex *verts = SWSETUP_CONTEXT(ctx)->verts;
@@ -228,7 +228,7 @@ static void swsetup_points( GLcontext *ctx, GLuint first, GLuint last )
}
}
-static void swsetup_line( GLcontext *ctx, GLuint v0, GLuint v1 )
+static void swsetup_line( struct gl_context *ctx, GLuint v0, GLuint v1 )
{
SWvertex *verts = SWSETUP_CONTEXT(ctx)->verts;
_swrast_Line( ctx, &verts[v0], &verts[v1] );
@@ -236,7 +236,7 @@ static void swsetup_line( GLcontext *ctx, GLuint v0, GLuint v1 )
-void _swsetup_choose_trifuncs( GLcontext *ctx )
+void _swsetup_choose_trifuncs( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
GLuint ind = 0;
diff --git a/src/mesa/swrast_setup/ss_triangle.h b/src/mesa/swrast_setup/ss_triangle.h
index ac553cbd018..05110865daf 100644
--- a/src/mesa/swrast_setup/ss_triangle.h
+++ b/src/mesa/swrast_setup/ss_triangle.h
@@ -32,7 +32,7 @@
#include "main/mtypes.h"
-void _swsetup_trifuncs_init( GLcontext *ctx );
-void _swsetup_choose_trifuncs( GLcontext *ctx );
+void _swsetup_trifuncs_init( struct gl_context *ctx );
+void _swsetup_choose_trifuncs( struct gl_context *ctx );
#endif
diff --git a/src/mesa/swrast_setup/ss_tritmp.h b/src/mesa/swrast_setup/ss_tritmp.h
index 8e9fa1bd559..5844ad594cd 100644
--- a/src/mesa/swrast_setup/ss_tritmp.h
+++ b/src/mesa/swrast_setup/ss_tritmp.h
@@ -30,7 +30,7 @@
* This is where we handle assigning vertex colors based on front/back
* facing, compute polygon offset and handle glPolygonMode().
*/
-static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
+static void TAG(triangle)(struct gl_context *ctx, GLuint e0, GLuint e1, GLuint e2 )
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
SScontext *swsetup = SWSETUP_CONTEXT(ctx);
@@ -213,7 +213,7 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
/* Need to fixup edgeflags when decomposing to triangles:
*/
-static void TAG(quadfunc)( GLcontext *ctx, GLuint v0,
+static void TAG(quadfunc)( struct gl_context *ctx, GLuint v0,
GLuint v1, GLuint v2, GLuint v3 )
{
if (IND & SS_UNFILLED_BIT) {
diff --git a/src/mesa/swrast_setup/ss_vb.h b/src/mesa/swrast_setup/ss_vb.h
index 944a3b78d8c..b8322f35a3d 100644
--- a/src/mesa/swrast_setup/ss_vb.h
+++ b/src/mesa/swrast_setup/ss_vb.h
@@ -31,7 +31,7 @@
#include "main/mtypes.h"
-void _swsetup_vb_init( GLcontext *ctx );
-void _swsetup_choose_rastersetup_func( GLcontext *ctx );
+void _swsetup_vb_init( struct gl_context *ctx );
+void _swsetup_choose_rastersetup_func( struct gl_context *ctx );
#endif
diff --git a/src/mesa/swrast_setup/swrast_setup.h b/src/mesa/swrast_setup/swrast_setup.h
index 5dcbe2675b4..1d87ec1082d 100644
--- a/src/mesa/swrast_setup/swrast_setup.h
+++ b/src/mesa/swrast_setup/swrast_setup.h
@@ -41,21 +41,21 @@
#include "swrast/swrast.h"
extern GLboolean
-_swsetup_CreateContext( GLcontext *ctx );
+_swsetup_CreateContext( struct gl_context *ctx );
extern void
-_swsetup_DestroyContext( GLcontext *ctx );
+_swsetup_DestroyContext( struct gl_context *ctx );
extern void
-_swsetup_InvalidateState( GLcontext *ctx, GLuint new_state );
+_swsetup_InvalidateState( struct gl_context *ctx, GLuint new_state );
extern void
-_swsetup_Wakeup( GLcontext *ctx );
+_swsetup_Wakeup( struct gl_context *ctx );
/* Helper function to translate a hardware vertex (as understood by
* the tnl/t_vertex.c code) to a swrast vertex.
*/
extern void
-_swsetup_Translate( GLcontext *ctx, const void *vertex, SWvertex *dest );
+_swsetup_Translate( struct gl_context *ctx, const void *vertex, SWvertex *dest );
#endif
diff --git a/src/mesa/tnl/NOTES b/src/mesa/tnl/NOTES
index c39b43485eb..aac5884da87 100644
--- a/src/mesa/tnl/NOTES
+++ b/src/mesa/tnl/NOTES
@@ -17,16 +17,16 @@ STATE
To create and destroy the module:
- GLboolean _tnl_CreateContext( GLcontext *ctx );
- void _tnl_DestroyContext( GLcontext *ctx );
+ GLboolean _tnl_CreateContext( struct gl_context *ctx );
+ void _tnl_DestroyContext( struct gl_context *ctx );
The module is not active by default, and must be installed by calling
_tnl_Wakeup(). This function installs internal tnl functions into all
the vtxfmt dispatch hooks, thus taking over the task of transformation
and lighting entirely:
- void _tnl_wakeup_exec( GLcontext *ctx );
- void _tnl_wakeup_save_exec( GLcontext *ctx );
+ void _tnl_wakeup_exec( struct gl_context *ctx );
+ void _tnl_wakeup_save_exec( struct gl_context *ctx );
This module tracks state changes internally and maintains derived
@@ -34,7 +34,7 @@ values based on the current state. For this to work, the driver
ensure the following funciton is called whenever the state changes and
the swsetup module is 'awake':
- void _tnl_InvalidateState( GLcontext *ctx, GLuint new_state );
+ void _tnl_InvalidateState( struct gl_context *ctx, GLuint new_state );
There is no explicit call to put the tnl module to sleep. Simply
install other function pointers into all the vtxfmt dispatch slots,
@@ -58,13 +58,13 @@ higher-level primitives (for example the radeon driver).
In addition, the following functions provide further tweaks:
extern void
-_tnl_need_projected_coords( GLcontext *ctx, GLboolean flag );
+_tnl_need_projected_coords( struct gl_context *ctx, GLboolean flag );
- Direct the default vertex transformation stage to
produce/not produce projected clip coordinates.
extern void
-_tnl_need_dlist_loopback( GLcontext *ctx, GLboolean flag );
+_tnl_need_dlist_loopback( struct gl_context *ctx, GLboolean flag );
- Direct the display list component of the tnl module to
replay display lists as 'glVertex' type calls, rather than
@@ -76,7 +76,7 @@ _tnl_need_dlist_loopback( GLcontext *ctx, GLboolean flag );
extern void
-_tnl_need_dlist_norm_lengths( GLcontext *ctx, GLboolean flag );
+_tnl_need_dlist_norm_lengths( struct gl_context *ctx, GLboolean flag );
- Direct the display list component to enable/disable caching
1/length values for display list normals. Doing so is
@@ -88,7 +88,7 @@ DRIVER INTERFACE
The module itself offers a minimal driver interface:
- void (*RunPipeline)( GLcontext *ctx );
+ void (*RunPipeline)( struct gl_context *ctx );
Normally this is set to _tnl_RunPipeline(), however the driver can use
this hook to wrap checks or other code around this call.
diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c
index f27c8ad9d6b..47aeeb88594 100644
--- a/src/mesa/tnl/t_context.c
+++ b/src/mesa/tnl/t_context.c
@@ -42,7 +42,7 @@
#include "vbo/vbo.h"
GLboolean
-_tnl_CreateContext( GLcontext *ctx )
+_tnl_CreateContext( struct gl_context *ctx )
{
TNLcontext *tnl;
@@ -90,7 +90,7 @@ _tnl_CreateContext( GLcontext *ctx )
void
-_tnl_DestroyContext( GLcontext *ctx )
+_tnl_DestroyContext( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -102,7 +102,7 @@ _tnl_DestroyContext( GLcontext *ctx )
void
-_tnl_InvalidateState( GLcontext *ctx, GLuint new_state )
+_tnl_InvalidateState( struct gl_context *ctx, GLuint new_state )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
const struct gl_vertex_program *vp = ctx->VertexProgram._Current;
@@ -173,7 +173,7 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state )
void
-_tnl_wakeup( GLcontext *ctx )
+_tnl_wakeup( struct gl_context *ctx )
{
/* Assume we haven't been getting state updates either:
*/
@@ -196,14 +196,14 @@ _tnl_wakeup( GLcontext *ctx )
* we should "Divide-by-W". Software renders will want that.
*/
void
-_tnl_need_projected_coords( GLcontext *ctx, GLboolean mode )
+_tnl_need_projected_coords( struct gl_context *ctx, GLboolean mode )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
tnl->NeedNdcCoords = mode;
}
void
-_tnl_allow_vertex_fog( GLcontext *ctx, GLboolean value )
+_tnl_allow_vertex_fog( struct gl_context *ctx, GLboolean value )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
tnl->AllowVertexFog = value;
@@ -213,7 +213,7 @@ _tnl_allow_vertex_fog( GLcontext *ctx, GLboolean value )
}
void
-_tnl_allow_pixel_fog( GLcontext *ctx, GLboolean value )
+_tnl_allow_pixel_fog( struct gl_context *ctx, GLboolean value )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
tnl->AllowPixelFog = value;
diff --git a/src/mesa/tnl/t_context.h b/src/mesa/tnl/t_context.h
index 258906f7956..bc01646247c 100644
--- a/src/mesa/tnl/t_context.h
+++ b/src/mesa/tnl/t_context.h
@@ -235,7 +235,7 @@ struct tnl_pipeline_stage
/* Allocate private data
*/
- GLboolean (*create)( GLcontext *ctx, struct tnl_pipeline_stage * );
+ GLboolean (*create)( struct gl_context *ctx, struct tnl_pipeline_stage * );
/* Free private data.
*/
@@ -244,7 +244,7 @@ struct tnl_pipeline_stage
/* Called on any statechange or input array size change or
* input array change to/from zero stride.
*/
- void (*validate)( GLcontext *ctx, struct tnl_pipeline_stage * );
+ void (*validate)( struct gl_context *ctx, struct tnl_pipeline_stage * );
/* Called from _tnl_run_pipeline(). The stage.changed_inputs value
* encodes all inputs to thee struct which have changed. If
@@ -254,7 +254,7 @@ struct tnl_pipeline_stage
* Return value: GL_TRUE - keep going
* GL_FALSE - finished pipeline
*/
- GLboolean (*run)( GLcontext *ctx, struct tnl_pipeline_stage * );
+ GLboolean (*run)( struct gl_context *ctx, struct tnl_pipeline_stage * );
};
@@ -284,7 +284,7 @@ typedef void (*tnl_insert_func)( const struct tnl_clipspace_attr *a,
GLubyte *v,
const GLfloat *in );
-typedef void (*tnl_emit_func)( GLcontext *ctx,
+typedef void (*tnl_emit_func)( struct gl_context *ctx,
GLuint count,
GLubyte *dest );
@@ -311,19 +311,19 @@ struct tnl_clipspace_attr
-typedef void (*tnl_points_func)( GLcontext *ctx, GLuint first, GLuint last );
-typedef void (*tnl_line_func)( GLcontext *ctx, GLuint v1, GLuint v2 );
-typedef void (*tnl_triangle_func)( GLcontext *ctx,
+typedef void (*tnl_points_func)( struct gl_context *ctx, GLuint first, GLuint last );
+typedef void (*tnl_line_func)( struct gl_context *ctx, GLuint v1, GLuint v2 );
+typedef void (*tnl_triangle_func)( struct gl_context *ctx,
GLuint v1, GLuint v2, GLuint v3 );
-typedef void (*tnl_quad_func)( GLcontext *ctx, GLuint v1, GLuint v2,
+typedef void (*tnl_quad_func)( struct gl_context *ctx, GLuint v1, GLuint v2,
GLuint v3, GLuint v4 );
-typedef void (*tnl_render_func)( GLcontext *ctx, GLuint start, GLuint count,
+typedef void (*tnl_render_func)( struct gl_context *ctx, GLuint start, GLuint count,
GLuint flags );
-typedef void (*tnl_interp_func)( GLcontext *ctx,
+typedef void (*tnl_interp_func)( struct gl_context *ctx,
GLfloat t, GLuint dst, GLuint out, GLuint in,
GLboolean force_boundary );
-typedef void (*tnl_copy_pv_func)( GLcontext *ctx, GLuint dst, GLuint src );
-typedef void (*tnl_setup_func)( GLcontext *ctx,
+typedef void (*tnl_copy_pv_func)( struct gl_context *ctx, GLuint dst, GLuint src );
+typedef void (*tnl_setup_func)( struct gl_context *ctx,
GLuint start, GLuint end,
GLuint new_inputs);
@@ -377,7 +377,7 @@ struct tnl_clipspace
struct tnl_clipspace_fastpath *fastpath;
- void (*codegen_emit)( GLcontext *ctx );
+ void (*codegen_emit)( struct gl_context *ctx );
};
@@ -387,13 +387,13 @@ struct tnl_device_driver
*** TNL Pipeline
***/
- void (*RunPipeline)(GLcontext *ctx);
+ void (*RunPipeline)(struct gl_context *ctx);
/* Replaces PipelineStart/PipelineFinish -- intended to allow
* drivers to wrap _tnl_run_pipeline() with code to validate state
* and grab/release hardware locks.
*/
- void (*NotifyMaterialChange)(GLcontext *ctx);
+ void (*NotifyMaterialChange)(struct gl_context *ctx);
/* Alert tnl-aware drivers of changes to material.
*/
@@ -402,14 +402,14 @@ struct tnl_device_driver
***/
struct
{
- void (*Start)(GLcontext *ctx);
- void (*Finish)(GLcontext *ctx);
+ void (*Start)(struct gl_context *ctx);
+ void (*Finish)(struct gl_context *ctx);
/* Called before and after all rendering operations, including DrawPixels,
* ReadPixels, Bitmap, span functions, and CopyTexImage, etc commands.
* These are a suitable place for grabbing/releasing hardware locks.
*/
- void (*PrimitiveNotify)(GLcontext *ctx, GLenum mode);
+ void (*PrimitiveNotify)(struct gl_context *ctx, GLenum mode);
/* Called between RenderStart() and RenderFinish() to indicate the
* type of primitive we're about to draw. Mode will be one of the
* modes accepted by glBegin().
@@ -427,12 +427,12 @@ struct tnl_device_driver
* vertex attributes should be copied.
*/
- void (*ClippedPolygon)( GLcontext *ctx, const GLuint *elts, GLuint n );
+ void (*ClippedPolygon)( struct gl_context *ctx, const GLuint *elts, GLuint n );
/* Render a polygon with <n> vertices whose indexes are in the <elts>
* array.
*/
- void (*ClippedLine)( GLcontext *ctx, GLuint v0, GLuint v1 );
+ void (*ClippedLine)( struct gl_context *ctx, GLuint v0, GLuint v1 );
/* Render a line between the two vertices given by indexes v0 and v1. */
tnl_points_func Points; /* must now respect vb->elts */
@@ -452,7 +452,7 @@ struct tnl_device_driver
* vertices.
*/
- void (*ResetLineStipple)( GLcontext *ctx );
+ void (*ResetLineStipple)( struct gl_context *ctx );
/* Reset the hardware's line stipple counter.
*/
@@ -467,7 +467,7 @@ struct tnl_device_driver
*/
- GLboolean (*Multipass)( GLcontext *ctx, GLuint passno );
+ GLboolean (*Multipass)( struct gl_context *ctx, GLuint passno );
/* Driver may request additional render passes by returning GL_TRUE
* when this function is called. This function will be called
* after the first pass, and passes will be made until the function
@@ -539,7 +539,7 @@ typedef struct
extern void
-tnl_clip_prepare(GLcontext *ctx);
+tnl_clip_prepare(struct gl_context *ctx);
#endif
diff --git a/src/mesa/tnl/t_draw.c b/src/mesa/tnl/t_draw.c
index fdde294257e..30f1bf323cb 100644
--- a/src/mesa/tnl/t_draw.c
+++ b/src/mesa/tnl/t_draw.c
@@ -38,7 +38,7 @@
-static GLubyte *get_space(GLcontext *ctx, GLuint bytes)
+static GLubyte *get_space(struct gl_context *ctx, GLuint bytes)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
GLubyte *space = malloc(bytes);
@@ -48,7 +48,7 @@ static GLubyte *get_space(GLcontext *ctx, GLuint bytes)
}
-static void free_space(GLcontext *ctx)
+static void free_space(struct gl_context *ctx)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
GLuint i;
@@ -128,7 +128,7 @@ convert_half_to_float(const struct gl_client_array *input,
/* Adjust pointer to point at first requested element, convert to
* floating point, populate VB->AttribPtr[].
*/
-static void _tnl_import_array( GLcontext *ctx,
+static void _tnl_import_array( struct gl_context *ctx,
GLuint attrib,
GLuint count,
const struct gl_client_array *input,
@@ -202,7 +202,7 @@ static void _tnl_import_array( GLcontext *ctx,
#define CLIPVERTS ((6 + MAX_CLIP_PLANES) * 2)
-static GLboolean *_tnl_import_edgeflag( GLcontext *ctx,
+static GLboolean *_tnl_import_edgeflag( struct gl_context *ctx,
const GLvector4f *input,
GLuint count)
{
@@ -221,7 +221,7 @@ static GLboolean *_tnl_import_edgeflag( GLcontext *ctx,
}
-static void bind_inputs( GLcontext *ctx,
+static void bind_inputs( struct gl_context *ctx,
const struct gl_client_array *inputs[],
GLint count,
struct gl_buffer_object **bo,
@@ -292,7 +292,7 @@ static void bind_inputs( GLcontext *ctx,
/* Translate indices to GLuints and store in VB->Elts.
*/
-static void bind_indices( GLcontext *ctx,
+static void bind_indices( struct gl_context *ctx,
const struct _mesa_index_buffer *ib,
struct gl_buffer_object **bo,
GLuint *nr_bo)
@@ -345,7 +345,7 @@ static void bind_indices( GLcontext *ctx,
}
}
-static void bind_prims( GLcontext *ctx,
+static void bind_prims( struct gl_context *ctx,
const struct _mesa_prim *prim,
GLuint nr_prims )
{
@@ -356,7 +356,7 @@ static void bind_prims( GLcontext *ctx,
VB->PrimitiveCount = nr_prims;
}
-static void unmap_vbos( GLcontext *ctx,
+static void unmap_vbos( struct gl_context *ctx,
struct gl_buffer_object **bo,
GLuint nr_bo )
{
@@ -369,7 +369,7 @@ static void unmap_vbos( GLcontext *ctx,
}
-void _tnl_vbo_draw_prims(GLcontext *ctx,
+void _tnl_vbo_draw_prims(struct gl_context *ctx,
const struct gl_client_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
@@ -388,7 +388,7 @@ void _tnl_vbo_draw_prims(GLcontext *ctx,
* module. In a regular swtnl driver, this can be plugged straight
* into the vbo->Driver.DrawPrims() callback.
*/
-void _tnl_draw_prims( GLcontext *ctx,
+void _tnl_draw_prims( struct gl_context *ctx,
const struct gl_client_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
diff --git a/src/mesa/tnl/t_pipeline.c b/src/mesa/tnl/t_pipeline.c
index 36fcd074cd9..18f095f0d4b 100644
--- a/src/mesa/tnl/t_pipeline.c
+++ b/src/mesa/tnl/t_pipeline.c
@@ -35,7 +35,7 @@
#include "t_vp_build.h"
#include "t_vertex.h"
-void _tnl_install_pipeline( GLcontext *ctx,
+void _tnl_install_pipeline( struct gl_context *ctx,
const struct tnl_pipeline_stage **stages )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -55,7 +55,7 @@ void _tnl_install_pipeline( GLcontext *ctx,
tnl->pipeline.nr_stages = i;
}
-void _tnl_destroy_pipeline( GLcontext *ctx )
+void _tnl_destroy_pipeline( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
GLuint i;
@@ -71,7 +71,7 @@ void _tnl_destroy_pipeline( GLcontext *ctx )
-static GLuint check_input_changes( GLcontext *ctx )
+static GLuint check_input_changes( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
GLuint i;
@@ -89,7 +89,7 @@ static GLuint check_input_changes( GLcontext *ctx )
}
-static GLuint check_output_changes( GLcontext *ctx )
+static GLuint check_output_changes( struct gl_context *ctx )
{
#if 0
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -113,7 +113,7 @@ static GLuint check_output_changes( GLcontext *ctx )
}
-void _tnl_run_pipeline( GLcontext *ctx )
+void _tnl_run_pipeline( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
unsigned short __tmp;
diff --git a/src/mesa/tnl/t_pipeline.h b/src/mesa/tnl/t_pipeline.h
index a6429869cb9..0eb03395c30 100644
--- a/src/mesa/tnl/t_pipeline.h
+++ b/src/mesa/tnl/t_pipeline.h
@@ -33,11 +33,11 @@
#include "main/mtypes.h"
#include "t_context.h"
-extern void _tnl_run_pipeline( GLcontext *ctx );
+extern void _tnl_run_pipeline( struct gl_context *ctx );
-extern void _tnl_destroy_pipeline( GLcontext *ctx );
+extern void _tnl_destroy_pipeline( struct gl_context *ctx );
-extern void _tnl_install_pipeline( GLcontext *ctx,
+extern void _tnl_install_pipeline( struct gl_context *ctx,
const struct tnl_pipeline_stage **stages );
@@ -64,10 +64,10 @@ extern const struct tnl_pipeline_stage *_tnl_vp_pipeline[];
extern tnl_render_func _tnl_render_tab_elts[];
extern tnl_render_func _tnl_render_tab_verts[];
-extern void _tnl_RenderClippedPolygon( GLcontext *ctx,
+extern void _tnl_RenderClippedPolygon( struct gl_context *ctx,
const GLuint *elts, GLuint n );
-extern void _tnl_RenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj );
+extern void _tnl_RenderClippedLine( struct gl_context *ctx, GLuint ii, GLuint jj );
#endif
diff --git a/src/mesa/tnl/t_rasterpos.c b/src/mesa/tnl/t_rasterpos.c
index d82d5b50736..0492490dfcf 100644
--- a/src/mesa/tnl/t_rasterpos.c
+++ b/src/mesa/tnl/t_rasterpos.c
@@ -84,7 +84,7 @@ viewclip_point_z( const GLfloat v[] )
* \return zero if the point was clipped, or one otherwise.
*/
static GLuint
-userclip_point( GLcontext *ctx, const GLfloat v[] )
+userclip_point( struct gl_context *ctx, const GLfloat v[] )
{
GLuint p;
@@ -114,7 +114,7 @@ userclip_point( GLcontext *ctx, const GLfloat v[] )
* \param Rindex returned color index
*/
static void
-shade_rastpos(GLcontext *ctx,
+shade_rastpos(struct gl_context *ctx,
const GLfloat vertex[4],
const GLfloat normal[3],
GLfloat Rcolor[4],
@@ -263,7 +263,7 @@ shade_rastpos(GLcontext *ctx,
* \param texcoord incoming texcoord and resulting texcoord
*/
static void
-compute_texgen(GLcontext *ctx, const GLfloat vObj[4], const GLfloat vEye[4],
+compute_texgen(struct gl_context *ctx, const GLfloat vObj[4], const GLfloat vEye[4],
const GLfloat normal[3], GLuint unit, GLfloat texcoord[4])
{
const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
@@ -373,7 +373,7 @@ compute_texgen(GLcontext *ctx, const GLfloat vObj[4], const GLfloat vEye[4],
* \param vObj vertex position in object space
*/
void
-_tnl_RasterPos(GLcontext *ctx, const GLfloat vObj[4])
+_tnl_RasterPos(struct gl_context *ctx, const GLfloat vObj[4])
{
if (ctx->VertexProgram._Enabled) {
/* XXX implement this */
diff --git a/src/mesa/tnl/t_vb_cliptmp.h b/src/mesa/tnl/t_vb_cliptmp.h
index 8cc36e666de..d593193435c 100644
--- a/src/mesa/tnl/t_vb_cliptmp.h
+++ b/src/mesa/tnl/t_vb_cliptmp.h
@@ -115,7 +115,7 @@ do { \
/* Clip a line against the viewport and user clip planes.
*/
static INLINE void
-TAG(clip_line)( GLcontext *ctx, GLuint v0, GLuint v1, GLubyte mask )
+TAG(clip_line)( struct gl_context *ctx, GLuint v0, GLuint v1, GLubyte mask )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
@@ -184,7 +184,7 @@ TAG(clip_line)( GLcontext *ctx, GLuint v0, GLuint v1, GLubyte mask )
/* Clip a triangle against the viewport and user clip planes.
*/
static INLINE void
-TAG(clip_tri)( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLubyte mask )
+TAG(clip_tri)( struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLubyte mask )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
@@ -263,7 +263,7 @@ TAG(clip_tri)( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLubyte mask )
/* Clip a quad against the viewport and user clip planes.
*/
static INLINE void
-TAG(clip_quad)( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3,
+TAG(clip_quad)( struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3,
GLubyte mask )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
diff --git a/src/mesa/tnl/t_vb_fog.c b/src/mesa/tnl/t_vb_fog.c
index 9faae24ec6d..cbd8dfc967f 100644
--- a/src/mesa/tnl/t_vb_fog.c
+++ b/src/mesa/tnl/t_vb_fog.c
@@ -94,7 +94,7 @@ init_static_data( void )
* Fog blend factors are in the range [0,1].
*/
static void
-compute_fog_blend_factors(GLcontext *ctx, GLvector4f *out, const GLvector4f *in)
+compute_fog_blend_factors(struct gl_context *ctx, GLvector4f *out, const GLvector4f *in)
{
GLfloat end = ctx->Fog.End;
GLfloat *v = in->start;
@@ -140,7 +140,7 @@ compute_fog_blend_factors(GLcontext *ctx, GLvector4f *out, const GLvector4f *in)
static GLboolean
-run_fog_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage)
+run_fog_stage(struct gl_context *ctx, struct tnl_pipeline_stage *stage)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
@@ -235,7 +235,7 @@ run_fog_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage)
/* Called the first time stage->run() is invoked.
*/
static GLboolean
-alloc_fog_data(GLcontext *ctx, struct tnl_pipeline_stage *stage)
+alloc_fog_data(struct gl_context *ctx, struct tnl_pipeline_stage *stage)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct fog_stage_data *store;
diff --git a/src/mesa/tnl/t_vb_light.c b/src/mesa/tnl/t_vb_light.c
index e7309aaac60..3acedf6e577 100644
--- a/src/mesa/tnl/t_vb_light.c
+++ b/src/mesa/tnl/t_vb_light.c
@@ -41,7 +41,7 @@
#define LIGHT_MATERIAL 0x2
#define MAX_LIGHT_FUNC 0x4
-typedef void (*light_func)( GLcontext *ctx,
+typedef void (*light_func)( struct gl_context *ctx,
struct vertex_buffer *VB,
struct tnl_pipeline_stage *stage,
GLvector4f *input );
@@ -85,7 +85,7 @@ struct light_stage_data {
* It's called per-vertex in the lighting loop.
*/
static void
-update_materials(GLcontext *ctx, struct light_stage_data *store)
+update_materials(struct gl_context *ctx, struct light_stage_data *store)
{
GLuint i;
@@ -110,7 +110,7 @@ update_materials(GLcontext *ctx, struct light_stage_data *store)
* Return number of material attributes which will track vertex color.
*/
static GLuint
-prepare_materials(GLcontext *ctx,
+prepare_materials(struct gl_context *ctx,
struct vertex_buffer *VB, struct light_stage_data *store)
{
GLuint i;
@@ -192,7 +192,7 @@ static void init_lighting_tables( void )
}
-static GLboolean run_lighting( GLcontext *ctx,
+static GLboolean run_lighting( struct gl_context *ctx,
struct tnl_pipeline_stage *stage )
{
struct light_stage_data *store = LIGHT_STAGE_DATA(stage);
@@ -250,7 +250,7 @@ static GLboolean run_lighting( GLcontext *ctx,
/* Called in place of do_lighting when the light table may have changed.
*/
-static void validate_lighting( GLcontext *ctx,
+static void validate_lighting( struct gl_context *ctx,
struct tnl_pipeline_stage *stage )
{
light_func *tab;
@@ -284,7 +284,7 @@ static void validate_lighting( GLcontext *ctx,
/* Called the first time stage->run is called. In effect, don't
* allocate data until the first time the stage is run.
*/
-static GLboolean init_lighting( GLcontext *ctx,
+static GLboolean init_lighting( struct gl_context *ctx,
struct tnl_pipeline_stage *stage )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
diff --git a/src/mesa/tnl/t_vb_lighttmp.h b/src/mesa/tnl/t_vb_lighttmp.h
index 0a98c6b02a6..aae1d18ff7f 100644
--- a/src/mesa/tnl/t_vb_lighttmp.h
+++ b/src/mesa/tnl/t_vb_lighttmp.h
@@ -44,7 +44,7 @@
* stage is the lighting stage-private data
* input is the vector of eye or object-space vertex coordinates
*/
-static void TAG(light_rgba_spec)( GLcontext *ctx,
+static void TAG(light_rgba_spec)( struct gl_context *ctx,
struct vertex_buffer *VB,
struct tnl_pipeline_stage *stage,
GLvector4f *input )
@@ -232,7 +232,7 @@ static void TAG(light_rgba_spec)( GLcontext *ctx,
}
-static void TAG(light_rgba)( GLcontext *ctx,
+static void TAG(light_rgba)( struct gl_context *ctx,
struct vertex_buffer *VB,
struct tnl_pipeline_stage *stage,
GLvector4f *input )
@@ -421,7 +421,7 @@ static void TAG(light_rgba)( GLcontext *ctx,
/* As below, but with just a single light.
*/
-static void TAG(light_fast_rgba_single)( GLcontext *ctx,
+static void TAG(light_fast_rgba_single)( struct gl_context *ctx,
struct vertex_buffer *VB,
struct tnl_pipeline_stage *stage,
GLvector4f *input )
@@ -529,7 +529,7 @@ static void TAG(light_fast_rgba_single)( GLcontext *ctx,
/* Light infinite lights
*/
-static void TAG(light_fast_rgba)( GLcontext *ctx,
+static void TAG(light_fast_rgba)( struct gl_context *ctx,
struct vertex_buffer *VB,
struct tnl_pipeline_stage *stage,
GLvector4f *input )
diff --git a/src/mesa/tnl/t_vb_normals.c b/src/mesa/tnl/t_vb_normals.c
index c2aa655674c..c19b48e51ee 100644
--- a/src/mesa/tnl/t_vb_normals.c
+++ b/src/mesa/tnl/t_vb_normals.c
@@ -47,7 +47,7 @@ struct normal_stage_data {
static GLboolean
-run_normal_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage)
+run_normal_stage(struct gl_context *ctx, struct tnl_pipeline_stage *stage)
{
struct normal_stage_data *store = NORMAL_STAGE_DATA(stage);
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
@@ -89,7 +89,7 @@ run_normal_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage)
* to point to the appropriate normal transformation routine.
*/
static void
-validate_normal_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage)
+validate_normal_stage(struct gl_context *ctx, struct tnl_pipeline_stage *stage)
{
struct normal_stage_data *store = NORMAL_STAGE_DATA(stage);
@@ -146,7 +146,7 @@ validate_normal_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage)
* Allocate stage's private data (storage for transformed normals).
*/
static GLboolean
-alloc_normal_data(GLcontext *ctx, struct tnl_pipeline_stage *stage)
+alloc_normal_data(struct gl_context *ctx, struct tnl_pipeline_stage *stage)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct normal_stage_data *store;
diff --git a/src/mesa/tnl/t_vb_points.c b/src/mesa/tnl/t_vb_points.c
index 20634c80d1d..9edbbc708e6 100644
--- a/src/mesa/tnl/t_vb_points.c
+++ b/src/mesa/tnl/t_vb_points.c
@@ -47,7 +47,7 @@ struct point_stage_data {
* disabled.
*/
static GLboolean
-run_point_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage)
+run_point_stage(struct gl_context *ctx, struct tnl_pipeline_stage *stage)
{
if (ctx->Point._Attenuated && !ctx->VertexProgram._Current) {
struct point_stage_data *store = POINT_STAGE_DATA(stage);
@@ -77,7 +77,7 @@ run_point_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage)
static GLboolean
-alloc_point_data(GLcontext *ctx, struct tnl_pipeline_stage *stage)
+alloc_point_data(struct gl_context *ctx, struct tnl_pipeline_stage *stage)
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
struct point_stage_data *store;
diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c
index f3a338ef1ed..76f8fde3f52 100644
--- a/src/mesa/tnl/t_vb_program.c
+++ b/src/mesa/tnl/t_vb_program.c
@@ -74,7 +74,7 @@ struct vp_stage_data {
static void
-userclip( GLcontext *ctx,
+userclip( struct gl_context *ctx,
GLvector4f *clip,
GLubyte *clipmask,
GLubyte *clipormask,
@@ -120,7 +120,7 @@ userclip( GLcontext *ctx,
static GLboolean
-do_ndc_cliptest(GLcontext *ctx, struct vp_stage_data *store)
+do_ndc_cliptest(struct gl_context *ctx, struct vp_stage_data *store)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
@@ -187,7 +187,7 @@ do_ndc_cliptest(GLcontext *ctx, struct vp_stage_data *store)
* moved into main/ someday.
*/
static void
-vp_fetch_texel(GLcontext *ctx, const GLfloat texcoord[4], GLfloat lambda,
+vp_fetch_texel(struct gl_context *ctx, const GLfloat texcoord[4], GLfloat lambda,
GLuint unit, GLfloat color[4])
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -204,7 +204,7 @@ vp_fetch_texel(GLcontext *ctx, const GLfloat texcoord[4], GLfloat lambda,
* string has been parsed.
*/
GLboolean
-_tnl_program_string(GLcontext *ctx, GLenum target, struct gl_program *program)
+_tnl_program_string(struct gl_context *ctx, GLenum target, struct gl_program *program)
{
/* No-op.
* If we had derived anything from the program that was private to this
@@ -218,7 +218,7 @@ _tnl_program_string(GLcontext *ctx, GLenum target, struct gl_program *program)
* Initialize virtual machine state prior to executing vertex program.
*/
static void
-init_machine(GLcontext *ctx, struct gl_program_machine *machine)
+init_machine(struct gl_context *ctx, struct gl_program_machine *machine)
{
/* Input registers get initialized from the current vertex attribs */
memcpy(machine->VertAttribs, ctx->Current.Attrib,
@@ -261,7 +261,7 @@ init_machine(GLcontext *ctx, struct gl_program_machine *machine)
* Map the texture images which the vertex program will access (if any).
*/
static void
-map_textures(GLcontext *ctx, const struct gl_vertex_program *vp)
+map_textures(struct gl_context *ctx, const struct gl_vertex_program *vp)
{
GLuint u;
@@ -283,7 +283,7 @@ map_textures(GLcontext *ctx, const struct gl_vertex_program *vp)
* Unmap the texture images which were used by the vertex program (if any).
*/
static void
-unmap_textures(GLcontext *ctx, const struct gl_vertex_program *vp)
+unmap_textures(struct gl_context *ctx, const struct gl_vertex_program *vp)
{
GLuint u;
@@ -305,7 +305,7 @@ unmap_textures(GLcontext *ctx, const struct gl_vertex_program *vp)
* This function executes vertex programs
*/
static GLboolean
-run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage )
+run_vp( struct gl_context *ctx, struct tnl_pipeline_stage *stage )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vp_stage_data *store = VP_STAGE_DATA(stage);
@@ -493,7 +493,7 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage )
* allocate data until the first time the stage is run.
*/
static GLboolean
-init_vp(GLcontext *ctx, struct tnl_pipeline_stage *stage)
+init_vp(struct gl_context *ctx, struct tnl_pipeline_stage *stage)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &(tnl->vb);
@@ -546,7 +546,7 @@ dtr(struct tnl_pipeline_stage *stage)
static void
-validate_vp_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage)
+validate_vp_stage(struct gl_context *ctx, struct tnl_pipeline_stage *stage)
{
if (ctx->VertexProgram._Current) {
_swrast_update_texture_samplers(ctx);
diff --git a/src/mesa/tnl/t_vb_render.c b/src/mesa/tnl/t_vb_render.c
index 7d991009a14..cb319213249 100644
--- a/src/mesa/tnl/t_vb_render.c
+++ b/src/mesa/tnl/t_vb_render.c
@@ -146,7 +146,7 @@ do { \
/* TODO: do this for all primitives, verts and elts:
*/
-static void clip_elt_triangles( GLcontext *ctx,
+static void clip_elt_triangles( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -235,7 +235,7 @@ static void clip_elt_triangles( GLcontext *ctx,
/* Helper functions for drivers */
/**********************************************************************/
-void _tnl_RenderClippedPolygon( GLcontext *ctx, const GLuint *elts, GLuint n )
+void _tnl_RenderClippedPolygon( struct gl_context *ctx, const GLuint *elts, GLuint n )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
@@ -246,7 +246,7 @@ void _tnl_RenderClippedPolygon( GLcontext *ctx, const GLuint *elts, GLuint n )
VB->Elts = tmp;
}
-void _tnl_RenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj )
+void _tnl_RenderClippedLine( struct gl_context *ctx, GLuint ii, GLuint jj )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
tnl->Driver.Render.Line( ctx, ii, jj );
@@ -259,7 +259,7 @@ void _tnl_RenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj )
/**********************************************************************/
-static GLboolean run_render( GLcontext *ctx,
+static GLboolean run_render( struct gl_context *ctx,
struct tnl_pipeline_stage *stage )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
diff --git a/src/mesa/tnl/t_vb_rendertmp.h b/src/mesa/tnl/t_vb_rendertmp.h
index 75f6f55bdce..4ed485a7bfd 100644
--- a/src/mesa/tnl/t_vb_rendertmp.h
+++ b/src/mesa/tnl/t_vb_rendertmp.h
@@ -57,7 +57,7 @@
#define RENDER_TAB_QUALIFIER static
#endif
-static void TAG(render_points)( GLcontext *ctx,
+static void TAG(render_points)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -70,7 +70,7 @@ static void TAG(render_points)( GLcontext *ctx,
POSTFIX;
}
-static void TAG(render_lines)( GLcontext *ctx,
+static void TAG(render_lines)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -91,7 +91,7 @@ static void TAG(render_lines)( GLcontext *ctx,
}
-static void TAG(render_line_strip)( GLcontext *ctx,
+static void TAG(render_line_strip)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -116,7 +116,7 @@ static void TAG(render_line_strip)( GLcontext *ctx,
}
-static void TAG(render_line_loop)( GLcontext *ctx,
+static void TAG(render_line_loop)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -156,7 +156,7 @@ static void TAG(render_line_loop)( GLcontext *ctx,
}
-static void TAG(render_triangles)( GLcontext *ctx,
+static void TAG(render_triangles)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -189,7 +189,7 @@ static void TAG(render_triangles)( GLcontext *ctx,
-static void TAG(render_tri_strip)( GLcontext *ctx,
+static void TAG(render_tri_strip)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -239,7 +239,7 @@ static void TAG(render_tri_strip)( GLcontext *ctx,
}
-static void TAG(render_tri_fan)( GLcontext *ctx,
+static void TAG(render_tri_fan)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -286,7 +286,7 @@ static void TAG(render_tri_fan)( GLcontext *ctx,
}
-static void TAG(render_poly)( GLcontext *ctx,
+static void TAG(render_poly)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -355,7 +355,7 @@ static void TAG(render_poly)( GLcontext *ctx,
POSTFIX;
}
-static void TAG(render_quads)( GLcontext *ctx,
+static void TAG(render_quads)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -388,7 +388,7 @@ static void TAG(render_quads)( GLcontext *ctx,
POSTFIX;
}
-static void TAG(render_quad_strip)( GLcontext *ctx,
+static void TAG(render_quad_strip)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -436,7 +436,7 @@ static void TAG(render_quad_strip)( GLcontext *ctx,
POSTFIX;
}
-static void TAG(render_noop)( GLcontext *ctx,
+static void TAG(render_noop)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -444,7 +444,7 @@ static void TAG(render_noop)( GLcontext *ctx,
(void)(ctx && start && count && flags);
}
-RENDER_TAB_QUALIFIER void (*TAG(render_tab)[GL_POLYGON+2])(GLcontext *,
+RENDER_TAB_QUALIFIER void (*TAG(render_tab)[GL_POLYGON+2])(struct gl_context *,
GLuint,
GLuint,
GLuint) =
diff --git a/src/mesa/tnl/t_vb_texgen.c b/src/mesa/tnl/t_vb_texgen.c
index 950e0f54e9f..61430c396d5 100644
--- a/src/mesa/tnl/t_vb_texgen.c
+++ b/src/mesa/tnl/t_vb_texgen.c
@@ -54,7 +54,7 @@
struct texgen_stage_data;
-typedef void (*texgen_func)( GLcontext *ctx,
+typedef void (*texgen_func)( struct gl_context *ctx,
struct texgen_stage_data *store,
GLuint unit);
@@ -248,7 +248,7 @@ static build_f_func build_f_tab[5] = {
/* Special case texgen functions.
*/
-static void texgen_reflection_map_nv( GLcontext *ctx,
+static void texgen_reflection_map_nv( struct gl_context *ctx,
struct texgen_stage_data *store,
GLuint unit )
{
@@ -270,7 +270,7 @@ static void texgen_reflection_map_nv( GLcontext *ctx,
-static void texgen_normal_map_nv( GLcontext *ctx,
+static void texgen_normal_map_nv( struct gl_context *ctx,
struct texgen_stage_data *store,
GLuint unit )
{
@@ -298,7 +298,7 @@ static void texgen_normal_map_nv( GLcontext *ctx,
}
-static void texgen_sphere_map( GLcontext *ctx,
+static void texgen_sphere_map( struct gl_context *ctx,
struct texgen_stage_data *store,
GLuint unit )
{
@@ -331,7 +331,7 @@ static void texgen_sphere_map( GLcontext *ctx,
-static void texgen( GLcontext *ctx,
+static void texgen( struct gl_context *ctx,
struct texgen_stage_data *store,
GLuint unit )
{
@@ -480,7 +480,7 @@ static void texgen( GLcontext *ctx,
-static GLboolean run_texgen_stage( GLcontext *ctx,
+static GLboolean run_texgen_stage( struct gl_context *ctx,
struct tnl_pipeline_stage *stage )
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
@@ -505,7 +505,7 @@ static GLboolean run_texgen_stage( GLcontext *ctx,
}
-static void validate_texgen_stage( GLcontext *ctx,
+static void validate_texgen_stage( struct gl_context *ctx,
struct tnl_pipeline_stage *stage )
{
struct texgen_stage_data *store = TEXGEN_STAGE_DATA(stage);
@@ -555,7 +555,7 @@ static void validate_texgen_stage( GLcontext *ctx,
/* Called the first time stage->run() is invoked.
*/
-static GLboolean alloc_texgen_data( GLcontext *ctx,
+static GLboolean alloc_texgen_data( struct gl_context *ctx,
struct tnl_pipeline_stage *stage )
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
diff --git a/src/mesa/tnl/t_vb_texmat.c b/src/mesa/tnl/t_vb_texmat.c
index 985d137e5cc..38aa51fc496 100644
--- a/src/mesa/tnl/t_vb_texmat.c
+++ b/src/mesa/tnl/t_vb_texmat.c
@@ -53,7 +53,7 @@ struct texmat_stage_data {
-static GLboolean run_texmat_stage( GLcontext *ctx,
+static GLboolean run_texmat_stage( struct gl_context *ctx,
struct tnl_pipeline_stage *stage )
{
struct texmat_stage_data *store = TEXMAT_STAGE_DATA(stage);
@@ -82,7 +82,7 @@ static GLboolean run_texmat_stage( GLcontext *ctx,
/* Called the first time stage->run() is invoked.
*/
-static GLboolean alloc_texmat_data( GLcontext *ctx,
+static GLboolean alloc_texmat_data( struct gl_context *ctx,
struct tnl_pipeline_stage *stage )
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
diff --git a/src/mesa/tnl/t_vb_vertex.c b/src/mesa/tnl/t_vb_vertex.c
index 453479227b7..26e8ae065d5 100644
--- a/src/mesa/tnl/t_vb_vertex.c
+++ b/src/mesa/tnl/t_vb_vertex.c
@@ -58,7 +58,7 @@ struct vertex_stage_data {
* t_render_clip.h.
*/
#define USER_CLIPTEST(NAME, SZ) \
-static void NAME( GLcontext *ctx, \
+static void NAME( struct gl_context *ctx, \
GLvector4f *clip, \
GLubyte *clipmask, \
GLubyte *clipormask, \
@@ -105,7 +105,7 @@ USER_CLIPTEST(userclip2, 2)
USER_CLIPTEST(userclip3, 3)
USER_CLIPTEST(userclip4, 4)
-static void (*(usercliptab[5]))( GLcontext *,
+static void (*(usercliptab[5]))( struct gl_context *,
GLvector4f *, GLubyte *,
GLubyte *, GLubyte * ) =
{
@@ -118,7 +118,7 @@ static void (*(usercliptab[5]))( GLcontext *,
void
-tnl_clip_prepare(GLcontext *ctx)
+tnl_clip_prepare(struct gl_context *ctx)
{
/* Neither the x86 nor sparc asm cliptest functions have been updated
* for ARB_depth_clamp, so force the C paths.
@@ -134,7 +134,7 @@ tnl_clip_prepare(GLcontext *ctx)
-static GLboolean run_vertex_stage( GLcontext *ctx,
+static GLboolean run_vertex_stage( struct gl_context *ctx,
struct tnl_pipeline_stage *stage )
{
struct vertex_stage_data *store = (struct vertex_stage_data *)stage->privatePtr;
@@ -229,7 +229,7 @@ static GLboolean run_vertex_stage( GLcontext *ctx,
}
-static GLboolean init_vertex_stage( GLcontext *ctx,
+static GLboolean init_vertex_stage( struct gl_context *ctx,
struct tnl_pipeline_stage *stage )
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
diff --git a/src/mesa/tnl/t_vertex.c b/src/mesa/tnl/t_vertex.c
index c1b1570232a..f1cb795cd6c 100644
--- a/src/mesa/tnl/t_vertex.c
+++ b/src/mesa/tnl/t_vertex.c
@@ -106,7 +106,7 @@ void _tnl_register_fastpath( struct tnl_clipspace *vtx,
/***********************************************************************
* Build codegen functions or return generic ones:
*/
-static void choose_emit_func( GLcontext *ctx, GLuint count, GLubyte *dest)
+static void choose_emit_func( struct gl_context *ctx, GLuint count, GLubyte *dest)
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
@@ -150,7 +150,7 @@ static void choose_emit_func( GLcontext *ctx, GLuint count, GLubyte *dest)
-static void choose_interp_func( GLcontext *ctx,
+static void choose_interp_func( struct gl_context *ctx,
GLfloat t,
GLuint edst, GLuint eout, GLuint ein,
GLboolean force_boundary )
@@ -168,7 +168,7 @@ static void choose_interp_func( GLcontext *ctx,
}
-static void choose_copy_pv_func( GLcontext *ctx, GLuint edst, GLuint esrc )
+static void choose_copy_pv_func( struct gl_context *ctx, GLuint edst, GLuint esrc )
{
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
@@ -190,7 +190,7 @@ static void choose_copy_pv_func( GLcontext *ctx, GLuint edst, GLuint esrc )
/* Interpolate between two vertices to produce a third:
*/
-void _tnl_interp( GLcontext *ctx,
+void _tnl_interp( struct gl_context *ctx,
GLfloat t,
GLuint edst, GLuint eout, GLuint ein,
GLboolean force_boundary )
@@ -201,7 +201,7 @@ void _tnl_interp( GLcontext *ctx,
/* Copy colors from one vertex to another:
*/
-void _tnl_copy_pv( GLcontext *ctx, GLuint edst, GLuint esrc )
+void _tnl_copy_pv( struct gl_context *ctx, GLuint edst, GLuint esrc )
{
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
vtx->copy_pv( ctx, edst, esrc );
@@ -212,7 +212,7 @@ void _tnl_copy_pv( GLcontext *ctx, GLuint edst, GLuint esrc )
* reverse any viewport transformation, swizzling or other conversions
* which may have been applied:
*/
-void _tnl_get_attr( GLcontext *ctx, const void *vin,
+void _tnl_get_attr( struct gl_context *ctx, const void *vin,
GLenum attr, GLfloat *dest )
{
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
@@ -231,7 +231,7 @@ void _tnl_get_attr( GLcontext *ctx, const void *vin,
*/
if (attr == _TNL_ATTRIB_POINTSIZE) {
/* If the hardware vertex doesn't have point size then use size from
- * GLcontext. XXX this will be wrong if drawing attenuated points!
+ * struct gl_context. XXX this will be wrong if drawing attenuated points!
*/
dest[0] = ctx->Point.Size;
}
@@ -243,7 +243,7 @@ void _tnl_get_attr( GLcontext *ctx, const void *vin,
/* Complementary operation to the above.
*/
-void _tnl_set_attr( GLcontext *ctx, void *vout,
+void _tnl_set_attr( struct gl_context *ctx, void *vout,
GLenum attr, const GLfloat *src )
{
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
@@ -260,14 +260,14 @@ void _tnl_set_attr( GLcontext *ctx, void *vout,
}
-void *_tnl_get_vertex( GLcontext *ctx, GLuint nr )
+void *_tnl_get_vertex( struct gl_context *ctx, GLuint nr )
{
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
return vtx->vertex_buf + nr * vtx->vertex_size;
}
-void _tnl_invalidate_vertex_state( GLcontext *ctx, GLuint new_state )
+void _tnl_invalidate_vertex_state( struct gl_context *ctx, GLuint new_state )
{
if (new_state & (_DD_NEW_TRI_LIGHT_TWOSIDE|_DD_NEW_TRI_UNFILLED) ) {
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
@@ -285,7 +285,7 @@ static void invalidate_funcs( struct tnl_clipspace *vtx )
vtx->new_inputs = ~0;
}
-GLuint _tnl_install_attrs( GLcontext *ctx, const struct tnl_attr_map *map,
+GLuint _tnl_install_attrs( struct gl_context *ctx, const struct tnl_attr_map *map,
GLuint nr, const GLfloat *vp,
GLuint unpacked_size )
{
@@ -360,7 +360,7 @@ GLuint _tnl_install_attrs( GLcontext *ctx, const struct tnl_attr_map *map,
-void _tnl_invalidate_vertices( GLcontext *ctx, GLuint newinputs )
+void _tnl_invalidate_vertices( struct gl_context *ctx, GLuint newinputs )
{
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
vtx->new_inputs |= newinputs;
@@ -370,14 +370,14 @@ void _tnl_invalidate_vertices( GLcontext *ctx, GLuint newinputs )
/* This event has broader use beyond this file - will move elsewhere
* and probably invoke a driver callback.
*/
-void _tnl_notify_pipeline_output_change( GLcontext *ctx )
+void _tnl_notify_pipeline_output_change( struct gl_context *ctx )
{
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
invalidate_funcs(vtx);
}
-static void adjust_input_ptrs( GLcontext *ctx, GLint diff)
+static void adjust_input_ptrs( struct gl_context *ctx, GLint diff)
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
@@ -392,7 +392,7 @@ static void adjust_input_ptrs( GLcontext *ctx, GLint diff)
}
}
-static void update_input_ptrs( GLcontext *ctx, GLuint start )
+static void update_input_ptrs( struct gl_context *ctx, GLuint start )
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
@@ -424,7 +424,7 @@ static void update_input_ptrs( GLcontext *ctx, GLuint start )
}
-void _tnl_build_vertices( GLcontext *ctx,
+void _tnl_build_vertices( struct gl_context *ctx,
GLuint start,
GLuint end,
GLuint newinputs )
@@ -439,7 +439,7 @@ void _tnl_build_vertices( GLcontext *ctx,
/* Emit VB vertices start..end to dest. Note that VB vertex at
* postion start will be emitted to dest at position zero.
*/
-void *_tnl_emit_vertices_to_buffer( GLcontext *ctx,
+void *_tnl_emit_vertices_to_buffer( struct gl_context *ctx,
GLuint start,
GLuint end,
void *dest )
@@ -457,7 +457,7 @@ void *_tnl_emit_vertices_to_buffer( GLcontext *ctx,
* postion start will be emitted to dest at position zero.
*/
-void *_tnl_emit_indexed_vertices_to_buffer( GLcontext *ctx,
+void *_tnl_emit_indexed_vertices_to_buffer( struct gl_context *ctx,
const GLuint *elts,
GLuint start,
GLuint end,
@@ -482,7 +482,7 @@ void *_tnl_emit_indexed_vertices_to_buffer( GLcontext *ctx,
}
-void _tnl_init_vertices( GLcontext *ctx,
+void _tnl_init_vertices( struct gl_context *ctx,
GLuint vb_size,
GLuint max_vertex_size )
{
@@ -533,7 +533,7 @@ void _tnl_init_vertices( GLcontext *ctx,
}
-void _tnl_free_vertices( GLcontext *ctx )
+void _tnl_free_vertices( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
if (tnl) {
diff --git a/src/mesa/tnl/t_vertex.h b/src/mesa/tnl/t_vertex.h
index 2dfd7b57f01..252f2f7c295 100644
--- a/src/mesa/tnl/t_vertex.h
+++ b/src/mesa/tnl/t_vertex.h
@@ -78,43 +78,43 @@ extern const struct tnl_format_info _tnl_format_info[EMIT_MAX];
/* Interpolate between two vertices to produce a third:
*/
-extern void _tnl_interp( GLcontext *ctx,
+extern void _tnl_interp( struct gl_context *ctx,
GLfloat t,
GLuint edst, GLuint eout, GLuint ein,
GLboolean force_boundary );
/* Copy colors from one vertex to another:
*/
-extern void _tnl_copy_pv( GLcontext *ctx, GLuint edst, GLuint esrc );
+extern void _tnl_copy_pv( struct gl_context *ctx, GLuint edst, GLuint esrc );
/* Extract a named attribute from a hardware vertex. Will have to
* reverse any viewport transformation, swizzling or other conversions
* which may have been applied:
*/
-extern void _tnl_get_attr( GLcontext *ctx, const void *vertex, GLenum attrib,
+extern void _tnl_get_attr( struct gl_context *ctx, const void *vertex, GLenum attrib,
GLfloat *dest );
/* Complementary to the above.
*/
-extern void _tnl_set_attr( GLcontext *ctx, void *vout, GLenum attrib,
+extern void _tnl_set_attr( struct gl_context *ctx, void *vout, GLenum attrib,
const GLfloat *src );
-extern void *_tnl_get_vertex( GLcontext *ctx, GLuint nr );
+extern void *_tnl_get_vertex( struct gl_context *ctx, GLuint nr );
-extern GLuint _tnl_install_attrs( GLcontext *ctx,
+extern GLuint _tnl_install_attrs( struct gl_context *ctx,
const struct tnl_attr_map *map,
GLuint nr, const GLfloat *vp,
GLuint unpacked_size );
-extern void _tnl_free_vertices( GLcontext *ctx );
+extern void _tnl_free_vertices( struct gl_context *ctx );
-extern void _tnl_init_vertices( GLcontext *ctx,
+extern void _tnl_init_vertices( struct gl_context *ctx,
GLuint vb_size,
GLuint max_vertex_size );
-extern void *_tnl_emit_vertices_to_buffer( GLcontext *ctx,
+extern void *_tnl_emit_vertices_to_buffer( struct gl_context *ctx,
GLuint start,
GLuint end,
void *dest );
@@ -124,23 +124,23 @@ extern void *_tnl_emit_vertices_to_buffer( GLcontext *ctx,
* the same functionality.
*/
-extern void *_tnl_emit_indexed_vertices_to_buffer( GLcontext *ctx,
+extern void *_tnl_emit_indexed_vertices_to_buffer( struct gl_context *ctx,
const GLuint *elts,
GLuint start,
GLuint end,
void *dest );
-extern void _tnl_build_vertices( GLcontext *ctx,
+extern void _tnl_build_vertices( struct gl_context *ctx,
GLuint start,
GLuint end,
GLuint newinputs );
-extern void _tnl_invalidate_vertices( GLcontext *ctx, GLuint newinputs );
+extern void _tnl_invalidate_vertices( struct gl_context *ctx, GLuint newinputs );
-extern void _tnl_invalidate_vertex_state( GLcontext *ctx, GLuint new_state );
+extern void _tnl_invalidate_vertex_state( struct gl_context *ctx, GLuint new_state );
-extern void _tnl_notify_pipeline_output_change( GLcontext *ctx );
+extern void _tnl_notify_pipeline_output_change( struct gl_context *ctx );
#define GET_VERTEX_STATE(ctx) &(TNL_CONTEXT(ctx)->clipspace)
@@ -153,29 +153,29 @@ void _tnl_register_fastpath( struct tnl_clipspace *vtx,
/* t_vertex_generic.c -- Internal functions for t_vertex.c
*/
-void _tnl_generic_copy_pv_extras( GLcontext *ctx,
+void _tnl_generic_copy_pv_extras( struct gl_context *ctx,
GLuint dst, GLuint src );
-void _tnl_generic_interp_extras( GLcontext *ctx,
+void _tnl_generic_interp_extras( struct gl_context *ctx,
GLfloat t,
GLuint dst, GLuint out, GLuint in,
GLboolean force_boundary );
-void _tnl_generic_copy_pv( GLcontext *ctx, GLuint edst, GLuint esrc );
+void _tnl_generic_copy_pv( struct gl_context *ctx, GLuint edst, GLuint esrc );
-void _tnl_generic_interp( GLcontext *ctx,
+void _tnl_generic_interp( struct gl_context *ctx,
GLfloat t,
GLuint edst, GLuint eout, GLuint ein,
GLboolean force_boundary );
-void _tnl_generic_emit( GLcontext *ctx,
+void _tnl_generic_emit( struct gl_context *ctx,
GLuint count,
GLubyte *v );
-void _tnl_generate_hardwired_emit( GLcontext *ctx );
+void _tnl_generate_hardwired_emit( struct gl_context *ctx );
/* t_vertex_sse.c -- Internal functions for t_vertex.c
*/
-void _tnl_generate_sse_emit( GLcontext *ctx );
+void _tnl_generate_sse_emit( struct gl_context *ctx );
#endif
diff --git a/src/mesa/tnl/t_vertex_generic.c b/src/mesa/tnl/t_vertex_generic.c
index b1ea1424649..12da30f5eb3 100644
--- a/src/mesa/tnl/t_vertex_generic.c
+++ b/src/mesa/tnl/t_vertex_generic.c
@@ -866,7 +866,7 @@ const struct tnl_format_info _tnl_format_info[EMIT_MAX] =
* vertices
*/
#define EMIT5(NR, F0, F1, F2, F3, F4, NAME) \
-static void NAME( GLcontext *ctx, \
+static void NAME( struct gl_context *ctx, \
GLuint count, \
GLubyte *v ) \
{ \
@@ -929,7 +929,7 @@ EMIT4(insert_4f_4, insert_4ub_4f_rgba_4, insert_2f_2, insert_2f_2, emit_xyzw4_rg
/* Use the codegen paths to select one of a number of hardwired
* fastpaths.
*/
-void _tnl_generate_hardwired_emit( GLcontext *ctx )
+void _tnl_generate_hardwired_emit( struct gl_context *ctx )
{
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
tnl_emit_func func = NULL;
@@ -987,7 +987,7 @@ void _tnl_generate_hardwired_emit( GLcontext *ctx )
* vertices
*/
-void _tnl_generic_emit( GLcontext *ctx,
+void _tnl_generic_emit( struct gl_context *ctx,
GLuint count,
GLubyte *v )
{
@@ -1007,7 +1007,7 @@ void _tnl_generic_emit( GLcontext *ctx,
}
-void _tnl_generic_interp( GLcontext *ctx,
+void _tnl_generic_interp( struct gl_context *ctx,
GLfloat t,
GLuint edst, GLuint eout, GLuint ein,
GLboolean force_boundary )
@@ -1061,7 +1061,7 @@ void _tnl_generic_interp( GLcontext *ctx,
/* Extract color attributes from one vertex and insert them into
* another. (Shortcircuit extract/insert with memcpy).
*/
-void _tnl_generic_copy_pv( GLcontext *ctx, GLuint edst, GLuint esrc )
+void _tnl_generic_copy_pv( struct gl_context *ctx, GLuint edst, GLuint esrc )
{
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
GLubyte *vsrc = vtx->vertex_buf + esrc * vtx->vertex_size;
@@ -1085,7 +1085,7 @@ void _tnl_generic_copy_pv( GLcontext *ctx, GLuint edst, GLuint esrc )
/* Helper functions for hardware which doesn't put back colors and/or
* edgeflags into vertices.
*/
-void _tnl_generic_interp_extras( GLcontext *ctx,
+void _tnl_generic_interp_extras( struct gl_context *ctx,
GLfloat t,
GLuint dst, GLuint out, GLuint in,
GLboolean force_boundary )
@@ -1128,7 +1128,7 @@ void _tnl_generic_interp_extras( GLcontext *ctx,
_tnl_generic_interp(ctx, t, dst, out, in, force_boundary);
}
-void _tnl_generic_copy_pv_extras( GLcontext *ctx,
+void _tnl_generic_copy_pv_extras( struct gl_context *ctx,
GLuint dst, GLuint src )
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
diff --git a/src/mesa/tnl/t_vertex_sse.c b/src/mesa/tnl/t_vertex_sse.c
index 98058f3bdac..93189656f74 100644
--- a/src/mesa/tnl/t_vertex_sse.c
+++ b/src/mesa/tnl/t_vertex_sse.c
@@ -54,7 +54,7 @@
struct x86_program {
struct x86_function func;
- GLcontext *ctx;
+ struct gl_context *ctx;
GLboolean inputs_safe;
GLboolean outputs_safe;
GLboolean have_sse2;
@@ -342,7 +342,7 @@ static void update_src_ptr( struct x86_program *p,
*/
static GLboolean build_vertex_emit( struct x86_program *p )
{
- GLcontext *ctx = p->ctx;
+ struct gl_context *ctx = p->ctx;
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
GLuint j = 0;
@@ -638,7 +638,7 @@ static GLboolean build_vertex_emit( struct x86_program *p )
-void _tnl_generate_sse_emit( GLcontext *ctx )
+void _tnl_generate_sse_emit( struct gl_context *ctx )
{
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
struct x86_program p;
@@ -676,7 +676,7 @@ void _tnl_generate_sse_emit( GLcontext *ctx )
#else
-void _tnl_generate_sse_emit( GLcontext *ctx )
+void _tnl_generate_sse_emit( struct gl_context *ctx )
{
/* Dummy version for when USE_SSE_ASM not defined */
}
diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c
index 735937bbe29..421ec88a454 100644
--- a/src/mesa/tnl/t_vp_build.c
+++ b/src/mesa/tnl/t_vp_build.c
@@ -39,7 +39,7 @@
/**
* XXX This should go away someday, but still referenced by some drivers...
*/
-void _tnl_UpdateFixedFunctionProgram( GLcontext *ctx )
+void _tnl_UpdateFixedFunctionProgram( struct gl_context *ctx )
{
const struct gl_vertex_program *prev = ctx->VertexProgram._Current;
diff --git a/src/mesa/tnl/t_vp_build.h b/src/mesa/tnl/t_vp_build.h
index d6ebc66c045..1d10ff245d9 100644
--- a/src/mesa/tnl/t_vp_build.h
+++ b/src/mesa/tnl/t_vp_build.h
@@ -37,6 +37,6 @@
_NEW_FOG | \
_NEW_POINT)
-extern void _tnl_UpdateFixedFunctionProgram( GLcontext *ctx );
+extern void _tnl_UpdateFixedFunctionProgram( struct gl_context *ctx );
#endif
diff --git a/src/mesa/tnl/tnl.h b/src/mesa/tnl/tnl.h
index 2c0d1fef737..702efdc5cca 100644
--- a/src/mesa/tnl/tnl.h
+++ b/src/mesa/tnl/tnl.h
@@ -37,43 +37,43 @@
* itself.)
*/
extern GLboolean
-_tnl_CreateContext( GLcontext *ctx );
+_tnl_CreateContext( struct gl_context *ctx );
extern void
-_tnl_DestroyContext( GLcontext *ctx );
+_tnl_DestroyContext( struct gl_context *ctx );
extern void
-_tnl_InvalidateState( GLcontext *ctx, GLuint new_state );
+_tnl_InvalidateState( struct gl_context *ctx, GLuint new_state );
/* Functions to revive the tnl module after being unhooked from
* dispatch and/or driver callbacks.
*/
extern void
-_tnl_wakeup( GLcontext *ctx );
+_tnl_wakeup( struct gl_context *ctx );
/* Driver configuration options:
*/
extern void
-_tnl_need_projected_coords( GLcontext *ctx, GLboolean flag );
+_tnl_need_projected_coords( struct gl_context *ctx, GLboolean flag );
/* Control whether T&L does per-vertex fog
*/
extern void
-_tnl_allow_vertex_fog( GLcontext *ctx, GLboolean value );
+_tnl_allow_vertex_fog( struct gl_context *ctx, GLboolean value );
extern void
-_tnl_allow_pixel_fog( GLcontext *ctx, GLboolean value );
+_tnl_allow_pixel_fog( struct gl_context *ctx, GLboolean value );
extern GLboolean
-_tnl_program_string(GLcontext *ctx, GLenum target, struct gl_program *program);
+_tnl_program_string(struct gl_context *ctx, GLenum target, struct gl_program *program);
struct _mesa_prim;
struct _mesa_index_buffer;
void
-_tnl_draw_prims( GLcontext *ctx,
+_tnl_draw_prims( struct gl_context *ctx,
const struct gl_client_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
@@ -82,7 +82,7 @@ _tnl_draw_prims( GLcontext *ctx,
GLuint max_index);
void
-_tnl_vbo_draw_prims( GLcontext *ctx,
+_tnl_vbo_draw_prims( struct gl_context *ctx,
const struct gl_client_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
@@ -92,9 +92,9 @@ _tnl_vbo_draw_prims( GLcontext *ctx,
GLuint max_index);
extern void
-_mesa_load_tracked_matrices(GLcontext *ctx);
+_mesa_load_tracked_matrices(struct gl_context *ctx);
extern void
-_tnl_RasterPos(GLcontext *ctx, const GLfloat vObj[4]);
+_tnl_RasterPos(struct gl_context *ctx, const GLfloat vObj[4]);
#endif
diff --git a/src/mesa/tnl_dd/imm/t_dd_imm_primtmp.h b/src/mesa/tnl_dd/imm/t_dd_imm_primtmp.h
index 97dca3fd421..7103db5355b 100644
--- a/src/mesa/tnl_dd/imm/t_dd_imm_primtmp.h
+++ b/src/mesa/tnl_dd/imm/t_dd_imm_primtmp.h
@@ -46,7 +46,7 @@
* GL_POINTS
*/
-static void TAG(flush_point_0)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_point_0)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
if ( !v0->mask ) {
LOCAL_VARS;
@@ -59,16 +59,16 @@ static void TAG(flush_point_0)( GLcontext *ctx, TNL_VERTEX *v0 )
* GL_LINES
*/
-static void TAG(flush_line_1)( GLcontext *ctx, TNL_VERTEX *v0 );
+static void TAG(flush_line_1)( struct gl_context *ctx, TNL_VERTEX *v0 );
-static void TAG(flush_line_0)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_line_0)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
FLUSH_VERTEX = TAG(flush_line_1);
ACTIVE_VERTEX = IMM_VERTICES( 1 );
}
-static void TAG(flush_line_1)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_line_1)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
TNL_VERTEX *v1 = v0 - 1;
@@ -85,10 +85,10 @@ static void TAG(flush_line_1)( GLcontext *ctx, TNL_VERTEX *v0 )
* GL_LINE_LOOP
*/
-static void TAG(flush_line_loop_2)( GLcontext *ctx, TNL_VERTEX *v0 );
-static void TAG(flush_line_loop_1)( GLcontext *ctx, TNL_VERTEX *v0 );
+static void TAG(flush_line_loop_2)( struct gl_context *ctx, TNL_VERTEX *v0 );
+static void TAG(flush_line_loop_1)( struct gl_context *ctx, TNL_VERTEX *v0 );
-static void TAG(flush_line_loop_0)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_line_loop_0)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
@@ -107,7 +107,7 @@ static void TAG(flush_line_loop_0)( GLcontext *ctx, TNL_VERTEX *v0 )
EMIT_VERTEX( b ); \
}
-static void TAG(flush_line_loop_1)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_line_loop_1)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
TNL_VERTEX *v1 = v0 - 1;
@@ -116,7 +116,7 @@ static void TAG(flush_line_loop_1)( GLcontext *ctx, TNL_VERTEX *v0 )
DRAW_LINELOOP_LINE( v1, v0 );
}
-static void TAG(flush_line_loop_2)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_line_loop_2)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
TNL_VERTEX *v1 = v0 + 1;
@@ -125,7 +125,7 @@ static void TAG(flush_line_loop_2)( GLcontext *ctx, TNL_VERTEX *v0 )
DRAW_LINELOOP_LINE( v1, v0 );
}
-static void TAG(end_line_loop)( GLcontext *ctx )
+static void TAG(end_line_loop)( struct gl_context *ctx )
{
LOCAL_VARS;
@@ -142,10 +142,10 @@ static void TAG(end_line_loop)( GLcontext *ctx )
* GL_LINE_STRIP
*/
-static void TAG(flush_line_strip_2)( GLcontext *ctx, TNL_VERTEX *v0 );
-static void TAG(flush_line_strip_1)( GLcontext *ctx, TNL_VERTEX *v0 );
+static void TAG(flush_line_strip_2)( struct gl_context *ctx, TNL_VERTEX *v0 );
+static void TAG(flush_line_strip_1)( struct gl_context *ctx, TNL_VERTEX *v0 );
-static void TAG(flush_line_strip_0)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_line_strip_0)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
@@ -154,7 +154,7 @@ static void TAG(flush_line_strip_0)( GLcontext *ctx, TNL_VERTEX *v0 )
}
-static void TAG(flush_line_strip_1)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_line_strip_1)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
TNL_VERTEX *v1 = v0 - 1;
@@ -173,7 +173,7 @@ static void TAG(flush_line_strip_1)( GLcontext *ctx, TNL_VERTEX *v0 )
}
}
-static void TAG(flush_line_strip_2)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_line_strip_2)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
TNL_VERTEX *v1 = v0 + 1;
@@ -198,10 +198,10 @@ static void TAG(flush_line_strip_2)( GLcontext *ctx, TNL_VERTEX *v0 )
* GL_TRIANGLES
*/
-static void TAG(flush_triangle_2)( GLcontext *ctx, TNL_VERTEX *v0 );
-static void TAG(flush_triangle_1)( GLcontext *ctx, TNL_VERTEX *v0 );
+static void TAG(flush_triangle_2)( struct gl_context *ctx, TNL_VERTEX *v0 );
+static void TAG(flush_triangle_1)( struct gl_context *ctx, TNL_VERTEX *v0 );
-static void TAG(flush_triangle_0)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_triangle_0)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
@@ -212,7 +212,7 @@ static void TAG(flush_triangle_0)( GLcontext *ctx, TNL_VERTEX *v0 )
BEGIN_PRIM( GL_TRIANGLES, 0 );
}
-static void TAG(flush_triangle_1)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_triangle_1)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
@@ -222,7 +222,7 @@ static void TAG(flush_triangle_1)( GLcontext *ctx, TNL_VERTEX *v0 )
FLUSH_VERTEX = TAG(flush_triangle_2);
}
-static void TAG(flush_triangle_2)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_triangle_2)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
TNL_VERTEX *v2 = v0 - 2;
@@ -249,18 +249,18 @@ static void TAG(flush_triangle_2)( GLcontext *ctx, TNL_VERTEX *v0 )
* GL_TRIANGLE_STRIP
*/
-static void TAG(flush_tri_strip_3)( GLcontext *ctx, TNL_VERTEX *v0 );
-static void TAG(flush_tri_strip_2)( GLcontext *ctx, TNL_VERTEX *v0 );
-static void TAG(flush_tri_strip_1)( GLcontext *ctx, TNL_VERTEX *v0 );
+static void TAG(flush_tri_strip_3)( struct gl_context *ctx, TNL_VERTEX *v0 );
+static void TAG(flush_tri_strip_2)( struct gl_context *ctx, TNL_VERTEX *v0 );
+static void TAG(flush_tri_strip_1)( struct gl_context *ctx, TNL_VERTEX *v0 );
-static void TAG(flush_tri_strip_0)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_tri_strip_0)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
ACTIVE_VERTEX = IMM_VERTICES( 1 );
FLUSH_VERTEX = TAG(flush_tri_strip_1);
}
-static void TAG(flush_tri_strip_1)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_tri_strip_1)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
ACTIVE_VERTEX = IMM_VERTICES( 2 );
@@ -283,7 +283,7 @@ static void TAG(flush_tri_strip_1)( GLcontext *ctx, TNL_VERTEX *v0 )
EMIT_VERTEX( v0 ); \
}
-static void TAG(flush_tri_strip_2)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_tri_strip_2)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
FLUSH_VERTEX = TAG(flush_tri_strip_3);
@@ -291,7 +291,7 @@ static void TAG(flush_tri_strip_2)( GLcontext *ctx, TNL_VERTEX *v0 )
DO_TRISTRIP_TRI( 0, 1 );
}
-static void TAG(flush_tri_strip_3)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_tri_strip_3)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
FLUSH_VERTEX = TAG(flush_tri_strip_4);
@@ -299,7 +299,7 @@ static void TAG(flush_tri_strip_3)( GLcontext *ctx, TNL_VERTEX *v0 )
DO_TRISTRIP_TRI( 1, 2 );
}
-static void TAG(flush_tri_strip_4)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_tri_strip_4)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
FLUSH_VERTEX = TAG(flush_tri_strip_5);
@@ -307,7 +307,7 @@ static void TAG(flush_tri_strip_4)( GLcontext *ctx, TNL_VERTEX *v0 )
DO_TRISTRIP_TRI( 2, 3 );
}
-static void TAG(flush_tri_strip_5)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_tri_strip_5)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
FLUSH_VERTEX = TAG(flush_tri_strip_2);
@@ -321,10 +321,10 @@ static void TAG(flush_tri_strip_5)( GLcontext *ctx, TNL_VERTEX *v0 )
* GL_TRIANGLE_FAN
*/
-static void TAG(flush_tri_fan_2)( GLcontext *ctx, TNL_VERTEX *v0 );
-static void TAG(flush_tri_fan_1)( GLcontext *ctx, TNL_VERTEX *v0 );
+static void TAG(flush_tri_fan_2)( struct gl_context *ctx, TNL_VERTEX *v0 );
+static void TAG(flush_tri_fan_1)( struct gl_context *ctx, TNL_VERTEX *v0 );
-static void TAG(flush_tri_fan_0)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_tri_fan_0)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
@@ -332,7 +332,7 @@ static void TAG(flush_tri_fan_0)( GLcontext *ctx, TNL_VERTEX *v0 )
FLUSH_VERTEX = TAG(flush_tri_fan_1);
}
-static void TAG(flush_tri_fan_1)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_tri_fan_1)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
@@ -356,7 +356,7 @@ static void TAG(flush_tri_fan_1)( GLcontext *ctx, TNL_VERTEX *v0 )
EMIT_VERTEX( v0 ); \
}
-static void TAG(flush_tri_fan_2)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_tri_fan_2)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
ACTIVE_VERTEX = IMM_VERTICES( 1 );
@@ -364,7 +364,7 @@ static void TAG(flush_tri_fan_2)( GLcontext *ctx, TNL_VERTEX *v0 )
DO_TRIFAN_TRI( 0, 1 );
}
-static void TAG(flush_tri_fan_3)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_tri_fan_3)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
ACTIVE_VERTEX = IMM_VERTICES( 2 );
@@ -378,32 +378,32 @@ static void TAG(flush_tri_fan_3)( GLcontext *ctx, TNL_VERTEX *v0 )
* GL_QUADS
*/
-static void TAG(flush_quad_3)( GLcontext *ctx, TNL_VERTEX *v0 );
-static void TAG(flush_quad_2)( GLcontext *ctx, TNL_VERTEX *v0 );
-static void TAG(flush_quad_1)( GLcontext *ctx, TNL_VERTEX *v0 );
+static void TAG(flush_quad_3)( struct gl_context *ctx, TNL_VERTEX *v0 );
+static void TAG(flush_quad_2)( struct gl_context *ctx, TNL_VERTEX *v0 );
+static void TAG(flush_quad_1)( struct gl_context *ctx, TNL_VERTEX *v0 );
-static void TAG(flush_quad_0)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_quad_0)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
IMM_VERTEX( v0 ) = v0 + 1;
FLUSH_VERTEX = TAG(flush_quad_1);
}
-static void TAG(flush_quad_1)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_quad_1)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
IMM_VERTEX( v0 ) = v0 + 1;
FLUSH_VERTEX = TAG(flush_quad_2);
}
-static void TAG(flush_quad_2)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_quad_2)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
IMM_VERTEX( v0 ) = v0 + 1;
FLUSH_VERTEX = TAG(flush_quad_3);
}
-static void TAG(flush_quad_3)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_quad_3)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
TNL_VERTEX *v3 = v0 - 3;
@@ -431,11 +431,11 @@ static void TAG(flush_quad_3)( GLcontext *ctx, TNL_VERTEX *v0 )
* GL_QUAD_STRIP
*/
-static void TAG(flush_quad_strip_3)( GLcontext *ctx, TNL_VERTEX *v0 );
-static void TAG(flush_quad_strip_2)( GLcontext *ctx, TNL_VERTEX *v0 );
-static void TAG(flush_quad_strip_1)( GLcontext *ctx, TNL_VERTEX *v0 );
+static void TAG(flush_quad_strip_3)( struct gl_context *ctx, TNL_VERTEX *v0 );
+static void TAG(flush_quad_strip_2)( struct gl_context *ctx, TNL_VERTEX *v0 );
+static void TAG(flush_quad_strip_1)( struct gl_context *ctx, TNL_VERTEX *v0 );
-static void TAG(flush_quad_strip_0)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_quad_strip_0)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
@@ -444,7 +444,7 @@ static void TAG(flush_quad_strip_0)( GLcontext *ctx, TNL_VERTEX *v0 )
FLUSH_VERTEX = TAG(flush_quad_strip_1);
}
-static void TAG(flush_quad_strip_1)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_quad_strip_1)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
@@ -453,7 +453,7 @@ static void TAG(flush_quad_strip_1)( GLcontext *ctx, TNL_VERTEX *v0 )
FLUSH_VERTEX = TAG(flush_quad_strip_2);
}
-static void TAG(flush_quad_strip_2)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_quad_strip_2)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
@@ -462,7 +462,7 @@ static void TAG(flush_quad_strip_2)( GLcontext *ctx, TNL_VERTEX *v0 )
FLUSH_VERTEX = TAG(flush_quad_strip_3);
}
-static void TAG(flush_quad_strip_3)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_quad_strip_3)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
TNL_VERTEX *v3 = IMM_VERTEX( v3 );
@@ -489,17 +489,17 @@ static void TAG(flush_quad_strip_3)( GLcontext *ctx, TNL_VERTEX *v0 )
* GL_POLYGON
*/
-static void TAG(flush_poly_2)( GLcontext *ctx, TNL_VERTEX *v0 );
-static void TAG(flush_poly_1)( GLcontext *ctx, TNL_VERTEX *v0 );
+static void TAG(flush_poly_2)( struct gl_context *ctx, TNL_VERTEX *v0 );
+static void TAG(flush_poly_1)( struct gl_context *ctx, TNL_VERTEX *v0 );
-static void TAG(flush_poly_0)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_poly_0)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
ACTIVE_VERTEX = IMM_VERTICES( 1 );
FLUSH_VERTEX = TAG(flush_poly_1);
}
-static void TAG(flush_poly_1)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_poly_1)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
ACTIVE_VERTEX = IMM_VERTICES( 2 );
@@ -522,7 +522,7 @@ static void TAG(flush_poly_1)( GLcontext *ctx, TNL_VERTEX *v0 )
EMIT_VERTEX( v0 ); \
}
-static void TAG(flush_poly_2)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_poly_2)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
ACTIVE_VERTEX = IMM_VERTICES( 1 );
@@ -530,7 +530,7 @@ static void TAG(flush_poly_2)( GLcontext *ctx, TNL_VERTEX *v0 )
DO_POLY_TRI( 0, 1 );
}
-static void TAG(flush_poly_3)( GLcontext *ctx, TNL_VERTEX *v0 )
+static void TAG(flush_poly_3)( struct gl_context *ctx, TNL_VERTEX *v0 )
{
LOCAL_VARS;
ACTIVE_VERTEX = IMM_VERTICES( 2 );
@@ -539,7 +539,7 @@ static void TAG(flush_poly_3)( GLcontext *ctx, TNL_VERTEX *v0 )
}
-void (*TAG(flush_tab)[GL_POLYGON+1])( GLcontext *, TNL_VERTEX * ) =
+void (*TAG(flush_tab)[GL_POLYGON+1])( struct gl_context *, TNL_VERTEX * ) =
{
TAG(flush_point),
TAG(flush_line_0),
diff --git a/src/mesa/tnl_dd/imm/t_dd_imm_vb.c b/src/mesa/tnl_dd/imm/t_dd_imm_vb.c
index 0c4462f556f..5081d92dbaf 100644
--- a/src/mesa/tnl_dd/imm/t_dd_imm_vb.c
+++ b/src/mesa/tnl_dd/imm/t_dd_imm_vb.c
@@ -113,7 +113,7 @@ do { \
/* Clip a line against the viewport and user clip planes.
*/
-static void TAG(clip_draw_line)( GLcontext *ctx,
+static void TAG(clip_draw_line)( struct gl_context *ctx,
TNL_VERTEX *I,
TNL_VERTEX *J,
GLuint mask )
@@ -140,7 +140,7 @@ static void TAG(clip_draw_line)( GLcontext *ctx,
/* Clip a triangle against the viewport and user clip planes.
*/
-static void TAG(clip_draw_triangle)( GLcontext *ctx,
+static void TAG(clip_draw_triangle)( struct gl_context *ctx,
TNL_VERTEX *v0,
TNL_VERTEX *v1,
TNL_VERTEX *v2,
@@ -173,7 +173,7 @@ static void TAG(clip_draw_triangle)( GLcontext *ctx,
}
-static __inline void TAG(draw_triangle)( GLcontext *ctx,
+static __inline void TAG(draw_triangle)( struct gl_context *ctx,
TNL_VERTEX *v0,
TNL_VERTEX *v1,
TNL_VERTEX *v2 )
@@ -188,7 +188,7 @@ static __inline void TAG(draw_triangle)( GLcontext *ctx,
}
}
-static __inline void TAG(draw_line)( GLcontext *ctx,
+static __inline void TAG(draw_line)( struct gl_context *ctx,
TNL_VERTEX *v0,
TNL_VERTEX *v1 )
{
diff --git a/src/mesa/tnl_dd/imm/t_dd_imm_vbtmp.h b/src/mesa/tnl_dd/imm/t_dd_imm_vbtmp.h
index 2f76553cff9..bb394622fa4 100644
--- a/src/mesa/tnl_dd/imm/t_dd_imm_vbtmp.h
+++ b/src/mesa/tnl_dd/imm/t_dd_imm_vbtmp.h
@@ -41,7 +41,7 @@
/* COPY_VERTEX_FROM_CURRENT in t_dd_imm_vapi.c
*/
-static void TAG(emit_vfmt)( GLcontext *ctx, VERTEX *v )
+static void TAG(emit_vfmt)( struct gl_context *ctx, VERTEX *v )
{
LOCALVARS
;
@@ -132,7 +132,7 @@ static void TAG(emit_vfmt)( GLcontext *ctx, VERTEX *v )
-static void TAG(interp)( GLcontext *ctx,
+static void TAG(interp)( struct gl_context *ctx,
GLfloat t,
TNL_VERTEX *dst,
TNL_VERTEX *in,
@@ -240,7 +240,7 @@ static void TAG(interp)( GLcontext *ctx,
}
-static __inline void TAG(copy_pv)( GLcontext *ctx,
+static __inline void TAG(copy_pv)( struct gl_context *ctx,
TNL_VERTEX *dst,
TNL_VERTEX *src )
{
diff --git a/src/mesa/tnl_dd/t_dd.c b/src/mesa/tnl_dd/t_dd.c
index 731da5c320d..214ebd4280a 100644
--- a/src/mesa/tnl_dd/t_dd.c
+++ b/src/mesa/tnl_dd/t_dd.c
@@ -26,7 +26,7 @@
* Keith Whitwell <[email protected]>
*/
-static void copy_pv_rgba4_spec5( GLcontext *ctx, GLuint edst, GLuint esrc )
+static void copy_pv_rgba4_spec5( struct gl_context *ctx, GLuint edst, GLuint esrc )
{
i810ContextPtr imesa = I810_CONTEXT( ctx );
GLubyte *i810verts = (GLubyte *)imesa->verts;
@@ -37,7 +37,7 @@ static void copy_pv_rgba4_spec5( GLcontext *ctx, GLuint edst, GLuint esrc )
dst->ui[5] = src->ui[5];
}
-static void copy_pv_rgba4( GLcontext *ctx, GLuint edst, GLuint esrc )
+static void copy_pv_rgba4( struct gl_context *ctx, GLuint edst, GLuint esrc )
{
i810ContextPtr imesa = I810_CONTEXT( ctx );
GLubyte *i810verts = (GLubyte *)imesa->verts;
@@ -47,7 +47,7 @@ static void copy_pv_rgba4( GLcontext *ctx, GLuint edst, GLuint esrc )
dst->ui[4] = src->ui[4];
}
-static void copy_pv_rgba3( GLcontext *ctx, GLuint edst, GLuint esrc )
+static void copy_pv_rgba3( struct gl_context *ctx, GLuint edst, GLuint esrc )
{
i810ContextPtr imesa = I810_CONTEXT( ctx );
GLubyte *i810verts = (GLubyte *)imesa->verts;
diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h
index 2424204b886..997fc0b20c1 100644
--- a/src/mesa/tnl_dd/t_dd_dmatmp.h
+++ b/src/mesa/tnl_dd/t_dd_dmatmp.h
@@ -73,7 +73,7 @@ do { \
#if (HAVE_ELTS)
-static void *TAG(emit_elts)( GLcontext *ctx, GLuint *elts, GLuint nr,
+static void *TAG(emit_elts)( struct gl_context *ctx, GLuint *elts, GLuint nr,
void *buf)
{
GLint i;
@@ -94,7 +94,7 @@ static void *TAG(emit_elts)( GLcontext *ctx, GLuint *elts, GLuint nr,
}
#endif
-static __inline void *TAG(emit_verts)( GLcontext *ctx, GLuint start,
+static __inline void *TAG(emit_verts)( struct gl_context *ctx, GLuint start,
GLuint count, void *buf )
{
return EMIT_VERTS(ctx, start, count, buf);
@@ -104,7 +104,7 @@ static __inline void *TAG(emit_verts)( GLcontext *ctx, GLuint start,
* Render non-indexed primitives.
***********************************************************************/
-static void TAG(render_points_verts)( GLcontext *ctx,
+static void TAG(render_points_verts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -133,7 +133,7 @@ static void TAG(render_points_verts)( GLcontext *ctx,
}
}
-static void TAG(render_lines_verts)( GLcontext *ctx,
+static void TAG(render_lines_verts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -169,7 +169,7 @@ static void TAG(render_lines_verts)( GLcontext *ctx,
}
-static void TAG(render_line_strip_verts)( GLcontext *ctx,
+static void TAG(render_line_strip_verts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -201,7 +201,7 @@ static void TAG(render_line_strip_verts)( GLcontext *ctx,
}
-static void TAG(render_line_loop_verts)( GLcontext *ctx,
+static void TAG(render_line_loop_verts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -267,7 +267,7 @@ static void TAG(render_line_loop_verts)( GLcontext *ctx,
}
-static void TAG(render_triangles_verts)( GLcontext *ctx,
+static void TAG(render_triangles_verts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -298,7 +298,7 @@ static void TAG(render_triangles_verts)( GLcontext *ctx,
-static void TAG(render_tri_strip_verts)( GLcontext *ctx,
+static void TAG(render_tri_strip_verts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -336,7 +336,7 @@ static void TAG(render_tri_strip_verts)( GLcontext *ctx,
}
}
-static void TAG(render_tri_fan_verts)( GLcontext *ctx,
+static void TAG(render_tri_fan_verts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -376,7 +376,7 @@ static void TAG(render_tri_fan_verts)( GLcontext *ctx,
}
-static void TAG(render_poly_verts)( GLcontext *ctx,
+static void TAG(render_poly_verts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -414,7 +414,7 @@ static void TAG(render_poly_verts)( GLcontext *ctx,
}
}
-static void TAG(render_quad_strip_verts)( GLcontext *ctx,
+static void TAG(render_quad_strip_verts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -540,7 +540,7 @@ static void TAG(render_quad_strip_verts)( GLcontext *ctx,
}
-static void TAG(render_quads_verts)( GLcontext *ctx,
+static void TAG(render_quads_verts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -649,7 +649,7 @@ static void TAG(render_quads_verts)( GLcontext *ctx,
}
}
-static void TAG(render_noop)( GLcontext *ctx,
+static void TAG(render_noop)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -680,7 +680,7 @@ static tnl_render_func TAG(render_tab_verts)[GL_POLYGON+2] =
****************************************************************************/
#if (HAVE_ELTS)
-static void TAG(render_points_elts)( GLcontext *ctx,
+static void TAG(render_points_elts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -712,7 +712,7 @@ static void TAG(render_points_elts)( GLcontext *ctx,
-static void TAG(render_lines_elts)( GLcontext *ctx,
+static void TAG(render_lines_elts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -749,7 +749,7 @@ static void TAG(render_lines_elts)( GLcontext *ctx,
}
-static void TAG(render_line_strip_elts)( GLcontext *ctx,
+static void TAG(render_line_strip_elts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -783,7 +783,7 @@ static void TAG(render_line_strip_elts)( GLcontext *ctx,
}
-static void TAG(render_line_loop_elts)( GLcontext *ctx,
+static void TAG(render_line_loop_elts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -855,7 +855,7 @@ static void TAG(render_line_loop_elts)( GLcontext *ctx,
* buffers. For elts, this is probably no better (worse?) than the
* standard path.
*/
-static void TAG(render_triangles_elts)( GLcontext *ctx,
+static void TAG(render_triangles_elts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -889,7 +889,7 @@ static void TAG(render_triangles_elts)( GLcontext *ctx,
-static void TAG(render_tri_strip_elts)( GLcontext *ctx,
+static void TAG(render_tri_strip_elts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -927,7 +927,7 @@ static void TAG(render_tri_strip_elts)( GLcontext *ctx,
}
}
-static void TAG(render_tri_fan_elts)( GLcontext *ctx,
+static void TAG(render_tri_fan_elts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -965,7 +965,7 @@ static void TAG(render_tri_fan_elts)( GLcontext *ctx,
}
-static void TAG(render_poly_elts)( GLcontext *ctx,
+static void TAG(render_poly_elts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -1003,7 +1003,7 @@ static void TAG(render_poly_elts)( GLcontext *ctx,
}
}
-static void TAG(render_quad_strip_elts)( GLcontext *ctx,
+static void TAG(render_quad_strip_elts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -1071,7 +1071,7 @@ static void TAG(render_quad_strip_elts)( GLcontext *ctx,
}
-static void TAG(render_quads_elts)( GLcontext *ctx,
+static void TAG(render_quads_elts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -1173,7 +1173,7 @@ static tnl_render_func TAG(render_tab_elts)[GL_POLYGON+2] =
/* Pre-check the primitives in the VB to prevent the need for
* fallbacks later on.
*/
-static GLboolean TAG(validate_render)( GLcontext *ctx,
+static GLboolean TAG(validate_render)( struct gl_context *ctx,
struct vertex_buffer *VB )
{
GLint i;
diff --git a/src/mesa/tnl_dd/t_dd_dmatmp2.h b/src/mesa/tnl_dd/t_dd_dmatmp2.h
index cd225b6343e..8836bde09f6 100644
--- a/src/mesa/tnl_dd/t_dd_dmatmp2.h
+++ b/src/mesa/tnl_dd/t_dd_dmatmp2.h
@@ -70,7 +70,7 @@ do { \
/**********************************************************************/
-static ELT_TYPE *TAG(emit_elts)( GLcontext *ctx,
+static ELT_TYPE *TAG(emit_elts)( struct gl_context *ctx,
ELT_TYPE *dest,
GLuint *elts, GLuint nr )
{
@@ -89,7 +89,7 @@ static ELT_TYPE *TAG(emit_elts)( GLcontext *ctx,
return dest;
}
-static ELT_TYPE *TAG(emit_consecutive_elts)( GLcontext *ctx,
+static ELT_TYPE *TAG(emit_consecutive_elts)( struct gl_context *ctx,
ELT_TYPE *dest,
GLuint start, GLuint nr )
{
@@ -114,7 +114,7 @@ static ELT_TYPE *TAG(emit_consecutive_elts)( GLcontext *ctx,
-static void TAG(render_points_verts)( GLcontext *ctx,
+static void TAG(render_points_verts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -126,7 +126,7 @@ static void TAG(render_points_verts)( GLcontext *ctx,
}
}
-static void TAG(render_lines_verts)( GLcontext *ctx,
+static void TAG(render_lines_verts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -150,7 +150,7 @@ static void TAG(render_lines_verts)( GLcontext *ctx,
}
-static void TAG(render_line_strip_verts)( GLcontext *ctx,
+static void TAG(render_line_strip_verts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -197,7 +197,7 @@ static void TAG(render_line_strip_verts)( GLcontext *ctx,
}
-static void TAG(render_line_loop_verts)( GLcontext *ctx,
+static void TAG(render_line_loop_verts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -286,7 +286,7 @@ static void TAG(render_line_loop_verts)( GLcontext *ctx,
}
-static void TAG(render_triangles_verts)( GLcontext *ctx,
+static void TAG(render_triangles_verts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -307,7 +307,7 @@ static void TAG(render_triangles_verts)( GLcontext *ctx,
-static void TAG(render_tri_strip_verts)( GLcontext *ctx,
+static void TAG(render_tri_strip_verts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -352,7 +352,7 @@ static void TAG(render_tri_strip_verts)( GLcontext *ctx,
EMIT_PRIM( ctx, GL_TRIANGLE_STRIP, HW_TRIANGLE_STRIP_0, start, count );
}
-static void TAG(render_tri_fan_verts)( GLcontext *ctx,
+static void TAG(render_tri_fan_verts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -395,7 +395,7 @@ static void TAG(render_tri_fan_verts)( GLcontext *ctx,
}
-static void TAG(render_poly_verts)( GLcontext *ctx,
+static void TAG(render_poly_verts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -409,7 +409,7 @@ static void TAG(render_poly_verts)( GLcontext *ctx,
EMIT_PRIM( ctx, GL_POLYGON, HW_POLYGON, start, count );
}
-static void TAG(render_quad_strip_verts)( GLcontext *ctx,
+static void TAG(render_quad_strip_verts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -460,7 +460,7 @@ static void TAG(render_quad_strip_verts)( GLcontext *ctx,
}
-static void TAG(render_quads_verts)( GLcontext *ctx,
+static void TAG(render_quads_verts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -509,7 +509,7 @@ static void TAG(render_quads_verts)( GLcontext *ctx,
}
}
-static void TAG(render_noop)( GLcontext *ctx,
+static void TAG(render_noop)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -539,7 +539,7 @@ static tnl_render_func TAG(render_tab_verts)[GL_POLYGON+2] =
* Render elts using hardware indexed verts *
****************************************************************************/
-static void TAG(render_points_elts)( GLcontext *ctx,
+static void TAG(render_points_elts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -563,7 +563,7 @@ static void TAG(render_points_elts)( GLcontext *ctx,
-static void TAG(render_lines_elts)( GLcontext *ctx,
+static void TAG(render_lines_elts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -602,7 +602,7 @@ static void TAG(render_lines_elts)( GLcontext *ctx,
}
-static void TAG(render_line_strip_elts)( GLcontext *ctx,
+static void TAG(render_line_strip_elts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -631,7 +631,7 @@ static void TAG(render_line_strip_elts)( GLcontext *ctx,
}
-static void TAG(render_line_loop_elts)( GLcontext *ctx,
+static void TAG(render_line_loop_elts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -683,7 +683,7 @@ static void TAG(render_line_loop_elts)( GLcontext *ctx,
}
-static void TAG(render_triangles_elts)( GLcontext *ctx,
+static void TAG(render_triangles_elts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -716,7 +716,7 @@ static void TAG(render_triangles_elts)( GLcontext *ctx,
-static void TAG(render_tri_strip_elts)( GLcontext *ctx,
+static void TAG(render_tri_strip_elts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -746,7 +746,7 @@ static void TAG(render_tri_strip_elts)( GLcontext *ctx,
}
}
-static void TAG(render_tri_fan_elts)( GLcontext *ctx,
+static void TAG(render_tri_fan_elts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -773,7 +773,7 @@ static void TAG(render_tri_fan_elts)( GLcontext *ctx,
}
-static void TAG(render_poly_elts)( GLcontext *ctx,
+static void TAG(render_poly_elts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -799,7 +799,7 @@ static void TAG(render_poly_elts)( GLcontext *ctx,
}
}
-static void TAG(render_quad_strip_elts)( GLcontext *ctx,
+static void TAG(render_quad_strip_elts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -861,7 +861,7 @@ static void TAG(render_quad_strip_elts)( GLcontext *ctx,
}
-static void TAG(render_quads_elts)( GLcontext *ctx,
+static void TAG(render_quads_elts)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
diff --git a/src/mesa/tnl_dd/t_dd_rendertmp.h b/src/mesa/tnl_dd/t_dd_rendertmp.h
index b9f030195d5..692b4d1fd73 100644
--- a/src/mesa/tnl_dd/t_dd_rendertmp.h
+++ b/src/mesa/tnl_dd/t_dd_rendertmp.h
@@ -63,7 +63,7 @@
#define RENDER_TAB_QUALIFIER static
#endif
-static void TAG(render_points)( GLcontext *ctx,
+static void TAG(render_points)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -77,7 +77,7 @@ static void TAG(render_points)( GLcontext *ctx,
POSTFIX;
}
-static void TAG(render_lines)( GLcontext *ctx,
+static void TAG(render_lines)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -96,7 +96,7 @@ static void TAG(render_lines)( GLcontext *ctx,
}
-static void TAG(render_line_strip)( GLcontext *ctx,
+static void TAG(render_line_strip)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -118,7 +118,7 @@ static void TAG(render_line_strip)( GLcontext *ctx,
}
-static void TAG(render_line_loop)( GLcontext *ctx,
+static void TAG(render_line_loop)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -150,7 +150,7 @@ static void TAG(render_line_loop)( GLcontext *ctx,
}
-static void TAG(render_triangles)( GLcontext *ctx,
+static void TAG(render_triangles)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -177,7 +177,7 @@ static void TAG(render_triangles)( GLcontext *ctx,
-static void TAG(render_tri_strip)( GLcontext *ctx,
+static void TAG(render_tri_strip)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -213,7 +213,7 @@ static void TAG(render_tri_strip)( GLcontext *ctx,
}
-static void TAG(render_tri_fan)( GLcontext *ctx,
+static void TAG(render_tri_fan)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -252,7 +252,7 @@ static void TAG(render_tri_fan)( GLcontext *ctx,
}
-static void TAG(render_poly)( GLcontext *ctx,
+static void TAG(render_poly)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -321,7 +321,7 @@ static void TAG(render_poly)( GLcontext *ctx,
POSTFIX;
}
-static void TAG(render_quads)( GLcontext *ctx,
+static void TAG(render_quads)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -346,7 +346,7 @@ static void TAG(render_quads)( GLcontext *ctx,
POSTFIX;
}
-static void TAG(render_quad_strip)( GLcontext *ctx,
+static void TAG(render_quad_strip)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -384,7 +384,7 @@ static void TAG(render_quad_strip)( GLcontext *ctx,
POSTFIX;
}
-static void TAG(render_noop)( GLcontext *ctx,
+static void TAG(render_noop)( struct gl_context *ctx,
GLuint start,
GLuint count,
GLuint flags )
@@ -392,7 +392,7 @@ static void TAG(render_noop)( GLcontext *ctx,
(void)(ctx && start && count && flags);
}
-RENDER_TAB_QUALIFIER void (*TAG(render_tab)[GL_POLYGON+2])(GLcontext *,
+RENDER_TAB_QUALIFIER void (*TAG(render_tab)[GL_POLYGON+2])(struct gl_context *,
GLuint,
GLuint,
GLuint) =
diff --git a/src/mesa/tnl_dd/t_dd_triemit.h b/src/mesa/tnl_dd/t_dd_triemit.h
index f5979ee9a75..39c9d26481b 100644
--- a/src/mesa/tnl_dd/t_dd_triemit.h
+++ b/src/mesa/tnl_dd/t_dd_triemit.h
@@ -136,7 +136,7 @@ static __inline void TAG(point)( CTX_ARG,
#endif
-static void TAG(fast_clipped_poly)( GLcontext *ctx, const GLuint *elts,
+static void TAG(fast_clipped_poly)( struct gl_context *ctx, const GLuint *elts,
GLuint n )
{
LOCAL_VARS
diff --git a/src/mesa/tnl_dd/t_dd_tritmp.h b/src/mesa/tnl_dd/t_dd_tritmp.h
index 2c36d845ab8..022f0c6c602 100644
--- a/src/mesa/tnl_dd/t_dd_tritmp.h
+++ b/src/mesa/tnl_dd/t_dd_tritmp.h
@@ -111,7 +111,7 @@
#endif
#if DO_TRI
-static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
+static void TAG(triangle)( struct gl_context *ctx, GLuint e0, GLuint e1, GLuint e2 )
{
struct vertex_buffer *VB = &TNL_CONTEXT( ctx )->vb;
VERTEX *v[3];
@@ -335,7 +335,7 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
#if DO_QUAD
#if DO_FULL_QUAD
-static void TAG(quadr)( GLcontext *ctx,
+static void TAG(quadr)( struct gl_context *ctx,
GLuint e0, GLuint e1, GLuint e2, GLuint e3 )
{
struct vertex_buffer *VB = &TNL_CONTEXT( ctx )->vb;
@@ -575,7 +575,7 @@ static void TAG(quadr)( GLcontext *ctx,
}
}
#else
-static void TAG(quadr)( GLcontext *ctx, GLuint e0,
+static void TAG(quadr)( struct gl_context *ctx, GLuint e0,
GLuint e1, GLuint e2, GLuint e3 )
{
if (DO_UNFILLED) {
@@ -597,7 +597,7 @@ static void TAG(quadr)( GLcontext *ctx, GLuint e0,
#endif
#if DO_LINE
-static void TAG(line)( GLcontext *ctx, GLuint e0, GLuint e1 )
+static void TAG(line)( struct gl_context *ctx, GLuint e0, GLuint e1 )
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
VERTEX *v[2];
@@ -628,7 +628,7 @@ static void TAG(line)( GLcontext *ctx, GLuint e0, GLuint e1 )
#endif
#if DO_POINTS
-static void TAG(points)( GLcontext *ctx, GLuint first, GLuint last )
+static void TAG(points)( struct gl_context *ctx, GLuint first, GLuint last )
{
struct vertex_buffer *VB = &TNL_CONTEXT( ctx )->vb;
GLuint i;
diff --git a/src/mesa/tnl_dd/t_dd_unfilled.h b/src/mesa/tnl_dd/t_dd_unfilled.h
index 9c467291a14..9856a36d6fb 100644
--- a/src/mesa/tnl_dd/t_dd_unfilled.h
+++ b/src/mesa/tnl_dd/t_dd_unfilled.h
@@ -32,7 +32,7 @@
#define VERT_RESTORE_SPEC( idx )
#endif
-static void TAG(unfilled_tri)( GLcontext *ctx,
+static void TAG(unfilled_tri)( struct gl_context *ctx,
GLenum mode,
GLuint e0, GLuint e1, GLuint e2 )
{
@@ -95,7 +95,7 @@ static void TAG(unfilled_tri)( GLcontext *ctx,
}
-static void TAG(unfilled_quad)( GLcontext *ctx,
+static void TAG(unfilled_quad)( struct gl_context *ctx,
GLenum mode,
GLuint e0, GLuint e1,
GLuint e2, GLuint e3 )
diff --git a/src/mesa/tnl_dd/t_dd_vb.c b/src/mesa/tnl_dd/t_dd_vb.c
index a8a0a69768d..543b0a56858 100644
--- a/src/mesa/tnl_dd/t_dd_vb.c
+++ b/src/mesa/tnl_dd/t_dd_vb.c
@@ -46,7 +46,7 @@
* really convenient to put them. Need to build some actual .o files in
* this directory?
*/
-static void copy_pv_rgba4_spec5( GLcontext *ctx, GLuint edst, GLuint esrc )
+static void copy_pv_rgba4_spec5( struct gl_context *ctx, GLuint edst, GLuint esrc )
{
LOCALVARS
GLubyte *verts = GET_VERTEX_STORE();
@@ -57,7 +57,7 @@ static void copy_pv_rgba4_spec5( GLcontext *ctx, GLuint edst, GLuint esrc )
dst[5] = src[5];
}
-static void copy_pv_rgba4( GLcontext *ctx, GLuint edst, GLuint esrc )
+static void copy_pv_rgba4( struct gl_context *ctx, GLuint edst, GLuint esrc )
{
LOCALVARS
GLubyte *verts = GET_VERTEX_STORE();
@@ -67,7 +67,7 @@ static void copy_pv_rgba4( GLcontext *ctx, GLuint edst, GLuint esrc )
dst[4] = src[4];
}
-static void copy_pv_rgba3( GLcontext *ctx, GLuint edst, GLuint esrc )
+static void copy_pv_rgba3( struct gl_context *ctx, GLuint edst, GLuint esrc )
{
LOCALVARS
GLubyte *verts = GET_VERTEX_STORE();
@@ -78,7 +78,7 @@ static void copy_pv_rgba3( GLcontext *ctx, GLuint edst, GLuint esrc )
}
-void TAG(translate_vertex)(GLcontext *ctx,
+void TAG(translate_vertex)(struct gl_context *ctx,
const VERTEX *src,
SWvertex *dst)
{
@@ -189,10 +189,10 @@ void TAG(translate_vertex)(GLcontext *ctx,
/* prototype to silence warning */
-void TAG(print_vertex)( GLcontext *ctx, const VERTEX *v );
+void TAG(print_vertex)( struct gl_context *ctx, const VERTEX *v );
-void TAG(print_vertex)( GLcontext *ctx, const VERTEX *v )
+void TAG(print_vertex)( struct gl_context *ctx, const VERTEX *v )
{
LOCALVARS
GLuint format = GET_VERTEX_FORMAT();
@@ -289,7 +289,7 @@ void TAG(print_vertex)( GLcontext *ctx, const VERTEX *v )
#define GET_COLOR(ptr, idx) ((ptr)->data[idx])
-INTERP_QUALIFIER void TAG(interp_extras)( GLcontext *ctx,
+INTERP_QUALIFIER void TAG(interp_extras)( struct gl_context *ctx,
GLfloat t,
GLuint dst, GLuint out, GLuint in,
GLboolean force_boundary )
@@ -320,7 +320,7 @@ INTERP_QUALIFIER void TAG(interp_extras)( GLcontext *ctx,
INTERP_VERTEX(ctx, t, dst, out, in, force_boundary);
}
-INTERP_QUALIFIER void TAG(copy_pv_extras)( GLcontext *ctx,
+INTERP_QUALIFIER void TAG(copy_pv_extras)( struct gl_context *ctx,
GLuint dst, GLuint src )
{
LOCALVARS
diff --git a/src/mesa/tnl_dd/t_dd_vbtmp.h b/src/mesa/tnl_dd/t_dd_vbtmp.h
index 85101b9ceb8..d19137b767c 100644
--- a/src/mesa/tnl_dd/t_dd_vbtmp.h
+++ b/src/mesa/tnl_dd/t_dd_vbtmp.h
@@ -117,7 +117,7 @@
#if (HAVE_HW_DIVIDE || DO_SPEC || DO_TEX0 || DO_FOG || !HAVE_TINY_VERTICES)
-static void TAG(emit)( GLcontext *ctx,
+static void TAG(emit)( struct gl_context *ctx,
GLuint start, GLuint end,
void *dest,
GLuint stride )
@@ -338,7 +338,7 @@ static void TAG(emit)( GLcontext *ctx,
#error "cannot use tiny vertices with hw perspective divide"
#endif
-static void TAG(emit)( GLcontext *ctx, GLuint start, GLuint end,
+static void TAG(emit)( struct gl_context *ctx, GLuint start, GLuint end,
void *dest, GLuint stride )
{
LOCALVARS
@@ -403,7 +403,7 @@ static void TAG(emit)( GLcontext *ctx, GLuint start, GLuint end,
#if (HAVE_PTEX_VERTICES)
-static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
+static GLboolean TAG(check_tex_sizes)( struct gl_context *ctx )
{
LOCALVARS
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
@@ -431,7 +431,7 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
return GL_TRUE;
}
#else
-static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
+static GLboolean TAG(check_tex_sizes)( struct gl_context *ctx )
{
LOCALVARS
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
@@ -472,7 +472,7 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
#endif /* ptex */
-static void TAG(interp)( GLcontext *ctx,
+static void TAG(interp)( struct gl_context *ctx,
GLfloat t,
GLuint edst, GLuint eout, GLuint ein,
GLboolean force_boundary )
diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h
index 07d31f6ce36..7b8da8eb843 100644
--- a/src/mesa/vbo/vbo.h
+++ b/src/mesa/vbo/vbo.h
@@ -61,12 +61,12 @@ struct _mesa_index_buffer {
-GLboolean _vbo_CreateContext( GLcontext *ctx );
-void _vbo_DestroyContext( GLcontext *ctx );
-void _vbo_InvalidateState( GLcontext *ctx, GLuint new_state );
+GLboolean _vbo_CreateContext( struct gl_context *ctx );
+void _vbo_DestroyContext( struct gl_context *ctx );
+void _vbo_InvalidateState( struct gl_context *ctx, GLuint new_state );
-typedef void (*vbo_draw_func)( GLcontext *ctx,
+typedef void (*vbo_draw_func)( struct gl_context *ctx,
const struct gl_client_array **arrays,
const struct _mesa_prim *prims,
GLuint nr_prims,
@@ -92,7 +92,7 @@ struct split_limits {
};
-void vbo_split_prims( GLcontext *ctx,
+void vbo_split_prims( struct gl_context *ctx,
const struct gl_client_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
@@ -106,8 +106,9 @@ void vbo_split_prims( GLcontext *ctx,
/* Helpers for dealing translating away non-zero min_index.
*/
GLboolean vbo_all_varyings_in_vbos( const struct gl_client_array *arrays[] );
+GLboolean vbo_any_varyings_in_vbos( const struct gl_client_array *arrays[] );
-void vbo_rebase_prims( GLcontext *ctx,
+void vbo_rebase_prims( struct gl_context *ctx,
const struct gl_client_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
@@ -116,14 +117,14 @@ void vbo_rebase_prims( GLcontext *ctx,
GLuint max_index,
vbo_draw_func draw );
void
-vbo_get_minmax_index(GLcontext *ctx, const struct _mesa_prim *prim,
+vbo_get_minmax_index(struct gl_context *ctx, const struct _mesa_prim *prim,
const struct _mesa_index_buffer *ib,
GLuint *min_index, GLuint *max_index);
-void vbo_use_buffer_objects(GLcontext *ctx);
+void vbo_use_buffer_objects(struct gl_context *ctx);
-void vbo_set_draw_func(GLcontext *ctx, vbo_draw_func func);
+void vbo_set_draw_func(struct gl_context *ctx, vbo_draw_func func);
void GLAPIENTRY
diff --git a/src/mesa/vbo/vbo_context.c b/src/mesa/vbo/vbo_context.c
index 580850574c9..9992cc34739 100644
--- a/src/mesa/vbo/vbo_context.c
+++ b/src/mesa/vbo/vbo_context.c
@@ -49,7 +49,7 @@ static GLuint check_size( const GLfloat *attr )
}
-static void init_legacy_currval(GLcontext *ctx)
+static void init_legacy_currval(struct gl_context *ctx)
{
struct vbo_context *vbo = vbo_context(ctx);
struct gl_client_array *arrays = vbo->legacy_currval;
@@ -78,7 +78,7 @@ static void init_legacy_currval(GLcontext *ctx)
}
-static void init_generic_currval(GLcontext *ctx)
+static void init_generic_currval(struct gl_context *ctx)
{
struct vbo_context *vbo = vbo_context(ctx);
struct gl_client_array *arrays = vbo->generic_currval;
@@ -104,7 +104,7 @@ static void init_generic_currval(GLcontext *ctx)
}
-static void init_mat_currval(GLcontext *ctx)
+static void init_mat_currval(struct gl_context *ctx)
{
struct vbo_context *vbo = vbo_context(ctx);
struct gl_client_array *arrays = vbo->mat_currval;
@@ -149,7 +149,7 @@ static void init_mat_currval(GLcontext *ctx)
}
-GLboolean _vbo_CreateContext( GLcontext *ctx )
+GLboolean _vbo_CreateContext( struct gl_context *ctx )
{
struct vbo_context *vbo = CALLOC_STRUCT(vbo_context);
@@ -207,14 +207,14 @@ GLboolean _vbo_CreateContext( GLcontext *ctx )
}
-void _vbo_InvalidateState( GLcontext *ctx, GLuint new_state )
+void _vbo_InvalidateState( struct gl_context *ctx, GLuint new_state )
{
_ae_invalidate_state(ctx, new_state);
vbo_exec_invalidate_state(ctx, new_state);
}
-void _vbo_DestroyContext( GLcontext *ctx )
+void _vbo_DestroyContext( struct gl_context *ctx )
{
struct vbo_context *vbo = vbo_context(ctx);
@@ -239,7 +239,7 @@ void _vbo_DestroyContext( GLcontext *ctx )
}
-void vbo_set_draw_func(GLcontext *ctx, vbo_draw_func func)
+void vbo_set_draw_func(struct gl_context *ctx, vbo_draw_func func)
{
struct vbo_context *vbo = vbo_context(ctx);
vbo->draw_prims = func;
diff --git a/src/mesa/vbo/vbo_context.h b/src/mesa/vbo/vbo_context.h
index 00cfc522a0d..8d6f2a7ce6d 100644
--- a/src/mesa/vbo/vbo_context.h
+++ b/src/mesa/vbo/vbo_context.h
@@ -85,7 +85,7 @@ struct vbo_context {
};
-static INLINE struct vbo_context *vbo_context(GLcontext *ctx)
+static INLINE struct vbo_context *vbo_context(struct gl_context *ctx)
{
return (struct vbo_context *)(ctx->swtnl_im);
}
@@ -96,7 +96,7 @@ static INLINE struct vbo_context *vbo_context(GLcontext *ctx)
* vertex transformation, an NV vertex program or ARB vertex program/shader.
*/
static INLINE enum vp_mode
-get_program_mode( GLcontext *ctx )
+get_program_mode( struct gl_context *ctx )
{
if (!ctx->VertexProgram._Current)
return VP_NONE;
diff --git a/src/mesa/vbo/vbo_exec.c b/src/mesa/vbo/vbo_exec.c
index 046fa8105ba..e8d5b39b3f4 100644
--- a/src/mesa/vbo/vbo_exec.c
+++ b/src/mesa/vbo/vbo_exec.c
@@ -34,7 +34,7 @@
-void vbo_exec_init( GLcontext *ctx )
+void vbo_exec_init( struct gl_context *ctx )
{
struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
@@ -62,7 +62,7 @@ void vbo_exec_init( GLcontext *ctx )
}
-void vbo_exec_destroy( GLcontext *ctx )
+void vbo_exec_destroy( struct gl_context *ctx )
{
struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
@@ -81,7 +81,7 @@ void vbo_exec_destroy( GLcontext *ctx )
* invoked according to the state flags. That will have to wait for a
* mesa rework:
*/
-void vbo_exec_invalidate_state( GLcontext *ctx, GLuint new_state )
+void vbo_exec_invalidate_state( struct gl_context *ctx, GLuint new_state )
{
struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
diff --git a/src/mesa/vbo/vbo_exec.h b/src/mesa/vbo/vbo_exec.h
index 33494f0cead..47e51f09c94 100644
--- a/src/mesa/vbo/vbo_exec.h
+++ b/src/mesa/vbo/vbo_exec.h
@@ -79,7 +79,7 @@ typedef void (*vbo_attrfv_func)( const GLfloat * );
struct vbo_exec_context
{
- GLcontext *ctx;
+ struct gl_context *ctx;
GLvertexformat vtxfmt;
struct {
@@ -148,13 +148,13 @@ struct vbo_exec_context
/* External API:
*/
-void vbo_exec_init( GLcontext *ctx );
-void vbo_exec_destroy( GLcontext *ctx );
-void vbo_exec_invalidate_state( GLcontext *ctx, GLuint new_state );
-void vbo_exec_FlushVertices_internal( GLcontext *ctx, GLboolean unmap );
+void vbo_exec_init( struct gl_context *ctx );
+void vbo_exec_destroy( struct gl_context *ctx );
+void vbo_exec_invalidate_state( struct gl_context *ctx, GLuint new_state );
+void vbo_exec_FlushVertices_internal( struct gl_context *ctx, GLboolean unmap );
-void vbo_exec_BeginVertices( GLcontext *ctx );
-void vbo_exec_FlushVertices( GLcontext *ctx, GLuint flags );
+void vbo_exec_BeginVertices( struct gl_context *ctx );
+void vbo_exec_FlushVertices( struct gl_context *ctx, GLuint flags );
/* Internal functions:
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index 9df75a84065..1ef49174193 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -142,7 +142,7 @@ void vbo_exec_vtx_wrap( struct vbo_exec_context *exec )
*/
static void vbo_exec_copy_to_current( struct vbo_exec_context *exec )
{
- GLcontext *ctx = exec->ctx;
+ struct gl_context *ctx = exec->ctx;
struct vbo_context *vbo = vbo_context(ctx);
GLuint i;
@@ -193,7 +193,7 @@ static void vbo_exec_copy_to_current( struct vbo_exec_context *exec )
static void vbo_exec_copy_from_current( struct vbo_exec_context *exec )
{
- GLcontext *ctx = exec->ctx;
+ struct gl_context *ctx = exec->ctx;
struct vbo_context *vbo = vbo_context(ctx);
GLint i;
@@ -217,7 +217,7 @@ static void vbo_exec_wrap_upgrade_vertex( struct vbo_exec_context *exec,
GLuint attr,
GLuint newsz )
{
- GLcontext *ctx = exec->ctx;
+ struct gl_context *ctx = exec->ctx;
struct vbo_context *vbo = vbo_context(ctx);
GLint lastcount = exec->vtx.vert_count;
GLfloat *tmp;
@@ -318,7 +318,7 @@ static void vbo_exec_wrap_upgrade_vertex( struct vbo_exec_context *exec,
}
-static void vbo_exec_fixup_vertex( GLcontext *ctx,
+static void vbo_exec_fixup_vertex( struct gl_context *ctx,
GLuint attr, GLuint sz )
{
struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
@@ -358,10 +358,12 @@ static void vbo_exec_fixup_vertex( GLcontext *ctx,
#define ATTR( A, N, V0, V1, V2, V3 ) \
do { \
struct vbo_exec_context *exec = &vbo_context(ctx)->exec; \
- \
- if (exec->vtx.active_sz[A] != N) \
- vbo_exec_fixup_vertex(ctx, A, N); \
- \
+ \
+ if (unlikely(!(exec->ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT))) \
+ ctx->Driver.BeginVertices( ctx ); \
+ if (unlikely(exec->vtx.active_sz[A] != N)) \
+ vbo_exec_fixup_vertex(ctx, A, N); \
+ \
{ \
GLfloat *dest = exec->vtx.attrptr[A]; \
if (N>0) dest[0] = V0; \
@@ -566,6 +568,28 @@ static void GLAPIENTRY vbo_exec_End( void )
}
+/**
+ * Called via glPrimitiveRestartNV()
+ */
+static void GLAPIENTRY
+vbo_exec_PrimitiveRestartNV(void)
+{
+ GLenum curPrim;
+ GET_CURRENT_CONTEXT( ctx );
+
+ curPrim = ctx->Driver.CurrentExecPrimitive;
+
+ if (curPrim == PRIM_OUTSIDE_BEGIN_END) {
+ _mesa_error( ctx, GL_INVALID_OPERATION, "glPrimitiveRestartNV" );
+ }
+ else {
+ vbo_exec_End();
+ vbo_exec_Begin(curPrim);
+ }
+}
+
+
+
static void vbo_exec_vtxfmt_init( struct vbo_exec_context *exec )
{
GLvertexformat *vfmt = &exec->vtxfmt;
@@ -574,6 +598,7 @@ static void vbo_exec_vtxfmt_init( struct vbo_exec_context *exec )
vfmt->Begin = vbo_exec_Begin;
vfmt->End = vbo_exec_End;
+ vfmt->PrimitiveRestartNV = vbo_exec_PrimitiveRestartNV;
_MESA_INIT_DLIST_VTXFMT(vfmt, _mesa_);
_MESA_INIT_EVAL_VTXFMT(vfmt, vbo_exec_);
@@ -740,7 +765,7 @@ static void vbo_exec_vtxfmt_init( struct vbo_exec_context *exec )
* This replaces the malloced buffer which was created in
* vb_exec_vtx_init() below.
*/
-void vbo_use_buffer_objects(GLcontext *ctx)
+void vbo_use_buffer_objects(struct gl_context *ctx)
{
struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
/* Any buffer name but 0 can be used here since this bufferobj won't
@@ -769,7 +794,7 @@ void vbo_use_buffer_objects(GLcontext *ctx)
void vbo_exec_vtx_init( struct vbo_exec_context *exec )
{
- GLcontext *ctx = exec->ctx;
+ struct gl_context *ctx = exec->ctx;
struct vbo_context *vbo = vbo_context(ctx);
GLuint i;
@@ -827,7 +852,7 @@ void vbo_exec_vtx_init( struct vbo_exec_context *exec )
void vbo_exec_vtx_destroy( struct vbo_exec_context *exec )
{
/* using a real VBO for vertex data */
- GLcontext *ctx = exec->ctx;
+ struct gl_context *ctx = exec->ctx;
unsigned i;
/* True VBOs should already be unmapped
@@ -858,7 +883,7 @@ void vbo_exec_vtx_destroy( struct vbo_exec_context *exec )
_mesa_reference_buffer_object(ctx, &exec->vtx.bufferobj, NULL);
}
-void vbo_exec_BeginVertices( GLcontext *ctx )
+void vbo_exec_BeginVertices( struct gl_context *ctx )
{
struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
if (0) printf("%s\n", __FUNCTION__);
@@ -868,7 +893,7 @@ void vbo_exec_BeginVertices( GLcontext *ctx )
exec->ctx->Driver.NeedFlush |= FLUSH_UPDATE_CURRENT;
}
-void vbo_exec_FlushVertices_internal( GLcontext *ctx, GLboolean unmap )
+void vbo_exec_FlushVertices_internal( struct gl_context *ctx, GLboolean unmap )
{
struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
@@ -886,7 +911,7 @@ void vbo_exec_FlushVertices_internal( GLcontext *ctx, GLboolean unmap )
/**
* \param flags bitmask of FLUSH_STORED_VERTICES, FLUSH_UPDATE_CURRENT
*/
-void vbo_exec_FlushVertices( GLcontext *ctx, GLuint flags )
+void vbo_exec_FlushVertices( struct gl_context *ctx, GLuint flags )
{
struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
@@ -911,10 +936,8 @@ void vbo_exec_FlushVertices( GLcontext *ctx, GLuint flags )
/* Need to do this to ensure BeginVertices gets called again:
*/
- if (exec->ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT) {
- _mesa_restore_exec_vtxfmt( ctx );
+ if (exec->ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT)
exec->ctx->Driver.NeedFlush &= ~FLUSH_UPDATE_CURRENT;
- }
exec->ctx->Driver.NeedFlush &= ~flags;
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index 1759e578870..dd36cc32a70 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -41,16 +41,20 @@
/**
* Compute min and max elements by scanning the index buffer for
* glDraw[Range]Elements() calls.
+ * If primitive restart is enabled, we need to ignore restart
+ * indexes when computing min/max.
*/
void
-vbo_get_minmax_index(GLcontext *ctx,
+vbo_get_minmax_index(struct gl_context *ctx,
const struct _mesa_prim *prim,
const struct _mesa_index_buffer *ib,
GLuint *min_index, GLuint *max_index)
{
- GLuint i;
- GLuint count = prim->count;
+ const GLboolean restart = ctx->Array.PrimitiveRestart;
+ const GLuint restartIndex = ctx->Array.RestartIndex;
+ const GLuint count = prim->count;
const void *indices;
+ GLuint i;
if (_mesa_is_bufferobj(ib->obj)) {
const GLvoid *map =
@@ -64,11 +68,21 @@ vbo_get_minmax_index(GLcontext *ctx,
switch (ib->type) {
case GL_UNSIGNED_INT: {
const GLuint *ui_indices = (const GLuint *)indices;
- GLuint max_ui = ui_indices[count-1];
- GLuint min_ui = ui_indices[0];
- for (i = 0; i < count; i++) {
- if (ui_indices[i] > max_ui) max_ui = ui_indices[i];
- if (ui_indices[i] < min_ui) min_ui = ui_indices[i];
+ GLuint max_ui = 0;
+ GLuint min_ui = ~0U;
+ if (restart) {
+ for (i = 0; i < count; i++) {
+ if (ui_indices[i] != restartIndex) {
+ if (ui_indices[i] > max_ui) max_ui = ui_indices[i];
+ if (ui_indices[i] < min_ui) min_ui = ui_indices[i];
+ }
+ }
+ }
+ else {
+ for (i = 0; i < count; i++) {
+ if (ui_indices[i] > max_ui) max_ui = ui_indices[i];
+ if (ui_indices[i] < min_ui) min_ui = ui_indices[i];
+ }
}
*min_index = min_ui;
*max_index = max_ui;
@@ -76,11 +90,21 @@ vbo_get_minmax_index(GLcontext *ctx,
}
case GL_UNSIGNED_SHORT: {
const GLushort *us_indices = (const GLushort *)indices;
- GLuint max_us = us_indices[count-1];
- GLuint min_us = us_indices[0];
- for (i = 0; i < count; i++) {
- if (us_indices[i] > max_us) max_us = us_indices[i];
- if (us_indices[i] < min_us) min_us = us_indices[i];
+ GLuint max_us = 0;
+ GLuint min_us = ~0U;
+ if (restart) {
+ for (i = 0; i < count; i++) {
+ if (us_indices[i] != restartIndex) {
+ if (us_indices[i] > max_us) max_us = us_indices[i];
+ if (us_indices[i] < min_us) min_us = us_indices[i];
+ }
+ }
+ }
+ else {
+ for (i = 0; i < count; i++) {
+ if (us_indices[i] > max_us) max_us = us_indices[i];
+ if (us_indices[i] < min_us) min_us = us_indices[i];
+ }
}
*min_index = min_us;
*max_index = max_us;
@@ -88,11 +112,21 @@ vbo_get_minmax_index(GLcontext *ctx,
}
case GL_UNSIGNED_BYTE: {
const GLubyte *ub_indices = (const GLubyte *)indices;
- GLuint max_ub = ub_indices[count-1];
- GLuint min_ub = ub_indices[0];
- for (i = 0; i < count; i++) {
- if (ub_indices[i] > max_ub) max_ub = ub_indices[i];
- if (ub_indices[i] < min_ub) min_ub = ub_indices[i];
+ GLuint max_ub = 0;
+ GLuint min_ub = ~0U;
+ if (restart) {
+ for (i = 0; i < count; i++) {
+ if (ub_indices[i] != restartIndex) {
+ if (ub_indices[i] > max_ub) max_ub = ub_indices[i];
+ if (ub_indices[i] < min_ub) min_ub = ub_indices[i];
+ }
+ }
+ }
+ else {
+ for (i = 0; i < count; i++) {
+ if (ub_indices[i] > max_ub) max_ub = ub_indices[i];
+ if (ub_indices[i] < min_ub) min_ub = ub_indices[i];
+ }
}
*min_index = min_ub;
*max_index = max_ub;
@@ -115,7 +149,7 @@ vbo_get_minmax_index(GLcontext *ctx,
* For debugging purposes; not normally used.
*/
static void
-check_array_data(GLcontext *ctx, struct gl_client_array *array,
+check_array_data(struct gl_context *ctx, struct gl_client_array *array,
GLuint attrib, GLuint j)
{
if (array->Enabled) {
@@ -161,7 +195,7 @@ check_array_data(GLcontext *ctx, struct gl_client_array *array,
* Unmap the buffer object referenced by given array, if mapped.
*/
static void
-unmap_array_buffer(GLcontext *ctx, struct gl_client_array *array)
+unmap_array_buffer(struct gl_context *ctx, struct gl_client_array *array)
{
if (array->Enabled &&
_mesa_is_bufferobj(array->BufferObj) &&
@@ -176,7 +210,7 @@ unmap_array_buffer(GLcontext *ctx, struct gl_client_array *array)
* For debug purposes; not normally used.
*/
static void
-check_draw_elements_data(GLcontext *ctx, GLsizei count, GLenum elemType,
+check_draw_elements_data(struct gl_context *ctx, GLsizei count, GLenum elemType,
const void *elements, GLint basevertex)
{
struct gl_array_object *arrayObj = ctx->Array.ArrayObj;
@@ -244,7 +278,7 @@ check_draw_elements_data(GLcontext *ctx, GLsizei count, GLenum elemType,
* Check array data, looking for NaNs, etc.
*/
static void
-check_draw_arrays_data(GLcontext *ctx, GLint start, GLsizei count)
+check_draw_arrays_data(struct gl_context *ctx, GLint start, GLsizei count)
{
/* TO DO */
}
@@ -254,9 +288,11 @@ check_draw_arrays_data(GLcontext *ctx, GLint start, GLsizei count)
* Print info/data for glDrawArrays(), for debugging.
*/
static void
-print_draw_arrays(GLcontext *ctx, struct vbo_exec_context *exec,
+print_draw_arrays(struct gl_context *ctx,
GLenum mode, GLint start, GLsizei count)
{
+ struct vbo_context *vbo = vbo_context(ctx);
+ struct vbo_exec_context *exec = &vbo->exec;
int i;
printf("vbo_exec_DrawArrays(mode 0x%x, start %d, count %d):\n",
@@ -303,7 +339,7 @@ print_draw_arrays(GLcontext *ctx, struct vbo_exec_context *exec,
* Just translate the arrayobj into a sane layout.
*/
static void
-bind_array_obj(GLcontext *ctx)
+bind_array_obj(struct gl_context *ctx)
{
struct vbo_context *vbo = vbo_context(ctx);
struct vbo_exec_context *exec = &vbo->exec;
@@ -348,7 +384,7 @@ bind_array_obj(GLcontext *ctx)
* to point at a zero-stride current value "array".
*/
static void
-recalculate_input_bindings(GLcontext *ctx)
+recalculate_input_bindings(struct gl_context *ctx)
{
struct vbo_context *vbo = vbo_context(ctx);
struct vbo_exec_context *exec = &vbo->exec;
@@ -464,13 +500,97 @@ recalculate_input_bindings(GLcontext *ctx)
* must be done after this call.
*/
static void
-bind_arrays(GLcontext *ctx)
+bind_arrays(struct gl_context *ctx)
{
bind_array_obj(ctx);
recalculate_input_bindings(ctx);
}
+/**
+ * Helper function called by the other DrawArrays() functions below.
+ * This is where we handle primitive restart for drawing non-indexed
+ * arrays. If primitive restart is enabled, it typically means
+ * splitting one DrawArrays() into two.
+ */
+static void
+vbo_draw_arrays(struct gl_context *ctx, GLenum mode, GLint start,
+ GLsizei count, GLuint numInstances)
+{
+ struct vbo_context *vbo = vbo_context(ctx);
+ struct vbo_exec_context *exec = &vbo->exec;
+ struct _mesa_prim prim[2];
+
+ bind_arrays(ctx);
+
+ /* Again... because we may have changed the bitmask of per-vertex varying
+ * attributes. If we regenerate the fixed-function vertex program now
+ * we may be able to prune down the number of vertex attributes which we
+ * need in the shader.
+ */
+ if (ctx->NewState)
+ _mesa_update_state(ctx);
+
+ prim[0].begin = 1;
+ prim[0].end = 1;
+ prim[0].weak = 0;
+ prim[0].pad = 0;
+ prim[0].mode = mode;
+ prim[0].start = 0; /* filled in below */
+ prim[0].count = 0; /* filled in below */
+ prim[0].indexed = 0;
+ prim[0].basevertex = 0;
+ prim[0].num_instances = numInstances;
+
+ /* Implement the primitive restart index */
+ if (ctx->Array.PrimitiveRestart && ctx->Array.RestartIndex < count) {
+ GLuint primCount = 0;
+
+ if (ctx->Array.RestartIndex == start) {
+ /* special case: RestartIndex at beginning */
+ if (count > 1) {
+ prim[0].start = start + 1;
+ prim[0].count = count - 1;
+ primCount = 1;
+ }
+ }
+ else if (ctx->Array.RestartIndex == start + count - 1) {
+ /* special case: RestartIndex at end */
+ if (count > 1) {
+ prim[0].start = start;
+ prim[0].count = count - 1;
+ primCount = 1;
+ }
+ }
+ else {
+ /* general case: RestartIndex in middle, split into two prims */
+ prim[0].start = start;
+ prim[0].count = ctx->Array.RestartIndex - start;
+
+ prim[1] = prim[0];
+ prim[1].start = ctx->Array.RestartIndex + 1;
+ prim[1].count = count - prim[1].start;
+
+ primCount = 2;
+ }
+
+ if (primCount > 0) {
+ /* draw one or two prims */
+ vbo->draw_prims(ctx, exec->array.inputs, prim, primCount, NULL,
+ GL_TRUE, start, start + count - 1);
+ }
+ }
+ else {
+ /* no prim restart */
+ prim[0].start = start;
+ prim[0].count = count;
+
+ vbo->draw_prims(ctx, exec->array.inputs, prim, 1, NULL,
+ GL_TRUE, start, start + count - 1);
+ }
+}
+
+
/**
* Called from glDrawArrays when in immediate mode (not display list mode).
@@ -479,9 +599,6 @@ static void GLAPIENTRY
vbo_exec_DrawArrays(GLenum mode, GLint start, GLsizei count)
{
GET_CURRENT_CONTEXT(ctx);
- struct vbo_context *vbo = vbo_context(ctx);
- struct vbo_exec_context *exec = &vbo->exec;
- struct _mesa_prim prim[1];
if (MESA_VERBOSE & VERBOSE_DRAW)
_mesa_debug(ctx, "glDrawArrays(%s, %d, %d)\n",
@@ -496,41 +613,13 @@ vbo_exec_DrawArrays(GLenum mode, GLint start, GLsizei count)
return;
}
-#if 0
- check_draw_arrays_data(ctx, start, count);
-#else
- (void) check_draw_arrays_data;
-#endif
-
- bind_arrays( ctx );
-
- /* Again... because we may have changed the bitmask of per-vertex varying
- * attributes. If we regenerate the fixed-function vertex program now
- * we may be able to prune down the number of vertex attributes which we
- * need in the shader.
- */
- if (ctx->NewState)
- _mesa_update_state( ctx );
-
- prim[0].begin = 1;
- prim[0].end = 1;
- prim[0].weak = 0;
- prim[0].pad = 0;
- prim[0].mode = mode;
- prim[0].start = start;
- prim[0].count = count;
- prim[0].indexed = 0;
- prim[0].basevertex = 0;
- prim[0].num_instances = 1;
+ if (0)
+ check_draw_arrays_data(ctx, start, count);
- vbo->draw_prims( ctx, exec->array.inputs, prim, 1, NULL,
- GL_TRUE, start, start + count - 1 );
+ vbo_draw_arrays(ctx, mode, start, count, 1);
-#if 0
- print_draw_arrays(ctx, exec, mode, start, count);
-#else
- (void) print_draw_arrays;
-#endif
+ if (0)
+ print_draw_arrays(ctx, mode, start, count);
}
@@ -543,9 +632,6 @@ vbo_exec_DrawArraysInstanced(GLenum mode, GLint start, GLsizei count,
GLsizei primcount)
{
GET_CURRENT_CONTEXT(ctx);
- struct vbo_context *vbo = vbo_context(ctx);
- struct vbo_exec_context *exec = &vbo->exec;
- struct _mesa_prim prim[1];
if (MESA_VERBOSE & VERBOSE_DRAW)
_mesa_debug(ctx, "glDrawArraysInstanced(%s, %d, %d, %d)\n",
@@ -560,37 +646,13 @@ vbo_exec_DrawArraysInstanced(GLenum mode, GLint start, GLsizei count,
return;
}
-#if 0 /* debug */
- check_draw_arrays_data(ctx, start, count);
-#endif
+ if (0)
+ check_draw_arrays_data(ctx, start, count);
- bind_arrays( ctx );
+ vbo_draw_arrays(ctx, mode, start, count, primcount);
- /* Again... because we may have changed the bitmask of per-vertex varying
- * attributes. If we regenerate the fixed-function vertex program now
- * we may be able to prune down the number of vertex attributes which we
- * need in the shader.
- */
- if (ctx->NewState)
- _mesa_update_state( ctx );
-
- prim[0].begin = 1;
- prim[0].end = 1;
- prim[0].weak = 0;
- prim[0].pad = 0;
- prim[0].mode = mode;
- prim[0].start = start;
- prim[0].count = count;
- prim[0].indexed = 0;
- prim[0].basevertex = 0;
- prim[0].num_instances = primcount;
-
- vbo->draw_prims( ctx, exec->array.inputs, prim, 1, NULL,
- GL_TRUE, start, start + count - 1 );
-
-#if 0 /* debug */
- print_draw_arrays(ctx, exec, mode, start, count);
-#endif
+ if (0)
+ print_draw_arrays(ctx, mode, start, count);
}
@@ -599,7 +661,7 @@ vbo_exec_DrawArraysInstanced(GLenum mode, GLint start, GLsizei count,
* For debugging.
*/
static void
-dump_element_buffer(GLcontext *ctx, GLenum type)
+dump_element_buffer(struct gl_context *ctx, GLenum type)
{
const GLvoid *map = ctx->Driver.MapBuffer(ctx,
GL_ELEMENT_ARRAY_BUFFER_ARB,
@@ -657,7 +719,7 @@ dump_element_buffer(GLcontext *ctx, GLenum type)
* we've validated buffer bounds, etc.
*/
static void
-vbo_validated_drawrangeelements(GLcontext *ctx, GLenum mode,
+vbo_validated_drawrangeelements(struct gl_context *ctx, GLenum mode,
GLboolean index_bounds_valid,
GLuint start, GLuint end,
GLsizei count, GLenum type,
@@ -939,7 +1001,7 @@ vbo_exec_DrawElementsInstanced(GLenum mode, GLsizei count, GLenum type,
* This does the actual rendering after we've checked array indexes, etc.
*/
static void
-vbo_validated_multidrawelements(GLcontext *ctx, GLenum mode,
+vbo_validated_multidrawelements(struct gl_context *ctx, GLenum mode,
const GLsizei *count, GLenum type,
const GLvoid **indices, GLsizei primcount,
const GLint *basevertex)
@@ -1003,6 +1065,8 @@ vbo_validated_multidrawelements(GLcontext *ctx, GLenum mode,
/* Check if we can handle this thing as a bunch of index offsets from the
* same index pointer. If we can't, then we have to fall back to doing
* a draw_prims per primitive.
+ * Check that the difference between each prim's indexes is a multiple of
+ * the index/element size.
*/
if (index_type_size != 1) {
for (i = 0; i < primcount; i++) {
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c
index 84ae1b87f93..71ac0066cac 100644
--- a/src/mesa/vbo/vbo_exec_draw.c
+++ b/src/mesa/vbo/vbo_exec_draw.c
@@ -154,7 +154,7 @@ vbo_copy_vertices( struct vbo_exec_context *exec )
/* TODO: populate these as the vertex is defined:
*/
static void
-vbo_exec_bind_arrays( GLcontext *ctx )
+vbo_exec_bind_arrays( struct gl_context *ctx )
{
struct vbo_context *vbo = vbo_context(ctx);
struct vbo_exec_context *exec = &vbo->exec;
@@ -260,7 +260,7 @@ vbo_exec_vtx_unmap( struct vbo_exec_context *exec )
GLenum target = GL_ARRAY_BUFFER_ARB;
if (_mesa_is_bufferobj(exec->vtx.bufferobj)) {
- GLcontext *ctx = exec->ctx;
+ struct gl_context *ctx = exec->ctx;
if (ctx->Driver.FlushMappedBufferRange) {
GLintptr offset = exec->vtx.buffer_used - exec->vtx.bufferobj->Offset;
@@ -289,7 +289,7 @@ vbo_exec_vtx_unmap( struct vbo_exec_context *exec )
void
vbo_exec_vtx_map( struct vbo_exec_context *exec )
{
- GLcontext *ctx = exec->ctx;
+ struct gl_context *ctx = exec->ctx;
const GLenum target = GL_ARRAY_BUFFER_ARB;
const GLenum access = GL_READ_WRITE_ARB; /* for MapBuffer */
const GLenum accessRange = GL_MAP_WRITE_BIT | /* for MapBufferRange */
@@ -363,7 +363,7 @@ vbo_exec_vtx_flush( struct vbo_exec_context *exec, GLboolean unmap )
exec->vtx.copied.nr = vbo_copy_vertices( exec );
if (exec->vtx.copied.nr != exec->vtx.vert_count) {
- GLcontext *ctx = exec->ctx;
+ struct gl_context *ctx = exec->ctx;
/* Before the update_state() as this may raise _NEW_ARRAY
* from _mesa_set_varying_vp_inputs().
diff --git a/src/mesa/vbo/vbo_exec_eval.c b/src/mesa/vbo/vbo_exec_eval.c
index 23ad12608fc..1e8c3c45bb5 100644
--- a/src/mesa/vbo/vbo_exec_eval.c
+++ b/src/mesa/vbo/vbo_exec_eval.c
@@ -67,7 +67,7 @@ static void set_active_eval2( struct vbo_exec_context *exec, GLuint attr, GLuint
void vbo_exec_eval_update( struct vbo_exec_context *exec )
{
- GLcontext *ctx = exec->ctx;
+ struct gl_context *ctx = exec->ctx;
GLuint attr;
/* Vertex program maps have priority over conventional attribs */
diff --git a/src/mesa/vbo/vbo_rebase.c b/src/mesa/vbo/vbo_rebase.c
index ff7c7a6b0d5..9068ae240a6 100644
--- a/src/mesa/vbo/vbo_rebase.c
+++ b/src/mesa/vbo/vbo_rebase.c
@@ -85,6 +85,18 @@ GLboolean vbo_all_varyings_in_vbos( const struct gl_client_array *arrays[] )
return GL_TRUE;
}
+GLboolean vbo_any_varyings_in_vbos( const struct gl_client_array *arrays[] )
+{
+ GLuint i;
+
+ for (i = 0; i < VERT_ATTRIB_MAX; i++)
+ if (arrays[i]->StrideB &&
+ arrays[i]->BufferObj->Name != 0)
+ return GL_TRUE;
+
+ return GL_FALSE;
+}
+
/* Adjust primitives, indices and vertex definitions so that min_index
* becomes zero. There are lots of reasons for wanting to do this, eg:
*
@@ -104,7 +116,7 @@ GLboolean vbo_all_varyings_in_vbos( const struct gl_client_array *arrays[] )
* - can't save time by trying to upload half a vbo - typically it is
* all or nothing.
*/
-void vbo_rebase_prims( GLcontext *ctx,
+void vbo_rebase_prims( struct gl_context *ctx,
const struct gl_client_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
diff --git a/src/mesa/vbo/vbo_save.c b/src/mesa/vbo/vbo_save.c
index dd5570689e7..4e7bcddc970 100644
--- a/src/mesa/vbo/vbo_save.c
+++ b/src/mesa/vbo/vbo_save.c
@@ -36,7 +36,7 @@
#if FEATURE_dlist
-static void vbo_save_callback_init( GLcontext *ctx )
+static void vbo_save_callback_init( struct gl_context *ctx )
{
ctx->Driver.NewList = vbo_save_NewList;
ctx->Driver.EndList = vbo_save_EndList;
@@ -48,7 +48,7 @@ static void vbo_save_callback_init( GLcontext *ctx )
-void vbo_save_init( GLcontext *ctx )
+void vbo_save_init( struct gl_context *ctx )
{
struct vbo_context *vbo = vbo_context(ctx);
struct vbo_save_context *save = &vbo->save;
@@ -79,7 +79,7 @@ void vbo_save_init( GLcontext *ctx )
}
-void vbo_save_destroy( GLcontext *ctx )
+void vbo_save_destroy( struct gl_context *ctx )
{
struct vbo_context *vbo = vbo_context(ctx);
struct vbo_save_context *save = &vbo->save;
@@ -108,7 +108,7 @@ void vbo_save_destroy( GLcontext *ctx )
/* Note that this can occur during the playback of a display list:
*/
-void vbo_save_fallback( GLcontext *ctx, GLboolean fallback )
+void vbo_save_fallback( struct gl_context *ctx, GLboolean fallback )
{
struct vbo_save_context *save = &vbo_context(ctx)->save;
diff --git a/src/mesa/vbo/vbo_save.h b/src/mesa/vbo/vbo_save.h
index 82ba6c8afe7..f5a407ced14 100644
--- a/src/mesa/vbo/vbo_save.h
+++ b/src/mesa/vbo/vbo_save.h
@@ -117,7 +117,7 @@ struct vbo_save_primitive_store {
struct vbo_save_context {
- GLcontext *ctx;
+ struct gl_context *ctx;
GLvertexformat vtxfmt;
struct gl_client_array arrays[VBO_ATTRIB_MAX];
const struct gl_client_array *inputs[VBO_ATTRIB_MAX];
@@ -155,13 +155,13 @@ struct vbo_save_context {
#if FEATURE_dlist
-void vbo_save_init( GLcontext *ctx );
-void vbo_save_destroy( GLcontext *ctx );
-void vbo_save_fallback( GLcontext *ctx, GLboolean fallback );
+void vbo_save_init( struct gl_context *ctx );
+void vbo_save_destroy( struct gl_context *ctx );
+void vbo_save_fallback( struct gl_context *ctx, GLboolean fallback );
/* save_loopback.c:
*/
-void vbo_loopback_vertex_list( GLcontext *ctx,
+void vbo_loopback_vertex_list( struct gl_context *ctx,
const GLfloat *buffer,
const GLubyte *attrsz,
const struct _mesa_prim *prim,
@@ -171,26 +171,26 @@ void vbo_loopback_vertex_list( GLcontext *ctx,
/* Callbacks:
*/
-void vbo_save_EndList( GLcontext *ctx );
-void vbo_save_NewList( GLcontext *ctx, GLuint list, GLenum mode );
-void vbo_save_EndCallList( GLcontext *ctx );
-void vbo_save_BeginCallList( GLcontext *ctx, struct gl_display_list *list );
-void vbo_save_SaveFlushVertices( GLcontext *ctx );
-GLboolean vbo_save_NotifyBegin( GLcontext *ctx, GLenum mode );
+void vbo_save_EndList( struct gl_context *ctx );
+void vbo_save_NewList( struct gl_context *ctx, GLuint list, GLenum mode );
+void vbo_save_EndCallList( struct gl_context *ctx );
+void vbo_save_BeginCallList( struct gl_context *ctx, struct gl_display_list *list );
+void vbo_save_SaveFlushVertices( struct gl_context *ctx );
+GLboolean vbo_save_NotifyBegin( struct gl_context *ctx, GLenum mode );
-void vbo_save_playback_vertex_list( GLcontext *ctx, void *data );
+void vbo_save_playback_vertex_list( struct gl_context *ctx, void *data );
void vbo_save_api_init( struct vbo_save_context *save );
#else /* FEATURE_dlist */
static INLINE void
-vbo_save_init( GLcontext *ctx )
+vbo_save_init( struct gl_context *ctx )
{
}
static INLINE void
-vbo_save_destroy( GLcontext *ctx )
+vbo_save_destroy( struct gl_context *ctx )
{
}
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
index c3727cb52ac..19c4b15d5fb 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -99,7 +99,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
* NOTE: Old 'parity' issue is gone, but copying can still be
* wrong-footed on replay.
*/
-static GLuint _save_copy_vertices( GLcontext *ctx,
+static GLuint _save_copy_vertices( struct gl_context *ctx,
const struct vbo_save_vertex_list *node,
const GLfloat *src_buffer)
{
@@ -170,7 +170,7 @@ static GLuint _save_copy_vertices( GLcontext *ctx,
}
-static struct vbo_save_vertex_store *alloc_vertex_store( GLcontext *ctx )
+static struct vbo_save_vertex_store *alloc_vertex_store( struct gl_context *ctx )
{
struct vbo_save_vertex_store *vertex_store = CALLOC_STRUCT(vbo_save_vertex_store);
@@ -198,7 +198,7 @@ static struct vbo_save_vertex_store *alloc_vertex_store( GLcontext *ctx )
return vertex_store;
}
-static void free_vertex_store( GLcontext *ctx, struct vbo_save_vertex_store *vertex_store )
+static void free_vertex_store( struct gl_context *ctx, struct vbo_save_vertex_store *vertex_store )
{
assert(!vertex_store->buffer);
@@ -209,7 +209,7 @@ static void free_vertex_store( GLcontext *ctx, struct vbo_save_vertex_store *ver
FREE( vertex_store );
}
-static GLfloat *map_vertex_store( GLcontext *ctx, struct vbo_save_vertex_store *vertex_store )
+static GLfloat *map_vertex_store( struct gl_context *ctx, struct vbo_save_vertex_store *vertex_store )
{
assert(vertex_store->bufferobj);
assert(!vertex_store->buffer);
@@ -222,14 +222,14 @@ static GLfloat *map_vertex_store( GLcontext *ctx, struct vbo_save_vertex_store *
return vertex_store->buffer + vertex_store->used;
}
-static void unmap_vertex_store( GLcontext *ctx, struct vbo_save_vertex_store *vertex_store )
+static void unmap_vertex_store( struct gl_context *ctx, struct vbo_save_vertex_store *vertex_store )
{
ctx->Driver.UnmapBuffer( ctx, GL_ARRAY_BUFFER_ARB, vertex_store->bufferobj );
vertex_store->buffer = NULL;
}
-static struct vbo_save_primitive_store *alloc_prim_store( GLcontext *ctx )
+static struct vbo_save_primitive_store *alloc_prim_store( struct gl_context *ctx )
{
struct vbo_save_primitive_store *store = CALLOC_STRUCT(vbo_save_primitive_store);
(void) ctx;
@@ -238,7 +238,7 @@ static struct vbo_save_primitive_store *alloc_prim_store( GLcontext *ctx )
return store;
}
-static void _save_reset_counters( GLcontext *ctx )
+static void _save_reset_counters( struct gl_context *ctx )
{
struct vbo_save_context *save = &vbo_context(ctx)->save;
@@ -264,7 +264,7 @@ static void _save_reset_counters( GLcontext *ctx )
/* Insert the active immediate struct onto the display list currently
* being built.
*/
-static void _save_compile_vertex_list( GLcontext *ctx )
+static void _save_compile_vertex_list( struct gl_context *ctx )
{
struct vbo_save_context *save = &vbo_context(ctx)->save;
struct vbo_save_vertex_list *node;
@@ -391,7 +391,7 @@ static void _save_compile_vertex_list( GLcontext *ctx )
/* TODO -- If no new vertices have been stored, don't bother saving
* it.
*/
-static void _save_wrap_buffers( GLcontext *ctx )
+static void _save_wrap_buffers( struct gl_context *ctx )
{
struct vbo_save_context *save = &vbo_context(ctx)->save;
GLint i = save->prim_count - 1;
@@ -430,7 +430,7 @@ static void _save_wrap_buffers( GLcontext *ctx )
/* Called only when buffers are wrapped as the result of filling the
* vertex_store struct.
*/
-static void _save_wrap_filled_vertex( GLcontext *ctx )
+static void _save_wrap_filled_vertex( struct gl_context *ctx )
{
struct vbo_save_context *save = &vbo_context(ctx)->save;
GLfloat *data = save->copied.buffer;
@@ -453,7 +453,7 @@ static void _save_wrap_filled_vertex( GLcontext *ctx )
}
-static void _save_copy_to_current( GLcontext *ctx )
+static void _save_copy_to_current( struct gl_context *ctx )
{
struct vbo_save_context *save = &vbo_context(ctx)->save;
GLuint i;
@@ -469,7 +469,7 @@ static void _save_copy_to_current( GLcontext *ctx )
}
-static void _save_copy_from_current( GLcontext *ctx )
+static void _save_copy_from_current( struct gl_context *ctx )
{
struct vbo_save_context *save = &vbo_context(ctx)->save;
GLint i;
@@ -490,7 +490,7 @@ static void _save_copy_from_current( GLcontext *ctx )
/* Flush existing data, set new attrib size, replay copied vertices.
*/
-static void _save_upgrade_vertex( GLcontext *ctx,
+static void _save_upgrade_vertex( struct gl_context *ctx,
GLuint attr,
GLuint newsz )
{
@@ -586,7 +586,7 @@ static void _save_upgrade_vertex( GLcontext *ctx,
}
}
-static void save_fixup_vertex( GLcontext *ctx, GLuint attr, GLuint sz )
+static void save_fixup_vertex( struct gl_context *ctx, GLuint attr, GLuint sz )
{
struct vbo_save_context *save = &vbo_context(ctx)->save;
@@ -610,7 +610,7 @@ static void save_fixup_vertex( GLcontext *ctx, GLuint attr, GLuint sz )
save->active_sz[attr] = sz;
}
-static void _save_reset_vertex( GLcontext *ctx )
+static void _save_reset_vertex( struct gl_context *ctx )
{
struct vbo_save_context *save = &vbo_context(ctx)->save;
GLuint i;
@@ -673,7 +673,7 @@ do { \
* -- Flush current buffer
* -- Fallback to opcodes for the rest of the begin/end object.
*/
-static void DO_FALLBACK( GLcontext *ctx )
+static void DO_FALLBACK( struct gl_context *ctx )
{
struct vbo_save_context *save = &vbo_context(ctx)->save;
@@ -763,7 +763,7 @@ static void GLAPIENTRY _save_CallLists( GLsizei n, GLenum type, const GLvoid *v
/* This begin is hooked into ... Updating of
* ctx->Driver.CurrentSavePrimitive is already taken care of.
*/
-GLboolean vbo_save_NotifyBegin( GLcontext *ctx, GLenum mode )
+GLboolean vbo_save_NotifyBegin( struct gl_context *ctx, GLenum mode )
{
struct vbo_save_context *save = &vbo_context(ctx)->save;
@@ -896,6 +896,18 @@ static void GLAPIENTRY _save_Begin( GLenum mode )
}
+static void GLAPIENTRY _save_PrimitiveRestartNV( void )
+{
+ GLenum curPrim;
+ GET_CURRENT_CONTEXT( ctx );
+
+ curPrim = ctx->Driver.CurrentSavePrimitive;
+
+ _save_End();
+ _save_Begin(curPrim);
+}
+
+
/* Unlike the functions above, these are to be hooked into the vtxfmt
* maintained in ctx->ListState, active when the list is known or
* suspected to be outside any begin/end primitive.
@@ -989,7 +1001,7 @@ static void GLAPIENTRY _save_OBE_DrawRangeElements(GLenum mode,
-static void _save_vtxfmt_init( GLcontext *ctx )
+static void _save_vtxfmt_init( struct gl_context *ctx )
{
struct vbo_save_context *save = &vbo_context(ctx)->save;
GLvertexformat *vfmt = &save->vtxfmt;
@@ -1003,6 +1015,7 @@ static void _save_vtxfmt_init( GLcontext *ctx )
vfmt->Color4fv = _save_Color4fv;
vfmt->EdgeFlag = _save_EdgeFlag;
vfmt->End = _save_End;
+ vfmt->PrimitiveRestartNV = _save_PrimitiveRestartNV;
vfmt->FogCoordfEXT = _save_FogCoordfEXT;
vfmt->FogCoordfvEXT = _save_FogCoordfvEXT;
vfmt->Indexf = _save_Indexf;
@@ -1074,7 +1087,7 @@ static void _save_vtxfmt_init( GLcontext *ctx )
}
-void vbo_save_SaveFlushVertices( GLcontext *ctx )
+void vbo_save_SaveFlushVertices( struct gl_context *ctx )
{
struct vbo_save_context *save = &vbo_context(ctx)->save;
@@ -1094,7 +1107,7 @@ void vbo_save_SaveFlushVertices( GLcontext *ctx )
ctx->Driver.SaveNeedFlush = 0;
}
-void vbo_save_NewList( GLcontext *ctx, GLuint list, GLenum mode )
+void vbo_save_NewList( struct gl_context *ctx, GLuint list, GLenum mode )
{
struct vbo_save_context *save = &vbo_context(ctx)->save;
@@ -1113,7 +1126,7 @@ void vbo_save_NewList( GLcontext *ctx, GLuint list, GLenum mode )
ctx->Driver.SaveNeedFlush = 0;
}
-void vbo_save_EndList( GLcontext *ctx )
+void vbo_save_EndList( struct gl_context *ctx )
{
struct vbo_save_context *save = &vbo_context(ctx)->save;
@@ -1147,13 +1160,13 @@ void vbo_save_EndList( GLcontext *ctx )
assert(save->vertex_size == 0);
}
-void vbo_save_BeginCallList( GLcontext *ctx, struct gl_display_list *dlist )
+void vbo_save_BeginCallList( struct gl_context *ctx, struct gl_display_list *dlist )
{
struct vbo_save_context *save = &vbo_context(ctx)->save;
save->replay_flags |= dlist->Flags;
}
-void vbo_save_EndCallList( GLcontext *ctx )
+void vbo_save_EndCallList( struct gl_context *ctx )
{
struct vbo_save_context *save = &vbo_context(ctx)->save;
@@ -1166,7 +1179,7 @@ void vbo_save_EndCallList( GLcontext *ctx )
}
-static void vbo_destroy_vertex_list( GLcontext *ctx, void *data )
+static void vbo_destroy_vertex_list( struct gl_context *ctx, void *data )
{
struct vbo_save_vertex_list *node = (struct vbo_save_vertex_list *)data;
(void) ctx;
@@ -1184,7 +1197,7 @@ static void vbo_destroy_vertex_list( GLcontext *ctx, void *data )
}
-static void vbo_print_vertex_list( GLcontext *ctx, void *data )
+static void vbo_print_vertex_list( struct gl_context *ctx, void *data )
{
struct vbo_save_vertex_list *node = (struct vbo_save_vertex_list *)data;
GLuint i;
@@ -1209,7 +1222,7 @@ static void vbo_print_vertex_list( GLcontext *ctx, void *data )
}
-static void _save_current_init( GLcontext *ctx )
+static void _save_current_init( struct gl_context *ctx )
{
struct vbo_save_context *save = &vbo_context(ctx)->save;
GLint i;
@@ -1234,7 +1247,7 @@ static void _save_current_init( GLcontext *ctx )
*/
void vbo_save_api_init( struct vbo_save_context *save )
{
- GLcontext *ctx = save->ctx;
+ struct gl_context *ctx = save->ctx;
GLuint i;
save->opcode_vertex_list =
diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c
index 297fd8705bf..533c150a918 100644
--- a/src/mesa/vbo/vbo_save_draw.c
+++ b/src/mesa/vbo/vbo_save_draw.c
@@ -46,7 +46,7 @@
* last vertex to the saved state
*/
static void
-_playback_copy_to_current(GLcontext *ctx,
+_playback_copy_to_current(struct gl_context *ctx,
const struct vbo_save_vertex_list *node)
{
struct vbo_context *vbo = vbo_context(ctx);
@@ -124,7 +124,7 @@ _playback_copy_to_current(GLcontext *ctx,
* Treat the vertex storage as a VBO, define vertex arrays pointing
* into it:
*/
-static void vbo_bind_vertex_list(GLcontext *ctx,
+static void vbo_bind_vertex_list(struct gl_context *ctx,
const struct vbo_save_vertex_list *node)
{
struct vbo_context *vbo = vbo_context(ctx);
@@ -209,7 +209,7 @@ static void vbo_bind_vertex_list(GLcontext *ctx,
static void
-vbo_save_loopback_vertex_list(GLcontext *ctx,
+vbo_save_loopback_vertex_list(struct gl_context *ctx,
const struct vbo_save_vertex_list *list)
{
const char *buffer = ctx->Driver.MapBuffer(ctx,
@@ -236,7 +236,7 @@ vbo_save_loopback_vertex_list(GLcontext *ctx,
* a drawing command.
*/
void
-vbo_save_playback_vertex_list(GLcontext *ctx, void *data)
+vbo_save_playback_vertex_list(struct gl_context *ctx, void *data)
{
const struct vbo_save_vertex_list *node =
(const struct vbo_save_vertex_list *) data;
diff --git a/src/mesa/vbo/vbo_save_loopback.c b/src/mesa/vbo/vbo_save_loopback.c
index 5d1c7e48102..b1cfa9c2a8f 100644
--- a/src/mesa/vbo/vbo_save_loopback.c
+++ b/src/mesa/vbo/vbo_save_loopback.c
@@ -39,29 +39,29 @@
#if FEATURE_dlist
-typedef void (*attr_func)( GLcontext *ctx, GLint target, const GLfloat * );
+typedef void (*attr_func)( struct gl_context *ctx, GLint target, const GLfloat * );
/* This file makes heavy use of the aliasing of NV vertex attributes
* with the legacy attributes, and also with ARB and Material
* attributes as currently implemented.
*/
-static void VertexAttrib1fvNV(GLcontext *ctx, GLint target, const GLfloat *v)
+static void VertexAttrib1fvNV(struct gl_context *ctx, GLint target, const GLfloat *v)
{
CALL_VertexAttrib1fvNV(ctx->Exec, (target, v));
}
-static void VertexAttrib2fvNV(GLcontext *ctx, GLint target, const GLfloat *v)
+static void VertexAttrib2fvNV(struct gl_context *ctx, GLint target, const GLfloat *v)
{
CALL_VertexAttrib2fvNV(ctx->Exec, (target, v));
}
-static void VertexAttrib3fvNV(GLcontext *ctx, GLint target, const GLfloat *v)
+static void VertexAttrib3fvNV(struct gl_context *ctx, GLint target, const GLfloat *v)
{
CALL_VertexAttrib3fvNV(ctx->Exec, (target, v));
}
-static void VertexAttrib4fvNV(GLcontext *ctx, GLint target, const GLfloat *v)
+static void VertexAttrib4fvNV(struct gl_context *ctx, GLint target, const GLfloat *v)
{
CALL_VertexAttrib4fvNV(ctx->Exec, (target, v));
}
@@ -83,7 +83,7 @@ struct loopback_attr {
* wrapped vertices. If we get here, it's probably because the
* precalculated wrapping is wrong.
*/
-static void loopback_prim( GLcontext *ctx,
+static void loopback_prim( struct gl_context *ctx,
const GLfloat *buffer,
const struct _mesa_prim *prim,
GLuint wrap_count,
@@ -138,7 +138,7 @@ static void loopback_prim( GLcontext *ctx,
* normally, otherwise need to track and discard the generated
* primitives.
*/
-static void loopback_weak_prim( GLcontext *ctx,
+static void loopback_weak_prim( struct gl_context *ctx,
const struct _mesa_prim *prim )
{
/* Use the prim_weak flag to ensure that if this primitive
@@ -155,7 +155,7 @@ static void loopback_weak_prim( GLcontext *ctx,
}
-void vbo_loopback_vertex_list( GLcontext *ctx,
+void vbo_loopback_vertex_list( struct gl_context *ctx,
const GLfloat *buffer,
const GLubyte *attrsz,
const struct _mesa_prim *prim,
diff --git a/src/mesa/vbo/vbo_split.c b/src/mesa/vbo/vbo_split.c
index ce40cbbcc3d..54b2539b8ec 100644
--- a/src/mesa/vbo/vbo_split.c
+++ b/src/mesa/vbo/vbo_split.c
@@ -98,7 +98,7 @@ GLboolean split_prim_inplace(GLenum mode, GLuint *first, GLuint *incr)
-void vbo_split_prims( GLcontext *ctx,
+void vbo_split_prims( struct gl_context *ctx,
const struct gl_client_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
diff --git a/src/mesa/vbo/vbo_split.h b/src/mesa/vbo/vbo_split.h
index 05888d048cb..b7f0a9c5769 100644
--- a/src/mesa/vbo/vbo_split.h
+++ b/src/mesa/vbo/vbo_split.h
@@ -49,7 +49,7 @@
*/
GLboolean split_prim_inplace(GLenum mode, GLuint *first, GLuint *incr);
-void vbo_split_inplace( GLcontext *ctx,
+void vbo_split_inplace( struct gl_context *ctx,
const struct gl_client_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
@@ -61,7 +61,7 @@ void vbo_split_inplace( GLcontext *ctx,
/* Requires ib != NULL:
*/
-void vbo_split_copy( GLcontext *ctx,
+void vbo_split_copy( struct gl_context *ctx,
const struct gl_client_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
diff --git a/src/mesa/vbo/vbo_split_copy.c b/src/mesa/vbo/vbo_split_copy.c
index 2ec7d9b0fe3..26d0046e83d 100644
--- a/src/mesa/vbo/vbo_split_copy.c
+++ b/src/mesa/vbo/vbo_split_copy.c
@@ -49,7 +49,7 @@
*/
struct copy_context {
- GLcontext *ctx;
+ struct gl_context *ctx;
const struct gl_client_array **array;
const struct _mesa_prim *prim;
GLuint nr_prims;
@@ -137,7 +137,7 @@ check_flush( struct copy_context *copy )
* Dump the parameters/info for a vbo->draw() call.
*/
static void
-dump_draw_info(GLcontext *ctx,
+dump_draw_info(struct gl_context *ctx,
const struct gl_client_array **arrays,
const struct _mesa_prim *prims,
GLuint nr_prims,
@@ -419,7 +419,7 @@ replay_elts( struct copy_context *copy )
static void
replay_init( struct copy_context *copy )
{
- GLcontext *ctx = copy->ctx;
+ struct gl_context *ctx = copy->ctx;
GLuint i;
GLuint offset;
const GLvoid *srcptr;
@@ -548,7 +548,7 @@ replay_init( struct copy_context *copy )
static void
replay_finish( struct copy_context *copy )
{
- GLcontext *ctx = copy->ctx;
+ struct gl_context *ctx = copy->ctx;
GLuint i;
/* Free our vertex and index buffers:
@@ -577,7 +577,7 @@ replay_finish( struct copy_context *copy )
/**
* Split VBO into smaller pieces, draw the pieces.
*/
-void vbo_split_copy( GLcontext *ctx,
+void vbo_split_copy( struct gl_context *ctx,
const struct gl_client_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
diff --git a/src/mesa/vbo/vbo_split_inplace.c b/src/mesa/vbo/vbo_split_inplace.c
index 2fc866c5773..789cf31364b 100644
--- a/src/mesa/vbo/vbo_split_inplace.c
+++ b/src/mesa/vbo/vbo_split_inplace.c
@@ -41,7 +41,7 @@
* that.
*/
struct split_context {
- GLcontext *ctx;
+ struct gl_context *ctx;
const struct gl_client_array **array;
const struct _mesa_prim *prim;
GLuint nr_prims;
@@ -249,7 +249,7 @@ static void split_prims( struct split_context *split)
}
-void vbo_split_inplace( GLcontext *ctx,
+void vbo_split_inplace( struct gl_context *ctx,
const struct gl_client_array *arrays[],
const struct _mesa_prim *prim,
GLuint nr_prims,
diff --git a/src/mesa/x86/gen_matypes.c b/src/mesa/x86/gen_matypes.c
index 14cfa910aaf..648bf8787db 100644
--- a/src/mesa/x86/gen_matypes.c
+++ b/src/mesa/x86/gen_matypes.c
@@ -84,22 +84,22 @@ int main( int argc, char **argv )
printf( "\n" );
- /* GLcontext offsets:
+ /* struct gl_context offsets:
*/
- OFFSET_HEADER( "GLcontext" );
+ OFFSET_HEADER( "struct gl_context" );
- OFFSET( "CTX_DRIVER_CTX ", GLcontext, DriverCtx );
+ OFFSET( "CTX_DRIVER_CTX ", struct gl_context, DriverCtx );
printf( "\n" );
- OFFSET( "CTX_LIGHT_ENABLED ", GLcontext, Light.Enabled );
- OFFSET( "CTX_LIGHT_SHADE_MODEL ", GLcontext, Light.ShadeModel );
- OFFSET( "CTX_LIGHT_COLOR_MAT_FACE ", GLcontext, Light.ColorMaterialFace );
- OFFSET( "CTX_LIGHT_COLOR_MAT_MODE ", GLcontext, Light.ColorMaterialMode );
- OFFSET( "CTX_LIGHT_COLOR_MAT_MASK ", GLcontext, Light.ColorMaterialBitmask );
- OFFSET( "CTX_LIGHT_COLOR_MAT_ENABLED ", GLcontext, Light.ColorMaterialEnabled );
- OFFSET( "CTX_LIGHT_ENABLED_LIST ", GLcontext, Light.EnabledList );
- OFFSET( "CTX_LIGHT_NEED_VERTS ", GLcontext, Light._NeedVertices );
- OFFSET( "CTX_LIGHT_FLAGS ", GLcontext, Light._Flags );
- OFFSET( "CTX_LIGHT_BASE_COLOR ", GLcontext, Light._BaseColor );
+ OFFSET( "CTX_LIGHT_ENABLED ", struct gl_context, Light.Enabled );
+ OFFSET( "CTX_LIGHT_SHADE_MODEL ", struct gl_context, Light.ShadeModel );
+ OFFSET( "CTX_LIGHT_COLOR_MAT_FACE ", struct gl_context, Light.ColorMaterialFace );
+ OFFSET( "CTX_LIGHT_COLOR_MAT_MODE ", struct gl_context, Light.ColorMaterialMode );
+ OFFSET( "CTX_LIGHT_COLOR_MAT_MASK ", struct gl_context, Light.ColorMaterialBitmask );
+ OFFSET( "CTX_LIGHT_COLOR_MAT_ENABLED ", struct gl_context, Light.ColorMaterialEnabled );
+ OFFSET( "CTX_LIGHT_ENABLED_LIST ", struct gl_context, Light.EnabledList );
+ OFFSET( "CTX_LIGHT_NEED_VERTS ", struct gl_context, Light._NeedVertices );
+ OFFSET( "CTX_LIGHT_FLAGS ", struct gl_context, Light._Flags );
+ OFFSET( "CTX_LIGHT_BASE_COLOR ", struct gl_context, Light._BaseColor );
/* struct vertex_buffer offsets:
diff --git a/src/mesa/x86/mmx.h b/src/mesa/x86/mmx.h
index 47a0d4b54dd..d4bda07eade 100644
--- a/src/mesa/x86/mmx.h
+++ b/src/mesa/x86/mmx.h
@@ -30,27 +30,27 @@
#include "main/mtypes.h"
extern void _ASMAPI
-_mesa_mmx_blend_transparency( GLcontext *ctx, GLuint n, const GLubyte mask[],
+_mesa_mmx_blend_transparency( struct gl_context *ctx, GLuint n, const GLubyte mask[],
GLvoid *rgba, const GLvoid *dest,
GLenum chanType );
extern void _ASMAPI
-_mesa_mmx_blend_add( GLcontext *ctx, GLuint n, const GLubyte mask[],
+_mesa_mmx_blend_add( struct gl_context *ctx, GLuint n, const GLubyte mask[],
GLvoid *rgba, const GLvoid *dest,
GLenum chanType );
extern void _ASMAPI
-_mesa_mmx_blend_min( GLcontext *ctx, GLuint n, const GLubyte mask[],
+_mesa_mmx_blend_min( struct gl_context *ctx, GLuint n, const GLubyte mask[],
GLvoid *rgba, const GLvoid *dest,
GLenum chanType );
extern void _ASMAPI
-_mesa_mmx_blend_max( GLcontext *ctx, GLuint n, const GLubyte mask[],
+_mesa_mmx_blend_max( struct gl_context *ctx, GLuint n, const GLubyte mask[],
GLvoid *rgba, const GLvoid *dest,
GLenum chanType );
extern void _ASMAPI
-_mesa_mmx_blend_modulate( GLcontext *ctx, GLuint n, const GLubyte mask[],
+_mesa_mmx_blend_modulate( struct gl_context *ctx, GLuint n, const GLubyte mask[],
GLvoid *rgba, const GLvoid *dest,
GLenum chanType );
diff --git a/src/mesa/x86/mmx_blendtmp.h b/src/mesa/x86/mmx_blendtmp.h
index c2fdeb62b3b..8534792e297 100644
--- a/src/mesa/x86/mmx_blendtmp.h
+++ b/src/mesa/x86/mmx_blendtmp.h
@@ -4,7 +4,7 @@
/*
- * void _mesa_mmx_blend( GLcontext *ctx,
+ * void _mesa_mmx_blend( struct gl_context *ctx,
* GLuint n,
* const GLubyte mask[],
* GLchan rgba[][4],