summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c241
-rw-r--r--src/egl/main/eglcompiler.h5
-rw-r--r--src/gallium/auxiliary/Makefile3
-rw-r--r--src/gallium/auxiliary/SConscript5
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_context.c54
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_context.h13
-rw-r--r--src/gallium/auxiliary/draw/draw_context.c8
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_vbuf.c2
-rw-r--r--src/gallium/auxiliary/draw/draw_pt.c4
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_emit.c2
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c3
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c15
-rw-r--r--src/gallium/auxiliary/draw/draw_vs_aos_io.c2
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_arit.c56
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_arit.h12
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_init.cpp (renamed from src/gallium/auxiliary/gallivm/lp_bld_misc.cpp)46
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_init.h (renamed from src/gallium/auxiliary/gallivm/lp_bld_misc.h)17
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_logic.c5
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_pack.c15
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample.c30
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample.h14
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c860
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c121
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_type.c20
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_type.h4
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_exec.c67
-rw-r--r--src/gallium/auxiliary/translate/translate_generic.c8
-rw-r--r--src/gallium/auxiliary/translate/translate_sse.c4
-rw-r--r--src/gallium/auxiliary/util/u_blit.c46
-rw-r--r--src/gallium/auxiliary/util/u_blitter.c47
-rw-r--r--src/gallium/auxiliary/util/u_blitter.h16
-rw-r--r--src/gallium/auxiliary/util/u_debug.c2
-rw-r--r--src/gallium/auxiliary/util/u_dump_state.c1
-rw-r--r--src/gallium/auxiliary/util/u_format.csv139
-rw-r--r--src/gallium/auxiliary/util/u_format.h15
-rw-r--r--src/gallium/auxiliary/util/u_format_access.py17
-rw-r--r--src/gallium/auxiliary/util/u_format_pack.py130
-rwxr-xr-xsrc/gallium/auxiliary/util/u_format_parse.py10
-rwxr-xr-xsrc/gallium/auxiliary/util/u_format_table.py4
-rw-r--r--src/gallium/auxiliary/util/u_format_tests.c544
-rw-r--r--src/gallium/auxiliary/util/u_format_tests.h69
-rw-r--r--src/gallium/auxiliary/util/u_gen_mipmap.c65
-rw-r--r--src/gallium/auxiliary/util/u_pack_color.h66
-rw-r--r--src/gallium/auxiliary/util/u_surface.c4
-rw-r--r--src/gallium/auxiliary/util/u_tile.c104
-rw-r--r--src/gallium/docs/source/cso/rasterizer.rst12
-rw-r--r--src/gallium/docs/source/cso/sampler.rst101
-rw-r--r--src/gallium/drivers/cell/ppu/cell_gen_fragment.c30
-rw-r--r--src/gallium/drivers/cell/ppu/cell_screen.c2
-rw-r--r--src/gallium/drivers/cell/ppu/cell_state_per_fragment.c4
-rw-r--r--src/gallium/drivers/cell/spu/spu_command.c4
-rw-r--r--src/gallium/drivers/cell/spu/spu_per_fragment_op.c18
-rw-r--r--src/gallium/drivers/i915/i915_screen.c20
-rw-r--r--src/gallium/drivers/i915/i915_state_emit.c9
-rw-r--r--src/gallium/drivers/i915/i915_state_sampler.c20
-rw-r--r--src/gallium/drivers/i965/brw_misc_state.c4
-rw-r--r--src/gallium/drivers/i965/brw_pipe_clear.c8
-rw-r--r--src/gallium/drivers/i965/brw_screen.c34
-rw-r--r--src/gallium/drivers/i965/brw_screen_texture.c24
-rw-r--r--src/gallium/drivers/i965/brw_wm.c4
-rw-r--r--src/gallium/drivers/llvmpipe/README2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_context.c2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_jit.c14
-rw-r--r--src/gallium/drivers/llvmpipe/lp_jit.h4
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast.c321
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast.h25
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast_priv.h50
-rw-r--r--src/gallium/drivers/llvmpipe/lp_scene.c248
-rw-r--r--src/gallium/drivers/llvmpipe/lp_scene.h34
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup.c38
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup.h2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_tri.c9
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_fs.c7
-rw-r--r--src/gallium/drivers/llvmpipe/lp_test_format.c48
-rw-r--r--src/gallium/drivers/llvmpipe/lp_test_main.c5
-rw-r--r--src/gallium/drivers/llvmpipe/lp_tex_sample_llvm.c16
-rw-r--r--src/gallium/drivers/nouveau/nv04_surface_2d.c34
-rw-r--r--src/gallium/drivers/nv30/nv30_context.h1
-rw-r--r--src/gallium/drivers/nv30/nv30_fragtex.c14
-rw-r--r--src/gallium/drivers/nv30/nv30_miptree.c8
-rw-r--r--src/gallium/drivers/nv30/nv30_screen.c22
-rw-r--r--src/gallium/drivers/nv30/nv30_state_fb.c10
-rw-r--r--src/gallium/drivers/nv30/nv30_state_viewport.c58
-rw-r--r--src/gallium/drivers/nv40/nv40_context.h1
-rw-r--r--src/gallium/drivers/nv40/nv40_fragtex.c14
-rw-r--r--src/gallium/drivers/nv40/nv40_miptree.c4
-rw-r--r--src/gallium/drivers/nv40/nv40_screen.c20
-rw-r--r--src/gallium/drivers/nv40/nv40_state_fb.c10
-rw-r--r--src/gallium/drivers/nv40/nv40_state_viewport.c57
-rw-r--r--src/gallium/drivers/nv50/nv50_context.h1
-rw-r--r--src/gallium/drivers/nv50/nv50_miptree.c6
-rw-r--r--src/gallium/drivers/nv50/nv50_screen.c28
-rw-r--r--src/gallium/drivers/nv50/nv50_state_validate.c116
-rw-r--r--src/gallium/drivers/nv50/nv50_surface.c6
-rw-r--r--src/gallium/drivers/nv50/nv50_tex.c20
-rw-r--r--src/gallium/drivers/r300/Makefile3
-rw-r--r--src/gallium/drivers/r300/SConscript1
-rw-r--r--src/gallium/drivers/r300/r300_blit.c6
-rw-r--r--src/gallium/drivers/r300/r300_context.c3
-rw-r--r--src/gallium/drivers/r300/r300_context.h8
-rw-r--r--src/gallium/drivers/r300/r300_emit.c82
-rw-r--r--src/gallium/drivers/r300/r300_flush.c6
-rw-r--r--src/gallium/drivers/r300/r300_fs.c1
-rw-r--r--src/gallium/drivers/r300/r300_render.c15
-rw-r--r--src/gallium/drivers/r300/r300_screen.c80
-rw-r--r--src/gallium/drivers/r300/r300_screen.h22
-rw-r--r--src/gallium/drivers/r300/r300_state.c146
-rw-r--r--src/gallium/drivers/r300/r300_state_derived.c18
-rw-r--r--src/gallium/drivers/r300/r300_texture.c153
-rw-r--r--src/gallium/drivers/r300/r300_transfer.c270
-rw-r--r--src/gallium/drivers/r300/r300_transfer.h31
-rw-r--r--src/gallium/drivers/r300/r300_vs.c163
-rw-r--r--src/gallium/drivers/r300/r300_vs.h13
-rw-r--r--src/gallium/drivers/softpipe/sp_quad_depth_test.c24
-rw-r--r--src/gallium/drivers/softpipe/sp_screen.c10
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_sample.c63
-rw-r--r--src/gallium/drivers/softpipe/sp_texture.c2
-rw-r--r--src/gallium/drivers/softpipe/sp_tile_cache.c6
-rw-r--r--src/gallium/drivers/softpipe/sp_video_context.c1
-rw-r--r--src/gallium/drivers/svga/svga_pipe_clear.c4
-rw-r--r--src/gallium/drivers/svga/svga_pipe_misc.c4
-rw-r--r--src/gallium/drivers/svga/svga_pipe_sampler.c2
-rw-r--r--src/gallium/drivers/svga/svga_screen.c18
-rw-r--r--src/gallium/drivers/svga/svga_screen_texture.c38
-rw-r--r--src/gallium/drivers/svga/svga_state_framebuffer.c287
-rw-r--r--src/gallium/drivers/svga/svga_state_need_swtnl.c5
-rw-r--r--src/gallium/drivers/trace/tr_dump_state.c1
-rw-r--r--src/gallium/include/pipe/p_compiler.h7
-rw-r--r--src/gallium/include/pipe/p_format.h58
-rw-r--r--src/gallium/include/pipe/p_state.h10
-rw-r--r--src/gallium/state_trackers/dri/dri_drawable.c14
-rw-r--r--src/gallium/state_trackers/dri/dri_screen.c14
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d.c39
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d.h14
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d_image.c136
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d_image.h41
-rw-r--r--src/gallium/state_trackers/egl/common/native.h88
-rw-r--r--src/gallium/state_trackers/egl/common/native_modeset.h87
-rw-r--r--src/gallium/state_trackers/egl/kms/native_kms.c37
-rw-r--r--src/gallium/state_trackers/egl/kms/native_kms.h2
-rw-r--r--src/gallium/state_trackers/egl/x11/native_dri2.c52
-rw-r--r--src/gallium/state_trackers/egl/x11/native_x11.c7
-rw-r--r--src/gallium/state_trackers/egl/x11/native_x11.h8
-rw-r--r--src/gallium/state_trackers/egl/x11/native_ximage.c56
-rw-r--r--src/gallium/state_trackers/glx/xlib/xm_api.c19
-rw-r--r--src/gallium/state_trackers/python/st_device.c2
-rw-r--r--src/gallium/state_trackers/python/st_sample.c2
-rw-r--r--src/gallium/state_trackers/vega/api_filters.c2
-rw-r--r--src/gallium/state_trackers/vega/image.c10
-rw-r--r--src/gallium/state_trackers/vega/mask.c2
-rw-r--r--src/gallium/state_trackers/vega/paint.c2
-rw-r--r--src/gallium/state_trackers/vega/vg_tracker.c10
-rw-r--r--src/gallium/state_trackers/wgl/stw_device.c4
-rw-r--r--src/gallium/state_trackers/wgl/stw_pixelformat.c24
-rw-r--r--src/gallium/state_trackers/xorg/xorg_crtc.c2
-rw-r--r--src/gallium/state_trackers/xorg/xorg_dri2.c8
-rw-r--r--src/gallium/state_trackers/xorg/xorg_exa.c10
-rw-r--r--src/gallium/state_trackers/xorg/xvmc/surface.c2
-rw-r--r--src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c4
-rw-r--r--src/gallium/winsys/gdi/gdi_llvmpipe_winsys.c4
-rw-r--r--src/glx/XF86dri.c2
-rw-r--r--src/glx/dri2_glx.c6
-rw-r--r--src/glx/dri_glx.c3
-rw-r--r--src/glx/drisw_glx.c3
-rw-r--r--src/glx/glx_pbuffer.c4
-rw-r--r--src/glx/glxclient.h2
-rw-r--r--src/glx/glxcmds.c4
-rw-r--r--src/glx/glxext.c3
-rw-r--r--src/glx/indirect.c2
-rw-r--r--src/glx/indirect.h2
-rw-r--r--src/glx/indirect_size.c4
-rw-r--r--src/glx/indirect_size.h4
-rw-r--r--src/glx/indirect_vertex_program.c2
-rw-r--r--src/glx/pixelstore.c2
-rw-r--r--src/mesa/drivers/beos/GLView.cpp4
-rw-r--r--src/mesa/drivers/common/driverfuncs.c2
-rw-r--r--src/mesa/drivers/common/meta.c2
-rw-r--r--src/mesa/drivers/dri/common/utils.c14
-rw-r--r--src/mesa/drivers/dri/i810/Makefile3
-rw-r--r--src/mesa/drivers/dri/i810/i810tris.c1
-rw-r--r--src/mesa/drivers/dri/i810/server/i810_dri.c975
-rw-r--r--src/mesa/drivers/dri/i915/Makefile2
-rw-r--r--src/mesa/drivers/dri/i915/i830_context.h3
-rw-r--r--src/mesa/drivers/dri/i915/i830_texstate.c49
-rw-r--r--src/mesa/drivers/dri/i915/i830_vtbl.c43
-rw-r--r--src/mesa/drivers/dri/i915/i915_context.h1
-rw-r--r--src/mesa/drivers/dri/i915/i915_texstate.c36
-rw-r--r--src/mesa/drivers/dri/i915/i915_vtbl.c50
-rw-r--r--src/mesa/drivers/dri/i915/intel_tris.c3
l---------src/mesa/drivers/dri/i915/server/intel_dri.c1
-rw-r--r--src/mesa/drivers/dri/i965/Makefile1
-rw-r--r--src/mesa/drivers/dri/i965/brw_curbe.c5
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw_upload.c63
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_emit.c8
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_surface_state.c8
-rw-r--r--src/mesa/drivers/dri/i965/brw_vtbl.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_sampler_state.c14
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c92
-rw-r--r--src/mesa/drivers/dri/i965/gen6_cc.c20
-rw-r--r--src/mesa/drivers/dri/i965/gen6_sf_state.c45
-rw-r--r--src/mesa/drivers/dri/i965/gen6_vs_state.c4
-rw-r--r--src/mesa/drivers/dri/i965/gen6_wm_state.c4
l---------src/mesa/drivers/dri/i965/server/intel_dri.c1
-rw-r--r--src/mesa/drivers/dri/intel/intel_batchbuffer.c29
-rw-r--r--src/mesa/drivers/dri/intel/intel_batchbuffer.h87
-rw-r--r--src/mesa/drivers/dri/intel/intel_blit.c53
-rw-r--r--src/mesa/drivers/dri/intel/intel_buffer_objects.c142
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c8
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.h21
-rw-r--r--src/mesa/drivers/dri/intel/intel_depthtmp.h64
-rw-r--r--src/mesa/drivers/dri/intel/intel_extensions.c3
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.c4
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.h3
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.c11
-rw-r--r--src/mesa/drivers/dri/intel/intel_regions.c45
-rw-r--r--src/mesa/drivers/dri/intel/intel_screen.c28
-rw-r--r--src/mesa/drivers/dri/intel/intel_screen.h1
-rw-r--r--src/mesa/drivers/dri/intel/intel_span.c509
-rw-r--r--src/mesa/drivers/dri/intel/intel_spantmp.h67
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex.h2
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_image.c23
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_obj.h4
-rw-r--r--src/mesa/drivers/dri/intel/server/intel_dri.c1306
-rw-r--r--src/mesa/drivers/dri/mach64/Makefile3
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_state.c2
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_tris.c1
-rw-r--r--src/mesa/drivers/dri/mga/Makefile2
-rw-r--r--src/mesa/drivers/dri/mga/mgastate.c3
-rw-r--r--src/mesa/drivers/dri/mga/mgatris.c1
-rw-r--r--src/mesa/drivers/dri/mga/server/mga_dri.c1088
-rw-r--r--src/mesa/drivers/dri/nouveau/Makefile2
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_context.c13
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_fbo.c2
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_state.c8
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_state.h1
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c73
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_context.c1
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_state_fb.c2
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_state_raster.c12
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_context.c1
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_driver.h3
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_fb.c2
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_raster.c5
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_tnl.c6
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_context.c1
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_state_fb.c2
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_state_tnl.c2
-rw-r--r--src/mesa/drivers/dri/r128/Makefile2
-rw-r--r--src/mesa/drivers/dri/r128/r128_state.c2
-rw-r--r--src/mesa/drivers/dri/r128/r128_tris.c1
-rw-r--r--src/mesa/drivers/dri/r128/server/r128_dri.c1112
-rw-r--r--src/mesa/drivers/dri/r200/Makefile6
-rw-r--r--src/mesa/drivers/dri/r200/r200_blit.c16
-rw-r--r--src/mesa/drivers/dri/r200/r200_blit.h2
-rw-r--r--src/mesa/drivers/dri/r200/r200_context.c1
-rw-r--r--src/mesa/drivers/dri/r200/r200_state.c2
-rw-r--r--src/mesa/drivers/dri/r200/r200_swtcl.c1
l---------src/mesa/drivers/dri/r200/radeon_tex_getimage.c1
l---------src/mesa/drivers/dri/r200/radeon_tile.c1
l---------src/mesa/drivers/dri/r200/radeon_tile.h1
l---------src/mesa/drivers/dri/r200/server/radeon_dri.c1
-rw-r--r--src/mesa/drivers/dri/r300/Makefile6
-rw-r--r--src/mesa/drivers/dri/r300/r300_blit.c41
-rw-r--r--src/mesa/drivers/dri/r300/r300_blit.h4
-rw-r--r--src/mesa/drivers/dri/r300/r300_cmdbuf.c21
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.c7
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.h1
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c22
-rw-r--r--src/mesa/drivers/dri/r300/r300_swtcl.c1
-rw-r--r--src/mesa/drivers/dri/r300/r300_vertprog.c4
l---------src/mesa/drivers/dri/r300/radeon_tex_getimage.c1
l---------src/mesa/drivers/dri/r300/radeon_tile.c1
l---------src/mesa/drivers/dri/r300/radeon_tile.h1
l---------src/mesa/drivers/dri/r300/server/radeon_dri.c1
-rw-r--r--src/mesa/drivers/dri/r600/Makefile6
-rw-r--r--src/mesa/drivers/dri/r600/r600_blit.c18
-rw-r--r--src/mesa/drivers/dri/r600/r600_blit.h33
-rw-r--r--src/mesa/drivers/dri/r600/r600_context.c1
-rw-r--r--src/mesa/drivers/dri/r600/r700_render.c18
l---------src/mesa/drivers/dri/r600/radeon_tex_getimage.c1
l---------src/mesa/drivers/dri/r600/radeon_tile.c1
l---------src/mesa/drivers/dri/r600/radeon_tile.h1
l---------src/mesa/drivers/dri/r600/server/radeon_dri.c1
-rw-r--r--src/mesa/drivers/dri/radeon/Makefile6
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_blit.c16
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_blit.h2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_chipset.h1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common.c5
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common_context.h1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_context.c1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_dma.c16
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c71
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h9
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_screen.c1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_swtcl.c1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tex_copy.c48
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tex_getimage.c95
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texture.c73
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tile.c512
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tile.h38
-rw-r--r--src/mesa/drivers/dri/radeon/server/radeon_dri.c1337
-rw-r--r--src/mesa/drivers/dri/savage/Makefile3
-rw-r--r--src/mesa/drivers/dri/savage/savagetris.c1
-rw-r--r--src/mesa/drivers/dri/sis/Makefile4
-rw-r--r--src/mesa/drivers/dri/sis/sis_tris.c1
-rw-r--r--src/mesa/drivers/dri/swrast/swrast.c57
-rw-r--r--src/mesa/drivers/dri/swrast/swrast_priv.h9
-rw-r--r--src/mesa/drivers/dri/swrast/swrast_span.c50
-rw-r--r--src/mesa/drivers/dri/swrast/swrast_spantemp.h16
-rw-r--r--src/mesa/drivers/dri/tdfx/Makefile3
-rw-r--r--src/mesa/drivers/dri/tdfx/server/tdfx_dri.c471
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_tris.c1
-rw-r--r--src/mesa/drivers/dri/unichrome/Makefile2
-rw-r--r--src/mesa/drivers/dri/unichrome/server/via_dri.c1251
-rw-r--r--src/mesa/drivers/dri/unichrome/via_tris.c1
-rw-r--r--src/mesa/drivers/fbdev/glfbdev.c126
-rw-r--r--src/mesa/drivers/glslcompiler/glslcompiler.c4
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c78
-rw-r--r--src/mesa/drivers/windows/gdi/mesa.def1
-rw-r--r--src/mesa/drivers/windows/gdi/wmesa.c4
-rw-r--r--src/mesa/drivers/windows/gldirect/dglcontext.c2
-rw-r--r--src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c16
-rw-r--r--src/mesa/drivers/x11/fakeglx.c343
-rw-r--r--src/mesa/drivers/x11/xm_api.c113
-rw-r--r--src/mesa/drivers/x11/xm_buffer.c16
-rw-r--r--src/mesa/drivers/x11/xm_dd.c34
-rw-r--r--src/mesa/es/glapi/es_EXT.xml3
-rw-r--r--src/mesa/es/main/APIspec.xml39
-rw-r--r--src/mesa/es/main/mfeatures_es1.h2
-rw-r--r--src/mesa/es/main/mfeatures_es2.h2
-rw-r--r--src/mesa/glapi/gen/APPLE_object_purgeable.xml37
-rw-r--r--src/mesa/glapi/gen/Makefile1
-rw-r--r--src/mesa/glapi/gen/glX_proto_send.py2
-rw-r--r--src/mesa/glapi/gen/gl_API.xml1
-rw-r--r--src/mesa/glapi/gen/gl_XML.py4
-rw-r--r--src/mesa/glapi/gen/gl_x86-64_asm.py4
-rw-r--r--src/mesa/glapi/gen/gl_x86_asm.py2
-rw-r--r--src/mesa/glapi/glapi.c348
-rw-r--r--src/mesa/glapi/glapi.h86
-rw-r--r--src/mesa/glapi/glapi_getproc.c286
-rw-r--r--src/mesa/glapi/glapidispatch.h37
-rw-r--r--src/mesa/glapi/glapioffsets.h22
-rw-r--r--src/mesa/glapi/glapitable.h17
-rw-r--r--src/mesa/glapi/glapitemp.h46
-rw-r--r--src/mesa/glapi/glprocs.h640
-rw-r--r--src/mesa/glapi/glthread.c97
-rw-r--r--src/mesa/glapi/glthread.h162
-rw-r--r--src/mesa/main/api_exec.c6
-rw-r--r--src/mesa/main/api_validate.c13
-rw-r--r--src/mesa/main/blend.c3
-rw-r--r--src/mesa/main/bufferobj.c498
-rw-r--r--src/mesa/main/bufferobj.h11
-rw-r--r--src/mesa/main/clear.c27
-rw-r--r--src/mesa/main/compiler.h10
-rw-r--r--src/mesa/main/context.c17
-rw-r--r--src/mesa/main/context.h6
-rw-r--r--src/mesa/main/dd.h21
-rw-r--r--src/mesa/main/dlist.c6
-rw-r--r--src/mesa/main/drawpix.c3
-rw-r--r--src/mesa/main/enums.c6108
-rw-r--r--src/mesa/main/extensions.c4
-rw-r--r--src/mesa/main/feedback.c20
-rw-r--r--src/mesa/main/feedback.h2
-rw-r--r--src/mesa/main/framebuffer.c7
-rw-r--r--src/mesa/main/get.c24
-rw-r--r--src/mesa/main/get_gen.py6
-rw-r--r--src/mesa/main/imports.h4
-rw-r--r--src/mesa/main/light.c41
-rw-r--r--src/mesa/main/mfeatures.h1
-rw-r--r--src/mesa/main/mipmap.c4
-rw-r--r--src/mesa/main/mtypes.h5
-rw-r--r--src/mesa/main/rastpos.c39
-rw-r--r--src/mesa/main/readpix.c16
-rw-r--r--src/mesa/main/remap_helper.h3040
-rw-r--r--src/mesa/main/renderbuffer.c81
-rw-r--r--src/mesa/main/renderbuffer.h6
-rw-r--r--src/mesa/main/version.h6
-rw-r--r--src/mesa/shader/prog_execute.c13
-rw-r--r--src/mesa/shader/slang/slang_builtin.c2
-rw-r--r--src/mesa/shader/slang/slang_codegen.c5
-rw-r--r--src/mesa/sparc/glapi_sparc.S19
-rw-r--r--src/mesa/state_tracker/st_atom_clip.c4
-rw-r--r--src/mesa/state_tracker/st_cb_clear.c50
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c8
-rw-r--r--src/mesa/state_tracker/st_cb_fbo.c14
-rw-r--r--src/mesa/state_tracker/st_cb_feedback.c3
-rw-r--r--src/mesa/state_tracker/st_cb_readpixels.c18
-rw-r--r--src/mesa/state_tracker/st_context.h1
-rw-r--r--src/mesa/state_tracker/st_draw.c2
-rw-r--r--src/mesa/state_tracker/st_extensions.c16
-rw-r--r--src/mesa/state_tracker/st_format.c144
-rw-r--r--src/mesa/swrast/s_aaline.c50
-rw-r--r--src/mesa/swrast/s_aalinetemp.h32
-rw-r--r--src/mesa/swrast/s_aatriangle.c20
-rw-r--r--src/mesa/swrast/s_aatritemp.h52
-rw-r--r--src/mesa/swrast/s_accum.c6
-rw-r--r--src/mesa/swrast/s_bitmap.c15
-rw-r--r--src/mesa/swrast/s_clear.c109
-rw-r--r--src/mesa/swrast/s_context.c51
-rw-r--r--src/mesa/swrast/s_copypix.c117
-rw-r--r--src/mesa/swrast/s_drawpix.c81
-rw-r--r--src/mesa/swrast/s_feedback.c2
-rw-r--r--src/mesa/swrast/s_fog.c85
-rw-r--r--src/mesa/swrast/s_fog.h4
-rw-r--r--src/mesa/swrast/s_lines.c48
-rw-r--r--src/mesa/swrast/s_linetemp.h19
-rw-r--r--src/mesa/swrast/s_logic.c27
-rw-r--r--src/mesa/swrast/s_logic.h6
-rw-r--r--src/mesa/swrast/s_masking.c31
-rw-r--r--src/mesa/swrast/s_masking.h5
-rw-r--r--src/mesa/swrast/s_points.c56
-rw-r--r--src/mesa/swrast/s_readpix.c85
-rw-r--r--src/mesa/swrast/s_span.c396
-rw-r--r--src/mesa/swrast/s_span.h20
-rw-r--r--src/mesa/swrast/s_spantemp.h16
-rw-r--r--src/mesa/swrast/s_triangle.c29
-rw-r--r--src/mesa/swrast/s_tritemp.h50
-rw-r--r--src/mesa/swrast/s_zoom.c48
-rw-r--r--src/mesa/swrast/s_zoom.h4
-rw-r--r--src/mesa/swrast_setup/ss_context.c21
-rw-r--r--src/mesa/swrast_setup/ss_triangle.c74
-rw-r--r--src/mesa/swrast_setup/ss_tritmp.h144
-rw-r--r--src/mesa/tnl/t_context.c33
-rw-r--r--src/mesa/tnl/t_rasterpos.c52
-rw-r--r--src/mesa/tnl/t_vb_light.c37
-rw-r--r--src/mesa/tnl/t_vb_lighttmp.h173
-rw-r--r--src/mesa/tnl_dd/t_dd_tritmp.h404
-rw-r--r--src/mesa/tnl_dd/t_dd_unfilled.h117
-rw-r--r--src/mesa/x86-64/glapi_x86-64.S199
-rw-r--r--src/mesa/x86/assyntax.h2
-rw-r--r--src/mesa/x86/glapi_x86.S25
432 files changed, 13366 insertions, 19605 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index d775b5e6a2..15b3529cd2 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -62,6 +62,7 @@ struct dri2_egl_display
int dri2_major;
int dri2_minor;
__DRIscreen *dri_screen;
+ const __DRIconfig **driver_configs;
void *driver;
__DRIcoreExtension *core;
__DRIdri2Extension *dri2;
@@ -70,6 +71,9 @@ struct dri2_egl_display
__DRIimageExtension *image;
int fd;
+ char *device_name;
+ char *driver_name;
+
__DRIdri2LoaderExtension loader_extension;
__DRIimageLookupExtension image_lookup_extension;
const __DRIextension *extensions[3];
@@ -411,9 +415,9 @@ dri2_get_buffers_with_format(__DRIdrawable * driDrawable,
}
#ifdef GLX_USE_TLS
-static const char dri_driver_format[] = "%.*s/tls/%.*s_dri.so";
+static const char dri_driver_format[] = "%.*s/tls/%s_dri.so";
#else
-static const char dri_driver_format[] = "%.*s/%.*s_dri.so";
+static const char dri_driver_format[] = "%.*s/%s_dri.so";
#endif
static const char dri_driver_path[] = DEFAULT_DRIVER_DIR;
@@ -470,45 +474,32 @@ dri2_bind_extensions(struct dri2_egl_display *dri2_dpy,
return ret;
}
-/**
- * Called via eglInitialize(), GLX_drv->API.Initialize().
- */
+static char *
+dri2_strndup(const char *s, int length)
+{
+ char *d;
+
+ d = malloc(length + 1);
+ if (d == NULL)
+ return NULL;
+
+ memcpy(d, s, length);
+ d[length] = '\0';
+
+ return d;
+}
+
static EGLBoolean
-dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp,
- EGLint *major, EGLint *minor)
+dri2_connect(struct dri2_egl_display *dri2_dpy)
{
- const __DRIextension **extensions;
- const __DRIconfig **driver_configs;
- struct dri2_egl_display *dri2_dpy;
- char path[PATH_MAX], *search_paths, *p, *next, *end;
xcb_xfixes_query_version_reply_t *xfixes_query;
xcb_xfixes_query_version_cookie_t xfixes_query_cookie;
xcb_dri2_query_version_reply_t *dri2_query;
xcb_dri2_query_version_cookie_t dri2_query_cookie;
xcb_dri2_connect_reply_t *connect;
xcb_dri2_connect_cookie_t connect_cookie;
- xcb_dri2_authenticate_reply_t *authenticate;
- xcb_dri2_authenticate_cookie_t authenticate_cookie;
xcb_generic_error_t *error;
- drm_magic_t magic;
xcb_screen_iterator_t s;
- xcb_depth_iterator_t d;
- xcb_visualtype_t *visuals;
- int i, j, id;
-
- dri2_dpy = malloc(sizeof *dri2_dpy);
- if (!dri2_dpy)
- return _eglError(EGL_BAD_ALLOC, "eglInitialize");
-
- disp->DriverData = (void *) dri2_dpy;
- if (disp->NativeDisplay != NULL)
- dri2_dpy->conn = XGetXCBConnection(disp->NativeDisplay);
- else
- dri2_dpy->conn = xcb_connect(0, 0);
- if (!dri2_dpy->conn) {
- _eglLog(_EGL_WARNING, "DRI2: xcb_connect failed");
- goto cleanup_dpy;
- }
xcb_prefetch_extension_data (dri2_dpy->conn, &xcb_xfixes_id);
xcb_prefetch_extension_data (dri2_dpy->conn, &xcb_dri2_id);
@@ -533,7 +524,7 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp,
error != NULL || xfixes_query->major_version < 2) {
_eglLog(_EGL_FATAL, "DRI2: failed to query xfixes version");
free(error);
- goto cleanup_conn;
+ return EGL_FALSE;
}
free(xfixes_query);
@@ -542,7 +533,7 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp,
if (dri2_query == NULL || error != NULL) {
_eglLog(_EGL_FATAL, "DRI2: failed to query version");
free(error);
- goto cleanup_conn;
+ return EGL_FALSE;
}
dri2_dpy->dri2_major = dri2_query->major_version;
dri2_dpy->dri2_minor = dri2_query->minor_version;
@@ -552,7 +543,126 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp,
if (connect == NULL ||
connect->driver_name_length + connect->device_name_length == 0) {
_eglLog(_EGL_FATAL, "DRI2: failed to authenticate");
- goto cleanup_connect;
+ return EGL_FALSE;
+ }
+
+ dri2_dpy->device_name =
+ dri2_strndup(xcb_dri2_connect_device_name (connect),
+ xcb_dri2_connect_device_name_length (connect));
+
+ dri2_dpy->driver_name =
+ dri2_strndup(xcb_dri2_connect_driver_name (connect),
+ xcb_dri2_connect_driver_name_length (connect));
+
+ if (dri2_dpy->device_name == NULL || dri2_dpy->driver_name == NULL) {
+ free(dri2_dpy->device_name);
+ free(dri2_dpy->driver_name);
+ free(connect);
+ return EGL_FALSE;
+ }
+ free(connect);
+
+ return EGL_TRUE;
+}
+
+static EGLBoolean
+dri2_authenticate(struct dri2_egl_display *dri2_dpy)
+{
+ xcb_dri2_authenticate_reply_t *authenticate;
+ xcb_dri2_authenticate_cookie_t authenticate_cookie;
+ xcb_screen_iterator_t s;
+ drm_magic_t magic;
+
+ if (drmGetMagic(dri2_dpy->fd, &magic)) {
+ _eglLog(_EGL_FATAL, "DRI2: failed to get drm magic");
+ return EGL_FALSE;
+ }
+
+ s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
+ authenticate_cookie =
+ xcb_dri2_authenticate_unchecked(dri2_dpy->conn, s.data->root, magic);
+ authenticate =
+ xcb_dri2_authenticate_reply(dri2_dpy->conn, authenticate_cookie, NULL);
+ if (authenticate == NULL || !authenticate->authenticated) {
+ _eglLog(_EGL_FATAL, "DRI2: failed to authenticate");
+ free(authenticate);
+ return EGL_FALSE;
+ }
+
+ free(authenticate);
+
+ return EGL_TRUE;
+}
+
+static EGLBoolean
+dri2_add_configs_for_visuals(struct dri2_egl_display *dri2_dpy,
+ _EGLDisplay *disp)
+{
+ xcb_screen_iterator_t s;
+ xcb_depth_iterator_t d;
+ xcb_visualtype_t *visuals;
+ int i, j, id;
+
+ s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
+ d = xcb_screen_allowed_depths_iterator(s.data);
+ id = 1;
+ while (d.rem > 0) {
+ EGLBoolean class_added[6] = { 0, };
+
+ visuals = xcb_depth_visuals(d.data);
+ for (i = 0; i < xcb_depth_visuals_length(d.data); i++) {
+ if (class_added[visuals[i]._class])
+ continue;
+
+ class_added[visuals[i]._class] = EGL_TRUE;
+ for (j = 0; dri2_dpy->driver_configs[j]; j++)
+ dri2_add_config(disp, dri2_dpy->driver_configs[j],
+ id++, d.data->depth, &visuals[i]);
+ }
+
+ xcb_depth_next(&d);
+ }
+
+ if (!disp->NumConfigs) {
+ _eglLog(_EGL_WARNING, "DRI2: failed to create any config");
+ return EGL_FALSE;
+ }
+
+ return EGL_TRUE;
+}
+
+/**
+ * Called via eglInitialize(), GLX_drv->API.Initialize().
+ */
+static EGLBoolean
+dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLint *major, EGLint *minor)
+{
+ const __DRIextension **extensions;
+ struct dri2_egl_display *dri2_dpy;
+ char path[PATH_MAX], *search_paths, *p, *next, *end;
+
+ dri2_dpy = malloc(sizeof *dri2_dpy);
+ if (!dri2_dpy)
+ return _eglError(EGL_BAD_ALLOC, "eglInitialize");
+
+ disp->DriverData = (void *) dri2_dpy;
+ if (disp->NativeDisplay == NULL) {
+ dri2_dpy->conn = xcb_connect(0, 0);
+ if (!dri2_dpy->conn) {
+ _eglLog(_EGL_WARNING, "DRI2: xcb_connect failed");
+ goto cleanup_dpy;
+ }
+ } else {
+ dri2_dpy->conn = XGetXCBConnection(disp->NativeDisplay);
+ }
+
+ if (dri2_dpy->conn == NULL)
+ goto cleanup_conn;
+
+ if (dri2_dpy->conn) {
+ if (!dri2_connect(dri2_dpy))
+ goto cleanup_conn;
}
search_paths = NULL;
@@ -571,11 +681,7 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp,
next = end;
snprintf(path, sizeof path,
- dri_driver_format,
- (int) (next - p), p,
- xcb_dri2_connect_driver_name_length (connect),
- xcb_dri2_connect_driver_name (connect));
-
+ dri_driver_format, (int) (next - p), p, dri2_dpy->driver_name);
dri2_dpy->driver = dlopen(path, RTLD_NOW | RTLD_GLOBAL);
}
@@ -583,7 +689,7 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp,
_eglLog(_EGL_FATAL,
"DRI2: failed to open any driver (search paths %s)",
search_paths);
- goto cleanup_connect;
+ goto cleanup_conn;
}
_eglLog(_EGL_DEBUG, "DRI2: dlopen(%s)", path);
@@ -597,32 +703,18 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp,
if (!dri2_bind_extensions(dri2_dpy, dri2_driver_extensions, extensions))
goto cleanup_driver;
- snprintf(path, sizeof path, "%.*s",
- xcb_dri2_connect_device_name_length (connect),
- xcb_dri2_connect_device_name (connect));
- dri2_dpy->fd = open (path, O_RDWR);
+ dri2_dpy->fd = open(dri2_dpy->device_name, O_RDWR);
if (dri2_dpy->fd == -1) {
_eglLog(_EGL_FATAL,
"DRI2: could not open %s (%s)", path, strerror(errno));
goto cleanup_driver;
}
- if (drmGetMagic(dri2_dpy->fd, &magic)) {
- _eglLog(_EGL_FATAL, "DRI2: failed to get drm magic");
- goto cleanup_fd;
- }
-
- authenticate_cookie = xcb_dri2_authenticate_unchecked (dri2_dpy->conn,
- s.data->root, magic);
- authenticate = xcb_dri2_authenticate_reply (dri2_dpy->conn,
- authenticate_cookie, NULL);
- if (authenticate == NULL || !authenticate->authenticated) {
- _eglLog(_EGL_FATAL, "DRI2: failed to authenticate");
- free(authenticate);
- goto cleanup_fd;
+ if (dri2_dpy->conn) {
+ if (!dri2_authenticate(dri2_dpy))
+ goto cleanup_fd;
}
- free(authenticate);
if (dri2_dpy->dri2_minor >= 1) {
dri2_dpy->loader_extension.base.name = __DRI_DRI2_LOADER;
dri2_dpy->loader_extension.base.version = 3;
@@ -648,7 +740,7 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp,
dri2_dpy->dri_screen =
dri2_dpy->dri2->createNewScreen(0, dri2_dpy->fd, dri2_dpy->extensions,
- &driver_configs, dri2_dpy);
+ &dri2_dpy->driver_configs, dri2_dpy);
if (dri2_dpy->dri_screen == NULL) {
_eglLog(_EGL_FATAL, "DRI2: failed to create dri screen");
@@ -659,30 +751,9 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp,
if (!dri2_bind_extensions(dri2_dpy, dri2_core_extensions, extensions))
goto cleanup_dri_screen;
- s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
- d = xcb_screen_allowed_depths_iterator(s.data);
- id = 1;
- while (d.rem > 0) {
- EGLBoolean class_added[6] = { 0, };
-
- visuals = xcb_depth_visuals(d.data);
- for (i = 0; i < xcb_depth_visuals_length(d.data); i++) {
- if (class_added[visuals[i]._class])
- continue;
-
- class_added[visuals[i]._class] = EGL_TRUE;
- for (j = 0; driver_configs[j]; j++)
- dri2_add_config(disp, driver_configs[j],
- id++, d.data->depth, &visuals[i]);
-
- }
-
- xcb_depth_next(&d);
- }
-
- if (!disp->NumConfigs) {
- _eglLog(_EGL_WARNING, "DRI2: failed to create any config");
- goto cleanup_configs;
+ if (dri2_dpy->conn) {
+ if (!dri2_add_configs_for_visuals(dri2_dpy, disp))
+ goto cleanup_configs;
}
disp->ClientAPIsMask = EGL_OPENGL_BIT;
@@ -693,7 +764,7 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp,
/* we're supporting EGL 1.4 */
*major = 1;
*minor = 4;
- free (connect);
+
return EGL_TRUE;
cleanup_configs:
@@ -704,8 +775,6 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp,
close(dri2_dpy->fd);
cleanup_driver:
dlclose(dri2_dpy->driver);
- cleanup_connect:
- free(connect);
cleanup_conn:
if (disp->NativeDisplay == NULL)
xcb_disconnect(dri2_dpy->conn);
diff --git a/src/egl/main/eglcompiler.h b/src/egl/main/eglcompiler.h
index d844fbb0ef..401a9cf56a 100644
--- a/src/egl/main/eglcompiler.h
+++ b/src/egl/main/eglcompiler.h
@@ -64,8 +64,7 @@
/**
* Function visibility
*/
-#if (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303) \
- || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+#if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define PUBLIC __attribute__((visibility("default")))
#else
# define PUBLIC
@@ -79,7 +78,7 @@
#ifndef __FUNCTION__
# if defined(__VMS)
# define __FUNCTION__ "VMS$NL:"
-# elif ((!defined __GNUC__) || (__GNUC__ < 2)) && (!defined __xlC__) && \
+# elif (!defined __GNUC__) && (!defined __xlC__) && \
(!defined(_MSC_VER) || _MSC_VER < 1300)
# if (__STDC_VERSION__ >= 199901L) /* C99 */ || \
(defined(__SUNPRO_C) && defined(__C99FEATURES__))
diff --git a/src/gallium/auxiliary/Makefile b/src/gallium/auxiliary/Makefile
index 60f9c2ae3c..68b1a3e854 100644
--- a/src/gallium/auxiliary/Makefile
+++ b/src/gallium/auxiliary/Makefile
@@ -107,6 +107,7 @@ C_SOURCES = \
util/u_draw_quad.c \
util/u_format_access.c \
util/u_format_table.c \
+ util/u_format_tests.c \
util/u_gen_mipmap.c \
util/u_handle_table.c \
util/u_hash_table.c \
@@ -158,7 +159,7 @@ GALLIVM_SOURCES = \
gallivm/lp_bld_type.c
GALLIVM_CPP_SOURCES = \
- gallivm/lp_bld_misc.cpp
+ gallivm/lp_bld_init.cpp
GENERATED_SOURCES = \
indices/u_indices_gen.c \
diff --git a/src/gallium/auxiliary/SConscript b/src/gallium/auxiliary/SConscript
index 47de50bf3e..d6185bcb5e 100644
--- a/src/gallium/auxiliary/SConscript
+++ b/src/gallium/auxiliary/SConscript
@@ -7,6 +7,8 @@ env.Append(CPPPATH = [
'util',
])
+env.Tool('udis86')
+
env.CodeGenerate(
target = 'indices/u_indices_gen.c',
script = 'indices/u_indices_gen.py',
@@ -149,6 +151,7 @@ source = [
'util/u_draw_quad.c',
'util/u_format_access.c',
'util/u_format_table.c',
+ 'util/u_format_tests.c',
'util/u_gen_mipmap.c',
'util/u_handle_table.c',
'util/u_hash.c',
@@ -192,7 +195,7 @@ if drawllvm:
'gallivm/lp_bld_interp.c',
'gallivm/lp_bld_intr.c',
'gallivm/lp_bld_logic.c',
- 'gallivm/lp_bld_misc.cpp',
+ 'gallivm/lp_bld_init.cpp',
'gallivm/lp_bld_pack.c',
'gallivm/lp_bld_sample.c',
'gallivm/lp_bld_sample_soa.c',
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
index b5241fa64c..a7335c340c 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -90,6 +90,9 @@ struct cso_context {
void *fragment_shader, *fragment_shader_saved, *geometry_shader;
void *vertex_shader, *vertex_shader_saved, *geometry_shader_saved;
+ struct pipe_clip_state clip;
+ struct pipe_clip_state clip_saved;
+
struct pipe_framebuffer_state fb, fb_saved;
struct pipe_viewport_state vp, vp_saved;
struct pipe_blend_color blend_color;
@@ -1126,3 +1129,54 @@ void cso_restore_geometry_shader(struct cso_context *ctx)
}
ctx->geometry_shader_saved = NULL;
}
+
+
+/* clip state */
+
+static INLINE void
+clip_state_cpy(struct pipe_clip_state *dst,
+ const struct pipe_clip_state *src)
+{
+ dst->nr = src->nr;
+ if (src->nr) {
+ memcpy(dst->ucp, src->ucp, src->nr * sizeof(src->ucp[0]));
+ }
+}
+
+static INLINE int
+clip_state_cmp(const struct pipe_clip_state *a,
+ const struct pipe_clip_state *b)
+{
+ if (a->nr != b->nr) {
+ return 1;
+ }
+ if (a->nr) {
+ return memcmp(a->ucp, b->ucp, a->nr * sizeof(a->ucp[0]));
+ }
+ return 0;
+}
+
+void
+cso_set_clip(struct cso_context *ctx,
+ const struct pipe_clip_state *clip)
+{
+ if (clip_state_cmp(&ctx->clip, clip)) {
+ clip_state_cpy(&ctx->clip, clip);
+ ctx->pipe->set_clip_state(ctx->pipe, clip);
+ }
+}
+
+void
+cso_save_clip(struct cso_context *ctx)
+{
+ clip_state_cpy(&ctx->clip_saved, &ctx->clip);
+}
+
+void
+cso_restore_clip(struct cso_context *ctx)
+{
+ if (clip_state_cmp(&ctx->clip, &ctx->clip_saved)) {
+ clip_state_cpy(&ctx->clip, &ctx->clip_saved);
+ ctx->pipe->set_clip_state(ctx->pipe, &ctx->clip_saved);
+ }
+}
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.h b/src/gallium/auxiliary/cso_cache/cso_context.h
index 707b3c2cee..251a9a644f 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.h
+++ b/src/gallium/auxiliary/cso_cache/cso_context.h
@@ -180,6 +180,19 @@ void cso_save_stencil_ref(struct cso_context *cso);
void cso_restore_stencil_ref(struct cso_context *cso);
+/* clip state */
+
+void
+cso_set_clip(struct cso_context *cso,
+ const struct pipe_clip_state *clip);
+
+void
+cso_save_clip(struct cso_context *cso);
+
+void
+cso_restore_clip(struct cso_context *cso);
+
+
#ifdef __cplusplus
}
#endif
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
index d5ddc4a6a9..bb0988543f 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
@@ -128,9 +128,7 @@ void draw_set_rasterizer_state( struct draw_context *draw,
draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE );
draw->rasterizer = raster;
- draw->bypass_clipping =
- ((draw->rasterizer && draw->rasterizer->bypass_vs_clip_and_viewport) ||
- draw->driver.bypass_clipping);
+ draw->bypass_clipping = draw->driver.bypass_clipping;
}
@@ -140,9 +138,7 @@ void draw_set_driver_clipping( struct draw_context *draw,
draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE );
draw->driver.bypass_clipping = bypass_clipping;
- draw->bypass_clipping =
- ((draw->rasterizer && draw->rasterizer->bypass_vs_clip_and_viewport) ||
- draw->driver.bypass_clipping);
+ draw->bypass_clipping = draw->driver.bypass_clipping;
}
diff --git a/src/gallium/auxiliary/draw/draw_pipe_vbuf.c b/src/gallium/auxiliary/draw/draw_pipe_vbuf.c
index d40c035240..2709957961 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_vbuf.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_vbuf.c
@@ -262,7 +262,7 @@ vbuf_start_prim( struct vbuf_stage *vbuf, uint prim )
src_offset = 0;
break;
case EMIT_4UB:
- output_format = PIPE_FORMAT_B8G8R8A8_UNORM;
+ output_format = PIPE_FORMAT_A8R8G8B8_UNORM;
emit_sz = 4 * sizeof(ubyte);
break;
default:
diff --git a/src/gallium/auxiliary/draw/draw_pt.c b/src/gallium/auxiliary/draw/draw_pt.c
index 341353f628..6d90a6c42f 100644
--- a/src/gallium/auxiliary/draw/draw_pt.c
+++ b/src/gallium/auxiliary/draw/draw_pt.c
@@ -87,9 +87,7 @@ draw_pt_arrays(struct draw_context *draw,
opt |= PT_CLIPTEST;
}
- if (!draw->rasterizer->bypass_vs_clip_and_viewport) {
- opt |= PT_SHADE;
- }
+ opt |= PT_SHADE;
}
if (opt == 0)
diff --git a/src/gallium/auxiliary/draw/draw_pt_emit.c b/src/gallium/auxiliary/draw/draw_pt_emit.c
index 4fb53276bb..ae357b5122 100644
--- a/src/gallium/auxiliary/draw/draw_pt_emit.c
+++ b/src/gallium/auxiliary/draw/draw_pt_emit.c
@@ -112,7 +112,7 @@ void draw_pt_emit_prepare( struct pt_emit *emit,
src_offset = 0;
break;
case EMIT_4UB:
- output_format = PIPE_FORMAT_B8G8R8A8_UNORM;
+ output_format = PIPE_FORMAT_A8R8G8B8_UNORM;
emit_sz = 4 * sizeof(ubyte);
break;
default:
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c
index c5dfbcfa3c..1aecb51077 100644
--- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c
+++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c
@@ -100,8 +100,7 @@ static void fse_prepare( struct draw_pt_middle_end *middle,
fse->key.nr_elements = MAX2(fse->key.nr_outputs, /* outputs - translate to hw format */
fse->key.nr_inputs); /* inputs - fetch from api format */
- fse->key.viewport = (!draw->rasterizer->bypass_vs_clip_and_viewport &&
- !draw->identity_viewport);
+ fse->key.viewport = !draw->identity_viewport;
fse->key.clip = !draw->bypass_clipping;
fse->key.const_vbuffers = 0;
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c
index 56b69354b2..da5106463a 100644
--- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c
+++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c
@@ -96,8 +96,7 @@ static void fetch_pipeline_prepare( struct draw_pt_middle_end *middle,
*/
draw_pt_post_vs_prepare( fpme->post_vs,
(boolean)draw->bypass_clipping,
- (boolean)(draw->identity_viewport ||
- draw->rasterizer->bypass_vs_clip_and_viewport),
+ (boolean)draw->identity_viewport,
(boolean)draw->rasterizer->gl_rasterization_rules,
(draw->vs.edgeflag_output ? true : false) );
@@ -154,9 +153,7 @@ static void fetch_pipeline_run( struct draw_pt_middle_end *middle,
(char *)pipeline_verts );
/* Run the shader, note that this overwrites the data[] parts of
- * the pipeline verts. If there is no shader, eg if
- * bypass_vs_clip_and_viewport, then the inputs == outputs, and are
- * already in the correct place.
+ * the pipeline verts.
*/
if (opt & PT_SHADE)
{
@@ -239,9 +236,7 @@ static void fetch_pipeline_linear_run( struct draw_pt_middle_end *middle,
(char *)pipeline_verts );
/* Run the shader, note that this overwrites the data[] parts of
- * the pipeline verts. If there is no shader, ie if
- * bypass_vs_clip_and_viewport, then the inputs == outputs, and are
- * already in the correct place.
+ * the pipeline verts.
*/
if (opt & PT_SHADE)
{
@@ -319,9 +314,7 @@ static boolean fetch_pipeline_linear_run_elts( struct draw_pt_middle_end *middle
(char *)pipeline_verts );
/* Run the shader, note that this overwrites the data[] parts of
- * the pipeline verts. If there is no shader, ie if
- * bypass_vs_clip_and_viewport, then the inputs == outputs, and are
- * already in the correct place.
+ * the pipeline verts.
*/
if (opt & PT_SHADE)
{
diff --git a/src/gallium/auxiliary/draw/draw_vs_aos_io.c b/src/gallium/auxiliary/draw/draw_vs_aos_io.c
index a6eb37d128..ece1ddde0c 100644
--- a/src/gallium/auxiliary/draw/draw_vs_aos_io.c
+++ b/src/gallium/auxiliary/draw/draw_vs_aos_io.c
@@ -191,7 +191,7 @@ static boolean load_input( struct aos_compilation *cp,
case PIPE_FORMAT_R32G32B32A32_FLOAT:
emit_load_R32G32B32A32(cp, dataXMM, src);
break;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
emit_load_R8G8B8A8_UNORM(cp, dataXMM, src);
emit_swizzle(cp, dataXMM, dataXMM, SHUF(Z,Y,X,W));
break;
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
index bbce31f9eb..32f9e5201c 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
@@ -669,6 +669,14 @@ lp_build_abs(struct lp_build_context *bld,
LLVMValueRef
+lp_build_negate(struct lp_build_context *bld,
+ LLVMValueRef a)
+{
+ return LLVMBuildNeg(bld->builder, a, "");
+}
+
+
+LLVMValueRef
lp_build_sgn(struct lp_build_context *bld,
LLVMValueRef a)
{
@@ -710,6 +718,41 @@ lp_build_sgn(struct lp_build_context *bld,
/**
+ * Set the sign of float vector 'a' according to 'sign'.
+ * If sign==0, return abs(a).
+ * If sign==1, return -abs(a);
+ * Other values for sign produce undefined results.
+ */
+LLVMValueRef
+lp_build_set_sign(struct lp_build_context *bld,
+ LLVMValueRef a, LLVMValueRef sign)
+{
+ const struct lp_type type = bld->type;
+ LLVMTypeRef int_vec_type = lp_build_int_vec_type(type);
+ LLVMTypeRef vec_type = lp_build_vec_type(type);
+ LLVMValueRef shift = lp_build_int_const_scalar(type, type.width - 1);
+ LLVMValueRef mask = lp_build_int_const_scalar(type,
+ ~((unsigned long long) 1 << (type.width - 1)));
+ LLVMValueRef val, res;
+
+ assert(type.floating);
+
+ /* val = reinterpret_cast<int>(a) */
+ val = LLVMBuildBitCast(bld->builder, a, int_vec_type, "");
+ /* val = val & mask */
+ val = LLVMBuildAnd(bld->builder, val, mask, "");
+ /* sign = sign << shift */
+ sign = LLVMBuildShl(bld->builder, sign, shift, "");
+ /* res = val | sign */
+ res = LLVMBuildOr(bld->builder, val, sign, "");
+ /* res = reinterpret_cast<float>(res) */
+ res = LLVMBuildBitCast(bld->builder, res, vec_type, "");
+
+ return res;
+}
+
+
+/**
* Convert vector of int to vector of float.
*/
LLVMValueRef
@@ -857,6 +900,19 @@ lp_build_ceil(struct lp_build_context *bld,
/**
+ * Return fractional part of 'a' computed as a - floor(f)
+ * Typically used in texture coord arithmetic.
+ */
+LLVMValueRef
+lp_build_fract(struct lp_build_context *bld,
+ LLVMValueRef a)
+{
+ assert(bld->type.floating);
+ return lp_build_sub(bld, a, lp_build_floor(bld, a));
+}
+
+
+/**
* Convert to integer, through whichever rounding method that's fastest,
* typically truncating toward zero.
*/
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.h b/src/gallium/auxiliary/gallivm/lp_bld_arit.h
index da84b7ca02..55385e3a66 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_arit.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.h
@@ -117,10 +117,18 @@ lp_build_abs(struct lp_build_context *bld,
LLVMValueRef a);
LLVMValueRef
+lp_build_negate(struct lp_build_context *bld,
+ LLVMValueRef a);
+
+LLVMValueRef
lp_build_sgn(struct lp_build_context *bld,
LLVMValueRef a);
LLVMValueRef
+lp_build_set_sign(struct lp_build_context *bld,
+ LLVMValueRef a, LLVMValueRef sign);
+
+LLVMValueRef
lp_build_int_to_float(struct lp_build_context *bld,
LLVMValueRef a);
@@ -141,6 +149,10 @@ lp_build_trunc(struct lp_build_context *bld,
LLVMValueRef a);
LLVMValueRef
+lp_build_fract(struct lp_build_context *bld,
+ LLVMValueRef a);
+
+LLVMValueRef
lp_build_ifloor(struct lp_build_context *bld,
LLVMValueRef a);
LLVMValueRef
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_init.cpp
index 6e79438ead..067397a520 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.cpp
@@ -26,39 +26,34 @@
**************************************************************************/
-#include "pipe/p_config.h"
+#include <llvm/Config/config.h>
+#include <llvm/Target/TargetSelect.h>
+#include <llvm/Target/TargetOptions.h>
-#include "lp_bld_misc.h"
+#include "pipe/p_config.h"
+#include "lp_bld_init.h"
-#ifndef LLVM_NATIVE_ARCH
-namespace llvm {
- extern void LinkInJIT();
-}
+extern "C" void LLVMLinkInJIT();
-void
-LLVMLinkInJIT(void)
+extern "C" void
+lp_build_init(void)
{
- llvm::LinkInJIT();
-}
-
-
-extern "C" int X86TargetMachineModule;
-
-
-int
-LLVMInitializeNativeTarget(void)
-{
-#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
- X86TargetMachineModule = 1;
+#if defined(PIPE_OS_WINDOWS) && defined(PIPE_ARCH_X86)
+ /*
+ * This is mis-detected on some hardware / software combinations.
+ */
+ llvm::StackAlignment = 4;
+ llvm::RealignStack = true;
#endif
- return 0;
-}
+ /* Same as LLVMInitializeNativeTarget(); */
+ llvm::InitializeNativeTarget();
-#endif
+ LLVMLinkInJIT();
+}
/*
@@ -69,7 +64,6 @@ LLVMInitializeNativeTarget(void)
*/
#if defined(_MSC_VER) && defined(_DEBUG)
#include <crtdefs.h>
-extern "C" {
- _CRTIMP void __cdecl _invalid_parameter_noinfo(void) {}
-}
+extern "C" _CRTIMP void __cdecl
+_invalid_parameter_noinfo(void) {}
#endif
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.h b/src/gallium/auxiliary/gallivm/lp_bld_init.h
index 0e787e0b9c..07f50d1c43 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.h
@@ -26,26 +26,17 @@
**************************************************************************/
-#ifndef LP_BLD_MISC_H
-#define LP_BLD_MISC_H
+#ifndef LP_BLD_INIT_H
+#define LP_BLD_INIT_H
-#include "llvm/Config/config.h"
-
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef LLVM_NATIVE_ARCH
-
void
-LLVMLinkInJIT(void);
-
-int
-LLVMInitializeNativeTarget(void);
-
-#endif /* !LLVM_NATIVE_ARCH */
+lp_build_init(void);
#ifdef __cplusplus
@@ -53,4 +44,4 @@ LLVMInitializeNativeTarget(void);
#endif
-#endif /* !LP_BLD_MISC_H */
+#endif /* !LP_BLD_INIT_H */
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_logic.c b/src/gallium/auxiliary/gallivm/lp_bld_logic.c
index 41ac81b744..2726747eae 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_logic.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_logic.c
@@ -45,6 +45,7 @@
/**
* Build code to compare two values 'a' and 'b' of 'type' using the given func.
* \param func one of PIPE_FUNC_x
+ * The result values will be 0 for false or ~0 for true.
*/
LLVMValueRef
lp_build_compare(LLVMBuilderRef builder,
@@ -311,6 +312,7 @@ lp_build_compare(LLVMBuilderRef builder,
/**
* Build code to compare two values 'a' and 'b' using the given func.
* \param func one of PIPE_FUNC_x
+ * The result values will be 0 for false or ~0 for true.
*/
LLVMValueRef
lp_build_cmp(struct lp_build_context *bld,
@@ -322,6 +324,9 @@ lp_build_cmp(struct lp_build_context *bld,
}
+/**
+ * Return mask ? a : b;
+ */
LLVMValueRef
lp_build_select(struct lp_build_context *bld,
LLVMValueRef mask,
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_pack.c b/src/gallium/auxiliary/gallivm/lp_bld_pack.c
index bc360ad77a..4c61d10749 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_pack.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_pack.c
@@ -256,7 +256,9 @@ lp_build_pack2(LLVMBuilderRef builder,
LLVMValueRef lo,
LLVMValueRef hi)
{
+#if !(HAVE_LLVM >= 0x0207)
LLVMTypeRef src_vec_type = lp_build_vec_type(src_type);
+#endif
LLVMTypeRef dst_vec_type = lp_build_vec_type(dst_type);
LLVMValueRef shuffle;
LLVMValueRef res;
@@ -272,11 +274,14 @@ lp_build_pack2(LLVMBuilderRef builder,
switch(src_type.width) {
case 32:
if(dst_type.sign) {
+#if HAVE_LLVM >= 0x0207
+ res = lp_build_intrinsic_binary(builder, "llvm.x86.sse2.packssdw.128", dst_vec_type, lo, hi);
+#else
res = lp_build_intrinsic_binary(builder, "llvm.x86.sse2.packssdw.128", src_vec_type, lo, hi);
+#endif
}
else {
if (util_cpu_caps.has_sse4_1) {
- /* PACKUSDW is the only instrinsic with a consistent signature */
return lp_build_intrinsic_binary(builder, "llvm.x86.sse41.packusdw", dst_vec_type, lo, hi);
}
else {
@@ -288,9 +293,17 @@ lp_build_pack2(LLVMBuilderRef builder,
case 16:
if(dst_type.sign)
+#if HAVE_LLVM >= 0x0207
+ res = lp_build_intrinsic_binary(builder, "llvm.x86.sse2.packsswb.128", dst_vec_type, lo, hi);
+#else
res = lp_build_intrinsic_binary(builder, "llvm.x86.sse2.packsswb.128", src_vec_type, lo, hi);
+#endif
else
+#if HAVE_LLVM >= 0x0207
+ res = lp_build_intrinsic_binary(builder, "llvm.x86.sse2.packuswb.128", dst_vec_type, lo, hi);
+#else
res = lp_build_intrinsic_binary(builder, "llvm.x86.sse2.packuswb.128", src_vec_type, lo, hi);
+#endif
break;
default:
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
index a133b56ac5..29cadcc15a 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
@@ -44,6 +44,11 @@
#include "lp_bld_sample.h"
+/**
+ * Initialize lp_sampler_static_state object with the gallium sampler
+ * and texture state.
+ * The former is considered to be static and the later dynamic.
+ */
void
lp_sampler_static_state(struct lp_sampler_static_state *state,
const struct pipe_texture *texture,
@@ -57,6 +62,18 @@ lp_sampler_static_state(struct lp_sampler_static_state *state,
if(!sampler)
return;
+ /*
+ * We don't copy sampler state over unless it is actually enabled, to avoid
+ * spurious recompiles, as the sampler static state is part of the shader
+ * key.
+ *
+ * Ideally the state tracker or cso_cache module would make all state
+ * canonical, but until that happens it's better to be safe than sorry here.
+ *
+ * XXX: Actually there's much more than can be done here, especially
+ * regarding 1D/2D/3D/CUBE textures, wrap modes, etc.
+ */
+
state->format = texture->format;
state->target = texture->target;
state->pot_width = util_is_pot(texture->width0);
@@ -69,11 +86,20 @@ lp_sampler_static_state(struct lp_sampler_static_state *state,
state->min_img_filter = sampler->min_img_filter;
state->min_mip_filter = sampler->min_mip_filter;
state->mag_img_filter = sampler->mag_img_filter;
+
state->compare_mode = sampler->compare_mode;
- if(sampler->compare_mode != PIPE_TEX_COMPARE_NONE) {
- state->compare_func = sampler->compare_func;
+ if (sampler->compare_mode != PIPE_TEX_COMPARE_NONE) {
+ state->compare_func = sampler->compare_func;
}
+
state->normalized_coords = sampler->normalized_coords;
+ state->lod_bias = sampler->lod_bias;
+ state->min_lod = sampler->min_lod;
+ state->max_lod = sampler->max_lod;
+ state->border_color[0] = sampler->border_color[0];
+ state->border_color[1] = sampler->border_color[1];
+ state->border_color[2] = sampler->border_color[2];
+ state->border_color[3] = sampler->border_color[3];
}
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.h b/src/gallium/auxiliary/gallivm/lp_bld_sample.h
index 39edcf13d1..5ba0925bb6 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.h
@@ -70,6 +70,8 @@ struct lp_sampler_static_state
unsigned compare_mode:1;
unsigned compare_func:3;
unsigned normalized_coords:1;
+ float lod_bias, min_lod, max_lod;
+ float border_color[4];
};
@@ -98,6 +100,18 @@ struct lp_sampler_dynamic_state
LLVMBuilderRef builder,
unsigned unit);
+ /** Obtain the base texture depth. */
+ LLVMValueRef
+ (*depth)( struct lp_sampler_dynamic_state *state,
+ LLVMBuilderRef builder,
+ unsigned unit);
+
+ /** Obtain the number of mipmap levels (minus one). */
+ LLVMValueRef
+ (*last_level)( struct lp_sampler_dynamic_state *state,
+ LLVMBuilderRef builder,
+ unsigned unit);
+
LLVMValueRef
(*stride)( struct lp_sampler_dynamic_state *state,
LLVMBuilderRef builder,
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
index e268862282..bc2f307c33 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
@@ -69,7 +69,11 @@ struct lp_build_sample_context
struct lp_type coord_type;
struct lp_build_context coord_bld;
- /** Integer coordinates */
+ /** Unsigned integer coordinates */
+ struct lp_type uint_coord_type;
+ struct lp_build_context uint_coord_bld;
+
+ /** Signed integer coordinates */
struct lp_type int_coord_type;
struct lp_build_context int_coord_bld;
@@ -79,18 +83,93 @@ struct lp_build_sample_context
};
+/**
+ * Does the given texture wrap mode allow sampling the texture border color?
+ * XXX maybe move this into gallium util code.
+ */
+static boolean
+wrap_mode_uses_border_color(unsigned mode)
+{
+ switch (mode) {
+ case PIPE_TEX_WRAP_REPEAT:
+ case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
+ case PIPE_TEX_WRAP_MIRROR_REPEAT:
+ case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE:
+ return FALSE;
+ case PIPE_TEX_WRAP_CLAMP:
+ case PIPE_TEX_WRAP_CLAMP_TO_BORDER:
+ case PIPE_TEX_WRAP_MIRROR_CLAMP:
+ case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER:
+ return TRUE;
+ default:
+ assert(0 && "unexpected wrap mode");
+ return FALSE;
+ }
+}
+
+
+
+/**
+ * Gen code to fetch a texel from a texture at int coords (x, y).
+ * The result, texel, will be:
+ * texel[0] = red values
+ * texel[1] = green values
+ * texel[2] = blue values
+ * texel[3] = alpha values
+ */
static void
lp_build_sample_texel_soa(struct lp_build_sample_context *bld,
+ LLVMValueRef width,
+ LLVMValueRef height,
LLVMValueRef x,
LLVMValueRef y,
LLVMValueRef y_stride,
LLVMValueRef data_ptr,
LLVMValueRef *texel)
{
+ struct lp_build_context *int_coord_bld = &bld->int_coord_bld;
LLVMValueRef offset;
LLVMValueRef packed;
+ LLVMValueRef use_border = NULL;
+
+ /* use_border = x < 0 || x >= width || y < 0 || y >= height */
+ if (wrap_mode_uses_border_color(bld->static_state->wrap_s)) {
+ LLVMValueRef b1, b2;
+ b1 = lp_build_cmp(int_coord_bld, PIPE_FUNC_LESS, x, int_coord_bld->zero);
+ b2 = lp_build_cmp(int_coord_bld, PIPE_FUNC_GEQUAL, x, width);
+ use_border = LLVMBuildOr(bld->builder, b1, b2, "b1_or_b2");
+ }
- offset = lp_build_sample_offset(&bld->int_coord_bld,
+ if (wrap_mode_uses_border_color(bld->static_state->wrap_t)) {
+ LLVMValueRef b1, b2;
+ b1 = lp_build_cmp(int_coord_bld, PIPE_FUNC_LESS, y, int_coord_bld->zero);
+ b2 = lp_build_cmp(int_coord_bld, PIPE_FUNC_GEQUAL, y, height);
+ if (use_border) {
+ use_border = LLVMBuildOr(bld->builder, use_border, b1, "ub_or_b1");
+ use_border = LLVMBuildOr(bld->builder, use_border, b2, "ub_or_b2");
+ }
+ else {
+ use_border = LLVMBuildOr(bld->builder, b1, b2, "b1_or_b2");
+ }
+ }
+
+ /*
+ * Note: if we find an app which frequently samples the texture border
+ * we might want to implement a true conditional here to avoid sampling
+ * the texture whenever possible (since that's quite a bit of code).
+ * Ex:
+ * if (use_border) {
+ * texel = border_color;
+ * }
+ * else {
+ * texel = sample_texture(coord);
+ * }
+ * As it is now, we always sample the texture, then selectively replace
+ * the texel color results with the border color.
+ */
+
+ /* convert x,y coords to linear offset from start of texture, in bytes */
+ offset = lp_build_sample_offset(&bld->uint_coord_bld,
bld->format_desc,
x, y, y_stride,
data_ptr);
@@ -99,16 +178,30 @@ lp_build_sample_texel_soa(struct lp_build_sample_context *bld,
assert(bld->format_desc->block.height == 1);
assert(bld->format_desc->block.bits <= bld->texel_type.width);
+ /* gather the texels from the texture */
packed = lp_build_gather(bld->builder,
bld->texel_type.length,
bld->format_desc->block.bits,
bld->texel_type.width,
data_ptr, offset);
+ /* convert texels to float rgba */
lp_build_unpack_rgba_soa(bld->builder,
bld->format_desc,
bld->texel_type,
packed, texel);
+
+ if (use_border) {
+ /* select texel color or border color depending on use_border */
+ int chan;
+ for (chan = 0; chan < 4; chan++) {
+ LLVMValueRef border_chan =
+ lp_build_const_scalar(bld->texel_type,
+ bld->static_state->border_color[chan]);
+ texel[chan] = lp_build_select(&bld->texel_bld, use_border,
+ border_chan, texel[chan]);
+ }
+ }
}
@@ -121,7 +214,7 @@ lp_build_sample_packed(struct lp_build_sample_context *bld,
{
LLVMValueRef offset;
- offset = lp_build_sample_offset(&bld->int_coord_bld,
+ offset = lp_build_sample_offset(&bld->uint_coord_bld,
bld->format_desc,
x, y, y_stride,
data_ptr);
@@ -138,17 +231,77 @@ lp_build_sample_packed(struct lp_build_sample_context *bld,
}
+/**
+ * Helper to compute the mirror function for the PIPE_WRAP_MIRROR modes.
+ */
+static LLVMValueRef
+lp_build_coord_mirror(struct lp_build_sample_context *bld,
+ LLVMValueRef coord)
+{
+ struct lp_build_context *coord_bld = &bld->coord_bld;
+ struct lp_build_context *int_coord_bld = &bld->int_coord_bld;
+ LLVMValueRef fract, flr, isOdd;
+
+ /* fract = coord - floor(coord) */
+ fract = lp_build_sub(coord_bld, coord, lp_build_floor(coord_bld, coord));
+
+ /* flr = ifloor(coord); */
+ flr = lp_build_ifloor(coord_bld, coord);
+
+ /* isOdd = flr & 1 */
+ isOdd = LLVMBuildAnd(bld->builder, flr, int_coord_bld->one, "");
+
+ /* make coord positive or negative depending on isOdd */
+ coord = lp_build_set_sign(coord_bld, fract, isOdd);
+
+ /* convert isOdd to float */
+ isOdd = lp_build_int_to_float(coord_bld, isOdd);
+
+ /* add isOdd to coord */
+ coord = lp_build_add(coord_bld, coord, isOdd);
+
+ return coord;
+}
+
+
+/**
+ * We only support a few wrap modes in lp_build_sample_wrap_int() at this time.
+ * Return whether the given mode is supported by that function.
+ */
+static boolean
+is_simple_wrap_mode(unsigned mode)
+{
+ switch (mode) {
+ case PIPE_TEX_WRAP_REPEAT:
+ case PIPE_TEX_WRAP_CLAMP:
+ case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
+ return TRUE;
+ case PIPE_TEX_WRAP_CLAMP_TO_BORDER:
+ default:
+ return FALSE;
+ }
+}
+
+
+/**
+ * Build LLVM code for texture wrap mode, for scaled integer texcoords.
+ * \param coord the incoming texcoord (s,t,r or q) scaled to the texture size
+ * \param length the texture size along one dimension
+ * \param is_pot if TRUE, length is a power of two
+ * \param wrap_mode one of PIPE_TEX_WRAP_x
+ */
static LLVMValueRef
-lp_build_sample_wrap(struct lp_build_sample_context *bld,
- LLVMValueRef coord,
- LLVMValueRef length,
- boolean is_pot,
- unsigned wrap_mode)
+lp_build_sample_wrap_int(struct lp_build_sample_context *bld,
+ LLVMValueRef coord,
+ LLVMValueRef length,
+ boolean is_pot,
+ unsigned wrap_mode)
{
+ struct lp_build_context *uint_coord_bld = &bld->uint_coord_bld;
struct lp_build_context *int_coord_bld = &bld->int_coord_bld;
LLVMValueRef length_minus_one;
- length_minus_one = lp_build_sub(int_coord_bld, length, int_coord_bld->one);
+ length_minus_one = lp_build_sub(uint_coord_bld, length, uint_coord_bld->one);
switch(wrap_mode) {
case PIPE_TEX_WRAP_REPEAT:
@@ -161,12 +314,12 @@ lp_build_sample_wrap(struct lp_build_sample_context *bld,
break;
case PIPE_TEX_WRAP_CLAMP:
+ case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
+ case PIPE_TEX_WRAP_CLAMP_TO_BORDER:
coord = lp_build_max(int_coord_bld, coord, int_coord_bld->zero);
coord = lp_build_min(int_coord_bld, coord, length_minus_one);
break;
- case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
- case PIPE_TEX_WRAP_CLAMP_TO_BORDER:
case PIPE_TEX_WRAP_MIRROR_REPEAT:
case PIPE_TEX_WRAP_MIRROR_CLAMP:
case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE:
@@ -174,8 +327,8 @@ lp_build_sample_wrap(struct lp_build_sample_context *bld,
/* FIXME */
_debug_printf("llvmpipe: failed to translate texture wrap mode %s\n",
util_dump_tex_wrap(wrap_mode, TRUE));
- coord = lp_build_max(int_coord_bld, coord, int_coord_bld->zero);
- coord = lp_build_min(int_coord_bld, coord, length_minus_one);
+ coord = lp_build_max(uint_coord_bld, coord, uint_coord_bld->zero);
+ coord = lp_build_min(uint_coord_bld, coord, length_minus_one);
break;
default:
@@ -186,6 +339,376 @@ lp_build_sample_wrap(struct lp_build_sample_context *bld,
}
+/**
+ * Build LLVM code for texture wrap mode for linear filtering.
+ * \param x0_out returns first integer texcoord
+ * \param x1_out returns second integer texcoord
+ * \param weight_out returns linear interpolation weight
+ */
+static void
+lp_build_sample_wrap_linear(struct lp_build_sample_context *bld,
+ LLVMValueRef coord,
+ LLVMValueRef length,
+ boolean is_pot,
+ unsigned wrap_mode,
+ LLVMValueRef *x0_out,
+ LLVMValueRef *x1_out,
+ LLVMValueRef *weight_out)
+{
+ struct lp_build_context *coord_bld = &bld->coord_bld;
+ struct lp_build_context *int_coord_bld = &bld->int_coord_bld;
+ struct lp_build_context *uint_coord_bld = &bld->uint_coord_bld;
+ LLVMValueRef two = lp_build_const_scalar(coord_bld->type, 2.0);
+ LLVMValueRef half = lp_build_const_scalar(coord_bld->type, 0.5);
+ LLVMValueRef length_f = lp_build_int_to_float(coord_bld, length);
+ LLVMValueRef length_minus_one = lp_build_sub(uint_coord_bld, length, uint_coord_bld->one);
+ LLVMValueRef length_f_minus_one = lp_build_sub(coord_bld, length_f, coord_bld->one);
+ LLVMValueRef coord0, coord1, weight;
+
+ switch(wrap_mode) {
+ case PIPE_TEX_WRAP_REPEAT:
+ /* mul by size and subtract 0.5 */
+ coord = lp_build_mul(coord_bld, coord, length_f);
+ coord = lp_build_sub(coord_bld, coord, half);
+ /* convert to int */
+ coord0 = lp_build_ifloor(coord_bld, coord);
+ coord1 = lp_build_add(uint_coord_bld, coord0, uint_coord_bld->one);
+ /* compute lerp weight */
+ weight = lp_build_fract(coord_bld, coord);
+ /* repeat wrap */
+ if (is_pot) {
+ coord0 = LLVMBuildAnd(bld->builder, coord0, length_minus_one, "");
+ coord1 = LLVMBuildAnd(bld->builder, coord1, length_minus_one, "");
+ }
+ else {
+ /* Signed remainder won't give the right results for negative
+ * dividends but unsigned remainder does.*/
+ coord0 = LLVMBuildURem(bld->builder, coord0, length, "");
+ coord1 = LLVMBuildURem(bld->builder, coord1, length, "");
+ }
+ break;
+
+ case PIPE_TEX_WRAP_CLAMP:
+ if (bld->static_state->normalized_coords) {
+ coord = lp_build_mul(coord_bld, coord, length_f);
+ }
+ weight = lp_build_fract(coord_bld, coord);
+ coord0 = lp_build_clamp(coord_bld, coord, coord_bld->zero,
+ length_f_minus_one);
+ coord1 = lp_build_add(coord_bld, coord, coord_bld->one);
+ coord1 = lp_build_clamp(coord_bld, coord1, coord_bld->zero,
+ length_f_minus_one);
+ coord0 = lp_build_ifloor(coord_bld, coord0);
+ coord1 = lp_build_ifloor(coord_bld, coord1);
+ break;
+
+ case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
+ if (bld->static_state->normalized_coords) {
+ /* clamp to [0,1] */
+ coord = lp_build_clamp(coord_bld, coord, coord_bld->zero, coord_bld->one);
+ /* mul by tex size and subtract 0.5 */
+ coord = lp_build_mul(coord_bld, coord, length_f);
+ coord = lp_build_sub(coord_bld, coord, half);
+ }
+ else {
+ LLVMValueRef min, max;
+ /* clamp to [0.5, length - 0.5] */
+ min = lp_build_const_scalar(coord_bld->type, 0.5F);
+ max = lp_build_sub(coord_bld, length_f, min);
+ coord = lp_build_clamp(coord_bld, coord, min, max);
+ }
+ /* compute lerp weight */
+ weight = lp_build_fract(coord_bld, coord);
+ /* coord0 = floor(coord); */
+ coord0 = lp_build_ifloor(coord_bld, coord);
+ coord1 = lp_build_add(int_coord_bld, coord0, int_coord_bld->one);
+ /* coord0 = max(coord0, 0) */
+ coord0 = lp_build_max(int_coord_bld, coord0, int_coord_bld->zero);
+ /* coord1 = min(coord1, length-1) */
+ coord1 = lp_build_min(int_coord_bld, coord1, length_minus_one);
+ break;
+
+ case PIPE_TEX_WRAP_CLAMP_TO_BORDER:
+ {
+ LLVMValueRef min, max;
+ if (bld->static_state->normalized_coords) {
+ /* min = -1.0 / (2 * length) = -0.5 / length */
+ min = lp_build_mul(coord_bld,
+ lp_build_const_scalar(coord_bld->type, -0.5F),
+ lp_build_rcp(coord_bld, length_f));
+ /* max = 1.0 - min */
+ max = lp_build_sub(coord_bld, coord_bld->one, min);
+ /* coord = clamp(coord, min, max) */
+ coord = lp_build_clamp(coord_bld, coord, min, max);
+ /* scale coord to length (and sub 0.5?) */
+ coord = lp_build_mul(coord_bld, coord, length_f);
+ coord = lp_build_sub(coord_bld, coord, half);
+ }
+ else {
+ /* clamp to [-0.5, length + 0.5] */
+ min = lp_build_const_scalar(coord_bld->type, -0.5F);
+ max = lp_build_sub(coord_bld, length_f, min);
+ coord = lp_build_clamp(coord_bld, coord, min, max);
+ coord = lp_build_sub(coord_bld, coord, half);
+ }
+ /* compute lerp weight */
+ weight = lp_build_fract(coord_bld, coord);
+ /* convert to int */
+ coord0 = lp_build_ifloor(coord_bld, coord);
+ coord1 = lp_build_add(int_coord_bld, coord0, int_coord_bld->one);
+ }
+ break;
+
+ case PIPE_TEX_WRAP_MIRROR_REPEAT:
+ /* compute mirror function */
+ coord = lp_build_coord_mirror(bld, coord);
+
+ /* scale coord to length */
+ coord = lp_build_mul(coord_bld, coord, length_f);
+ coord = lp_build_sub(coord_bld, coord, half);
+
+ /* compute lerp weight */
+ weight = lp_build_fract(coord_bld, coord);
+
+ /* convert to int coords */
+ coord0 = lp_build_ifloor(coord_bld, coord);
+ coord1 = lp_build_add(int_coord_bld, coord0, int_coord_bld->one);
+
+ /* coord0 = max(coord0, 0) */
+ coord0 = lp_build_max(int_coord_bld, coord0, int_coord_bld->zero);
+ /* coord1 = min(coord1, length-1) */
+ coord1 = lp_build_min(int_coord_bld, coord1, length_minus_one);
+ break;
+
+ case PIPE_TEX_WRAP_MIRROR_CLAMP:
+ {
+ LLVMValueRef min, max;
+ /* min = 1.0 / (2 * length) */
+ min = lp_build_rcp(coord_bld, lp_build_mul(coord_bld, two, length_f));
+ /* max = 1.0 - min */
+ max = lp_build_sub(coord_bld, coord_bld->one, min);
+
+ coord = lp_build_abs(coord_bld, coord);
+ coord = lp_build_clamp(coord_bld, coord, min, max);
+ coord = lp_build_mul(coord_bld, coord, length_f);
+ if(0)coord = lp_build_sub(coord_bld, coord, half);
+ weight = lp_build_fract(coord_bld, coord);
+ coord0 = lp_build_ifloor(coord_bld, coord);
+ coord1 = lp_build_add(int_coord_bld, coord0, int_coord_bld->one);
+ }
+ break;
+
+ case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE:
+ {
+ LLVMValueRef min, max;
+ /* min = 1.0 / (2 * length) */
+ min = lp_build_rcp(coord_bld, lp_build_mul(coord_bld, two, length_f));
+ /* max = 1.0 - min */
+ max = lp_build_sub(coord_bld, coord_bld->one, min);
+
+ coord = lp_build_abs(coord_bld, coord);
+ coord = lp_build_clamp(coord_bld, coord, min, max);
+ coord = lp_build_mul(coord_bld, coord, length_f);
+ coord = lp_build_sub(coord_bld, coord, half);
+ weight = lp_build_fract(coord_bld, coord);
+ coord0 = lp_build_ifloor(coord_bld, coord);
+ coord1 = lp_build_add(int_coord_bld, coord0, int_coord_bld->one);
+ }
+ break;
+
+ case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER:
+ {
+ LLVMValueRef min, max;
+ /* min = -1.0 / (2 * length) = -0.5 / length */
+ min = lp_build_mul(coord_bld,
+ lp_build_const_scalar(coord_bld->type, -0.5F),
+ lp_build_rcp(coord_bld, length_f));
+ /* max = 1.0 - min */
+ max = lp_build_sub(coord_bld, coord_bld->one, min);
+
+ coord = lp_build_abs(coord_bld, coord);
+ coord = lp_build_clamp(coord_bld, coord, min, max);
+ coord = lp_build_mul(coord_bld, coord, length_f);
+ coord = lp_build_sub(coord_bld, coord, half);
+ weight = lp_build_fract(coord_bld, coord);
+ coord0 = lp_build_ifloor(coord_bld, coord);
+ coord1 = lp_build_add(int_coord_bld, coord0, int_coord_bld->one);
+ }
+ break;
+
+ default:
+ assert(0);
+ }
+
+ *x0_out = coord0;
+ *x1_out = coord1;
+ *weight_out = weight;
+}
+
+
+/**
+ * Build LLVM code for texture wrap mode for nearest filtering.
+ * \param coord the incoming texcoord (nominally in [0,1])
+ * \param length the texture size along one dimension, as int
+ * \param is_pot if TRUE, length is a power of two
+ * \param wrap_mode one of PIPE_TEX_WRAP_x
+ */
+static LLVMValueRef
+lp_build_sample_wrap_nearest(struct lp_build_sample_context *bld,
+ LLVMValueRef coord,
+ LLVMValueRef length,
+ boolean is_pot,
+ unsigned wrap_mode)
+{
+ struct lp_build_context *coord_bld = &bld->coord_bld;
+ struct lp_build_context *int_coord_bld = &bld->int_coord_bld;
+ struct lp_build_context *uint_coord_bld = &bld->uint_coord_bld;
+ LLVMValueRef two = lp_build_const_scalar(coord_bld->type, 2.0);
+ LLVMValueRef length_f = lp_build_int_to_float(coord_bld, length);
+ LLVMValueRef length_minus_one = lp_build_sub(uint_coord_bld, length, uint_coord_bld->one);
+ LLVMValueRef length_f_minus_one = lp_build_sub(coord_bld, length_f, coord_bld->one);
+ LLVMValueRef icoord;
+
+ switch(wrap_mode) {
+ case PIPE_TEX_WRAP_REPEAT:
+ coord = lp_build_mul(coord_bld, coord, length_f);
+ icoord = lp_build_ifloor(coord_bld, coord);
+ if (is_pot)
+ icoord = LLVMBuildAnd(bld->builder, icoord, length_minus_one, "");
+ else
+ /* Signed remainder won't give the right results for negative
+ * dividends but unsigned remainder does.*/
+ icoord = LLVMBuildURem(bld->builder, icoord, length, "");
+ break;
+
+ case PIPE_TEX_WRAP_CLAMP:
+ /* mul by size */
+ if (bld->static_state->normalized_coords) {
+ coord = lp_build_mul(coord_bld, coord, length_f);
+ }
+ /* floor */
+ icoord = lp_build_ifloor(coord_bld, coord);
+ /* clamp to [0, size-1]. Note: int coord builder type */
+ icoord = lp_build_clamp(int_coord_bld, icoord, int_coord_bld->zero,
+ length_minus_one);
+ break;
+
+ case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
+ {
+ LLVMValueRef min, max;
+ if (bld->static_state->normalized_coords) {
+ /* min = 1.0 / (2 * length) */
+ min = lp_build_rcp(coord_bld, lp_build_mul(coord_bld, two, length_f));
+ /* max = length - min */
+ max = lp_build_sub(coord_bld, length_f, min);
+ /* scale coord to length */
+ coord = lp_build_mul(coord_bld, coord, length_f);
+ }
+ else {
+ /* clamp to [0.5, length - 0.5] */
+ min = lp_build_const_scalar(coord_bld->type, 0.5F);
+ max = lp_build_sub(coord_bld, length_f, min);
+ }
+ /* coord = clamp(coord, min, max) */
+ coord = lp_build_clamp(coord_bld, coord, min, max);
+ icoord = lp_build_ifloor(coord_bld, coord);
+ }
+ break;
+
+ case PIPE_TEX_WRAP_CLAMP_TO_BORDER:
+ /* Note: this is the same as CLAMP_TO_EDGE, except min = -min */
+ {
+ LLVMValueRef min, max;
+ if (bld->static_state->normalized_coords) {
+ /* min = -1.0 / (2 * length) = -0.5 / length */
+ min = lp_build_mul(coord_bld,
+ lp_build_const_scalar(coord_bld->type, -0.5F),
+ lp_build_rcp(coord_bld, length_f));
+ /* max = length - min */
+ max = lp_build_sub(coord_bld, length_f, min);
+ /* scale coord to length */
+ coord = lp_build_mul(coord_bld, coord, length_f);
+ }
+ else {
+ /* clamp to [-0.5, length + 0.5] */
+ min = lp_build_const_scalar(coord_bld->type, -0.5F);
+ max = lp_build_sub(coord_bld, length_f, min);
+ }
+ /* coord = clamp(coord, min, max) */
+ coord = lp_build_clamp(coord_bld, coord, min, max);
+ icoord = lp_build_ifloor(coord_bld, coord);
+ }
+ break;
+
+ case PIPE_TEX_WRAP_MIRROR_REPEAT:
+ {
+ LLVMValueRef min, max;
+ /* min = 1.0 / (2 * length) */
+ min = lp_build_rcp(coord_bld, lp_build_mul(coord_bld, two, length_f));
+ /* max = length - min */
+ max = lp_build_sub(coord_bld, length_f, min);
+
+ /* compute mirror function */
+ coord = lp_build_coord_mirror(bld, coord);
+
+ /* scale coord to length */
+ coord = lp_build_mul(coord_bld, coord, length_f);
+
+ /* coord = clamp(coord, min, max) */
+ coord = lp_build_clamp(coord_bld, coord, min, max);
+ icoord = lp_build_ifloor(coord_bld, coord);
+ }
+ break;
+
+ case PIPE_TEX_WRAP_MIRROR_CLAMP:
+ coord = lp_build_abs(coord_bld, coord);
+ coord = lp_build_mul(coord_bld, coord, length_f);
+ coord = lp_build_clamp(coord_bld, coord, coord_bld->zero, length_f_minus_one);
+ icoord = lp_build_ifloor(coord_bld, coord);
+ break;
+
+ case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE:
+ {
+ LLVMValueRef min, max;
+ /* min = 1.0 / (2 * length) */
+ min = lp_build_rcp(coord_bld, lp_build_mul(coord_bld, two, length_f));
+ /* max = length - min */
+ max = lp_build_sub(coord_bld, length_f, min);
+
+ coord = lp_build_abs(coord_bld, coord);
+ coord = lp_build_mul(coord_bld, coord, length_f);
+ coord = lp_build_clamp(coord_bld, coord, min, max);
+ icoord = lp_build_ifloor(coord_bld, coord);
+ }
+ break;
+
+ case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER:
+ {
+ LLVMValueRef min, max;
+ /* min = 1.0 / (2 * length) */
+ min = lp_build_rcp(coord_bld, lp_build_mul(coord_bld, two, length_f));
+ min = lp_build_negate(coord_bld, min);
+ /* max = length - min */
+ max = lp_build_sub(coord_bld, length_f, min);
+
+ coord = lp_build_abs(coord_bld, coord);
+ coord = lp_build_mul(coord_bld, coord, length_f);
+ coord = lp_build_clamp(coord_bld, coord, min, max);
+ icoord = lp_build_ifloor(coord_bld, coord);
+ }
+ break;
+
+ default:
+ assert(0);
+ }
+
+ return icoord;
+}
+
+
+/**
+ * Sample 2D texture with nearest filtering.
+ */
static void
lp_build_sample_2d_nearest_soa(struct lp_build_sample_context *bld,
LLVMValueRef s,
@@ -196,23 +719,25 @@ lp_build_sample_2d_nearest_soa(struct lp_build_sample_context *bld,
LLVMValueRef data_ptr,
LLVMValueRef *texel)
{
- LLVMValueRef x;
- LLVMValueRef y;
+ LLVMValueRef x, y;
- x = lp_build_ifloor(&bld->coord_bld, s);
- y = lp_build_ifloor(&bld->coord_bld, t);
- lp_build_name(x, "tex.x.floor");
- lp_build_name(y, "tex.y.floor");
+ x = lp_build_sample_wrap_nearest(bld, s, width,
+ bld->static_state->pot_width,
+ bld->static_state->wrap_s);
+ y = lp_build_sample_wrap_nearest(bld, t, height,
+ bld->static_state->pot_height,
+ bld->static_state->wrap_t);
- x = lp_build_sample_wrap(bld, x, width, bld->static_state->pot_width, bld->static_state->wrap_s);
- y = lp_build_sample_wrap(bld, y, height, bld->static_state->pot_height, bld->static_state->wrap_t);
lp_build_name(x, "tex.x.wrapped");
lp_build_name(y, "tex.y.wrapped");
- lp_build_sample_texel_soa(bld, x, y, stride, data_ptr, texel);
+ lp_build_sample_texel_soa(bld, width, height, x, y, stride, data_ptr, texel);
}
+/**
+ * Sample 2D texture with bilinear filtering.
+ */
static void
lp_build_sample_2d_linear_soa(struct lp_build_sample_context *bld,
LLVMValueRef s,
@@ -223,9 +748,6 @@ lp_build_sample_2d_linear_soa(struct lp_build_sample_context *bld,
LLVMValueRef data_ptr,
LLVMValueRef *texel)
{
- LLVMValueRef half;
- LLVMValueRef s_ipart;
- LLVMValueRef t_ipart;
LLVMValueRef s_fpart;
LLVMValueRef t_fpart;
LLVMValueRef x0, x1;
@@ -233,32 +755,15 @@ lp_build_sample_2d_linear_soa(struct lp_build_sample_context *bld,
LLVMValueRef neighbors[2][2][4];
unsigned chan;
- half = lp_build_const_scalar(bld->coord_type, 0.5);
- s = lp_build_sub(&bld->coord_bld, s, half);
- t = lp_build_sub(&bld->coord_bld, t, half);
-
- s_ipart = lp_build_floor(&bld->coord_bld, s);
- t_ipart = lp_build_floor(&bld->coord_bld, t);
-
- s_fpart = lp_build_sub(&bld->coord_bld, s, s_ipart);
- t_fpart = lp_build_sub(&bld->coord_bld, t, t_ipart);
+ lp_build_sample_wrap_linear(bld, s, width, bld->static_state->pot_width,
+ bld->static_state->wrap_s, &x0, &x1, &s_fpart);
+ lp_build_sample_wrap_linear(bld, t, height, bld->static_state->pot_height,
+ bld->static_state->wrap_t, &y0, &y1, &t_fpart);
- x0 = lp_build_itrunc(&bld->coord_bld, s_ipart);
- y0 = lp_build_itrunc(&bld->coord_bld, t_ipart);
-
- x0 = lp_build_sample_wrap(bld, x0, width, bld->static_state->pot_width, bld->static_state->wrap_s);
- y0 = lp_build_sample_wrap(bld, y0, height, bld->static_state->pot_height, bld->static_state->wrap_t);
-
- x1 = lp_build_add(&bld->int_coord_bld, x0, bld->int_coord_bld.one);
- y1 = lp_build_add(&bld->int_coord_bld, y0, bld->int_coord_bld.one);
-
- x1 = lp_build_sample_wrap(bld, x1, width, bld->static_state->pot_width, bld->static_state->wrap_s);
- y1 = lp_build_sample_wrap(bld, y1, height, bld->static_state->pot_height, bld->static_state->wrap_t);
-
- lp_build_sample_texel_soa(bld, x0, y0, stride, data_ptr, neighbors[0][0]);
- lp_build_sample_texel_soa(bld, x1, y0, stride, data_ptr, neighbors[0][1]);
- lp_build_sample_texel_soa(bld, x0, y1, stride, data_ptr, neighbors[1][0]);
- lp_build_sample_texel_soa(bld, x1, y1, stride, data_ptr, neighbors[1][1]);
+ lp_build_sample_texel_soa(bld, width, height, x0, y0, stride, data_ptr, neighbors[0][0]);
+ lp_build_sample_texel_soa(bld, width, height, x1, y0, stride, data_ptr, neighbors[0][1]);
+ lp_build_sample_texel_soa(bld, width, height, x0, y1, stride, data_ptr, neighbors[1][0]);
+ lp_build_sample_texel_soa(bld, width, height, x1, y1, stride, data_ptr, neighbors[1][1]);
/* TODO: Don't interpolate missing channels */
for(chan = 0; chan < 4; ++chan) {
@@ -334,20 +839,33 @@ lp_build_sample_2d_linear_aos(struct lp_build_sample_context *bld,
h16_vec_type = lp_build_vec_type(h16.type);
u8n_vec_type = lp_build_vec_type(u8n.type);
+ if (bld->static_state->normalized_coords) {
+ LLVMTypeRef coord_vec_type = lp_build_vec_type(bld->coord_type);
+ LLVMValueRef fp_width = LLVMBuildSIToFP(bld->builder, width, coord_vec_type, "");
+ LLVMValueRef fp_height = LLVMBuildSIToFP(bld->builder, height, coord_vec_type, "");
+ s = lp_build_mul(&bld->coord_bld, s, fp_width);
+ t = lp_build_mul(&bld->coord_bld, t, fp_height);
+ }
+
+ /* scale coords by 256 (8 fractional bits) */
s = lp_build_mul_imm(&bld->coord_bld, s, 256);
t = lp_build_mul_imm(&bld->coord_bld, t, 256);
+ /* convert float to int */
s = LLVMBuildFPToSI(builder, s, i32_vec_type, "");
t = LLVMBuildFPToSI(builder, t, i32_vec_type, "");
+ /* subtract 0.5 (add -128) */
i32_c128 = lp_build_int_const_scalar(i32.type, -128);
s = LLVMBuildAdd(builder, s, i32_c128, "");
t = LLVMBuildAdd(builder, t, i32_c128, "");
+ /* compute floor (shift right 8) */
i32_c8 = lp_build_int_const_scalar(i32.type, 8);
s_ipart = LLVMBuildAShr(builder, s, i32_c8, "");
t_ipart = LLVMBuildAShr(builder, t, i32_c8, "");
+ /* compute fractional part (AND with 0xff) */
i32_c255 = lp_build_int_const_scalar(i32.type, 255);
s_fpart = LLVMBuildAnd(builder, s, i32_c255, "");
t_fpart = LLVMBuildAnd(builder, t, i32_c255, "");
@@ -355,14 +873,18 @@ lp_build_sample_2d_linear_aos(struct lp_build_sample_context *bld,
x0 = s_ipart;
y0 = t_ipart;
- x0 = lp_build_sample_wrap(bld, x0, width, bld->static_state->pot_width, bld->static_state->wrap_s);
- y0 = lp_build_sample_wrap(bld, y0, height, bld->static_state->pot_height, bld->static_state->wrap_t);
-
x1 = lp_build_add(&bld->int_coord_bld, x0, bld->int_coord_bld.one);
y1 = lp_build_add(&bld->int_coord_bld, y0, bld->int_coord_bld.one);
- x1 = lp_build_sample_wrap(bld, x1, width, bld->static_state->pot_width, bld->static_state->wrap_s);
- y1 = lp_build_sample_wrap(bld, y1, height, bld->static_state->pot_height, bld->static_state->wrap_t);
+ x0 = lp_build_sample_wrap_int(bld, x0, width, bld->static_state->pot_width,
+ bld->static_state->wrap_s);
+ y0 = lp_build_sample_wrap_int(bld, y0, height, bld->static_state->pot_height,
+ bld->static_state->wrap_t);
+
+ x1 = lp_build_sample_wrap_int(bld, x1, width, bld->static_state->pot_width,
+ bld->static_state->wrap_s);
+ y1 = lp_build_sample_wrap_int(bld, y1, height, bld->static_state->pot_height,
+ bld->static_state->wrap_t);
/*
* Transform 4 x i32 in
@@ -518,6 +1040,195 @@ lp_build_sample_compare(struct lp_build_sample_context *bld,
}
+static int
+texture_dims(enum pipe_texture_target tex)
+{
+ switch (tex) {
+ case PIPE_TEXTURE_1D:
+ return 1;
+ case PIPE_TEXTURE_2D:
+ case PIPE_TEXTURE_CUBE:
+ return 2;
+ case PIPE_TEXTURE_3D:
+ return 3;
+ default:
+ assert(0 && "bad texture target in texture_dims()");
+ return 2;
+ }
+}
+
+
+/**
+ * Generate code to compute texture level of detail (lambda).
+ * \param s vector of texcoord s values
+ * \param t vector of texcoord t values
+ * \param r vector of texcoord r values
+ * \param width scalar int texture width
+ * \param height scalar int texture height
+ * \param depth scalar int texture depth
+ */
+static LLVMValueRef
+lp_build_lod_selector(struct lp_build_sample_context *bld,
+ LLVMValueRef s,
+ LLVMValueRef t,
+ LLVMValueRef r,
+ LLVMValueRef width,
+ LLVMValueRef height,
+ LLVMValueRef depth)
+
+{
+ const int dims = texture_dims(bld->static_state->target);
+ struct lp_build_context *coord_bld = &bld->coord_bld;
+
+ LLVMValueRef lod_bias = lp_build_const_scalar(bld->coord_bld.type,
+ bld->static_state->lod_bias);
+ LLVMValueRef min_lod = lp_build_const_scalar(bld->coord_bld.type,
+ bld->static_state->min_lod);
+ LLVMValueRef max_lod = lp_build_const_scalar(bld->coord_bld.type,
+ bld->static_state->max_lod);
+
+ LLVMValueRef index0 = LLVMConstInt(LLVMInt32Type(), 0, 0);
+ LLVMValueRef index1 = LLVMConstInt(LLVMInt32Type(), 1, 0);
+ LLVMValueRef index2 = LLVMConstInt(LLVMInt32Type(), 2, 0);
+
+ LLVMValueRef s0, s1, s2;
+ LLVMValueRef t0, t1, t2;
+ LLVMValueRef r0, r1, r2;
+ LLVMValueRef dsdx, dsdy, dtdx, dtdy, drdx, drdy;
+ LLVMValueRef rho, lod;
+
+ /*
+ * dsdx = abs(s[1] - s[0]);
+ * dsdy = abs(s[2] - s[0]);
+ * dtdx = abs(t[1] - t[0]);
+ * dtdy = abs(t[2] - t[0]);
+ * drdx = abs(r[1] - r[0]);
+ * drdy = abs(r[2] - r[0]);
+ * XXX we're assuming a four-element quad in 2x2 layout here.
+ */
+ s0 = LLVMBuildExtractElement(bld->builder, s, index0, "s0");
+ s1 = LLVMBuildExtractElement(bld->builder, s, index1, "s1");
+ s2 = LLVMBuildExtractElement(bld->builder, s, index2, "s2");
+ dsdx = lp_build_abs(coord_bld, lp_build_sub(coord_bld, s1, s0));
+ dsdy = lp_build_abs(coord_bld, lp_build_sub(coord_bld, s2, s0));
+ if (dims > 1) {
+ t0 = LLVMBuildExtractElement(bld->builder, t, index0, "t0");
+ t1 = LLVMBuildExtractElement(bld->builder, t, index1, "t1");
+ t2 = LLVMBuildExtractElement(bld->builder, t, index2, "t2");
+ dtdx = lp_build_abs(coord_bld, lp_build_sub(coord_bld, t1, t0));
+ dtdy = lp_build_abs(coord_bld, lp_build_sub(coord_bld, t2, t0));
+ if (dims > 2) {
+ r0 = LLVMBuildExtractElement(bld->builder, r, index0, "r0");
+ r1 = LLVMBuildExtractElement(bld->builder, r, index1, "r1");
+ r2 = LLVMBuildExtractElement(bld->builder, r, index2, "r2");
+ drdx = lp_build_abs(coord_bld, lp_build_sub(coord_bld, r1, r0));
+ drdy = lp_build_abs(coord_bld, lp_build_sub(coord_bld, r2, r0));
+ }
+ }
+
+ /* Compute rho = max of all partial derivatives scaled by texture size.
+ * XXX this can be vectorized somewhat
+ */
+ rho = lp_build_mul(coord_bld,
+ lp_build_max(coord_bld, dsdx, dsdy),
+ lp_build_int_to_float(coord_bld, width));
+ if (dims > 1) {
+ LLVMValueRef max;
+ max = lp_build_mul(coord_bld,
+ lp_build_max(coord_bld, dtdx, dtdy),
+ lp_build_int_to_float(coord_bld, height));
+ rho = lp_build_max(coord_bld, rho, max);
+ if (dims > 2) {
+ max = lp_build_mul(coord_bld,
+ lp_build_max(coord_bld, drdx, drdy),
+ lp_build_int_to_float(coord_bld, depth));
+ rho = lp_build_max(coord_bld, rho, max);
+ }
+ }
+
+ /* compute lod = log2(rho) */
+ lod = lp_build_log2(coord_bld, rho);
+
+ /* add lod bias */
+ lod = lp_build_add(coord_bld, lod, lod_bias);
+
+ /* clamp lod */
+ lod = lp_build_clamp(coord_bld, lod, min_lod, max_lod);
+
+ return lod;
+}
+
+
+/**
+ * For PIPE_TEX_MIPFILTER_NEAREST, convert float LOD to integer
+ * mipmap level index.
+ * \param lod scalar float texture level of detail
+ * \param level_out returns integer
+ */
+static void
+lp_build_nearest_mip_level(struct lp_build_sample_context *bld,
+ unsigned unit,
+ LLVMValueRef lod,
+ LLVMValueRef *level_out)
+{
+ struct lp_build_context *coord_bld = &bld->coord_bld;
+ struct lp_build_context *int_coord_bld = &bld->int_coord_bld;
+ LLVMValueRef last_level, level;
+
+ last_level = bld->dynamic_state->last_level(bld->dynamic_state,
+ bld->builder, unit);
+
+ /* convert float lod to integer */
+ level = lp_build_iround(coord_bld, lod);
+
+ /* clamp level to legal range of levels */
+ *level_out = lp_build_clamp(int_coord_bld, level,
+ int_coord_bld->zero,
+ last_level);
+}
+
+
+/**
+ * For PIPE_TEX_MIPFILTER_LINEAR, convert float LOD to integer to
+ * two (adjacent) mipmap level indexes. Later, we'll sample from those
+ * two mipmap levels and interpolate between them.
+ */
+static void
+lp_build_linear_mip_levels(struct lp_build_sample_context *bld,
+ unsigned unit,
+ LLVMValueRef lod,
+ LLVMValueRef *level0_out,
+ LLVMValueRef *level1_out,
+ LLVMValueRef *weight_out)
+{
+ struct lp_build_context *coord_bld = &bld->coord_bld;
+ struct lp_build_context *int_coord_bld = &bld->int_coord_bld;
+ LLVMValueRef last_level, level;
+
+ last_level = bld->dynamic_state->last_level(bld->dynamic_state,
+ bld->builder, unit);
+
+ /* convert float lod to integer */
+ level = lp_build_ifloor(coord_bld, lod);
+
+ /* compute level 0 and clamp to legal range of levels */
+ *level0_out = lp_build_clamp(int_coord_bld, level,
+ int_coord_bld->zero,
+ last_level);
+ /* compute level 1 and clamp to legal range of levels */
+ *level1_out = lp_build_add(int_coord_bld, *level0_out, int_coord_bld->one);
+ *level1_out = lp_build_min(int_coord_bld, *level1_out, int_coord_bld->zero);
+
+ *weight_out = lp_build_fract(coord_bld, lod);
+}
+
+
+
+/**
+ * Build texture sampling code.
+ * 'texel' will return a vector of four LLVMValueRefs corresponding to
+ * R, G, B, A.
+ */
void
lp_build_sample_soa(LLVMBuilderRef builder,
const struct lp_sampler_static_state *static_state,
@@ -536,7 +1247,11 @@ lp_build_sample_soa(LLVMBuilderRef builder,
LLVMValueRef data_ptr;
LLVMValueRef s;
LLVMValueRef t;
- LLVMValueRef p;
+ LLVMValueRef r;
+
+ (void) lp_build_lod_selector; /* temporary to silence warning */
+ (void) lp_build_nearest_mip_level;
+ (void) lp_build_linear_mip_levels;
/* Setup our build context */
memset(&bld, 0, sizeof bld);
@@ -545,9 +1260,11 @@ lp_build_sample_soa(LLVMBuilderRef builder,
bld.dynamic_state = dynamic_state;
bld.format_desc = util_format_description(static_state->format);
bld.coord_type = type;
+ bld.uint_coord_type = lp_uint_type(type);
bld.int_coord_type = lp_int_type(type);
bld.texel_type = type;
lp_build_context_init(&bld.coord_bld, builder, bld.coord_type);
+ lp_build_context_init(&bld.uint_coord_bld, builder, bld.uint_coord_type);
lp_build_context_init(&bld.int_coord_bld, builder, bld.int_coord_type);
lp_build_context_init(&bld.texel_bld, builder, bld.texel_type);
@@ -559,32 +1276,29 @@ lp_build_sample_soa(LLVMBuilderRef builder,
s = coords[0];
t = coords[1];
- p = coords[2];
+ r = coords[2];
- width = lp_build_broadcast_scalar(&bld.int_coord_bld, width);
- height = lp_build_broadcast_scalar(&bld.int_coord_bld, height);
- stride = lp_build_broadcast_scalar(&bld.int_coord_bld, stride);
+ width = lp_build_broadcast_scalar(&bld.uint_coord_bld, width);
+ height = lp_build_broadcast_scalar(&bld.uint_coord_bld, height);
+ stride = lp_build_broadcast_scalar(&bld.uint_coord_bld, stride);
if(static_state->target == PIPE_TEXTURE_1D)
t = bld.coord_bld.zero;
- if(static_state->normalized_coords) {
- LLVMTypeRef coord_vec_type = lp_build_vec_type(bld.coord_type);
- LLVMValueRef fp_width = LLVMBuildSIToFP(builder, width, coord_vec_type, "");
- LLVMValueRef fp_height = LLVMBuildSIToFP(builder, height, coord_vec_type, "");
- s = lp_build_mul(&bld.coord_bld, s, fp_width);
- t = lp_build_mul(&bld.coord_bld, t, fp_height);
- }
-
switch (static_state->min_img_filter) {
case PIPE_TEX_FILTER_NEAREST:
- lp_build_sample_2d_nearest_soa(&bld, s, t, width, height, stride, data_ptr, texel);
+ lp_build_sample_2d_nearest_soa(&bld, s, t, width, height,
+ stride, data_ptr, texel);
break;
case PIPE_TEX_FILTER_LINEAR:
- if(lp_format_is_rgba8(bld.format_desc))
- lp_build_sample_2d_linear_aos(&bld, s, t, width, height, stride, data_ptr, texel);
+ if(lp_format_is_rgba8(bld.format_desc) &&
+ is_simple_wrap_mode(static_state->wrap_s) &&
+ is_simple_wrap_mode(static_state->wrap_t))
+ lp_build_sample_2d_linear_aos(&bld, s, t, width, height,
+ stride, data_ptr, texel);
else
- lp_build_sample_2d_linear_soa(&bld, s, t, width, height, stride, data_ptr, texel);
+ lp_build_sample_2d_linear_soa(&bld, s, t, width, height,
+ stride, data_ptr, texel);
break;
default:
assert(0);
@@ -593,5 +1307,5 @@ lp_build_sample_soa(LLVMBuilderRef builder,
/* FIXME: respect static_state->min_mip_filter */;
/* FIXME: respect static_state->mag_img_filter */;
- lp_build_sample_compare(&bld, p, texel);
+ lp_build_sample_compare(&bld, r, texel);
}
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
index 4cf28a9f93..28ff362cac 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
@@ -52,6 +52,7 @@
#include "lp_bld_swizzle.h"
#include "lp_bld_flow.h"
#include "lp_bld_tgsi.h"
+#include "lp_bld_debug.h"
#define LP_MAX_TEMPS 256
@@ -81,6 +82,21 @@
#define QUAD_BOTTOM_LEFT 2
#define QUAD_BOTTOM_RIGHT 3
+#define LP_TGSI_MAX_NESTING 16
+
+struct lp_exec_mask {
+ struct lp_build_context *bld;
+
+ boolean has_mask;
+
+ LLVMTypeRef int_vec_type;
+
+ LLVMValueRef cond_stack[LP_TGSI_MAX_NESTING];
+ int cond_stack_size;
+ LLVMValueRef cond_mask;
+
+ LLVMValueRef exec_mask;
+};
struct lp_build_tgsi_soa_context
{
@@ -97,9 +113,9 @@ struct lp_build_tgsi_soa_context
LLVMValueRef temps[LP_MAX_TEMPS][NUM_CHANNELS];
struct lp_build_mask_context *mask;
+ struct lp_exec_mask exec_mask;
};
-
static const unsigned char
swizzle_left[4] = {
QUAD_TOP_LEFT, QUAD_TOP_LEFT,
@@ -124,6 +140,73 @@ swizzle_bottom[4] = {
QUAD_BOTTOM_LEFT, QUAD_BOTTOM_RIGHT
};
+static void lp_exec_mask_init(struct lp_exec_mask *mask, struct lp_build_context *bld)
+{
+ mask->bld = bld;
+ mask->has_mask = FALSE;
+ mask->cond_stack_size = 0;
+
+ mask->int_vec_type = lp_build_int_vec_type(mask->bld->type);
+}
+
+static void lp_exec_mask_update(struct lp_exec_mask *mask)
+{
+ mask->exec_mask = mask->cond_mask;
+ if (mask->cond_stack_size > 0)
+ mask->has_mask = TRUE;
+}
+
+static void lp_exec_mask_cond_push(struct lp_exec_mask *mask,
+ LLVMValueRef val)
+{
+ mask->cond_stack[mask->cond_stack_size++] = mask->cond_mask;
+ mask->cond_mask = LLVMBuildBitCast(mask->bld->builder, val,
+ mask->int_vec_type, "");
+
+ lp_exec_mask_update(mask);
+}
+
+static void lp_exec_mask_cond_invert(struct lp_exec_mask *mask)
+{
+ LLVMValueRef prev_mask = mask->cond_stack[mask->cond_stack_size - 1];
+ LLVMValueRef inv_mask = LLVMBuildNot(mask->bld->builder,
+ mask->cond_mask, "");
+
+ /* means that we didn't have any mask before and that
+ * we were fully enabled */
+ if (mask->cond_stack_size <= 1) {
+ prev_mask = LLVMConstAllOnes(mask->int_vec_type);
+ }
+
+ mask->cond_mask = LLVMBuildAnd(mask->bld->builder,
+ inv_mask,
+ prev_mask, "");
+ lp_exec_mask_update(mask);
+}
+
+static void lp_exec_mask_cond_pop(struct lp_exec_mask *mask)
+{
+ mask->cond_mask = mask->cond_stack[--mask->cond_stack_size];
+ lp_exec_mask_update(mask);
+}
+
+static void lp_exec_mask_store(struct lp_exec_mask *mask,
+ LLVMValueRef val,
+ LLVMValueRef dst)
+{
+ if (mask->has_mask) {
+ LLVMValueRef real_val, dst_val;
+
+ dst_val = LLVMBuildLoad(mask->bld->builder, dst, "");
+ real_val = lp_build_select(mask->bld,
+ mask->exec_mask,
+ val, dst_val);
+
+ LLVMBuildStore(mask->bld->builder, real_val, dst);
+ } else
+ LLVMBuildStore(mask->bld->builder, val, dst);
+}
+
static LLVMValueRef
emit_ddx(struct lp_build_tgsi_soa_context *bld,
@@ -287,13 +370,13 @@ emit_store(
switch( reg->Register.File ) {
case TGSI_FILE_OUTPUT:
- LLVMBuildStore(bld->base.builder, value,
- bld->outputs[reg->Register.Index][chan_index]);
+ lp_exec_mask_store(&bld->exec_mask, value,
+ bld->outputs[reg->Register.Index][chan_index]);
break;
case TGSI_FILE_TEMPORARY:
- LLVMBuildStore(bld->base.builder, value,
- bld->temps[reg->Register.Index][chan_index]);
+ lp_exec_mask_store(&bld->exec_mask, value,
+ bld->temps[reg->Register.Index][chan_index]);
break;
case TGSI_FILE_ADDRESS:
@@ -301,6 +384,11 @@ emit_store(
assert(0);
break;
+ case TGSI_FILE_PREDICATE:
+ /* FIXME */
+ assert(0);
+ break;
+
default:
assert( 0 );
}
@@ -498,6 +586,17 @@ emit_instruction(
if (indirect_temp_reference(inst))
return FALSE;
+ /*
+ * Stores and write masks are handled in a general fashion after the long
+ * instruction opcode switch statement.
+ *
+ * Although not stricitly necessary, we avoid generating instructions for
+ * channels which won't be stored, in cases where's that easy. For some
+ * complex instructions, like texture sampling, it is more convenient to
+ * assume a full writemask and then let LLVM optimization passes eliminate
+ * redundant code.
+ */
+
assert(info->num_dst <= 1);
if(info->num_dst) {
FOR_EACH_DST0_ENABLED_CHANNEL( inst, chan_index ) {
@@ -1272,8 +1371,8 @@ emit_instruction(
break;
case TGSI_OPCODE_IF:
- /* FIXME */
- return 0;
+ tmp0 = emit_fetch(bld, inst, 0, CHAN_X);
+ lp_exec_mask_cond_push(&bld->exec_mask, tmp0);
break;
case TGSI_OPCODE_BGNFOR:
@@ -1289,13 +1388,11 @@ emit_instruction(
break;
case TGSI_OPCODE_ELSE:
- /* FIXME */
- return 0;
+ lp_exec_mask_cond_invert(&bld->exec_mask);
break;
case TGSI_OPCODE_ENDIF:
- /* FIXME */
- return 0;
+ lp_exec_mask_cond_pop(&bld->exec_mask);
break;
case TGSI_OPCODE_ENDFOR:
@@ -1458,6 +1555,8 @@ lp_build_tgsi_soa(LLVMBuilderRef builder,
bld.consts_ptr = consts_ptr;
bld.sampler = sampler;
+ lp_exec_mask_init(&bld.exec_mask, &bld.base);
+
tgsi_parse_init( &parse, tokens );
while( !tgsi_parse_end_of_tokens( &parse ) ) {
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_type.c b/src/gallium/auxiliary/gallivm/lp_bld_type.c
index 8270cd057f..c327ba045a 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_type.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_type.c
@@ -178,6 +178,25 @@ lp_build_int32_vec4_type(void)
}
+/**
+ * Create unsigned integer type variation of given type.
+ */
+struct lp_type
+lp_uint_type(struct lp_type type)
+{
+ struct lp_type res_type;
+
+ memset(&res_type, 0, sizeof res_type);
+ res_type.width = type.width;
+ res_type.length = type.length;
+
+ return res_type;
+}
+
+
+/**
+ * Create signed integer type variation of given type.
+ */
struct lp_type
lp_int_type(struct lp_type type)
{
@@ -186,6 +205,7 @@ lp_int_type(struct lp_type type)
memset(&res_type, 0, sizeof res_type);
res_type.width = type.width;
res_type.length = type.length;
+ res_type.sign = 1;
return res_type;
}
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_type.h b/src/gallium/auxiliary/gallivm/lp_bld_type.h
index 62ee05be4d..16946cc28a 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_type.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld_type.h
@@ -257,6 +257,10 @@ lp_build_int32_vec4_type(void);
struct lp_type
+lp_uint_type(struct lp_type type);
+
+
+struct lp_type
lp_int_type(struct lp_type type);
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index 68566d3093..f853ea2820 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -110,6 +110,42 @@ micro_ceil(union tgsi_exec_channel *dst,
}
static void
+micro_clamp(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1,
+ const union tgsi_exec_channel *src2)
+{
+ dst->f[0] = src0->f[0] < src1->f[0] ? src1->f[0] : src0->f[0] > src2->f[0] ? src2->f[0] : src0->f[0];
+ dst->f[1] = src0->f[1] < src1->f[1] ? src1->f[1] : src0->f[1] > src2->f[1] ? src2->f[1] : src0->f[1];
+ dst->f[2] = src0->f[2] < src1->f[2] ? src1->f[2] : src0->f[2] > src2->f[2] ? src2->f[2] : src0->f[2];
+ dst->f[3] = src0->f[3] < src1->f[3] ? src1->f[3] : src0->f[3] > src2->f[3] ? src2->f[3] : src0->f[3];
+}
+
+static void
+micro_cmp(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1,
+ const union tgsi_exec_channel *src2)
+{
+ dst->f[0] = src0->f[0] < 0.0f ? src1->f[0] : src2->f[0];
+ dst->f[1] = src0->f[1] < 0.0f ? src1->f[1] : src2->f[1];
+ dst->f[2] = src0->f[2] < 0.0f ? src1->f[2] : src2->f[2];
+ dst->f[3] = src0->f[3] < 0.0f ? src1->f[3] : src2->f[3];
+}
+
+static void
+micro_cnd(union tgsi_exec_channel *dst,
+ const union tgsi_exec_channel *src0,
+ const union tgsi_exec_channel *src1,
+ const union tgsi_exec_channel *src2)
+{
+ dst->f[0] = src2->f[0] > 0.5f ? src0->f[0] : src1->f[0];
+ dst->f[1] = src2->f[1] > 0.5f ? src0->f[1] : src1->f[1];
+ dst->f[2] = src2->f[2] > 0.5f ? src0->f[2] : src1->f[2];
+ dst->f[3] = src2->f[3] > 0.5f ? src0->f[3] : src1->f[3];
+}
+
+static void
micro_cos(union tgsi_exec_channel *dst,
const union tgsi_exec_channel *src)
{
@@ -2653,15 +2689,7 @@ exec_instruction(
break;
case TGSI_OPCODE_CND:
- FOR_EACH_ENABLED_CHANNEL(*inst, chan_index) {
- FETCH(&r[0], 0, chan_index);
- FETCH(&r[1], 1, chan_index);
- FETCH(&r[2], 2, chan_index);
- micro_lt(&d[chan_index], &mach->Temps[TEMP_HALF_I].xyzw[TEMP_HALF_C], &r[2], &r[0], &r[1]);
- }
- FOR_EACH_ENABLED_CHANNEL(*inst, chan_index) {
- STORE(&d[chan_index], 0, chan_index);
- }
+ exec_vector_trinary(mach, inst, micro_cnd, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
break;
case TGSI_OPCODE_DP2A:
@@ -2673,16 +2701,7 @@ exec_instruction(
break;
case TGSI_OPCODE_CLAMP:
- FOR_EACH_ENABLED_CHANNEL(*inst, chan_index) {
- FETCH(&r[0], 0, chan_index);
- FETCH(&r[1], 1, chan_index);
- micro_max(&r[0], &r[0], &r[1]);
- FETCH(&r[1], 2, chan_index);
- micro_min(&d[chan_index], &r[0], &r[1]);
- }
- FOR_EACH_ENABLED_CHANNEL(*inst, chan_index) {
- STORE(&d[chan_index], 0, chan_index);
- }
+ exec_vector_trinary(mach, inst, micro_clamp, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
break;
case TGSI_OPCODE_FLR:
@@ -3076,15 +3095,7 @@ exec_instruction(
break;
case TGSI_OPCODE_CMP:
- FOR_EACH_ENABLED_CHANNEL( *inst, chan_index ) {
- FETCH(&r[0], 0, chan_index);
- FETCH(&r[1], 1, chan_index);
- FETCH(&r[2], 2, chan_index);
- micro_lt(&d[chan_index], &r[0], &mach->Temps[TEMP_0_I].xyzw[TEMP_0_C], &r[1], &r[2]);
- }
- FOR_EACH_ENABLED_CHANNEL(*inst, chan_index) {
- STORE(&d[chan_index], 0, chan_index);
- }
+ exec_vector_trinary(mach, inst, micro_cmp, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT);
break;
case TGSI_OPCODE_SCS:
diff --git a/src/gallium/auxiliary/translate/translate_generic.c b/src/gallium/auxiliary/translate/translate_generic.c
index 24727d4988..c9ec2b32bf 100644
--- a/src/gallium/auxiliary/translate/translate_generic.c
+++ b/src/gallium/auxiliary/translate/translate_generic.c
@@ -392,10 +392,10 @@ static fetch_func get_fetch_func( enum pipe_format format )
case PIPE_FORMAT_R8G8B8A8_SSCALED:
return &fetch_R8G8B8A8_SSCALED;
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
return &fetch_A8R8G8B8_UNORM;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
return &fetch_B8G8R8A8_UNORM;
case PIPE_FORMAT_R32_FIXED:
@@ -551,10 +551,10 @@ static emit_func get_emit_func( enum pipe_format format )
case PIPE_FORMAT_R8G8B8A8_SSCALED:
return &emit_R8G8B8A8_SSCALED;
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
return &emit_A8R8G8B8_UNORM;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
return &emit_B8G8R8A8_UNORM;
default:
diff --git a/src/gallium/auxiliary/translate/translate_sse.c b/src/gallium/auxiliary/translate/translate_sse.c
index c13e742738..03e093c11e 100644
--- a/src/gallium/auxiliary/translate/translate_sse.c
+++ b/src/gallium/auxiliary/translate/translate_sse.c
@@ -336,7 +336,7 @@ static boolean translate_attr( struct translate_sse *p,
case PIPE_FORMAT_R32G32B32A32_FLOAT:
emit_load_R32G32B32A32(p, dataXMM, srcECX);
break;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
emit_load_R8G8B8A8_UNORM(p, dataXMM, srcECX);
emit_swizzle(p, dataXMM, dataXMM, SHUF(Z,Y,X,W));
break;
@@ -360,7 +360,7 @@ static boolean translate_attr( struct translate_sse *p,
case PIPE_FORMAT_R32G32B32A32_FLOAT:
emit_store_R32G32B32A32(p, dstEAX, dataXMM);
break;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
emit_swizzle(p, dataXMM, dataXMM, SHUF(Z,Y,X,W));
emit_store_R8G8B8A8_UNORM(p, dstEAX, dataXMM);
break;
diff --git a/src/gallium/auxiliary/util/u_blit.c b/src/gallium/auxiliary/util/u_blit.c
index f0bc58a558..0b263a9db5 100644
--- a/src/gallium/auxiliary/util/u_blit.c
+++ b/src/gallium/auxiliary/util/u_blit.c
@@ -62,6 +62,7 @@ struct blit_state
struct pipe_rasterizer_state rasterizer;
struct pipe_sampler_state sampler;
struct pipe_viewport_state viewport;
+ struct pipe_clip_state clip;
void *vs;
void *fs[TGSI_WRITEMASK_XYZW + 1];
@@ -101,7 +102,6 @@ util_create_blit(struct pipe_context *pipe, struct cso_context *cso)
memset(&ctx->rasterizer, 0, sizeof(ctx->rasterizer));
ctx->rasterizer.front_winding = PIPE_WINDING_CW;
ctx->rasterizer.cull_mode = PIPE_WINDING_NONE;
- ctx->rasterizer.bypass_vs_clip_and_viewport = 1;
ctx->rasterizer.gl_rasterization_rules = 1;
/* samplers */
@@ -114,7 +114,6 @@ util_create_blit(struct pipe_context *pipe, struct cso_context *cso)
ctx->sampler.mag_img_filter = 0; /* set later */
ctx->sampler.normalized_coords = 1;
-
/* vertex shader - still required to provide the linkage between
* fragment shader input semantics and vertex_element/buffers.
*/
@@ -266,7 +265,6 @@ regions_overlap(int srcX0, int srcY0,
* \param writemask controls which channels in the dest surface are sourced
* from the src surface. Disabled channels are sourced
* from (0,0,0,1).
- * XXX what about clipping???
* XXX need some control over blitting Z and/or stencil.
*/
void
@@ -407,14 +405,17 @@ util_blit_pixels_writemask(struct blit_state *ctx,
cso_save_rasterizer(ctx->cso);
cso_save_samplers(ctx->cso);
cso_save_sampler_textures(ctx->cso);
+ cso_save_viewport(ctx->cso);
cso_save_framebuffer(ctx->cso);
cso_save_fragment_shader(ctx->cso);
cso_save_vertex_shader(ctx->cso);
+ cso_save_clip(ctx->cso);
/* set misc state we care about */
cso_set_blend(ctx->cso, &ctx->blend);
cso_set_depth_stencil_alpha(ctx->cso, &ctx->depthstencil);
cso_set_rasterizer(ctx->cso, &ctx->rasterizer);
+ cso_set_clip(ctx->cso, &ctx->clip);
/* sampler */
ctx->sampler.min_img_filter = filter;
@@ -422,6 +423,17 @@ util_blit_pixels_writemask(struct blit_state *ctx,
cso_single_sampler(ctx->cso, 0, &ctx->sampler);
cso_single_sampler_done(ctx->cso);
+ /* viewport */
+ ctx->viewport.scale[0] = 0.5f * dst->width;
+ ctx->viewport.scale[1] = 0.5f * dst->height;
+ ctx->viewport.scale[2] = 0.5f;
+ ctx->viewport.scale[3] = 1.0f;
+ ctx->viewport.translate[0] = 0.5f * dst->width;
+ ctx->viewport.translate[1] = 0.5f * dst->height;
+ ctx->viewport.translate[2] = 0.5f;
+ ctx->viewport.translate[3] = 0.0f;
+ cso_set_viewport(ctx->cso, &ctx->viewport);
+
/* texture */
cso_set_sampler_textures(ctx->cso, 1, &tex);
@@ -444,8 +456,10 @@ util_blit_pixels_writemask(struct blit_state *ctx,
/* draw quad */
offset = setup_vertex_data_tex(ctx,
- (float) dstX0, (float) dstY0,
- (float) dstX1, (float) dstY1,
+ (float) dstX0 / dst->width * 2.0f - 1.0f,
+ (float) dstY0 / dst->height * 2.0f - 1.0f,
+ (float) dstX1 / dst->width * 2.0f - 1.0f,
+ (float) dstY1 / dst->height * 2.0f - 1.0f,
s0, t0,
s1, t1,
z);
@@ -461,9 +475,11 @@ util_blit_pixels_writemask(struct blit_state *ctx,
cso_restore_rasterizer(ctx->cso);
cso_restore_samplers(ctx->cso);
cso_restore_sampler_textures(ctx->cso);
+ cso_restore_viewport(ctx->cso);
cso_restore_framebuffer(ctx->cso);
cso_restore_fragment_shader(ctx->cso);
cso_restore_vertex_shader(ctx->cso);
+ cso_restore_clip(ctx->cso);
pipe_texture_reference(&tex, NULL);
}
@@ -547,11 +563,13 @@ util_blit_pixels_tex(struct blit_state *ctx,
cso_save_framebuffer(ctx->cso);
cso_save_fragment_shader(ctx->cso);
cso_save_vertex_shader(ctx->cso);
+ cso_save_clip(ctx->cso);
/* set misc state we care about */
cso_set_blend(ctx->cso, &ctx->blend);
cso_set_depth_stencil_alpha(ctx->cso, &ctx->depthstencil);
cso_set_rasterizer(ctx->cso, &ctx->rasterizer);
+ cso_set_clip(ctx->cso, &ctx->clip);
/* sampler */
ctx->sampler.min_img_filter = filter;
@@ -559,6 +577,17 @@ util_blit_pixels_tex(struct blit_state *ctx,
cso_single_sampler(ctx->cso, 0, &ctx->sampler);
cso_single_sampler_done(ctx->cso);
+ /* viewport */
+ ctx->viewport.scale[0] = 0.5f * dst->width;
+ ctx->viewport.scale[1] = 0.5f * dst->height;
+ ctx->viewport.scale[2] = 0.5f;
+ ctx->viewport.scale[3] = 1.0f;
+ ctx->viewport.translate[0] = 0.5f * dst->width;
+ ctx->viewport.translate[1] = 0.5f * dst->height;
+ ctx->viewport.translate[2] = 0.5f;
+ ctx->viewport.translate[3] = 0.0f;
+ cso_set_viewport(ctx->cso, &ctx->viewport);
+
/* texture */
cso_set_sampler_textures(ctx->cso, 1, &tex);
@@ -576,8 +605,10 @@ util_blit_pixels_tex(struct blit_state *ctx,
/* draw quad */
offset = setup_vertex_data_tex(ctx,
- (float) dstX0, (float) dstY0,
- (float) dstX1, (float) dstY1,
+ (float) dstX0 / dst->width * 2.0f - 1.0f,
+ (float) dstY0 / dst->height * 2.0f - 1.0f,
+ (float) dstX1 / dst->width * 2.0f - 1.0f,
+ (float) dstY1 / dst->height * 2.0f - 1.0f,
s0, t0, s1, t1,
z);
@@ -596,4 +627,5 @@ util_blit_pixels_tex(struct blit_state *ctx,
cso_restore_framebuffer(ctx->cso);
cso_restore_fragment_shader(ctx->cso);
cso_restore_vertex_shader(ctx->cso);
+ cso_restore_clip(ctx->cso);
}
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index 18f8606818..0ba09d33bf 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -93,6 +93,12 @@ struct blitter_context_priv
/* Rasterizer state. */
void *rs_state;
+
+ /* Viewport state. */
+ struct pipe_viewport_state viewport;
+
+ /* Clip state. */
+ struct pipe_clip_state clip;
};
struct blitter_context *util_blitter_create(struct pipe_context *pipe)
@@ -160,7 +166,6 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe)
memset(&rs_state, 0, sizeof(rs_state));
rs_state.front_winding = PIPE_WINDING_CW;
rs_state.cull_mode = PIPE_WINDING_NONE;
- rs_state.bypass_vs_clip_and_viewport = 1;
rs_state.gl_rasterization_rules = 1;
rs_state.flatshade = 1;
ctx->rs_state = pipe->create_rasterizer_state(pipe, &rs_state);
@@ -263,6 +268,9 @@ static void blitter_restore_CSOs(struct blitter_context_priv *ctx)
pipe->set_stencil_ref(pipe, &ctx->blitter.saved_stencil_ref);
+ pipe->set_viewport_state(pipe, &ctx->blitter.saved_viewport);
+ pipe->set_clip_state(pipe, &ctx->blitter.saved_clip);
+
/* restore the state objects which are required to be saved before copy/fill
*/
if (ctx->blitter.saved_fb_state.nr_cbufs != ~0) {
@@ -288,25 +296,40 @@ static void blitter_restore_CSOs(struct blitter_context_priv *ctx)
static void blitter_set_rectangle(struct blitter_context_priv *ctx,
unsigned x1, unsigned y1,
unsigned x2, unsigned y2,
+ unsigned width, unsigned height,
float depth)
{
int i;
/* set vertex positions */
- ctx->vertices[0][0][0] = x1; /*v0.x*/
- ctx->vertices[0][0][1] = y1; /*v0.y*/
+ ctx->vertices[0][0][0] = (float)x1 / width * 2.0f - 1.0f; /*v0.x*/
+ ctx->vertices[0][0][1] = (float)y1 / height * 2.0f - 1.0f; /*v0.y*/
- ctx->vertices[1][0][0] = x2; /*v1.x*/
- ctx->vertices[1][0][1] = y1; /*v1.y*/
+ ctx->vertices[1][0][0] = (float)x2 / width * 2.0f - 1.0f; /*v1.x*/
+ ctx->vertices[1][0][1] = (float)y1 / height * 2.0f - 1.0f; /*v1.y*/
- ctx->vertices[2][0][0] = x2; /*v2.x*/
- ctx->vertices[2][0][1] = y2; /*v2.y*/
+ ctx->vertices[2][0][0] = (float)x2 / width * 2.0f - 1.0f; /*v2.x*/
+ ctx->vertices[2][0][1] = (float)y2 / height * 2.0f - 1.0f; /*v2.y*/
- ctx->vertices[3][0][0] = x1; /*v3.x*/
- ctx->vertices[3][0][1] = y2; /*v3.y*/
+ ctx->vertices[3][0][0] = (float)x1 / width * 2.0f - 1.0f; /*v3.x*/
+ ctx->vertices[3][0][1] = (float)y2 / height * 2.0f - 1.0f; /*v3.y*/
for (i = 0; i < 4; i++)
ctx->vertices[i][0][2] = depth; /*z*/
+
+ /* viewport */
+ ctx->viewport.scale[0] = 0.5f * width;
+ ctx->viewport.scale[1] = 0.5f * height;
+ ctx->viewport.scale[2] = 1.0f;
+ ctx->viewport.scale[3] = 1.0f;
+ ctx->viewport.translate[0] = 0.5f * width;
+ ctx->viewport.translate[1] = 0.5f * height;
+ ctx->viewport.translate[2] = 0.0f;
+ ctx->viewport.translate[3] = 0.0f;
+ ctx->pipe->set_viewport_state(ctx->pipe, &ctx->viewport);
+
+ /* clip */
+ ctx->pipe->set_clip_state(ctx->pipe, &ctx->clip);
}
static void blitter_set_clear_color(struct blitter_context_priv *ctx,
@@ -550,7 +573,7 @@ void util_blitter_clear(struct blitter_context *blitter,
pipe->bind_vs_state(pipe, ctx->vs_col);
blitter_set_clear_color(ctx, rgba);
- blitter_set_rectangle(ctx, 0, 0, width, height, depth);
+ blitter_set_rectangle(ctx, 0, 0, width, height, width, height, depth);
blitter_draw_quad(ctx);
blitter_restore_CSOs(ctx);
}
@@ -633,7 +656,7 @@ static void util_blitter_do_copy(struct blitter_context *blitter,
assert(0);
}
- blitter_set_rectangle(ctx, dstx, dsty, dstx+width, dsty+height, 0);
+ blitter_set_rectangle(ctx, dstx, dsty, dstx+width, dsty+height, dst->width, dst->height, 0);
blitter_draw_quad(ctx);
}
@@ -794,7 +817,7 @@ void util_blitter_fill(struct blitter_context *blitter,
pipe->set_framebuffer_state(pipe, &fb_state);
blitter_set_clear_color(ctx, rgba);
- blitter_set_rectangle(ctx, 0, 0, width, height, 0);
+ blitter_set_rectangle(ctx, 0, 0, width, height, dst->width, dst->height, 0);
blitter_draw_quad(ctx);
blitter_restore_CSOs(ctx);
}
diff --git a/src/gallium/auxiliary/util/u_blitter.h b/src/gallium/auxiliary/util/u_blitter.h
index a2f17073ac..92008fce99 100644
--- a/src/gallium/auxiliary/util/u_blitter.h
+++ b/src/gallium/auxiliary/util/u_blitter.h
@@ -48,6 +48,8 @@ struct blitter_context
struct pipe_framebuffer_state saved_fb_state; /**< framebuffer state */
struct pipe_stencil_ref saved_stencil_ref; /**< stencil ref */
+ struct pipe_viewport_state saved_viewport;
+ struct pipe_clip_state saved_clip;
int saved_num_sampler_states;
void *saved_sampler_states[32];
@@ -206,6 +208,20 @@ void util_blitter_save_framebuffer(struct blitter_context *blitter,
}
static INLINE
+void util_blitter_save_viewport(struct blitter_context *blitter,
+ struct pipe_viewport_state *state)
+{
+ blitter->saved_viewport = *state;
+}
+
+static INLINE
+void util_blitter_save_clip(struct blitter_context *blitter,
+ struct pipe_clip_state *state)
+{
+ blitter->saved_clip = *state;
+}
+
+static INLINE
void util_blitter_save_fragment_sampler_states(
struct blitter_context *blitter,
int num_sampler_states,
diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c
index 858d52c6ef..94be682c4b 100644
--- a/src/gallium/auxiliary/util/u_debug.c
+++ b/src/gallium/auxiliary/util/u_debug.c
@@ -387,7 +387,7 @@ void debug_dump_image(const char *prefix,
/* XXX this is a hack */
switch (format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
r = 2;
g = 1;
b = 0;
diff --git a/src/gallium/auxiliary/util/u_dump_state.c b/src/gallium/auxiliary/util/u_dump_state.c
index eaf4ec90f2..ae7afd7311 100644
--- a/src/gallium/auxiliary/util/u_dump_state.c
+++ b/src/gallium/auxiliary/util/u_dump_state.c
@@ -318,7 +318,6 @@ util_dump_rasterizer_state(struct os_stream *stream, const struct pipe_rasterize
util_dump_member(stream, uint, state, line_stipple_factor);
util_dump_member(stream, uint, state, line_stipple_pattern);
util_dump_member(stream, bool, state, line_last_pixel);
- util_dump_member(stream, bool, state, bypass_vs_clip_and_viewport);
util_dump_member(stream, bool, state, flatshade_first);
util_dump_member(stream, bool, state, gl_rasterization_rules);
diff --git a/src/gallium/auxiliary/util/u_format.csv b/src/gallium/auxiliary/util/u_format.csv
index 7595576953..96a0fa6550 100644
--- a/src/gallium/auxiliary/util/u_format.csv
+++ b/src/gallium/auxiliary/util/u_format.csv
@@ -1,50 +1,112 @@
+###########################################################################
+#
+# Copyright 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, sub license, 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 NON-INFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS 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.
+#
+###########################################################################
+
+# This CSV file has the input data for u_format.h's struct
+# util_format_description.
+#
+# Each format entry contains:
+# - name, per enum pipe_format
+# - layout, per enum util_format_layout, in shortened lower caps
+# - pixel block's width
+# - pixel block's height
+# - channel encoding (only meaningful for plain layout), containing for each
+# channel the following information:
+# - type, one of
+# - 'x': void
+# - 'u': unsigned
+# - 's': signed
+# - 'h': fixed
+# - 'f': FLOAT
+# - optionally followed by 'n' if it is normalized
+# - number of bits
+# - channel swizzle
+# - color space: rgb, yub, sz
+#
+# See also:
+# - http://msdn.microsoft.com/en-us/library/ee416489.aspx (D3D9)
+# - http://msdn.microsoft.com/en-us/library/ee415668.aspx (D3D9 -> D3D10)
+# - http://msdn.microsoft.com/en-us/library/ee418116.aspx (D3D10)
+#
+# Note that GL doesn't really specify the layout of internal formats. See
+# OpenGL 2.1 specification, Table 3.16, on the "Correspondence of sized
+# internal formats to base in- ternal formats, and desired component
+# resolutions for each sized internal format."
+
# Typical rendertarget formats
-PIPE_FORMAT_A8R8G8B8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , zyxw, rgb
-PIPE_FORMAT_X8R8G8B8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , zyx1, rgb
-PIPE_FORMAT_B8G8R8A8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , yzwx, rgb
-PIPE_FORMAT_B8G8R8X8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , yzw1, rgb
-PIPE_FORMAT_A1R5G5B5_UNORM , plain, 1, 1, un5 , un5 , un5 , un1 , zyxw, rgb
-PIPE_FORMAT_A4R4G4B4_UNORM , plain, 1, 1, un4 , un4 , un4 , un4 , zyxw, rgb
-PIPE_FORMAT_R5G6B5_UNORM , plain, 1, 1, un5 , un6 , un5 , , zyx1, rgb
-PIPE_FORMAT_A2B10G10R10_UNORM , plain, 1, 1, un10, un10, un10, un2 , xyzw, rgb
+PIPE_FORMAT_B8G8R8A8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , zyxw, rgb
+PIPE_FORMAT_B8G8R8X8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , zyx1, rgb
+PIPE_FORMAT_A8R8G8B8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , yzwx, rgb
+PIPE_FORMAT_X8R8G8B8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , yzw1, rgb
+PIPE_FORMAT_A8B8G8R8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , wzyx, rgb
+PIPE_FORMAT_X8B8G8R8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , wzy1, rgb
+PIPE_FORMAT_B5G5R5A1_UNORM , plain, 1, 1, un5 , un5 , un5 , un1 , zyxw, rgb
+PIPE_FORMAT_B4G4R4A4_UNORM , plain, 1, 1, un4 , un4 , un4 , un4 , zyxw, rgb
+PIPE_FORMAT_B5G6R5_UNORM , plain, 1, 1, un5 , un6 , un5 , , zyx1, rgb
+PIPE_FORMAT_R10G10B10A2_UNORM , plain, 1, 1, un10, un10, un10, un2 , xyzw, rgb
# Luminance/Intensity/Alpha formats
PIPE_FORMAT_L8_UNORM , plain, 1, 1, un8 , , , , xxx1, rgb
PIPE_FORMAT_A8_UNORM , plain, 1, 1, un8 , , , , 000x, rgb
PIPE_FORMAT_I8_UNORM , plain, 1, 1, un8 , , , , xxxx, rgb
-PIPE_FORMAT_A8L8_UNORM , plain, 1, 1, un8 , un8 , , , xxxy, rgb
+PIPE_FORMAT_L8A8_UNORM , plain, 1, 1, un8 , un8 , , , xxxy, rgb
PIPE_FORMAT_L16_UNORM , plain, 1, 1, un16, , , , xxx1, rgb
# SRGB formats
PIPE_FORMAT_L8_SRGB , plain, 1, 1, un8 , , , , xxx1, srgb
-PIPE_FORMAT_A8L8_SRGB , plain, 1, 1, un8 , un8 , , , xxxy, srgb
-PIPE_FORMAT_R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , , zyx1, srgb
-PIPE_FORMAT_R8G8B8A8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , wzyx, srgb
-PIPE_FORMAT_R8G8B8X8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , wzy1, srgb
-PIPE_FORMAT_A8R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , zyxw, srgb
-PIPE_FORMAT_X8R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , zyx1, srgb
-PIPE_FORMAT_B8G8R8A8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , yzwx, srgb
-PIPE_FORMAT_B8G8R8X8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , yzw1, srgb
+PIPE_FORMAT_L8A8_SRGB , plain, 1, 1, un8 , un8 , , , xxxy, srgb
+PIPE_FORMAT_R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , , xyz1, srgb
+PIPE_FORMAT_A8B8G8R8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , wzyx, srgb
+PIPE_FORMAT_X8B8G8R8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , wzy1, srgb
+PIPE_FORMAT_B8G8R8A8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , zyxw, srgb
+PIPE_FORMAT_B8G8R8X8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , zyx1, srgb
+PIPE_FORMAT_A8R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , yzwx, srgb
+PIPE_FORMAT_X8R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , yzw1, srgb
-# Signed formats (typically used for bump map textures)
-PIPE_FORMAT_A8B8G8R8_SNORM , plain, 1, 1, sn8 , sn8 , sn8 , sn8 , xyzw, rgb
-PIPE_FORMAT_X8B8G8R8_SNORM , plain, 1, 1, sn8 , sn8 , sn8 , sn8 , xyz1, rgb
-PIPE_FORMAT_X8UB8UG8SR8S_NORM , plain, 1, 1, sn8 , sn8 , un8 , x8 , xyz1, rgb
-PIPE_FORMAT_B6UG5SR5S_NORM , plain, 1, 1, sn5 , sn5 , un6 , , xyz1, rgb
+# Mixed-sign formats (typically used for bump map textures)
+PIPE_FORMAT_R8SG8SB8UX8U_NORM , plain, 1, 1, sn8 , sn8 , un8 , x8 , xyz1, rgb
+PIPE_FORMAT_R5SG5SB6U_NORM , plain, 1, 1, sn5 , sn5 , un6 , , xyz1, rgb
# Depth-stencil formats
PIPE_FORMAT_S8_UNORM , plain, 1, 1, un8 , , , , _x__, zs
PIPE_FORMAT_Z16_UNORM , plain, 1, 1, un16, , , , x___, zs
PIPE_FORMAT_Z32_UNORM , plain, 1, 1, un32, , , , x___, zs
PIPE_FORMAT_Z32_FLOAT , plain, 1, 1, f32 , , , , x___, zs
-PIPE_FORMAT_S8Z24_UNORM , plain, 1, 1, un24, un8 , , , xy__, zs
-PIPE_FORMAT_Z24S8_UNORM , plain, 1, 1, un8 , un24, , , yx__, zs
-PIPE_FORMAT_X8Z24_UNORM , plain, 1, 1, un24, un8 , , , x___, zs
-PIPE_FORMAT_Z24X8_UNORM , plain, 1, 1, un8 , un24, , , y___, zs
+PIPE_FORMAT_Z24S8_UNORM , plain, 1, 1, un24, un8 , , , xy__, zs
+PIPE_FORMAT_S8Z24_UNORM , plain, 1, 1, un8 , un24, , , yx__, zs
+PIPE_FORMAT_Z24X8_UNORM , plain, 1, 1, un24, un8 , , , x___, zs
+PIPE_FORMAT_X8Z24_UNORM , plain, 1, 1, un8 , un24, , , y___, zs
# YUV formats
-PIPE_FORMAT_YCBCR , subsampled, 2, 1, x32 , , , , xyz1, yuv
-PIPE_FORMAT_YCBCR_REV , subsampled, 2, 1, x32 , , , , xyz1, yuv
+# http://www.fourcc.org/yuv.php#UYVY
+PIPE_FORMAT_UYVY , subsampled, 2, 1, x32 , , , , xyz1, yuv
+# http://www.fourcc.org/yuv.php#YUYV (a.k.a http://www.fourcc.org/yuv.php#YUY2)
+# XXX: u_tile.c's ycbcr_get_tile_rgba actually interprets it as VYUY but the
+# intent should be to match D3DFMT_YUY2
+PIPE_FORMAT_YUYV , subsampled, 2, 1, x32 , , , , xyz1, yuv
# Compressed formats
PIPE_FORMAT_DXT1_RGB , compressed, 4, 4, x64 , , , , xyz1, rgb
@@ -56,8 +118,9 @@ PIPE_FORMAT_DXT1_SRGBA , compressed, 4, 4, x64 , , , , xy
PIPE_FORMAT_DXT3_SRGBA , compressed, 4, 4, x128, , , , xyzw, srgb
PIPE_FORMAT_DXT5_SRGBA , compressed, 4, 4, x128, , , , xyzw, srgb
-# Old vector formats
-# XXX: Swizzle notation is reversed for these!
+# Straightforward D3D10-like formats (also used for
+# vertex buffer element description)
+#
# See also:
# - src/gallium/auxiliary/translate/translate_generic.c
# - src/mesa/state_tracker/st_draw.c
@@ -107,6 +170,8 @@ PIPE_FORMAT_R16G16B16_SSCALED , plain, 1, 1, s16 , s16 , s16 , , xyz1, r
PIPE_FORMAT_R16G16B16A16_SSCALED , plain, 1, 1, s16 , s16 , s16 , s16 , xyzw, rgb
PIPE_FORMAT_R8_UNORM , plain, 1, 1, un8 , , , , x001, rgb
PIPE_FORMAT_R8G8_UNORM , plain, 1, 1, un8 , un8 , , , xy01, rgb
+PIPE_FORMAT_R8G8B8_UNORM , plain, 1, 1, un8 , un8 , un8 , , xyz1, rgb
+PIPE_FORMAT_R8G8B8A8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , xyzw, rgb
PIPE_FORMAT_R8_USCALED , plain, 1, 1, u8 , , , , x001, rgb
PIPE_FORMAT_R8G8_USCALED , plain, 1, 1, u8 , u8 , , , xy01, rgb
PIPE_FORMAT_R8G8B8_USCALED , plain, 1, 1, u8 , u8 , u8 , , xyz1, rgb
@@ -119,17 +184,3 @@ PIPE_FORMAT_R8_SSCALED , plain, 1, 1, s8 , , , , x001, r
PIPE_FORMAT_R8G8_SSCALED , plain, 1, 1, s8 , s8 , , , xy01, rgb
PIPE_FORMAT_R8G8B8_SSCALED , plain, 1, 1, s8 , s8 , s8 , , xyz1, rgb
PIPE_FORMAT_R8G8B8A8_SSCALED , plain, 1, 1, s8 , s8 , s8 , s8 , xyzw, rgb
-
-# Ambiguous formats
-# FIXME: They are used with different meanings in different places!!!
-PIPE_FORMAT_R8G8B8_UNORM , plain, 1, 1, un8 , un8 , un8 , , zyx1, rgb
-PIPE_FORMAT_R8G8B8A8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , wzyx, rgb
-
-# Unused formats
-# XXX: Couldn't find any state tracker using them!!
-PIPE_FORMAT_B6G5R5_SNORM , plain, 1, 1, sn5 , sn5 , sn6 , , xyz1, rgb
-PIPE_FORMAT_R8G8B8X8_SNORM , plain, 1, 1, sn8 , sn8 , sn8 , sn8 , wzy1, rgb
-PIPE_FORMAT_R8G8B8X8_USCALED , plain, 1, 1, u8 , u8 , u8 , u8 , wzy1, rgb
-PIPE_FORMAT_R8G8B8X8_SSCALED , plain, 1, 1, s8 , s8 , s8 , s8 , wzy1, rgb
-# XXX: This one is mentioned in mesa and r300, but not anywhere else. Not sure it is actually needed
-PIPE_FORMAT_R8G8B8X8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , wzy1, rgb
diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util/u_format.h
index e8fa0022b5..b2aa5bfb18 100644
--- a/src/gallium/auxiliary/util/u_format.h
+++ b/src/gallium/auxiliary/util/u_format.h
@@ -120,9 +120,15 @@ struct util_format_channel_description
struct util_format_description
{
enum pipe_format format;
+
const char *name;
/**
+ * Short name, striped of the prefix, lower case.
+ */
+ const char *short_name;
+
+ /**
* Pixel block dimensions.
*/
struct util_format_block block;
@@ -140,6 +146,15 @@ struct util_format_description
unsigned is_array:1;
/**
+ * Whether the pixel format can be described as a bitfield structure.
+ *
+ * In particular:
+ * - pixel depth must be 8, 16, or 32 bits;
+ * - all channels must be unsigned, signed, or void
+ */
+ unsigned is_bitmask:1;
+
+ /**
* Whether channels have mixed types (ignoring UTIL_FORMAT_TYPE_VOID).
*/
unsigned is_mixed:1;
diff --git a/src/gallium/auxiliary/util/u_format_access.py b/src/gallium/auxiliary/util/u_format_access.py
index 1c9be1b538..00424779d2 100644
--- a/src/gallium/auxiliary/util/u_format_access.py
+++ b/src/gallium/auxiliary/util/u_format_access.py
@@ -37,6 +37,7 @@
'''
+import math
import sys
from u_format_pack import *
@@ -94,6 +95,20 @@ def native_type(format):
assert False
+def generate_srgb_tables():
+ print 'static ubyte srgb_to_linear[256] = {'
+ for i in range(256):
+ print ' %s,' % (int(math.pow((i / 255.0 + 0.055) / 1.055, 2.4) * 255))
+ print '};'
+ print
+ print 'static ubyte linear_to_srgb[256] = {'
+ print ' 0,'
+ for i in range(1, 256):
+ print ' %s,' % (int((1.055 * math.pow(i / 255.0, 0.41666) - 0.055) * 255))
+ print '};'
+ print
+
+
def generate_format_read(format, dst_channel, dst_native_type, dst_suffix):
'''Generate the function to read pixels from a particular format'''
@@ -305,6 +320,8 @@ def main():
print '#include "u_format_pack.h"'
print
+ generate_srgb_tables()
+
type = Channel(FLOAT, False, 32)
native_type = 'float'
suffix = '4f'
diff --git a/src/gallium/auxiliary/util/u_format_pack.py b/src/gallium/auxiliary/util/u_format_pack.py
index 3f33f7cc02..b49039db39 100644
--- a/src/gallium/auxiliary/util/u_format_pack.py
+++ b/src/gallium/auxiliary/util/u_format_pack.py
@@ -252,9 +252,6 @@ def conversion_expr(src_channel, dst_channel, dst_native_type, value, clamp=True
if src_channel.type == FLOAT and dst_channel.type == FLOAT:
return '(%s)%s' % (dst_native_type, value)
- if not src_channel.norm and not dst_channel.norm:
- return '(%s)%s' % (dst_native_type, value)
-
if clamp:
value = clamp_expr(src_channel, dst_channel, dst_native_type, value)
@@ -280,15 +277,15 @@ def conversion_expr(src_channel, dst_channel, dst_native_type, value, clamp=True
value = '(%s * %s)' % (value, scale)
return '(%s)%s' % (dst_native_type, value)
- if not src_channel.norm and not dst_channel.norm:
- # neither is normalized -- just cast
- return '(%s)%s' % (dst_native_type, value)
-
if src_channel.type in (SIGNED, UNSIGNED) and dst_channel.type in (SIGNED, UNSIGNED):
+ if not src_channel.norm and not dst_channel.norm:
+ # neither is normalized -- just cast
+ return '(%s)%s' % (dst_native_type, value)
+
src_one = get_one(src_channel)
dst_one = get_one(dst_channel)
- if src_one > dst_one and src_channel.norm:
+ if src_one > dst_one and src_channel.norm and dst_channel.norm:
# We can just bitshift
src_shift = get_one_shift(src_channel)
dst_shift = get_one_shift(dst_channel)
@@ -296,7 +293,7 @@ def conversion_expr(src_channel, dst_channel, dst_native_type, value, clamp=True
else:
# We need to rescale using an intermediate type big enough to hold the multiplication of both
tmp_native_type = intermediate_native_type(src_channel.size + dst_channel.size, src_channel.sign and dst_channel.sign)
- value = '(%s)%s' % (tmp_native_type, value)
+ value = '((%s)%s)' % (tmp_native_type, value)
value = '(%s * 0x%x / 0x%x)' % (value, dst_one, src_one)
value = '(%s)%s' % (dst_native_type, value)
return value
@@ -307,6 +304,8 @@ def conversion_expr(src_channel, dst_channel, dst_native_type, value, clamp=True
def generate_format_unpack(format, dst_channel, dst_native_type, dst_suffix):
'''Generate the function to unpack pixels from a particular format'''
+ assert format.layout == PLAIN
+
name = format.short_name()
src_native_type = native_type(format)
@@ -314,32 +313,99 @@ def generate_format_unpack(format, dst_channel, dst_native_type, dst_suffix):
print 'static INLINE void'
print 'util_format_%s_unpack_%s(%s *dst, const void *src)' % (name, dst_suffix, dst_native_type)
print '{'
- print ' union util_format_%s pixel;' % format.short_name()
- print ' memcpy(&pixel, src, sizeof pixel);'
- bswap_format(format)
+
+ if format.is_bitmask():
+ depth = format.block_size()
+ print ' uint%u_t value = *(uint%u_t *)src;' % (depth, depth)
- assert format.layout == PLAIN
+ # Declare the intermediate variables
+ for i in range(format.nr_channels()):
+ src_channel = format.channels[i]
+ if src_channel.type == UNSIGNED:
+ print ' uint%u_t %s;' % (depth, src_channel.name)
+ elif src_channel.type == SIGNED:
+ print ' int%u_t %s;' % (depth, src_channel.name)
- for i in range(4):
- swizzle = format.swizzles[i]
- if swizzle < 4:
- src_channel = format.channels[swizzle]
- value = 'pixel.chan.%s' % src_channel.name
- value = conversion_expr(src_channel, dst_channel, dst_native_type, value)
- elif swizzle == SWIZZLE_0:
- value = '0'
- elif swizzle == SWIZZLE_1:
- value = get_one(dst_channel)
- elif swizzle == SWIZZLE_NONE:
- value = '0'
- else:
- assert False
- if format.colorspace == ZS:
- if i == 3:
+ print '#ifdef PIPE_ARCH_BIG_ENDIAN'
+ print ' value = util_bswap%u(value);' % depth
+ print '#endif'
+
+ # Compute the intermediate unshifted values
+ shift = 0
+ for i in range(format.nr_channels()):
+ src_channel = format.channels[i]
+ value = 'value'
+ if src_channel.type == UNSIGNED:
+ if shift:
+ value = '%s >> %u' % (value, shift)
+ if shift + src_channel.size < depth:
+ value = '(%s) & 0x%x' % (value, (1 << src_channel.size) - 1)
+ elif src_channel.type == SIGNED:
+ if shift + src_channel.size < depth:
+ # Align the sign bit
+ lshift = depth - (shift + src_channel.size)
+ value = '%s << %u' % (value, lshift)
+ # Cast to signed
+ value = '(int%u_t)(%s) ' % (depth, value)
+ if src_channel.size < depth:
+ # Align the LSB bit
+ rshift = depth - src_channel.size
+ value = '(%s) >> %u' % (value, rshift)
+ else:
+ value = None
+
+ if value is not None:
+ print ' %s = %s;' % (src_channel.name, value)
+
+ shift += src_channel.size
+
+ # Convert, swizzle, and store final values
+ for i in range(4):
+ swizzle = format.swizzles[i]
+ if swizzle < 4:
+ src_channel = format.channels[swizzle]
+ value = src_channel.name
+ value = conversion_expr(src_channel, dst_channel, dst_native_type, value)
+ elif swizzle == SWIZZLE_0:
+ value = '0'
+ elif swizzle == SWIZZLE_1:
value = get_one(dst_channel)
- elif i >= 1:
- value = 'dst[0]'
- print ' dst[%u] = %s; /* %s */' % (i, value, 'rgba'[i])
+ elif swizzle == SWIZZLE_NONE:
+ value = '0'
+ else:
+ assert False
+ if format.colorspace == ZS:
+ if i == 3:
+ value = get_one(dst_channel)
+ elif i >= 1:
+ value = 'dst[0]'
+ print ' dst[%u] = %s; /* %s */' % (i, value, 'rgba'[i])
+
+ else:
+ print ' union util_format_%s pixel;' % format.short_name()
+ print ' memcpy(&pixel, src, sizeof pixel);'
+ bswap_format(format)
+
+ for i in range(4):
+ swizzle = format.swizzles[i]
+ if swizzle < 4:
+ src_channel = format.channels[swizzle]
+ value = 'pixel.chan.%s' % src_channel.name
+ value = conversion_expr(src_channel, dst_channel, dst_native_type, value)
+ elif swizzle == SWIZZLE_0:
+ value = '0'
+ elif swizzle == SWIZZLE_1:
+ value = get_one(dst_channel)
+ elif swizzle == SWIZZLE_NONE:
+ value = '0'
+ else:
+ assert False
+ if format.colorspace == ZS:
+ if i == 3:
+ value = get_one(dst_channel)
+ elif i >= 1:
+ value = 'dst[0]'
+ print ' dst[%u] = %s; /* %s */' % (i, value, 'rgba'[i])
print '}'
print
diff --git a/src/gallium/auxiliary/util/u_format_parse.py b/src/gallium/auxiliary/util/u_format_parse.py
index 250926418e..f74dc5e88a 100755
--- a/src/gallium/auxiliary/util/u_format_parse.py
+++ b/src/gallium/auxiliary/util/u_format_parse.py
@@ -78,7 +78,7 @@ class Channel:
if self.type == UNSIGNED:
return (1 << self.size) - 1
if self.type == SIGNED:
- return self.size - 1
+ return (1 << (self.size - 1)) - 1
assert False
def min(self):
@@ -166,17 +166,11 @@ class Format:
return True
def is_bitmask(self):
- if self.block_size() > 32:
- return False
- if not self.is_pot():
+ if self.block_size() not in (8, 16, 32):
return False
for channel in self.channels:
- if not is_pot(channel.size):
- return True
if channel.type not in (VOID, UNSIGNED, SIGNED):
return False
- if channel.size >= 32:
- return False
return True
def inv_swizzles(self):
diff --git a/src/gallium/auxiliary/util/u_format_table.py b/src/gallium/auxiliary/util/u_format_table.py
index 4e29d15f3b..fb68852a53 100755
--- a/src/gallium/auxiliary/util/u_format_table.py
+++ b/src/gallium/auxiliary/util/u_format_table.py
@@ -90,11 +90,13 @@ def write_format_table(formats):
print 'util_format_none_description = {'
print " PIPE_FORMAT_NONE,"
print " \"PIPE_FORMAT_NONE\","
+ print " \"none\","
print " {0, 0, 0},"
print " 0,"
print " 0,"
print " 0,"
print " 0,"
+ print " 0,"
print " {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}},"
print " {0, 0, 0, 0},"
print " 0"
@@ -105,10 +107,12 @@ def write_format_table(formats):
print 'util_format_%s_description = {' % (format.short_name(),)
print " %s," % (format.name,)
print " \"%s\"," % (format.name,)
+ print " \"%s\"," % (format.short_name(),)
print " {%u, %u, %u},\t/* block */" % (format.block_width, format.block_height, format.block_size())
print " %s," % (layout_map(format.layout),)
print " %u,\t/* nr_channels */" % (format.nr_channels(),)
print " %s,\t/* is_array */" % (bool_map(format.is_array()),)
+ print " %s,\t/* is_bitmask */" % (bool_map(format.is_bitmask()),)
print " %s,\t/* is_mixed */" % (bool_map(format.is_mixed()),)
print " {"
for i in range(4):
diff --git a/src/gallium/auxiliary/util/u_format_tests.c b/src/gallium/auxiliary/util/u_format_tests.c
new file mode 100644
index 0000000000..182a474044
--- /dev/null
+++ b/src/gallium/auxiliary/util/u_format_tests.c
@@ -0,0 +1,544 @@
+/**************************************************************************
+ *
+ * Copyright 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, sub license, 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 NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE 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.
+ *
+ **************************************************************************/
+
+
+#include "u_memory.h"
+#include "u_format_tests.h"
+
+
+/*
+ * Helper macros to create the packed bytes for longer words.
+ */
+
+#define PACKED_1x8(x) {x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+#define PACKED_2x8(x, y) {x, y, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+#define PACKED_3x8(x, y, z) {x, y, z, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+#define PACKED_4x8(x, y, z, w) {x, y, z, w, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+
+#define PACKED_1x16(x) {(x) & 0xff, (x) >> 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+#define PACKED_2x16(x, y) {(x) & 0xff, (x) >> 8, (y) & 0xff, (y) >> 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+#define PACKED_3x16(x, y, z) {(x) & 0xff, (x) >> 8, (y) & 0xff, (y) >> 8, (z) & 0xff, (z) >> 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+#define PACKED_4x16(x, y, z, w) {(x) & 0xff, (x) >> 8, (y) & 0xff, (y) >> 8, (z) & 0xff, (z) >> 8, (w) & 0xff, (w) >> 8, 0, 0, 0, 0, 0, 0, 0, 0}
+
+#define PACKED_1x32(x) {(x) & 0xff, ((x) >> 8) & 0xff, ((x) >> 16) & 0xff, (x) >> 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+#define PACKED_2x32(x, y) {(x) & 0xff, ((x) >> 8) & 0xff, ((x) >> 16) & 0xff, (x) >> 24, (y) & 0xff, ((y) >> 8) & 0xff, ((y) >> 16) & 0xff, (y) >> 24, 0, 0, 0, 0, 0, 0, 0, 0}
+#define PACKED_3x32(x, y, z) {(x) & 0xff, ((x) >> 8) & 0xff, ((x) >> 16) & 0xff, (x) >> 24, (y) & 0xff, ((y) >> 8) & 0xff, ((y) >> 16) & 0xff, (y) >> 24, (z) & 0xff, ((z) >> 8) & 0xff, ((z) >> 16) & 0xff, (z) >> 24, 0, 0, 0, 0}
+#define PACKED_4x32(x, y, z, w) {(x) & 0xff, ((x) >> 8) & 0xff, ((x) >> 16) & 0xff, (x) >> 24, (y) & 0xff, ((y) >> 8) & 0xff, ((y) >> 16) & 0xff, (y) >> 24, (z) & 0xff, ((z) >> 8) & 0xff, ((z) >> 16) & 0xff, (z) >> 24, (w) & 0xff, ((w) >> 8) & 0xff, ((w) >> 16) & 0xff, (w) >> 24}
+
+
+/**
+ * Test cases.
+ *
+ * These were manually entered. We could generate these
+ *
+ * To keep this to a we cover only the corner cases, which should produce
+ * good enough coverage since that pixel format transformations are afine for
+ * non SRGB formats.
+ */
+const struct util_format_test_case
+util_format_test_cases[] =
+{
+
+ /*
+ * 32-bit rendertarget formats
+ */
+
+ {PIPE_FORMAT_B8G8R8A8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), {0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_B8G8R8A8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000ff), {0.0, 0.0, 1.0, 0.0}},
+ {PIPE_FORMAT_B8G8R8A8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x0000ff00), {0.0, 1.0, 0.0, 0.0}},
+ {PIPE_FORMAT_B8G8R8A8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00ff0000), {1.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_B8G8R8A8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xff000000), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_B8G8R8A8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), {1.0, 1.0, 1.0, 1.0}},
+
+ {PIPE_FORMAT_B8G8R8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00000000), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_B8G8R8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x000000ff), {0.0, 0.0, 1.0, 1.0}},
+ {PIPE_FORMAT_B8G8R8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x0000ff00), {0.0, 1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_B8G8R8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00ff0000), {1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_B8G8R8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0xff000000), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_B8G8R8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0xffffffff), {1.0, 1.0, 1.0, 1.0}},
+
+ {PIPE_FORMAT_A8R8G8B8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), {0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_A8R8G8B8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000ff), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_A8R8G8B8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x0000ff00), {1.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_A8R8G8B8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00ff0000), {0.0, 1.0, 0.0, 0.0}},
+ {PIPE_FORMAT_A8R8G8B8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xff000000), {0.0, 0.0, 1.0, 0.0}},
+ {PIPE_FORMAT_A8R8G8B8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), {1.0, 1.0, 1.0, 1.0}},
+
+ {PIPE_FORMAT_X8R8G8B8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x00000000), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_X8R8G8B8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x000000ff), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_X8R8G8B8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x0000ff00), {1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_X8R8G8B8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x00ff0000), {0.0, 1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_X8R8G8B8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0xff000000), {0.0, 0.0, 1.0, 1.0}},
+ {PIPE_FORMAT_X8R8G8B8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0xffffffff), {1.0, 1.0, 1.0, 1.0}},
+
+ {PIPE_FORMAT_A8B8G8R8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), {0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_A8B8G8R8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000ff), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_A8B8G8R8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x0000ff00), {0.0, 0.0, 1.0, 0.0}},
+ {PIPE_FORMAT_A8B8G8R8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00ff0000), {0.0, 1.0, 0.0, 0.0}},
+ {PIPE_FORMAT_A8B8G8R8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xff000000), {1.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_A8B8G8R8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), {1.0, 1.0, 1.0, 1.0}},
+
+ {PIPE_FORMAT_X8B8G8R8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x00000000), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_X8B8G8R8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x000000ff), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_X8B8G8R8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x0000ff00), {0.0, 0.0, 1.0, 1.0}},
+ {PIPE_FORMAT_X8B8G8R8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x00ff0000), {0.0, 1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_X8B8G8R8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0xff000000), {1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_X8B8G8R8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0xffffffff), {1.0, 1.0, 1.0, 1.0}},
+
+ {PIPE_FORMAT_R10G10B10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), {0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R10G10B10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000003ff), {1.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R10G10B10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000ffc00), {0.0, 1.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R10G10B10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x3ff00000), {0.0, 0.0, 1.0, 0.0}},
+ {PIPE_FORMAT_R10G10B10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xc0000000), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R10G10B10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), {1.0, 1.0, 1.0, 1.0}},
+
+ /*
+ * 16-bit rendertarget formats
+ */
+
+ {PIPE_FORMAT_B5G5R5A1_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), {0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_B5G5R5A1_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x001f), {0.0, 0.0, 1.0, 0.0}},
+ {PIPE_FORMAT_B5G5R5A1_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x03e0), {0.0, 1.0, 0.0, 0.0}},
+ {PIPE_FORMAT_B5G5R5A1_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x7c00), {1.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_B5G5R5A1_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x8000), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_B5G5R5A1_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xffff), {1.0, 1.0, 1.0, 1.0}},
+
+ {PIPE_FORMAT_B4G4R4A4_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), {0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_B4G4R4A4_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x000f), {0.0, 0.0, 1.0, 0.0}},
+ {PIPE_FORMAT_B4G4R4A4_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x00f0), {0.0, 1.0, 0.0, 0.0}},
+ {PIPE_FORMAT_B4G4R4A4_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0f00), {1.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_B4G4R4A4_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xf000), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_B4G4R4A4_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xffff), {1.0, 1.0, 1.0, 1.0}},
+
+ {PIPE_FORMAT_B5G6R5_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_B5G6R5_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x001f), {0.0, 0.0, 1.0, 1.0}},
+ {PIPE_FORMAT_B5G6R5_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x07e0), {0.0, 1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_B5G6R5_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xf800), {1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_B5G6R5_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xffff), {1.0, 1.0, 1.0, 1.0}},
+
+ /*
+ * Luminance/intensity/alpha formats
+ */
+
+ {PIPE_FORMAT_L8_UNORM, PACKED_1x8(0xff), PACKED_1x8(0x00), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_L8_UNORM, PACKED_1x8(0xff), PACKED_1x8(0xff), {1.0, 1.0, 1.0, 1.0}},
+
+ {PIPE_FORMAT_A8_UNORM, PACKED_1x8(0xff), PACKED_1x8(0x00), {0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_A8_UNORM, PACKED_1x8(0xff), PACKED_1x8(0xff), {0.0, 0.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_I8_UNORM, PACKED_1x8(0xff), PACKED_1x8(0x00), {0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_I8_UNORM, PACKED_1x8(0xff), PACKED_1x8(0xff), {1.0, 1.0, 1.0, 1.0}},
+
+ {PIPE_FORMAT_L8A8_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), {0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_L8A8_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x00ff), {1.0, 1.0, 1.0, 0.0}},
+ {PIPE_FORMAT_L8A8_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xff00), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_L8A8_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xffff), {1.0, 1.0, 1.0, 1.0}},
+
+ {PIPE_FORMAT_L16_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_L16_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xffff), {1.0, 1.0, 1.0, 1.0}},
+
+ /*
+ * TODO: SRGB formats
+ */
+
+ /*
+ * Mixed-signed formats
+ */
+
+ {PIPE_FORMAT_R8SG8SB8UX8U_NORM, PACKED_4x8(0xff, 0xff, 0xff, 0x00), PACKED_4x8(0x00, 0x00, 0x00, 0x00), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8SG8SB8UX8U_NORM, PACKED_4x8(0xff, 0xff, 0xff, 0x00), PACKED_4x8(0x7f, 0x00, 0x00, 0x00), { 1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8SG8SB8UX8U_NORM, PACKED_4x8(0xff, 0xff, 0xff, 0x00), PACKED_4x8(0x81, 0x00, 0x00, 0x00), {-1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8SG8SB8UX8U_NORM, PACKED_4x8(0xff, 0xff, 0xff, 0x00), PACKED_4x8(0x00, 0x7f, 0x00, 0x00), { 0.0, 1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8SG8SB8UX8U_NORM, PACKED_4x8(0xff, 0xff, 0xff, 0x00), PACKED_4x8(0x00, 0x81, 0x00, 0x00), { 0.0, -1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8SG8SB8UX8U_NORM, PACKED_4x8(0xff, 0xff, 0xff, 0x00), PACKED_4x8(0x00, 0x00, 0xff, 0x00), { 0.0, 0.0, 1.0, 1.0}},
+
+ {PIPE_FORMAT_R5SG5SB6U_NORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R5SG5SB6U_NORM, PACKED_1x16(0xffff), PACKED_1x16(0x000f), { 1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R5SG5SB6U_NORM, PACKED_1x16(0xffff), PACKED_1x16(0x0011), {-1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R5SG5SB6U_NORM, PACKED_1x16(0xffff), PACKED_1x16(0x01e0), { 0.0, 1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R5SG5SB6U_NORM, PACKED_1x16(0xffff), PACKED_1x16(0x0220), { 0.0, -1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R5SG5SB6U_NORM, PACKED_1x16(0xffff), PACKED_1x16(0xfc00), { 0.0, 0.0, 1.0, 1.0}},
+
+ /*
+ * TODO: Depth-stencil formats
+ */
+
+ /*
+ * TODO: YUV formats
+ */
+
+ /*
+ * TODO: Compressed formats
+ */
+
+ /*
+ * Standard 8-bit integer formats
+ */
+
+ {PIPE_FORMAT_R8_UNORM, PACKED_1x8(0xff), PACKED_1x8(0x00), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8_UNORM, PACKED_1x8(0xff), PACKED_1x8(0xff), {1.0, 0.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R8G8_UNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x00), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8_UNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0xff, 0x00), {1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8_UNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0xff), {0.0, 1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8_UNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0xff, 0xff), {1.0, 1.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R8G8B8_UNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x00), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8B8_UNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0xff, 0x00, 0x00), {1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8B8_UNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0xff, 0x00), {0.0, 1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8B8_UNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0xff), {0.0, 0.0, 1.0, 1.0}},
+ {PIPE_FORMAT_R8G8B8_UNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0xff, 0xff, 0xff), {1.0, 1.0, 1.0, 1.0}},
+
+ {PIPE_FORMAT_R8G8B8A8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x00), {0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R8G8B8A8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xff, 0x00, 0x00, 0x00), {1.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R8G8B8A8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0xff, 0x00, 0x00), {0.0, 1.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R8G8B8A8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0xff, 0x00), {0.0, 0.0, 1.0, 0.0}},
+ {PIPE_FORMAT_R8G8B8A8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0xff), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8B8A8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xff, 0xff, 0xff, 0xff), {1.0, 1.0, 1.0, 1.0}},
+
+ {PIPE_FORMAT_R8_USCALED, PACKED_1x8(0xff), PACKED_1x8(0x00), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8_USCALED, PACKED_1x8(0xff), PACKED_1x8(0xff), {255.0, 0.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R8G8_USCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x00), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8_USCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0xff, 0x00), {255.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8_USCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0xff), { 0.0, 255.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8_USCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0xff, 0xff), {255.0, 255.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R8G8B8_USCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x00), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8B8_USCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0xff, 0x00, 0x00), {255.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8B8_USCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0xff, 0x00), { 0.0, 255.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8B8_USCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0xff), { 0.0, 0.0, 255.0, 1.0}},
+ {PIPE_FORMAT_R8G8B8_USCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0xff, 0xff, 0xff), {255.0, 255.0, 255.0, 1.0}},
+
+ {PIPE_FORMAT_R8G8B8A8_USCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x00), { 0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R8G8B8A8_USCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xff, 0x00, 0x00, 0x00), {255.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R8G8B8A8_USCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0xff, 0x00, 0x00), { 0.0, 255.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R8G8B8A8_USCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0xff, 0x00), { 0.0, 0.0, 255.0, 0.0}},
+ {PIPE_FORMAT_R8G8B8A8_USCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0xff), { 0.0, 0.0, 0.0, 255.0}},
+ {PIPE_FORMAT_R8G8B8A8_USCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xff, 0xff, 0xff, 0xff), {255.0, 255.0, 255.0, 255.0}},
+
+ {PIPE_FORMAT_R8_SNORM, PACKED_1x8(0xff), PACKED_1x8(0x00), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8_SNORM, PACKED_1x8(0xff), PACKED_1x8(0x7f), { 1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8_SNORM, PACKED_1x8(0xff), PACKED_1x8(0x81), {-1.0, 0.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R8G8_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x00), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x7f, 0x00), { 1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x81, 0x00), {-1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x7f), { 0.0, 1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x81), { 0.0, -1.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R8G8B8_SNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x00), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8B8_SNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x7f, 0x00, 0x00), { 1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8B8_SNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x81, 0x00, 0x00), {-1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8B8_SNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x7f, 0x00), { 0.0, 1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8B8_SNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x81, 0x00), { 0.0, -1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8B8_SNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x7f), { 0.0, 0.0, 1.0, 1.0}},
+ {PIPE_FORMAT_R8G8B8_SNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x81), { 0.0, 0.0, -1.0, 1.0}},
+
+ {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x00), { 0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x7f, 0x00, 0x00, 0x00), { 1.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x81, 0x00, 0x00, 0x00), {-1.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x7f, 0x00, 0x00), { 0.0, 1.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x81, 0x00, 0x00), { 0.0, -1.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x7f, 0x00), { 0.0, 0.0, 1.0, 0.0}},
+ {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x81, 0x00), { 0.0, 0.0, -1.0, 0.0}},
+ {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x7f), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x81), { 0.0, 0.0, 0.0, -1.0}},
+
+ {PIPE_FORMAT_R8_SSCALED, PACKED_1x8(0xff), PACKED_1x8(0x00), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8_SSCALED, PACKED_1x8(0xff), PACKED_1x8(0x7f), { 127.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8_SSCALED, PACKED_1x8(0xff), PACKED_1x8(0x80), {-128.0, 0.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R8G8_SSCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x00), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8_SSCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x7f, 0x00), { 127.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8_SSCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x80, 0x00), {-128.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8_SSCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x7f), { 0.0, 127.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8_SSCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x80), { 0.0, -128.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R8G8B8_SSCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x00), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8B8_SSCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x7f, 0x00, 0x00), { 127.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8B8_SSCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x80, 0x00, 0x00), {-128.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8B8_SSCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x7f, 0x00), { 0.0, 127.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8B8_SSCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x80, 0x00), { 0.0, -128.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R8G8B8_SSCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x7f), { 0.0, 0.0, 127.0, 1.0}},
+ {PIPE_FORMAT_R8G8B8_SSCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x80), { 0.0, 0.0, -128.0, 1.0}},
+
+ {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x00), { 0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x7f, 0x00, 0x00, 0x00), { 127.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x80, 0x00, 0x00, 0x00), {-128.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x7f, 0x00, 0x00), { 0.0, 127.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x80, 0x00, 0x00), { 0.0, -128.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x7f, 0x00), { 0.0, 0.0, 127.0, 0.0}},
+ {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x80, 0x00), { 0.0, 0.0, -128.0, 0.0}},
+ {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x7f), { 0.0, 0.0, 0.0, 127.0}},
+ {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x80), { 0.0, 0.0, 0.0, -128.0}},
+
+ /*
+ * Standard 16-bit integer formats
+ */
+
+ {PIPE_FORMAT_R16_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xffff), {1.0, 0.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R16G16_UNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x0000), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16_UNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0xffff, 0x0000), {1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16_UNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0xffff), {0.0, 1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16_UNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0xffff, 0xffff), {1.0, 1.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R16G16B16_UNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x0000), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16B16_UNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0xffff, 0x0000, 0x0000), {1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16B16_UNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0xffff, 0x0000), {0.0, 1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16B16_UNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0xffff), {0.0, 0.0, 1.0, 1.0}},
+ {PIPE_FORMAT_R16G16B16_UNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0xffff, 0xffff, 0xffff), {1.0, 1.0, 1.0, 1.0}},
+
+ {PIPE_FORMAT_R16G16B16A16_UNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x0000), {0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R16G16B16A16_UNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0xffff, 0x0000, 0x0000, 0x0000), {1.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R16G16B16A16_UNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0xffff, 0x0000, 0x0000), {0.0, 1.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R16G16B16A16_UNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0xffff, 0x0000), {0.0, 0.0, 1.0, 0.0}},
+ {PIPE_FORMAT_R16G16B16A16_UNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0xffff), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16B16A16_UNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), {1.0, 1.0, 1.0, 1.0}},
+
+ {PIPE_FORMAT_R16_USCALED, PACKED_1x16(0xffff), PACKED_1x16(0x0000), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16_USCALED, PACKED_1x16(0xffff), PACKED_1x16(0xffff), {65535.0, 0.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R16G16_USCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x0000), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16_USCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0xffff, 0x0000), {65535.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16_USCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0xffff), { 0.0, 65535.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16_USCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0xffff, 0xffff), {65535.0, 65535.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R16G16B16_USCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x0000), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16B16_USCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0xffff, 0x0000, 0x0000), {65535.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16B16_USCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0xffff, 0x0000), { 0.0, 65535.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16B16_USCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0xffff), { 0.0, 0.0, 65535.0, 1.0}},
+ {PIPE_FORMAT_R16G16B16_USCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0xffff, 0xffff, 0xffff), {65535.0, 65535.0, 65535.0, 1.0}},
+
+ {PIPE_FORMAT_R16G16B16A16_USCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x0000), { 0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R16G16B16A16_USCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0xffff, 0x0000, 0x0000, 0x0000), {65535.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R16G16B16A16_USCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0xffff, 0x0000, 0x0000), { 0.0, 65535.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R16G16B16A16_USCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0xffff, 0x0000), { 0.0, 0.0, 65535.0, 0.0}},
+ {PIPE_FORMAT_R16G16B16A16_USCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0xffff), { 0.0, 0.0, 0.0, 65535.0}},
+ {PIPE_FORMAT_R16G16B16A16_USCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), {65535.0, 65535.0, 65535.0, 65535.0}},
+
+ {PIPE_FORMAT_R16_SNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16_SNORM, PACKED_1x16(0xffff), PACKED_1x16(0x7fff), { 1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16_SNORM, PACKED_1x16(0xffff), PACKED_1x16(0x8001), { -1.0, 0.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R16G16_SNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x0000), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16_SNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x7fff, 0x0000), { 1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16_SNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x8001, 0x0000), { -1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16_SNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x7fff), { 0.0, 1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16_SNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x8001), { 0.0, -1.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R16G16B16_SNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x0000), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16B16_SNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x7fff, 0x0000, 0x0000), { 1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16B16_SNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x8001, 0x0000, 0x0000), { -1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16B16_SNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x7fff, 0x0000), { 0.0, 1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16B16_SNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x8001, 0x0000), { 0.0, -1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16B16_SNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x7fff), { 0.0, 0.0, 1.0, 1.0}},
+ {PIPE_FORMAT_R16G16B16_SNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x8001), { 0.0, 0.0, -1.0, 1.0}},
+
+ {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x0000), { 0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x7fff, 0x0000, 0x0000, 0x0000), { 1.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x8001, 0x0000, 0x0000, 0x0000), { -1.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x7fff, 0x0000, 0x0000), { 0.0, 1.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x8001, 0x0000, 0x0000), { 0.0, -1.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x7fff, 0x0000), { 0.0, 0.0, 1.0, 0.0}},
+ {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x8001, 0x0000), { 0.0, 0.0, -1.0, 0.0}},
+ {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x7fff), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x8001), { 0.0, 0.0, 0.0, -1.0}},
+
+ {PIPE_FORMAT_R16_SSCALED, PACKED_1x16(0xffff), PACKED_1x16(0x0000), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16_SSCALED, PACKED_1x16(0xffff), PACKED_1x16(0x7fff), { 32767.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16_SSCALED, PACKED_1x16(0xffff), PACKED_1x16(0x8000), {-32768.0, 0.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R16G16_SSCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x0000), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16_SSCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x7fff, 0x0000), { 32767.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16_SSCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x8000, 0x0000), {-32768.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16_SSCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x7fff), { 0.0, 32767.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16_SSCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x8000), { 0.0, -32768.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R16G16B16_SSCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x0000), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16B16_SSCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x7fff, 0x0000, 0x0000), { 32767.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16B16_SSCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x8000, 0x0000, 0x0000), {-32768.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16B16_SSCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x7fff, 0x0000), { 0.0, 32767.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16B16_SSCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x8000, 0x0000), { 0.0, -32768.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R16G16B16_SSCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x7fff), { 0.0, 0.0, 32767.0, 1.0}},
+ {PIPE_FORMAT_R16G16B16_SSCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x8000), { 0.0, 0.0, -32768.0, 1.0}},
+
+ {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x0000), { 0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x7fff, 0x0000, 0x0000, 0x0000), { 32767.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x8000, 0x0000, 0x0000, 0x0000), {-32768.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x7fff, 0x0000, 0x0000), { 0.0, 32767.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x8000, 0x0000, 0x0000), { 0.0, -32768.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x7fff, 0x0000), { 0.0, 0.0, 32767.0, 0.0}},
+ {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x8000, 0x0000), { 0.0, 0.0, -32768.0, 0.0}},
+ {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x7fff), { 0.0, 0.0, 0.0, 32767.0}},
+ {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x8000), { 0.0, 0.0, 0.0, -32768.0}},
+
+ /*
+ * Standard 32-bit integer formats
+ *
+ * NOTE: We can't accurately represent integers larger than +/-0x1000000
+ * with single precision floats, so that's as far as we test.
+ */
+
+ {PIPE_FORMAT_R32_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), {1.0, 0.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R32G32_UNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x00000000), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32_UNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0xffffffff, 0x00000000), {1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32_UNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0xffffffff), {0.0, 1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32_UNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0xffffffff, 0xffffffff), {1.0, 1.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R32G32B32_UNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x00000000), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_UNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0xffffffff, 0x00000000, 0x00000000), {1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_UNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0xffffffff, 0x00000000), {0.0, 1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_UNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0xffffffff), {0.0, 0.0, 1.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_UNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), {1.0, 1.0, 1.0, 1.0}},
+
+ {PIPE_FORMAT_R32G32B32A32_UNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x00000000), {0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_UNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0xffffffff, 0x00000000, 0x00000000, 0x00000000), {1.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_UNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0xffffffff, 0x00000000, 0x00000000), {0.0, 1.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_UNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0xffffffff, 0x00000000), {0.0, 0.0, 1.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_UNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0xffffffff), {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32A32_UNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), {1.0, 1.0, 1.0, 1.0}},
+
+ {PIPE_FORMAT_R32_USCALED, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32_USCALED, PACKED_1x32(0xffffffff), PACKED_1x32(0x01000000), {16777216.0, 0.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R32G32_USCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x00000000), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32_USCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x01000000, 0x00000000), {16777216.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32_USCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x01000000), { 0.0, 16777216.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32_USCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x01000000, 0x01000000), {16777216.0, 16777216.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R32G32B32_USCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x00000000), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_USCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x01000000, 0x00000000, 0x00000000), {16777216.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_USCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x01000000, 0x00000000), { 0.0, 16777216.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_USCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x01000000), { 0.0, 0.0, 16777216.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_USCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x01000000, 0x01000000, 0x01000000), {16777216.0, 16777216.0, 16777216.0, 1.0}},
+
+ {PIPE_FORMAT_R32G32B32A32_USCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x00000000), { 0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_USCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x01000000, 0x00000000, 0x00000000, 0x00000000), {16777216.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_USCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x01000000, 0x00000000, 0x00000000), { 0.0, 16777216.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_USCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x01000000, 0x00000000), { 0.0, 0.0, 16777216.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_USCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x01000000), { 0.0, 0.0, 0.0, 16777216.0}},
+ {PIPE_FORMAT_R32G32B32A32_USCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x01000000, 0x01000000, 0x01000000, 0x01000000), {16777216.0, 16777216.0, 16777216.0, 16777216.0}},
+
+ {PIPE_FORMAT_R32_SNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32_SNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x7fffffff), { 1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32_SNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x80000001), { -1.0, 0.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R32G32_SNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x00000000), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32_SNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x7fffffff, 0x00000000), { 1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32_SNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x80000001, 0x00000000), { -1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32_SNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x7fffffff), { 0.0, 1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32_SNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x80000001), { 0.0, -1.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R32G32B32_SNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x00000000), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_SNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x7fffffff, 0x00000000, 0x00000000), { 1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_SNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x80000001, 0x00000000, 0x00000000), { -1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_SNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x7fffffff, 0x00000000), { 0.0, 1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_SNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x80000001, 0x00000000), { 0.0, -1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_SNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x7fffffff), { 0.0, 0.0, 1.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_SNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x80000001), { 0.0, 0.0, -1.0, 1.0}},
+
+ {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x00000000), { 0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x7fffffff, 0x00000000, 0x00000000, 0x00000000), { 1.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x80000001, 0x00000000, 0x00000000, 0x00000000), { -1.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x7fffffff, 0x00000000, 0x00000000), { 0.0, 1.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x80000001, 0x00000000, 0x00000000), { 0.0, -1.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x7fffffff, 0x00000000), { 0.0, 0.0, 1.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x80000001, 0x00000000), { 0.0, 0.0, -1.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x7fffffff), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x80000001), { 0.0, 0.0, 0.0, -1.0}},
+
+ {PIPE_FORMAT_R32_SSCALED, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32_SSCALED, PACKED_1x32(0xffffffff), PACKED_1x32(0x01000000), { 16777216.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32_SSCALED, PACKED_1x32(0xffffffff), PACKED_1x32(0xff000000), {-16777216.0, 0.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R32G32_SSCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x00000000), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32_SSCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x01000000, 0x00000000), { 16777216.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32_SSCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0xff000000, 0x00000000), {-16777216.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32_SSCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x01000000), { 0.0, 16777216.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32_SSCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0xff000000), { 0.0, -16777216.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R32G32B32_SSCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x00000000), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_SSCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x01000000, 0x00000000, 0x00000000), { 16777216.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_SSCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0xff000000, 0x00000000, 0x00000000), {-16777216.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_SSCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x01000000, 0x00000000), { 0.0, 16777216.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_SSCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0xff000000, 0x00000000), { 0.0, -16777216.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_SSCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x01000000), { 0.0, 0.0, 16777216.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_SSCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0xff000000), { 0.0, 0.0, -16777216.0, 1.0}},
+
+ {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x00000000), { 0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x01000000, 0x00000000, 0x00000000, 0x00000000), { 16777216.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0xff000000, 0x00000000, 0x00000000, 0x00000000), {-16777216.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x01000000, 0x00000000, 0x00000000), { 0.0, 16777216.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0xff000000, 0x00000000, 0x00000000), { 0.0, -16777216.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x01000000, 0x00000000), { 0.0, 0.0, 16777216.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0xff000000, 0x00000000), { 0.0, 0.0, -16777216.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x01000000), { 0.0, 0.0, 0.0, 16777216.0}},
+ {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0xff000000), { 0.0, 0.0, 0.0, -16777216.0}},
+
+ /*
+ * Standard 32-bit float formats
+ */
+
+ {PIPE_FORMAT_R32_FLOAT, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32_FLOAT, PACKED_1x32(0xffffffff), PACKED_1x32(0x3f800000), { 1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32_FLOAT, PACKED_1x32(0xffffffff), PACKED_1x32(0xbf800000), { -1.0, 0.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R32G32_FLOAT, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x00000000), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32_FLOAT, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x3f800000, 0x00000000), { 1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32_FLOAT, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0xbf800000, 0x00000000), {-1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32_FLOAT, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x3f800000), { 0.0, 1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32_FLOAT, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0xbf800000), { 0.0, -1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32_FLOAT, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x3f800000, 0x3f800000), { 1.0, 1.0, 0.0, 1.0}},
+
+ {PIPE_FORMAT_R32G32B32_FLOAT, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x00000000), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_FLOAT, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x3f800000, 0x00000000, 0x00000000), { 1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_FLOAT, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0xbf800000, 0x00000000, 0x00000000), {-1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_FLOAT, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x3f800000, 0x00000000), { 0.0, 1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_FLOAT, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0xbf800000, 0x00000000), { 0.0, -1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_FLOAT, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x3f800000), { 0.0, 0.0, 1.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_FLOAT, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0xbf800000), { 0.0, 0.0, -1.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32_FLOAT, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x3f800000, 0x3f800000, 0x3f800000), { 1.0, 1.0, 1.0, 1.0}},
+
+ {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x00000000), { 0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x3f800000, 0x00000000, 0x00000000, 0x00000000), { 1.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0xbf800000, 0x00000000, 0x00000000, 0x00000000), {-1.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x3f800000, 0x00000000, 0x00000000), { 0.0, 1.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0xbf800000, 0x00000000, 0x00000000), { 0.0, -1.0, 0.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x3f800000, 0x00000000), { 0.0, 0.0, 1.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0xbf800000, 0x00000000), { 0.0, 0.0, -1.0, 0.0}},
+ {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x3f800000), { 0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0xbf800000), { 0.0, 0.0, 0.0, -1.0}},
+ {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000), { 1.0, 1.0, 1.0, 1.0}},
+};
+
+
+const unsigned util_format_nr_test_cases = Elements(util_format_test_cases);
diff --git a/src/gallium/auxiliary/util/u_format_tests.h b/src/gallium/auxiliary/util/u_format_tests.h
new file mode 100644
index 0000000000..2d4d9d5fa9
--- /dev/null
+++ b/src/gallium/auxiliary/util/u_format_tests.h
@@ -0,0 +1,69 @@
+/**************************************************************************
+ *
+ * Copyright 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, sub license, 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 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 NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS, AUTHORS 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.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ **************************************************************************/
+
+
+#ifndef U_FORMAT_TESTS_H_
+#define U_FORMAT_TESTS_H_
+
+
+#include "pipe/p_compiler.h"
+#include "pipe/p_format.h"
+
+
+#define UTIL_FORMAT_MAX_PACKED_BYTES 16
+
+
+/**
+ * A (packed, unpacked) color pair.
+ */
+struct util_format_test_case
+{
+ enum pipe_format format;
+
+ /**
+ * Mask of the bits that actually meaningful data. Used to mask out the
+ * "X" channels.
+ */
+ uint8_t mask[UTIL_FORMAT_MAX_PACKED_BYTES];
+
+ uint8_t packed[UTIL_FORMAT_MAX_PACKED_BYTES];
+
+ /**
+ * RGBA.
+ */
+ double unpacked[4];
+};
+
+
+extern const struct util_format_test_case
+util_format_test_cases[];
+
+
+extern const unsigned util_format_nr_test_cases;
+
+
+#endif /* U_FORMAT_TESTS_H_ */
diff --git a/src/gallium/auxiliary/util/u_gen_mipmap.c b/src/gallium/auxiliary/util/u_gen_mipmap.c
index 1d7329d422..fc027e48e4 100644
--- a/src/gallium/auxiliary/util/u_gen_mipmap.c
+++ b/src/gallium/auxiliary/util/u_gen_mipmap.c
@@ -61,6 +61,7 @@ struct gen_mipmap_state
struct pipe_depth_stencil_alpha_state depthstencil;
struct pipe_rasterizer_state rasterizer;
struct pipe_sampler_state sampler;
+ struct pipe_clip_state clip;
void *vs;
void *fs2d, *fsCube;
@@ -922,29 +923,29 @@ format_to_type_comps(enum pipe_format pformat,
{
/* XXX I think this could be implemented in terms of the pf_*() functions */
switch (pformat) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
- case PIPE_FORMAT_X8R8G8B8_UNORM:
case PIPE_FORMAT_B8G8R8A8_UNORM:
case PIPE_FORMAT_B8G8R8X8_UNORM:
- case PIPE_FORMAT_R8G8B8A8_SRGB:
- case PIPE_FORMAT_R8G8B8X8_SRGB:
- case PIPE_FORMAT_A8R8G8B8_SRGB:
- case PIPE_FORMAT_X8R8G8B8_SRGB:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_A8B8G8R8_SRGB:
+ case PIPE_FORMAT_X8B8G8R8_SRGB:
case PIPE_FORMAT_B8G8R8A8_SRGB:
case PIPE_FORMAT_B8G8R8X8_SRGB:
+ case PIPE_FORMAT_A8R8G8B8_SRGB:
+ case PIPE_FORMAT_X8R8G8B8_SRGB:
case PIPE_FORMAT_R8G8B8_SRGB:
*datatype = DTYPE_UBYTE;
*comps = 4;
return;
- case PIPE_FORMAT_A1R5G5B5_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
*datatype = DTYPE_USHORT_1_5_5_5_REV;
*comps = 4;
return;
- case PIPE_FORMAT_A4R4G4B4_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
*datatype = DTYPE_USHORT_4_4_4_4;
*comps = 4;
return;
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
*datatype = DTYPE_USHORT_5_6_5;
*comps = 3;
return;
@@ -955,8 +956,8 @@ format_to_type_comps(enum pipe_format pformat,
*datatype = DTYPE_UBYTE;
*comps = 1;
return;
- case PIPE_FORMAT_A8L8_UNORM:
- case PIPE_FORMAT_A8L8_SRGB:
+ case PIPE_FORMAT_L8A8_UNORM:
+ case PIPE_FORMAT_L8A8_SRGB:
*datatype = DTYPE_UBYTE;
*comps = 2;
return;
@@ -1296,7 +1297,6 @@ util_create_gen_mipmap(struct pipe_context *pipe,
memset(&ctx->rasterizer, 0, sizeof(ctx->rasterizer));
ctx->rasterizer.front_winding = PIPE_WINDING_CW;
ctx->rasterizer.cull_mode = PIPE_WINDING_NONE;
- ctx->rasterizer.bypass_vs_clip_and_viewport = 1;
ctx->rasterizer.gl_rasterization_rules = 1;
/* sampler state */
@@ -1361,25 +1361,25 @@ get_next_slot(struct gen_mipmap_state *ctx)
static unsigned
set_vertex_data(struct gen_mipmap_state *ctx,
enum pipe_texture_target tex_target,
- uint face, float width, float height)
+ uint face)
{
unsigned offset;
/* vert[0].position */
- ctx->vertices[0][0][0] = 0.0f; /*x*/
- ctx->vertices[0][0][1] = 0.0f; /*y*/
+ ctx->vertices[0][0][0] = -1.0f; /*x*/
+ ctx->vertices[0][0][1] = -1.0f; /*y*/
/* vert[1].position */
- ctx->vertices[1][0][0] = width;
- ctx->vertices[1][0][1] = 0.0f;
+ ctx->vertices[1][0][0] = 1.0f;
+ ctx->vertices[1][0][1] = -1.0f;
/* vert[2].position */
- ctx->vertices[2][0][0] = width;
- ctx->vertices[2][0][1] = height;
+ ctx->vertices[2][0][0] = 1.0f;
+ ctx->vertices[2][0][1] = 1.0f;
/* vert[3].position */
- ctx->vertices[3][0][0] = 0.0f;
- ctx->vertices[3][0][1] = height;
+ ctx->vertices[3][0][0] = -1.0f;
+ ctx->vertices[3][0][1] = 1.0f;
/* Setup vertex texcoords. This is a little tricky for cube maps. */
if (tex_target == PIPE_TEXTURE_CUBE) {
@@ -1499,11 +1499,14 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
cso_save_framebuffer(ctx->cso);
cso_save_fragment_shader(ctx->cso);
cso_save_vertex_shader(ctx->cso);
+ cso_save_viewport(ctx->cso);
+ cso_save_clip(ctx->cso);
/* bind our state */
cso_set_blend(ctx->cso, &ctx->blend);
cso_set_depth_stencil_alpha(ctx->cso, &ctx->depthstencil);
cso_set_rasterizer(ctx->cso, &ctx->rasterizer);
+ cso_set_clip(ctx->cso, &ctx->clip);
cso_set_fragment_shader_handle(ctx->cso, fs);
cso_set_vertex_shader_handle(ctx->cso, ctx->vs);
@@ -1522,6 +1525,7 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
*/
for (dstLevel = baseLevel + 1; dstLevel <= lastLevel; dstLevel++) {
const uint srcLevel = dstLevel - 1;
+ struct pipe_viewport_state vp;
struct pipe_surface *surf =
screen->get_tex_surface(screen, pt, face, dstLevel, zslice,
@@ -1535,6 +1539,17 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
fb.height = u_minify(pt->height0, dstLevel);
cso_set_framebuffer(ctx->cso, &fb);
+ /* viewport */
+ vp.scale[0] = 0.5f * fb.width;
+ vp.scale[1] = 0.5f * fb.height;
+ vp.scale[2] = 1.0f;
+ vp.scale[3] = 1.0f;
+ vp.translate[0] = 0.5f * fb.width;
+ vp.translate[1] = 0.5f * fb.height;
+ vp.translate[2] = 0.0f;
+ vp.translate[3] = 0.0f;
+ cso_set_viewport(ctx->cso, &vp);
+
/*
* Setup sampler state
* Note: we should only have to set the min/max LOD clamps to ensure
@@ -1549,12 +1564,10 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
cso_set_sampler_textures(ctx->cso, 1, &pt);
- /* quad coords in window coords (bypassing vs, clip and viewport) */
+ /* quad coords in clip coords */
offset = set_vertex_data(ctx,
pt->target,
- face,
- (float) u_minify(pt->width0, dstLevel),
- (float) u_minify(pt->height0, dstLevel));
+ face);
util_draw_vertex_buffer(ctx->pipe,
ctx->vbuf,
@@ -1578,4 +1591,6 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
cso_restore_framebuffer(ctx->cso);
cso_restore_fragment_shader(ctx->cso);
cso_restore_vertex_shader(ctx->cso);
+ cso_restore_viewport(ctx->cso);
+ cso_restore_clip(ctx->cso);
}
diff --git a/src/gallium/auxiliary/util/u_pack_color.h b/src/gallium/auxiliary/util/u_pack_color.h
index 0ab53c75dd..50f1b1670b 100644
--- a/src/gallium/auxiliary/util/u_pack_color.h
+++ b/src/gallium/auxiliary/util/u_pack_color.h
@@ -57,47 +57,47 @@ util_pack_color_ub(ubyte r, ubyte g, ubyte b, ubyte a,
enum pipe_format format, union util_color *uc)
{
switch (format) {
- case PIPE_FORMAT_R8G8B8A8_UNORM:
+ case PIPE_FORMAT_A8B8G8R8_UNORM:
{
uc->ui = (r << 24) | (g << 16) | (b << 8) | a;
}
return;
- case PIPE_FORMAT_R8G8B8X8_UNORM:
+ case PIPE_FORMAT_X8B8G8R8_UNORM:
{
uc->ui = (r << 24) | (g << 16) | (b << 8) | 0xff;
}
return;
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
{
uc->ui = (a << 24) | (r << 16) | (g << 8) | b;
}
return;
- case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
{
uc->ui = (0xff << 24) | (r << 16) | (g << 8) | b;
}
return;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
{
uc->ui = (b << 24) | (g << 16) | (r << 8) | a;
}
return;
- case PIPE_FORMAT_B8G8R8X8_UNORM:
+ case PIPE_FORMAT_X8R8G8B8_UNORM:
{
uc->ui = (b << 24) | (g << 16) | (r << 8) | 0xff;
}
return;
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
{
uc->us = ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | (b >> 3);
}
return;
- case PIPE_FORMAT_A1R5G5B5_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
{
uc->us = ((a & 0x80) << 8) | ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | (b >> 3);
}
return;
- case PIPE_FORMAT_A4R4G4B4_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
{
uc->us = ((a & 0xf0) << 8) | ((r & 0xf0) << 4) | ((g & 0xf0) << 0) | (b >> 4);
}
@@ -153,7 +153,7 @@ util_unpack_color_ub(enum pipe_format format, union util_color *uc,
ubyte *r, ubyte *g, ubyte *b, ubyte *a)
{
switch (format) {
- case PIPE_FORMAT_R8G8B8A8_UNORM:
+ case PIPE_FORMAT_A8B8G8R8_UNORM:
{
uint p = uc->ui;
*r = (ubyte) ((p >> 24) & 0xff);
@@ -162,7 +162,7 @@ util_unpack_color_ub(enum pipe_format format, union util_color *uc,
*a = (ubyte) ((p >> 0) & 0xff);
}
return;
- case PIPE_FORMAT_R8G8B8X8_UNORM:
+ case PIPE_FORMAT_X8B8G8R8_UNORM:
{
uint p = uc->ui;
*r = (ubyte) ((p >> 24) & 0xff);
@@ -171,7 +171,7 @@ util_unpack_color_ub(enum pipe_format format, union util_color *uc,
*a = (ubyte) 0xff;
}
return;
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
{
uint p = uc->ui;
*r = (ubyte) ((p >> 16) & 0xff);
@@ -180,7 +180,7 @@ util_unpack_color_ub(enum pipe_format format, union util_color *uc,
*a = (ubyte) ((p >> 24) & 0xff);
}
return;
- case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
{
uint p = uc->ui;
*r = (ubyte) ((p >> 16) & 0xff);
@@ -189,7 +189,7 @@ util_unpack_color_ub(enum pipe_format format, union util_color *uc,
*a = (ubyte) 0xff;
}
return;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
{
uint p = uc->ui;
*r = (ubyte) ((p >> 8) & 0xff);
@@ -198,7 +198,7 @@ util_unpack_color_ub(enum pipe_format format, union util_color *uc,
*a = (ubyte) ((p >> 0) & 0xff);
}
return;
- case PIPE_FORMAT_B8G8R8X8_UNORM:
+ case PIPE_FORMAT_X8R8G8B8_UNORM:
{
uint p = uc->ui;
*r = (ubyte) ((p >> 8) & 0xff);
@@ -207,7 +207,7 @@ util_unpack_color_ub(enum pipe_format format, union util_color *uc,
*a = (ubyte) 0xff;
}
return;
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
{
ushort p = uc->us;
*r = (ubyte) (((p >> 8) & 0xf8) | ((p >> 13) & 0x7));
@@ -216,7 +216,7 @@ util_unpack_color_ub(enum pipe_format format, union util_color *uc,
*a = (ubyte) 0xff;
}
return;
- case PIPE_FORMAT_A1R5G5B5_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
{
ushort p = uc->us;
*r = (ubyte) (((p >> 7) & 0xf8) | ((p >> 12) & 0x7));
@@ -225,7 +225,7 @@ util_unpack_color_ub(enum pipe_format format, union util_color *uc,
*a = (ubyte) (0xff * (p >> 15));
}
return;
- case PIPE_FORMAT_A4R4G4B4_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
{
ushort p = uc->us;
*r = (ubyte) (((p >> 4) & 0xf0) | ((p >> 8) & 0xf));
@@ -326,47 +326,47 @@ util_pack_color(const float rgba[4], enum pipe_format format, union util_color *
}
switch (format) {
- case PIPE_FORMAT_R8G8B8A8_UNORM:
+ case PIPE_FORMAT_A8B8G8R8_UNORM:
{
uc->ui = (r << 24) | (g << 16) | (b << 8) | a;
}
return;
- case PIPE_FORMAT_R8G8B8X8_UNORM:
+ case PIPE_FORMAT_X8B8G8R8_UNORM:
{
uc->ui = (r << 24) | (g << 16) | (b << 8) | 0xff;
}
return;
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
{
uc->ui = (a << 24) | (r << 16) | (g << 8) | b;
}
return;
- case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
{
uc->ui = (0xff << 24) | (r << 16) | (g << 8) | b;
}
return;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
{
uc->ui = (b << 24) | (g << 16) | (r << 8) | a;
}
return;
- case PIPE_FORMAT_B8G8R8X8_UNORM:
+ case PIPE_FORMAT_X8R8G8B8_UNORM:
{
uc->ui = (b << 24) | (g << 16) | (r << 8) | 0xff;
}
return;
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
{
uc->us = ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | (b >> 3);
}
return;
- case PIPE_FORMAT_A1R5G5B5_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
{
uc->us = ((a & 0x80) << 8) | ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | (b >> 3);
}
return;
- case PIPE_FORMAT_A4R4G4B4_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
{
uc->ub = ((a & 0xf0) << 8) | ((r & 0xf0) << 4) | ((g & 0xf0) << 0) | (b >> 4);
}
@@ -427,13 +427,13 @@ util_pack_z(enum pipe_format format, double z)
return (uint) (z * 0xffffffff);
case PIPE_FORMAT_Z32_FLOAT:
return (uint)z;
- case PIPE_FORMAT_S8Z24_UNORM:
- case PIPE_FORMAT_X8Z24_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_Z24X8_UNORM:
if (z == 1.0)
return 0xffffff;
return (uint) (z * 0xffffff);
- case PIPE_FORMAT_Z24S8_UNORM:
- case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
if (z == 1.0)
return 0xffffff00;
return ((uint) (z * 0xffffff)) << 8;
@@ -458,10 +458,10 @@ util_pack_z_stencil(enum pipe_format format, double z, uint s)
unsigned packed = util_pack_z(format, z);
switch (format) {
- case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
packed |= s << 24;
break;
- case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
packed |= s;
break;
case PIPE_FORMAT_S8_UNORM:
diff --git a/src/gallium/auxiliary/util/u_surface.c b/src/gallium/auxiliary/util/u_surface.c
index c9f1c9c210..33306bbc2a 100644
--- a/src/gallium/auxiliary/util/u_surface.c
+++ b/src/gallium/auxiliary/util/u_surface.c
@@ -54,9 +54,9 @@ util_create_rgba_surface(struct pipe_screen *screen,
struct pipe_surface **surfaceOut)
{
static const enum pipe_format rgbaFormats[] = {
- PIPE_FORMAT_A8R8G8B8_UNORM,
PIPE_FORMAT_B8G8R8A8_UNORM,
- PIPE_FORMAT_R8G8B8A8_UNORM,
+ PIPE_FORMAT_A8R8G8B8_UNORM,
+ PIPE_FORMAT_A8B8G8R8_UNORM,
PIPE_FORMAT_NONE
};
const uint target = PIPE_TEXTURE_2D;
diff --git a/src/gallium/auxiliary/util/u_tile.c b/src/gallium/auxiliary/util/u_tile.c
index 0051258e22..79481b710b 100644
--- a/src/gallium/auxiliary/util/u_tile.c
+++ b/src/gallium/auxiliary/util/u_tile.c
@@ -108,7 +108,7 @@ pipe_put_tile_raw(struct pipe_transfer *pt,
-/*** PIPE_FORMAT_A8R8G8B8_UNORM ***/
+/*** PIPE_FORMAT_B8G8R8A8_UNORM ***/
static void
a8r8g8b8_get_tile_rgba(const unsigned *src,
@@ -155,7 +155,7 @@ a8r8g8b8_put_tile_rgba(unsigned *dst,
}
-/*** PIPE_FORMAT_X8R8G8B8_UNORM ***/
+/*** PIPE_FORMAT_B8G8R8X8_UNORM ***/
static void
x8r8g8b8_get_tile_rgba(const unsigned *src,
@@ -201,7 +201,7 @@ x8r8g8b8_put_tile_rgba(unsigned *dst,
}
-/*** PIPE_FORMAT_B8G8R8A8_UNORM ***/
+/*** PIPE_FORMAT_A8R8G8B8_UNORM ***/
static void
b8g8r8a8_get_tile_rgba(const unsigned *src,
@@ -248,7 +248,7 @@ b8g8r8a8_put_tile_rgba(unsigned *dst,
}
-/*** PIPE_FORMAT_R8G8B8A8_UNORM ***/
+/*** PIPE_FORMAT_A8B8G8R8_UNORM ***/
static void
r8g8b8a8_get_tile_rgba(const unsigned *src,
@@ -295,7 +295,7 @@ r8g8b8a8_put_tile_rgba(unsigned *dst,
}
-/*** PIPE_FORMAT_A1R5G5B5_UNORM ***/
+/*** PIPE_FORMAT_B5G5R5A1_UNORM ***/
static void
a1r5g5b5_get_tile_rgba(const ushort *src,
@@ -346,7 +346,7 @@ a1r5g5b5_put_tile_rgba(ushort *dst,
}
-/*** PIPE_FORMAT_A4R4G4B4_UNORM ***/
+/*** PIPE_FORMAT_B4G4R4A4_UNORM ***/
static void
a4r4g4b4_get_tile_rgba(const ushort *src,
@@ -397,7 +397,7 @@ a4r4g4b4_put_tile_rgba(ushort *dst,
}
-/*** PIPE_FORMAT_R5G6B5_UNORM ***/
+/*** PIPE_FORMAT_B5G6R5_UNORM ***/
static void
r5g6b5_get_tile_rgba(const ushort *src,
@@ -691,7 +691,7 @@ r16g16b16a16_put_tile_rgba(short *dst,
}
-/*** PIPE_FORMAT_R8G8B8A8_SRGB ***/
+/*** PIPE_FORMAT_A8B8G8R8_SRGB ***/
/**
* Convert an 8-bit sRGB value from non-linear space to a
@@ -784,7 +784,7 @@ a8r8g8b8_srgb_put_tile_rgba(unsigned *dst,
}
-/*** PIPE_FORMAT_A8L8_SRGB ***/
+/*** PIPE_FORMAT_L8A8_SRGB ***/
static void
a8l8_srgb_get_tile_rgba(const ushort *src,
@@ -913,7 +913,7 @@ i8_put_tile_rgba(ubyte *dst,
}
-/*** PIPE_FORMAT_A8L8_UNORM ***/
+/*** PIPE_FORMAT_L8A8_UNORM ***/
static void
a8l8_get_tile_rgba(const ushort *src,
@@ -987,7 +987,7 @@ z32_get_tile_rgba(const unsigned *src,
}
-/*** PIPE_FORMAT_S8Z24_UNORM ***/
+/*** PIPE_FORMAT_Z24S8_UNORM ***/
/**
* Return Z component as four float in [0,1]. Stencil part ignored.
@@ -1014,7 +1014,7 @@ s8z24_get_tile_rgba(const unsigned *src,
}
-/*** PIPE_FORMAT_Z24S8_UNORM ***/
+/*** PIPE_FORMAT_S8Z24_UNORM ***/
/**
* Return Z component as four float in [0,1]. Stencil part ignored.
@@ -1067,7 +1067,7 @@ z32f_get_tile_rgba(const float *src,
}
-/*** PIPE_FORMAT_YCBCR / PIPE_FORMAT_YCBCR_REV ***/
+/*** PIPE_FORMAT_UYVY / PIPE_FORMAT_YUYV ***/
/**
* Convert YCbCr (or YCrCb) to RGBA.
@@ -1162,25 +1162,25 @@ pipe_tile_raw_to_rgba(enum pipe_format format,
float *dst, unsigned dst_stride)
{
switch (format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
a8r8g8b8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
x8r8g8b8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
b8g8r8a8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_R8G8B8A8_UNORM:
+ case PIPE_FORMAT_A8B8G8R8_UNORM:
r8g8b8a8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_A1R5G5B5_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
a1r5g5b5_get_tile_rgba((ushort *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_A4R4G4B4_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
a4r4g4b4_get_tile_rgba((ushort *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
r5g6b5_get_tile_rgba((ushort *) src, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_R8G8B8_UNORM:
@@ -1195,7 +1195,7 @@ pipe_tile_raw_to_rgba(enum pipe_format format,
case PIPE_FORMAT_I8_UNORM:
i8_get_tile_rgba((ubyte *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_A8L8_UNORM:
+ case PIPE_FORMAT_L8A8_UNORM:
a8l8_get_tile_rgba((ushort *) src, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_R16_SNORM:
@@ -1204,10 +1204,10 @@ pipe_tile_raw_to_rgba(enum pipe_format format,
case PIPE_FORMAT_R16G16B16A16_SNORM:
r16g16b16a16_get_tile_rgba((short *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_A8R8G8B8_SRGB:
+ case PIPE_FORMAT_B8G8R8A8_SRGB:
a8r8g8b8_srgb_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_A8L8_SRGB:
+ case PIPE_FORMAT_L8A8_SRGB:
a8l8_srgb_get_tile_rgba((ushort *) src, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_L8_SRGB:
@@ -1219,21 +1219,21 @@ pipe_tile_raw_to_rgba(enum pipe_format format,
case PIPE_FORMAT_Z32_UNORM:
z32_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_S8Z24_UNORM:
- case PIPE_FORMAT_X8Z24_UNORM:
- s8z24_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
- break;
case PIPE_FORMAT_Z24S8_UNORM:
case PIPE_FORMAT_Z24X8_UNORM:
+ s8z24_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
+ break;
+ case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
z24s8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_Z32_FLOAT:
z32f_get_tile_rgba((float *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_YCBCR:
+ case PIPE_FORMAT_UYVY:
ycbcr_get_tile_rgba((ushort *) src, w, h, dst, dst_stride, FALSE);
break;
- case PIPE_FORMAT_YCBCR_REV:
+ case PIPE_FORMAT_YUYV:
ycbcr_get_tile_rgba((ushort *) src, w, h, dst, dst_stride, TRUE);
break;
default:
@@ -1262,7 +1262,7 @@ pipe_get_tile_rgba(struct pipe_transfer *pt,
if (!packed)
return;
- if(format == PIPE_FORMAT_YCBCR || format == PIPE_FORMAT_YCBCR_REV)
+ if(format == PIPE_FORMAT_UYVY || format == PIPE_FORMAT_YUYV)
assert((x & 1) == 0);
pipe_get_tile_raw(pt, x, y, w, h, packed, 0);
@@ -1291,28 +1291,28 @@ pipe_put_tile_rgba(struct pipe_transfer *pt,
return;
switch (format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
a8r8g8b8_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);
break;
- case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
x8r8g8b8_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);
break;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
b8g8r8a8_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);
break;
- case PIPE_FORMAT_R8G8B8A8_UNORM:
+ case PIPE_FORMAT_A8B8G8R8_UNORM:
r8g8b8a8_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);
break;
- case PIPE_FORMAT_A1R5G5B5_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
a1r5g5b5_put_tile_rgba((ushort *) packed, w, h, p, src_stride);
break;
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
r5g6b5_put_tile_rgba((ushort *) packed, w, h, p, src_stride);
break;
case PIPE_FORMAT_R8G8B8_UNORM:
r8g8b8_put_tile_rgba((ubyte *) packed, w, h, p, src_stride);
break;
- case PIPE_FORMAT_A4R4G4B4_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
a4r4g4b4_put_tile_rgba((ushort *) packed, w, h, p, src_stride);
break;
case PIPE_FORMAT_L8_UNORM:
@@ -1324,7 +1324,7 @@ pipe_put_tile_rgba(struct pipe_transfer *pt,
case PIPE_FORMAT_I8_UNORM:
i8_put_tile_rgba((ubyte *) packed, w, h, p, src_stride);
break;
- case PIPE_FORMAT_A8L8_UNORM:
+ case PIPE_FORMAT_L8A8_UNORM:
a8l8_put_tile_rgba((ushort *) packed, w, h, p, src_stride);
break;
case PIPE_FORMAT_R16_SNORM:
@@ -1333,10 +1333,10 @@ pipe_put_tile_rgba(struct pipe_transfer *pt,
case PIPE_FORMAT_R16G16B16A16_SNORM:
r16g16b16a16_put_tile_rgba((short *) packed, w, h, p, src_stride);
break;
- case PIPE_FORMAT_A8R8G8B8_SRGB:
+ case PIPE_FORMAT_B8G8R8A8_SRGB:
a8r8g8b8_srgb_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);
break;
- case PIPE_FORMAT_A8L8_SRGB:
+ case PIPE_FORMAT_L8A8_SRGB:
a8l8_srgb_put_tile_rgba((ushort *) packed, w, h, p, src_stride);
break;
case PIPE_FORMAT_L8_SRGB:
@@ -1348,12 +1348,12 @@ pipe_put_tile_rgba(struct pipe_transfer *pt,
case PIPE_FORMAT_Z32_UNORM:
/*z32_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
break;
- case PIPE_FORMAT_S8Z24_UNORM:
- case PIPE_FORMAT_X8Z24_UNORM:
- /*s8z24_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
- break;
case PIPE_FORMAT_Z24S8_UNORM:
case PIPE_FORMAT_Z24X8_UNORM:
+ /*s8z24_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
+ break;
+ case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
/*z24s8_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
break;
default:
@@ -1405,8 +1405,8 @@ pipe_get_tile_z(struct pipe_transfer *pt,
}
}
break;
- case PIPE_FORMAT_S8Z24_UNORM:
- case PIPE_FORMAT_X8Z24_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_Z24X8_UNORM:
{
const uint *ptrc
= (const uint *)(map + y * pt->stride + x*4);
@@ -1420,8 +1420,8 @@ pipe_get_tile_z(struct pipe_transfer *pt,
}
}
break;
- case PIPE_FORMAT_Z24S8_UNORM:
- case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
{
const uint *ptrc
= (const uint *)(map + y * pt->stride + x*4);
@@ -1489,7 +1489,7 @@ pipe_put_tile_z(struct pipe_transfer *pt,
}
}
break;
- case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
{
uint *pDest = (uint *) (map + y * pt->stride + x*4);
assert((pt->usage & PIPE_TRANSFER_READ_WRITE) == PIPE_TRANSFER_READ_WRITE);
@@ -1503,7 +1503,7 @@ pipe_put_tile_z(struct pipe_transfer *pt,
}
}
break;
- case PIPE_FORMAT_X8Z24_UNORM:
+ case PIPE_FORMAT_Z24X8_UNORM:
{
uint *pDest = (uint *) (map + y * pt->stride + x*4);
for (i = 0; i < h; i++) {
@@ -1516,7 +1516,7 @@ pipe_put_tile_z(struct pipe_transfer *pt,
}
}
break;
- case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
{
uint *pDest = (uint *) (map + y * pt->stride + x*4);
assert((pt->usage & PIPE_TRANSFER_READ_WRITE) == PIPE_TRANSFER_READ_WRITE);
@@ -1530,7 +1530,7 @@ pipe_put_tile_z(struct pipe_transfer *pt,
}
}
break;
- case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
{
uint *pDest = (uint *) (map + y * pt->stride + x*4);
for (i = 0; i < h; i++) {
diff --git a/src/gallium/docs/source/cso/rasterizer.rst b/src/gallium/docs/source/cso/rasterizer.rst
index 24cc78c68d..ccd9136a2e 100644
--- a/src/gallium/docs/source/cso/rasterizer.rst
+++ b/src/gallium/docs/source/cso/rasterizer.rst
@@ -10,18 +10,6 @@ multisample state, scissoring and flat/smooth shading.
Members
-------
-bypass_vs_clip_and_viewport
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Whether the entire TCL pipeline should be bypassed. This implies that
-vertices are pre-transformed for the viewport, and will not be run
-through the vertex shader.
-
-.. note::
-
- Implementations may still clip away vertices that are not in the viewport
- when this is set.
-
flatshade
^^^^^^^^^
diff --git a/src/gallium/docs/source/cso/sampler.rst b/src/gallium/docs/source/cso/sampler.rst
index 77979fc44d..9bbb784de8 100644
--- a/src/gallium/docs/source/cso/sampler.rst
+++ b/src/gallium/docs/source/cso/sampler.rst
@@ -13,38 +13,97 @@ Members
-------
wrap_s
- How to wrap the S coordinate. One of PIPE_TEX_WRAP.
+ How to wrap the S coordinate. One of PIPE_TEX_WRAP_*.
wrap_t
- How to wrap the T coordinate. One of PIPE_TEX_WRAP.
+ How to wrap the T coordinate. One of PIPE_TEX_WRAP_*.
wrap_r
- How to wrap the R coordinate. One of PIPE_TEX_WRAP.
+ How to wrap the R coordinate. One of PIPE_TEX_WRAP_*.
+
+The wrap modes are:
+
+* ``PIPE_TEX_WRAP_REPEAT``: Standard coord repeat/wrap-around mode.
+* ``PIPE_TEX_WRAP_CLAMP_TO_EDGE``: Clamp coord to edge of texture, the border
+ color is never sampled.
+* ``PIPE_TEX_WRAP_CLAMP_TO_BORDER``: Clamp coord to border of texture, the
+ border color is sampled when coords go outside the range [0,1].
+* ``PIPE_TEX_WRAP_CLAMP``: The coord is clamped to the range [0,1] before
+ scaling to the texture size. This corresponds to the legacy OpenGL GL_CLAMP
+ texture wrap mode. Historically, this mode hasn't acted consistantly across
+ all graphics hardware. It sometimes acts like CLAMP_TO_EDGE or
+ CLAMP_TO_BORDER. The behaviour may also vary depending on linear vs.
+ nearest sampling mode.
+* ``PIPE_TEX_WRAP_MIRROR_REPEAT``: If the integer part of the coordinate
+ is odd, the coord becomes (1 - coord). Then, normal texture REPEAT is
+ applied to the coord.
+* ``PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE``: First, the absolute value of the
+ coordinate is computed. Then, regular CLAMP_TO_EDGE is applied to the coord.
+* ``PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER``: First, the absolute value of the
+ coordinate is computed. Then, regular CLAMP_TO_BORDER is applied to the
+ coord.
+* ``PIPE_TEX_WRAP_MIRROR_CLAMP``: First, the absolute value of the coord is
+ computed. Then, regular CLAMP is applied to the coord.
+
+
min_img_filter
- The filter to use when minifying texels. One of PIPE_TEX_FILTER.
+ The image filter to use when minifying texels. One of PIPE_TEX_FILTER_*.
+mag_img_filter
+ The image filter to use when magnifying texels. One of PIPE_TEX_FILTER_*.
+
+The texture image filter modes are:
+
+* ``PIPE_TEX_FILTER_NEAREST``: One texel is fetched from the texture image
+ at the texture coordinate.
+* ``PIPE_TEX_FILTER_LINEAR``: Two, four or eight texels (depending on the
+ texture dimensions; 1D/2D/3D) are fetched from the texture image and
+ linearly weighted and blended together.
+
min_mip_filter
The filter to use when minifying mipmapped textures. One of
- PIPE_TEX_FILTER.
-mag_img_filter
- The filter to use when magnifying texels. One of PIPE_TEX_FILTER.
+ PIPE_TEX_MIPFILTER_*.
+
+The texture mip filter modes are:
+
+* ``PIPE_TEX_MIPFILTER_NEAREST``: A single mipmap level/image is selected
+ according to the texture LOD (lambda) value.
+* ``PIPE_TEX_MIPFILTER_LINEAR``: The two mipmap levels/images above/below
+ the texture LOD value are sampled from. The results of sampling from
+ those two images are blended together with linear interpolation.
+* ``PIPE_TEX_MIPFILTER_NONE``: Mipmap filtering is disabled. All texels
+ are taken from the level 0 image.
+
+
compare_mode
- If set to PIPE_TEX_COMPARE_R_TO_TEXTURE, texture output is computed
- according to compare_func, using r coord and the texture value as operands.
+ If set to PIPE_TEX_COMPARE_R_TO_TEXTURE, the result of texture sampling
+ is not a color but a true/false value which is the result of comparing the
+ sampled texture value (typically a Z value from a depth texture) to the
+ texture coordinate's R component.
If set to PIPE_TEX_COMPARE_NONE, no comparison calculation is performed.
compare_func
- How the comparison is computed. One of PIPE_FUNC.
+ The inequality operator used when compare_mode=1. One of PIPE_FUNC_x.
normalized_coords
- Whether the texture coordinates are normalized. If normalized, they will
- always be in [0, 1]. If not, they will be in the range of each dimension
- of the loaded texture.
+ If set, the incoming texture coordinates (nominally in the range [0,1])
+ will be scaled by the texture width, height, depth to compute texel
+ addresses. Otherwise, the texture coords are used as-is (they are not
+ scaled by the texture dimensions).
+ When normalized_coords=0, only a subset of the texture wrap modes are
+ allowed: PIPE_TEX_WRAP_CLAMP, PIPE_TEX_WRAP_CLAMP_TO_EDGE and
+ PIPE_TEX_WRAP_CLAMP_TO_BORDER.
lod_bias
- The bias to apply to the level of detail.
+ Bias factor which is added to the computed level of detail.
+ The normal level of detail is computed from the partial derivatives of
+ the texture coordinates and/or the fragment shader TEX/TXB/TXL
+ instruction.
min_lod
- Minimum level of detail, used to clamp LoD after bias.
+ Minimum level of detail, used to clamp LOD after bias. The LOD values
+ correspond to mipmap levels where LOD=0 is the level 0 mipmap image.
max_lod
- Maximum level of detail, used to clamp LoD after bias.
+ Maximum level of detail, used to clamp LOD after bias.
border_color
- RGBA color used for out-of-bounds coordinates.
+ RGBA color used for texel coordinates that are outside the [0,width-1],
+ [0, height-1] or [0, depth-1] ranges.
max_anisotropy
- Maximum filtering to apply anisotropically to textures. Setting this to
- 0 disables anisotropic filtering. Any other setting enables anisotropic
- filtering, however it's not unexpected some drivers only will change their
- filtering with a setting of 2 and higher.
+ Maximum anistropy ratio to use when sampling from textures. For example,
+ if max_anistropy=4, a region of up to 1 by 4 texels will be sampled.
+ Set to zero to disable anisotropic filtering. Any other setting enables
+ anisotropic filtering, however it's not unexpected some drivers only will
+ change their filtering with a setting of 2 and higher.
diff --git a/src/gallium/drivers/cell/ppu/cell_gen_fragment.c b/src/gallium/drivers/cell/ppu/cell_gen_fragment.c
index 70683bb367..576d514741 100644
--- a/src/gallium/drivers/cell/ppu/cell_gen_fragment.c
+++ b/src/gallium/drivers/cell/ppu/cell_gen_fragment.c
@@ -304,7 +304,7 @@ unpack_colors(struct spe_function *f,
spe_comment(f, 0, "Unpack framebuffer colors, convert to floats");
switch (color_format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
/* fbB = fbRGBA & mask */
spe_and(f, fbB_reg, fbRGBA_reg, mask0_reg);
@@ -327,7 +327,7 @@ unpack_colors(struct spe_function *f,
spe_roti(f, fbA_reg, fbA_reg, -24);
break;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
/* fbA = fbRGBA & mask */
spe_and(f, fbA_reg, fbRGBA_reg, mask0_reg);
@@ -1043,12 +1043,12 @@ gen_pack_colors(struct spe_function *f,
spe_rotmi(f, a_reg, a_reg, -24);
/* Shift the color bytes according to the surface format */
- if (color_format == PIPE_FORMAT_A8R8G8B8_UNORM) {
+ if (color_format == PIPE_FORMAT_B8G8R8A8_UNORM) {
spe_roti(f, g_reg, g_reg, 8); /* green <<= 8 */
spe_roti(f, r_reg, r_reg, 16); /* red <<= 16 */
spe_roti(f, a_reg, a_reg, 24); /* alpha <<= 24 */
}
- else if (color_format == PIPE_FORMAT_B8G8R8A8_UNORM) {
+ else if (color_format == PIPE_FORMAT_A8R8G8B8_UNORM) {
spe_roti(f, r_reg, r_reg, 8); /* red <<= 8 */
spe_roti(f, g_reg, g_reg, 16); /* green <<= 16 */
spe_roti(f, b_reg, b_reg, 24); /* blue <<= 24 */
@@ -1096,14 +1096,14 @@ gen_colormask(struct spe_function *f,
* end up, so we can mask them correctly.
*/
switch(color_format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
/* ARGB */
a_mask = 0xff000000;
r_mask = 0x00ff0000;
g_mask = 0x0000ff00;
b_mask = 0x000000ff;
break;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
/* BGRA */
b_mask = 0xff000000;
g_mask = 0x00ff0000;
@@ -1859,8 +1859,8 @@ gen_depth_stencil(struct cell_context *cell,
spe_comment(f, 0, "Fetch Z/stencil quad from tile");
switch(zs_format) {
- case PIPE_FORMAT_S8Z24_UNORM: /* fall through */
- case PIPE_FORMAT_X8Z24_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM: /* fall through */
+ case PIPE_FORMAT_Z24X8_UNORM:
/* prepare mask to extract Z vals from ZS vals */
spe_load_uint(f, zmask_reg, 0x00ffffff);
@@ -1880,8 +1880,8 @@ gen_depth_stencil(struct cell_context *cell,
spe_rotmi(f, fbS_reg, fbZS_reg, -24);
break;
- case PIPE_FORMAT_Z24S8_UNORM: /* fall through */
- case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM: /* fall through */
+ case PIPE_FORMAT_X8Z24_UNORM:
/* convert fragment Z from [0,1] to 32-bit ints */
spe_cfltu(f, fragZ_reg, fragZ_reg, 32);
@@ -1969,13 +1969,13 @@ gen_depth_stencil(struct cell_context *cell,
* fbS_reg has four 8-bit Z values in bits [7..0].
*/
spe_comment(f, 0, "Store quad's depth/stencil values in tile");
- if (zs_format == PIPE_FORMAT_S8Z24_UNORM ||
- zs_format == PIPE_FORMAT_X8Z24_UNORM) {
+ if (zs_format == PIPE_FORMAT_Z24S8_UNORM ||
+ zs_format == PIPE_FORMAT_Z24X8_UNORM) {
spe_shli(f, fbS_reg, fbS_reg, 24); /* fbS = fbS << 24 */
spe_or(f, fbZS_reg, fbS_reg, fbZ_reg); /* fbZS = fbS | fbZ */
}
- else if (zs_format == PIPE_FORMAT_Z24S8_UNORM ||
- zs_format == PIPE_FORMAT_Z24X8_UNORM) {
+ else if (zs_format == PIPE_FORMAT_S8Z24_UNORM ||
+ zs_format == PIPE_FORMAT_X8Z24_UNORM) {
spe_shli(f, fbZ_reg, fbZ_reg, 8); /* fbZ = fbZ << 8 */
spe_or(f, fbZS_reg, fbS_reg, fbZ_reg); /* fbZS = fbS | fbZ */
}
@@ -2015,7 +2015,7 @@ gen_depth_stencil(struct cell_context *cell,
* code before the fragment shader to cull fragments/quads that are
* totally occluded/discarded.
*
- * XXX we only support PIPE_FORMAT_Z24S8_UNORM z/stencil buffer right now.
+ * XXX we only support PIPE_FORMAT_S8Z24_UNORM z/stencil buffer right now.
*
* See the spu_default_fragment_ops() function to see how the per-fragment
* operations would be done with ordinary C code.
diff --git a/src/gallium/drivers/cell/ppu/cell_screen.c b/src/gallium/drivers/cell/ppu/cell_screen.c
index 449855f539..a43f8638dc 100644
--- a/src/gallium/drivers/cell/ppu/cell_screen.c
+++ b/src/gallium/drivers/cell/ppu/cell_screen.c
@@ -136,7 +136,7 @@ cell_is_format_supported( struct pipe_screen *screen,
{
/* cell supports most formats, XXX for now anyway */
if (format == PIPE_FORMAT_DXT5_RGBA ||
- format == PIPE_FORMAT_R8G8B8A8_SRGB)
+ format == PIPE_FORMAT_A8B8G8R8_SRGB)
return FALSE;
else
return TRUE;
diff --git a/src/gallium/drivers/cell/ppu/cell_state_per_fragment.c b/src/gallium/drivers/cell/ppu/cell_state_per_fragment.c
index 07be5e92ea..dc33e7ccc2 100644
--- a/src/gallium/drivers/cell/ppu/cell_state_per_fragment.c
+++ b/src/gallium/drivers/cell/ppu/cell_state_per_fragment.c
@@ -1251,7 +1251,7 @@ cell_generate_logic_op(struct spe_function *f,
/* Convert fragment colors to framebuffer format in AoS layout.
*/
switch (surf->format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
data[0] = 0x00010203;
data[1] = 0x10111213;
data[2] = 0x04050607;
@@ -1261,7 +1261,7 @@ cell_generate_logic_op(struct spe_function *f,
data[6] = 0x80808080;
data[7] = 0x80808080;
break;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
data[0] = 0x03020100;
data[1] = 0x13121110;
data[2] = 0x07060504;
diff --git a/src/gallium/drivers/cell/spu/spu_command.c b/src/gallium/drivers/cell/spu/spu_command.c
index 55bd85bde2..79f1fb7fb2 100644
--- a/src/gallium/drivers/cell/spu/spu_command.c
+++ b/src/gallium/drivers/cell/spu/spu_command.c
@@ -337,10 +337,10 @@ cmd_state_framebuffer(const struct cell_command_framebuffer *cmd)
spu.fb.zsize = 4;
spu.fb.zscale = (float) 0xffffffffu;
break;
- case PIPE_FORMAT_Z24S8_UNORM:
case PIPE_FORMAT_S8Z24_UNORM:
- case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
case PIPE_FORMAT_X8Z24_UNORM:
+ case PIPE_FORMAT_Z24X8_UNORM:
spu.fb.zsize = 4;
spu.fb.zscale = (float) 0x00ffffffu;
break;
diff --git a/src/gallium/drivers/cell/spu/spu_per_fragment_op.c b/src/gallium/drivers/cell/spu/spu_per_fragment_op.c
index 5328374080..2c9e7458af 100644
--- a/src/gallium/drivers/cell/spu/spu_per_fragment_op.c
+++ b/src/gallium/drivers/cell/spu/spu_per_fragment_op.c
@@ -138,14 +138,14 @@ spu_fallback_fragment_ops(uint x, uint y,
if (spu.depth_stencil_alpha.stencil[0].enabled) {
/* do stencil test */
- ASSERT(spu.fb.depth_format == PIPE_FORMAT_S8Z24_UNORM);
+ ASSERT(spu.fb.depth_format == PIPE_FORMAT_Z24S8_UNORM);
}
else if (spu.depth_stencil_alpha.depth.enabled) {
/* do depth test */
- ASSERT(spu.fb.depth_format == PIPE_FORMAT_S8Z24_UNORM ||
- spu.fb.depth_format == PIPE_FORMAT_X8Z24_UNORM);
+ ASSERT(spu.fb.depth_format == PIPE_FORMAT_Z24S8_UNORM ||
+ spu.fb.depth_format == PIPE_FORMAT_Z24X8_UNORM);
vector unsigned int ifragZ;
vector unsigned int zmask;
@@ -240,13 +240,13 @@ spu_fallback_fragment_ops(uint x, uint y,
{
vector float temp[4]; /* float colors in AOS form */
switch (spu.fb.color_format) {
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
temp[0] = spu_unpack_B8G8R8A8(fbc0);
temp[1] = spu_unpack_B8G8R8A8(fbc1);
temp[2] = spu_unpack_B8G8R8A8(fbc2);
temp[3] = spu_unpack_B8G8R8A8(fbc3);
break;
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
temp[0] = spu_unpack_A8R8G8B8(fbc0);
temp[1] = spu_unpack_A8R8G8B8(fbc1);
temp[2] = spu_unpack_A8R8G8B8(fbc2);
@@ -506,13 +506,13 @@ spu_fallback_fragment_ops(uint x, uint y,
* Pack fragment float colors into 32-bit RGBA words.
*/
switch (spu.fb.color_format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
fragc0 = spu_pack_A8R8G8B8(frag_aos[0]);
fragc1 = spu_pack_A8R8G8B8(frag_aos[1]);
fragc2 = spu_pack_A8R8G8B8(frag_aos[2]);
fragc3 = spu_pack_A8R8G8B8(frag_aos[3]);
break;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
fragc0 = spu_pack_B8G8R8A8(frag_aos[0]);
fragc1 = spu_pack_B8G8R8A8(frag_aos[1]);
fragc2 = spu_pack_B8G8R8A8(frag_aos[2]);
@@ -532,7 +532,7 @@ spu_fallback_fragment_ops(uint x, uint y,
/* Form bitmask depending on color buffer format and colormask bits */
switch (spu.fb.color_format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
if (spu.blend.rt[0].colormask & PIPE_MASK_R)
cmask |= 0x00ff0000; /* red */
if (spu.blend.rt[0].colormask & PIPE_MASK_G)
@@ -542,7 +542,7 @@ spu_fallback_fragment_ops(uint x, uint y,
if (spu.blend.rt[0].colormask & PIPE_MASK_A)
cmask |= 0xff000000; /* alpha */
break;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
if (spu.blend.rt[0].colormask & PIPE_MASK_R)
cmask |= 0x0000ff00; /* red */
if (spu.blend.rt[0].colormask & PIPE_MASK_G)
diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c
index b1d754dc4e..72bd263550 100644
--- a/src/gallium/drivers/i915/i915_screen.c
+++ b/src/gallium/drivers/i915/i915_screen.c
@@ -165,22 +165,22 @@ i915_is_format_supported(struct pipe_screen *screen,
unsigned geom_flags)
{
static const enum pipe_format tex_supported[] = {
- PIPE_FORMAT_R8G8B8A8_UNORM,
- PIPE_FORMAT_A8R8G8B8_UNORM,
- PIPE_FORMAT_R5G6B5_UNORM,
+ PIPE_FORMAT_A8B8G8R8_UNORM,
+ PIPE_FORMAT_B8G8R8A8_UNORM,
+ PIPE_FORMAT_B5G6R5_UNORM,
PIPE_FORMAT_L8_UNORM,
PIPE_FORMAT_A8_UNORM,
PIPE_FORMAT_I8_UNORM,
- PIPE_FORMAT_A8L8_UNORM,
- PIPE_FORMAT_YCBCR,
- PIPE_FORMAT_YCBCR_REV,
- PIPE_FORMAT_S8Z24_UNORM,
+ PIPE_FORMAT_L8A8_UNORM,
+ PIPE_FORMAT_UYVY,
+ PIPE_FORMAT_YUYV,
+ PIPE_FORMAT_Z24S8_UNORM,
PIPE_FORMAT_NONE /* list terminator */
};
static const enum pipe_format surface_supported[] = {
- PIPE_FORMAT_A8R8G8B8_UNORM,
- PIPE_FORMAT_R5G6B5_UNORM,
- PIPE_FORMAT_S8Z24_UNORM,
+ PIPE_FORMAT_B8G8R8A8_UNORM,
+ PIPE_FORMAT_B5G6R5_UNORM,
+ PIPE_FORMAT_Z24S8_UNORM,
PIPE_FORMAT_NONE /* list terminator */
};
const enum pipe_format *list;
diff --git a/src/gallium/drivers/i915/i915_state_emit.c b/src/gallium/drivers/i915/i915_state_emit.c
index a3d4e3b04e..51f0ef12ba 100644
--- a/src/gallium/drivers/i915/i915_state_emit.c
+++ b/src/gallium/drivers/i915/i915_state_emit.c
@@ -37,9 +37,9 @@
static unsigned translate_format( enum pipe_format format )
{
switch (format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
return COLOR_BUF_ARGB8888;
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
return COLOR_BUF_RGB565;
default:
assert(0);
@@ -50,7 +50,7 @@ static unsigned translate_format( enum pipe_format format )
static unsigned translate_depth_format( enum pipe_format zformat )
{
switch (zformat) {
- case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
return DEPTH_FRMT_24_FIXED_8_OTHER;
case PIPE_FORMAT_Z16_UNORM:
return DEPTH_FRMT_16_FIXED;
@@ -244,6 +244,7 @@ i915_emit_hardware_state(struct i915_context *i915 )
OUT_BATCH(_3DSTATE_BUF_INFO_CMD);
+ assert(tex);
OUT_BATCH(BUF_3D_ID_DEPTH |
BUF_3D_PITCH(tex->stride) | /* pitch in bytes */
ztile);
@@ -259,7 +260,7 @@ i915_emit_hardware_state(struct i915_context *i915 )
if (cbuf_surface)
cformat = cbuf_surface->format;
else
- cformat = PIPE_FORMAT_A8R8G8B8_UNORM; /* arbitrary */
+ cformat = PIPE_FORMAT_B8G8R8A8_UNORM; /* arbitrary */
cformat = translate_format(cformat);
if (depth_surface)
diff --git a/src/gallium/drivers/i915/i915_state_sampler.c b/src/gallium/drivers/i915/i915_state_sampler.c
index e5c6d87215..9813290b51 100644
--- a/src/gallium/drivers/i915/i915_state_sampler.c
+++ b/src/gallium/drivers/i915/i915_state_sampler.c
@@ -87,8 +87,8 @@ static void update_sampler(struct i915_context *i915,
state[1] = sampler->state[1];
state[2] = sampler->state[2];
- if (pt->format == PIPE_FORMAT_YCBCR ||
- pt->format == PIPE_FORMAT_YCBCR_REV)
+ if (pt->format == PIPE_FORMAT_UYVY ||
+ pt->format == PIPE_FORMAT_YUYV)
state[0] |= SS2_COLORSPACE_CONVERSION;
/* 3D textures don't seem to respect the border color.
@@ -180,19 +180,19 @@ translate_texture_format(enum pipe_format pipeFormat)
return MAPSURF_8BIT | MT_8BIT_I8;
case PIPE_FORMAT_A8_UNORM:
return MAPSURF_8BIT | MT_8BIT_A8;
- case PIPE_FORMAT_A8L8_UNORM:
+ case PIPE_FORMAT_L8A8_UNORM:
return MAPSURF_16BIT | MT_16BIT_AY88;
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
return MAPSURF_16BIT | MT_16BIT_RGB565;
- case PIPE_FORMAT_A1R5G5B5_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
return MAPSURF_16BIT | MT_16BIT_ARGB1555;
- case PIPE_FORMAT_A4R4G4B4_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
return MAPSURF_16BIT | MT_16BIT_ARGB4444;
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
return MAPSURF_32BIT | MT_32BIT_ARGB8888;
- case PIPE_FORMAT_YCBCR_REV:
+ case PIPE_FORMAT_YUYV:
return (MAPSURF_422 | MT_422_YCRCB_NORMAL);
- case PIPE_FORMAT_YCBCR:
+ case PIPE_FORMAT_UYVY:
return (MAPSURF_422 | MT_422_YCRCB_SWAPY);
#if 0
case PIPE_FORMAT_RGB_FXT1:
@@ -210,7 +210,7 @@ translate_texture_format(enum pipe_format pipeFormat)
case PIPE_FORMAT_RGBA_DXT5:
return (MAPSURF_COMPRESSED | MT_COMPRESS_DXT4_5);
#endif
- case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
return (MAPSURF_32BIT | MT_32BIT_xI824);
default:
debug_printf("i915: translate_texture_format() bad image format %x\n",
diff --git a/src/gallium/drivers/i965/brw_misc_state.c b/src/gallium/drivers/i965/brw_misc_state.c
index e4b24229db..e3f25bdf62 100644
--- a/src/gallium/drivers/i965/brw_misc_state.c
+++ b/src/gallium/drivers/i965/brw_misc_state.c
@@ -265,8 +265,8 @@ static int emit_depthbuffer(struct brw_context *brw)
format = BRW_DEPTHFORMAT_D16_UNORM;
cpp = 2;
break;
- case PIPE_FORMAT_X8Z24_UNORM:
- case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
format = BRW_DEPTHFORMAT_D24_UNORM_S8_UINT;
cpp = 4;
break;
diff --git a/src/gallium/drivers/i965/brw_pipe_clear.c b/src/gallium/drivers/i965/brw_pipe_clear.c
index 452e1e89f9..d7048f769b 100644
--- a/src/gallium/drivers/i965/brw_pipe_clear.c
+++ b/src/gallium/drivers/i965/brw_pipe_clear.c
@@ -139,8 +139,8 @@ static void zstencil_clear(struct brw_context *brw,
unsigned value;
switch (bsurface->base.format) {
- case PIPE_FORMAT_X8Z24_UNORM:
- case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
value = ((unsigned)(depth * MASK24) & MASK24);
break;
case PIPE_FORMAT_Z16_UNORM:
@@ -152,8 +152,8 @@ static void zstencil_clear(struct brw_context *brw,
}
switch (bsurface->base.format) {
- case PIPE_FORMAT_X8Z24_UNORM:
- case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
value = value | (stencil << 24);
break;
diff --git a/src/gallium/drivers/i965/brw_screen.c b/src/gallium/drivers/i965/brw_screen.c
index b03a782a2f..66f3aad8b2 100644
--- a/src/gallium/drivers/i965/brw_screen.c
+++ b/src/gallium/drivers/i965/brw_screen.c
@@ -229,15 +229,15 @@ brw_is_format_supported(struct pipe_screen *screen,
PIPE_FORMAT_L16_UNORM,
/*PIPE_FORMAT_I16_UNORM,*/
/*PIPE_FORMAT_A16_UNORM,*/
- PIPE_FORMAT_A8L8_UNORM,
- PIPE_FORMAT_R5G6B5_UNORM,
- PIPE_FORMAT_A1R5G5B5_UNORM,
- PIPE_FORMAT_A4R4G4B4_UNORM,
- PIPE_FORMAT_X8R8G8B8_UNORM,
- PIPE_FORMAT_A8R8G8B8_UNORM,
+ PIPE_FORMAT_L8A8_UNORM,
+ PIPE_FORMAT_B5G6R5_UNORM,
+ PIPE_FORMAT_B5G5R5A1_UNORM,
+ PIPE_FORMAT_B4G4R4A4_UNORM,
+ PIPE_FORMAT_B8G8R8X8_UNORM,
+ PIPE_FORMAT_B8G8R8A8_UNORM,
/* video */
- PIPE_FORMAT_YCBCR,
- PIPE_FORMAT_YCBCR_REV,
+ PIPE_FORMAT_UYVY,
+ PIPE_FORMAT_YUYV,
/* compressed */
/*PIPE_FORMAT_FXT1_RGBA,*/
PIPE_FORMAT_DXT1_RGB,
@@ -245,14 +245,14 @@ brw_is_format_supported(struct pipe_screen *screen,
PIPE_FORMAT_DXT3_RGBA,
PIPE_FORMAT_DXT5_RGBA,
/* sRGB */
- PIPE_FORMAT_R8G8B8A8_SRGB,
- PIPE_FORMAT_A8L8_SRGB,
+ PIPE_FORMAT_A8B8G8R8_SRGB,
+ PIPE_FORMAT_L8A8_SRGB,
PIPE_FORMAT_L8_SRGB,
PIPE_FORMAT_DXT1_SRGB,
/* depth */
PIPE_FORMAT_Z32_FLOAT,
- PIPE_FORMAT_X8Z24_UNORM,
- PIPE_FORMAT_S8Z24_UNORM,
+ PIPE_FORMAT_Z24X8_UNORM,
+ PIPE_FORMAT_Z24S8_UNORM,
PIPE_FORMAT_Z16_UNORM,
/* signed */
PIPE_FORMAT_R8G8_SNORM,
@@ -260,15 +260,15 @@ brw_is_format_supported(struct pipe_screen *screen,
PIPE_FORMAT_NONE /* list terminator */
};
static const enum pipe_format render_supported[] = {
- PIPE_FORMAT_X8R8G8B8_UNORM,
- PIPE_FORMAT_A8R8G8B8_UNORM,
- PIPE_FORMAT_R5G6B5_UNORM,
+ PIPE_FORMAT_B8G8R8X8_UNORM,
+ PIPE_FORMAT_B8G8R8A8_UNORM,
+ PIPE_FORMAT_B5G6R5_UNORM,
PIPE_FORMAT_NONE /* list terminator */
};
static const enum pipe_format depth_supported[] = {
PIPE_FORMAT_Z32_FLOAT,
- PIPE_FORMAT_X8Z24_UNORM,
- PIPE_FORMAT_S8Z24_UNORM,
+ PIPE_FORMAT_Z24X8_UNORM,
+ PIPE_FORMAT_Z24S8_UNORM,
PIPE_FORMAT_Z16_UNORM,
PIPE_FORMAT_NONE /* list terminator */
};
diff --git a/src/gallium/drivers/i965/brw_screen_texture.c b/src/gallium/drivers/i965/brw_screen_texture.c
index 995a6f1d7f..caa16ee150 100644
--- a/src/gallium/drivers/i965/brw_screen_texture.c
+++ b/src/gallium/drivers/i965/brw_screen_texture.c
@@ -85,32 +85,32 @@ static GLuint translate_tex_format( enum pipe_format pf )
return BRW_SURFACEFORMAT_A16_UNORM;
*/
- case PIPE_FORMAT_A8L8_UNORM:
+ case PIPE_FORMAT_L8A8_UNORM:
return BRW_SURFACEFORMAT_L8A8_UNORM;
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
return BRW_SURFACEFORMAT_B5G6R5_UNORM;
- case PIPE_FORMAT_A1R5G5B5_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
return BRW_SURFACEFORMAT_B5G5R5A1_UNORM;
- case PIPE_FORMAT_A4R4G4B4_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
return BRW_SURFACEFORMAT_B4G4R4A4_UNORM;
- case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
return BRW_SURFACEFORMAT_R8G8B8X8_UNORM;
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
return BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
/*
* Video formats
*/
- case PIPE_FORMAT_YCBCR_REV:
+ case PIPE_FORMAT_YUYV:
return BRW_SURFACEFORMAT_YCRCB_NORMAL;
- case PIPE_FORMAT_YCBCR:
+ case PIPE_FORMAT_UYVY:
return BRW_SURFACEFORMAT_YCRCB_SWAPUVY;
/*
@@ -137,10 +137,10 @@ static GLuint translate_tex_format( enum pipe_format pf )
* sRGB formats
*/
- case PIPE_FORMAT_R8G8B8A8_SRGB:
+ case PIPE_FORMAT_A8B8G8R8_SRGB:
return BRW_SURFACEFORMAT_B8G8R8A8_UNORM_SRGB;
- case PIPE_FORMAT_A8L8_SRGB:
+ case PIPE_FORMAT_L8A8_SRGB:
return BRW_SURFACEFORMAT_L8A8_UNORM_SRGB;
case PIPE_FORMAT_L8_SRGB:
@@ -156,8 +156,8 @@ static GLuint translate_tex_format( enum pipe_format pf )
case PIPE_FORMAT_Z16_UNORM:
return BRW_SURFACEFORMAT_I16_UNORM;
- case PIPE_FORMAT_S8Z24_UNORM:
- case PIPE_FORMAT_X8Z24_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_Z24X8_UNORM:
return BRW_SURFACEFORMAT_I24X8_UNORM;
case PIPE_FORMAT_Z32_FLOAT:
diff --git a/src/gallium/drivers/i965/brw_wm.c b/src/gallium/drivers/i965/brw_wm.c
index 5164c90ed6..dfb718e64f 100644
--- a/src/gallium/drivers/i965/brw_wm.c
+++ b/src/gallium/drivers/i965/brw_wm.c
@@ -254,10 +254,10 @@ static void brw_wm_populate_key( struct brw_context *brw,
for (i = 0; i < brw->curr.num_textures; i++) {
const struct brw_texture *tex = brw_texture(brw->curr.texture[i]);
- if (tex->base.format == PIPE_FORMAT_YCBCR)
+ if (tex->base.format == PIPE_FORMAT_UYVY)
key->yuvtex_mask |= 1 << i;
- if (tex->base.format == PIPE_FORMAT_YCBCR_REV)
+ if (tex->base.format == PIPE_FORMAT_YUYV)
key->yuvtex_swap_mask |= 1 << i;
/* XXX: shadow texture
diff --git a/src/gallium/drivers/llvmpipe/README b/src/gallium/drivers/llvmpipe/README
index ae2c1ba943..bf4c9a5727 100644
--- a/src/gallium/drivers/llvmpipe/README
+++ b/src/gallium/drivers/llvmpipe/README
@@ -49,8 +49,6 @@ To do (probably by this order):
Requirements
============
- - Linux
-
- A x86 or amd64 processor. 64bit mode is preferred.
Support for sse2 is strongly encouraged. Support for ssse3, and sse4.1 will
diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c
index 9120226de0..e31ae6a3fc 100644
--- a/src/gallium/drivers/llvmpipe/lp_context.c
+++ b/src/gallium/drivers/llvmpipe/lp_context.c
@@ -183,7 +183,7 @@ llvmpipe_create_context( struct pipe_screen *screen, void *priv )
if (debug_get_bool_option( "LP_NO_RAST", FALSE ))
llvmpipe->no_rast = TRUE;
- llvmpipe->setup = lp_setup_create( screen,
+ llvmpipe->setup = lp_setup_create( &llvmpipe->pipe,
llvmpipe->draw );
if (!llvmpipe->setup)
goto fail;
diff --git a/src/gallium/drivers/llvmpipe/lp_jit.c b/src/gallium/drivers/llvmpipe/lp_jit.c
index d3d7e26882..bacff500d6 100644
--- a/src/gallium/drivers/llvmpipe/lp_jit.c
+++ b/src/gallium/drivers/llvmpipe/lp_jit.c
@@ -37,6 +37,7 @@
#include "util/u_memory.h"
#include "util/u_cpu_detect.h"
+#include "gallivm/lp_bld_init.h"
#include "lp_debug.h"
#include "lp_screen.h"
#include "gallivm/lp_bld_intr.h"
@@ -50,10 +51,12 @@ lp_jit_init_globals(struct llvmpipe_screen *screen)
/* struct lp_jit_texture */
{
- LLVMTypeRef elem_types[4];
+ LLVMTypeRef elem_types[6];
elem_types[LP_JIT_TEXTURE_WIDTH] = LLVMInt32Type();
elem_types[LP_JIT_TEXTURE_HEIGHT] = LLVMInt32Type();
+ elem_types[LP_JIT_TEXTURE_DEPTH] = LLVMInt32Type();
+ elem_types[LP_JIT_TEXTURE_LAST_LEVEL] = LLVMInt32Type();
elem_types[LP_JIT_TEXTURE_STRIDE] = LLVMInt32Type();
elem_types[LP_JIT_TEXTURE_DATA] = LLVMPointerType(LLVMInt8Type(), 0);
@@ -65,6 +68,12 @@ lp_jit_init_globals(struct llvmpipe_screen *screen)
LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, height,
screen->target, texture_type,
LP_JIT_TEXTURE_HEIGHT);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, depth,
+ screen->target, texture_type,
+ LP_JIT_TEXTURE_DEPTH);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, last_level,
+ screen->target, texture_type,
+ LP_JIT_TEXTURE_LAST_LEVEL);
LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, stride,
screen->target, texture_type,
LP_JIT_TEXTURE_STRIDE);
@@ -148,8 +157,7 @@ lp_jit_screen_init(struct llvmpipe_screen *screen)
util_cpu_caps.has_sse4_1 = 0;
#endif
- LLVMLinkInJIT();
- LLVMInitializeNativeTarget();
+ lp_build_init();
screen->module = LLVMModuleCreateWithName("llvmpipe");
diff --git a/src/gallium/drivers/llvmpipe/lp_jit.h b/src/gallium/drivers/llvmpipe/lp_jit.h
index 8df3015d4b..0ebb2826fa 100644
--- a/src/gallium/drivers/llvmpipe/lp_jit.h
+++ b/src/gallium/drivers/llvmpipe/lp_jit.h
@@ -48,6 +48,8 @@ struct lp_jit_texture
{
uint32_t width;
uint32_t height;
+ uint32_t depth;
+ uint32_t last_level;
uint32_t stride;
const void *data;
};
@@ -56,6 +58,8 @@ struct lp_jit_texture
enum {
LP_JIT_TEXTURE_WIDTH = 0,
LP_JIT_TEXTURE_HEIGHT,
+ LP_JIT_TEXTURE_DEPTH,
+ LP_JIT_TEXTURE_LAST_LEVEL,
LP_JIT_TEXTURE_STRIDE,
LP_JIT_TEXTURE_DATA
};
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c
index 82c006d78b..dd9a8e8856 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.c
+++ b/src/gallium/drivers/llvmpipe/lp_rast.c
@@ -42,114 +42,60 @@
#include "lp_scene.h"
-/**
- * Begin the rasterization phase.
- * Map the framebuffer surfaces. Initialize the 'rast' state.
+/* Begin rasterizing a scene:
*/
static boolean
lp_rast_begin( struct lp_rasterizer *rast,
- const struct pipe_framebuffer_state *fb,
- boolean write_color,
- boolean write_zstencil )
+ struct lp_scene *scene )
{
- struct pipe_screen *screen = rast->screen;
- struct pipe_surface *cbuf, *zsbuf;
+ const struct pipe_framebuffer_state *fb = &scene->fb;
+ boolean write_color = fb->nr_cbufs != 0;
+ boolean write_zstencil = fb->zsbuf != NULL;
int i;
- LP_DBG(DEBUG_RAST, "%s\n", __FUNCTION__);
+ rast->curr_scene = scene;
- util_copy_framebuffer_state(&rast->state.fb, fb);
+ LP_DBG(DEBUG_RAST, "%s\n", __FUNCTION__);
+ rast->state.nr_cbufs = scene->fb.nr_cbufs;
rast->state.write_zstencil = write_zstencil;
rast->state.write_color = write_color;
-
- rast->check_for_clipped_tiles = (fb->width % TILE_SIZE != 0 ||
- fb->height % TILE_SIZE != 0);
-
- for (i = 0; i < rast->state.fb.nr_cbufs; i++) {
- cbuf = rast->state.fb.cbufs[i];
- if (cbuf) {
- rast->cbuf_transfer[i] = screen->get_tex_transfer(rast->screen,
- cbuf->texture,
- cbuf->face,
- cbuf->level,
- cbuf->zslice,
- PIPE_TRANSFER_READ_WRITE,
- 0, 0,
- cbuf->width,
- cbuf->height);
- if (!rast->cbuf_transfer[i])
- goto fail;
-
- rast->cbuf_map[i] = screen->transfer_map(rast->screen,
- rast->cbuf_transfer[i]);
- if (!rast->cbuf_map[i])
- goto fail;
- }
+ for (i = 0; i < rast->state.nr_cbufs; i++) {
+ rast->cbuf[i].map = scene->cbuf_map[i];
+ rast->cbuf[i].format = scene->cbuf_transfer[i]->texture->format;
+ rast->cbuf[i].width = scene->cbuf_transfer[i]->width;
+ rast->cbuf[i].height = scene->cbuf_transfer[i]->height;
+ rast->cbuf[i].stride = scene->cbuf_transfer[i]->stride;
}
- zsbuf = rast->state.fb.zsbuf;
- if (zsbuf) {
- rast->zsbuf_transfer = screen->get_tex_transfer(rast->screen,
- zsbuf->texture,
- zsbuf->face,
- zsbuf->level,
- zsbuf->zslice,
- PIPE_TRANSFER_READ_WRITE,
- 0, 0,
- zsbuf->width,
- zsbuf->height);
- if (!rast->zsbuf_transfer)
- goto fail;
-
- rast->zsbuf_map = screen->transfer_map(rast->screen,
- rast->zsbuf_transfer);
- if (!rast->zsbuf_map)
- goto fail;
+ if (write_zstencil) {
+ rast->zsbuf.map = scene->zsbuf_map;
+ rast->zsbuf.stride = scene->zsbuf_transfer->stride;
+ rast->zsbuf.blocksize =
+ util_format_get_blocksize(scene->zsbuf_transfer->texture->format);
}
+ lp_scene_bin_iter_begin( scene );
+
return TRUE;
-
-fail:
- /* Unmap and release transfers?
- */
- return FALSE;
}
-/**
- * Finish the rasterization phase.
- * Unmap framebuffer surfaces.
- */
static void
lp_rast_end( struct lp_rasterizer *rast )
{
- struct pipe_screen *screen = rast->screen;
- unsigned i;
-
- for (i = 0; i < rast->state.fb.nr_cbufs; i++) {
- if (rast->cbuf_map[i])
- screen->transfer_unmap(screen, rast->cbuf_transfer[i]);
-
- if (rast->cbuf_transfer[i])
- screen->tex_transfer_destroy(rast->cbuf_transfer[i]);
-
- rast->cbuf_transfer[i] = NULL;
- rast->cbuf_map[i] = NULL;
- }
+ int i;
- if (rast->zsbuf_map)
- screen->transfer_unmap(screen, rast->zsbuf_transfer);
+ lp_scene_reset( rast->curr_scene );
- if (rast->zsbuf_transfer)
- screen->tex_transfer_destroy(rast->zsbuf_transfer);
+ for (i = 0; i < rast->state.nr_cbufs; i++)
+ rast->cbuf[i].map = NULL;
- rast->zsbuf_transfer = NULL;
- rast->zsbuf_map = NULL;
+ rast->zsbuf.map = NULL;
+ rast->curr_scene = NULL;
}
-
/**
* Begining rasterization of a tile.
* \param x window X position of the tile, in pixels
@@ -189,7 +135,7 @@ lp_rast_clear_color(struct lp_rasterizer_task *task,
clear_color[1] == clear_color[2] &&
clear_color[2] == clear_color[3]) {
/* clear to grayscale value {x, x, x, x} */
- for (i = 0; i < rast->state.fb.nr_cbufs; i++) {
+ for (i = 0; i < rast->state.nr_cbufs; i++) {
memset(color_tile[i], clear_color[0], TILE_SIZE * TILE_SIZE * 4);
}
}
@@ -200,7 +146,7 @@ lp_rast_clear_color(struct lp_rasterizer_task *task,
* works.
*/
const unsigned chunk = TILE_SIZE / 4;
- for (i = 0; i < rast->state.fb.nr_cbufs; i++) {
+ for (i = 0; i < rast->state.nr_cbufs; i++) {
uint8_t *c = color_tile[i];
unsigned j;
for (j = 0; j < 4 * TILE_SIZE; j++) {
@@ -232,17 +178,17 @@ lp_rast_clear_zstencil(struct lp_rasterizer_task *task,
struct lp_rasterizer *rast = task->rast;
const unsigned tile_x = task->x;
const unsigned tile_y = task->y;
- const unsigned height = TILE_SIZE/TILE_VECTOR_HEIGHT;
- const unsigned width = TILE_SIZE*TILE_VECTOR_HEIGHT;
- unsigned block_size = util_format_get_blocksize(rast->zsbuf_transfer->texture->format);
+ const unsigned height = TILE_SIZE / TILE_VECTOR_HEIGHT;
+ const unsigned width = TILE_SIZE * TILE_VECTOR_HEIGHT;
+ unsigned block_size = rast->zsbuf.blocksize;
uint8_t *dst;
- unsigned dst_stride = rast->zsbuf_transfer->stride*TILE_VECTOR_HEIGHT;
+ unsigned dst_stride = rast->zsbuf.stride * TILE_VECTOR_HEIGHT;
unsigned i, j;
LP_DBG(DEBUG_RAST, "%s 0x%x\n", __FUNCTION__, arg.clear_zstencil);
- assert(rast->zsbuf_map);
- if (!rast->zsbuf_map)
+ assert(rast->zsbuf.map);
+ if (!rast->zsbuf.map)
return;
LP_DBG(DEBUG_RAST, "%s\n", __FUNCTION__);
@@ -278,8 +224,8 @@ lp_rast_clear_zstencil(struct lp_rasterizer_task *task,
}
break;
default:
- assert(0);
- break;
+ assert(0);
+ break;
}
}
@@ -298,25 +244,16 @@ lp_rast_load_color(struct lp_rasterizer_task *task,
LP_DBG(DEBUG_RAST, "%s at %u, %u\n", __FUNCTION__, x, y);
- for (i = 0; i < rast->state.fb.nr_cbufs; i++) {
- struct pipe_transfer *transfer = rast->cbuf_transfer[i];
- int w = TILE_SIZE;
- int h = TILE_SIZE;
-
- if (x >= transfer->width || y >= transfer->height)
+ for (i = 0; i < rast->state.nr_cbufs; i++) {
+ if (x >= rast->cbuf[i].width || y >= rast->cbuf[i].height)
continue;
- assert(w >= 0);
- assert(h >= 0);
- assert(w <= TILE_SIZE);
- assert(h <= TILE_SIZE);
-
- lp_tile_read_4ub(transfer->texture->format,
+ lp_tile_read_4ub(rast->cbuf[i].format,
task->tile.color[i],
- rast->cbuf_map[i],
- transfer->stride,
+ rast->cbuf[i].map,
+ rast->cbuf[i].stride,
x, y,
- w, h);
+ TILE_SIZE, TILE_SIZE);
LP_COUNT(nr_color_tile_load);
}
@@ -366,7 +303,7 @@ lp_rast_shade_tile(struct lp_rasterizer_task *task,
block_offset = ((y / 4) * (16 * 16) + (x / 4) * 16);
/* color buffer */
- for (i = 0; i < rast->state.fb.nr_cbufs; i++)
+ for (i = 0; i < rast->state.nr_cbufs; i++)
color[i] = tile->color[i] + 4 * block_offset;
/* depth buffer */
@@ -405,7 +342,6 @@ void lp_rast_shade_quads( struct lp_rasterizer_task *task,
unsigned ix, iy;
int block_offset;
-#ifdef DEBUG
assert(state);
/* Sanity checks */
@@ -414,7 +350,6 @@ void lp_rast_shade_quads( struct lp_rasterizer_task *task,
assert((x % 4) == 0);
assert((y % 4) == 0);
-#endif
ix = x % TILE_SIZE;
iy = y % TILE_SIZE;
@@ -423,22 +358,19 @@ void lp_rast_shade_quads( struct lp_rasterizer_task *task,
block_offset = ((iy / 4) * (16 * 16) + (ix / 4) * 16);
/* color buffer */
- for (i = 0; i < rast->state.fb.nr_cbufs; i++)
+ for (i = 0; i < rast->state.nr_cbufs; i++)
color[i] = tile->color[i] + 4 * block_offset;
/* depth buffer */
depth = lp_rast_depth_pointer(rast, x, y);
-
-#ifdef DEBUG
assert(lp_check_alignment(tile->color[0], 16));
assert(lp_check_alignment(state->jit_context.blend_color, 16));
assert(lp_check_alignment(inputs->step[0], 16));
assert(lp_check_alignment(inputs->step[1], 16));
assert(lp_check_alignment(inputs->step[2], 16));
-#endif
/* run shader */
state->jit_function[1]( &state->jit_context,
@@ -516,51 +448,33 @@ lp_rast_store_color(struct lp_rasterizer_task *task)
const unsigned x = task->x, y = task->y;
unsigned i;
- for (i = 0; i < rast->state.fb.nr_cbufs; i++) {
- struct pipe_transfer *transfer = rast->cbuf_transfer[i];
- int w = TILE_SIZE;
- int h = TILE_SIZE;
-
- if (x >= transfer->width)
+ for (i = 0; i < rast->state.nr_cbufs; i++) {
+ if (x >= rast->cbuf[i].width)
continue;
- if (y >= transfer->height)
+ if (y >= rast->cbuf[i].height)
continue;
- LP_DBG(DEBUG_RAST, "%s [%u] %d,%d %dx%d\n", __FUNCTION__,
- task->thread_index, x, y, w, h);
+ LP_DBG(DEBUG_RAST, "%s [%u] %d,%d\n", __FUNCTION__,
+ task->thread_index, x, y);
if (LP_DEBUG & DEBUG_SHOW_SUBTILES)
outline_subtiles(task->tile.color[i]);
else if (LP_DEBUG & DEBUG_SHOW_TILES)
outline_tile(task->tile.color[i]);
- lp_tile_write_4ub(transfer->texture->format,
+ lp_tile_write_4ub(rast->cbuf[i].format,
task->tile.color[i],
- rast->cbuf_map[i],
- transfer->stride,
+ rast->cbuf[i].map,
+ rast->cbuf[i].stride,
x, y,
- w, h);
+ TILE_SIZE, TILE_SIZE);
LP_COUNT(nr_color_tile_store);
}
}
-/**
- * Write the rasterizer's tiles to the framebuffer.
- */
-static void
-lp_rast_end_tile(struct lp_rasterizer_task *task)
-{
- struct lp_rasterizer *rast = task->rast;
-
- LP_DBG(DEBUG_RAST, "%s\n", __FUNCTION__);
-
- if (rast->state.write_color)
- lp_rast_store_color(task);
-}
-
/**
* Signal on a fence. This is called during bin execution/rasterization.
@@ -586,23 +500,6 @@ lp_rast_fence(struct lp_rasterizer_task *task,
}
-/**
- * When all the threads are done rasterizing a scene, one thread will
- * call this function to reset the scene and put it onto the empty queue.
- */
-static void
-release_scene( struct lp_rasterizer *rast,
- struct lp_scene *scene )
-{
- util_unreference_framebuffer_state( &scene->fb );
-
- lp_scene_reset( scene );
-
- assert(lp_scene_is_empty(scene));
-
- lp_scene_enqueue( rast->empty_scenes, scene );
- rast->curr_scene = NULL;
-}
/**
@@ -620,7 +517,7 @@ rasterize_bin(struct lp_rasterizer_task *task,
struct cmd_block *block;
unsigned k;
- lp_rast_start_tile( task, x, y );
+ lp_rast_start_tile( task, x * TILE_SIZE, y * TILE_SIZE );
/* simply execute each of the commands in the block list */
for (block = commands->head; block; block = block->next) {
@@ -629,7 +526,14 @@ rasterize_bin(struct lp_rasterizer_task *task,
}
}
- lp_rast_end_tile( task );
+ /* Write the rasterizer's tiles to the framebuffer.
+ */
+ if (task->rast->state.write_color)
+ lp_rast_store_color(task);
+
+ /* Free data for this bin.
+ */
+ lp_scene_bin_reset( task->rast->curr_scene, x, y);
}
@@ -714,8 +618,7 @@ is_empty_bin( const struct cmd_bin *bin )
*/
static void
rasterize_scene(struct lp_rasterizer_task *task,
- struct lp_scene *scene,
- bool write_depth)
+ struct lp_scene *scene)
{
/* loop over scene bins, rasterize each */
#if 0
@@ -724,7 +627,7 @@ rasterize_scene(struct lp_rasterizer_task *task,
for (i = 0; i < scene->tiles_x; i++) {
for (j = 0; j < scene->tiles_y; j++) {
struct cmd_bin *bin = lp_scene_get_bin(scene, i, j);
- rasterize_bin(task, bin, i * TILE_SIZE, j * TILE_SIZE);
+ rasterize_bin(task, bin, i, j);
}
}
}
@@ -736,7 +639,7 @@ rasterize_scene(struct lp_rasterizer_task *task,
assert(scene);
while ((bin = lp_scene_bin_iter_next(scene, &x, &y))) {
if (!is_empty_bin( bin ))
- rasterize_bin(task, bin, x * TILE_SIZE, y * TILE_SIZE);
+ rasterize_bin(task, bin, x, y);
}
}
#endif
@@ -747,44 +650,20 @@ rasterize_scene(struct lp_rasterizer_task *task,
* Called by setup module when it has something for us to render.
*/
void
-lp_rasterize_scene( struct lp_rasterizer *rast,
- struct lp_scene *scene,
- const struct pipe_framebuffer_state *fb,
- bool write_depth )
+lp_rast_queue_scene( struct lp_rasterizer *rast,
+ struct lp_scene *scene)
{
- boolean debug = false;
-
LP_DBG(DEBUG_SETUP, "%s\n", __FUNCTION__);
- if (debug) {
- unsigned x, y;
- debug_printf("rasterize scene:\n");
- debug_printf(" data size: %u\n", lp_scene_data_size(scene));
- for (y = 0; y < scene->tiles_y; y++) {
- for (x = 0; x < scene->tiles_x; x++) {
- debug_printf(" bin %u, %u size: %u\n", x, y,
- lp_scene_bin_size(scene, x, y));
- }
- }
- }
-
- /* save framebuffer state in the bin */
- util_copy_framebuffer_state(&scene->fb, fb);
- scene->write_depth = write_depth;
-
if (rast->num_threads == 0) {
/* no threading */
- lp_rast_begin( rast, fb,
- fb->nr_cbufs != 0, /* always write color if cbufs present */
- fb->zsbuf != NULL && write_depth );
-
- lp_scene_bin_iter_begin( scene );
- rasterize_scene( &rast->tasks[0], scene, write_depth );
+ lp_rast_begin( rast, scene );
- release_scene( rast, scene );
+ rasterize_scene( &rast->tasks[0], scene );
- lp_rast_end( rast );
+ lp_scene_reset( scene );
+ rast->curr_scene = NULL;
}
else {
/* threaded rendering! */
@@ -796,14 +675,26 @@ lp_rasterize_scene( struct lp_rasterizer *rast,
for (i = 0; i < rast->num_threads; i++) {
pipe_semaphore_signal(&rast->tasks[i].work_ready);
}
+ }
+
+ LP_DBG(DEBUG_SETUP, "%s done \n", __FUNCTION__);
+}
+
+
+void
+lp_rast_finish( struct lp_rasterizer *rast )
+{
+ if (rast->num_threads == 0) {
+ /* nothing to do */
+ }
+ else {
+ int i;
/* wait for work to complete */
for (i = 0; i < rast->num_threads; i++) {
pipe_semaphore_wait(&rast->tasks[i].work_done);
}
}
-
- LP_DBG(DEBUG_SETUP, "%s done \n", __FUNCTION__);
}
@@ -834,19 +725,8 @@ static PIPE_THREAD_ROUTINE( thread_func, init_data )
* - get next scene to rasterize
* - map the framebuffer surfaces
*/
- const struct pipe_framebuffer_state *fb;
- boolean write_depth;
-
- rast->curr_scene = lp_scene_dequeue( rast->full_scenes, TRUE );
-
- lp_scene_bin_iter_begin( rast->curr_scene );
-
- fb = &rast->curr_scene->fb;
- write_depth = rast->curr_scene->write_depth;
-
- lp_rast_begin( rast, fb,
- fb->nr_cbufs != 0,
- fb->zsbuf != NULL && write_depth );
+ lp_rast_begin( rast,
+ lp_scene_dequeue( rast->full_scenes, TRUE ) );
}
/* Wait for all threads to get here so that threads[1+] don't
@@ -857,25 +737,23 @@ static PIPE_THREAD_ROUTINE( thread_func, init_data )
/* do work */
if (debug)
debug_printf("thread %d doing work\n", task->thread_index);
+
rasterize_scene(task,
- rast->curr_scene,
- rast->curr_scene->write_depth);
+ rast->curr_scene);
/* wait for all threads to finish with this scene */
pipe_barrier_wait( &rast->barrier );
+ /* XXX: shouldn't be necessary:
+ */
if (task->thread_index == 0) {
- /* thread[0]:
- * - release the scene object
- * - unmap the framebuffer surfaces
- */
- release_scene( rast, rast->curr_scene );
lp_rast_end( rast );
}
/* signal done with work */
if (debug)
debug_printf("thread %d done working\n", task->thread_index);
+
pipe_semaphore_signal(&task->work_done);
}
@@ -918,7 +796,7 @@ create_rast_threads(struct lp_rasterizer *rast)
* processing them.
*/
struct lp_rasterizer *
-lp_rast_create( struct pipe_screen *screen, struct lp_scene_queue *empty )
+lp_rast_create( void )
{
struct lp_rasterizer *rast;
unsigned i, cbuf;
@@ -927,9 +805,6 @@ lp_rast_create( struct pipe_screen *screen, struct lp_scene_queue *empty )
if(!rast)
return NULL;
- rast->screen = screen;
-
- rast->empty_scenes = empty;
rast->full_scenes = lp_scene_queue_create();
for (i = 0; i < Elements(rast->tasks); i++) {
@@ -957,8 +832,6 @@ void lp_rast_destroy( struct lp_rasterizer *rast )
{
unsigned i, cbuf;
- util_unreference_framebuffer_state(&rast->state.fb);
-
for (i = 0; i < Elements(rast->tasks); i++) {
for (cbuf = 0; cbuf < PIPE_MAX_COLOR_BUFS; cbuf++ )
align_free(rast->tasks[i].tile.color[cbuf]);
@@ -973,6 +846,12 @@ void lp_rast_destroy( struct lp_rasterizer *rast )
pipe_semaphore_signal(&rast->tasks[i].work_ready);
}
+ /* Wait for threads to terminate before cleaning up per-thread data */
+ for (i = 0; i < rast->num_threads; i++) {
+ pipe_thread_wait(rast->threads[i]);
+ }
+
+ /* Clean up per-thread data */
for (i = 0; i < rast->num_threads; i++) {
pipe_semaphore_destroy(&rast->tasks[i].work_ready);
pipe_semaphore_destroy(&rast->tasks[i].work_done);
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.h b/src/gallium/drivers/llvmpipe/lp_rast.h
index 1ed2700191..dc5fc5fc7d 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.h
+++ b/src/gallium/drivers/llvmpipe/lp_rast.h
@@ -43,10 +43,8 @@
struct lp_rasterizer;
struct lp_scene;
-struct lp_scene_queue;
struct lp_fence;
struct cmd_bin;
-struct pipe_screen;
/** For sub-pixel positioning */
#define FIXED_ORDER 4
@@ -100,6 +98,10 @@ struct lp_rast_shader_inputs {
* Objects of this type are put into the setup_context::data buffer.
*/
struct lp_rast_triangle {
+#ifdef DEBUG
+ float v[3][2];
+#endif
+
/* one-pixel sized trivial accept offsets for each plane */
int ei1;
int ei2;
@@ -129,18 +131,21 @@ struct lp_rast_triangle {
-struct lp_rasterizer *lp_rast_create( struct pipe_screen *screen,
- struct lp_scene_queue *empty );
+struct lp_rasterizer *
+lp_rast_create( void );
-void lp_rast_destroy( struct lp_rasterizer * );
+void
+lp_rast_destroy( struct lp_rasterizer * );
-unsigned lp_rast_get_num_threads( struct lp_rasterizer * );
+unsigned
+lp_rast_get_num_threads( struct lp_rasterizer * );
-void lp_rasterize_scene( struct lp_rasterizer *rast,
- struct lp_scene *scene,
- const struct pipe_framebuffer_state *fb,
- bool write_depth );
+void
+lp_rast_queue_scene( struct lp_rasterizer *rast,
+ struct lp_scene *scene );
+void
+lp_rast_finish( struct lp_rasterizer *rast );
union lp_rast_cmd_arg {
diff --git a/src/gallium/drivers/llvmpipe/lp_rast_priv.h b/src/gallium/drivers/llvmpipe/lp_rast_priv.h
index abc5a9ad89..39bf2c2587 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast_priv.h
+++ b/src/gallium/drivers/llvmpipe/lp_rast_priv.h
@@ -38,8 +38,6 @@
#define MAX_THREADS 8 /* XXX probably temporary here */
-struct pipe_transfer;
-struct pipe_screen;
struct lp_rasterizer;
@@ -82,20 +80,26 @@ struct lp_rasterizer_task
*/
struct lp_rasterizer
{
- boolean clipped_tile;
- boolean check_for_clipped_tiles;
boolean exit_flag;
/* Framebuffer stuff
*/
- struct pipe_screen *screen;
- struct pipe_transfer *cbuf_transfer[PIPE_MAX_COLOR_BUFS];
- struct pipe_transfer *zsbuf_transfer;
- void *cbuf_map[PIPE_MAX_COLOR_BUFS];
- uint8_t *zsbuf_map;
+ struct {
+ void *map;
+ unsigned stride;
+ unsigned width;
+ unsigned height;
+ enum pipe_format format;
+ } cbuf[PIPE_MAX_COLOR_BUFS];
+
+ struct {
+ uint8_t *map;
+ unsigned stride;
+ unsigned blocksize;
+ } zsbuf;
struct {
- struct pipe_framebuffer_state fb;
+ unsigned nr_cbufs;
boolean write_color;
boolean write_zstencil;
unsigned clear_color;
@@ -105,7 +109,14 @@ struct lp_rasterizer
/** The incoming queue of scenes ready to rasterize */
struct lp_scene_queue *full_scenes;
- /** The outgoing queue of processed scenes to return to setup modulee */
+
+ /**
+ * The outgoing queue of processed scenes to return to setup module
+ *
+ * XXX: while scenes are per-context but the rasterizer is
+ * (potentially) shared, these empty scenes should be returned to
+ * the context which created them rather than retained here.
+ */
struct lp_scene_queue *empty_scenes;
/** The scene currently being rasterized by the threads */
@@ -137,17 +148,18 @@ lp_rast_depth_pointer( struct lp_rasterizer *rast,
unsigned x, unsigned y )
{
void * depth;
+
assert((x % TILE_VECTOR_WIDTH) == 0);
assert((y % TILE_VECTOR_HEIGHT) == 0);
- if(!rast->zsbuf_map)
+
+ if (!rast->zsbuf.map)
return NULL;
- assert(rast->zsbuf_transfer);
- depth = rast->zsbuf_map +
- y*rast->zsbuf_transfer->stride +
- TILE_VECTOR_HEIGHT*x*util_format_get_blocksize(rast->zsbuf_transfer->texture->format);
-#ifdef DEBUG
+
+ depth = (rast->zsbuf.map +
+ rast->zsbuf.stride * y +
+ rast->zsbuf.blocksize * x * TILE_VECTOR_HEIGHT);
+
assert(lp_check_alignment(depth, 16));
-#endif
return depth;
}
@@ -175,7 +187,7 @@ lp_rast_shade_quads_all( struct lp_rasterizer_task *task,
block_offset = (iy / 4) * (16 * 16) + (ix / 4) * 16;
/* color buffer */
- for (i = 0; i < rast->state.fb.nr_cbufs; i++)
+ for (i = 0; i < rast->state.nr_cbufs; i++)
color[i] = tile->color[i] + 4 * block_offset;
depth = lp_rast_depth_pointer(rast, x, y);
diff --git a/src/gallium/drivers/llvmpipe/lp_scene.c b/src/gallium/drivers/llvmpipe/lp_scene.c
index cba0e21298..72492c0f0c 100644
--- a/src/gallium/drivers/llvmpipe/lp_scene.c
+++ b/src/gallium/drivers/llvmpipe/lp_scene.c
@@ -29,44 +29,67 @@
#include "util/u_memory.h"
#include "util/u_inlines.h"
#include "util/u_simple_list.h"
+#include "util/u_surface.h"
#include "lp_scene.h"
+#include "lp_scene_queue.h"
+#include "lp_debug.h"
struct lp_scene *
-lp_scene_create(void)
+lp_scene_create( struct pipe_context *pipe,
+ struct lp_scene_queue *queue )
{
+ unsigned i, j;
struct lp_scene *scene = CALLOC_STRUCT(lp_scene);
- if (scene)
- lp_scene_init(scene);
+ if (!scene)
+ return NULL;
+
+ scene->pipe = pipe;
+ scene->empty_queue = queue;
+
+ for (i = 0; i < TILES_X; i++) {
+ for (j = 0; j < TILES_Y; j++) {
+ struct cmd_bin *bin = lp_scene_get_bin(scene, i, j);
+ bin->commands.head = bin->commands.tail = CALLOC_STRUCT(cmd_block);
+ }
+ }
+
+ scene->data.head =
+ scene->data.tail = CALLOC_STRUCT(data_block);
+
+ make_empty_list(&scene->textures);
+
+ pipe_mutex_init(scene->mutex);
+
return scene;
}
+/**
+ * Free all data associated with the given scene, and free(scene).
+ */
void
lp_scene_destroy(struct lp_scene *scene)
{
- lp_scene_reset(scene);
- lp_scene_free_bin_data(scene);
- FREE(scene);
-}
+ unsigned i, j;
+ lp_scene_reset(scene);
-void
-lp_scene_init(struct lp_scene *scene)
-{
- unsigned i, j;
for (i = 0; i < TILES_X; i++)
for (j = 0; j < TILES_Y; j++) {
struct cmd_bin *bin = lp_scene_get_bin(scene, i, j);
- bin->commands.head = bin->commands.tail = CALLOC_STRUCT(cmd_block);
+ assert(bin->commands.head == bin->commands.tail);
+ FREE(bin->commands.head);
+ bin->commands.head = NULL;
+ bin->commands.tail = NULL;
}
- scene->data.head =
- scene->data.tail = CALLOC_STRUCT(data_block);
+ FREE(scene->data.head);
+ scene->data.head = NULL;
- make_empty_list(&scene->textures);
+ pipe_mutex_destroy(scene->mutex);
- pipe_mutex_init(scene->mutex);
+ FREE(scene);
}
@@ -92,6 +115,9 @@ lp_scene_is_empty(struct lp_scene *scene )
}
+/* Free data for one particular bin. May be called from the
+ * rasterizer thread(s).
+ */
void
lp_scene_bin_reset(struct lp_scene *scene, unsigned x, unsigned y)
{
@@ -115,7 +141,8 @@ lp_scene_bin_reset(struct lp_scene *scene, unsigned x, unsigned y)
/**
- * Set scene to empty state.
+ * Free all the temporary data in a scene. May be called from the
+ * rasterizer thread(s).
*/
void
lp_scene_reset(struct lp_scene *scene )
@@ -162,40 +189,8 @@ lp_scene_reset(struct lp_scene *scene )
}
-/**
- * Free all data associated with the given bin, but don't free(scene).
- */
-void
-lp_scene_free_bin_data(struct lp_scene *scene)
-{
- unsigned i, j;
-
- for (i = 0; i < TILES_X; i++)
- for (j = 0; j < TILES_Y; j++) {
- struct cmd_bin *bin = lp_scene_get_bin(scene, i, j);
- /* lp_reset_scene() should have been already called */
- assert(bin->commands.head == bin->commands.tail);
- FREE(bin->commands.head);
- bin->commands.head = NULL;
- bin->commands.tail = NULL;
- }
-
- FREE(scene->data.head);
- scene->data.head = NULL;
-
- pipe_mutex_destroy(scene->mutex);
-}
-
-void
-lp_scene_set_framebuffer_size( struct lp_scene *scene,
- unsigned width, unsigned height )
-{
- assert(lp_scene_is_empty(scene));
- scene->tiles_x = align(width, TILE_SIZE) / TILE_SIZE;
- scene->tiles_y = align(height, TILE_SIZE) / TILE_SIZE;
-}
void
@@ -393,3 +388,158 @@ end:
pipe_mutex_unlock(scene->mutex);
return bin;
}
+
+
+/**
+ * Prepare this scene for the rasterizer.
+ * Map the framebuffer surfaces. Initialize the 'rast' state.
+ */
+static boolean
+lp_scene_map_buffers( struct lp_scene *scene )
+{
+ struct pipe_screen *screen = scene->pipe->screen;
+ struct pipe_surface *cbuf, *zsbuf;
+ int i;
+
+ LP_DBG(DEBUG_RAST, "%s\n", __FUNCTION__);
+
+
+ /* Map all color buffers
+ */
+ for (i = 0; i < scene->fb.nr_cbufs; i++) {
+ cbuf = scene->fb.cbufs[i];
+ if (cbuf) {
+ scene->cbuf_transfer[i] = screen->get_tex_transfer(screen,
+ cbuf->texture,
+ cbuf->face,
+ cbuf->level,
+ cbuf->zslice,
+ PIPE_TRANSFER_READ_WRITE,
+ 0, 0,
+ cbuf->width,
+ cbuf->height);
+ if (!scene->cbuf_transfer[i])
+ goto fail;
+
+ scene->cbuf_map[i] = screen->transfer_map(screen,
+ scene->cbuf_transfer[i]);
+ if (!scene->cbuf_map[i])
+ goto fail;
+ }
+ }
+
+ /* Map the zsbuffer
+ */
+ zsbuf = scene->fb.zsbuf;
+ if (zsbuf) {
+ scene->zsbuf_transfer = screen->get_tex_transfer(screen,
+ zsbuf->texture,
+ zsbuf->face,
+ zsbuf->level,
+ zsbuf->zslice,
+ PIPE_TRANSFER_READ_WRITE,
+ 0, 0,
+ zsbuf->width,
+ zsbuf->height);
+ if (!scene->zsbuf_transfer)
+ goto fail;
+
+ scene->zsbuf_map = screen->transfer_map(screen,
+ scene->zsbuf_transfer);
+ if (!scene->zsbuf_map)
+ goto fail;
+ }
+
+ return TRUE;
+
+fail:
+ /* Unmap and release transfers?
+ */
+ return FALSE;
+}
+
+
+
+/**
+ * Called after rasterizer as finished rasterizing a scene.
+ *
+ * We want to call this from the pipe_context's current thread to
+ * avoid having to have mutexes on the transfer functions.
+ */
+static void
+lp_scene_unmap_buffers( struct lp_scene *scene )
+{
+ struct pipe_screen *screen = scene->pipe->screen;
+ unsigned i;
+
+ for (i = 0; i < scene->fb.nr_cbufs; i++) {
+ if (scene->cbuf_map[i])
+ screen->transfer_unmap(screen, scene->cbuf_transfer[i]);
+
+ if (scene->cbuf_transfer[i])
+ screen->tex_transfer_destroy(scene->cbuf_transfer[i]);
+
+ scene->cbuf_transfer[i] = NULL;
+ scene->cbuf_map[i] = NULL;
+ }
+
+ if (scene->zsbuf_map)
+ screen->transfer_unmap(screen, scene->zsbuf_transfer);
+
+ if (scene->zsbuf_transfer)
+ screen->tex_transfer_destroy(scene->zsbuf_transfer);
+
+ scene->zsbuf_transfer = NULL;
+ scene->zsbuf_map = NULL;
+
+ util_unreference_framebuffer_state( &scene->fb );
+}
+
+
+void lp_scene_begin_binning( struct lp_scene *scene,
+ struct pipe_framebuffer_state *fb )
+{
+ assert(lp_scene_is_empty(scene));
+
+ util_copy_framebuffer_state(&scene->fb, fb);
+
+ scene->tiles_x = align(fb->width, TILE_SIZE) / TILE_SIZE;
+ scene->tiles_y = align(fb->height, TILE_SIZE) / TILE_SIZE;
+}
+
+
+void lp_scene_rasterize( struct lp_scene *scene,
+ struct lp_rasterizer *rast,
+ boolean write_depth )
+{
+ if (0) {
+ unsigned x, y;
+ debug_printf("rasterize scene:\n");
+ debug_printf(" data size: %u\n", lp_scene_data_size(scene));
+ for (y = 0; y < scene->tiles_y; y++) {
+ for (x = 0; x < scene->tiles_x; x++) {
+ debug_printf(" bin %u, %u size: %u\n", x, y,
+ lp_scene_bin_size(scene, x, y));
+ }
+ }
+ }
+
+
+ scene->write_depth = (scene->fb.zsbuf != NULL &&
+ write_depth);
+
+ lp_scene_map_buffers( scene );
+
+ /* Enqueue the scene for rasterization, then immediately wait for
+ * it to finish.
+ */
+ lp_rast_queue_scene( rast, scene );
+
+ /* Currently just wait for the rasterizer to finish. Some
+ * threading interactions need to be worked out, particularly once
+ * transfers become per-context:
+ */
+ lp_rast_finish( rast );
+ lp_scene_unmap_buffers( scene );
+ lp_scene_enqueue( scene->empty_queue, scene );
+}
diff --git a/src/gallium/drivers/llvmpipe/lp_scene.h b/src/gallium/drivers/llvmpipe/lp_scene.h
index 8d725cd437..739ac22908 100644
--- a/src/gallium/drivers/llvmpipe/lp_scene.h
+++ b/src/gallium/drivers/llvmpipe/lp_scene.h
@@ -39,6 +39,7 @@
#include "lp_tile_soa.h"
#include "lp_rast.h"
+struct lp_scene_queue;
/* We're limited to 2K by 2K for 32bit fixed point rasterization.
* Will need a 64-bit version for larger framebuffers.
@@ -112,8 +113,14 @@ struct texture_ref {
* scenes:
*/
struct lp_scene {
- struct cmd_bin tile[TILES_X][TILES_Y];
- struct data_block_list data;
+ struct pipe_context *pipe;
+ struct pipe_transfer *cbuf_transfer[PIPE_MAX_COLOR_BUFS];
+ struct pipe_transfer *zsbuf_transfer;
+
+ /* Scene's buffers are mapped at the time the scene is enqueued:
+ */
+ void *cbuf_map[PIPE_MAX_COLOR_BUFS];
+ uint8_t *zsbuf_map;
/** the framebuffer to render the scene into */
struct pipe_framebuffer_state fb;
@@ -131,25 +138,28 @@ struct lp_scene {
int curr_x, curr_y; /**< for iterating over bins */
pipe_mutex mutex;
+
+ /* Where to place this scene once it has been rasterized:
+ */
+ struct lp_scene_queue *empty_queue;
+
+ struct cmd_bin tile[TILES_X][TILES_Y];
+ struct data_block_list data;
};
-struct lp_scene *lp_scene_create(void);
+struct lp_scene *lp_scene_create(struct pipe_context *pipe,
+ struct lp_scene_queue *empty_queue);
void lp_scene_destroy(struct lp_scene *scene);
-void lp_scene_init(struct lp_scene *scene);
boolean lp_scene_is_empty(struct lp_scene *scene );
void lp_scene_reset(struct lp_scene *scene );
-void lp_scene_free_bin_data(struct lp_scene *scene);
-
-void lp_scene_set_framebuffer_size( struct lp_scene *scene,
- unsigned width, unsigned height );
void lp_bin_new_data_block( struct data_block_list *list );
@@ -296,5 +306,13 @@ lp_scene_bin_iter_begin( struct lp_scene *scene );
struct cmd_bin *
lp_scene_bin_iter_next( struct lp_scene *scene, int *bin_x, int *bin_y );
+void
+lp_scene_rasterize( struct lp_scene *scene,
+ struct lp_rasterizer *rast,
+ boolean write_depth );
+
+void
+lp_scene_begin_binning( struct lp_scene *scene,
+ struct pipe_framebuffer_state *fb );
#endif /* LP_BIN_H */
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c
index 3aec9de373..b0713c3b71 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup.c
@@ -66,11 +66,8 @@ lp_setup_get_current_scene(struct setup_context *setup)
assert(lp_scene_is_empty(setup->scene));
- if(0)lp_scene_reset( setup->scene ); /* XXX temporary? */
-
- lp_scene_set_framebuffer_size(setup->scene,
- setup->fb.width,
- setup->fb.height);
+ lp_scene_begin_binning(setup->scene,
+ &setup->fb );
}
return setup->scene;
}
@@ -135,13 +132,12 @@ static void reset_context( struct setup_context *setup )
/** Rasterize all scene's bins */
static void
lp_setup_rasterize_scene( struct setup_context *setup,
- boolean write_depth )
+ boolean write_depth )
{
struct lp_scene *scene = lp_setup_get_current_scene(setup);
- lp_rasterize_scene(setup->rast,
- scene,
- &setup->fb,
+ lp_scene_rasterize(scene,
+ setup->rast,
write_depth);
reset_context( setup );
@@ -246,19 +242,16 @@ void
lp_setup_bind_framebuffer( struct setup_context *setup,
const struct pipe_framebuffer_state *fb )
{
- struct lp_scene *scene = lp_setup_get_current_scene(setup);
-
LP_DBG(DEBUG_SETUP, "%s\n", __FUNCTION__);
+ /* Flush any old scene.
+ */
set_scene_state( setup, SETUP_FLUSHED );
- /* re-get scene pointer, may have a new scene after flushing */
- (void) scene;
- scene = lp_setup_get_current_scene(setup);
-
+ /* Set new state. This will be picked up later when we next need a
+ * scene.
+ */
util_copy_framebuffer_state(&setup->fb, fb);
-
- lp_scene_set_framebuffer_size(scene, setup->fb.width, setup->fb.height);
}
@@ -476,6 +469,8 @@ lp_setup_set_sampler_textures( struct setup_context *setup,
jit_tex = &setup->fs.current.jit_context.textures[i];
jit_tex->width = tex->width0;
jit_tex->height = tex->height0;
+ jit_tex->depth = tex->depth0;
+ jit_tex->last_level = tex->last_level;
jit_tex->stride = lp_tex->stride[0];
if(!lp_tex->dt) {
jit_tex->data = lp_tex->data;
@@ -683,7 +678,7 @@ lp_setup_destroy( struct setup_context *setup )
* it.
*/
struct setup_context *
-lp_setup_create( struct pipe_screen *screen,
+lp_setup_create( struct pipe_context *pipe,
struct draw_context *draw )
{
unsigned i;
@@ -698,7 +693,9 @@ lp_setup_create( struct pipe_screen *screen,
if (!setup->empty_scenes)
goto fail;
- setup->rast = lp_rast_create( screen, setup->empty_scenes );
+ /* XXX: move this to the screen and share between contexts:
+ */
+ setup->rast = lp_rast_create();
if (!setup->rast)
goto fail;
@@ -711,7 +708,8 @@ lp_setup_create( struct pipe_screen *screen,
/* create some empty scenes */
for (i = 0; i < MAX_SCENES; i++) {
- setup->scenes[i] = lp_scene_create();
+ setup->scenes[i] = lp_scene_create( pipe, setup->empty_scenes );
+
lp_scene_enqueue(setup->empty_scenes, setup->scenes[i]);
}
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.h b/src/gallium/drivers/llvmpipe/lp_setup.h
index 0e155a7dc3..17c112b528 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup.h
+++ b/src/gallium/drivers/llvmpipe/lp_setup.h
@@ -62,7 +62,7 @@ struct lp_fragment_shader;
struct lp_jit_context;
struct setup_context *
-lp_setup_create( struct pipe_screen *screen,
+lp_setup_create( struct pipe_context *pipe,
struct draw_context *draw );
void
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
index a8bf540803..e75412ac9a 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
@@ -297,6 +297,15 @@ do_triangle_ccw(struct setup_context *setup,
tri = alloc_triangle(scene, setup->fs.nr_inputs, &tri_bytes);
+#ifdef DEBUG
+ tri->v[0][0] = v1[0][0];
+ tri->v[1][0] = v2[0][0];
+ tri->v[2][0] = v3[0][0];
+ tri->v[0][1] = v1[0][1];
+ tri->v[1][1] = v2[0][1];
+ tri->v[2][1] = v3[0][1];
+#endif
+
tri->dx12 = x1 - x2;
tri->dx23 = x2 - x3;
tri->dx31 = x3 - x1;
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index 90dae3f910..c4b79dd415 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -974,6 +974,13 @@ llvmpipe_delete_fs_state(struct pipe_context *pipe, void *fs)
assert(fs != llvmpipe->fs);
(void) llvmpipe;
+ /*
+ * XXX: we need to flush the context until we have some sort of reference
+ * counting in fragment shaders as they may still be binned
+ */
+ draw_flush(llvmpipe->draw);
+ lp_setup_flush(llvmpipe->setup, 0);
+
variant = shader->variants;
while(variant) {
struct lp_fragment_shader_variant *next = variant->next;
diff --git a/src/gallium/drivers/llvmpipe/lp_test_format.c b/src/gallium/drivers/llvmpipe/lp_test_format.c
index 48828bd0a0..d05157991b 100644
--- a/src/gallium/drivers/llvmpipe/lp_test_format.c
+++ b/src/gallium/drivers/llvmpipe/lp_test_format.c
@@ -52,25 +52,25 @@ struct pixel_test_case
struct pixel_test_case test_cases[] =
{
- {PIPE_FORMAT_R5G6B5_UNORM, 0x0000, {0.0, 0.0, 0.0, 1.0}},
- {PIPE_FORMAT_R5G6B5_UNORM, 0x001f, {0.0, 0.0, 1.0, 1.0}},
- {PIPE_FORMAT_R5G6B5_UNORM, 0x07e0, {0.0, 1.0, 0.0, 1.0}},
- {PIPE_FORMAT_R5G6B5_UNORM, 0xf800, {1.0, 0.0, 0.0, 1.0}},
- {PIPE_FORMAT_R5G6B5_UNORM, 0xffff, {1.0, 1.0, 1.0, 1.0}},
-
- {PIPE_FORMAT_A1R5G5B5_UNORM, 0x0000, {0.0, 0.0, 0.0, 0.0}},
- {PIPE_FORMAT_A1R5G5B5_UNORM, 0x001f, {0.0, 0.0, 1.0, 0.0}},
- {PIPE_FORMAT_A1R5G5B5_UNORM, 0x03e0, {0.0, 1.0, 0.0, 0.0}},
- {PIPE_FORMAT_A1R5G5B5_UNORM, 0x7c00, {1.0, 0.0, 0.0, 0.0}},
- {PIPE_FORMAT_A1R5G5B5_UNORM, 0x8000, {0.0, 0.0, 0.0, 1.0}},
- {PIPE_FORMAT_A1R5G5B5_UNORM, 0xffff, {1.0, 1.0, 1.0, 1.0}},
+ {PIPE_FORMAT_B5G6R5_UNORM, 0x0000, {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_B5G6R5_UNORM, 0x001f, {0.0, 0.0, 1.0, 1.0}},
+ {PIPE_FORMAT_B5G6R5_UNORM, 0x07e0, {0.0, 1.0, 0.0, 1.0}},
+ {PIPE_FORMAT_B5G6R5_UNORM, 0xf800, {1.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_B5G6R5_UNORM, 0xffff, {1.0, 1.0, 1.0, 1.0}},
+
+ {PIPE_FORMAT_B5G5R5A1_UNORM, 0x0000, {0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_B5G5R5A1_UNORM, 0x001f, {0.0, 0.0, 1.0, 0.0}},
+ {PIPE_FORMAT_B5G5R5A1_UNORM, 0x03e0, {0.0, 1.0, 0.0, 0.0}},
+ {PIPE_FORMAT_B5G5R5A1_UNORM, 0x7c00, {1.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_B5G5R5A1_UNORM, 0x8000, {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_B5G5R5A1_UNORM, 0xffff, {1.0, 1.0, 1.0, 1.0}},
- {PIPE_FORMAT_A8R8G8B8_UNORM, 0x00000000, {0.0, 0.0, 0.0, 0.0}},
- {PIPE_FORMAT_A8R8G8B8_UNORM, 0x000000ff, {0.0, 0.0, 1.0, 0.0}},
- {PIPE_FORMAT_A8R8G8B8_UNORM, 0x0000ff00, {0.0, 1.0, 0.0, 0.0}},
- {PIPE_FORMAT_A8R8G8B8_UNORM, 0x00ff0000, {1.0, 0.0, 0.0, 0.0}},
- {PIPE_FORMAT_A8R8G8B8_UNORM, 0xff000000, {0.0, 0.0, 0.0, 1.0}},
- {PIPE_FORMAT_A8R8G8B8_UNORM, 0xffffffff, {1.0, 1.0, 1.0, 1.0}},
+ {PIPE_FORMAT_B8G8R8A8_UNORM, 0x00000000, {0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_B8G8R8A8_UNORM, 0x000000ff, {0.0, 0.0, 1.0, 0.0}},
+ {PIPE_FORMAT_B8G8R8A8_UNORM, 0x0000ff00, {0.0, 1.0, 0.0, 0.0}},
+ {PIPE_FORMAT_B8G8R8A8_UNORM, 0x00ff0000, {1.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_B8G8R8A8_UNORM, 0xff000000, {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_B8G8R8A8_UNORM, 0xffffffff, {1.0, 1.0, 1.0, 1.0}},
#if 0
{PIPE_FORMAT_R8G8B8A8_UNORM, 0x00000000, {0.0, 0.0, 0.0, 0.0}},
@@ -81,12 +81,12 @@ struct pixel_test_case test_cases[] =
{PIPE_FORMAT_R8G8B8A8_UNORM, 0xffffffff, {1.0, 1.0, 1.0, 1.0}},
#endif
- {PIPE_FORMAT_B8G8R8A8_UNORM, 0x00000000, {0.0, 0.0, 0.0, 0.0}},
- {PIPE_FORMAT_B8G8R8A8_UNORM, 0x000000ff, {0.0, 0.0, 0.0, 1.0}},
- {PIPE_FORMAT_B8G8R8A8_UNORM, 0x0000ff00, {1.0, 0.0, 0.0, 0.0}},
- {PIPE_FORMAT_B8G8R8A8_UNORM, 0x00ff0000, {0.0, 1.0, 0.0, 0.0}},
- {PIPE_FORMAT_B8G8R8A8_UNORM, 0xff000000, {0.0, 0.0, 1.0, 0.0}},
- {PIPE_FORMAT_B8G8R8A8_UNORM, 0xffffffff, {1.0, 1.0, 1.0, 1.0}},
+ {PIPE_FORMAT_A8R8G8B8_UNORM, 0x00000000, {0.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_A8R8G8B8_UNORM, 0x000000ff, {0.0, 0.0, 0.0, 1.0}},
+ {PIPE_FORMAT_A8R8G8B8_UNORM, 0x0000ff00, {1.0, 0.0, 0.0, 0.0}},
+ {PIPE_FORMAT_A8R8G8B8_UNORM, 0x00ff0000, {0.0, 1.0, 0.0, 0.0}},
+ {PIPE_FORMAT_A8R8G8B8_UNORM, 0xff000000, {0.0, 0.0, 1.0, 0.0}},
+ {PIPE_FORMAT_A8R8G8B8_UNORM, 0xffffffff, {1.0, 1.0, 1.0, 1.0}},
};
diff --git a/src/gallium/drivers/llvmpipe/lp_test_main.c b/src/gallium/drivers/llvmpipe/lp_test_main.c
index 14ff00469b..f9dce8b9c2 100644
--- a/src/gallium/drivers/llvmpipe/lp_test_main.c
+++ b/src/gallium/drivers/llvmpipe/lp_test_main.c
@@ -37,7 +37,7 @@
#include "util/u_cpu_detect.h"
#include "gallivm/lp_bld_const.h"
-#include "gallivm/lp_bld_misc.h"
+#include "gallivm/lp_bld_init.h"
#include "lp_test.h"
@@ -380,8 +380,7 @@ int main(int argc, char **argv)
n = atoi(argv[i]);
}
- LLVMLinkInJIT();
- LLVMInitializeNativeTarget();
+ lp_build_init();
util_cpu_detect();
diff --git a/src/gallium/drivers/llvmpipe/lp_tex_sample_llvm.c b/src/gallium/drivers/llvmpipe/lp_tex_sample_llvm.c
index 2533275dc1..632462460a 100644
--- a/src/gallium/drivers/llvmpipe/lp_tex_sample_llvm.c
+++ b/src/gallium/drivers/llvmpipe/lp_tex_sample_llvm.c
@@ -132,10 +132,12 @@ lp_llvm_texture_member(struct lp_sampler_dynamic_state *base,
}
-LP_LLVM_TEXTURE_MEMBER(width, LP_JIT_TEXTURE_WIDTH)
-LP_LLVM_TEXTURE_MEMBER(height, LP_JIT_TEXTURE_HEIGHT)
-LP_LLVM_TEXTURE_MEMBER(stride, LP_JIT_TEXTURE_STRIDE)
-LP_LLVM_TEXTURE_MEMBER(data_ptr, LP_JIT_TEXTURE_DATA)
+LP_LLVM_TEXTURE_MEMBER(width, LP_JIT_TEXTURE_WIDTH)
+LP_LLVM_TEXTURE_MEMBER(height, LP_JIT_TEXTURE_HEIGHT)
+LP_LLVM_TEXTURE_MEMBER(depth, LP_JIT_TEXTURE_DEPTH)
+LP_LLVM_TEXTURE_MEMBER(last_level, LP_JIT_TEXTURE_LAST_LEVEL)
+LP_LLVM_TEXTURE_MEMBER(stride, LP_JIT_TEXTURE_STRIDE)
+LP_LLVM_TEXTURE_MEMBER(data_ptr, LP_JIT_TEXTURE_DATA)
static void
@@ -145,6 +147,10 @@ lp_llvm_sampler_soa_destroy(struct lp_build_sampler_soa *sampler)
}
+/**
+ * Fetch filtered values from texture.
+ * The 'texel' parameter returns four vectors corresponding to R, G, B, A.
+ */
static void
lp_llvm_sampler_soa_emit_fetch_texel(struct lp_build_sampler_soa *base,
LLVMBuilderRef builder,
@@ -185,6 +191,8 @@ lp_llvm_sampler_soa_create(const struct lp_sampler_static_state *static_state,
sampler->base.emit_fetch_texel = lp_llvm_sampler_soa_emit_fetch_texel;
sampler->dynamic_state.base.width = lp_llvm_texture_width;
sampler->dynamic_state.base.height = lp_llvm_texture_height;
+ sampler->dynamic_state.base.depth = lp_llvm_texture_depth;
+ sampler->dynamic_state.base.last_level = lp_llvm_texture_last_level;
sampler->dynamic_state.base.stride = lp_llvm_texture_stride;
sampler->dynamic_state.base.data_ptr = lp_llvm_texture_data_ptr;
sampler->dynamic_state.static_state = static_state;
diff --git a/src/gallium/drivers/nouveau/nv04_surface_2d.c b/src/gallium/drivers/nouveau/nv04_surface_2d.c
index 42c2ca932d..b074547c4d 100644
--- a/src/gallium/drivers/nouveau/nv04_surface_2d.c
+++ b/src/gallium/drivers/nouveau/nv04_surface_2d.c
@@ -18,15 +18,15 @@ nv04_surface_format(enum pipe_format format)
case PIPE_FORMAT_I8_UNORM:
return NV04_CONTEXT_SURFACES_2D_FORMAT_Y8;
case PIPE_FORMAT_R16_SNORM:
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
case PIPE_FORMAT_Z16_UNORM:
- case PIPE_FORMAT_A8L8_UNORM:
+ case PIPE_FORMAT_L8A8_UNORM:
return NV04_CONTEXT_SURFACES_2D_FORMAT_R5G6B5;
- case PIPE_FORMAT_X8R8G8B8_UNORM:
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
return NV04_CONTEXT_SURFACES_2D_FORMAT_A8R8G8B8;
- case PIPE_FORMAT_Z24S8_UNORM:
- case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
return NV04_CONTEXT_SURFACES_2D_FORMAT_Y32;
default:
return -1;
@@ -39,14 +39,14 @@ nv04_rect_format(enum pipe_format format)
switch (format) {
case PIPE_FORMAT_A8_UNORM:
return NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT_A8R8G8B8;
- case PIPE_FORMAT_R5G6B5_UNORM:
- case PIPE_FORMAT_A8L8_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
+ case PIPE_FORMAT_L8A8_UNORM:
case PIPE_FORMAT_Z16_UNORM:
return NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT_A16R5G6B5;
- case PIPE_FORMAT_X8R8G8B8_UNORM:
- case PIPE_FORMAT_A8R8G8B8_UNORM:
- case PIPE_FORMAT_Z24S8_UNORM:
- case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
return NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT_A8R8G8B8;
default:
return -1;
@@ -61,15 +61,15 @@ nv04_scaled_image_format(enum pipe_format format)
case PIPE_FORMAT_L8_UNORM:
case PIPE_FORMAT_I8_UNORM:
return NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_Y8;
- case PIPE_FORMAT_A1R5G5B5_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
return NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_A1R5G5B5;
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
return NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_A8R8G8B8;
- case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
return NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_X8R8G8B8;
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
case PIPE_FORMAT_R16_SNORM:
- case PIPE_FORMAT_A8L8_UNORM:
+ case PIPE_FORMAT_L8A8_UNORM:
return NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_R5G6B5;
default:
return -1;
diff --git a/src/gallium/drivers/nv30/nv30_context.h b/src/gallium/drivers/nv30/nv30_context.h
index ca3d6aca7f..ea259aadf3 100644
--- a/src/gallium/drivers/nv30/nv30_context.h
+++ b/src/gallium/drivers/nv30/nv30_context.h
@@ -101,7 +101,6 @@ struct nv30_blend_state {
struct nv30_state {
unsigned scissor_enabled;
unsigned stipple_enabled;
- unsigned viewport_bypass;
unsigned fp_samplers;
uint64_t dirty;
diff --git a/src/gallium/drivers/nv30/nv30_fragtex.c b/src/gallium/drivers/nv30/nv30_fragtex.c
index 9f4a104f67..f7d98f3f20 100644
--- a/src/gallium/drivers/nv30/nv30_fragtex.c
+++ b/src/gallium/drivers/nv30/nv30_fragtex.c
@@ -23,17 +23,17 @@ struct nv30_texture_format {
static struct nv30_texture_format
nv30_texture_formats[] = {
- _(X8R8G8B8_UNORM, A8R8G8B8, S1, S1, S1, ONE, X, Y, Z, W),
- _(A8R8G8B8_UNORM, A8R8G8B8, S1, S1, S1, S1, X, Y, Z, W),
- _(A1R5G5B5_UNORM, A1R5G5B5, S1, S1, S1, S1, X, Y, Z, W),
- _(A4R4G4B4_UNORM, A4R4G4B4, S1, S1, S1, S1, X, Y, Z, W),
- _(R5G6B5_UNORM , R5G6B5 , S1, S1, S1, ONE, X, Y, Z, W),
+ _(B8G8R8X8_UNORM, A8R8G8B8, S1, S1, S1, ONE, X, Y, Z, W),
+ _(B8G8R8A8_UNORM, A8R8G8B8, S1, S1, S1, S1, X, Y, Z, W),
+ _(B5G5R5A1_UNORM, A1R5G5B5, S1, S1, S1, S1, X, Y, Z, W),
+ _(B4G4R4A4_UNORM, A4R4G4B4, S1, S1, S1, S1, X, Y, Z, W),
+ _(B5G6R5_UNORM , R5G6B5 , S1, S1, S1, ONE, X, Y, Z, W),
_(L8_UNORM , L8 , S1, S1, S1, ONE, X, X, X, X),
_(A8_UNORM , L8 , ZERO, ZERO, ZERO, S1, X, X, X, X),
_(I8_UNORM , L8 , S1, S1, S1, S1, X, X, X, X),
- _(A8L8_UNORM , A8L8 , S1, S1, S1, S1, X, X, X, Y),
+ _(L8A8_UNORM , A8L8 , S1, S1, S1, S1, X, X, X, Y),
_(Z16_UNORM , R5G6B5 , S1, S1, S1, ONE, X, X, X, X),
- _(Z24S8_UNORM , A8R8G8B8, S1, S1, S1, ONE, X, X, X, X),
+ _(S8Z24_UNORM , A8R8G8B8, S1, S1, S1, ONE, X, X, X, X),
_(DXT1_RGB , DXT1 , S1, S1, S1, ONE, X, Y, Z, W),
_(DXT1_RGBA , DXT1 , S1, S1, S1, S1, X, Y, Z, W),
_(DXT3_RGBA , DXT3 , S1, S1, S1, S1, X, Y, Z, W),
diff --git a/src/gallium/drivers/nv30/nv30_miptree.c b/src/gallium/drivers/nv30/nv30_miptree.c
index d8a9d3f093..cb756cf6e6 100644
--- a/src/gallium/drivers/nv30/nv30_miptree.c
+++ b/src/gallium/drivers/nv30/nv30_miptree.c
@@ -88,11 +88,11 @@ nv30_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *pt)
else {
switch (pt->format) {
/* TODO: Figure out which formats can be swizzled */
- case PIPE_FORMAT_A8R8G8B8_UNORM:
- case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
case PIPE_FORMAT_R16_SNORM:
- case PIPE_FORMAT_R5G6B5_UNORM:
- case PIPE_FORMAT_A8L8_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
+ case PIPE_FORMAT_L8A8_UNORM:
case PIPE_FORMAT_A8_UNORM:
case PIPE_FORMAT_L8_UNORM:
case PIPE_FORMAT_I8_UNORM:
diff --git a/src/gallium/drivers/nv30/nv30_screen.c b/src/gallium/drivers/nv30/nv30_screen.c
index aef37d303d..85433d2095 100644
--- a/src/gallium/drivers/nv30/nv30_screen.c
+++ b/src/gallium/drivers/nv30/nv30_screen.c
@@ -112,8 +112,8 @@ nv30_screen_surface_format_supported(struct pipe_screen *pscreen,
if (tex_usage & PIPE_TEXTURE_USAGE_RENDER_TARGET) {
switch (format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
return TRUE;
default:
break;
@@ -121,12 +121,12 @@ nv30_screen_surface_format_supported(struct pipe_screen *pscreen,
} else
if (tex_usage & PIPE_TEXTURE_USAGE_DEPTH_STENCIL) {
switch (format) {
- case PIPE_FORMAT_Z24S8_UNORM:
- case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
return TRUE;
case PIPE_FORMAT_Z16_UNORM:
if (front) {
- return (front->format == PIPE_FORMAT_R5G6B5_UNORM);
+ return (front->format == PIPE_FORMAT_B5G6R5_UNORM);
}
return TRUE;
default:
@@ -134,16 +134,16 @@ nv30_screen_surface_format_supported(struct pipe_screen *pscreen,
}
} else {
switch (format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
- case PIPE_FORMAT_A1R5G5B5_UNORM:
- case PIPE_FORMAT_A4R4G4B4_UNORM:
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
case PIPE_FORMAT_L8_UNORM:
case PIPE_FORMAT_A8_UNORM:
case PIPE_FORMAT_I8_UNORM:
- case PIPE_FORMAT_A8L8_UNORM:
+ case PIPE_FORMAT_L8A8_UNORM:
case PIPE_FORMAT_Z16_UNORM:
- case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
return TRUE;
default:
break;
diff --git a/src/gallium/drivers/nv30/nv30_state_fb.c b/src/gallium/drivers/nv30/nv30_state_fb.c
index 2ed2ea55e8..f7fe9833c7 100644
--- a/src/gallium/drivers/nv30/nv30_state_fb.c
+++ b/src/gallium/drivers/nv30/nv30_state_fb.c
@@ -66,14 +66,14 @@ nv30_state_framebuffer_validate(struct nv30_context *nv30)
}
switch (colour_format) {
- case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
rt_format |= NV34TCL_RT_FORMAT_COLOR_X8R8G8B8;
break;
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
case 0:
rt_format |= NV34TCL_RT_FORMAT_COLOR_A8R8G8B8;
break;
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
rt_format |= NV34TCL_RT_FORMAT_COLOR_R5G6B5;
colour_bits = 16;
break;
@@ -86,8 +86,8 @@ nv30_state_framebuffer_validate(struct nv30_context *nv30)
rt_format |= NV34TCL_RT_FORMAT_ZETA_Z16;
zeta_bits = 16;
break;
- case PIPE_FORMAT_Z24S8_UNORM:
- case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
case 0:
rt_format |= NV34TCL_RT_FORMAT_ZETA_Z24S8;
break;
diff --git a/src/gallium/drivers/nv30/nv30_state_viewport.c b/src/gallium/drivers/nv30/nv30_state_viewport.c
index 2d7781292b..6fccd6b60e 100644
--- a/src/gallium/drivers/nv30/nv30_state_viewport.c
+++ b/src/gallium/drivers/nv30/nv30_state_viewport.c
@@ -5,55 +5,25 @@ nv30_state_viewport_validate(struct nv30_context *nv30)
{
struct pipe_viewport_state *vpt = &nv30->viewport;
struct nouveau_stateobj *so;
- unsigned bypass;
-
- if (/*nv30->render_mode == HW &&*/
- !nv30->rasterizer->pipe.bypass_vs_clip_and_viewport)
- bypass = 0;
- else
- bypass = 1;
if (nv30->state.hw[NV30_STATE_VIEWPORT] &&
- (bypass || !(nv30->dirty & NV30_NEW_VIEWPORT)) &&
- nv30->state.viewport_bypass == bypass)
+ !(nv30->dirty & NV30_NEW_VIEWPORT))
return FALSE;
- nv30->state.viewport_bypass = bypass;
so = so_new(3, 10, 0);
- if (!bypass) {
- so_method(so, nv30->screen->rankine,
- NV34TCL_VIEWPORT_TRANSLATE_X, 8);
- so_data (so, fui(vpt->translate[0]));
- so_data (so, fui(vpt->translate[1]));
- so_data (so, fui(vpt->translate[2]));
- so_data (so, fui(vpt->translate[3]));
- so_data (so, fui(vpt->scale[0]));
- so_data (so, fui(vpt->scale[1]));
- so_data (so, fui(vpt->scale[2]));
- so_data (so, fui(vpt->scale[3]));
-/* so_method(so, nv30->screen->rankine, 0x1d78, 1);
- so_data (so, 1);
-*/ } else {
- so_method(so, nv30->screen->rankine,
- NV34TCL_VIEWPORT_TRANSLATE_X, 8);
- so_data (so, fui(0.0));
- so_data (so, fui(0.0));
- so_data (so, fui(0.0));
- so_data (so, fui(0.0));
- so_data (so, fui(1.0));
- so_data (so, fui(1.0));
- so_data (so, fui(1.0));
- so_data (so, fui(0.0));
- /* Not entirely certain what this is yet. The DDX uses this
- * value also as it fixes rendering when you pass
- * pre-transformed vertices to the GPU. My best gusss is that
- * this bypasses some culling/clipping stage. Might be worth
- * noting that points/lines are uneffected by whatever this
- * value fixes, only filled polygons are effected.
- */
-/* so_method(so, nv30->screen->rankine, 0x1d78, 1);
- so_data (so, 0x110);
-*/ }
+ so_method(so, nv30->screen->rankine,
+ NV34TCL_VIEWPORT_TRANSLATE_X, 8);
+ so_data (so, fui(vpt->translate[0]));
+ so_data (so, fui(vpt->translate[1]));
+ so_data (so, fui(vpt->translate[2]));
+ so_data (so, fui(vpt->translate[3]));
+ so_data (so, fui(vpt->scale[0]));
+ so_data (so, fui(vpt->scale[1]));
+ so_data (so, fui(vpt->scale[2]));
+ so_data (so, fui(vpt->scale[3]));
+/* so_method(so, nv30->screen->rankine, 0x1d78, 1);
+ so_data (so, 1);
+*/
/* TODO/FIXME: never saw value 0x0110 in renouveau dumps, only 0x0001 */
so_method(so, nv30->screen->rankine, 0x1d78, 1);
so_data (so, 1);
diff --git a/src/gallium/drivers/nv40/nv40_context.h b/src/gallium/drivers/nv40/nv40_context.h
index 4861924dac..97fb6a2ef9 100644
--- a/src/gallium/drivers/nv40/nv40_context.h
+++ b/src/gallium/drivers/nv40/nv40_context.h
@@ -101,7 +101,6 @@ struct nv40_blend_state {
struct nv40_state {
unsigned scissor_enabled;
unsigned stipple_enabled;
- unsigned viewport_bypass;
unsigned fp_samplers;
uint64_t dirty;
diff --git a/src/gallium/drivers/nv40/nv40_fragtex.c b/src/gallium/drivers/nv40/nv40_fragtex.c
index 7a28d577b1..b60118922a 100644
--- a/src/gallium/drivers/nv40/nv40_fragtex.c
+++ b/src/gallium/drivers/nv40/nv40_fragtex.c
@@ -25,18 +25,18 @@ struct nv40_texture_format {
static struct nv40_texture_format
nv40_texture_formats[] = {
- _(X8R8G8B8_UNORM, A8R8G8B8, S1, S1, S1, ONE, X, Y, Z, W, 0, 0, 0, 0),
- _(A8R8G8B8_UNORM, A8R8G8B8, S1, S1, S1, S1, X, Y, Z, W, 0, 0, 0, 0),
- _(A1R5G5B5_UNORM, A1R5G5B5, S1, S1, S1, S1, X, Y, Z, W, 0, 0, 0, 0),
- _(A4R4G4B4_UNORM, A4R4G4B4, S1, S1, S1, S1, X, Y, Z, W, 0, 0, 0, 0),
- _(R5G6B5_UNORM , R5G6B5 , S1, S1, S1, ONE, X, Y, Z, W, 0, 0, 0, 0),
+ _(B8G8R8X8_UNORM, A8R8G8B8, S1, S1, S1, ONE, X, Y, Z, W, 0, 0, 0, 0),
+ _(B8G8R8A8_UNORM, A8R8G8B8, S1, S1, S1, S1, X, Y, Z, W, 0, 0, 0, 0),
+ _(B5G5R5A1_UNORM, A1R5G5B5, S1, S1, S1, S1, X, Y, Z, W, 0, 0, 0, 0),
+ _(B4G4R4A4_UNORM, A4R4G4B4, S1, S1, S1, S1, X, Y, Z, W, 0, 0, 0, 0),
+ _(B5G6R5_UNORM , R5G6B5 , S1, S1, S1, ONE, X, Y, Z, W, 0, 0, 0, 0),
_(L8_UNORM , L8 , S1, S1, S1, ONE, X, X, X, X, 0, 0, 0, 0),
_(A8_UNORM , L8 , ZERO, ZERO, ZERO, S1, X, X, X, X, 0, 0, 0, 0),
_(R16_SNORM , A16 , ZERO, ZERO, S1, ONE, X, X, X, Y, 1, 1, 1, 1),
_(I8_UNORM , L8 , S1, S1, S1, S1, X, X, X, X, 0, 0, 0, 0),
- _(A8L8_UNORM , A8L8 , S1, S1, S1, S1, X, X, X, Y, 0, 0, 0, 0),
+ _(L8A8_UNORM , A8L8 , S1, S1, S1, S1, X, X, X, Y, 0, 0, 0, 0),
_(Z16_UNORM , Z16 , S1, S1, S1, ONE, X, X, X, X, 0, 0, 0, 0),
- _(Z24S8_UNORM , Z24 , S1, S1, S1, ONE, X, X, X, X, 0, 0, 0, 0),
+ _(S8Z24_UNORM , Z24 , S1, S1, S1, ONE, X, X, X, X, 0, 0, 0, 0),
_(DXT1_RGB , DXT1 , S1, S1, S1, ONE, X, Y, Z, W, 0, 0, 0, 0),
_(DXT1_RGBA , DXT1 , S1, S1, S1, S1, X, Y, Z, W, 0, 0, 0, 0),
_(DXT3_RGBA , DXT3 , S1, S1, S1, S1, X, Y, Z, W, 0, 0, 0, 0),
diff --git a/src/gallium/drivers/nv40/nv40_miptree.c b/src/gallium/drivers/nv40/nv40_miptree.c
index 9acbef4d7d..b17255dc6b 100644
--- a/src/gallium/drivers/nv40/nv40_miptree.c
+++ b/src/gallium/drivers/nv40/nv40_miptree.c
@@ -90,8 +90,8 @@ nv40_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *pt)
else {
switch (pt->format) {
/* TODO: Figure out which formats can be swizzled */
- case PIPE_FORMAT_A8R8G8B8_UNORM:
- case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
case PIPE_FORMAT_R16_SNORM:
{
if (debug_get_bool_option("NOUVEAU_NO_SWIZZLE", FALSE))
diff --git a/src/gallium/drivers/nv40/nv40_screen.c b/src/gallium/drivers/nv40/nv40_screen.c
index edee4b9a3a..b216c5e38c 100644
--- a/src/gallium/drivers/nv40/nv40_screen.c
+++ b/src/gallium/drivers/nv40/nv40_screen.c
@@ -98,8 +98,8 @@ nv40_screen_surface_format_supported(struct pipe_screen *pscreen,
{
if (tex_usage & PIPE_TEXTURE_USAGE_RENDER_TARGET) {
switch (format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
return TRUE;
default:
break;
@@ -107,8 +107,8 @@ nv40_screen_surface_format_supported(struct pipe_screen *pscreen,
} else
if (tex_usage & PIPE_TEXTURE_USAGE_DEPTH_STENCIL) {
switch (format) {
- case PIPE_FORMAT_Z24S8_UNORM:
- case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
case PIPE_FORMAT_Z16_UNORM:
return TRUE;
default:
@@ -116,17 +116,17 @@ nv40_screen_surface_format_supported(struct pipe_screen *pscreen,
}
} else {
switch (format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
- case PIPE_FORMAT_A1R5G5B5_UNORM:
- case PIPE_FORMAT_A4R4G4B4_UNORM:
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
case PIPE_FORMAT_R16_SNORM:
case PIPE_FORMAT_L8_UNORM:
case PIPE_FORMAT_A8_UNORM:
case PIPE_FORMAT_I8_UNORM:
- case PIPE_FORMAT_A8L8_UNORM:
+ case PIPE_FORMAT_L8A8_UNORM:
case PIPE_FORMAT_Z16_UNORM:
- case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
case PIPE_FORMAT_DXT1_RGB:
case PIPE_FORMAT_DXT1_RGBA:
case PIPE_FORMAT_DXT3_RGBA:
diff --git a/src/gallium/drivers/nv40/nv40_state_fb.c b/src/gallium/drivers/nv40/nv40_state_fb.c
index a58fe9ddb1..fd3fdfddc0 100644
--- a/src/gallium/drivers/nv40/nv40_state_fb.c
+++ b/src/gallium/drivers/nv40/nv40_state_fb.c
@@ -57,14 +57,14 @@ nv40_state_framebuffer_validate(struct nv40_context *nv40)
rt_format = NV40TCL_RT_FORMAT_TYPE_LINEAR;
switch (colour_format) {
- case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
rt_format |= NV40TCL_RT_FORMAT_COLOR_X8R8G8B8;
break;
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
case 0:
rt_format |= NV40TCL_RT_FORMAT_COLOR_A8R8G8B8;
break;
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
rt_format |= NV40TCL_RT_FORMAT_COLOR_R5G6B5;
break;
default:
@@ -75,8 +75,8 @@ nv40_state_framebuffer_validate(struct nv40_context *nv40)
case PIPE_FORMAT_Z16_UNORM:
rt_format |= NV40TCL_RT_FORMAT_ZETA_Z16;
break;
- case PIPE_FORMAT_Z24S8_UNORM:
- case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
case 0:
rt_format |= NV40TCL_RT_FORMAT_ZETA_Z24S8;
break;
diff --git a/src/gallium/drivers/nv40/nv40_state_viewport.c b/src/gallium/drivers/nv40/nv40_state_viewport.c
index 9919ba1d0b..3aacb00f99 100644
--- a/src/gallium/drivers/nv40/nv40_state_viewport.c
+++ b/src/gallium/drivers/nv40/nv40_state_viewport.c
@@ -5,55 +5,24 @@ nv40_state_viewport_validate(struct nv40_context *nv40)
{
struct pipe_viewport_state *vpt = &nv40->viewport;
struct nouveau_stateobj *so;
- unsigned bypass;
-
- if (nv40->render_mode == HW &&
- !nv40->rasterizer->pipe.bypass_vs_clip_and_viewport)
- bypass = 0;
- else
- bypass = 1;
if (nv40->state.hw[NV40_STATE_VIEWPORT] &&
- (bypass || !(nv40->dirty & NV40_NEW_VIEWPORT)) &&
- nv40->state.viewport_bypass == bypass)
+ !(nv40->dirty & NV40_NEW_VIEWPORT))
return FALSE;
- nv40->state.viewport_bypass = bypass;
so = so_new(2, 9, 0);
- if (!bypass) {
- so_method(so, nv40->screen->curie,
- NV40TCL_VIEWPORT_TRANSLATE_X, 8);
- so_data (so, fui(vpt->translate[0]));
- so_data (so, fui(vpt->translate[1]));
- so_data (so, fui(vpt->translate[2]));
- so_data (so, fui(vpt->translate[3]));
- so_data (so, fui(vpt->scale[0]));
- so_data (so, fui(vpt->scale[1]));
- so_data (so, fui(vpt->scale[2]));
- so_data (so, fui(vpt->scale[3]));
- so_method(so, nv40->screen->curie, 0x1d78, 1);
- so_data (so, 1);
- } else {
- so_method(so, nv40->screen->curie,
- NV40TCL_VIEWPORT_TRANSLATE_X, 8);
- so_data (so, fui(0.0));
- so_data (so, fui(0.0));
- so_data (so, fui(0.0));
- so_data (so, fui(0.0));
- so_data (so, fui(1.0));
- so_data (so, fui(1.0));
- so_data (so, fui(1.0));
- so_data (so, fui(0.0));
- /* Not entirely certain what this is yet. The DDX uses this
- * value also as it fixes rendering when you pass
- * pre-transformed vertices to the GPU. My best gusss is that
- * this bypasses some culling/clipping stage. Might be worth
- * noting that points/lines are uneffected by whatever this
- * value fixes, only filled polygons are effected.
- */
- so_method(so, nv40->screen->curie, 0x1d78, 1);
- so_data (so, 0x110);
- }
+ so_method(so, nv40->screen->curie,
+ NV40TCL_VIEWPORT_TRANSLATE_X, 8);
+ so_data (so, fui(vpt->translate[0]));
+ so_data (so, fui(vpt->translate[1]));
+ so_data (so, fui(vpt->translate[2]));
+ so_data (so, fui(vpt->translate[3]));
+ so_data (so, fui(vpt->scale[0]));
+ so_data (so, fui(vpt->scale[1]));
+ so_data (so, fui(vpt->scale[2]));
+ so_data (so, fui(vpt->scale[3]));
+ so_method(so, nv40->screen->curie, 0x1d78, 1);
+ so_data (so, 1);
so_ref(so, &nv40->state.hw[NV40_STATE_VIEWPORT]);
so_ref(NULL, &so);
diff --git a/src/gallium/drivers/nv50/nv50_context.h b/src/gallium/drivers/nv50/nv50_context.h
index b4de3e2ba5..c540594b94 100644
--- a/src/gallium/drivers/nv50/nv50_context.h
+++ b/src/gallium/drivers/nv50/nv50_context.h
@@ -127,7 +127,6 @@ struct nv50_state {
struct nouveau_stateobj *scissor;
unsigned scissor_enabled;
struct nouveau_stateobj *viewport;
- unsigned viewport_bypass;
struct nouveau_stateobj *tsc_upload;
struct nouveau_stateobj *tic_upload;
unsigned miptree_nr[PIPE_SHADER_TYPES];
diff --git a/src/gallium/drivers/nv50/nv50_miptree.c b/src/gallium/drivers/nv50/nv50_miptree.c
index 133f2204e0..a7788249ab 100644
--- a/src/gallium/drivers/nv50/nv50_miptree.c
+++ b/src/gallium/drivers/nv50/nv50_miptree.c
@@ -89,14 +89,14 @@ nv50_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *tmp)
case PIPE_FORMAT_Z32_FLOAT:
tile_flags = 0x4800;
break;
- case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
tile_flags = 0x1800;
break;
case PIPE_FORMAT_Z16_UNORM:
tile_flags = 0x6c00;
break;
- case PIPE_FORMAT_X8Z24_UNORM:
- case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
tile_flags = 0x2800;
break;
case PIPE_FORMAT_R32G32B32A32_FLOAT:
diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c
index 2232461b9b..eed6031eaf 100644
--- a/src/gallium/drivers/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nv50/nv50_screen.c
@@ -35,9 +35,9 @@ nv50_screen_is_format_supported(struct pipe_screen *pscreen,
{
if (tex_usage & PIPE_TEXTURE_USAGE_RENDER_TARGET) {
switch (format) {
- case PIPE_FORMAT_X8R8G8B8_UNORM:
- case PIPE_FORMAT_A8R8G8B8_UNORM:
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
case PIPE_FORMAT_R16G16B16A16_SNORM:
case PIPE_FORMAT_R16G16B16A16_UNORM:
case PIPE_FORMAT_R32G32B32A32_FLOAT:
@@ -51,32 +51,32 @@ nv50_screen_is_format_supported(struct pipe_screen *pscreen,
if (tex_usage & PIPE_TEXTURE_USAGE_DEPTH_STENCIL) {
switch (format) {
case PIPE_FORMAT_Z32_FLOAT:
- case PIPE_FORMAT_Z24S8_UNORM:
- case PIPE_FORMAT_X8Z24_UNORM:
case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
return TRUE;
default:
break;
}
} else {
switch (format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
- case PIPE_FORMAT_X8R8G8B8_UNORM:
- case PIPE_FORMAT_A8R8G8B8_SRGB:
- case PIPE_FORMAT_X8R8G8B8_SRGB:
- case PIPE_FORMAT_A1R5G5B5_UNORM:
- case PIPE_FORMAT_A4R4G4B4_UNORM:
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_SRGB:
+ case PIPE_FORMAT_B8G8R8X8_SRGB:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
case PIPE_FORMAT_L8_UNORM:
case PIPE_FORMAT_A8_UNORM:
case PIPE_FORMAT_I8_UNORM:
- case PIPE_FORMAT_A8L8_UNORM:
+ case PIPE_FORMAT_L8A8_UNORM:
case PIPE_FORMAT_DXT1_RGB:
case PIPE_FORMAT_DXT1_RGBA:
case PIPE_FORMAT_DXT3_RGBA:
case PIPE_FORMAT_DXT5_RGBA:
- case PIPE_FORMAT_Z24S8_UNORM:
case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
case PIPE_FORMAT_Z32_FLOAT:
case PIPE_FORMAT_R16G16B16A16_SNORM:
case PIPE_FORMAT_R16G16B16A16_UNORM:
diff --git a/src/gallium/drivers/nv50/nv50_state_validate.c b/src/gallium/drivers/nv50/nv50_state_validate.c
index efab94cab7..c974cc92dc 100644
--- a/src/gallium/drivers/nv50/nv50_state_validate.c
+++ b/src/gallium/drivers/nv50/nv50_state_validate.c
@@ -25,12 +25,6 @@
#include "nv50_context.h"
#include "nouveau/nouveau_stateobj.h"
-#define NV50_CBUF_FORMAT_CASE(n) \
- case PIPE_FORMAT_##n: so_data(so, NV50TCL_RT_FORMAT_##n); break
-
-#define NV50_ZETA_FORMAT_CASE(n) \
- case PIPE_FORMAT_##n: so_data(so, NV50TCL_ZETA_FORMAT_##n); break
-
static void
nv50_state_validate_fb(struct nv50_context *nv50)
{
@@ -71,14 +65,30 @@ nv50_state_validate_fb(struct nv50_context *nv50)
so_reloc (so, bo, fb->cbufs[i]->offset, NOUVEAU_BO_VRAM |
NOUVEAU_BO_LOW | NOUVEAU_BO_RDWR, 0, 0);
switch (fb->cbufs[i]->format) {
- NV50_CBUF_FORMAT_CASE(A8R8G8B8_UNORM);
- NV50_CBUF_FORMAT_CASE(X8R8G8B8_UNORM);
- NV50_CBUF_FORMAT_CASE(R5G6B5_UNORM);
- NV50_CBUF_FORMAT_CASE(R16G16B16A16_SNORM);
- NV50_CBUF_FORMAT_CASE(R16G16B16A16_UNORM);
- NV50_CBUF_FORMAT_CASE(R32G32B32A32_FLOAT);
- NV50_CBUF_FORMAT_CASE(R16G16_SNORM);
- NV50_CBUF_FORMAT_CASE(R16G16_UNORM);
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
+ so_data(so, NV50TCL_RT_FORMAT_A8R8G8B8_UNORM);
+ break;
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
+ so_data(so, NV50TCL_RT_FORMAT_X8R8G8B8_UNORM);
+ break;
+ case PIPE_FORMAT_B5G6R5_UNORM:
+ so_data(so, NV50TCL_RT_FORMAT_R5G6B5_UNORM);
+ break;
+ case PIPE_FORMAT_R16G16B16A16_SNORM:
+ so_data(so, NV50TCL_RT_FORMAT_R16G16B16A16_SNORM);
+ break;
+ case PIPE_FORMAT_R16G16B16A16_UNORM:
+ so_data(so, NV50TCL_RT_FORMAT_R16G16B16A16_UNORM);
+ break;
+ case PIPE_FORMAT_R32G32B32A32_FLOAT:
+ so_data(so, NV50TCL_RT_FORMAT_R32G32B32A32_FLOAT);
+ break;
+ case PIPE_FORMAT_R16G16_SNORM:
+ so_data(so, NV50TCL_RT_FORMAT_R16G16_SNORM);
+ break;
+ case PIPE_FORMAT_R16G16_UNORM:
+ so_data(so, NV50TCL_RT_FORMAT_R16G16_UNORM);
+ break;
default:
NOUVEAU_ERR("AIIII unknown format %s\n",
util_format_name(fb->cbufs[i]->format));
@@ -112,10 +122,18 @@ nv50_state_validate_fb(struct nv50_context *nv50)
so_reloc (so, bo, fb->zsbuf->offset, NOUVEAU_BO_VRAM |
NOUVEAU_BO_LOW | NOUVEAU_BO_RDWR, 0, 0);
switch (fb->zsbuf->format) {
- NV50_ZETA_FORMAT_CASE(S8Z24_UNORM);
- NV50_ZETA_FORMAT_CASE(X8Z24_UNORM);
- NV50_ZETA_FORMAT_CASE(Z24S8_UNORM);
- NV50_ZETA_FORMAT_CASE(Z32_FLOAT);
+ case PIPE_FORMAT_Z24S8_UNORM:
+ so_data(so, NV50TCL_ZETA_FORMAT_S8Z24_UNORM);
+ break;
+ case PIPE_FORMAT_Z24X8_UNORM:
+ so_data(so, NV50TCL_ZETA_FORMAT_X8Z24_UNORM);
+ break;
+ case PIPE_FORMAT_S8Z24_UNORM:
+ so_data(so, NV50TCL_ZETA_FORMAT_Z24S8_UNORM);
+ break;
+ case PIPE_FORMAT_Z32_FLOAT:
+ so_data(so, NV50TCL_ZETA_FORMAT_Z32_FLOAT);
+ break;
default:
NOUVEAU_ERR("AIIII unknown format %s\n",
util_format_name(fb->zsbuf->format));
@@ -375,50 +393,32 @@ nv50_state_validate(struct nv50_context *nv50)
scissor_uptodate:
if (nv50->dirty & (NV50_NEW_VIEWPORT | NV50_NEW_RASTERIZER)) {
- unsigned bypass;
-
- if (!nv50->rasterizer->pipe.bypass_vs_clip_and_viewport)
- bypass = 0;
- else
- bypass = 1;
-
if (nv50->state.viewport &&
- (bypass || !(nv50->dirty & NV50_NEW_VIEWPORT)) &&
- nv50->state.viewport_bypass == bypass)
+ !(nv50->dirty & NV50_NEW_VIEWPORT))
goto viewport_uptodate;
- nv50->state.viewport_bypass = bypass;
so = so_new(5, 9, 0);
- if (!bypass) {
- so_method(so, tesla, NV50TCL_VIEWPORT_TRANSLATE_X(0), 3);
- so_data (so, fui(nv50->viewport.translate[0]));
- so_data (so, fui(nv50->viewport.translate[1]));
- so_data (so, fui(nv50->viewport.translate[2]));
- so_method(so, tesla, NV50TCL_VIEWPORT_SCALE_X(0), 3);
- so_data (so, fui(nv50->viewport.scale[0]));
- so_data (so, fui(nv50->viewport.scale[1]));
- so_data (so, fui(nv50->viewport.scale[2]));
-
- so_method(so, tesla, NV50TCL_VIEWPORT_TRANSFORM_EN, 1);
- so_data (so, 1);
- /* 0x0000 = remove whole primitive only (xyz)
- * 0x1018 = remove whole primitive only (xy), clamp z
- * 0x1080 = clip primitive (xyz)
- * 0x1098 = clip primitive (xy), clamp z
- */
- so_method(so, tesla, NV50TCL_VIEW_VOLUME_CLIP_CTRL, 1);
- so_data (so, 0x1080);
- /* no idea what 0f90 does */
- so_method(so, tesla, 0x0f90, 1);
- so_data (so, 0);
- } else {
- so_method(so, tesla, NV50TCL_VIEWPORT_TRANSFORM_EN, 1);
- so_data (so, 0);
- so_method(so, tesla, NV50TCL_VIEW_VOLUME_CLIP_CTRL, 1);
- so_data (so, 0x0000);
- so_method(so, tesla, 0x0f90, 1);
- so_data (so, 1);
- }
+ so_method(so, tesla, NV50TCL_VIEWPORT_TRANSLATE_X(0), 3);
+ so_data (so, fui(nv50->viewport.translate[0]));
+ so_data (so, fui(nv50->viewport.translate[1]));
+ so_data (so, fui(nv50->viewport.translate[2]));
+ so_method(so, tesla, NV50TCL_VIEWPORT_SCALE_X(0), 3);
+ so_data (so, fui(nv50->viewport.scale[0]));
+ so_data (so, fui(nv50->viewport.scale[1]));
+ so_data (so, fui(nv50->viewport.scale[2]));
+
+ so_method(so, tesla, NV50TCL_VIEWPORT_TRANSFORM_EN, 1);
+ so_data (so, 1);
+ /* 0x0000 = remove whole primitive only (xyz)
+ * 0x1018 = remove whole primitive only (xy), clamp z
+ * 0x1080 = clip primitive (xyz)
+ * 0x1098 = clip primitive (xy), clamp z
+ */
+ so_method(so, tesla, NV50TCL_VIEW_VOLUME_CLIP_CTRL, 1);
+ so_data (so, 0x1080);
+ /* no idea what 0f90 does */
+ so_method(so, tesla, 0x0f90, 1);
+ so_data (so, 0);
so_ref(so, &nv50->state.viewport);
so_ref(NULL, &so);
diff --git a/src/gallium/drivers/nv50/nv50_surface.c b/src/gallium/drivers/nv50/nv50_surface.c
index 7405b67414..cabd148bc5 100644
--- a/src/gallium/drivers/nv50/nv50_surface.c
+++ b/src/gallium/drivers/nv50/nv50_surface.c
@@ -33,11 +33,11 @@ static INLINE int
nv50_format(enum pipe_format format)
{
switch (format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
return NV50_2D_DST_FORMAT_A8R8G8B8_UNORM;
- case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
return NV50_2D_DST_FORMAT_X8R8G8B8_UNORM;
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
return NV50_2D_DST_FORMAT_R5G6B5_UNORM;
case PIPE_FORMAT_A8_UNORM:
return NV50_2D_DST_FORMAT_R8_UNORM;
diff --git a/src/gallium/drivers/nv50/nv50_tex.c b/src/gallium/drivers/nv50/nv50_tex.c
index 9f1a171303..de0560e20c 100644
--- a/src/gallium/drivers/nv50/nv50_tex.c
+++ b/src/gallium/drivers/nv50/nv50_tex.c
@@ -49,28 +49,28 @@ struct nv50_texture_format {
static const struct nv50_texture_format nv50_tex_format_list[] =
{
- _(A8R8G8B8_UNORM, UNORM, C2, C1, C0, C3, 8_8_8_8),
- _(A8R8G8B8_SRGB, UNORM, C2, C1, C0, C3, 8_8_8_8),
- _(X8R8G8B8_UNORM, UNORM, C2, C1, C0, ONE, 8_8_8_8),
- _(X8R8G8B8_SRGB, UNORM, C2, C1, C0, ONE, 8_8_8_8),
- _(A1R5G5B5_UNORM, UNORM, C2, C1, C0, C3, 1_5_5_5),
- _(A4R4G4B4_UNORM, UNORM, C2, C1, C0, C3, 4_4_4_4),
+ _(B8G8R8A8_UNORM, UNORM, C2, C1, C0, C3, 8_8_8_8),
+ _(B8G8R8A8_SRGB, UNORM, C2, C1, C0, C3, 8_8_8_8),
+ _(B8G8R8X8_UNORM, UNORM, C2, C1, C0, ONE, 8_8_8_8),
+ _(B8G8R8X8_SRGB, UNORM, C2, C1, C0, ONE, 8_8_8_8),
+ _(B5G5R5A1_UNORM, UNORM, C2, C1, C0, C3, 1_5_5_5),
+ _(B4G4R4A4_UNORM, UNORM, C2, C1, C0, C3, 4_4_4_4),
- _(R5G6B5_UNORM, UNORM, C2, C1, C0, ONE, 5_6_5),
+ _(B5G6R5_UNORM, UNORM, C2, C1, C0, ONE, 5_6_5),
_(L8_UNORM, UNORM, C0, C0, C0, ONE, 8),
_(A8_UNORM, UNORM, ZERO, ZERO, ZERO, C0, 8),
_(I8_UNORM, UNORM, C0, C0, C0, C0, 8),
- _(A8L8_UNORM, UNORM, C0, C0, C0, C1, 8_8),
+ _(L8A8_UNORM, UNORM, C0, C0, C0, C1, 8_8),
_(DXT1_RGB, UNORM, C0, C1, C2, ONE, DXT1),
_(DXT1_RGBA, UNORM, C0, C1, C2, C3, DXT1),
_(DXT3_RGBA, UNORM, C0, C1, C2, C3, DXT3),
_(DXT5_RGBA, UNORM, C0, C1, C2, C3, DXT5),
- _MIXED(Z24S8_UNORM, UINT, UNORM, UINT, UINT, C1, C1, C1, ONE, 24_8),
- _MIXED(S8Z24_UNORM, UNORM, UINT, UINT, UINT, C0, C0, C0, ONE, 8_24),
+ _MIXED(S8Z24_UNORM, UINT, UNORM, UINT, UINT, C1, C1, C1, ONE, 24_8),
+ _MIXED(Z24S8_UNORM, UNORM, UINT, UINT, UINT, C0, C0, C0, ONE, 8_24),
_(R16G16B16A16_SNORM, UNORM, C0, C1, C2, C3, 16_16_16_16),
_(R16G16B16A16_UNORM, SNORM, C0, C1, C2, C3, 16_16_16_16),
diff --git a/src/gallium/drivers/r300/Makefile b/src/gallium/drivers/r300/Makefile
index 1f69daec81..61b54af4dd 100644
--- a/src/gallium/drivers/r300/Makefile
+++ b/src/gallium/drivers/r300/Makefile
@@ -19,7 +19,8 @@ C_SOURCES = \
r300_state_invariant.c \
r300_vs.c \
r300_texture.c \
- r300_tgsi_to_rc.c
+ r300_tgsi_to_rc.c \
+ r300_transfer.c
LIBRARY_INCLUDES = \
-I$(TOP)/src/mesa/drivers/dri/r300/compiler \
diff --git a/src/gallium/drivers/r300/SConscript b/src/gallium/drivers/r300/SConscript
index 183aa17f9b..27b2e30993 100644
--- a/src/gallium/drivers/r300/SConscript
+++ b/src/gallium/drivers/r300/SConscript
@@ -30,6 +30,7 @@ r300 = env.ConvenienceLibrary(
'r300_vs.c',
'r300_texture.c',
'r300_tgsi_to_rc.c',
+ 'r300_transfer.c',
] + r300compiler) + r300compiler
Export('r300')
diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c
index 32d05749bd..513cc0f5d4 100644
--- a/src/gallium/drivers/r300/r300_blit.c
+++ b/src/gallium/drivers/r300/r300_blit.c
@@ -34,6 +34,8 @@ static void r300_blitter_save_states(struct r300_context* r300)
util_blitter_save_rasterizer(r300->blitter, r300->rs_state.state);
util_blitter_save_fragment_shader(r300->blitter, r300->fs);
util_blitter_save_vertex_shader(r300->blitter, r300->vs_state.state);
+ util_blitter_save_viewport(r300->blitter, &r300->viewport);
+ util_blitter_save_clip(r300->blitter, &r300->clip);
}
/* Clear currently bound buffers. */
@@ -141,10 +143,10 @@ void r300_surface_copy(struct pipe_context* pipe,
new_format = PIPE_FORMAT_I8_UNORM;
break;
case 2:
- new_format = PIPE_FORMAT_A4R4G4B4_UNORM;
+ new_format = PIPE_FORMAT_B4G4R4A4_UNORM;
break;
case 4:
- new_format = PIPE_FORMAT_A8R8G8B8_UNORM;
+ new_format = PIPE_FORMAT_B8G8R8A8_UNORM;
break;
default:
debug_printf("r300: surface_copy: Unhandled format: %s. Falling back to software.\n"
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index 6308d3a087..e0a5532327 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -163,6 +163,8 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
if (!r300)
return NULL;
+ r300screen->ctx = (struct pipe_context*)r300;
+
r300->winsys = radeon_winsys;
r300->context.winsys = (struct pipe_winsys*)radeon_winsys;
@@ -216,7 +218,6 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
r300->invariant_state.dirty = TRUE;
r300->winsys->set_flush_cb(r300->winsys, r300_flush_cb, r300);
- r300->dirty_state = R300_NEW_KITCHEN_SINK;
r300->dirty_hw++;
r300->blitter = util_blitter_create(&r300->context);
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h
index b98fe347b8..8c52d880a3 100644
--- a/src/gallium/drivers/r300/r300_context.h
+++ b/src/gallium/drivers/r300/r300_context.h
@@ -356,16 +356,20 @@ struct r300_context {
struct pipe_stencil_ref stencil_ref;
+ struct pipe_clip_state clip;
+
+ struct pipe_viewport_state viewport;
+
/* Bitmask of dirty state objects. */
uint32_t dirty_state;
/* Flag indicating whether or not the HW is dirty. */
uint32_t dirty_hw;
- /* Whether the TCL engine should be in bypass mode. */
- boolean tcl_bypass;
/* Whether polygon offset is enabled. */
boolean polygon_offset_enabled;
/* Z buffer bit depth. */
uint32_t zbuffer_bpp;
+ /* Whether scissor is enabled. */
+ boolean scissor_enabled;
};
/* Convenience cast wrapper. */
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index 17d55ba3b4..51fc590e5d 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -175,23 +175,15 @@ static const float * get_shader_constant(
break;
case RC_STATE_R300_VIEWPORT_SCALE:
- if (r300->tcl_bypass) {
- vec[0] = 1;
- vec[1] = 1;
- vec[2] = 1;
- } else {
- vec[0] = viewport->xscale;
- vec[1] = viewport->yscale;
- vec[2] = viewport->zscale;
- }
+ vec[0] = viewport->xscale;
+ vec[1] = viewport->yscale;
+ vec[2] = viewport->zscale;
break;
case RC_STATE_R300_VIEWPORT_OFFSET:
- if (!r300->tcl_bypass) {
- vec[0] = viewport->xoffset;
- vec[1] = viewport->yoffset;
- vec[2] = viewport->zoffset;
- }
+ vec[0] = viewport->xoffset;
+ vec[1] = viewport->yoffset;
+ vec[2] = viewport->zoffset;
break;
default:
@@ -683,7 +675,7 @@ void r300_emit_scissor_state(struct r300_context* r300,
maxx = fb->width;
maxy = fb->height;
- if (((struct r300_rs_state*)r300->rs_state.state)->rs.scissor) {
+ if (r300->scissor_enabled) {
minx = MAX2(minx, scissor->minx);
miny = MAX2(miny, scissor->miny);
maxx = MIN2(maxx, scissor->maxx);
@@ -802,6 +794,30 @@ void r300_emit_aos(struct r300_context* r300, unsigned offset)
END_CS;
}
+void r300_emit_vertex_buffer(struct r300_context* r300)
+{
+ CS_LOCALS(r300);
+
+ DBG(r300, DBG_DRAW, "r300: Preparing vertex buffer %p for render, "
+ "vertex size %d\n", r300->vbo,
+ r300->vertex_info.size);
+ /* Set the pointer to our vertex buffer. The emitted values are this:
+ * PACKET3 [3D_LOAD_VBPNTR]
+ * COUNT [1]
+ * FORMAT [size | stride << 8]
+ * OFFSET [offset into BO]
+ * VBPNTR [relocated BO]
+ */
+ BEGIN_CS(7);
+ OUT_CS_PKT3(R300_PACKET3_3D_LOAD_VBPNTR, 3);
+ OUT_CS(1);
+ OUT_CS(r300->vertex_info.size |
+ (r300->vertex_info.size << 8));
+ OUT_CS(r300->vbo_offset);
+ OUT_CS_RELOC(r300->vbo, 0, RADEON_GEM_DOMAIN_GTT, 0, 0);
+ END_CS;
+}
+
void r300_emit_vertex_stream_state(struct r300_context* r300,
unsigned size, void* state)
{
@@ -876,7 +892,7 @@ void r300_emit_vs_state(struct r300_context* r300, unsigned size, void* state)
CS_LOCALS(r300);
if (!r300screen->caps->has_tcl) {
- debug_printf("r300: Implementation error: emit_vertex_shader called,"
+ debug_printf("r300: Implementation error: emit_vs_state called,"
" but has_tcl is FALSE!\n");
return;
}
@@ -915,7 +931,7 @@ void r300_emit_vs_constant_buffer(struct r300_context* r300,
CS_LOCALS(r300);
if (!r300screen->caps->has_tcl) {
- debug_printf("r300: Implementation error: emit_vertex_shader called,"
+ debug_printf("r300: Implementation error: emit_vs_constant_buffer called,"
" but has_tcl is FALSE!\n");
return;
}
@@ -946,22 +962,16 @@ void r300_emit_viewport_state(struct r300_context* r300,
struct r300_viewport_state* viewport = (struct r300_viewport_state*)state;
CS_LOCALS(r300);
- if (r300->tcl_bypass) {
- BEGIN_CS(2); /* XXX tcl_bypass will be removed in gallium anyway */
- OUT_CS_REG(R300_VAP_VTE_CNTL, 0);
- END_CS;
- } else {
- BEGIN_CS(size);
- OUT_CS_REG_SEQ(R300_SE_VPORT_XSCALE, 6);
- OUT_CS_32F(viewport->xscale);
- OUT_CS_32F(viewport->xoffset);
- OUT_CS_32F(viewport->yscale);
- OUT_CS_32F(viewport->yoffset);
- OUT_CS_32F(viewport->zscale);
- OUT_CS_32F(viewport->zoffset);
- OUT_CS_REG(R300_VAP_VTE_CNTL, viewport->vte_control);
- END_CS;
- }
+ BEGIN_CS(size);
+ OUT_CS_REG_SEQ(R300_SE_VPORT_XSCALE, 6);
+ OUT_CS_32F(viewport->xscale);
+ OUT_CS_32F(viewport->xoffset);
+ OUT_CS_32F(viewport->yscale);
+ OUT_CS_32F(viewport->yoffset);
+ OUT_CS_32F(viewport->zscale);
+ OUT_CS_32F(viewport->zoffset);
+ OUT_CS_REG(R300_VAP_VTE_CNTL, viewport->vte_control);
+ END_CS;
}
void r300_emit_ztop_state(struct r300_context* r300,
@@ -1149,8 +1159,10 @@ void r300_emit_dirty_state(struct r300_context* r300)
assert(r300->dirty_state == 0);
*/
- /* Finally, emit the VBO. */
- /* r300_emit_vertex_buffer(r300); */
+ /* Emit the VBO for SWTCL. */
+ if (!r300screen->caps->has_tcl) {
+ r300_emit_vertex_buffer(r300);
+ }
r300->dirty_hw++;
}
diff --git a/src/gallium/drivers/r300/r300_flush.c b/src/gallium/drivers/r300/r300_flush.c
index e37d309270..70de152713 100644
--- a/src/gallium/drivers/r300/r300_flush.c
+++ b/src/gallium/drivers/r300/r300_flush.c
@@ -61,6 +61,12 @@ static void r300_flush(struct pipe_context* pipe,
atom->dirty = TRUE;
}
}
+
+ /* Unmark HWTCL state for SWTCL. */
+ if (!r300_screen(pipe->screen)->caps->has_tcl) {
+ r300->vs_state.dirty = FALSE;
+ r300->dirty_state &= ~R300_NEW_VERTEX_SHADER_CONSTANTS;
+ }
}
/* reset flushed query */
diff --git a/src/gallium/drivers/r300/r300_fs.c b/src/gallium/drivers/r300/r300_fs.c
index 3c2625269b..9e71e61c30 100644
--- a/src/gallium/drivers/r300/r300_fs.c
+++ b/src/gallium/drivers/r300/r300_fs.c
@@ -207,6 +207,7 @@ static void r300_translate_fragment_shader(
DBG(r300, DBG_FP, "r300: Error compiling fragment program: %s\n",
compiler.Base.ErrorMsg);
assert(0);
+ abort();
}
/* And, finally... */
diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c
index 770a92be74..c8420bcdd5 100644
--- a/src/gallium/drivers/r300/r300_render.c
+++ b/src/gallium/drivers/r300/r300_render.c
@@ -186,7 +186,7 @@ static void r300_emit_draw_arrays_immediate(struct r300_context *r300,
dwords = 10 + count * vertex_size;
r300_reserve_cs_space(r300, r300_get_num_dirty_dwords(r300) + dwords);
- r300_emit_buffer_validate(r300, FALSE, 0);
+ r300_emit_buffer_validate(r300, FALSE, NULL);
r300_emit_dirty_state(r300);
BEGIN_CS(dwords);
@@ -273,9 +273,14 @@ static void r300_emit_draw_elements(struct r300_context *r300,
CS_LOCALS(r300);
assert((start * indexSize) % 4 == 0);
+ assert(count < (1 << 24));
+
+ DBG(r300, DBG_DRAW, "r300: Indexbuf of %u indices, min %u max %u\n",
+ count, minIndex, maxIndex);
+
+ maxIndex = MIN2(maxIndex, r300->vertex_buffer_max_index);
if (alt_num_verts) {
- assert(count < (1 << 24));
BEGIN_CS(16);
OUT_CS_REG(R500_VAP_ALT_NUM_VERTICES, count);
} else {
@@ -445,7 +450,7 @@ void r300_draw_arrays(struct pipe_context* pipe, unsigned mode,
/* Make sure there are at least 128 spare dwords in the command buffer.
* (most of it being consumed by emit_aos) */
r300_reserve_cs_space(r300, r300_get_num_dirty_dwords(r300) + 128);
- r300_emit_buffer_validate(r300, TRUE, 0);
+ r300_emit_buffer_validate(r300, TRUE, NULL);
r300_emit_dirty_state(r300);
if (alt_num_verts || count <= 65535) {
@@ -463,7 +468,7 @@ void r300_draw_arrays(struct pipe_context* pipe, unsigned mode,
/* Again, we emit both AOS and draw_arrays so there should be
* at least 128 spare dwords. */
if (count && r300_reserve_cs_space(r300, 128)) {
- r300_emit_buffer_validate(r300, TRUE, 0);
+ r300_emit_buffer_validate(r300, TRUE, NULL);
r300_emit_dirty_state(r300);
}
} while (count);
@@ -683,6 +688,7 @@ static void r300_render_draw_arrays(struct vbuf_render* render,
CS_LOCALS(r300);
r300_reserve_cs_space(r300, r300_get_num_dirty_dwords(r300) + 2);
+ r300_emit_buffer_validate(r300, FALSE, NULL);
r300_emit_dirty_state(r300);
DBG(r300, DBG_DRAW, "r300: Doing vbuf render, count %d\n", count);
@@ -706,6 +712,7 @@ static void r300_render_draw(struct vbuf_render* render,
CS_LOCALS(r300);
r300_reserve_cs_space(r300, r300_get_num_dirty_dwords(r300) + dwords);
+ r300_emit_buffer_validate(r300, FALSE, NULL);
r300_emit_dirty_state(r300);
BEGIN_CS(dwords);
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 2d8b313e5d..5880eecd5f 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -1,5 +1,6 @@
/*
* Copyright 2008 Corbin Simpson <MostAwesomeDude@gmail.com>
+ * Copyright 2010 Marek Olšák <maraeo@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -20,14 +21,13 @@
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE. */
-#include "util/u_inlines.h"
#include "util/u_format.h"
#include "util/u_memory.h"
#include "util/u_simple_screen.h"
#include "r300_context.h"
-#include "r300_screen.h"
#include "r300_texture.h"
+#include "r300_transfer.h"
#include "radeon_winsys.h"
#include "r300_winsys.h"
@@ -210,9 +210,9 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
{
uint32_t retval = 0;
boolean is_r500 = r300_screen(screen)->caps->is_r500;
- boolean is_z24 = format == PIPE_FORMAT_Z24X8_UNORM ||
- format == PIPE_FORMAT_Z24S8_UNORM;
- boolean is_color2101010 = format == PIPE_FORMAT_A2B10G10R10_UNORM;
+ boolean is_z24 = format == PIPE_FORMAT_X8Z24_UNORM ||
+ format == PIPE_FORMAT_S8Z24_UNORM;
+ boolean is_color2101010 = format == PIPE_FORMAT_R10G10B10A2_UNORM;
if (target >= PIPE_MAX_TEXTURE_TYPES) {
debug_printf("r300: Implementation error: Received bogus texture "
@@ -252,70 +252,6 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
return retval == usage;
}
-static struct pipe_transfer*
-r300_get_tex_transfer(struct pipe_screen *screen,
- struct pipe_texture *texture,
- unsigned face, unsigned level, unsigned zslice,
- enum pipe_transfer_usage usage, unsigned x, unsigned y,
- unsigned w, unsigned h)
-{
- struct r300_texture *tex = (struct r300_texture *)texture;
- struct r300_transfer *trans;
- struct r300_screen *rscreen = r300_screen(screen);
- unsigned offset;
-
- offset = r300_texture_get_offset(tex, level, zslice, face); /* in bytes */
-
- trans = CALLOC_STRUCT(r300_transfer);
- if (trans) {
- pipe_texture_reference(&trans->transfer.texture, texture);
- trans->transfer.x = x;
- trans->transfer.y = y;
- trans->transfer.width = w;
- trans->transfer.height = h;
- trans->transfer.stride = r300_texture_get_stride(rscreen, tex, level);
- trans->transfer.usage = usage;
- trans->transfer.zslice = zslice;
- trans->transfer.face = face;
-
- trans->offset = offset;
- }
- return &trans->transfer;
-}
-
-static void
-r300_tex_transfer_destroy(struct pipe_transfer *trans)
-{
- pipe_texture_reference(&trans->texture, NULL);
- FREE(trans);
-}
-
-static void* r300_transfer_map(struct pipe_screen* screen,
- struct pipe_transfer* transfer)
-{
- struct r300_texture* tex = (struct r300_texture*)transfer->texture;
- char* map;
- enum pipe_format format = tex->tex.format;
-
- map = pipe_buffer_map(screen, tex->buffer,
- pipe_transfer_buffer_flags(transfer));
-
- if (!map) {
- return NULL;
- }
-
- return map + r300_transfer(transfer)->offset +
- transfer->y / util_format_get_blockheight(format) * transfer->stride +
- transfer->x / util_format_get_blockwidth(format) * util_format_get_blocksize(format);
-}
-
-static void r300_transfer_unmap(struct pipe_screen* screen,
- struct pipe_transfer* transfer)
-{
- struct r300_texture* tex = (struct r300_texture*)transfer->texture;
- pipe_buffer_unmap(screen, tex->buffer);
-}
-
static void r300_destroy_screen(struct pipe_screen* pscreen)
{
struct r300_screen* r300screen = r300_screen(pscreen);
@@ -352,13 +288,11 @@ struct pipe_screen* r300_create_screen(struct radeon_winsys* radeon_winsys)
r300screen->screen.get_paramf = r300_get_paramf;
r300screen->screen.is_format_supported = r300_is_format_supported;
r300screen->screen.context_create = r300_create_context;
- r300screen->screen.get_tex_transfer = r300_get_tex_transfer;
- r300screen->screen.tex_transfer_destroy = r300_tex_transfer_destroy;
- r300screen->screen.transfer_map = r300_transfer_map;
- r300screen->screen.transfer_unmap = r300_transfer_unmap;
r300_init_screen_texture_functions(&r300screen->screen);
+ r300_init_screen_transfer_functions(&r300screen->screen);
u_simple_screen_init(&r300screen->screen);
return &r300screen->screen;
}
+
diff --git a/src/gallium/drivers/r300/r300_screen.h b/src/gallium/drivers/r300/r300_screen.h
index 502fbfa5a2..484bde6a6b 100644
--- a/src/gallium/drivers/r300/r300_screen.h
+++ b/src/gallium/drivers/r300/r300_screen.h
@@ -1,5 +1,6 @@
/*
* Copyright 2008 Corbin Simpson <MostAwesomeDude@gmail.com>
+ * Copyright 2010 Marek Olšák <maraeo@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -27,6 +28,8 @@
#include "r300_chipset.h"
+#define R300_TEXTURE_USAGE_TRANSFER PIPE_TEXTURE_USAGE_CUSTOM
+
struct radeon_winsys;
struct r300_screen {
@@ -35,6 +38,10 @@ struct r300_screen {
struct radeon_winsys* radeon_winsys;
+ /* XXX This hack will be removed once texture transfers become part of
+ * pipe_context. */
+ struct pipe_context* ctx;
+
/* Chipset capabilities */
struct r300_capabilities* caps;
@@ -42,25 +49,14 @@ struct r300_screen {
unsigned debug;
};
-struct r300_transfer {
- /* Parent class */
- struct pipe_transfer transfer;
-
- /* Offset from start of buffer. */
- unsigned offset;
-};
/* Convenience cast wrapper. */
static INLINE struct r300_screen* r300_screen(struct pipe_screen* screen) {
return (struct r300_screen*)screen;
}
-/* Convenience cast wrapper. */
-static INLINE struct r300_transfer*
-r300_transfer(struct pipe_transfer* transfer)
-{
- return (struct r300_transfer*)transfer;
-}
+/* Creates a new r300 screen. */
+struct pipe_screen* r300_create_screen(struct radeon_winsys* radeon_winsys);
/* Debug functionality. */
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 12bf083871..8c9f604622 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -43,6 +43,12 @@
/* r300_state: Functions used to intialize state context by translating
* Gallium state objects into semi-native r300 state objects. */
+#define UPDATE_STATE(cso, atom) \
+ if (cso != atom.state) { \
+ atom.state = cso; \
+ atom.dirty = TRUE; \
+ }
+
static boolean blend_discard_if_src_alpha_0(unsigned srcRGB, unsigned srcA,
unsigned dstRGB, unsigned dstA)
{
@@ -328,8 +334,7 @@ static void r300_bind_blend_state(struct pipe_context* pipe,
{
struct r300_context* r300 = r300_context(pipe);
- r300->blend_state.state = state;
- r300->blend_state.dirty = TRUE;
+ UPDATE_STATE(state, r300->blend_state);
}
/* Free blend state. */
@@ -356,7 +361,7 @@ static void r300_set_blend_color(struct pipe_context* pipe,
(struct r300_blend_color_state*)r300->blend_color_state.state;
union util_color uc;
- util_pack_color(color->color, PIPE_FORMAT_A8R8G8B8_UNORM, &uc);
+ util_pack_color(color->color, PIPE_FORMAT_B8G8R8A8_UNORM, &uc);
state->blend_color = uc.ui;
/* XXX if FP16 blending is enabled, we should use the FP16 format */
@@ -376,6 +381,8 @@ static void r300_set_clip_state(struct pipe_context* pipe,
{
struct r300_context* r300 = r300_context(pipe);
+ r300->clip = *state;
+
if (r300_screen(pipe->screen)->caps->has_tcl) {
memcpy(r300->clip_state.state, state, sizeof(struct pipe_clip_state));
r300->clip_state.size = 29;
@@ -476,11 +483,8 @@ static void r300_bind_dsa_state(struct pipe_context* pipe,
void* state)
{
struct r300_context* r300 = r300_context(pipe);
- struct r300_screen* r300screen = r300_screen(pipe->screen);
- r300->dsa_state.state = state;
- r300->dsa_state.size = r300screen->caps->is_r500 ? 8 : 6;
- r300->dsa_state.dirty = TRUE;
+ UPDATE_STATE(state, r300->dsa_state);
}
/* Free DSA state. */
@@ -567,6 +571,7 @@ static void
{
struct r300_context* r300 = r300_context(pipe);
struct r300_screen* r300screen = r300_screen(pipe->screen);
+ struct pipe_framebuffer_state *old_state = r300->fb_state.state;
unsigned max_width, max_height;
uint32_t zbuffer_bpp = 0;
@@ -591,23 +596,30 @@ static void
return;
}
-
if (r300->draw) {
draw_flush(r300->draw);
}
- memcpy(r300->fb_state.state, state, sizeof(struct pipe_framebuffer_state));
+ r300->fb_state.dirty = TRUE;
- r300->fb_state.size = (10 * state->nr_cbufs) + (2 * (4 - state->nr_cbufs)) +
- (state->zsbuf ? 10 : 0) + 8;
+ /* If nr_cbufs is changed from zero to non-zero or vice versa... */
+ if (!!old_state->nr_cbufs != !!state->nr_cbufs) {
+ r300->blend_state.dirty = TRUE;
+ }
+ /* If zsbuf is set from NULL to non-NULL or vice versa.. */
+ if (!!old_state->zsbuf != !!state->zsbuf) {
+ r300->dsa_state.dirty = TRUE;
+ }
+ if (!r300->scissor_enabled) {
+ r300->scissor_state.dirty = TRUE;
+ }
r300_fb_update_tiling_flags(r300, r300->fb_state.state, state);
- /* XXX wait what */
- r300->blend_state.dirty = TRUE;
- r300->dsa_state.dirty = TRUE;
- r300->fb_state.dirty = TRUE;
- r300->scissor_state.dirty = TRUE;
+ memcpy(r300->fb_state.state, state, sizeof(struct pipe_framebuffer_state));
+
+ r300->fb_state.size = (10 * state->nr_cbufs) + (2 * (4 - state->nr_cbufs)) +
+ (state->zsbuf ? 10 : 0) + 8;
/* Polygon offset depends on the zbuffer bit depth. */
if (state->zsbuf && r300->polygon_offset_enabled) {
@@ -712,10 +724,8 @@ static void* r300_create_rs_state(struct pipe_context* pipe,
rs->vap_control_status = R300_VC_32BIT_SWAP;
#endif
- /* If bypassing TCL, or if no TCL engine is present, turn off the HW TCL.
- * Else, enable HW TCL and force Draw's TCL off. */
- if (state->bypass_vs_clip_and_viewport ||
- !r300screen->caps->has_tcl) {
+ /* If no TCL engine is present, turn off the HW TCL. */
+ if (!r300screen->caps->has_tcl) {
rs->vap_control_status |= R300_VAP_TCL_BYPASS;
}
@@ -804,6 +814,7 @@ static void r300_bind_rs_state(struct pipe_context* pipe, void* state)
{
struct r300_context* r300 = r300_context(pipe);
struct r300_rs_state* rs = (struct r300_rs_state*)state;
+ boolean scissor_was_enabled = r300->scissor_enabled;
if (r300->draw) {
draw_flush(r300->draw);
@@ -811,23 +822,18 @@ static void r300_bind_rs_state(struct pipe_context* pipe, void* state)
}
if (rs) {
- r300->tcl_bypass = rs->rs.bypass_vs_clip_and_viewport;
r300->polygon_offset_enabled = rs->rs.offset_cw || rs->rs.offset_ccw;
- r300->rs_state.dirty = TRUE;
+ r300->scissor_enabled = rs->rs.scissor;
} else {
- r300->tcl_bypass = FALSE;
r300->polygon_offset_enabled = FALSE;
+ r300->scissor_enabled = FALSE;
}
- r300->rs_state.state = rs;
+ UPDATE_STATE(state, r300->rs_state);
r300->rs_state.size = 17 + (r300->polygon_offset_enabled ? 5 : 0);
- /* XXX Why is this still needed, dammit!? */
- r300->scissor_state.dirty = TRUE;
- r300->viewport_state.dirty = TRUE;
- /* XXX Clean these up when we move to atom emits */
- if (r300->fs && r300->fs->inputs.wpos != ATTR_UNUSED) {
- r300->dirty_state |= R300_NEW_FRAGMENT_SHADER_CONSTANTS;
+ if (scissor_was_enabled != r300->scissor_enabled) {
+ r300->scissor_state.dirty = TRUE;
}
}
@@ -869,7 +875,7 @@ static void*
sampler->filter1 |= r300_anisotropy(state->max_anisotropy);
- util_pack_color(state->border_color, PIPE_FORMAT_A8R8G8B8_UNORM, &uc);
+ util_pack_color(state->border_color, PIPE_FORMAT_B8G8R8A8_UNORM, &uc);
sampler->border_color = uc.ui;
/* R500-specific fixups and optimizations */
@@ -972,7 +978,9 @@ static void r300_set_scissor_state(struct pipe_context* pipe,
memcpy(r300->scissor_state.state, state,
sizeof(struct pipe_scissor_state));
- r300->scissor_state.dirty = TRUE;
+ if (r300->scissor_enabled) {
+ r300->scissor_state.dirty = TRUE;
+ }
}
static void r300_set_viewport_state(struct pipe_context* pipe,
@@ -982,6 +990,8 @@ static void r300_set_viewport_state(struct pipe_context* pipe,
struct r300_viewport_state* viewport =
(struct r300_viewport_state*)r300->viewport_state.state;
+ r300->viewport = *state;
+
/* Do the transform in HW. */
viewport->vte_control = R300_VTX_W0_FMT;
@@ -1085,69 +1095,71 @@ static void* r300_create_vs_state(struct pipe_context* pipe,
{
struct r300_context* r300 = r300_context(pipe);
- if (r300_screen(pipe->screen)->caps->has_tcl) {
- struct r300_vertex_shader* vs = CALLOC_STRUCT(r300_vertex_shader);
- /* Copy state directly into shader. */
- vs->state = *shader;
- vs->state.tokens = tgsi_dup_tokens(shader->tokens);
+ struct r300_vertex_shader* vs = CALLOC_STRUCT(r300_vertex_shader);
+ r300_vertex_shader_common_init(vs, shader);
- tgsi_scan_shader(shader->tokens, &vs->info);
-
- return (void*)vs;
+ if (r300_screen(pipe->screen)->caps->has_tcl) {
+ r300_translate_vertex_shader(r300, vs);
} else {
- return draw_create_vertex_shader(r300->draw, shader);
+ vs->draw_vs = draw_create_vertex_shader(r300->draw, shader);
}
+
+ return vs;
}
static void r300_bind_vs_state(struct pipe_context* pipe, void* shader)
{
struct r300_context* r300 = r300_context(pipe);
+ struct r300_vertex_shader* vs = (struct r300_vertex_shader*)shader;
- if (r300_screen(pipe->screen)->caps->has_tcl) {
- struct r300_vertex_shader* vs = (struct r300_vertex_shader*)shader;
+ if (vs == NULL) {
+ r300->vs_state.state = NULL;
+ return;
+ }
+ if (vs == r300->vs_state.state) {
+ return;
+ }
+ r300->vs_state.state = vs;
- if (vs == NULL) {
- r300->vs_state.state = NULL;
- return;
- } else if (!vs->translated) {
- r300_translate_vertex_shader(r300, vs);
- }
+ // VS output mapping for HWTCL or stream mapping for SWTCL to the RS block
+ if (r300->fs) {
+ r300_vertex_shader_setup_wpos(r300);
+ }
+ memcpy(r300->vap_output_state.state, &vs->vap_out,
+ sizeof(struct r300_vap_output_state));
+ r300->vap_output_state.dirty = TRUE;
- r300->vs_state.state = vs;
- r300->vs_state.size = vs->code.length + 9;
+ /* The majority of the RS block bits is dependent on the vertex shader. */
+ r300->rs_block_state.dirty = TRUE; /* Will be updated before the emission. */
+
+ if (r300_screen(pipe->screen)->caps->has_tcl) {
r300->vs_state.dirty = TRUE;
+ r300->vs_state.size = vs->code.length + 9;
- r300->rs_block_state.dirty = TRUE; /* Will be updated before the emission. */
- r300->vap_output_state.dirty = TRUE;
- r300->vertex_stream_state.dirty = TRUE; /* XXX needed for TCL bypass */
r300->pvs_flush.dirty = TRUE;
- if (r300->fs) {
- r300_vertex_shader_setup_wpos(r300);
- }
-
r300->dirty_state |= R300_NEW_VERTEX_SHADER_CONSTANTS;
} else {
draw_flush(r300->draw);
draw_bind_vertex_shader(r300->draw,
- (struct draw_vertex_shader*)shader);
+ (struct draw_vertex_shader*)vs->draw_vs);
}
}
static void r300_delete_vs_state(struct pipe_context* pipe, void* shader)
{
struct r300_context* r300 = r300_context(pipe);
+ struct r300_vertex_shader* vs = (struct r300_vertex_shader*)shader;
if (r300_screen(pipe->screen)->caps->has_tcl) {
- struct r300_vertex_shader* vs = (struct r300_vertex_shader*)shader;
-
rc_constants_destroy(&vs->code.constants);
- FREE((void*)vs->state.tokens);
- FREE(shader);
} else {
draw_delete_vertex_shader(r300->draw,
- (struct draw_vertex_shader*)shader);
+ (struct draw_vertex_shader*)vs->draw_vs);
}
+
+ FREE((void*)vs->state.tokens);
+ FREE(shader);
}
static void r300_set_constant_buffer(struct pipe_context *pipe,
@@ -1199,8 +1211,10 @@ static void r300_set_constant_buffer(struct pipe_context *pipe,
pipe_buffer_unmap(pipe->screen, buf);
if (shader == PIPE_SHADER_VERTEX) {
- r300->dirty_state |= R300_NEW_VERTEX_SHADER_CONSTANTS;
- r300->pvs_flush.dirty = TRUE;
+ if (r300screen->caps->has_tcl) {
+ r300->dirty_state |= R300_NEW_VERTEX_SHADER_CONSTANTS;
+ r300->pvs_flush.dirty = TRUE;
+ }
}
else if (shader == PIPE_SHADER_FRAGMENT)
r300->dirty_state |= R300_NEW_FRAGMENT_SHADER_CONSTANTS;
diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c
index 6eb7f2bfd1..e9e40747ef 100644
--- a/src/gallium/drivers/r300/r300_state_derived.c
+++ b/src/gallium/drivers/r300/r300_state_derived.c
@@ -119,13 +119,7 @@ static void r300_vertex_psc(struct r300_context* r300)
memset(vformat, 0, sizeof(struct r300_vertex_stream_state));
- /* If TCL is bypassed, map vertex streams to equivalent VS output
- * locations. */
- if (r300->tcl_bypass) {
- stream_tab = vs->stream_loc_notcl;
- } else {
- stream_tab = identity;
- }
+ stream_tab = identity;
/* Vertex shaders have no semantics on their inputs,
* so PSC should just route stuff based on the vertex elements,
@@ -439,18 +433,13 @@ static void r300_update_derived_shader_state(struct r300_context* r300)
{
struct r300_vertex_shader* vs = r300->vs_state.state;
struct r300_screen* r300screen = r300_screen(r300->context.screen);
- struct r300_vap_output_state *vap_out =
- (struct r300_vap_output_state*)r300->vap_output_state.state;
-
- /* XXX Mmm, delicious hax */
- memset(&r300->vertex_info, 0, sizeof(struct vertex_info));
- memcpy(vap_out, vs->hwfmt, sizeof(uint)*4);
r300_update_rs_block(r300, &vs->outputs, &r300->fs->inputs);
if (r300screen->caps->has_tcl) {
r300_vertex_psc(r300);
} else {
+ memset(&r300->vertex_info, 0, sizeof(struct vertex_info));
r300_draw_emit_all_attribs(r300);
draw_compute_vertex_size(&r300->vertex_info);
r300_swtcl_vertex_psc(r300);
@@ -588,8 +577,7 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300)
void r300_update_derived_state(struct r300_context* r300)
{
if (r300->rs_block_state.dirty ||
- r300->vertex_stream_state.dirty || /* XXX put updating this state out of this file */
- r300->rs_state.dirty) { /* XXX and remove this one (tcl_bypass dependency) */
+ r300->vertex_stream_state.dirty) { /* XXX put updating PSC out of this file */
r300_update_derived_shader_state(r300);
}
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index 93224e8d20..21e5910450 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -92,8 +92,8 @@ static uint32_t r300_translate_texformat(enum pipe_format format)
switch (format) {
case PIPE_FORMAT_Z16_UNORM:
return R300_EASY_TX_FORMAT(X, X, X, X, X16);
- case PIPE_FORMAT_Z24X8_UNORM:
- case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
return R300_EASY_TX_FORMAT(X, X, X, X, W24_FP);
default:
return ~0; /* Unsupported. */
@@ -104,9 +104,9 @@ static uint32_t r300_translate_texformat(enum pipe_format format)
result |= R300_TX_FORMAT_YUV_TO_RGB;
switch (format) {
- case PIPE_FORMAT_YCBCR:
+ case PIPE_FORMAT_UYVY:
return R300_EASY_TX_FORMAT(X, Y, Z, ONE, YVYU422) | result;
- case PIPE_FORMAT_YCBCR_REV:
+ case PIPE_FORMAT_YUYV:
return R300_EASY_TX_FORMAT(X, Y, Z, ONE, VYUY422) | result;
default:
return ~0; /* Unsupported/unknown. */
@@ -308,33 +308,30 @@ static uint32_t r300_translate_colorformat(enum pipe_format format)
return R300_COLOR_FORMAT_I8;
/* 16-bit buffers. */
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
return R300_COLOR_FORMAT_RGB565;
- case PIPE_FORMAT_A1R5G5B5_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
return R300_COLOR_FORMAT_ARGB1555;
- case PIPE_FORMAT_A4R4G4B4_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
return R300_COLOR_FORMAT_ARGB4444;
/* 32-bit buffers. */
- case PIPE_FORMAT_A8R8G8B8_UNORM:
- case PIPE_FORMAT_A8R8G8B8_SRGB:
- case PIPE_FORMAT_X8R8G8B8_UNORM:
- case PIPE_FORMAT_X8R8G8B8_SRGB:
case PIPE_FORMAT_B8G8R8A8_UNORM:
case PIPE_FORMAT_B8G8R8A8_SRGB:
case PIPE_FORMAT_B8G8R8X8_UNORM:
case PIPE_FORMAT_B8G8R8X8_SRGB:
- case PIPE_FORMAT_R8G8B8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_SRGB:
+ case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_X8R8G8B8_SRGB:
+ case PIPE_FORMAT_A8B8G8R8_UNORM:
case PIPE_FORMAT_R8G8B8A8_SNORM:
- case PIPE_FORMAT_R8G8B8A8_SRGB:
- case PIPE_FORMAT_R8G8B8X8_UNORM:
- case PIPE_FORMAT_R8G8B8X8_SRGB:
- case PIPE_FORMAT_R8G8B8X8_SNORM:
- case PIPE_FORMAT_A8B8G8R8_SNORM:
- case PIPE_FORMAT_X8B8G8R8_SNORM:
- case PIPE_FORMAT_X8UB8UG8SR8S_NORM:
+ case PIPE_FORMAT_A8B8G8R8_SRGB:
+ case PIPE_FORMAT_X8B8G8R8_UNORM:
+ case PIPE_FORMAT_X8B8G8R8_SRGB:
+ case PIPE_FORMAT_R8SG8SB8UX8U_NORM:
return R300_COLOR_FORMAT_ARGB8888;
- case PIPE_FORMAT_A2B10G10R10_UNORM:
+ case PIPE_FORMAT_R10G10B10A2_UNORM:
return R500_COLOR_FORMAT_ARGB2101010; /* R5xx-only? */
/* 64-bit buffers. */
@@ -351,9 +348,9 @@ static uint32_t r300_translate_colorformat(enum pipe_format format)
#endif
/* YUV buffers. */
- case PIPE_FORMAT_YCBCR:
+ case PIPE_FORMAT_UYVY:
return R300_COLOR_FORMAT_YVYU;
- case PIPE_FORMAT_YCBCR_REV:
+ case PIPE_FORMAT_YUYV:
return R300_COLOR_FORMAT_VYUY;
default:
return ~0; /* Unsupported. */
@@ -368,9 +365,9 @@ static uint32_t r300_translate_zsformat(enum pipe_format format)
case PIPE_FORMAT_Z16_UNORM:
return R300_DEPTHFORMAT_16BIT_INT_Z;
/* 24-bit depth, ignored stencil */
- case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
/* 24-bit depth, 8-bit stencil */
- case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
return R300_DEPTHFORMAT_24BIT_INT_Z_8BIT_STENCIL;
default:
return ~0; /* Unsupported. */
@@ -437,42 +434,39 @@ static uint32_t r300_translate_out_fmt(enum pipe_format format)
return modifier | R300_C2_SEL_R;
/* ARGB 32-bit outputs. */
- case PIPE_FORMAT_R5G6B5_UNORM:
- case PIPE_FORMAT_A1R5G5B5_UNORM:
- case PIPE_FORMAT_A4R4G4B4_UNORM:
- case PIPE_FORMAT_A8R8G8B8_UNORM:
- case PIPE_FORMAT_A8R8G8B8_SRGB:
- case PIPE_FORMAT_X8R8G8B8_UNORM:
- case PIPE_FORMAT_X8R8G8B8_SRGB:
+ case PIPE_FORMAT_B5G6R5_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_SRGB:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_SRGB:
return modifier |
R300_C0_SEL_B | R300_C1_SEL_G |
R300_C2_SEL_R | R300_C3_SEL_A;
/* BGRA 32-bit outputs. */
- case PIPE_FORMAT_B8G8R8A8_UNORM:
- case PIPE_FORMAT_B8G8R8A8_SRGB:
- case PIPE_FORMAT_B8G8R8X8_UNORM:
- case PIPE_FORMAT_B8G8R8X8_SRGB:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_SRGB:
+ case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_X8R8G8B8_SRGB:
return modifier |
R300_C0_SEL_A | R300_C1_SEL_R |
R300_C2_SEL_G | R300_C3_SEL_B;
/* RGBA 32-bit outputs. */
- case PIPE_FORMAT_R8G8B8A8_UNORM:
+ case PIPE_FORMAT_A8B8G8R8_UNORM:
case PIPE_FORMAT_R8G8B8A8_SNORM:
- case PIPE_FORMAT_R8G8B8A8_SRGB:
- case PIPE_FORMAT_R8G8B8X8_UNORM:
- case PIPE_FORMAT_R8G8B8X8_SRGB:
- case PIPE_FORMAT_R8G8B8X8_SNORM:
+ case PIPE_FORMAT_A8B8G8R8_SRGB:
+ case PIPE_FORMAT_X8B8G8R8_UNORM:
+ case PIPE_FORMAT_X8B8G8R8_SRGB:
return modifier |
R300_C0_SEL_A | R300_C1_SEL_B |
R300_C2_SEL_G | R300_C3_SEL_R;
/* ABGR 32-bit outputs. */
- case PIPE_FORMAT_A8B8G8R8_SNORM:
- case PIPE_FORMAT_X8B8G8R8_SNORM:
- case PIPE_FORMAT_X8UB8UG8SR8S_NORM:
- case PIPE_FORMAT_A2B10G10R10_UNORM:
+ case PIPE_FORMAT_R8SG8SB8UX8U_NORM:
+ case PIPE_FORMAT_R10G10B10A2_UNORM:
/* RGBA high precision outputs (same swizzles as ABGR low precision) */
case PIPE_FORMAT_R16G16B16A16_UNORM:
case PIPE_FORMAT_R16G16B16A16_SNORM:
@@ -623,18 +617,23 @@ static unsigned r300_texture_get_tile_size(struct r300_texture* tex,
/* Return true if macrotiling should be enabled on the miplevel. */
static boolean r300_texture_macro_switch(struct r300_texture *tex,
unsigned level,
- boolean rv350_mode)
+ boolean rv350_mode,
+ int dim)
{
- unsigned tile_width, width;
+ unsigned tile, texdim;
- tile_width = r300_texture_get_tile_size(tex, TILE_WIDTH, TRUE);
- width = u_minify(tex->tex.width0, level);
+ tile = r300_texture_get_tile_size(tex, dim, TRUE);
+ if (dim == TILE_WIDTH) {
+ texdim = u_minify(tex->tex.width0, level);
+ } else {
+ texdim = u_minify(tex->tex.height0, level);
+ }
/* See TX_FILTER1_n.MACRO_SWITCH. */
if (rv350_mode) {
- return width >= tile_width;
+ return texdim >= tile;
} else {
- return width > tile_width;
+ return texdim > tile;
}
}
@@ -698,9 +697,10 @@ static void r300_setup_miptree(struct r300_screen* screen,
for (i = 0; i <= base->last_level; i++) {
/* Let's see if this miplevel can be macrotiled. */
- tex->mip_macrotile[i] = (tex->macrotile == R300_BUFFER_TILED &&
- r300_texture_macro_switch(tex, i, rv350_mode)) ?
- R300_BUFFER_TILED : R300_BUFFER_LINEAR;
+ tex->mip_macrotile[i] =
+ (tex->macrotile == R300_BUFFER_TILED &&
+ r300_texture_macro_switch(tex, i, rv350_mode, TILE_WIDTH)) ?
+ R300_BUFFER_TILED : R300_BUFFER_LINEAR;
stride = r300_texture_get_stride(screen, tex, i);
nblocksy = r300_texture_get_nblocksy(tex, i);
@@ -730,10 +730,46 @@ static void r300_setup_flags(struct r300_texture* tex)
!util_is_power_of_two(tex->tex.height0);
}
+static void r300_setup_tiling(struct pipe_screen *screen,
+ struct r300_texture *tex)
+{
+ enum pipe_format format = tex->tex.format;
+ boolean rv350_mode = r300_screen(screen)->caps->family >= CHIP_FAMILY_RV350;
+
+ if (util_format_is_compressed(format)) {
+ return;
+ }
+
+ if (tex->tex.width0 == 1 ||
+ tex->tex.height0 == 1) {
+ return;
+ }
+
+ /* Set microtiling. */
+ switch (util_format_get_blocksize(format)) {
+ case 1:
+ case 4:
+ tex->microtile = R300_BUFFER_TILED;
+ break;
+
+ /* XXX Square-tiling doesn't work with kernel older than 2.6.34,
+ * XXX need to check the DRM version */
+ /*case 2:
+ case 8:
+ tex->microtile = R300_BUFFER_SQUARETILED;
+ break;*/
+ }
+
+ /* Set macrotiling. */
+ if (r300_texture_macro_switch(tex, 0, rv350_mode, TILE_WIDTH) &&
+ r300_texture_macro_switch(tex, 0, rv350_mode, TILE_HEIGHT)) {
+ tex->macrotile = R300_BUFFER_TILED;
+ }
+}
+
/* Create a new texture. */
-static struct pipe_texture*
- r300_texture_create(struct pipe_screen* screen,
- const struct pipe_texture* template)
+static struct pipe_texture* r300_texture_create(struct pipe_screen* screen,
+ const struct pipe_texture* template)
{
struct r300_texture* tex = CALLOC_STRUCT(r300_texture);
struct r300_screen* rscreen = r300_screen(screen);
@@ -748,6 +784,9 @@ static struct pipe_texture*
tex->tex.screen = screen;
r300_setup_flags(tex);
+ if (!(template->tex_usage & R300_TEXTURE_USAGE_TRANSFER)) {
+ r300_setup_tiling(screen, tex);
+ }
r300_setup_miptree(rscreen, tex);
r300_setup_texture_state(rscreen, tex);
@@ -935,7 +974,7 @@ r300_video_surface_create(struct pipe_screen *screen,
memset(&template, 0, sizeof(struct pipe_texture));
template.target = PIPE_TEXTURE_2D;
- template.format = PIPE_FORMAT_X8R8G8B8_UNORM;
+ template.format = PIPE_FORMAT_B8G8R8X8_UNORM;
template.last_level = 0;
template.width0 = util_next_power_of_two(width);
template.height0 = util_next_power_of_two(height);
diff --git a/src/gallium/drivers/r300/r300_transfer.c b/src/gallium/drivers/r300/r300_transfer.c
new file mode 100644
index 0000000000..ec89681a3c
--- /dev/null
+++ b/src/gallium/drivers/r300/r300_transfer.c
@@ -0,0 +1,270 @@
+/*
+ * Copyright 2008 Corbin Simpson <MostAwesomeDude@gmail.com>
+ * Copyright 2010 Marek Olšák <maraeo@gmail.com>
+ *
+ * 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
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, 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 NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHOR(S) AND/OR THEIR 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. */
+
+#include "r300_context.h"
+#include "r300_transfer.h"
+#include "r300_texture.h"
+#include "r300_screen.h"
+
+#include "util/u_memory.h"
+#include "util/u_format.h"
+
+struct r300_transfer {
+ /* Parent class */
+ struct pipe_transfer transfer;
+
+ /* Pipe context. */
+ struct pipe_context *ctx;
+
+ /* Parameters of get_tex_transfer. */
+ unsigned x, y, level, zslice, face;
+
+ /* Offset from start of buffer. */
+ unsigned offset;
+
+ /* Detiled texture. */
+ struct r300_texture *detiled_texture;
+
+ /* Transfer and format flags. */
+ unsigned buffer_usage, render_target_usage;
+};
+
+/* Convenience cast wrapper. */
+static INLINE struct r300_transfer*
+r300_transfer(struct pipe_transfer* transfer)
+{
+ return (struct r300_transfer*)transfer;
+}
+
+/* Copy from a tiled texture to a detiled one. */
+static void r300_copy_from_tiled_texture(struct pipe_context *ctx,
+ struct r300_transfer *r300transfer)
+{
+ struct pipe_screen *screen = ctx->screen;
+ struct pipe_transfer *transfer = (struct pipe_transfer*)r300transfer;
+ struct pipe_texture *tex = transfer->texture;
+ struct pipe_surface *src, *dst;
+
+ src = screen->get_tex_surface(screen, tex, r300transfer->face,
+ r300transfer->level, r300transfer->zslice,
+ PIPE_BUFFER_USAGE_GPU_READ |
+ PIPE_BUFFER_USAGE_PIXEL);
+
+ dst = screen->get_tex_surface(screen, &r300transfer->detiled_texture->tex,
+ 0, 0, 0,
+ PIPE_BUFFER_USAGE_GPU_WRITE |
+ PIPE_BUFFER_USAGE_PIXEL |
+ r300transfer->buffer_usage);
+
+ ctx->surface_copy(ctx, dst, 0, 0, src, r300transfer->x, r300transfer->y,
+ transfer->width, transfer->height);
+
+ pipe_surface_reference(&src, NULL);
+ pipe_surface_reference(&dst, NULL);
+}
+
+/* Copy a detiled texture to a tiled one. */
+static void r300_copy_into_tiled_texture(struct pipe_context *ctx,
+ struct r300_transfer *r300transfer)
+{
+ struct pipe_screen *screen = ctx->screen;
+ struct pipe_transfer *transfer = (struct pipe_transfer*)r300transfer;
+ struct pipe_texture *tex = transfer->texture;
+ struct pipe_surface *src, *dst;
+
+ src = screen->get_tex_surface(screen, &r300transfer->detiled_texture->tex,
+ 0, 0, 0,
+ PIPE_BUFFER_USAGE_GPU_READ |
+ PIPE_BUFFER_USAGE_PIXEL);
+
+ dst = screen->get_tex_surface(screen, tex, r300transfer->face,
+ r300transfer->level, r300transfer->zslice,
+ PIPE_BUFFER_USAGE_GPU_WRITE |
+ PIPE_BUFFER_USAGE_PIXEL);
+
+ /* XXX this flush prevents the following DRM error from occuring:
+ * [drm:radeon_cs_ioctl] *ERROR* Failed to parse relocation !
+ * Reproducible with perf/copytex. */
+ ctx->flush(ctx, 0, NULL);
+
+ ctx->surface_copy(ctx, dst, r300transfer->x, r300transfer->y, src, 0, 0,
+ transfer->width, transfer->height);
+
+ /* XXX this flush fixes a few piglit tests (e.g. glean/pixelFormats). */
+ ctx->flush(ctx, 0, NULL);
+
+ pipe_surface_reference(&src, NULL);
+ pipe_surface_reference(&dst, NULL);
+}
+
+static struct pipe_transfer*
+r300_get_tex_transfer(struct pipe_screen *screen,
+ struct pipe_texture *texture,
+ unsigned face, unsigned level, unsigned zslice,
+ enum pipe_transfer_usage usage, unsigned x, unsigned y,
+ unsigned w, unsigned h)
+{
+ struct r300_texture *tex = (struct r300_texture *)texture;
+ struct r300_transfer *trans;
+ struct r300_screen *r300screen = r300_screen(screen);
+ struct pipe_texture template;
+
+ trans = CALLOC_STRUCT(r300_transfer);
+ if (trans) {
+ /* Initialize the transfer object. */
+ pipe_texture_reference(&trans->transfer.texture, texture);
+ trans->transfer.usage = usage;
+ trans->transfer.width = w;
+ trans->transfer.height = h;
+ trans->ctx = r300screen->ctx;
+ trans->x = x;
+ trans->y = y;
+ trans->level = level;
+ trans->zslice = zslice;
+ trans->face = face;
+
+ /* If the texture is tiled, we must create a temporary detiled texture
+ * for this transfer. */
+ if (tex->microtile || tex->macrotile) {
+ trans->buffer_usage = pipe_transfer_buffer_flags(&trans->transfer);
+ trans->render_target_usage =
+ util_format_is_depth_or_stencil(texture->format) ?
+ PIPE_TEXTURE_USAGE_DEPTH_STENCIL :
+ PIPE_TEXTURE_USAGE_RENDER_TARGET;
+
+ template.target = PIPE_TEXTURE_2D;
+ template.format = texture->format;
+ template.width0 = w;
+ template.height0 = h;
+ template.depth0 = 0;
+ template.last_level = 0;
+ template.nr_samples = 0;
+ template.tex_usage = PIPE_TEXTURE_USAGE_DYNAMIC |
+ R300_TEXTURE_USAGE_TRANSFER;
+
+ /* For texture reading, the temporary (detiled) texture is used as
+ * a render target when blitting from a tiled texture. */
+ if (usage & PIPE_TRANSFER_READ) {
+ template.tex_usage |= trans->render_target_usage;
+ }
+ /* For texture writing, the temporary texture is used as a sampler
+ * when blitting into a tiled texture. */
+ if (usage & PIPE_TRANSFER_WRITE) {
+ template.tex_usage |= PIPE_TEXTURE_USAGE_SAMPLER;
+ }
+
+ /* Create the temporary texture. */
+ trans->detiled_texture =
+ (struct r300_texture*)screen->texture_create(screen, &template);
+ assert(!trans->detiled_texture->microtile &&
+ !trans->detiled_texture->macrotile);
+
+ /* Set the stride.
+ * Parameters x, y, level, zslice, and face remain zero. */
+ trans->transfer.stride =
+ r300_texture_get_stride(r300screen, trans->detiled_texture, 0);
+
+ if (usage & PIPE_TRANSFER_READ) {
+ /* We cannot map a tiled texture directly because the data is
+ * in a different order, therefore we do detiling using a blit. */
+ r300_copy_from_tiled_texture(r300screen->ctx, trans);
+ }
+ } else {
+ trans->transfer.x = x;
+ trans->transfer.y = y;
+ trans->transfer.stride =
+ r300_texture_get_stride(r300screen, tex, level);
+ trans->transfer.level = level;
+ trans->transfer.zslice = zslice;
+ trans->transfer.face = face;
+ trans->offset = r300_texture_get_offset(tex, level, zslice, face);
+ }
+ }
+ return &trans->transfer;
+}
+
+static void r300_tex_transfer_destroy(struct pipe_transfer *trans)
+{
+ struct r300_transfer *r300transfer = r300_transfer(trans);
+
+ if (r300transfer->detiled_texture) {
+ if (trans->usage & PIPE_TRANSFER_WRITE) {
+ r300_copy_into_tiled_texture(r300transfer->ctx, r300transfer);
+ }
+
+ pipe_texture_reference(
+ (struct pipe_texture**)&r300transfer->detiled_texture, NULL);
+ }
+ pipe_texture_reference(&trans->texture, NULL);
+ FREE(trans);
+}
+
+static void* r300_transfer_map(struct pipe_screen *screen,
+ struct pipe_transfer *transfer)
+{
+ struct r300_transfer *r300transfer = r300_transfer(transfer);
+ struct r300_texture *tex = (struct r300_texture*)transfer->texture;
+ char *map;
+ enum pipe_format format = tex->tex.format;
+
+ if (r300transfer->detiled_texture) {
+ /* The detiled texture is of the same size as the region being mapped
+ * (no offset needed). */
+ return pipe_buffer_map(screen,
+ r300transfer->detiled_texture->buffer,
+ pipe_transfer_buffer_flags(transfer));
+ } else {
+ /* Tiling is disabled. */
+ map = pipe_buffer_map(screen, tex->buffer,
+ pipe_transfer_buffer_flags(transfer));
+
+ if (!map) {
+ return NULL;
+ }
+
+ return map + r300_transfer(transfer)->offset +
+ transfer->y / util_format_get_blockheight(format) * transfer->stride +
+ transfer->x / util_format_get_blockwidth(format) * util_format_get_blocksize(format);
+ }
+}
+
+static void r300_transfer_unmap(struct pipe_screen *screen,
+ struct pipe_transfer *transfer)
+{
+ struct r300_transfer *r300transfer = r300_transfer(transfer);
+ struct r300_texture *tex = (struct r300_texture*)transfer->texture;
+
+ if (r300transfer->detiled_texture) {
+ pipe_buffer_unmap(screen, r300transfer->detiled_texture->buffer);
+ } else {
+ pipe_buffer_unmap(screen, tex->buffer);
+ }
+}
+
+void r300_init_screen_transfer_functions(struct pipe_screen *screen)
+{
+ screen->get_tex_transfer = r300_get_tex_transfer;
+ screen->tex_transfer_destroy = r300_tex_transfer_destroy;
+ screen->transfer_map = r300_transfer_map;
+ screen->transfer_unmap = r300_transfer_unmap;
+}
diff --git a/src/gallium/drivers/r300/r300_transfer.h b/src/gallium/drivers/r300/r300_transfer.h
new file mode 100644
index 0000000000..60d1d3dc85
--- /dev/null
+++ b/src/gallium/drivers/r300/r300_transfer.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2008 Corbin Simpson <MostAwesomeDude@gmail.com>
+ * Copyright 2010 Marek Olšák <maraeo@gmail.com>
+ *
+ * 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
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, 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 NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHOR(S) AND/OR THEIR 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. */
+
+#ifndef R300_TRANSFER
+#define R300_TRANSFER
+
+#include "pipe/p_screen.h"
+
+void r300_init_screen_transfer_functions(struct pipe_screen *screen);
+
+#endif
diff --git a/src/gallium/drivers/r300/r300_vs.c b/src/gallium/drivers/r300/r300_vs.c
index 60a04bbfed..379939ac75 100644
--- a/src/gallium/drivers/r300/r300_vs.c
+++ b/src/gallium/drivers/r300/r300_vs.c
@@ -89,95 +89,41 @@ static void r300_shader_read_vs_outputs(
assert(0);
}
}
+
+ /* WPOS is a straight copy of POSITION and it's always emitted. */
+ vs_outputs->wpos = i;
}
-static void r300_shader_vap_output_fmt(struct r300_vertex_shader* vs)
+/* This function sets up:
+ * - VAP mapping, which maps VS registers to output semantics and
+ * at the same time it indicates which attributes are enabled and should
+ * be rasterized.
+ * - Stream mapping to VS outputs if TCL is not present. */
+static void r300_init_vs_output_mapping(struct r300_vertex_shader* vs)
{
struct r300_shader_semantics* vs_outputs = &vs->outputs;
- uint32_t* hwfmt = vs->hwfmt;
- int i, gen_count;
+ struct r300_vap_output_state *vap_out = &vs->vap_out;
+ int *stream_loc = vs->stream_loc_notcl;
+ int i, gen_count, tabi = 0;
boolean any_bcolor_used = vs_outputs->bcolor[0] != ATTR_UNUSED ||
vs_outputs->bcolor[1] != ATTR_UNUSED;
- /* Do the actual vertex_info setup.
- *
- * vertex_info has four uints of hardware-specific data in it.
- * vinfo.hwfmt[0] is R300_VAP_VTX_STATE_CNTL
- * vinfo.hwfmt[1] is R300_VAP_VSM_VTX_ASSM
- * vinfo.hwfmt[2] is R300_VAP_OUTPUT_VTX_FMT_0
- * vinfo.hwfmt[3] is R300_VAP_OUTPUT_VTX_FMT_1 */
-
- hwfmt[0] = 0x5555; /* XXX this is classic Mesa bonghits */
+ vap_out->vap_vtx_state_cntl = 0x5555; /* XXX this is classic Mesa bonghits */
/* Position. */
if (vs_outputs->pos != ATTR_UNUSED) {
- hwfmt[1] |= R300_INPUT_CNTL_POS;
- hwfmt[2] |= R300_VAP_OUTPUT_VTX_FMT_0__POS_PRESENT;
+ vap_out->vap_vsm_vtx_assm |= R300_INPUT_CNTL_POS;
+ vap_out->vap_out_vtx_fmt[0] |= R300_VAP_OUTPUT_VTX_FMT_0__POS_PRESENT;
+
+ stream_loc[tabi++] = 0;
} else {
assert(0);
}
/* Point size. */
if (vs_outputs->psize != ATTR_UNUSED) {
- hwfmt[2] |= R300_VAP_OUTPUT_VTX_FMT_0__PT_SIZE_PRESENT;
- }
-
- /* Colors. */
- for (i = 0; i < ATTR_COLOR_COUNT; i++) {
- if (vs_outputs->color[i] != ATTR_UNUSED || any_bcolor_used ||
- vs_outputs->color[1] != ATTR_UNUSED) {
- hwfmt[1] |= R300_INPUT_CNTL_COLOR;
- hwfmt[2] |= R300_VAP_OUTPUT_VTX_FMT_0__COLOR_0_PRESENT << i;
- }
- }
-
- /* Back-face colors. */
- if (any_bcolor_used) {
- for (i = 0; i < ATTR_COLOR_COUNT; i++) {
- hwfmt[1] |= R300_INPUT_CNTL_COLOR;
- hwfmt[2] |= R300_VAP_OUTPUT_VTX_FMT_0__COLOR_0_PRESENT << (2+i);
- }
- }
+ vap_out->vap_out_vtx_fmt[0] |= R300_VAP_OUTPUT_VTX_FMT_0__PT_SIZE_PRESENT;
- /* Texture coordinates. */
- gen_count = 0;
- for (i = 0; i < ATTR_GENERIC_COUNT; i++) {
- if (vs_outputs->generic[i] != ATTR_UNUSED) {
- hwfmt[1] |= (R300_INPUT_CNTL_TC0 << gen_count);
- hwfmt[3] |= (4 << (3 * gen_count));
- gen_count++;
- }
- }
-
- /* Fog coordinates. */
- if (vs_outputs->fog != ATTR_UNUSED) {
- hwfmt[1] |= (R300_INPUT_CNTL_TC0 << gen_count);
- hwfmt[3] |= (4 << (3 * gen_count));
- gen_count++;
- }
-
- /* XXX magic */
- assert(gen_count <= 8);
-
- /* WPOS. */
- vs->wpos_tex_output = gen_count;
-}
-
-/* Sets up stream mapping to equivalent VS outputs if TCL is bypassed
- * or isn't present. */
-static void r300_stream_locations_notcl(
- struct r300_shader_semantics* vs_outputs,
- int* stream_loc)
-{
- int i, tabi = 0, gen_count;
- boolean any_bcolor_used = vs_outputs->bcolor[0] != ATTR_UNUSED ||
- vs_outputs->bcolor[1] != ATTR_UNUSED;
-
- /* Position. */
- stream_loc[tabi++] = 0;
-
- /* Point size. */
- if (vs_outputs->psize != ATTR_UNUSED) {
stream_loc[tabi++] = 1;
}
@@ -185,6 +131,9 @@ static void r300_stream_locations_notcl(
for (i = 0; i < ATTR_COLOR_COUNT; i++) {
if (vs_outputs->color[i] != ATTR_UNUSED || any_bcolor_used ||
vs_outputs->color[1] != ATTR_UNUSED) {
+ vap_out->vap_vsm_vtx_assm |= R300_INPUT_CNTL_COLOR;
+ vap_out->vap_out_vtx_fmt[0] |= R300_VAP_OUTPUT_VTX_FMT_0__COLOR_0_PRESENT << i;
+
stream_loc[tabi++] = 2 + i;
}
}
@@ -192,6 +141,9 @@ static void r300_stream_locations_notcl(
/* Back-face colors. */
if (any_bcolor_used) {
for (i = 0; i < ATTR_COLOR_COUNT; i++) {
+ vap_out->vap_vsm_vtx_assm |= R300_INPUT_CNTL_COLOR;
+ vap_out->vap_out_vtx_fmt[0] |= R300_VAP_OUTPUT_VTX_FMT_0__COLOR_0_PRESENT << (2+i);
+
stream_loc[tabi++] = 4 + i;
}
}
@@ -200,6 +152,9 @@ static void r300_stream_locations_notcl(
gen_count = 0;
for (i = 0; i < ATTR_GENERIC_COUNT; i++) {
if (vs_outputs->generic[i] != ATTR_UNUSED) {
+ vap_out->vap_vsm_vtx_assm |= (R300_INPUT_CNTL_TC0 << gen_count);
+ vap_out->vap_out_vtx_fmt[1] |= (4 << (3 * gen_count));
+
assert(tabi < 16);
stream_loc[tabi++] = 6 + gen_count;
gen_count++;
@@ -208,17 +163,22 @@ static void r300_stream_locations_notcl(
/* Fog coordinates. */
if (vs_outputs->fog != ATTR_UNUSED) {
+ vap_out->vap_vsm_vtx_assm |= (R300_INPUT_CNTL_TC0 << gen_count);
+ vap_out->vap_out_vtx_fmt[1] |= (4 << (3 * gen_count));
+
assert(tabi < 16);
stream_loc[tabi++] = 6 + gen_count;
gen_count++;
}
+ /* XXX magic */
+ assert(gen_count <= 8);
+
/* WPOS. */
- if (vs_outputs->wpos != ATTR_UNUSED) {
- assert(tabi < 16);
- stream_loc[tabi++] = 6 + gen_count;
- gen_count++;
- }
+ vs->wpos_tex_output = gen_count;
+
+ assert(tabi < 16);
+ stream_loc[tabi++] = 6 + gen_count;
for (; tabi < 16;) {
stream_loc[tabi++] = -1;
@@ -294,26 +254,16 @@ static void set_vertex_inputs_outputs(struct r300_vertex_program_compiler * c)
}
}
-static void r300_insert_wpos(struct r300_vertex_program_compiler* c,
- struct r300_shader_semantics* outputs)
+void r300_vertex_shader_common_init(struct r300_vertex_shader *vs,
+ const struct pipe_shader_state *shader)
{
- int i, lastOutput = 0;
-
- /* Find the max output index. */
- lastOutput = MAX2(lastOutput, outputs->psize);
- for (i = 0; i < ATTR_COLOR_COUNT; i++) {
- lastOutput = MAX2(lastOutput, outputs->color[i]);
- lastOutput = MAX2(lastOutput, outputs->bcolor[i]);
- }
- for (i = 0; i < ATTR_GENERIC_COUNT; i++) {
- lastOutput = MAX2(lastOutput, outputs->generic[i]);
- }
- lastOutput = MAX2(lastOutput, outputs->fog);
+ /* Copy state directly into shader. */
+ vs->state = *shader;
+ vs->state.tokens = tgsi_dup_tokens(shader->tokens);
+ tgsi_scan_shader(shader->tokens, &vs->info);
- /* Set WPOS after the last output. */
- lastOutput++;
- rc_copy_output(&c->Base, 0, lastOutput); /* out[lastOutput] = out[0]; */
- outputs->wpos = lastOutput;
+ r300_shader_read_vs_outputs(&vs->info, &vs->outputs);
+ r300_init_vs_output_mapping(vs);
}
void r300_translate_vertex_shader(struct r300_context* r300,
@@ -322,9 +272,6 @@ void r300_translate_vertex_shader(struct r300_context* r300,
struct r300_vertex_program_compiler compiler;
struct tgsi_to_rc ttr;
- /* Initialize. */
- r300_shader_read_vs_outputs(&vs->info, &vs->outputs);
-
/* Setup the compiler */
rc_init(&compiler.Base);
@@ -348,10 +295,7 @@ void r300_translate_vertex_shader(struct r300_context* r300,
compiler.SetHwInputOutput = &set_vertex_inputs_outputs;
/* Insert the WPOS output. */
- r300_insert_wpos(&compiler, &vs->outputs);
-
- r300_shader_vap_output_fmt(vs);
- r300_stream_locations_notcl(&vs->outputs, vs->stream_loc_notcl);
+ rc_copy_output(&compiler.Base, 0, vs->outputs.wpos);
/* Invoke the compiler */
r3xx_compile_vertex_program(&compiler);
@@ -363,30 +307,29 @@ void r300_translate_vertex_shader(struct r300_context* r300,
/* And, finally... */
rc_destroy(&compiler.Base);
- vs->translated = TRUE;
}
boolean r300_vertex_shader_setup_wpos(struct r300_context* r300)
{
struct r300_vertex_shader* vs = r300->vs_state.state;
+ struct r300_vap_output_state *vap_out = &vs->vap_out;
int tex_output = vs->wpos_tex_output;
uint32_t tex_fmt = R300_INPUT_CNTL_TC0 << tex_output;
- uint32_t* hwfmt = vs->hwfmt;
if (r300->fs->inputs.wpos != ATTR_UNUSED) {
/* Enable WPOS in VAP. */
- if (!(hwfmt[1] & tex_fmt)) {
- hwfmt[1] |= tex_fmt;
- hwfmt[3] |= (4 << (3 * tex_output));
+ if (!(vap_out->vap_vsm_vtx_assm & tex_fmt)) {
+ vap_out->vap_vsm_vtx_assm |= tex_fmt;
+ vap_out->vap_out_vtx_fmt[1] |= (4 << (3 * tex_output));
assert(tex_output < 8);
return TRUE;
}
} else {
/* Disable WPOS in VAP. */
- if (hwfmt[1] & tex_fmt) {
- hwfmt[1] &= ~tex_fmt;
- hwfmt[3] &= ~(4 << (3 * tex_output));
+ if (vap_out->vap_vsm_vtx_assm & tex_fmt) {
+ vap_out->vap_vsm_vtx_assm &= ~tex_fmt;
+ vap_out->vap_out_vtx_fmt[1] &= ~(4 << (3 * tex_output));
return TRUE;
}
}
diff --git a/src/gallium/drivers/r300/r300_vs.h b/src/gallium/drivers/r300/r300_vs.h
index 18cfeee3cd..f6f0b86b68 100644
--- a/src/gallium/drivers/r300/r300_vs.h
+++ b/src/gallium/drivers/r300/r300_vs.h
@@ -28,6 +28,7 @@
#include "tgsi/tgsi_scan.h"
#include "radeon_code.h"
+#include "r300_context.h"
#include "r300_shader_semantics.h"
struct r300_context;
@@ -38,7 +39,7 @@ struct r300_vertex_shader {
struct tgsi_shader_info info;
struct r300_shader_semantics outputs;
- uint hwfmt[4];
+ struct r300_vap_output_state vap_out;
/* Stream locations for SWTCL or if TCL is bypassed. */
int stream_loc_notcl[16];
@@ -46,13 +47,17 @@ struct r300_vertex_shader {
/* Output stream location for WPOS. */
int wpos_tex_output;
- /* Has this shader been translated yet? */
- boolean translated;
-
+ /* HWTCL-specific. */
/* Machine code (if translated) */
struct r300_vertex_program_code code;
+
+ /* SWTCL-specific. */
+ void *draw_vs;
};
+void r300_vertex_shader_common_init(struct r300_vertex_shader *vs,
+ const struct pipe_shader_state *shader);
+
void r300_translate_vertex_shader(struct r300_context* r300,
struct r300_vertex_shader* vs);
diff --git a/src/gallium/drivers/softpipe/sp_quad_depth_test.c b/src/gallium/drivers/softpipe/sp_quad_depth_test.c
index dab9565443..4815a0d49f 100644
--- a/src/gallium/drivers/softpipe/sp_quad_depth_test.c
+++ b/src/gallium/drivers/softpipe/sp_quad_depth_test.c
@@ -73,8 +73,8 @@ get_depth_stencil_values( struct depth_data *data,
data->bzzzz[j] = tile->data.depth32[y][x];
}
break;
- case PIPE_FORMAT_X8Z24_UNORM:
- case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
for (j = 0; j < QUAD_SIZE; j++) {
int x = quad->input.x0 % TILE_SIZE + (j & 1);
int y = quad->input.y0 % TILE_SIZE + (j >> 1);
@@ -82,8 +82,8 @@ get_depth_stencil_values( struct depth_data *data,
data->stencilVals[j] = tile->data.depth32[y][x] >> 24;
}
break;
- case PIPE_FORMAT_Z24X8_UNORM:
- case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
for (j = 0; j < QUAD_SIZE; j++) {
int x = quad->input.x0 % TILE_SIZE + (j & 1);
int y = quad->input.y0 % TILE_SIZE + (j >> 1);
@@ -146,8 +146,8 @@ convert_quad_depth( struct depth_data *data,
}
}
break;
- case PIPE_FORMAT_X8Z24_UNORM:
- case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
{
float scale = (float) ((1 << 24) - 1);
@@ -156,8 +156,8 @@ convert_quad_depth( struct depth_data *data,
}
}
break;
- case PIPE_FORMAT_Z24X8_UNORM:
- case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
{
float scale = (float) ((1 << 24) - 1);
@@ -189,7 +189,7 @@ write_depth_stencil_values( struct depth_data *data,
tile->data.depth16[y][x] = (ushort) data->bzzzz[j];
}
break;
- case PIPE_FORMAT_X8Z24_UNORM:
+ case PIPE_FORMAT_Z24X8_UNORM:
case PIPE_FORMAT_Z32_UNORM:
for (j = 0; j < QUAD_SIZE; j++) {
int x = quad->input.x0 % TILE_SIZE + (j & 1);
@@ -197,21 +197,21 @@ write_depth_stencil_values( struct depth_data *data,
tile->data.depth32[y][x] = data->bzzzz[j];
}
break;
- case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
for (j = 0; j < QUAD_SIZE; j++) {
int x = quad->input.x0 % TILE_SIZE + (j & 1);
int y = quad->input.y0 % TILE_SIZE + (j >> 1);
tile->data.depth32[y][x] = (data->stencilVals[j] << 24) | data->bzzzz[j];
}
break;
- case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
for (j = 0; j < QUAD_SIZE; j++) {
int x = quad->input.x0 % TILE_SIZE + (j & 1);
int y = quad->input.y0 % TILE_SIZE + (j >> 1);
tile->data.depth32[y][x] = (data->bzzzz[j] << 8) | data->stencilVals[j];
}
break;
- case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
for (j = 0; j < QUAD_SIZE; j++) {
int x = quad->input.x0 % TILE_SIZE + (j & 1);
int y = quad->input.y0 % TILE_SIZE + (j >> 1);
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index 87415f4340..6ec63fe698 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -152,17 +152,17 @@ softpipe_is_format_supported( struct pipe_screen *screen,
switch(format) {
case PIPE_FORMAT_L16_UNORM:
- case PIPE_FORMAT_YCBCR_REV:
- case PIPE_FORMAT_YCBCR:
+ case PIPE_FORMAT_YUYV:
+ case PIPE_FORMAT_UYVY:
case PIPE_FORMAT_DXT1_RGB:
case PIPE_FORMAT_DXT1_RGBA:
case PIPE_FORMAT_DXT3_RGBA:
case PIPE_FORMAT_DXT5_RGBA:
case PIPE_FORMAT_Z32_FLOAT:
case PIPE_FORMAT_R8G8_SNORM:
- case PIPE_FORMAT_B6UG5SR5S_NORM:
- case PIPE_FORMAT_X8UB8UG8SR8S_NORM:
- case PIPE_FORMAT_A8B8G8R8_SNORM:
+ case PIPE_FORMAT_R5SG5SB6U_NORM:
+ case PIPE_FORMAT_R8SG8SB8UX8U_NORM:
+ case PIPE_FORMAT_R8G8B8A8_SNORM:
case PIPE_FORMAT_NONE:
return FALSE;
default:
diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c
index ecd6b39863..ef7ccf4189 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.c
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.c
@@ -55,7 +55,7 @@
static INLINE float
frac(float f)
{
- return f - util_ifloor(f);
+ return f - floorf(f);
}
@@ -201,11 +201,9 @@ wrap_nearest_mirror_repeat(const float s[4], unsigned size, int icoord[4])
const float max = 1.0F - min;
for (ch = 0; ch < 4; ch++) {
const int flr = util_ifloor(s[ch]);
- float u;
+ float u = frac(s[ch]);
if (flr & 1)
- u = 1.0F - (s[ch] - (float) flr);
- else
- u = s[ch] - (float) flr;
+ u = 1.0F - u;
if (u < min)
icoord[ch] = 0;
else if (u > max)
@@ -358,11 +356,9 @@ wrap_linear_mirror_repeat(const float s[4], unsigned size,
uint ch;
for (ch = 0; ch < 4; ch++) {
const int flr = util_ifloor(s[ch]);
- float u;
+ float u = frac(s[ch]);
if (flr & 1)
- u = 1.0F - (s[ch] - (float) flr);
- else
- u = s[ch] - (float) flr;
+ u = 1.0F - u;
u = u * size - 0.5F;
icoord0[ch] = util_ifloor(u);
icoord1[ch] = icoord0[ch] + 1;
@@ -441,8 +437,7 @@ wrap_linear_mirror_clamp_to_border(const float s[4], unsigned size,
/**
- * For RECT textures / unnormalized texcoords
- * Only a subset of wrap modes supported.
+ * PIPE_TEX_WRAP_CLAMP for nearest sampling, unnormalized coords.
*/
static void
wrap_nearest_unorm_clamp(const float s[4], unsigned size, int icoord[4])
@@ -456,7 +451,7 @@ wrap_nearest_unorm_clamp(const float s[4], unsigned size, int icoord[4])
/**
- * Handles clamp_to_edge and clamp_to_border:
+ * PIPE_TEX_WRAP_CLAMP_TO_BORDER for nearest sampling, unnormalized coords.
*/
static void
wrap_nearest_unorm_clamp_to_border(const float s[4], unsigned size,
@@ -464,14 +459,27 @@ wrap_nearest_unorm_clamp_to_border(const float s[4], unsigned size,
{
uint ch;
for (ch = 0; ch < 4; ch++) {
+ icoord[ch]= util_ifloor( CLAMP(s[ch], -0.5F, (float) size + 0.5F) );
+ }
+}
+
+
+/**
+ * PIPE_TEX_WRAP_CLAMP_TO_EDGE for nearest sampling, unnormalized coords.
+ */
+static void
+wrap_nearest_unorm_clamp_to_edge(const float s[4], unsigned size,
+ int icoord[4])
+{
+ uint ch;
+ for (ch = 0; ch < 4; ch++) {
icoord[ch]= util_ifloor( CLAMP(s[ch], 0.5F, (float) size - 0.5F) );
}
}
/**
- * For RECT textures / unnormalized texcoords.
- * Only a subset of wrap modes supported.
+ * PIPE_TEX_WRAP_CLAMP for linear sampling, unnormalized coords.
*/
static void
wrap_linear_unorm_clamp(const float s[4], unsigned size,
@@ -488,13 +496,36 @@ wrap_linear_unorm_clamp(const float s[4], unsigned size,
}
+/**
+ * PIPE_TEX_WRAP_CLAMP_TO_BORDER for linear sampling, unnormalized coords.
+ */
static void
wrap_linear_unorm_clamp_to_border(const float s[4], unsigned size,
int icoord0[4], int icoord1[4], float w[4])
{
uint ch;
for (ch = 0; ch < 4; ch++) {
- float u = CLAMP(s[ch], 0.5F, (float) size - 0.5F);
+ float u = CLAMP(s[ch], -0.5F, (float) size + 0.5F);
+ u -= 0.5F;
+ icoord0[ch] = util_ifloor(u);
+ icoord1[ch] = icoord0[ch] + 1;
+ if (icoord1[ch] > (int) size - 1)
+ icoord1[ch] = size - 1;
+ w[ch] = frac(u);
+ }
+}
+
+
+/**
+ * PIPE_TEX_WRAP_CLAMP_TO_EDGE for linear sampling, unnormalized coords.
+ */
+static void
+wrap_linear_unorm_clamp_to_edge(const float s[4], unsigned size,
+ int icoord0[4], int icoord1[4], float w[4])
+{
+ uint ch;
+ for (ch = 0; ch < 4; ch++) {
+ float u = CLAMP(s[ch], +0.5F, (float) size - 0.5F);
u -= 0.5F;
icoord0[ch] = util_ifloor(u);
icoord1[ch] = icoord0[ch] + 1;
@@ -1711,6 +1742,7 @@ get_nearest_unorm_wrap(unsigned mode)
case PIPE_TEX_WRAP_CLAMP:
return wrap_nearest_unorm_clamp;
case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
+ return wrap_nearest_unorm_clamp_to_edge;
case PIPE_TEX_WRAP_CLAMP_TO_BORDER:
return wrap_nearest_unorm_clamp_to_border;
default:
@@ -1754,6 +1786,7 @@ get_linear_unorm_wrap(unsigned mode)
case PIPE_TEX_WRAP_CLAMP:
return wrap_linear_unorm_clamp;
case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
+ return wrap_linear_unorm_clamp_to_edge;
case PIPE_TEX_WRAP_CLAMP_TO_BORDER:
return wrap_linear_unorm_clamp_to_border;
default:
diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c
index 44710d9992..6ea060023d 100644
--- a/src/gallium/drivers/softpipe/sp_texture.c
+++ b/src/gallium/drivers/softpipe/sp_texture.c
@@ -427,7 +427,7 @@ softpipe_video_surface_create(struct pipe_screen *screen,
memset(&template, 0, sizeof(struct pipe_texture));
template.target = PIPE_TEXTURE_2D;
- template.format = PIPE_FORMAT_X8R8G8B8_UNORM;
+ template.format = PIPE_FORMAT_B8G8R8X8_UNORM;
template.last_level = 0;
/* vl_mpeg12_mc_renderer expects this when it's initialized with pot_buffers=true */
template.width0 = util_next_power_of_two(width);
diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c
index 1b50bd7ffe..3b30954ac8 100644
--- a/src/gallium/drivers/softpipe/sp_tile_cache.c
+++ b/src/gallium/drivers/softpipe/sp_tile_cache.c
@@ -162,10 +162,10 @@ sp_tile_cache_set_surface(struct softpipe_tile_cache *tc,
PIPE_TRANSFER_READ_WRITE,
0, 0, ps->width, ps->height);
- tc->depth_stencil = (ps->format == PIPE_FORMAT_S8Z24_UNORM ||
- ps->format == PIPE_FORMAT_X8Z24_UNORM ||
- ps->format == PIPE_FORMAT_Z24S8_UNORM ||
+ tc->depth_stencil = (ps->format == PIPE_FORMAT_Z24S8_UNORM ||
ps->format == PIPE_FORMAT_Z24X8_UNORM ||
+ ps->format == PIPE_FORMAT_S8Z24_UNORM ||
+ ps->format == PIPE_FORMAT_X8Z24_UNORM ||
ps->format == PIPE_FORMAT_Z16_UNORM ||
ps->format == PIPE_FORMAT_Z32_UNORM ||
ps->format == PIPE_FORMAT_S8_UNORM);
diff --git a/src/gallium/drivers/softpipe/sp_video_context.c b/src/gallium/drivers/softpipe/sp_video_context.c
index 272ad40a90..242aaac466 100644
--- a/src/gallium/drivers/softpipe/sp_video_context.c
+++ b/src/gallium/drivers/softpipe/sp_video_context.c
@@ -176,7 +176,6 @@ init_pipe_state(struct sp_mpeg12_context *ctx)
rast.line_stipple_factor = 0;
rast.line_stipple_pattern = 0;
rast.line_last_pixel = 0;
- rast.bypass_vs_clip_and_viewport = 0;
rast.line_width = 1;
rast.point_smooth = 0;
rast.point_quad_rasterization = 0;
diff --git a/src/gallium/drivers/svga/svga_pipe_clear.c b/src/gallium/drivers/svga/svga_pipe_clear.c
index 409b3b41cb..8483a3fad7 100644
--- a/src/gallium/drivers/svga/svga_pipe_clear.c
+++ b/src/gallium/drivers/svga/svga_pipe_clear.c
@@ -54,7 +54,7 @@ try_clear(struct svga_context *svga,
if ((buffers & PIPE_CLEAR_COLOR) && fb->cbufs[0]) {
flags |= SVGA3D_CLEAR_COLOR;
- util_pack_color(rgba, PIPE_FORMAT_A8R8G8B8_UNORM, &uc);
+ util_pack_color(rgba, PIPE_FORMAT_B8G8R8A8_UNORM, &uc);
rect.w = fb->cbufs[0]->width;
rect.h = fb->cbufs[0]->height;
@@ -63,7 +63,7 @@ try_clear(struct svga_context *svga,
if ((buffers & PIPE_CLEAR_DEPTHSTENCIL) && fb->zsbuf) {
flags |= SVGA3D_CLEAR_DEPTH;
- if (svga->curr.framebuffer.zsbuf->format == PIPE_FORMAT_Z24S8_UNORM)
+ if (svga->curr.framebuffer.zsbuf->format == PIPE_FORMAT_S8Z24_UNORM)
flags |= SVGA3D_CLEAR_STENCIL;
rect.w = MAX2(rect.w, fb->zsbuf->width);
diff --git a/src/gallium/drivers/svga/svga_pipe_misc.c b/src/gallium/drivers/svga/svga_pipe_misc.c
index 49b43bebc2..95bf0e6f91 100644
--- a/src/gallium/drivers/svga/svga_pipe_misc.c
+++ b/src/gallium/drivers/svga/svga_pipe_misc.c
@@ -118,10 +118,10 @@ static void svga_set_framebuffer_state(struct pipe_context *pipe,
case PIPE_FORMAT_Z16_UNORM:
svga->curr.depthscale = 1.0f / DEPTH_BIAS_SCALE_FACTOR_D16;
break;
- case PIPE_FORMAT_S8Z24_UNORM:
- case PIPE_FORMAT_X8Z24_UNORM:
case PIPE_FORMAT_Z24S8_UNORM:
case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
svga->curr.depthscale = 1.0f / DEPTH_BIAS_SCALE_FACTOR_D24S8;
break;
case PIPE_FORMAT_Z32_UNORM:
diff --git a/src/gallium/drivers/svga/svga_pipe_sampler.c b/src/gallium/drivers/svga/svga_pipe_sampler.c
index 224c4f4c18..acba2b8f9d 100644
--- a/src/gallium/drivers/svga/svga_pipe_sampler.c
+++ b/src/gallium/drivers/svga/svga_pipe_sampler.c
@@ -201,7 +201,7 @@ static void svga_set_sampler_textures(struct pipe_context *pipe,
if (!texture[i])
continue;
- if (texture[i]->format == PIPE_FORMAT_A8R8G8B8_SRGB)
+ if (texture[i]->format == PIPE_FORMAT_B8G8R8A8_SRGB)
flag_srgb |= 1 << i;
if (texture[i]->target == PIPE_TEXTURE_1D)
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index 414ac52e1f..6022c38cfc 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -196,23 +196,23 @@ svga_translate_format_cap(enum pipe_format format)
{
switch(format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
return SVGA3D_DEVCAP_SURFACEFMT_A8R8G8B8;
- case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
return SVGA3D_DEVCAP_SURFACEFMT_X8R8G8B8;
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
return SVGA3D_DEVCAP_SURFACEFMT_R5G6B5;
- case PIPE_FORMAT_A1R5G5B5_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
return SVGA3D_DEVCAP_SURFACEFMT_A1R5G5B5;
- case PIPE_FORMAT_A4R4G4B4_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
return SVGA3D_DEVCAP_SURFACEFMT_A4R4G4B4;
case PIPE_FORMAT_Z16_UNORM:
return SVGA3D_DEVCAP_SURFACEFMT_Z_D16;
- case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
return SVGA3D_DEVCAP_SURFACEFMT_Z_D24S8;
- case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
return SVGA3D_DEVCAP_SURFACEFMT_Z_D24X8;
case PIPE_FORMAT_A8_UNORM:
@@ -254,8 +254,8 @@ svga_is_format_supported( struct pipe_screen *screen,
/* Often unsupported/problematic. This means we end up with the same
* visuals for all virtual hardware implementations.
*/
- case PIPE_FORMAT_A4R4G4B4_UNORM:
- case PIPE_FORMAT_A1R5G5B5_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
return FALSE;
/* Simulate ability to render into compressed textures */
diff --git a/src/gallium/drivers/svga/svga_screen_texture.c b/src/gallium/drivers/svga/svga_screen_texture.c
index 994a6e0fd1..4b045c44d8 100644
--- a/src/gallium/drivers/svga/svga_screen_texture.c
+++ b/src/gallium/drivers/svga/svga_screen_texture.c
@@ -59,21 +59,21 @@ svga_translate_format(enum pipe_format format)
{
switch(format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
return SVGA3D_A8R8G8B8;
- case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
return SVGA3D_X8R8G8B8;
/* Required for GL2.1:
*/
- case PIPE_FORMAT_A8R8G8B8_SRGB:
+ case PIPE_FORMAT_B8G8R8A8_SRGB:
return SVGA3D_A8R8G8B8;
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
return SVGA3D_R5G6B5;
- case PIPE_FORMAT_A1R5G5B5_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
return SVGA3D_A1R5G5B5;
- case PIPE_FORMAT_A4R4G4B4_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
return SVGA3D_A4R4G4B4;
@@ -83,9 +83,9 @@ svga_translate_format(enum pipe_format format)
*/
case PIPE_FORMAT_Z16_UNORM:
return SVGA3D_Z_D16;
- case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
return SVGA3D_Z_D24S8;
- case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
return SVGA3D_Z_D24X8;
case PIPE_FORMAT_A8_UNORM:
@@ -111,13 +111,13 @@ SVGA3dSurfaceFormat
svga_translate_format_render(enum pipe_format format)
{
switch(format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
- case PIPE_FORMAT_X8R8G8B8_UNORM:
- case PIPE_FORMAT_A1R5G5B5_UNORM:
- case PIPE_FORMAT_A4R4G4B4_UNORM:
- case PIPE_FORMAT_R5G6B5_UNORM:
- case PIPE_FORMAT_Z24S8_UNORM:
- case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
case PIPE_FORMAT_Z32_UNORM:
case PIPE_FORMAT_Z16_UNORM:
case PIPE_FORMAT_L8_UNORM:
@@ -407,9 +407,9 @@ svga_texture_blanket(struct pipe_screen * screen,
if (sbuf->key.format == 1)
- tex->base.format = PIPE_FORMAT_X8R8G8B8_UNORM;
+ tex->base.format = PIPE_FORMAT_B8G8R8X8_UNORM;
else if (sbuf->key.format == 2)
- tex->base.format = PIPE_FORMAT_A8R8G8B8_UNORM;
+ tex->base.format = PIPE_FORMAT_B8G8R8A8_UNORM;
pipe_reference_init(&tex->base.reference, 1);
tex->base.screen = screen;
@@ -470,9 +470,9 @@ svga_screen_texture_from_handle(struct pipe_screen *screen,
if (format == 1)
- tex->base.format = PIPE_FORMAT_X8R8G8B8_UNORM;
+ tex->base.format = PIPE_FORMAT_B8G8R8X8_UNORM;
else if (format == 2)
- tex->base.format = PIPE_FORMAT_A8R8G8B8_UNORM;
+ tex->base.format = PIPE_FORMAT_B8G8R8A8_UNORM;
pipe_reference_init(&tex->base.reference, 1);
tex->base.screen = screen;
diff --git a/src/gallium/drivers/svga/svga_state_framebuffer.c b/src/gallium/drivers/svga/svga_state_framebuffer.c
index b4cafb8f21..b710914acd 100644
--- a/src/gallium/drivers/svga/svga_state_framebuffer.c
+++ b/src/gallium/drivers/svga/svga_state_framebuffer.c
@@ -70,7 +70,7 @@ static int emit_framebuffer( struct svga_context *svga,
return ret;
if (curr->zsbuf &&
- curr->zsbuf->format == PIPE_FORMAT_Z24S8_UNORM) {
+ curr->zsbuf->format == PIPE_FORMAT_S8Z24_UNORM) {
ret = SVGA3D_SetRenderTarget(svga->swc, SVGA3D_RT_STENCIL, curr->zsbuf);
if (ret != PIPE_OK)
return ret;
@@ -120,174 +120,153 @@ static int emit_viewport( struct svga_context *svga,
float fb_width = svga->curr.framebuffer.width;
float fb_height = svga->curr.framebuffer.height;
- memset( &prescale, 0, sizeof(prescale) );
-
- if (svga->curr.rast->templ.bypass_vs_clip_and_viewport) {
-
- /* Avoid POSITIONT as it has a non trivial implementation outside the D3D
- * API. Always generate a vertex shader.
- */
- rect.x = 0;
- rect.y = 0;
- rect.w = svga->curr.framebuffer.width;
- rect.h = svga->curr.framebuffer.height;
-
- prescale.scale[0] = 2.0 / (float)rect.w;
- prescale.scale[1] = - 2.0 / (float)rect.h;
- prescale.scale[2] = 1.0;
- prescale.scale[3] = 1.0;
- prescale.translate[0] = -1.0f;
- prescale.translate[1] = 1.0f;
- prescale.translate[2] = 0;
- prescale.translate[3] = 0;
- prescale.enabled = TRUE;
- } else {
-
- /* Examine gallium viewport transformation and produce a screen
- * rectangle and possibly vertex shader pre-transformation to
- * get the same results.
- */
- float fx = viewport->scale[0] * -1.0 + viewport->translate[0];
- float fy = flip * viewport->scale[1] * -1.0 + viewport->translate[1];
- float fw = viewport->scale[0] * 2;
- float fh = flip * viewport->scale[1] * 2;
-
- SVGA_DBG(DEBUG_VIEWPORT,
- "\ninitial %f,%f %fx%f\n",
- fx,
- fy,
- fw,
- fh);
-
- prescale.scale[0] = 1.0;
- prescale.scale[1] = 1.0;
- prescale.scale[2] = 1.0;
- prescale.scale[3] = 1.0;
- prescale.translate[0] = 0;
- prescale.translate[1] = 0;
- prescale.translate[2] = 0;
- prescale.translate[3] = 0;
- prescale.enabled = TRUE;
-
-
-
- if (fw < 0) {
- prescale.scale[0] *= -1.0;
- prescale.translate[0] += -fw;
- fw = -fw;
- fx = viewport->scale[0] * 1.0 + viewport->translate[0];
- }
+ float fx = viewport->scale[0] * -1.0 + viewport->translate[0];
+ float fy = flip * viewport->scale[1] * -1.0 + viewport->translate[1];
+ float fw = viewport->scale[0] * 2;
+ float fh = flip * viewport->scale[1] * 2;
- if (fh < 0) {
- prescale.scale[1] *= -1.0;
- prescale.translate[1] += -fh;
- fh = -fh;
- fy = flip * viewport->scale[1] * 1.0 + viewport->translate[1];
- }
+ memset( &prescale, 0, sizeof(prescale) );
- if (fx < 0) {
- prescale.translate[0] += fx;
- prescale.scale[0] *= fw / (fw + fx);
- fw += fx;
- fx = 0;
- }
+ /* Examine gallium viewport transformation and produce a screen
+ * rectangle and possibly vertex shader pre-transformation to
+ * get the same results.
+ */
- if (fy < 0) {
- prescale.translate[1] += fy;
- prescale.scale[1] *= fh / (fh + fy);
- fh += fy;
- fy = 0;
- }
+ SVGA_DBG(DEBUG_VIEWPORT,
+ "\ninitial %f,%f %fx%f\n",
+ fx,
+ fy,
+ fw,
+ fh);
+
+ prescale.scale[0] = 1.0;
+ prescale.scale[1] = 1.0;
+ prescale.scale[2] = 1.0;
+ prescale.scale[3] = 1.0;
+ prescale.translate[0] = 0;
+ prescale.translate[1] = 0;
+ prescale.translate[2] = 0;
+ prescale.translate[3] = 0;
+ prescale.enabled = TRUE;
+
+
+
+ if (fw < 0) {
+ prescale.scale[0] *= -1.0;
+ prescale.translate[0] += -fw;
+ fw = -fw;
+ fx = viewport->scale[0] * 1.0 + viewport->translate[0];
+ }
- if (fx + fw > fb_width) {
- prescale.scale[0] *= fw / (fb_width - fx);
- prescale.translate[0] -= fx * (fw / (fb_width - fx));
- prescale.translate[0] += fx;
- fw = fb_width - fx;
-
- }
+ if (fh < 0) {
+ prescale.scale[1] *= -1.0;
+ prescale.translate[1] += -fh;
+ fh = -fh;
+ fy = flip * viewport->scale[1] * 1.0 + viewport->translate[1];
+ }
- if (fy + fh > fb_height) {
- prescale.scale[1] *= fh / (fb_height - fy);
- prescale.translate[1] -= fy * (fh / (fb_height - fy));
- prescale.translate[1] += fy;
- fh = fb_height - fy;
- }
+ if (fx < 0) {
+ prescale.translate[0] += fx;
+ prescale.scale[0] *= fw / (fw + fx);
+ fw += fx;
+ fx = 0;
+ }
- if (fw < 0 || fh < 0) {
- fw = fh = fx = fy = 0;
- degenerate = TRUE;
- goto out;
- }
+ if (fy < 0) {
+ prescale.translate[1] += fy;
+ prescale.scale[1] *= fh / (fh + fy);
+ fh += fy;
+ fy = 0;
+ }
+ if (fx + fw > fb_width) {
+ prescale.scale[0] *= fw / (fb_width - fx);
+ prescale.translate[0] -= fx * (fw / (fb_width - fx));
+ prescale.translate[0] += fx;
+ fw = fb_width - fx;
+
+ }
- /* D3D viewport is integer space. Convert fx,fy,etc. to
- * integers.
- *
- * TODO: adjust pretranslate correct for any subpixel error
- * introduced converting to integers.
- */
- rect.x = fx;
- rect.y = fy;
- rect.w = fw;
- rect.h = fh;
+ if (fy + fh > fb_height) {
+ prescale.scale[1] *= fh / (fb_height - fy);
+ prescale.translate[1] -= fy * (fh / (fb_height - fy));
+ prescale.translate[1] += fy;
+ fh = fb_height - fy;
+ }
- SVGA_DBG(DEBUG_VIEWPORT,
- "viewport error %f,%f %fx%f\n",
- fabs((float)rect.x - fx),
- fabs((float)rect.y - fy),
- fabs((float)rect.w - fw),
- fabs((float)rect.h - fh));
+ if (fw < 0 || fh < 0) {
+ fw = fh = fx = fy = 0;
+ degenerate = TRUE;
+ goto out;
+ }
- SVGA_DBG(DEBUG_VIEWPORT,
- "viewport %d,%d %dx%d\n",
- rect.x,
- rect.y,
- rect.w,
- rect.h);
-
- /* Finally, to get GL rasterization rules, need to tweak the
- * screen-space coordinates slightly relative to D3D which is
- * what hardware implements natively.
- */
- if (svga->curr.rast->templ.gl_rasterization_rules) {
- float adjust_x = 0.0;
- float adjust_y = 0.0;
-
- switch (svga->curr.reduced_prim) {
- case PIPE_PRIM_LINES:
- adjust_x = -0.5;
- adjust_y = 0;
- break;
- case PIPE_PRIM_POINTS:
- case PIPE_PRIM_TRIANGLES:
- adjust_x = -0.375;
- adjust_y = -0.5;
- break;
- }
-
- prescale.translate[0] += adjust_x;
- prescale.translate[1] += adjust_y;
- prescale.translate[2] = 0.5; /* D3D clip space */
- prescale.scale[2] = 0.5; /* D3D clip space */
+ /* D3D viewport is integer space. Convert fx,fy,etc. to
+ * integers.
+ *
+ * TODO: adjust pretranslate correct for any subpixel error
+ * introduced converting to integers.
+ */
+ rect.x = fx;
+ rect.y = fy;
+ rect.w = fw;
+ rect.h = fh;
+
+ SVGA_DBG(DEBUG_VIEWPORT,
+ "viewport error %f,%f %fx%f\n",
+ fabs((float)rect.x - fx),
+ fabs((float)rect.y - fy),
+ fabs((float)rect.w - fw),
+ fabs((float)rect.h - fh));
+
+ SVGA_DBG(DEBUG_VIEWPORT,
+ "viewport %d,%d %dx%d\n",
+ rect.x,
+ rect.y,
+ rect.w,
+ rect.h);
+
+
+ /* Finally, to get GL rasterization rules, need to tweak the
+ * screen-space coordinates slightly relative to D3D which is
+ * what hardware implements natively.
+ */
+ if (svga->curr.rast->templ.gl_rasterization_rules) {
+ float adjust_x = 0.0;
+ float adjust_y = 0.0;
+
+ switch (svga->curr.reduced_prim) {
+ case PIPE_PRIM_LINES:
+ adjust_x = -0.5;
+ adjust_y = 0;
+ break;
+ case PIPE_PRIM_POINTS:
+ case PIPE_PRIM_TRIANGLES:
+ adjust_x = -0.375;
+ adjust_y = -0.5;
+ break;
}
+ prescale.translate[0] += adjust_x;
+ prescale.translate[1] += adjust_y;
+ prescale.translate[2] = 0.5; /* D3D clip space */
+ prescale.scale[2] = 0.5; /* D3D clip space */
+ }
- range_min = viewport->scale[2] * -1.0 + viewport->translate[2];
- range_max = viewport->scale[2] * 1.0 + viewport->translate[2];
- /* D3D (and by implication SVGA) doesn't like dealing with zmax
- * less than zmin. Detect that case, flip the depth range and
- * invert our z-scale factor to achieve the same effect.
- */
- if (range_min > range_max) {
- float range_tmp;
- range_tmp = range_min;
- range_min = range_max;
- range_max = range_tmp;
- prescale.scale[2] = -prescale.scale[2];
- }
+ range_min = viewport->scale[2] * -1.0 + viewport->translate[2];
+ range_max = viewport->scale[2] * 1.0 + viewport->translate[2];
+
+ /* D3D (and by implication SVGA) doesn't like dealing with zmax
+ * less than zmin. Detect that case, flip the depth range and
+ * invert our z-scale factor to achieve the same effect.
+ */
+ if (range_min > range_max) {
+ float range_tmp;
+ range_tmp = range_min;
+ range_min = range_max;
+ range_max = range_tmp;
+ prescale.scale[2] = -prescale.scale[2];
}
if (prescale.enabled) {
diff --git a/src/gallium/drivers/svga/svga_state_need_swtnl.c b/src/gallium/drivers/svga/svga_state_need_swtnl.c
index dd13a89d24..d774e3e504 100644
--- a/src/gallium/drivers/svga/svga_state_need_swtnl.c
+++ b/src/gallium/drivers/svga/svga_state_need_swtnl.c
@@ -43,7 +43,7 @@ svga_translate_vertex_format(enum pipe_format format)
case PIPE_FORMAT_R32G32_FLOAT: return SVGA3D_DECLTYPE_FLOAT2;
case PIPE_FORMAT_R32G32B32_FLOAT: return SVGA3D_DECLTYPE_FLOAT3;
case PIPE_FORMAT_R32G32B32A32_FLOAT: return SVGA3D_DECLTYPE_FLOAT4;
- case PIPE_FORMAT_B8G8R8A8_UNORM: return SVGA3D_DECLTYPE_D3DCOLOR;
+ case PIPE_FORMAT_A8R8G8B8_UNORM: return SVGA3D_DECLTYPE_D3DCOLOR;
case PIPE_FORMAT_R8G8B8A8_USCALED: return SVGA3D_DECLTYPE_UBYTE4;
case PIPE_FORMAT_R16G16_SSCALED: return SVGA3D_DECLTYPE_SHORT2;
case PIPE_FORMAT_R16G16B16A16_SSCALED: return SVGA3D_DECLTYPE_SHORT4;
@@ -129,8 +129,7 @@ static int update_need_pipeline( struct svga_context *svga,
/* SVGA_NEW_CLIP
*/
- if (!svga->curr.rast->templ.bypass_vs_clip_and_viewport &&
- svga->curr.clip.nr) {
+ if (svga->curr.clip.nr) {
SVGA_DBG(DEBUG_SWTNL, "%s: userclip\n", __FUNCTION__);
need_pipeline = TRUE;
}
diff --git a/src/gallium/drivers/trace/tr_dump_state.c b/src/gallium/drivers/trace/tr_dump_state.c
index 6da186a655..f97d963dba 100644
--- a/src/gallium/drivers/trace/tr_dump_state.c
+++ b/src/gallium/drivers/trace/tr_dump_state.c
@@ -112,7 +112,6 @@ void trace_dump_rasterizer_state(const struct pipe_rasterizer_state *state)
trace_dump_member(uint, state, line_stipple_factor);
trace_dump_member(uint, state, line_stipple_pattern);
trace_dump_member(bool, state, line_last_pixel);
- trace_dump_member(bool, state, bypass_vs_clip_and_viewport);
trace_dump_member(bool, state, flatshade_first);
trace_dump_member(bool, state, gl_rasterization_rules);
diff --git a/src/gallium/include/pipe/p_compiler.h b/src/gallium/include/pipe/p_compiler.h
index c7d3507494..b93b38310a 100644
--- a/src/gallium/include/pipe/p_compiler.h
+++ b/src/gallium/include/pipe/p_compiler.h
@@ -106,8 +106,7 @@ typedef unsigned char boolean;
/* Function visibility */
#ifndef PUBLIC
-# if (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303) \
- || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define PUBLIC __attribute__((visibility("default")))
# else
# define PUBLIC
@@ -119,7 +118,7 @@ typedef unsigned char boolean;
* If we're not using gcc, define __FUNCTION__ as a cpp symbol here.
*/
#ifndef __FUNCTION__
-# if (!defined(__GNUC__) || (__GNUC__ < 2))
+# if !defined(__GNUC__)
# if (__STDC_VERSION__ >= 199901L) /* C99 */ || \
(defined(__SUNPRO_C) && defined(__C99FEATURES__))
# define __FUNCTION__ __func__
@@ -145,7 +144,7 @@ typedef unsigned char boolean;
-#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
+#if defined(__GNUC__)
#define PIPE_DEPRECATED __attribute__((__deprecated__))
#else
#define PIPE_DEPRECATED
diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h
index f33b0639ef..cbf3273ec8 100644
--- a/src/gallium/include/pipe/p_format.h
+++ b/src/gallium/include/pipe/p_format.h
@@ -45,28 +45,28 @@ extern "C" {
enum pipe_format {
PIPE_FORMAT_NONE = 0,
- PIPE_FORMAT_A8R8G8B8_UNORM = 1,
- PIPE_FORMAT_X8R8G8B8_UNORM = 2,
- PIPE_FORMAT_B8G8R8A8_UNORM = 3,
- PIPE_FORMAT_B8G8R8X8_UNORM = 4,
- PIPE_FORMAT_A1R5G5B5_UNORM = 5,
- PIPE_FORMAT_A4R4G4B4_UNORM = 6,
- PIPE_FORMAT_R5G6B5_UNORM = 7,
- PIPE_FORMAT_A2B10G10R10_UNORM = 8,
+ PIPE_FORMAT_B8G8R8A8_UNORM = 1,
+ PIPE_FORMAT_B8G8R8X8_UNORM = 2,
+ PIPE_FORMAT_A8R8G8B8_UNORM = 3,
+ PIPE_FORMAT_X8R8G8B8_UNORM = 4,
+ PIPE_FORMAT_B5G5R5A1_UNORM = 5,
+ PIPE_FORMAT_B4G4R4A4_UNORM = 6,
+ PIPE_FORMAT_B5G6R5_UNORM = 7,
+ PIPE_FORMAT_R10G10B10A2_UNORM = 8,
PIPE_FORMAT_L8_UNORM = 9, /**< ubyte luminance */
PIPE_FORMAT_A8_UNORM = 10, /**< ubyte alpha */
PIPE_FORMAT_I8_UNORM = 11, /**< ubyte intensity */
- PIPE_FORMAT_A8L8_UNORM = 12, /**< ubyte alpha, luminance */
+ PIPE_FORMAT_L8A8_UNORM = 12, /**< ubyte alpha, luminance */
PIPE_FORMAT_L16_UNORM = 13, /**< ushort luminance */
- PIPE_FORMAT_YCBCR = 14,
- PIPE_FORMAT_YCBCR_REV = 15,
+ PIPE_FORMAT_UYVY = 14,
+ PIPE_FORMAT_YUYV = 15,
PIPE_FORMAT_Z16_UNORM = 16,
PIPE_FORMAT_Z32_UNORM = 17,
PIPE_FORMAT_Z32_FLOAT = 18,
- PIPE_FORMAT_S8Z24_UNORM = 19,
- PIPE_FORMAT_Z24S8_UNORM = 20,
- PIPE_FORMAT_X8Z24_UNORM = 21,
- PIPE_FORMAT_Z24X8_UNORM = 22,
+ PIPE_FORMAT_Z24S8_UNORM = 19,
+ PIPE_FORMAT_S8Z24_UNORM = 20,
+ PIPE_FORMAT_Z24X8_UNORM = 21,
+ PIPE_FORMAT_X8Z24_UNORM = 22,
PIPE_FORMAT_S8_UNORM = 23, /**< ubyte stencil */
PIPE_FORMAT_R64_FLOAT = 24,
PIPE_FORMAT_R64G64_FLOAT = 25,
@@ -112,43 +112,37 @@ enum pipe_format {
PIPE_FORMAT_R8G8_UNORM = 65,
PIPE_FORMAT_R8G8B8_UNORM = 66,
PIPE_FORMAT_R8G8B8A8_UNORM = 67,
- PIPE_FORMAT_R8G8B8X8_UNORM = 68,
+ PIPE_FORMAT_X8B8G8R8_UNORM = 68,
PIPE_FORMAT_R8_USCALED = 69,
PIPE_FORMAT_R8G8_USCALED = 70,
PIPE_FORMAT_R8G8B8_USCALED = 71,
PIPE_FORMAT_R8G8B8A8_USCALED = 72,
- PIPE_FORMAT_R8G8B8X8_USCALED = 73,
PIPE_FORMAT_R8_SNORM = 74,
PIPE_FORMAT_R8G8_SNORM = 75,
PIPE_FORMAT_R8G8B8_SNORM = 76,
PIPE_FORMAT_R8G8B8A8_SNORM = 77,
- PIPE_FORMAT_R8G8B8X8_SNORM = 78,
- PIPE_FORMAT_B6G5R5_SNORM = 79,
- PIPE_FORMAT_A8B8G8R8_SNORM = 80,
- PIPE_FORMAT_X8B8G8R8_SNORM = 81,
PIPE_FORMAT_R8_SSCALED = 82,
PIPE_FORMAT_R8G8_SSCALED = 83,
PIPE_FORMAT_R8G8B8_SSCALED = 84,
PIPE_FORMAT_R8G8B8A8_SSCALED = 85,
- PIPE_FORMAT_R8G8B8X8_SSCALED = 86,
PIPE_FORMAT_R32_FIXED = 87,
PIPE_FORMAT_R32G32_FIXED = 88,
PIPE_FORMAT_R32G32B32_FIXED = 89,
PIPE_FORMAT_R32G32B32A32_FIXED = 90,
/* sRGB formats */
PIPE_FORMAT_L8_SRGB = 91,
- PIPE_FORMAT_A8L8_SRGB = 92,
+ PIPE_FORMAT_L8A8_SRGB = 92,
PIPE_FORMAT_R8G8B8_SRGB = 93,
- PIPE_FORMAT_R8G8B8A8_SRGB = 94,
- PIPE_FORMAT_R8G8B8X8_SRGB = 95,
- PIPE_FORMAT_A8R8G8B8_SRGB = 96,
- PIPE_FORMAT_X8R8G8B8_SRGB = 97,
- PIPE_FORMAT_B8G8R8A8_SRGB = 98,
- PIPE_FORMAT_B8G8R8X8_SRGB = 99,
+ PIPE_FORMAT_A8B8G8R8_SRGB = 94,
+ PIPE_FORMAT_X8B8G8R8_SRGB = 95,
+ PIPE_FORMAT_B8G8R8A8_SRGB = 96,
+ PIPE_FORMAT_B8G8R8X8_SRGB = 97,
+ PIPE_FORMAT_A8R8G8B8_SRGB = 98,
+ PIPE_FORMAT_X8R8G8B8_SRGB = 99,
/* mixed formats */
- PIPE_FORMAT_X8UB8UG8SR8S_NORM = 100,
- PIPE_FORMAT_B6UG5SR5S_NORM = 101,
+ PIPE_FORMAT_R8SG8SB8UX8U_NORM = 100,
+ PIPE_FORMAT_R5SG5SB6U_NORM = 101,
/* compressed formats */
PIPE_FORMAT_DXT1_RGB = 102,
@@ -162,6 +156,8 @@ enum pipe_format {
PIPE_FORMAT_DXT3_SRGBA = 108,
PIPE_FORMAT_DXT5_SRGBA = 109,
+ PIPE_FORMAT_A8B8G8R8_UNORM = 110,
+
PIPE_FORMAT_COUNT
};
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index 5ac5c87813..02558520bf 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -114,16 +114,6 @@ struct pipe_rasterizer_state
unsigned line_last_pixel:1;
/**
- * Vertex coordinates are pre-transformed to screen space. Skip
- * the vertex shader, clipping and viewport processing. Note that
- * a vertex shader is still needed though, to indicate the mapping
- * from vertex elements to fragment shader input semantics.
- *
- * XXX: considered for removal.
- */
- unsigned bypass_vs_clip_and_viewport:1;
-
- /**
* Use the first vertex of a primitive as the provoking vertex for
* flat shading.
*/
diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c
index fe91cf59b4..458473853c 100644
--- a/src/gallium/state_trackers/dri/dri_drawable.c
+++ b/src/gallium/state_trackers/dri/dri_drawable.c
@@ -353,11 +353,11 @@ dri_create_buffer(__DRIscreen * sPriv,
if (visual->redBits == 8) {
if (visual->alphaBits == 8)
- drawable->color_format = PIPE_FORMAT_A8R8G8B8_UNORM;
+ drawable->color_format = PIPE_FORMAT_B8G8R8A8_UNORM;
else
- drawable->color_format = PIPE_FORMAT_X8R8G8B8_UNORM;
+ drawable->color_format = PIPE_FORMAT_B8G8R8X8_UNORM;
} else {
- drawable->color_format = PIPE_FORMAT_R5G6B5_UNORM;
+ drawable->color_format = PIPE_FORMAT_B5G6R5_UNORM;
}
switch(visual->depthBits) {
@@ -371,12 +371,12 @@ dri_create_buffer(__DRIscreen * sPriv,
case 24:
if (visual->stencilBits == 0) {
drawable->depth_stencil_format = (screen->d_depth_bits_last) ?
- PIPE_FORMAT_X8Z24_UNORM:
- PIPE_FORMAT_Z24X8_UNORM;
+ PIPE_FORMAT_Z24X8_UNORM:
+ PIPE_FORMAT_X8Z24_UNORM;
} else {
drawable->depth_stencil_format = (screen->sd_depth_bits_last) ?
- PIPE_FORMAT_S8Z24_UNORM:
- PIPE_FORMAT_Z24S8_UNORM;
+ PIPE_FORMAT_Z24S8_UNORM:
+ PIPE_FORMAT_S8Z24_UNORM;
}
break;
case 32:
diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c
index 77d640227f..60bc560049 100644
--- a/src/gallium/state_trackers/dri/dri_screen.c
+++ b/src/gallium/state_trackers/dri/dri_screen.c
@@ -109,22 +109,22 @@ dri_fill_in_modes(struct dri_screen *screen,
stencil_bits_array[0] = 0;
depth_buffer_factor = 1;
- pf_x8z24 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_X8Z24_UNORM,
+ pf_x8z24 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_Z24X8_UNORM,
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_DEPTH_STENCIL, 0);
- pf_z24x8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_Z24X8_UNORM,
+ pf_z24x8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_X8Z24_UNORM,
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_DEPTH_STENCIL, 0);
- pf_s8z24 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_S8Z24_UNORM,
+ pf_s8z24 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_Z24S8_UNORM,
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_DEPTH_STENCIL, 0);
- pf_z24s8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_Z24S8_UNORM,
+ pf_z24s8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_S8Z24_UNORM,
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_DEPTH_STENCIL, 0);
- pf_a8r8g8b8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_A8R8G8B8_UNORM,
+ pf_a8r8g8b8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_B8G8R8A8_UNORM,
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_RENDER_TARGET, 0);
- pf_x8r8g8b8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_X8R8G8B8_UNORM,
+ pf_x8r8g8b8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_B8G8R8X8_UNORM,
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_RENDER_TARGET, 0);
@@ -139,7 +139,7 @@ dri_fill_in_modes(struct dri_screen *screen,
pf_z32 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_Z32_UNORM,
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_DEPTH_STENCIL, 0);
- pf_r5g6b5 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_R5G6B5_UNORM,
+ pf_r5g6b5 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_B5G6R5_UNORM,
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_RENDER_TARGET, 0);
} else {
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c b/src/gallium/state_trackers/egl/common/egl_g3d.c
index 086e644e21..50774b03f3 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d.c
@@ -36,6 +36,7 @@
#include "native.h"
#include "egl_g3d.h"
+#include "egl_g3d_image.h"
#include "egl_st.h"
/**
@@ -531,6 +532,24 @@ egl_g3d_update_buffer(struct pipe_screen *screen, void *context_private)
egl_g3d_validate_context(gctx->base.Resource.Display, &gctx->base);
}
+static void
+egl_g3d_invalid_surface(struct native_display *ndpy,
+ struct native_surface *nsurf,
+ unsigned int seq_num)
+{
+ /* XXX not thread safe? */
+ struct egl_g3d_surface *gsurf = egl_g3d_surface(nsurf->user_data);
+ struct egl_g3d_context *gctx = egl_g3d_context(gsurf->base.CurrentContext);
+
+ /* set force_validate to skip an unnecessary check */
+ if (gctx)
+ gctx->force_validate = TRUE;
+}
+
+static struct native_event_handler egl_g3d_native_event_handler = {
+ .invalid_surface = egl_g3d_invalid_surface
+};
+
static EGLBoolean
egl_g3d_terminate(_EGLDriver *drv, _EGLDisplay *dpy)
{
@@ -575,12 +594,14 @@ egl_g3d_initialize(_EGLDriver *drv, _EGLDisplay *dpy,
}
dpy->DriverData = gdpy;
- gdpy->native = native_create_display(dpy->NativeDisplay);
+ gdpy->native = native_create_display(dpy->NativeDisplay,
+ &egl_g3d_native_event_handler);
if (!gdpy->native) {
_eglError(EGL_NOT_INITIALIZED, "eglInitialize(no usable display)");
goto fail;
}
+ gdpy->native->user_data = (void *) dpy;
gdpy->native->screen->flush_frontbuffer = egl_g3d_flush_frontbuffer;
gdpy->native->screen->update_buffer = egl_g3d_update_buffer;
@@ -595,6 +616,10 @@ egl_g3d_initialize(_EGLDriver *drv, _EGLDisplay *dpy,
}
#endif
+ dpy->Extensions.KHR_image_base = EGL_TRUE;
+ if (gdpy->native->get_param(gdpy->native, NATIVE_PARAM_USE_NATIVE_BUFFER))
+ dpy->Extensions.KHR_image_pixmap = EGL_TRUE;
+
if (egl_g3d_add_configs(drv, dpy, 1) == 1) {
_eglError(EGL_NOT_INITIALIZED, "eglInitialize(unable to add configs)");
goto fail;
@@ -776,6 +801,7 @@ egl_g3d_create_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf,
return NULL;
}
+ nsurf->user_data = &gsurf->base;
gsurf->native = nsurf;
gsurf->render_att = (gsurf->base.RenderBuffer == EGL_SINGLE_BUFFER) ?
@@ -937,8 +963,8 @@ egl_g3d_swap_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf)
/**
* Find a config that supports the pixmap.
*/
-static _EGLConfig *
-find_pixmap_config(_EGLDisplay *dpy, EGLNativePixmapType pix)
+_EGLConfig *
+egl_g3d_find_pixmap_config(_EGLDisplay *dpy, EGLNativePixmapType pix)
{
struct egl_g3d_display *gdpy = egl_g3d_display(dpy);
struct egl_g3d_config *gconf;
@@ -990,7 +1016,7 @@ egl_g3d_copy_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
if (!gsurf->render_surface)
return EGL_TRUE;
- gconf = egl_g3d_config(find_pixmap_config(dpy, target));
+ gconf = egl_g3d_config(egl_g3d_find_pixmap_config(dpy, target));
if (!gconf)
return _eglError(EGL_BAD_NATIVE_PIXMAP, "eglCopyBuffers");
@@ -1097,7 +1123,7 @@ egl_g3d_bind_tex_image(_EGLDriver *drv, _EGLDisplay *dpy,
target_format = PIPE_FORMAT_R8G8B8_UNORM;
break;
case EGL_TEXTURE_RGBA:
- target_format = PIPE_FORMAT_A8R8G8B8_UNORM;
+ target_format = PIPE_FORMAT_B8G8R8A8_UNORM;
break;
default:
return _eglError(EGL_BAD_MATCH, "eglBindTexImage");
@@ -1301,6 +1327,9 @@ _eglMain(const char *args)
gdrv->base.API.BindTexImage = egl_g3d_bind_tex_image;
gdrv->base.API.ReleaseTexImage = egl_g3d_release_tex_image;
+ gdrv->base.API.CreateImageKHR = egl_g3d_create_image;
+ gdrv->base.API.DestroyImageKHR = egl_g3d_destroy_image;
+
#ifdef EGL_MESA_screen_surface
gdrv->base.API.CreateScreenSurfaceMESA = egl_g3d_create_screen_surface;
gdrv->base.API.ShowScreenSurfaceMESA = egl_g3d_show_screen_surface;
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.h b/src/gallium/state_trackers/egl/common/egl_g3d.h
index 5d2d9c481a..e3e55e46d3 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d.h
+++ b/src/gallium/state_trackers/egl/common/egl_g3d.h
@@ -34,6 +34,7 @@
#include "eglcontext.h"
#include "eglsurface.h"
#include "eglconfig.h"
+#include "eglimage.h"
#include "eglscreen.h"
#include "eglmode.h"
@@ -81,6 +82,14 @@ struct egl_g3d_config {
const struct native_config *native;
};
+struct egl_g3d_image {
+ _EGLImage base;
+ struct pipe_texture *texture;
+ unsigned face;
+ unsigned level;
+ unsigned zslice;
+};
+
struct egl_g3d_screen {
_EGLScreen base;
const struct native_connector *native;
@@ -90,5 +99,10 @@ struct egl_g3d_screen {
/* standard typecasts */
_EGL_DRIVER_STANDARD_TYPECASTS(egl_g3d)
_EGL_DRIVER_TYPECAST(egl_g3d_screen, _EGLScreen, obj)
+_EGL_DRIVER_TYPECAST(egl_g3d_image, _EGLImage, obj)
+
+
+_EGLConfig *
+egl_g3d_find_pixmap_config(_EGLDisplay *dpy, EGLNativePixmapType pix);
#endif /* _EGL_G3D_H_ */
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_image.c b/src/gallium/state_trackers/egl/common/egl_g3d_image.c
new file mode 100644
index 0000000000..d701f9c9a8
--- /dev/null
+++ b/src/gallium/state_trackers/egl/common/egl_g3d_image.c
@@ -0,0 +1,136 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.8
+ *
+ * Copyright (C) 2010 LunarG Inc.
+ *
+ * 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:
+ * Chia-I Wu <olv@lunarg.com>
+ */
+
+#include <assert.h>
+#include "pipe/p_screen.h"
+#include "util/u_memory.h"
+#include "util/u_rect.h"
+#include "util/u_inlines.h"
+#include "eglcurrent.h"
+#include "egllog.h"
+
+#include "native.h"
+#include "egl_g3d.h"
+#include "egl_g3d_image.h"
+
+/**
+ * Reference and return the front left buffer of the native pixmap.
+ */
+static struct pipe_texture *
+egl_g3d_reference_native_pixmap(_EGLDisplay *dpy, EGLNativePixmapType pix)
+{
+ struct egl_g3d_display *gdpy = egl_g3d_display(dpy);
+ struct egl_g3d_config *gconf;
+ struct native_surface *nsurf;
+ struct pipe_texture *textures[NUM_NATIVE_ATTACHMENTS];
+ enum native_attachment natt;
+
+ gconf = egl_g3d_config(egl_g3d_find_pixmap_config(dpy, pix));
+ if (!gconf)
+ return NULL;
+
+ nsurf = gdpy->native->create_pixmap_surface(gdpy->native,
+ pix, gconf->native);
+ if (!nsurf)
+ return NULL;
+
+ natt = NATIVE_ATTACHMENT_FRONT_LEFT;
+ if (!nsurf->validate(nsurf, 1 << natt, NULL, textures, NULL, NULL))
+ textures[natt] = NULL;
+
+ nsurf->destroy(nsurf);
+
+ return textures[natt];
+}
+
+_EGLImage *
+egl_g3d_create_image(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx,
+ EGLenum target, EGLClientBuffer buffer,
+ const EGLint *attribs)
+{
+ struct pipe_texture *ptex;
+ struct egl_g3d_image *gimg;
+ unsigned face = 0, level = 0, zslice = 0;
+
+ gimg = CALLOC_STRUCT(egl_g3d_image);
+ if (!gimg) {
+ _eglError(EGL_BAD_ALLOC, "eglCreatePbufferSurface");
+ return NULL;
+ }
+
+ if (!_eglInitImage(&gimg->base, dpy, attribs)) {
+ free(gimg);
+ return NULL;
+ }
+
+ switch (target) {
+ case EGL_NATIVE_PIXMAP_KHR:
+ ptex = egl_g3d_reference_native_pixmap(dpy,
+ (EGLNativePixmapType) buffer);
+ break;
+ default:
+ ptex = NULL;
+ break;
+ }
+
+ if (!ptex) {
+ free(gimg);
+ return NULL;
+ }
+
+ if (level > ptex->last_level) {
+ _eglError(EGL_BAD_MATCH, "eglCreateEGLImageKHR");
+ pipe_texture_reference(&gimg->texture, NULL);
+ free(gimg);
+ return NULL;
+ }
+ if (zslice > ptex->depth0) {
+ _eglError(EGL_BAD_PARAMETER, "eglCreateEGLImageKHR");
+ pipe_texture_reference(&gimg->texture, NULL);
+ free(gimg);
+ return NULL;
+ }
+
+ /* transfer the ownership to the image */
+ gimg->texture = ptex;
+ gimg->face = face;
+ gimg->level = level;
+ gimg->zslice = zslice;
+
+ return &gimg->base;
+}
+
+EGLBoolean
+egl_g3d_destroy_image(_EGLDriver *drv, _EGLDisplay *dpy, _EGLImage *img)
+{
+ struct egl_g3d_image *gimg = egl_g3d_image(img);
+
+ pipe_texture_reference(&gimg->texture, NULL);
+ free(gimg);
+
+ return EGL_TRUE;
+}
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_image.h b/src/gallium/state_trackers/egl/common/egl_g3d_image.h
new file mode 100644
index 0000000000..c199c46645
--- /dev/null
+++ b/src/gallium/state_trackers/egl/common/egl_g3d_image.h
@@ -0,0 +1,41 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.8
+ *
+ * Copyright (C) 2010 LunarG Inc.
+ *
+ * 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:
+ * Chia-I Wu <olv@lunarg.com>
+ */
+
+#ifndef _EGL_G3D_IMAGE_H_
+#define _EGL_G3D_IMAGE_H_
+
+#include "egl_g3d.h"
+
+_EGLImage *
+egl_g3d_create_image(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx,
+ EGLenum target, EGLClientBuffer buffer,
+ const EGLint *attribs);
+
+EGLBoolean
+egl_g3d_destroy_image(_EGLDriver *drv, _EGLDisplay *dpy, _EGLImage *image);
+
+#endif /* _EGL_G3D_IMAGE_H_ */
diff --git a/src/gallium/state_trackers/egl/common/native.h b/src/gallium/state_trackers/egl/common/native.h
index 4f9758545a..9c22ff3e43 100644
--- a/src/gallium/state_trackers/egl/common/native.h
+++ b/src/gallium/state_trackers/egl/common/native.h
@@ -34,6 +34,8 @@
#include "pipe/p_context.h"
#include "pipe/p_state.h"
+#include "native_modeset.h"
+
/**
* Only color buffers are listed. The others are allocated privately through,
* for example, st_renderbuffer_alloc_storage().
@@ -47,6 +49,14 @@ enum native_attachment {
NUM_NATIVE_ATTACHMENTS
};
+enum native_param_type {
+ /*
+ * Return TRUE if window/pixmap surfaces use the buffers of the native
+ * types.
+ */
+ NATIVE_PARAM_USE_NATIVE_BUFFER
+};
+
/**
* Enumerations for probe results.
*/
@@ -69,6 +79,11 @@ struct native_probe {
};
struct native_surface {
+ /**
+ * Available for caller's use.
+ */
+ void *user_data;
+
void (*destroy)(struct native_surface *nsurf);
/**
@@ -117,18 +132,6 @@ struct native_config {
boolean scanout_bit;
};
-struct native_connector {
- int dummy;
-};
-
-struct native_mode {
- const char *desc;
- int width, height;
- int refresh_rate;
-};
-
-struct native_display_modeset;
-
/**
* A pipe winsys abstracts the OS. A pipe screen abstracts the graphcis
* hardware. A native display consists of a pipe winsys, a pipe screen, and
@@ -143,9 +146,22 @@ struct native_display {
*/
struct pipe_screen *screen;
+ /**
+ * Available for caller's use.
+ */
+ void *user_data;
+
void (*destroy)(struct native_display *ndpy);
/**
+ * Query the parameters of the native display.
+ *
+ * The return value is defined by the parameter.
+ */
+ int (*get_param)(struct native_display *ndpy,
+ enum native_param_type param);
+
+ /**
* Get the supported configs. The configs are owned by the display, but
* the returned array should be free()ed.
*
@@ -196,46 +212,17 @@ struct native_display {
};
/**
- * Mode setting interface of the native display. It exposes the mode setting
- * capabilities of the underlying graphics hardware.
+ * The handler for events that a native display may generate. The events are
+ * generated asynchronously and the handler may be called by any thread at any
+ * time.
*/
-struct native_display_modeset {
- /**
- * Get the available physical connectors and the number of CRTCs.
- */
- const struct native_connector **(*get_connectors)(struct native_display *ndpy,
- int *num_connectors,
- int *num_crtcs);
-
+struct native_event_handler {
/**
- * Get the current supported modes of a connector. The returned modes may
- * change every time this function is called and those from previous calls
- * might become invalid.
- */
- const struct native_mode **(*get_modes)(struct native_display *ndpy,
- const struct native_connector *nconn,
- int *num_modes);
-
- /**
- * Create a scan-out surface. Required unless no config has
- * GLX_SCREEN_BIT_MESA set.
- */
- struct native_surface *(*create_scanout_surface)(struct native_display *ndpy,
- const struct native_config *nconf,
- uint width, uint height);
-
- /**
- * Program the CRTC to output the surface to the given connectors with the
- * given mode. When surface is not given, the CRTC is disabled.
- *
- * This interface does not export a way to query capabilities of the CRTCs.
- * The native display usually needs to dynamically map the index to a CRTC
- * that supports the given connectors.
+ * This function is called when a surface needs to be validated.
*/
- boolean (*program)(struct native_display *ndpy, int crtc_idx,
- struct native_surface *nsurf, uint x, uint y,
- const struct native_connector **nconns, int num_nconns,
- const struct native_mode *nmode);
+ void (*invalid_surface)(struct native_display *ndpy,
+ struct native_surface *nsurf,
+ unsigned int seq_num);
};
/**
@@ -267,6 +254,7 @@ const char *
native_get_name(void);
struct native_display *
-native_create_display(EGLNativeDisplayType dpy);
+native_create_display(EGLNativeDisplayType dpy,
+ struct native_event_handler *handler);
#endif /* _NATIVE_H_ */
diff --git a/src/gallium/state_trackers/egl/common/native_modeset.h b/src/gallium/state_trackers/egl/common/native_modeset.h
new file mode 100644
index 0000000000..71dc3ec860
--- /dev/null
+++ b/src/gallium/state_trackers/egl/common/native_modeset.h
@@ -0,0 +1,87 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.8
+ *
+ * Copyright (C) 2009-2010 Chia-I Wu <olv@0xlab.org>
+ *
+ * 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.
+ */
+
+#ifndef _NATIVE_MODESET_H_
+#define _NATIVE_MODESET_H_
+
+#include "pipe/p_compiler.h"
+
+struct native_display;
+struct native_surface;
+struct native_config;
+
+struct native_connector {
+ int dummy;
+};
+
+struct native_mode {
+ const char *desc;
+ int width, height;
+ int refresh_rate;
+};
+
+/**
+ * Mode setting interface of the native display. It exposes the mode setting
+ * capabilities of the underlying graphics hardware.
+ */
+struct native_display_modeset {
+ /**
+ * Get the available physical connectors and the number of CRTCs.
+ */
+ const struct native_connector **(*get_connectors)(struct native_display *ndpy,
+ int *num_connectors,
+ int *num_crtcs);
+
+ /**
+ * Get the current supported modes of a connector. The returned modes may
+ * change every time this function is called and those from previous calls
+ * might become invalid.
+ */
+ const struct native_mode **(*get_modes)(struct native_display *ndpy,
+ const struct native_connector *nconn,
+ int *num_modes);
+
+ /**
+ * Create a scan-out surface. Required unless no config has
+ * GLX_SCREEN_BIT_MESA set.
+ */
+ struct native_surface *(*create_scanout_surface)(struct native_display *ndpy,
+ const struct native_config *nconf,
+ uint width, uint height);
+
+ /**
+ * Program the CRTC to output the surface to the given connectors with the
+ * given mode. When surface is not given, the CRTC is disabled.
+ *
+ * This interface does not export a way to query capabilities of the CRTCs.
+ * The native display usually needs to dynamically map the index to a CRTC
+ * that supports the given connectors.
+ */
+ boolean (*program)(struct native_display *ndpy, int crtc_idx,
+ struct native_surface *nsurf, uint x, uint y,
+ const struct native_connector **nconns, int num_nconns,
+ const struct native_mode *nmode);
+};
+
+#endif /* _NATIVE_MODESET_H_ */
diff --git a/src/gallium/state_trackers/egl/kms/native_kms.c b/src/gallium/state_trackers/egl/kms/native_kms.c
index dbdb1e635a..418461089a 100644
--- a/src/gallium/state_trackers/egl/kms/native_kms.c
+++ b/src/gallium/state_trackers/egl/kms/native_kms.c
@@ -201,6 +201,8 @@ kms_surface_swap_buffers(struct native_surface *nsurf)
/* the front/back textures are swapped */
ksurf->sequence_number++;
+ kdpy->event_handler->invalid_surface(&kdpy->base,
+ &ksurf->base, ksurf->sequence_number);
return TRUE;
}
@@ -609,9 +611,9 @@ kms_display_get_configs(struct native_display *ndpy, int *num_configs)
/* always double-buffered */
nconf->mode.doubleBufferMode = TRUE;
- format = PIPE_FORMAT_A8R8G8B8_UNORM;
+ format = PIPE_FORMAT_B8G8R8A8_UNORM;
if (!kms_display_is_format_supported(&kdpy->base, format, TRUE)) {
- format = PIPE_FORMAT_B8G8R8A8_UNORM;
+ format = PIPE_FORMAT_A8R8G8B8_UNORM;
if (!kms_display_is_format_supported(&kdpy->base, format, TRUE))
format = PIPE_FORMAT_NONE;
}
@@ -625,9 +627,9 @@ kms_display_get_configs(struct native_display *ndpy, int *num_configs)
nconf->mode.alphaBits = 8;
nconf->mode.rgbBits = 32;
- format = PIPE_FORMAT_S8Z24_UNORM;
+ format = PIPE_FORMAT_Z24S8_UNORM;
if (!kms_display_is_format_supported(&kdpy->base, format, FALSE)) {
- format = PIPE_FORMAT_Z24S8_UNORM;
+ format = PIPE_FORMAT_S8Z24_UNORM;
if (!kms_display_is_format_supported(&kdpy->base, format, FALSE))
format = PIPE_FORMAT_NONE;
}
@@ -663,6 +665,21 @@ kms_display_get_configs(struct native_display *ndpy, int *num_configs)
return configs;
}
+static int
+kms_display_get_param(struct native_display *ndpy,
+ enum native_param_type param)
+{
+ int val;
+
+ switch (param) {
+ default:
+ val = 0;
+ break;
+ }
+
+ return val;
+}
+
static void
kms_display_destroy(struct native_display *ndpy)
{
@@ -762,7 +779,9 @@ static struct native_display_modeset kms_display_modeset = {
};
static struct native_display *
-kms_create_display(EGLNativeDisplayType dpy, struct drm_api *api)
+kms_create_display(EGLNativeDisplayType dpy,
+ struct native_event_handler *event_handler,
+ struct drm_api *api)
{
struct kms_display *kdpy;
@@ -770,6 +789,8 @@ kms_create_display(EGLNativeDisplayType dpy, struct drm_api *api)
if (!kdpy)
return NULL;
+ kdpy->event_handler = event_handler;
+
kdpy->api = api;
if (!kdpy->api) {
_eglLog(_EGL_WARNING, "failed to create DRM API");
@@ -805,6 +826,7 @@ kms_create_display(EGLNativeDisplayType dpy, struct drm_api *api)
}
kdpy->base.destroy = kms_display_destroy;
+ kdpy->base.get_param = kms_display_get_param;
kdpy->base.get_configs = kms_display_get_configs;
kdpy->base.create_pbuffer_surface = kms_display_create_pbuffer_surface;
@@ -845,7 +867,8 @@ native_get_name(void)
}
struct native_display *
-native_create_display(EGLNativeDisplayType dpy)
+native_create_display(EGLNativeDisplayType dpy,
+ struct native_event_handler *event_handler)
{
struct native_display *ndpy = NULL;
@@ -853,7 +876,7 @@ native_create_display(EGLNativeDisplayType dpy)
drm_api = drm_api_create();
if (drm_api)
- ndpy = kms_create_display(dpy, drm_api);
+ ndpy = kms_create_display(dpy, event_handler, drm_api);
return ndpy;
}
diff --git a/src/gallium/state_trackers/egl/kms/native_kms.h b/src/gallium/state_trackers/egl/kms/native_kms.h
index 095186e3cf..f9cbcb158b 100644
--- a/src/gallium/state_trackers/egl/kms/native_kms.h
+++ b/src/gallium/state_trackers/egl/kms/native_kms.h
@@ -53,6 +53,8 @@ struct kms_crtc {
struct kms_display {
struct native_display base;
+ struct native_event_handler *event_handler;
+
int fd;
struct drm_api *api;
drmModeResPtr resources;
diff --git a/src/gallium/state_trackers/egl/x11/native_dri2.c b/src/gallium/state_trackers/egl/x11/native_dri2.c
index b80b376e12..9839979231 100644
--- a/src/gallium/state_trackers/egl/x11/native_dri2.c
+++ b/src/gallium/state_trackers/egl/x11/native_dri2.c
@@ -48,6 +48,8 @@ struct dri2_display {
Display *dpy;
boolean own_dpy;
+ struct native_event_handler *event_handler;
+
struct drm_api *api;
struct x11_screen *xscr;
int xscr_number;
@@ -327,8 +329,11 @@ dri2_surface_flush_frontbuffer(struct native_surface *nsurf)
DRI2BufferFakeFrontLeft, DRI2BufferFrontLeft);
/* force buffers to be updated in next validation call */
- if (!dri2_surface_receive_events(&dri2surf->base))
+ if (!dri2_surface_receive_events(&dri2surf->base)) {
dri2surf->server_stamp++;
+ dri2dpy->event_handler->invalid_surface(&dri2dpy->base,
+ &dri2surf->base, dri2surf->server_stamp);
+ }
return TRUE;
}
@@ -356,8 +361,11 @@ dri2_surface_swap_buffers(struct native_surface *nsurf)
DRI2BufferFrontLeft, DRI2BufferFakeFrontLeft);
/* force buffers to be updated in next validation call */
- if (!dri2_surface_receive_events(&dri2surf->base))
+ if (!dri2_surface_receive_events(&dri2surf->base)) {
dri2surf->server_stamp++;
+ dri2dpy->event_handler->invalid_surface(&dri2dpy->base,
+ &dri2surf->base, dri2surf->server_stamp);
+ }
return TRUE;
}
@@ -519,17 +527,17 @@ choose_color_format(const __GLcontextModes *mode, enum pipe_format formats[32])
switch (mode->rgbBits) {
case 32:
- formats[count++] = PIPE_FORMAT_A8R8G8B8_UNORM;
formats[count++] = PIPE_FORMAT_B8G8R8A8_UNORM;
+ formats[count++] = PIPE_FORMAT_A8R8G8B8_UNORM;
break;
case 24:
- formats[count++] = PIPE_FORMAT_X8R8G8B8_UNORM;
formats[count++] = PIPE_FORMAT_B8G8R8X8_UNORM;
- formats[count++] = PIPE_FORMAT_A8R8G8B8_UNORM;
+ formats[count++] = PIPE_FORMAT_X8R8G8B8_UNORM;
formats[count++] = PIPE_FORMAT_B8G8R8A8_UNORM;
+ formats[count++] = PIPE_FORMAT_A8R8G8B8_UNORM;
break;
case 16:
- formats[count++] = PIPE_FORMAT_R5G6B5_UNORM;
+ formats[count++] = PIPE_FORMAT_B5G6R5_UNORM;
break;
default:
break;
@@ -550,12 +558,12 @@ choose_depth_stencil_format(const __GLcontextModes *mode,
break;
case 24:
if (mode->stencilBits) {
- formats[count++] = PIPE_FORMAT_S8Z24_UNORM;
formats[count++] = PIPE_FORMAT_Z24S8_UNORM;
+ formats[count++] = PIPE_FORMAT_S8Z24_UNORM;
}
else {
- formats[count++] = PIPE_FORMAT_X8Z24_UNORM;
formats[count++] = PIPE_FORMAT_Z24X8_UNORM;
+ formats[count++] = PIPE_FORMAT_X8Z24_UNORM;
}
break;
case 16:
@@ -702,6 +710,25 @@ dri2_display_is_pixmap_supported(struct native_display *ndpy,
return (depth == nconf_depth || (depth == 24 && depth + 8 == nconf_depth));
}
+static int
+dri2_display_get_param(struct native_display *ndpy,
+ enum native_param_type param)
+{
+ int val;
+
+ switch (param) {
+ case NATIVE_PARAM_USE_NATIVE_BUFFER:
+ /* DRI2GetBuffers use the native buffers */
+ val = TRUE;
+ break;
+ default:
+ val = 0;
+ break;
+ }
+
+ return val;
+}
+
static void
dri2_display_destroy(struct native_display *ndpy)
{
@@ -740,7 +767,10 @@ dri2_display_invalidate_buffers(struct x11_screen *xscr, Drawable drawable,
return;
dri2surf = dri2_surface(nsurf);
+
dri2surf->server_stamp++;
+ dri2dpy->event_handler->invalid_surface(&dri2dpy->base,
+ &dri2surf->base, dri2surf->server_stamp);
}
/**
@@ -799,7 +829,9 @@ dri2_display_hash_table_compare(void *key1, void *key2)
}
struct native_display *
-x11_create_dri2_display(EGLNativeDisplayType dpy, struct drm_api *api)
+x11_create_dri2_display(EGLNativeDisplayType dpy,
+ struct native_event_handler *event_handler,
+ struct drm_api *api)
{
struct dri2_display *dri2dpy;
@@ -807,6 +839,7 @@ x11_create_dri2_display(EGLNativeDisplayType dpy, struct drm_api *api)
if (!dri2dpy)
return NULL;
+ dri2dpy->event_handler = event_handler;
dri2dpy->api = api;
dri2dpy->dpy = dpy;
@@ -839,6 +872,7 @@ x11_create_dri2_display(EGLNativeDisplayType dpy, struct drm_api *api)
}
dri2dpy->base.destroy = dri2_display_destroy;
+ dri2dpy->base.get_param = dri2_display_get_param;
dri2dpy->base.get_configs = dri2_display_get_configs;
dri2dpy->base.is_pixmap_supported = dri2_display_is_pixmap_supported;
dri2dpy->base.create_window_surface = dri2_display_create_window_surface;
diff --git a/src/gallium/state_trackers/egl/x11/native_x11.c b/src/gallium/state_trackers/egl/x11/native_x11.c
index 3add95d0ac..7b4fe63fa0 100644
--- a/src/gallium/state_trackers/egl/x11/native_x11.c
+++ b/src/gallium/state_trackers/egl/x11/native_x11.c
@@ -126,7 +126,8 @@ native_get_name(void)
}
struct native_display *
-native_create_display(EGLNativeDisplayType dpy)
+native_create_display(EGLNativeDisplayType dpy,
+ struct native_event_handler *event_handler)
{
struct native_display *ndpy = NULL;
boolean force_sw;
@@ -136,7 +137,7 @@ native_create_display(EGLNativeDisplayType dpy)
force_sw = debug_get_bool_option("EGL_SOFTWARE", FALSE);
if (api && !force_sw) {
- ndpy = x11_create_dri2_display(dpy, api);
+ ndpy = x11_create_dri2_display(dpy, event_handler, api);
}
if (!ndpy) {
@@ -150,7 +151,7 @@ native_create_display(EGLNativeDisplayType dpy)
*/
use_shm = FALSE;
_eglLog(level, "use software%s fallback", (use_shm) ? " (SHM)" : "");
- ndpy = x11_create_ximage_display(dpy, use_shm);
+ ndpy = x11_create_ximage_display(dpy, event_handler, use_shm);
}
return ndpy;
diff --git a/src/gallium/state_trackers/egl/x11/native_x11.h b/src/gallium/state_trackers/egl/x11/native_x11.h
index 622ddac5df..8c6a7d9349 100644
--- a/src/gallium/state_trackers/egl/x11/native_x11.h
+++ b/src/gallium/state_trackers/egl/x11/native_x11.h
@@ -29,9 +29,13 @@
#include "common/native.h"
struct native_display *
-x11_create_ximage_display(EGLNativeDisplayType dpy, boolean use_xshm);
+x11_create_ximage_display(EGLNativeDisplayType dpy,
+ struct native_event_handler *event_handler,
+ boolean use_xshm);
struct native_display *
-x11_create_dri2_display(EGLNativeDisplayType dpy, struct drm_api *api);
+x11_create_dri2_display(EGLNativeDisplayType dpy,
+ struct native_event_handler *event_handler,
+ struct drm_api *api);
#endif /* _NATIVE_X11_H_ */
diff --git a/src/gallium/state_trackers/egl/x11/native_ximage.c b/src/gallium/state_trackers/egl/x11/native_ximage.c
index 8ba73f289d..3421c1951a 100644
--- a/src/gallium/state_trackers/egl/x11/native_ximage.c
+++ b/src/gallium/state_trackers/egl/x11/native_ximage.c
@@ -56,6 +56,8 @@ struct ximage_display {
struct x11_screen *xscr;
int xscr_number;
+ struct native_event_handler *event_handler;
+
boolean use_xshm;
struct pipe_winsys *winsys;
@@ -228,6 +230,16 @@ ximage_surface_update_geometry(struct native_surface *nsurf)
return updated;
}
+static void
+ximage_surface_notify_invalid(struct native_surface *nsurf)
+{
+ struct ximage_surface *xsurf = ximage_surface(nsurf);
+ struct ximage_display *xdpy = xsurf->xdpy;
+
+ xdpy->event_handler->invalid_surface(&xdpy->base,
+ &xsurf->base, xsurf->server_stamp);
+}
+
/**
* Update the buffers of the surface. It is a slow function due to the
* round-trip to the server.
@@ -339,6 +351,7 @@ ximage_surface_flush_frontbuffer(struct native_surface *nsurf)
NATIVE_ATTACHMENT_FRONT_LEFT);
/* force buffers to be updated in next validation call */
xsurf->server_stamp++;
+ ximage_surface_notify_invalid(&xsurf->base);
return ret;
}
@@ -354,6 +367,7 @@ ximage_surface_swap_buffers(struct native_surface *nsurf)
ret = ximage_surface_draw_buffer(nsurf, NATIVE_ATTACHMENT_BACK_LEFT);
/* force buffers to be updated in next validation call */
xsurf->server_stamp++;
+ ximage_surface_notify_invalid(&xsurf->base);
xfront = &xsurf->buffers[NATIVE_ATTACHMENT_FRONT_LEFT];
xback = &xsurf->buffers[NATIVE_ATTACHMENT_BACK_LEFT];
@@ -561,13 +575,13 @@ choose_format(const XVisualInfo *vinfo)
/* TODO elaborate the formats */
switch (vinfo->depth) {
case 32:
- fmt = PIPE_FORMAT_A8R8G8B8_UNORM;
+ fmt = PIPE_FORMAT_B8G8R8A8_UNORM;
break;
case 24:
- fmt = PIPE_FORMAT_X8R8G8B8_UNORM;
+ fmt = PIPE_FORMAT_B8G8R8X8_UNORM;
break;
case 16:
- fmt = PIPE_FORMAT_R5G6B5_UNORM;
+ fmt = PIPE_FORMAT_B5G6R5_UNORM;
break;
default:
fmt = PIPE_FORMAT_NONE;
@@ -620,8 +634,8 @@ ximage_display_get_configs(struct native_display *ndpy, int *num_configs)
xconf->base.stencil_format = PIPE_FORMAT_NONE;
/* create the second config with depth/stencil buffer */
if (j == 1) {
- xconf->base.depth_format = PIPE_FORMAT_S8Z24_UNORM;
- xconf->base.stencil_format = PIPE_FORMAT_S8Z24_UNORM;
+ xconf->base.depth_format = PIPE_FORMAT_Z24S8_UNORM;
+ xconf->base.stencil_format = PIPE_FORMAT_Z24S8_UNORM;
mode->depthBits = 24;
mode->stencilBits = 8;
mode->haveDepthBuffer = TRUE;
@@ -669,13 +683,13 @@ ximage_display_is_pixmap_supported(struct native_display *ndpy,
depth = x11_drawable_get_depth(xdpy->xscr, (Drawable) pix);
switch (depth) {
case 32:
- fmt = PIPE_FORMAT_A8R8G8B8_UNORM;
+ fmt = PIPE_FORMAT_B8G8R8A8_UNORM;
break;
case 24:
- fmt = PIPE_FORMAT_X8R8G8B8_UNORM;
+ fmt = PIPE_FORMAT_B8G8R8X8_UNORM;
break;
case 16:
- fmt = PIPE_FORMAT_R5G6B5_UNORM;
+ fmt = PIPE_FORMAT_B5G6R5_UNORM;
break;
default:
fmt = PIPE_FORMAT_NONE;
@@ -685,6 +699,25 @@ ximage_display_is_pixmap_supported(struct native_display *ndpy,
return (fmt == nconf->color_format);
}
+static int
+ximage_display_get_param(struct native_display *ndpy,
+ enum native_param_type param)
+{
+ int val;
+
+ switch (param) {
+ case NATIVE_PARAM_USE_NATIVE_BUFFER:
+ /* private buffers are allocated */
+ val = FALSE;
+ break;
+ default:
+ val = 0;
+ break;
+ }
+
+ return val;
+}
+
static void
ximage_display_destroy(struct native_display *ndpy)
{
@@ -703,7 +736,9 @@ ximage_display_destroy(struct native_display *ndpy)
}
struct native_display *
-x11_create_ximage_display(EGLNativeDisplayType dpy, boolean use_xshm)
+x11_create_ximage_display(EGLNativeDisplayType dpy,
+ struct native_event_handler *event_handler,
+ boolean use_xshm)
{
struct ximage_display *xdpy;
@@ -728,6 +763,8 @@ x11_create_ximage_display(EGLNativeDisplayType dpy, boolean use_xshm)
return NULL;
}
+ xdpy->event_handler = event_handler;
+
xdpy->use_xshm =
(use_xshm && x11_screen_support(xdpy->xscr, X11_SCREEN_EXTENSION_XSHM));
@@ -735,6 +772,7 @@ x11_create_ximage_display(EGLNativeDisplayType dpy, boolean use_xshm)
xdpy->base.screen = softpipe_create_screen(xdpy->winsys);
xdpy->base.destroy = ximage_display_destroy;
+ xdpy->base.get_param = ximage_display_get_param;
xdpy->base.get_configs = ximage_display_get_configs;
xdpy->base.is_pixmap_supported = ximage_display_is_pixmap_supported;
diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c
index 188b885f68..217bdeff75 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_api.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_api.c
@@ -274,10 +274,10 @@ choose_pixel_format(XMesaVisual v)
&& v->BitsPerPixel == 32) {
if (native_byte_order) {
/* no byteswapping needed */
- return 0 /* PIXEL_FORMAT_U_A8_B8_G8_R8 */;
+ return PIPE_FORMAT_R8G8B8A8_UNORM;
}
else {
- return PIPE_FORMAT_R8G8B8A8_UNORM;
+ return PIPE_FORMAT_A8B8G8R8_UNORM;
}
}
else if ( GET_REDMASK(v) == 0xff0000
@@ -286,10 +286,10 @@ choose_pixel_format(XMesaVisual v)
&& v->BitsPerPixel == 32) {
if (native_byte_order) {
/* no byteswapping needed */
- return PIPE_FORMAT_A8R8G8B8_UNORM;
+ return PIPE_FORMAT_B8G8R8A8_UNORM;
}
else {
- return PIPE_FORMAT_B8G8R8A8_UNORM;
+ return PIPE_FORMAT_A8R8G8B8_UNORM;
}
}
else if ( GET_REDMASK(v) == 0x0000ff00
@@ -298,10 +298,10 @@ choose_pixel_format(XMesaVisual v)
&& v->BitsPerPixel == 32) {
if (native_byte_order) {
/* no byteswapping needed */
- return PIPE_FORMAT_B8G8R8A8_UNORM;
+ return PIPE_FORMAT_A8R8G8B8_UNORM;
}
else {
- return PIPE_FORMAT_A8R8G8B8_UNORM;
+ return PIPE_FORMAT_B8G8R8A8_UNORM;
}
}
else if ( GET_REDMASK(v) == 0xf800
@@ -310,7 +310,7 @@ choose_pixel_format(XMesaVisual v)
&& native_byte_order
&& v->BitsPerPixel == 16) {
/* 5-6-5 RGB */
- return PIPE_FORMAT_R5G6B5_UNORM;
+ return PIPE_FORMAT_B5G6R5_UNORM;
}
assert(0);
@@ -333,8 +333,8 @@ xmesa_choose_z_stencil_format(int depthBits, int stencilBits,
const unsigned geom_flags = (PIPE_TEXTURE_GEOM_NON_SQUARE |
PIPE_TEXTURE_GEOM_NON_POWER_OF_TWO);
static enum pipe_format formats[] = {
- PIPE_FORMAT_Z24S8_UNORM,
PIPE_FORMAT_S8Z24_UNORM,
+ PIPE_FORMAT_Z24S8_UNORM,
PIPE_FORMAT_Z16_UNORM,
PIPE_FORMAT_Z32_UNORM
};
@@ -746,10 +746,9 @@ XMesaVisual XMesaCreateVisual( Display *display,
}
_mesa_initialize_visual( &v->mesa_visual,
- rgb_flag, db_flag, stereo_flag,
+ db_flag, stereo_flag,
red_bits, green_bits,
blue_bits, alpha_bits,
- v->mesa_visual.indexBits,
depth_size,
stencil_size,
accum_red_size, accum_green_size,
diff --git a/src/gallium/state_trackers/python/st_device.c b/src/gallium/state_trackers/python/st_device.c
index a3798a5521..45e7841750 100644
--- a/src/gallium/state_trackers/python/st_device.c
+++ b/src/gallium/state_trackers/python/st_device.c
@@ -244,7 +244,7 @@ st_context_create(struct st_device *st_dev)
memset( &templat, 0, sizeof( templat ) );
templat.target = PIPE_TEXTURE_2D;
- templat.format = PIPE_FORMAT_A8R8G8B8_UNORM;
+ templat.format = PIPE_FORMAT_B8G8R8A8_UNORM;
templat.width0 = 1;
templat.height0 = 1;
templat.depth0 = 1;
diff --git a/src/gallium/state_trackers/python/st_sample.c b/src/gallium/state_trackers/python/st_sample.c
index 32a6551a87..e180815346 100644
--- a/src/gallium/state_trackers/python/st_sample.c
+++ b/src/gallium/state_trackers/python/st_sample.c
@@ -485,7 +485,7 @@ st_sample_generic_pixel_block(enum pipe_format format,
w, h,
rgba, rgba_stride);
- if(format == PIPE_FORMAT_YCBCR || format == PIPE_FORMAT_YCBCR_REV) {
+ if(format == PIPE_FORMAT_UYVY || format == PIPE_FORMAT_YUYV) {
for(y = 0; y < h; ++y) {
for(x = 0; x < w; ++x) {
for(ch = 0; ch < 4; ++ch) {
diff --git a/src/gallium/state_trackers/vega/api_filters.c b/src/gallium/state_trackers/vega/api_filters.c
index 20c72c1ff5..02248ad433 100644
--- a/src/gallium/state_trackers/vega/api_filters.c
+++ b/src/gallium/state_trackers/vega/api_filters.c
@@ -67,7 +67,7 @@ static INLINE struct pipe_texture *create_texture_1d(struct vg_context *ctx,
memset(&templ, 0, sizeof(templ));
templ.target = PIPE_TEXTURE_1D;
- templ.format = PIPE_FORMAT_A8R8G8B8_UNORM;
+ templ.format = PIPE_FORMAT_B8G8R8A8_UNORM;
templ.last_level = 0;
templ.width0 = color_data_len;
templ.height0 = 1;
diff --git a/src/gallium/state_trackers/vega/image.c b/src/gallium/state_trackers/vega/image.c
index 2e10965be4..41c979bfec 100644
--- a/src/gallium/state_trackers/vega/image.c
+++ b/src/gallium/state_trackers/vega/image.c
@@ -48,16 +48,16 @@ static enum pipe_format vg_format_to_pipe(VGImageFormat format)
{
switch(format) {
case VG_sRGB_565:
- return PIPE_FORMAT_R5G6B5_UNORM;
+ return PIPE_FORMAT_B5G6R5_UNORM;
case VG_sRGBA_5551:
- return PIPE_FORMAT_A1R5G5B5_UNORM;
+ return PIPE_FORMAT_B5G5R5A1_UNORM;
case VG_sRGBA_4444:
- return PIPE_FORMAT_A4R4G4B4_UNORM;
+ return PIPE_FORMAT_B4G4R4A4_UNORM;
case VG_sL_8:
case VG_lL_8:
return PIPE_FORMAT_L8_UNORM;
case VG_BW_1:
- return PIPE_FORMAT_A8R8G8B8_UNORM;
+ return PIPE_FORMAT_B8G8R8A8_UNORM;
case VG_A_8:
return PIPE_FORMAT_A8_UNORM;
#ifdef OPENVG_VERSION_1_1
@@ -66,7 +66,7 @@ static enum pipe_format vg_format_to_pipe(VGImageFormat format)
return PIPE_FORMAT_A8_UNORM;
#endif
default:
- return PIPE_FORMAT_A8R8G8B8_UNORM;
+ return PIPE_FORMAT_B8G8R8A8_UNORM;
}
}
diff --git a/src/gallium/state_trackers/vega/mask.c b/src/gallium/state_trackers/vega/mask.c
index 467b95b751..839dc19a3b 100644
--- a/src/gallium/state_trackers/vega/mask.c
+++ b/src/gallium/state_trackers/vega/mask.c
@@ -488,7 +488,7 @@ struct vg_mask_layer * mask_layer_create(VGint width, VGint height)
memset(&pt, 0, sizeof(pt));
pt.target = PIPE_TEXTURE_2D;
- pt.format = PIPE_FORMAT_A8R8G8B8_UNORM;
+ pt.format = PIPE_FORMAT_B8G8R8A8_UNORM;
pt.last_level = 0;
pt.width0 = width;
pt.height0 = height;
diff --git a/src/gallium/state_trackers/vega/paint.c b/src/gallium/state_trackers/vega/paint.c
index 3405d635f0..caf0c14b74 100644
--- a/src/gallium/state_trackers/vega/paint.c
+++ b/src/gallium/state_trackers/vega/paint.c
@@ -151,7 +151,7 @@ static INLINE struct pipe_texture *create_gradient_texture(struct vg_paint *p)
memset(&templ, 0, sizeof(templ));
templ.target = PIPE_TEXTURE_1D;
- templ.format = PIPE_FORMAT_A8R8G8B8_UNORM;
+ templ.format = PIPE_FORMAT_B8G8R8A8_UNORM;
templ.last_level = 0;
templ.width0 = 1024;
templ.height0 = 1;
diff --git a/src/gallium/state_trackers/vega/vg_tracker.c b/src/gallium/state_trackers/vega/vg_tracker.c
index a94dfb160c..57d3baad7f 100644
--- a/src/gallium/state_trackers/vega/vg_tracker.c
+++ b/src/gallium/state_trackers/vega/vg_tracker.c
@@ -51,7 +51,7 @@ create_texture(struct pipe_context *pipe, enum pipe_format format,
templ.format = format;
}
else {
- templ.format = PIPE_FORMAT_A8R8G8B8_UNORM;
+ templ.format = PIPE_FORMAT_B8G8R8A8_UNORM;
}
templ.target = PIPE_TEXTURE_2D;
@@ -186,7 +186,7 @@ struct st_framebuffer * st_create_framebuffer(const void *visual,
if (stencilFormat == depthFormat)
stfb->dsrb = st_new_renderbuffer_fb(stencilFormat);
else
- stfb->dsrb = st_new_renderbuffer_fb(PIPE_FORMAT_S8Z24_UNORM);
+ stfb->dsrb = st_new_renderbuffer_fb(PIPE_FORMAT_Z24S8_UNORM);
/*### currently we always allocate it but it's possible it's
not necessary if EGL_ALPHA_MASK_SIZE was 0
@@ -209,12 +209,12 @@ static void setup_new_alpha_mask(struct vg_context *ctx,
struct pipe_texture *old_texture = stfb->alpha_mask;
/*
- we use PIPE_FORMAT_A8R8G8B8_UNORM because we want to render to
+ we use PIPE_FORMAT_B8G8R8A8_UNORM because we want to render to
this texture and use it as a sampler, so while this wastes some
space it makes both of those a lot simpler
*/
stfb->alpha_mask =
- create_texture(pipe, PIPE_FORMAT_A8R8G8B8_UNORM, width, height);
+ create_texture(pipe, PIPE_FORMAT_B8G8R8A8_UNORM, width, height);
if (!stfb->alpha_mask) {
if (old_texture)
@@ -327,7 +327,7 @@ void st_resize_framebuffer(struct st_framebuffer *stfb,
setup_new_alpha_mask(ctx, stfb, width, height);
pipe_texture_reference( &stfb->blend_texture, NULL );
- stfb->blend_texture = create_texture(ctx->pipe, PIPE_FORMAT_A8R8G8B8_UNORM,
+ stfb->blend_texture = create_texture(ctx->pipe, PIPE_FORMAT_B8G8R8A8_UNORM,
width, height);
}
diff --git a/src/gallium/state_trackers/wgl/stw_device.c b/src/gallium/state_trackers/wgl/stw_device.c
index e5fa6ac8eb..472a2a5379 100644
--- a/src/gallium/state_trackers/wgl/stw_device.c
+++ b/src/gallium/state_trackers/wgl/stw_device.c
@@ -47,7 +47,6 @@
#ifdef WIN32_THREADS
extern _glthread_Mutex OneTimeLock;
-extern void FreeAllTSD(void);
#endif
@@ -183,7 +182,8 @@ stw_cleanup(void)
#ifdef WIN32_THREADS
_glthread_DESTROY_MUTEX(OneTimeLock);
- FreeAllTSD();
+
+ _glapi_destroy_multithread();
#endif
#ifdef DEBUG
diff --git a/src/gallium/state_trackers/wgl/stw_pixelformat.c b/src/gallium/state_trackers/wgl/stw_pixelformat.c
index b750b03695..bc28f31ed1 100644
--- a/src/gallium/state_trackers/wgl/stw_pixelformat.c
+++ b/src/gallium/state_trackers/wgl/stw_pixelformat.c
@@ -74,17 +74,17 @@ struct stw_pf_depth_info
static const struct stw_pf_color_info
stw_pf_color[] = {
/* no-alpha */
- { PIPE_FORMAT_X8R8G8B8_UNORM, { 8, 8, 8, 0}, {16, 8, 0, 0} },
- { PIPE_FORMAT_B8G8R8X8_UNORM, { 8, 8, 8, 0}, { 8, 16, 24, 0} },
- { PIPE_FORMAT_R5G6B5_UNORM, { 5, 6, 5, 0}, {11, 5, 0, 0} },
+ { PIPE_FORMAT_B8G8R8X8_UNORM, { 8, 8, 8, 0}, {16, 8, 0, 0} },
+ { PIPE_FORMAT_X8R8G8B8_UNORM, { 8, 8, 8, 0}, { 8, 16, 24, 0} },
+ { PIPE_FORMAT_B5G6R5_UNORM, { 5, 6, 5, 0}, {11, 5, 0, 0} },
/* alpha */
- { PIPE_FORMAT_A8R8G8B8_UNORM, { 8, 8, 8, 8}, {16, 8, 0, 24} },
- { PIPE_FORMAT_B8G8R8A8_UNORM, { 8, 8, 8, 8}, { 8, 16, 24, 0} },
+ { PIPE_FORMAT_B8G8R8A8_UNORM, { 8, 8, 8, 8}, {16, 8, 0, 24} },
+ { PIPE_FORMAT_A8R8G8B8_UNORM, { 8, 8, 8, 8}, { 8, 16, 24, 0} },
#if 0
- { PIPE_FORMAT_A2B10G10R10_UNORM, {10, 10, 10, 2}, { 0, 10, 20, 30} },
+ { PIPE_FORMAT_R10G10B10A2_UNORM, {10, 10, 10, 2}, { 0, 10, 20, 30} },
#endif
- { PIPE_FORMAT_A1R5G5B5_UNORM, { 5, 5, 5, 1}, {10, 5, 0, 15} },
- { PIPE_FORMAT_A4R4G4B4_UNORM, { 4, 4, 4, 4}, {16, 4, 0, 12} }
+ { PIPE_FORMAT_B5G5R5A1_UNORM, { 5, 5, 5, 1}, {10, 5, 0, 15} },
+ { PIPE_FORMAT_B4G4R4A4_UNORM, { 4, 4, 4, 4}, {16, 4, 0, 12} }
};
@@ -92,12 +92,12 @@ static const struct stw_pf_depth_info
stw_pf_depth_stencil[] = {
/* pure depth */
{ PIPE_FORMAT_Z32_UNORM, {32, 0} },
- { PIPE_FORMAT_Z24X8_UNORM, {24, 0} },
{ PIPE_FORMAT_X8Z24_UNORM, {24, 0} },
+ { PIPE_FORMAT_Z24X8_UNORM, {24, 0} },
{ PIPE_FORMAT_Z16_UNORM, {16, 0} },
/* combined depth-stencil */
- { PIPE_FORMAT_S8Z24_UNORM, {24, 8} },
- { PIPE_FORMAT_Z24S8_UNORM, {24, 8} }
+ { PIPE_FORMAT_Z24S8_UNORM, {24, 8} },
+ { PIPE_FORMAT_S8Z24_UNORM, {24, 8} }
};
@@ -271,14 +271,12 @@ stw_pixelformat_visual(GLvisual *visual,
memset(visual, 0, sizeof *visual);
_mesa_initialize_visual(
visual,
- (pfi->pfd.iPixelType == PFD_TYPE_RGBA) ? GL_TRUE : GL_FALSE,
(pfi->pfd.dwFlags & PFD_DOUBLEBUFFER) ? GL_TRUE : GL_FALSE,
(pfi->pfd.dwFlags & PFD_STEREO) ? GL_TRUE : GL_FALSE,
pfi->pfd.cRedBits,
pfi->pfd.cGreenBits,
pfi->pfd.cBlueBits,
pfi->pfd.cAlphaBits,
- (pfi->pfd.iPixelType == PFD_TYPE_COLORINDEX) ? pfi->pfd.cColorBits : 0,
pfi->pfd.cDepthBits,
pfi->pfd.cStencilBits,
pfi->pfd.cAccumRedBits,
diff --git a/src/gallium/state_trackers/xorg/xorg_crtc.c b/src/gallium/state_trackers/xorg/xorg_crtc.c
index 8f6426bcc8..44f7da0f96 100644
--- a/src/gallium/state_trackers/xorg/xorg_crtc.c
+++ b/src/gallium/state_trackers/xorg/xorg_crtc.c
@@ -205,7 +205,7 @@ crtc_load_cursor_argb_ga3d(xf86CrtcPtr crtc, CARD32 * image)
templat.target = PIPE_TEXTURE_2D;
templat.last_level = 0;
templat.depth0 = 1;
- templat.format = PIPE_FORMAT_A8R8G8B8_UNORM;
+ templat.format = PIPE_FORMAT_B8G8R8A8_UNORM;
templat.width0 = 64;
templat.height0 = 64;
diff --git a/src/gallium/state_trackers/xorg/xorg_dri2.c b/src/gallium/state_trackers/xorg/xorg_dri2.c
index e7f1b2d411..f23e4c6cc7 100644
--- a/src/gallium/state_trackers/xorg/xorg_dri2.c
+++ b/src/gallium/state_trackers/xorg/xorg_dri2.c
@@ -117,12 +117,12 @@ dri2_do_create_buffer(DrawablePtr pDraw, DRI2BufferPtr buffer, unsigned int form
break;
default:
template.format = ms->ds_depth_bits_last ?
- PIPE_FORMAT_X8Z24_UNORM : PIPE_FORMAT_Z24X8_UNORM;
+ PIPE_FORMAT_Z24X8_UNORM : PIPE_FORMAT_X8Z24_UNORM;
break;
}
} else {
template.format = ms->ds_depth_bits_last ?
- PIPE_FORMAT_S8Z24_UNORM : PIPE_FORMAT_Z24S8_UNORM;
+ PIPE_FORMAT_Z24S8_UNORM : PIPE_FORMAT_S8Z24_UNORM;
}
template.width0 = pDraw->width;
template.height0 = pDraw->height;
@@ -435,11 +435,11 @@ xorg_dri2_init(ScreenPtr pScreen)
dri2info.Wait = NULL;
ms->d_depth_bits_last =
- ms->screen->is_format_supported(ms->screen, PIPE_FORMAT_X8Z24_UNORM,
+ ms->screen->is_format_supported(ms->screen, PIPE_FORMAT_Z24X8_UNORM,
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_DEPTH_STENCIL, 0);
ms->ds_depth_bits_last =
- ms->screen->is_format_supported(ms->screen, PIPE_FORMAT_S8Z24_UNORM,
+ ms->screen->is_format_supported(ms->screen, PIPE_FORMAT_Z24S8_UNORM,
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_DEPTH_STENCIL, 0);
diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
index 5c3e92efdf..a7ffe3f499 100644
--- a/src/gallium/state_trackers/xorg/xorg_exa.c
+++ b/src/gallium/state_trackers/xorg/xorg_exa.c
@@ -118,22 +118,22 @@ exa_get_pipe_format(int depth, enum pipe_format *format, int *bbp, int *picture_
{
switch (depth) {
case 32:
- *format = PIPE_FORMAT_A8R8G8B8_UNORM;
+ *format = PIPE_FORMAT_B8G8R8A8_UNORM;
*picture_format = PICT_a8r8g8b8;
assert(*bbp == 32);
break;
case 24:
- *format = PIPE_FORMAT_X8R8G8B8_UNORM;
+ *format = PIPE_FORMAT_B8G8R8X8_UNORM;
*picture_format = PICT_x8r8g8b8;
assert(*bbp == 32);
break;
case 16:
- *format = PIPE_FORMAT_R5G6B5_UNORM;
+ *format = PIPE_FORMAT_B5G6R5_UNORM;
*picture_format = PICT_r5g6b5;
assert(*bbp == 16);
break;
case 15:
- *format = PIPE_FORMAT_A1R5G5B5_UNORM;
+ *format = PIPE_FORMAT_B5G5R5A1_UNORM;
*picture_format = PICT_x1r5g5b5;
assert(*bbp == 16);
break;
@@ -144,7 +144,7 @@ exa_get_pipe_format(int depth, enum pipe_format *format, int *bbp, int *picture_
break;
case 4:
case 1:
- *format = PIPE_FORMAT_A8R8G8B8_UNORM; /* bad bad bad */
+ *format = PIPE_FORMAT_B8G8R8A8_UNORM; /* bad bad bad */
break;
default:
assert(0);
diff --git a/src/gallium/state_trackers/xorg/xvmc/surface.c b/src/gallium/state_trackers/xorg/xvmc/surface.c
index c113f49e55..12d94e0c5c 100644
--- a/src/gallium/state_trackers/xorg/xvmc/surface.c
+++ b/src/gallium/state_trackers/xorg/xvmc/surface.c
@@ -101,7 +101,7 @@ CreateOrResizeBackBuffer(struct pipe_video_context *vpipe, unsigned int width, u
memset(&template, 0, sizeof(struct pipe_texture));
template.target = PIPE_TEXTURE_2D;
/* XXX: Needs to match the drawable's format? */
- template.format = PIPE_FORMAT_X8R8G8B8_UNORM;
+ template.format = PIPE_FORMAT_B8G8R8X8_UNORM;
template.last_level = 0;
template.width0 = width;
template.height0 = height;
diff --git a/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c b/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
index af9e92edd9..21517b4bb5 100644
--- a/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
+++ b/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
@@ -123,9 +123,9 @@ nouveau_drm_create_screen(struct drm_api *api, int fd,
enum pipe_format format;
if (nvdri->bpp == 16)
- format = PIPE_FORMAT_R5G6B5_UNORM;
+ format = PIPE_FORMAT_B5G6R5_UNORM;
else
- format = PIPE_FORMAT_A8R8G8B8_UNORM;
+ format = PIPE_FORMAT_B8G8R8A8_UNORM;
nvws->front = dri_surface_from_handle(api, nvws->pscreen,
nvdri->front_offset,
diff --git a/src/gallium/winsys/gdi/gdi_llvmpipe_winsys.c b/src/gallium/winsys/gdi/gdi_llvmpipe_winsys.c
index e9e5990cf5..a9fa03b8e5 100644
--- a/src/gallium/winsys/gdi/gdi_llvmpipe_winsys.c
+++ b/src/gallium/winsys/gdi/gdi_llvmpipe_winsys.c
@@ -75,8 +75,8 @@ gdi_llvmpipe_is_displaytarget_format_supported( struct llvmpipe_winsys *ws,
enum pipe_format format )
{
switch(format) {
- case PIPE_FORMAT_X8R8G8B8_UNORM:
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
return TRUE;
/* TODO: Support other formats possible with BMPs, as described in
diff --git a/src/glx/XF86dri.c b/src/glx/XF86dri.c
index 248d96ac5d..fdbdd43000 100644
--- a/src/glx/XF86dri.c
+++ b/src/glx/XF86dri.c
@@ -45,7 +45,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "xf86dristr.h"
-#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
+#if defined(__GNUC__)
# define PUBLIC __attribute__((visibility("default")))
# define USED __attribute__((used))
#else
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 29d589cdb9..5b0f335db6 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -519,9 +519,6 @@ dri2CreateScreen(__GLXscreenConfigs * psc, int screen,
if (psp == NULL)
return NULL;
- /* Initialize per screen dynamic client GLX extensions */
- psc->ext_list_first_time = GL_TRUE;
-
if (!DRI2Connect(psc->dpy, RootWindow(psc->dpy, screen),
&driverName, &deviceName)) {
XFree(psp);
@@ -614,6 +611,9 @@ dri2CreateScreen(__GLXscreenConfigs * psc, int screen,
psp->setSwapInterval = dri2SetSwapInterval;
psp->getSwapInterval = dri2GetSwapInterval;
#endif
+#if defined(X_DRI2GetMSC) && defined(X_DRI2WaitMSC) && defined(X_DRI2SwapInterval)
+ __glXEnableDirectExtension(psc, "GLX_OML_sync_control");
+#endif
}
/* DRI2 suports SubBuffer through DRI2CopyRegion, so it's always
diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c
index f9fe9a25db..e47db82b70 100644
--- a/src/glx/dri_glx.c
+++ b/src/glx/dri_glx.c
@@ -648,9 +648,6 @@ driCreateScreen(__GLXscreenConfigs * psc, int screen,
if (psp == NULL)
return NULL;
- /* Initialize per screen dynamic client GLX extensions */
- psc->ext_list_first_time = GL_TRUE;
-
if (!driGetDriverName(priv->dpy, screen, &driverName)) {
Xfree(psp);
return NULL;
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index eed9a8c472..1b94a56fd1 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -364,9 +364,6 @@ driCreateScreen(__GLXscreenConfigs * psc, int screen,
if (psp == NULL)
return NULL;
- /* Initialize per screen dynamic client GLX extensions */
- psc->ext_list_first_time = GL_TRUE;
-
psc->driver = driOpenDriver(driverName);
if (psc->driver == NULL)
goto handle_error;
diff --git a/src/glx/glx_pbuffer.c b/src/glx/glx_pbuffer.c
index f635138d62..52e067165c 100644
--- a/src/glx/glx_pbuffer.c
+++ b/src/glx/glx_pbuffer.c
@@ -379,8 +379,8 @@ CreateDrawable(Display * dpy, const __GLcontextModes * fbconfig,
req->glxwindow = (GLXWindow) XAllocID(dpy);
req->numAttribs = (CARD32) i;
- assert(attrib_list);
- memcpy(data, attrib_list, 8 * i);
+ if (attrib_list)
+ memcpy(data, attrib_list, 8 * i);
UnlockDisplay(dpy);
SyncHandle();
diff --git a/src/glx/glxclient.h b/src/glx/glxclient.h
index 04ce781c43..8e5dc785dd 100644
--- a/src/glx/glxclient.h
+++ b/src/glx/glxclient.h
@@ -69,7 +69,7 @@
* We also need to define a USED attribute, so the optimizer doesn't
* inline a static function that we later use in an alias. - ajax
*/
-#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
+#if defined(__GNUC__)
# define PUBLIC __attribute__((visibility("default")))
# define USED __attribute__((used))
#else
diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
index 4fbc6b6ab2..49cbce72f8 100644
--- a/src/glx/glxcmds.c
+++ b/src/glx/glxcmds.c
@@ -2534,8 +2534,6 @@ __glXWaitForMscOML(Display * dpy, GLXDrawable drawable,
__GLXscreenConfigs * const psc = GetGLXScreenConfigs( dpy, screen );
int ret;
- fprintf(stderr, "waitmsc: %lld, %lld, %lld\n", target_msc, divisor,
- remainder);
/* The OML_sync_control spec says these should "generate a GLX_BAD_VALUE
* error", but the return type in the spec is Bool.
@@ -2547,7 +2545,6 @@ __glXWaitForMscOML(Display * dpy, GLXDrawable drawable,
#ifdef __DRI_MEDIA_STREAM_COUNTER
if (pdraw != NULL && psc->msc != NULL) {
- fprintf(stderr, "dri1 msc\n");
ret = (*psc->msc->waitForMSC) (pdraw->driDrawable, target_msc,
divisor, remainder, msc, sbc);
@@ -2563,7 +2560,6 @@ __glXWaitForMscOML(Display * dpy, GLXDrawable drawable,
return ret;
}
- fprintf(stderr, "no drawable??\n");
return False;
}
diff --git a/src/glx/glxext.c b/src/glx/glxext.c
index c2de1a3fff..b5657baf2e 100644
--- a/src/glx/glxext.c
+++ b/src/glx/glxext.c
@@ -717,6 +717,9 @@ AllocAndFetchScreenConfigs(Display * dpy, __GLXdisplayPrivate * priv)
if (psc->drawHash == NULL)
continue;
+ /* Initialize per screen dynamic client GLX extensions */
+ psc->ext_list_first_time = GL_TRUE;
+
if (priv->dri2Display)
psc->driScreen = (*priv->dri2Display->createScreen) (psc, i, priv);
diff --git a/src/glx/indirect.c b/src/glx/indirect.c
index 4a571a230b..42a225f671 100644
--- a/src/glx/indirect.c
+++ b/src/glx/indirect.c
@@ -53,7 +53,7 @@
# define NOINLINE
# endif
-#if !defined __GNUC__ || __GNUC__ < 3
+#ifndef __GNUC__
# define __builtin_expect(x, y) x
#endif
diff --git a/src/glx/indirect.h b/src/glx/indirect.h
index 9e73b33818..b09b61aae7 100644
--- a/src/glx/indirect.h
+++ b/src/glx/indirect.h
@@ -37,7 +37,7 @@
* \author Ian Romanick <idr@us.ibm.com>
*/
-# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))) && defined(__ELF__)
+# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) && defined(__ELF__)
# define HIDDEN __attribute__((visibility("hidden")))
# else
# define HIDDEN
diff --git a/src/glx/indirect_size.c b/src/glx/indirect_size.c
index 6356ddd49b..0c136d26cd 100644
--- a/src/glx/indirect_size.c
+++ b/src/glx/indirect_size.c
@@ -29,7 +29,7 @@
#include <GL/gl.h>
#include "indirect_size.h"
-# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define PURE __attribute__((pure))
# else
# define PURE
@@ -41,7 +41,7 @@
# define FASTCALL
# endif
-# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))) && defined(__ELF__)
+# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) && defined(__ELF__)
# define INTERNAL __attribute__((visibility("internal")))
# else
# define INTERNAL
diff --git a/src/glx/indirect_size.h b/src/glx/indirect_size.h
index af0919f964..79b849b683 100644
--- a/src/glx/indirect_size.h
+++ b/src/glx/indirect_size.h
@@ -36,7 +36,7 @@
* \author Ian Romanick <idr@us.ibm.com>
*/
-# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define PURE __attribute__((pure))
# else
# define PURE
@@ -48,7 +48,7 @@
# define FASTCALL
# endif
-# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))) && defined(__ELF__)
+# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) && defined(__ELF__)
# define INTERNAL __attribute__((visibility("internal")))
# else
# define INTERNAL
diff --git a/src/glx/indirect_vertex_program.c b/src/glx/indirect_vertex_program.c
index 3313ac008a..d822a7ee56 100644
--- a/src/glx/indirect_vertex_program.c
+++ b/src/glx/indirect_vertex_program.c
@@ -30,7 +30,7 @@
#include "indirect_vertex_array.h"
#include <GL/glxproto.h>
-#if !defined __GNUC__ || __GNUC__ < 3
+#if !defined(__GNUC__)
# define __builtin_expect(x, y) x
#endif
diff --git a/src/glx/pixelstore.c b/src/glx/pixelstore.c
index 8b51b5d8b7..dc193b9f74 100644
--- a/src/glx/pixelstore.c
+++ b/src/glx/pixelstore.c
@@ -31,7 +31,7 @@
#include "glxclient.h"
#include "indirect.h"
-#if !defined __GNUC__ || __GNUC__ < 3
+#if !defined(__GNUC__)
# define __builtin_expect(x, y) x
#endif
diff --git a/src/mesa/drivers/beos/GLView.cpp b/src/mesa/drivers/beos/GLView.cpp
index 9e4a7ebe56..a029f6b200 100644
--- a/src/mesa/drivers/beos/GLView.cpp
+++ b/src/mesa/drivers/beos/GLView.cpp
@@ -297,11 +297,9 @@ BGLView::BGLView(BRect rect, char *name,
MesaDriver * md = new MesaDriver();
// examine option flags and create gl_context struct
- GLvisual * visual = _mesa_create_visual( rgbFlag,
- dblFlag,
+ GLvisual * visual = _mesa_create_visual( dblFlag,
stereoFlag,
red, green, blue, alpha,
- index,
depth,
stencil,
accum, accum, accum, accum,
diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index 87163e6505..ebfaa2f07b 100644
--- a/src/mesa/drivers/common/driverfuncs.c
+++ b/src/mesa/drivers/common/driverfuncs.c
@@ -142,7 +142,6 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
driver->BlendFuncSeparate = NULL;
driver->ClearColor = NULL;
driver->ClearDepth = NULL;
- driver->ClearIndex = NULL;
driver->ClearStencil = NULL;
driver->ClipPlane = NULL;
driver->ColorMask = NULL;
@@ -157,7 +156,6 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
driver->Enable = NULL;
driver->Fogfv = NULL;
driver->Hint = NULL;
- driver->IndexMask = NULL;
driver->Lightfv = NULL;
driver->LightModelfv = NULL;
driver->LineStipple = NULL;
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 8e229bbe38..b97b760f18 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -1895,7 +1895,7 @@ _mesa_meta_DrawPixels(GLcontext *ctx,
_mesa_BindProgram(GL_FRAGMENT_PROGRAM_ARB, drawpix->StencilFP);
_mesa_set_enable(ctx, GL_FRAGMENT_PROGRAM_ARB, GL_TRUE);
- for (bit = 0; bit < ctx->Visual.stencilBits; bit++) {
+ for (bit = 0; bit < ctx->DrawBuffer->Visual.stencilBits; bit++) {
const GLuint mask = 1 << bit;
if (mask & origStencilMask) {
_mesa_StencilFunc(GL_ALWAYS, mask, mask);
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index b6f291098d..b85b364c57 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -625,11 +625,10 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type,
modes->bindToTextureRgb = GL_TRUE;
modes->bindToTextureRgba = GL_TRUE;
modes->bindToMipmapTexture = GL_FALSE;
- modes->bindToTextureTargets = modes->rgbMode ?
- __DRI_ATTRIB_TEXTURE_1D_BIT |
- __DRI_ATTRIB_TEXTURE_2D_BIT |
- __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT :
- 0;
+ modes->bindToTextureTargets =
+ __DRI_ATTRIB_TEXTURE_1D_BIT |
+ __DRI_ATTRIB_TEXTURE_2D_BIT |
+ __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT;
}
}
}
@@ -726,10 +725,7 @@ driGetConfigAttribIndex(const __DRIconfig *config,
{
switch (attribMap[index].attrib) {
case __DRI_ATTRIB_RENDER_TYPE:
- if (config->modes.rgbMode)
- *value = __DRI_ATTRIB_RGBA_BIT;
- else
- *value = __DRI_ATTRIB_COLOR_INDEX_BIT;
+ *value = __DRI_ATTRIB_RGBA_BIT;
break;
case __DRI_ATTRIB_CONFIG_CAVEAT:
if (config->modes.visualRating == GLX_NON_CONFORMANT_CONFIG)
diff --git a/src/mesa/drivers/dri/i810/Makefile b/src/mesa/drivers/dri/i810/Makefile
index 3874faee51..54a837d5ea 100644
--- a/src/mesa/drivers/dri/i810/Makefile
+++ b/src/mesa/drivers/dri/i810/Makefile
@@ -5,9 +5,6 @@ include $(TOP)/configs/current
LIBNAME = i810_dri.so
-# Not yet
-# MINIGLX_SOURCES = server/i810_dri.c
-
DRIVER_SOURCES = \
i810context.c \
i810ioctl.c \
diff --git a/src/mesa/drivers/dri/i810/i810tris.c b/src/mesa/drivers/dri/i810/i810tris.c
index 213ba541ce..1492f711c9 100644
--- a/src/mesa/drivers/dri/i810/i810tris.c
+++ b/src/mesa/drivers/dri/i810/i810tris.c
@@ -218,7 +218,6 @@ static struct {
#define DO_POINTS 1
#define DO_FULL_QUAD 1
-#define HAVE_RGBA 1
#define HAVE_SPEC 1
#define HAVE_BACK_COLORS 0
#define HAVE_HW_FLATSHADE 1
diff --git a/src/mesa/drivers/dri/i810/server/i810_dri.c b/src/mesa/drivers/dri/i810/server/i810_dri.c
deleted file mode 100644
index f52797c5ed..0000000000
--- a/src/mesa/drivers/dri/i810/server/i810_dri.c
+++ /dev/null
@@ -1,975 +0,0 @@
-/**
- * \file server/i810_dri.c
- * \brief File to perform the device-specific initialization tasks typically
- * done in the X server.
- *
- * Here they are converted to run in the client (or perhaps a standalone
- * process), and to work with the frame buffer device rather than the X
- * server infrastructure.
- *
- * Copyright (C) 2004 Dave Airlie (airlied@linux.ie)
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-
-#include "driver.h"
-#include "drm.h"
-
-#include "i810.h"
-#include "i810_dri.h"
-#include "i810_reg.h"
-
-
-static int i810_pitches[] = {
- 512,
- 1024,
- 2048,
- 4096,
- 0
-};
-
-static int i810_pitch_flags[] = {
- 0x0,
- 0x1,
- 0x2,
- 0x3,
- 0
-};
-
-static unsigned int i810_drm_version = 0;
-
-static int
-I810AllocLow(I810MemRange * result, I810MemRange * pool, int size)
-{
- if (size > pool->Size)
- return 0;
-
- pool->Size -= size;
- result->Size = size;
- result->Start = pool->Start;
- result->End = pool->Start += size;
-
- return 1;
-}
-
-static int
-I810AllocHigh(I810MemRange * result, I810MemRange * pool, int size)
-{
- if (size > pool->Size)
- return 0;
-
- pool->Size -= size;
- result->Size = size;
- result->End = pool->End;
- result->Start = pool->End -= size;
-
- return 1;
-}
-
-
-/**
- * \brief Wait for free FIFO entries.
- *
- * \param ctx display handle.
- * \param entries number of free entries to wait.
- *
- * It polls the free entries from the chip until it reaches the requested value
- * or a timeout (3000 tries) occurs. Aborts the program if the FIFO times out.
- */
-static void I810WaitForFifo( const DRIDriverContext *ctx,
- int entries )
-{
-}
-
-/**
- * \brief Reset graphics card to known state.
- *
- * \param ctx display handle.
- *
- * Resets the values of several I810 registers.
- */
-static void I810EngineReset( const DRIDriverContext *ctx )
-{
- unsigned char *I810MMIO = ctx->MMIOAddress;
-}
-
-/**
- * \brief Restore the drawing engine.
- *
- * \param ctx display handle
- *
- * Resets the graphics card and sets initial values for several registers of
- * the card's drawing engine.
- *
- * Turns on the i810 command processor engine (i.e., the ringbuffer).
- */
-static int I810EngineRestore( const DRIDriverContext *ctx )
-{
- I810Ptr info = ctx->driverPrivate;
- unsigned char *I810MMIO = ctx->MMIOAddress;
-
- fprintf(stderr, "%s\n", __FUNCTION__);
-
- return 1;
-}
-
-
-/**
- * \brief Shutdown the drawing engine.
- *
- * \param ctx display handle
- *
- * Turns off the command processor engine & restores the graphics card
- * to a state that fbdev understands.
- */
-static int I810EngineShutdown( const DRIDriverContext *ctx )
-{
- drmI810Init info;
- int ret;
-
- memset(&info, 0, sizeof(drmI810Init));
- info.func = I810_CLEANUP_DMA;
-
- ret = drmCommandWrite(ctx->drmFD, DRM_I810_INIT, &info, sizeof(drmI810Init));
- if (ret>0)
- {
- fprintf(stderr,"[dri] I810 DMA Cleanup failed\n");
- return -errno;
- }
- return 0;
-}
-
-/**
- * \brief Compute base 2 logarithm.
- *
- * \param val value.
- *
- * \return base 2 logarithm of \p val.
- */
-static int I810MinBits(int val)
-{
- int bits;
-
- if (!val) return 1;
- for (bits = 0; val; val >>= 1, ++bits);
- return bits;
-}
-
-static int I810DRIAgpPreInit( const DRIDriverContext *ctx, I810Ptr info)
-{
-
- if (drmAgpAcquire(ctx->drmFD) < 0) {
- fprintf(stderr, "[gart] AGP not available\n");
- return 0;
- }
-
-
- if (drmAgpEnable(ctx->drmFD, 0) < 0) {
- fprintf(stderr, "[gart] AGP not enabled\n");
- drmAgpRelease(ctx->drmFD);
- return 0;
- }
-}
-
-/**
- * \brief Initialize the AGP state
- *
- * \param ctx display handle.
- * \param info driver private data.
- *
- * \return one on success, or zero on failure.
- *
- * Acquires and enables the AGP device. Reserves memory in the AGP space for
- * the ring buffer, vertex buffers and textures. Initialize the I810
- * registers to point to that memory and add client mappings.
- */
-static int I810DRIAgpInit( const DRIDriverContext *ctx, I810Ptr info)
-{
- unsigned char *I810MMIO = ctx->MMIOAddress;
- int ret;
- int s, l;
- unsigned long dcacheHandle;
- unsigned long agpHandle;
- int pitch_idx = 0;
- int back_size = 0;
- int sysmem_size = 0;
- int width = ctx->shared.virtualWidth * ctx->cpp;
-
-
- info->backHandle = DRM_AGP_NO_HANDLE;
- info->zHandle = DRM_AGP_NO_HANDLE;
- info->sysmemHandle = DRM_AGP_NO_HANDLE;
- info->dcacheHandle = DRM_AGP_NO_HANDLE;
-
- memset(&info->DcacheMem, 0, sizeof(I810MemRange));
- memset(&info->BackBuffer, 0, sizeof(I810MemRange));
- memset(&info->DepthBuffer, 0, sizeof(I810MemRange));
-
- drmAgpAlloc(ctx->drmFD, 4096 * 1024, 1, NULL, &dcacheHandle);
- info->dcacheHandle = dcacheHandle;
-
- fprintf(stderr, "[agp] dcacheHandle : 0x%x\n", dcacheHandle);
-
-#define Elements(x) sizeof(x)/sizeof(*x)
- for (pitch_idx = 0; pitch_idx < Elements(i810_pitches); pitch_idx++)
- if (width <= i810_pitches[pitch_idx])
- break;
-
- if (pitch_idx == Elements(i810_pitches)) {
- fprintf(stderr,"[dri] Couldn't find depth/back buffer pitch\n");
- exit(-1);
- }
- else
- {
- int lines = (ctx->shared.virtualWidth + 15) / 16 * 16;
- back_size = i810_pitches[pitch_idx] * lines;
- back_size = ((back_size + 4096 - 1) / 4096) * 4096;
- }
-
- sysmem_size = ctx->shared.fbSize;
- fprintf(stderr,"sysmem_size is %lu back_size is %lu\n", sysmem_size, back_size);
- if (dcacheHandle != DRM_AGP_NO_HANDLE) {
- if (back_size > 4 * 1024 * 1024) {
- fprintf(stderr,"[dri] Backsize is larger then 4 meg\n");
- sysmem_size = sysmem_size - 2 * back_size;
- drmAgpFree(ctx->drmFD, dcacheHandle);
- info->dcacheHandle = dcacheHandle = DRM_AGP_NO_HANDLE;
- } else {
- sysmem_size = sysmem_size - back_size;
- }
- } else {
- sysmem_size = sysmem_size - 2 * back_size;
- }
-
- info->SysMem.Start=0;
- info->SysMem.Size = sysmem_size;
- info->SysMem.End = sysmem_size;
-
- if (dcacheHandle != DRM_AGP_NO_HANDLE) {
- if (drmAgpBind(ctx->drmFD, dcacheHandle, info->DepthOffset) == 0) {
- memset(&info->DcacheMem, 0, sizeof(I810MemRange));
- fprintf(stderr,"[agp] GART: Found 4096K Z buffer memory\n");
- info->DcacheMem.Start = info->DepthOffset;
- info->DcacheMem.Size = 1024 * 4096;
- info->DcacheMem.End = info->DcacheMem.Start + info->DcacheMem.Size;
- } else {
- fprintf(stderr, "[agp] GART: dcache bind failed\n");
- drmAgpFree(ctx->drmFD, dcacheHandle);
- info->dcacheHandle = dcacheHandle = DRM_AGP_NO_HANDLE;
- }
- } else {
- fprintf(stderr, "[agp] GART: no dcache memory found\n");
- }
-
- drmAgpAlloc(ctx->drmFD, back_size, 0, NULL, &agpHandle);
- info->backHandle = agpHandle;
-
- if (agpHandle != DRM_AGP_NO_HANDLE) {
- if (drmAgpBind(ctx->drmFD, agpHandle, info->BackOffset) == 0) {
- fprintf(stderr, "[agp] Bound backbuffer memory\n");
-
- info->BackBuffer.Start = info->BackOffset;
- info->BackBuffer.Size = back_size;
- info->BackBuffer.End = (info->BackBuffer.Start +
- info->BackBuffer.Size);
- } else {
- fprintf(stderr,"[agp] Unable to bind backbuffer. Disabling DRI.\n");
- return 0;
- }
- } else {
- fprintf(stderr, "[dri] Unable to allocate backbuffer memory. Disabling DRI.\n");
- return 0;
- }
-
- if (dcacheHandle == DRM_AGP_NO_HANDLE) {
- drmAgpAlloc(ctx->drmFD, back_size, 0, NULL, &agpHandle);
-
- info->zHandle = agpHandle;
-
- if (agpHandle != DRM_AGP_NO_HANDLE) {
- if (drmAgpBind(ctx->drmFD, agpHandle, info->DepthOffset) == 0) {
- fprintf(stderr,"[agp] Bound depthbuffer memory\n");
- info->DepthBuffer.Start = info->DepthOffset;
- info->DepthBuffer.Size = back_size;
- info->DepthBuffer.End = (info->DepthBuffer.Start +
- info->DepthBuffer.Size);
- } else {
- fprintf(stderr,"[agp] Unable to bind depthbuffer. Disabling DRI.\n");
- return 0;
- }
- } else {
- fprintf(stderr,"[agp] Unable to allocate depthbuffer memory. Disabling DRI.\n");
- return 0;
- }
- }
-
- /* Now allocate and bind the agp space. This memory will include the
- * regular framebuffer as well as texture memory.
- */
- drmAgpAlloc(ctx->drmFD, sysmem_size, 0, NULL, &agpHandle);
- info->sysmemHandle = agpHandle;
-
- if (agpHandle != DRM_AGP_NO_HANDLE) {
- if (drmAgpBind(ctx->drmFD, agpHandle, 0) == 0) {
- fprintf(stderr, "[agp] Bound System Texture Memory\n");
- } else {
- fprintf(stderr, "[agp] Unable to bind system texture memory. Disabling DRI.\n");
- return 0;
- }
- } else {
- fprintf(stderr, "[agp] Unable to allocate system texture memory. Disabling DRI.\n");
- return 0;
- }
-
- info->auxPitch = i810_pitches[pitch_idx];
- info->auxPitchBits = i810_pitch_flags[pitch_idx];
-
- return 1;
-}
-
-
-/**
- * \brief Initialize the kernel data structures and enable the CP engine.
- *
- * \param ctx display handle.
- * \param info driver private data.
- *
- * \return non-zero on success, or zero on failure.
- *
- * This function is a wrapper around the DRM_I810_CP_INIT command, passing
- * all the parameters in a drmI810Init structure.
- */
-static int I810DRIKernelInit( const DRIDriverContext *ctx,
- I810Ptr info)
-{
- int cpp = ctx->bpp / 8;
- drmI810Init drmInfo;
- int ret;
- I810RingBuffer *ring = &(info->LpRing);
-
- /* This is the struct passed to the kernel module for its initialization */
- memset(&drmInfo, 0, sizeof(drmI810Init));
-
- /* make sure we have at least 1.4 */
- drmInfo.func = I810_INIT_DMA_1_4;
-
- drmInfo.ring_start = ring->mem.Start;
- drmInfo.ring_end = ring->mem.End;
- drmInfo.ring_size = ring->mem.Size;
-
- drmInfo.mmio_offset = (unsigned int)info->regs;
- drmInfo.buffers_offset = (unsigned int)info->buffer_map;
- drmInfo.sarea_priv_offset = sizeof(drm_sarea_t);
-
- drmInfo.front_offset = 0;
- drmInfo.back_offset = info->BackBuffer.Start;
- drmInfo.depth_offset = info->DepthBuffer.Start;
-
- drmInfo.w = ctx->shared.virtualWidth;
- drmInfo.h = ctx->shared.virtualHeight;
- drmInfo.pitch = info->auxPitch;
- drmInfo.pitch_bits = info->auxPitchBits;
-
-
- ret = drmCommandWrite(ctx->drmFD, DRM_I810_INIT, &drmInfo,
- sizeof(drmI810Init));
-
- return ret >= 0;
-}
-
-
-/**
- * \brief Add a map for the vertex buffers that will be accessed by any
- * DRI-based clients.
- *
- * \param ctx display handle.
- * \param info driver private data.
- *
- * \return one on success, or zero on failure.
- *
- * Calls drmAddBufs() with the previously allocated vertex buffers.
- */
-static int I810DRIBufInit( const DRIDriverContext *ctx, I810Ptr info )
-{
- /* Initialize vertex buffers */
- info->bufNumBufs = drmAddBufs(ctx->drmFD,
- I810_DMA_BUF_NR,
- I810_DMA_BUF_SZ,
- DRM_AGP_BUFFER,
- info->BufferMem.Start);
-
- if (info->bufNumBufs <= 0) {
- fprintf(stderr,
- "[drm] Could not create vertex/indirect buffers list\n");
- return 0;
- }
- fprintf(stderr,
- "[drm] Added %d %d byte vertex/indirect buffers\n",
- info->bufNumBufs, I810_DMA_BUF_SZ);
-
- return 1;
-}
-
-/**
- * \brief Install an IRQ handler.
- *
- * \param ctx display handle.
- * \param info driver private data.
- *
- * Attempts to install an IRQ handler via drmCtlInstHandler(), falling back to
- * IRQ-free operation on failure.
- */
-static void I810DRIIrqInit(const DRIDriverContext *ctx,
- I810Ptr info)
-{
- if (!info->irq) {
- info->irq = drmGetInterruptFromBusID(ctx->drmFD,
- ctx->pciBus,
- ctx->pciDevice,
- ctx->pciFunc);
-
- if ((drmCtlInstHandler(ctx->drmFD, info->irq)) != 0) {
- fprintf(stderr,
- "[drm] failure adding irq handler, "
- "there is a device already using that irq\n"
- "[drm] falling back to irq-free operation\n");
- info->irq = 0;
- }
- }
-
- if (info->irq)
- fprintf(stderr,
- "[drm] dma control initialized, using IRQ %d\n",
- info->irq);
-}
-
-static int I810CheckDRMVersion( const DRIDriverContext *ctx,
- I810Ptr info )
-{
- drmVersionPtr version;
-
- version = drmGetVersion(ctx->drmFD);
- if (version) {
- int req_minor, req_patch;
-
- req_minor = 4;
- req_patch = 0;
-
- i810_drm_version = (version->version_major<<16) | version->version_minor;
- if (version->version_major != 1 ||
- version->version_minor < req_minor ||
- (version->version_minor == req_minor &&
- version->version_patchlevel < req_patch)) {
- /* Incompatible drm version */
- fprintf(stderr,
- "[dri] I810DRIScreenInit failed because of a version "
- "mismatch.\n"
- "[dri] i810.o kernel module version is %d.%d.%d "
- "but version 1.%d.%d or newer is needed.\n"
- "[dri] Disabling DRI.\n",
- version->version_major,
- version->version_minor,
- version->version_patchlevel,
- req_minor,
- req_patch);
- drmFreeVersion(version);
- return 0;
- }
-
- info->drmMinor = version->version_minor;
- drmFreeVersion(version);
- }
-
- return 1;
-}
-
-static int I810MemoryInit( const DRIDriverContext *ctx, I810Ptr info )
-{
- int width_bytes = ctx->shared.virtualWidth * ctx->cpp;
- int cpp = ctx->cpp;
- int bufferSize = (ctx->shared.virtualHeight * width_bytes);
- int depthSize = (((ctx->shared.virtualHeight+15) & ~15) * width_bytes);
- int l;
-
- if (drmAddMap(ctx->drmFD, (drm_handle_t) info->BackBuffer.Start,
- info->BackBuffer.Size, DRM_AGP, 0,
- &info->backbuffer) < 0) {
- fprintf(stderr, "[drm] drmAddMap(backbuffer) failed. Disabling DRI\n");
- return 0;
- }
-
- if (drmAddMap(ctx->drmFD, (drm_handle_t) info->DepthBuffer.Start,
- info->DepthBuffer.Size, DRM_AGP, 0,
- &info->depthbuffer) < 0) {
- fprintf(stderr, "[drm] drmAddMap(depthbuffer) failed. Disabling DRI.\n");
- return 0;
- }
-
- if (!I810AllocLow(&(info->FrontBuffer), &(info->SysMem), (((ctx->shared.virtualHeight * width_bytes) + 4095) & ~4095)))
- {
- fprintf(stderr,"Framebuffer allocation failed\n");
- return 0;
- }
- else
- fprintf(stderr,"Frame buffer at 0x%.8x (%luk, %lu bytes)\n",
- info->FrontBuffer.Start,
- info->FrontBuffer.Size / 1024, info->FrontBuffer.Size);
-
- memset(&(info->LpRing), 0, sizeof(I810RingBuffer));
- if (I810AllocLow(&(info->LpRing.mem), &(info->SysMem), 16 * 4096)) {
- fprintf(stderr,
- "Ring buffer at 0x%.8x (%luk, %lu bytes)\n",
- info->LpRing.mem.Start,
- info->LpRing.mem.Size / 1024, info->LpRing.mem.Size);
-
- info->LpRing.tail_mask = info->LpRing.mem.Size - 1;
- info->LpRing.virtual_start = info->LpRing.mem.Start;
- info->LpRing.head = 0;
- info->LpRing.tail = 0;
- info->LpRing.space = 0;
- } else {
- fprintf(stderr, "Ring buffer allocation failed\n");
- return (0);
- }
-
- /* Allocate buffer memory */
- I810AllocHigh(&(info->BufferMem), &(info->SysMem),
- I810_DMA_BUF_NR * I810_DMA_BUF_SZ);
-
-
- fprintf(stderr, "[dri] Buffer map : %lx\n",
- info->BufferMem.Start);
-
- if (info->BufferMem.Start == 0 ||
- info->BufferMem.End - info->BufferMem.Start >
- I810_DMA_BUF_NR * I810_DMA_BUF_SZ) {
- fprintf(stderr,"[dri] Not enough memory for dma buffers. Disabling DRI.\n");
- return 0;
- }
-
- if (drmAddMap(ctx->drmFD, (drm_handle_t) info->BufferMem.Start,
- info->BufferMem.Size, DRM_AGP, 0, &info->buffer_map) < 0) {
- fprintf(stderr, "[drm] drmAddMap(buffer_map) failed. Disabling DRI.\n");
- return 0;
- }
-
- if (drmAddMap(ctx->drmFD, (drm_handle_t) info->LpRing.mem.Start,
- info->LpRing.mem.Size, DRM_AGP, 0, &info->ring_map) < 0) {
- fprintf(stderr, "[drm] drmAddMap(ring_map) failed. Disabling DRI. \n");
- return 0;
- }
-
- /* Front, back and depth buffers - everything else texture??
- */
- info->textureSize = info->SysMem.Size;
-
- if (info->textureSize < 0)
- return 0;
-
-
- l = I810MinBits((info->textureSize-1) / I810_NR_TEX_REGIONS);
- if (l < I810_LOG_MIN_TEX_REGION_SIZE) l = I810_LOG_MIN_TEX_REGION_SIZE;
-
- /* Round the texture size up to the nearest whole number of
- * texture regions. Again, be greedy about this, don't
- * round down.
- */
- info->logTextureGranularity = l;
- info->textureSize = (info->textureSize >> l) << l;
-
- /* Set a minimum usable local texture heap size. This will fit
- * two 256x256x32bpp textures.
- */
- if (info->textureSize < 512 * 1024) {
- info->textureOffset = 0;
- info->textureSize = 0;
- }
-
- I810AllocLow(&(info->TexMem), &(info->SysMem), info->textureSize);
-
- if (drmAddMap(ctx->drmFD, (drm_handle_t) info->TexMem.Start,
- info->TexMem.Size, DRM_AGP, 0, &info->textures) < 0) {
- fprintf(stderr,
- "[drm] drmAddMap(textures) failed. Disabling DRI.\n");
- return 0;
- }
-
- /* Reserve space for textures */
- fprintf(stderr,
- "Will use back buffer at offset 0x%x\n",
- info->BackOffset);
- fprintf(stderr,
- "Will use depth buffer at offset 0x%x\n",
- info->DepthOffset);
- fprintf(stderr,
- "Will use %d kb for textures at offset 0x%x\n",
- info->TexMem.Size/1024, info->TexMem.Start);
-
- return 1;
-}
-
-
-
-/**
- * Called at the start of each server generation.
- *
- * \param ctx display handle.
- * \param info driver private data.
- *
- * \return non-zero on success, or zero on failure.
- *
- * Performs static frame buffer allocation. Opens the DRM device and add maps
- * to the SAREA, framebuffer and MMIO regions. Fills in \p info with more
- * information. Creates a \e server context to grab the lock for the
- * initialization ioctls and calls the other initilization functions in this
- * file. Starts the CP engine via the DRM_I810_CP_START command.
- *
- * Setups a I810DRIRec structure to be passed to i810_dri.so for its
- * initialization.
- */
-static int I810ScreenInit( DRIDriverContext *ctx, I810Ptr info )
-{
- I810DRIPtr pI810DRI;
- int err;
-
- usleep(100);
- /*assert(!ctx->IsClient);*/
-
- /* from XFree86 driver */
- info->DepthOffset = 0x3000000;
- info->BackOffset = 0x3800000;
- {
- int width_bytes = (ctx->shared.virtualWidth * ctx->cpp);
- int maxy = ctx->shared.fbSize / width_bytes;
-
-
- if (maxy <= ctx->shared.virtualHeight * 3) {
- fprintf(stderr,
- "Static buffer allocation failed -- "
- "need at least %d kB video memory (have %d kB)\n",
- (ctx->shared.virtualWidth * ctx->shared.virtualHeight *
- ctx->cpp * 3 + 1023) / 1024,
- ctx->shared.fbSize / 1024);
- return 0;
- }
- }
-
-
- info->regsSize = ctx->MMIOSize;
- ctx->shared.SAREASize = 0x2000;
-
- /* Note that drmOpen will try to load the kernel module, if needed. */
- ctx->drmFD = drmOpen("i810", NULL );
- if (ctx->drmFD < 0) {
- fprintf(stderr, "[drm] drmOpen failed\n");
- return 0;
- }
-
- if ((err = drmSetBusid(ctx->drmFD, ctx->pciBusID)) < 0) {
- fprintf(stderr, "[drm] drmSetBusid failed (%d, %s), %s\n",
- ctx->drmFD, ctx->pciBusID, strerror(-err));
- return 0;
- }
-
- if (drmAddMap( ctx->drmFD,
- 0,
- ctx->shared.SAREASize,
- DRM_SHM,
- DRM_CONTAINS_LOCK,
- &ctx->shared.hSAREA) < 0)
- {
- fprintf(stderr, "[drm] drmAddMap failed\n");
- return 0;
- }
- fprintf(stderr, "[drm] added %d byte SAREA at 0x%08lx\n",
- ctx->shared.SAREASize, ctx->shared.hSAREA);
-
- if (drmMap( ctx->drmFD,
- ctx->shared.hSAREA,
- ctx->shared.SAREASize,
- (drmAddressPtr)(&ctx->pSAREA)) < 0)
- {
- fprintf(stderr, "[drm] drmMap failed\n");
- return 0;
- }
- memset(ctx->pSAREA, 0, ctx->shared.SAREASize);
- fprintf(stderr, "[drm] mapped SAREA 0x%08lx to %p, size %d\n",
- ctx->shared.hSAREA, ctx->pSAREA, ctx->shared.SAREASize);
-
- if (drmAddMap(ctx->drmFD,
- ctx->MMIOStart,
- ctx->MMIOSize,
- DRM_REGISTERS,
- DRM_READ_ONLY,
- &info->regs) < 0) {
- fprintf(stderr, "[drm] drmAddMap mmio failed\n");
- return 0;
- }
- fprintf(stderr,
- "[drm] register handle = 0x%08x\n", info->regs);
-
- I810DRIAgpPreInit(ctx, info);
- /* Need to AddMap the framebuffer and mmio regions here:
- */
- if (drmAddMap( ctx->drmFD,
- (drm_handle_t)ctx->FBStart,
- ctx->FBSize,
- DRM_FRAME_BUFFER,
-#ifndef _EMBEDDED
- 0,
-#else
- DRM_READ_ONLY,
-#endif
- &ctx->shared.hFrameBuffer) < 0)
- {
- fprintf(stderr, "[drm] drmAddMap framebuffer failed\n");
- return 0;
- }
-
- fprintf(stderr, "[drm] framebuffer handle = 0x%08lx\n",
- ctx->shared.hFrameBuffer);
-
- /* Check the i810 DRM version */
- if (!I810CheckDRMVersion(ctx, info)) {
- return 0;
- }
-
- /* Initialize AGP */
- if (!I810DRIAgpInit(ctx, info)) {
- return 0;
- }
-
-
- /* Memory manager setup */
- if (!I810MemoryInit(ctx, info)) {
- return 0;
- }
-
- /* Initialize the SAREA private data structure */
- {
- I810SAREAPtr pSAREAPriv;
- pSAREAPriv = (I810SAREAPtr)(((char*)ctx->pSAREA) +
- sizeof(drm_sarea_t));
- memset(pSAREAPriv, 0, sizeof(*pSAREAPriv));
- // pSAREAPriv->pf_enabled=1;
- }
-
-
- /* Create a 'server' context so we can grab the lock for
- * initialization ioctls.
- */
- if ((err = drmCreateContext(ctx->drmFD, &ctx->serverContext)) != 0) {
- fprintf(stderr, "%s: drmCreateContext failed %d\n", __FUNCTION__, err);
- return 0;
- }
-
- DRM_LOCK(ctx->drmFD, ctx->pSAREA, ctx->serverContext, 0);
-
- /* Initialize the vertex buffers list */
- if (!I810DRIBufInit(ctx, info)) {
- fprintf(stderr, "I810DRIBufInit failed\n");
- DRM_UNLOCK(ctx->drmFD, ctx->pSAREA, ctx->serverContext);
- return 0;
- }
-
- /* Initialize the kernel data structures */
- if (!I810DRIKernelInit(ctx, info)) {
- fprintf(stderr, "I810DRIKernelInit failed\n");
- DRM_UNLOCK(ctx->drmFD, ctx->pSAREA, ctx->serverContext);
- return 0;
- }
-
- /* Initialize IRQ */
- I810DRIIrqInit(ctx, info);
-
- /* Quick hack to clear the front & back buffers. Could also use
- * the clear ioctl to do this, but would need to setup hw state
- * first.
- */
-#if 0
- memset((char *)ctx->FBAddress,
- 0,
- info->auxPitch * ctx->cpp * ctx->shared.virtualHeight );
-
- memset((char *)info->backbuffer,
- 0,
- info->auxPitch * ctx->cpp * ctx->shared.virtualHeight );
-#endif
-
- /* This is the struct passed to i810_dri.so for its initialization */
- ctx->driverClientMsg = malloc(sizeof(I810DRIRec));
- ctx->driverClientMsgSize = sizeof(I810DRIRec);
- pI810DRI = (I810DRIPtr)ctx->driverClientMsg;
-
- pI810DRI->regs = info->regs;
- pI810DRI->regsSize = info->regsSize;
- // regsMap is unused
-
- pI810DRI->backbufferSize = info->BackBuffer.Size;
- pI810DRI->backbuffer = info->backbuffer;
-
- pI810DRI->depthbufferSize = info->DepthBuffer.Size;
- pI810DRI->depthbuffer = info->depthbuffer;
-
- pI810DRI->textures = info->textures;
- pI810DRI->textureSize = info->textureSize;
-
- pI810DRI->agp_buffers = info->buffer_map;
- pI810DRI->agp_buf_size = info->BufferMem.Size;
-
- pI810DRI->deviceID = info->Chipset;
- pI810DRI->width = ctx->shared.virtualWidth;
- pI810DRI->height = ctx->shared.virtualHeight;
- pI810DRI->mem = ctx->shared.fbSize;
- pI810DRI->cpp = ctx->bpp / 8;
- pI810DRI->bitsPerPixel = ctx->bpp;
- pI810DRI->fbOffset = info->FrontBuffer.Start;
- pI810DRI->fbStride = info->auxPitch;
-
- pI810DRI->backOffset = info->BackBuffer.Start;
- pI810DRI->depthOffset = info->DepthBuffer.Start;
-
- pI810DRI->auxPitch = info->auxPitch;
- pI810DRI->auxPitchBits = info->auxPitchBits;
-
- pI810DRI->logTextureGranularity = info->logTextureGranularity;
- pI810DRI->textureOffset = info->TexMem.Start;
-
- pI810DRI->ringOffset = info->LpRing.mem.Start;
- pI810DRI->ringSize = info->LpRing.mem.Size;
-
- // drmBufs looks unused
- pI810DRI->irq = info->irq;
- pI810DRI->sarea_priv_offset = sizeof(drm_sarea_t);
-
- /* Don't release the lock now - let the VT switch handler do it. */
- return 1;
-}
-
-
-/**
- * \brief Validate the fbdev mode.
- *
- * \param ctx display handle.
- *
- * \return one on success, or zero on failure.
- *
- * Saves some registers and returns 1.
- *
- * \sa i810ValidateMode().
- */
-static int i810ValidateMode( const DRIDriverContext *ctx )
-{
- unsigned char *I810MMIO = ctx->MMIOAddress;
- I810Ptr info = ctx->driverPrivate;
-
- return 1;
-}
-
-
-/**
- * \brief Examine mode returned by fbdev.
- *
- * \param ctx display handle.
- *
- * \return one on success, or zero on failure.
- *
- * Restores registers that fbdev has clobbered and returns 1.
- *
- * \sa i810ValidateMode().
- */
-static int i810PostValidateMode( const DRIDriverContext *ctx )
-{
- unsigned char *I810MMIO = ctx->MMIOAddress;
- I810Ptr info = ctx->driverPrivate;
-
- return 1;
-}
-
-
-/**
- * \brief Initialize the framebuffer device mode
- *
- * \param ctx display handle.
- *
- * \return one on success, or zero on failure.
- *
- * Fills in \p info with some default values and some information from \p ctx
- * and then calls I810ScreenInit() for the screen initialization.
- *
- * Before exiting clears the framebuffer memory accessing it directly.
- */
-static int i810InitFBDev( DRIDriverContext *ctx )
-{
- I810Ptr info = calloc(1, sizeof(*info));
-
- {
- int dummy = ctx->shared.virtualWidth;
-
- switch (ctx->bpp / 8) {
- case 1: dummy = (ctx->shared.virtualWidth + 127) & ~127; break;
- case 2: dummy = (ctx->shared.virtualWidth + 31) & ~31; break;
- case 3:
- case 4: dummy = (ctx->shared.virtualWidth + 15) & ~15; break;
- }
-
- ctx->shared.virtualWidth = dummy;
- }
-
- ctx->driverPrivate = (void *)info;
-
- info->Chipset = ctx->chipset;
-
- if (!I810ScreenInit( ctx, info ))
- return 0;
-
-
- return 1;
-}
-
-
-/**
- * \brief The screen is being closed, so clean up any state and free any
- * resources used by the DRI.
- *
- * \param ctx display handle.
- *
- * Unmaps the SAREA, closes the DRM device file descriptor and frees the driver
- * private data.
- */
-static void i810HaltFBDev( DRIDriverContext *ctx )
-{
- drmUnmap( ctx->pSAREA, ctx->shared.SAREASize );
- drmClose(ctx->drmFD);
-
- if (ctx->driverPrivate) {
- free(ctx->driverPrivate);
- ctx->driverPrivate = 0;
- }
-}
-
-
-extern void i810NotifyFocus( int );
-
-/**
- * \brief Exported driver interface for Mini GLX.
- *
- * \sa DRIDriverRec.
- */
-const struct DRIDriverRec __driDriver = {
- i810ValidateMode,
- i810PostValidateMode,
- i810InitFBDev,
- i810HaltFBDev,
- I810EngineShutdown,
- I810EngineRestore,
-#ifndef _EMBEDDED
- 0,
-#else
- i810NotifyFocus,
-#endif
-};
diff --git a/src/mesa/drivers/dri/i915/Makefile b/src/mesa/drivers/dri/i915/Makefile
index dc15ae425c..5b49d0c77c 100644
--- a/src/mesa/drivers/dri/i915/Makefile
+++ b/src/mesa/drivers/dri/i915/Makefile
@@ -4,8 +4,6 @@ include $(TOP)/configs/current
LIBNAME = i915_dri.so
-MINIGLX_SOURCES = server/intel_dri.c
-
DRIVER_SOURCES = \
i830_context.c \
i830_state.c \
diff --git a/src/mesa/drivers/dri/i915/i830_context.h b/src/mesa/drivers/dri/i915/i830_context.h
index b755d48678..d7eb9c2d44 100644
--- a/src/mesa/drivers/dri/i915/i830_context.h
+++ b/src/mesa/drivers/dri/i915/i830_context.h
@@ -34,7 +34,8 @@
#define I830_FALLBACK_COLORMASK 0x2000
#define I830_FALLBACK_STENCIL 0x4000
#define I830_FALLBACK_STIPPLE 0x8000
-#define I830_FALLBACK_LOGICOP 0x10000
+#define I830_FALLBACK_LOGICOP 0x20000
+#define I830_FALLBACK_DRAW_OFFSET 0x200000
#define I830_UPLOAD_CTX 0x1
#define I830_UPLOAD_BUFFERS 0x2
diff --git a/src/mesa/drivers/dri/i915/i830_texstate.c b/src/mesa/drivers/dri/i915/i830_texstate.c
index 7525f9f2e0..e8f7e378ec 100644
--- a/src/mesa/drivers/dri/i915/i830_texstate.c
+++ b/src/mesa/drivers/dri/i915/i830_texstate.c
@@ -122,6 +122,7 @@ i830_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
GLuint *state = i830->state.Tex[unit], format, pitch;
GLint lodbias;
GLubyte border[4];
+ GLuint dst_x, dst_y;
memset(state, 0, sizeof(state));
@@ -132,7 +133,7 @@ i830_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
i830->state.tex_buffer[unit] = NULL;
}
- if (!intelObj->imageOverride && !intel_finalize_mipmap_tree(intel, unit))
+ if (!intel_finalize_mipmap_tree(intel, unit))
return GL_FALSE;
/* Get first image here, since intelObj->firstLevel will get set in
@@ -140,42 +141,20 @@ i830_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
*/
firstImage = tObj->Image[0][intelObj->firstLevel];
- if (intelObj->imageOverride) {
- i830->state.tex_buffer[unit] = NULL;
- i830->state.tex_offset[unit] = intelObj->textureOffset;
+ intel_miptree_get_image_offset(intelObj->mt, intelObj->firstLevel, 0, 0,
+ &dst_x, &dst_y);
- switch (intelObj->depthOverride) {
- case 32:
- format = MAPSURF_32BIT | MT_32BIT_ARGB8888;
- break;
- case 24:
- default:
- format = MAPSURF_32BIT | MT_32BIT_XRGB8888;
- break;
- case 16:
- format = MAPSURF_16BIT | MT_16BIT_RGB565;
- break;
- }
-
- pitch = intelObj->pitchOverride;
- } else {
- GLuint dst_x, dst_y;
-
- intel_miptree_get_image_offset(intelObj->mt, intelObj->firstLevel, 0, 0,
- &dst_x, &dst_y);
-
- dri_bo_reference(intelObj->mt->region->buffer);
- i830->state.tex_buffer[unit] = intelObj->mt->region->buffer;
- /* XXX: This calculation is probably broken for tiled images with
- * a non-page-aligned offset.
- */
- i830->state.tex_offset[unit] = (dst_x + dst_y * intelObj->mt->pitch) *
- intelObj->mt->cpp;
+ dri_bo_reference(intelObj->mt->region->buffer);
+ i830->state.tex_buffer[unit] = intelObj->mt->region->buffer;
+ /* XXX: This calculation is probably broken for tiled images with
+ * a non-page-aligned offset.
+ */
+ i830->state.tex_offset[unit] = (dst_x + dst_y * intelObj->mt->pitch) *
+ intelObj->mt->cpp;
- format = translate_texture_format(firstImage->TexFormat,
- firstImage->InternalFormat);
- pitch = intelObj->mt->pitch * intelObj->mt->cpp;
- }
+ format = translate_texture_format(firstImage->TexFormat,
+ firstImage->InternalFormat);
+ pitch = intelObj->mt->pitch * intelObj->mt->cpp;
state[I830_TEXREG_TM0LI] = (_3DSTATE_LOAD_STATE_IMMEDIATE_2 |
(LOAD_TEXTURE_MAP0 << unit) | 4);
diff --git a/src/mesa/drivers/dri/i915/i830_vtbl.c b/src/mesa/drivers/dri/i915/i830_vtbl.c
index a8df77c600..be96419ff1 100644
--- a/src/mesa/drivers/dri/i915/i830_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i830_vtbl.c
@@ -496,15 +496,13 @@ i830_emit_state(struct intel_context *intel)
OUT_BATCH(state->Buffer[I830_DESTREG_CBUFADDR0]);
OUT_BATCH(state->Buffer[I830_DESTREG_CBUFADDR1]);
OUT_RELOC(state->draw_region->buffer,
- I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
- state->draw_region->draw_offset);
+ I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER, 0);
if (state->depth_region) {
OUT_BATCH(state->Buffer[I830_DESTREG_DBUFADDR0]);
OUT_BATCH(state->Buffer[I830_DESTREG_DBUFADDR1]);
OUT_RELOC(state->depth_region->buffer,
- I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
- state->depth_region->draw_offset);
+ I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER, 0);
}
OUT_BATCH(state->Buffer[I830_DESTREG_DV0]);
@@ -598,6 +596,7 @@ i830_set_draw_region(struct intel_context *intel,
struct intel_renderbuffer *irb = intel_renderbuffer(rb);
GLuint value;
struct i830_hw_state *state = &i830->state;
+ uint32_t draw_x, draw_y;
if (state->draw_region != color_regions[0]) {
intel_region_release(&state->draw_region);
@@ -652,14 +651,40 @@ i830_set_draw_region(struct intel_context *intel,
}
state->Buffer[I830_DESTREG_DV1] = value;
+ /* We set up the drawing rectangle to be offset into the color
+ * region's location in the miptree. If it doesn't match with
+ * depth's offsets, we can't render to it.
+ *
+ * (Well, not actually true -- the hw grew a bit to let depth's
+ * offset get forced to 0,0. We may want to use that if people are
+ * hitting that case. Also, some configurations may be supportable
+ * by tweaking the start offset of the buffers around, which we
+ * can't do in general due to tiling)
+ */
+ FALLBACK(intel, I830_FALLBACK_DRAW_OFFSET,
+ (depth_region && color_regions[0]) &&
+ (depth_region->draw_x != color_regions[0]->draw_x ||
+ depth_region->draw_y != color_regions[0]->draw_y));
+
+ if (color_regions[0]) {
+ draw_x = color_regions[0]->draw_x;
+ draw_y = color_regions[0]->draw_y;
+ } else if (depth_region) {
+ draw_x = depth_region->draw_x;
+ draw_y = depth_region->draw_y;
+ } else {
+ draw_x = 0;
+ draw_y = 0;
+ }
+
state->Buffer[I830_DESTREG_DRAWRECT0] = _3DSTATE_DRAWRECT_INFO;
state->Buffer[I830_DESTREG_DRAWRECT1] = 0;
- state->Buffer[I830_DESTREG_DRAWRECT2] = 0; /* xmin, ymin */
+ state->Buffer[I830_DESTREG_DRAWRECT2] = (draw_y << 16) | draw_x;
state->Buffer[I830_DESTREG_DRAWRECT3] =
- (ctx->DrawBuffer->Width & 0xffff) |
- (ctx->DrawBuffer->Height << 16);
- state->Buffer[I830_DESTREG_DRAWRECT4] = 0; /* xoff, yoff */
- state->Buffer[I830_DESTREG_DRAWRECT5] = 0;
+ ((ctx->DrawBuffer->Width + draw_x) & 0xffff) |
+ ((ctx->DrawBuffer->Height + draw_y) << 16);
+ state->Buffer[I830_DESTREG_DRAWRECT4] = (draw_y << 16) | draw_x;
+ state->Buffer[I830_DESTREG_DRAWRECT5] = MI_NOOP;
I830_STATECHANGE(i830, I830_UPLOAD_BUFFERS);
}
diff --git a/src/mesa/drivers/dri/i915/i915_context.h b/src/mesa/drivers/dri/i915/i915_context.h
index 60b357ec28..b5169280f6 100644
--- a/src/mesa/drivers/dri/i915/i915_context.h
+++ b/src/mesa/drivers/dri/i915/i915_context.h
@@ -40,6 +40,7 @@
#define I915_FALLBACK_POLYGON_SMOOTH 0x40000
#define I915_FALLBACK_POINT_SMOOTH 0x80000
#define I915_FALLBACK_POINT_SPRITE_COORD_ORIGIN 0x100000
+#define I915_FALLBACK_DRAW_OFFSET 0x200000
#define I915_UPLOAD_CTX 0x1
#define I915_UPLOAD_BUFFERS 0x2
diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c
index 3ee4c8653a..a1ab8f8b6d 100644
--- a/src/mesa/drivers/dri/i915/i915_texstate.c
+++ b/src/mesa/drivers/dri/i915/i915_texstate.c
@@ -150,7 +150,7 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
i915->state.tex_buffer[unit] = NULL;
}
- if (!intelObj->imageOverride && !intel_finalize_mipmap_tree(intel, unit))
+ if (!intel_finalize_mipmap_tree(intel, unit))
return GL_FALSE;
/* Get first image here, since intelObj->firstLevel will get set in
@@ -158,34 +158,14 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
*/
firstImage = tObj->Image[0][intelObj->firstLevel];
- if (intelObj->imageOverride) {
- i915->state.tex_buffer[unit] = NULL;
- i915->state.tex_offset[unit] = intelObj->textureOffset;
+ dri_bo_reference(intelObj->mt->region->buffer);
+ i915->state.tex_buffer[unit] = intelObj->mt->region->buffer;
+ i915->state.tex_offset[unit] = 0; /* Always the origin of the miptree */
- switch (intelObj->depthOverride) {
- case 32:
- format = MAPSURF_32BIT | MT_32BIT_ARGB8888;
- break;
- case 24:
- default:
- format = MAPSURF_32BIT | MT_32BIT_XRGB8888;
- break;
- case 16:
- format = MAPSURF_16BIT | MT_16BIT_RGB565;
- break;
- }
-
- pitch = intelObj->pitchOverride;
- } else {
- dri_bo_reference(intelObj->mt->region->buffer);
- i915->state.tex_buffer[unit] = intelObj->mt->region->buffer;
- i915->state.tex_offset[unit] = 0; /* Always the origin of the miptree */
-
- format = translate_texture_format(firstImage->TexFormat,
- firstImage->InternalFormat,
- tObj->DepthMode);
- pitch = intelObj->mt->pitch * intelObj->mt->cpp;
- }
+ format = translate_texture_format(firstImage->TexFormat,
+ firstImage->InternalFormat,
+ tObj->DepthMode);
+ pitch = intelObj->mt->pitch * intelObj->mt->cpp;
state[I915_TEXREG_MS3] =
(((firstImage->Height - 1) << MS3_HEIGHT_SHIFT) |
diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c
index 30aaab78c8..0a93e64b1f 100644
--- a/src/mesa/drivers/dri/i915/i915_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i915_vtbl.c
@@ -378,15 +378,13 @@ i915_emit_state(struct intel_context *intel)
OUT_BATCH(state->Buffer[I915_DESTREG_CBUFADDR0]);
OUT_BATCH(state->Buffer[I915_DESTREG_CBUFADDR1]);
OUT_RELOC(state->draw_region->buffer,
- I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
- state->draw_region->draw_offset);
+ I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER, 0);
if (state->depth_region) {
OUT_BATCH(state->Buffer[I915_DESTREG_DBUFADDR0]);
OUT_BATCH(state->Buffer[I915_DESTREG_DBUFADDR1]);
OUT_RELOC(state->depth_region->buffer,
- I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
- state->depth_region->draw_offset);
+ I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER, 0);
}
OUT_BATCH(state->Buffer[I915_DESTREG_DV0]);
@@ -534,6 +532,7 @@ i915_set_draw_region(struct intel_context *intel,
struct intel_renderbuffer *irb = intel_renderbuffer(rb);
GLuint value;
struct i915_hw_state *state = &i915->state;
+ uint32_t draw_x, draw_y;
if (state->draw_region != color_regions[0]) {
intel_region_release(&state->draw_region);
@@ -596,14 +595,41 @@ i915_set_draw_region(struct intel_context *intel,
}
state->Buffer[I915_DESTREG_DV1] = value;
- state->Buffer[I915_DESTREG_DRAWRECT0] = _3DSTATE_DRAWRECT_INFO;
- state->Buffer[I915_DESTREG_DRAWRECT1] = 0;
- state->Buffer[I915_DESTREG_DRAWRECT2] = 0; /* xmin, ymin */
- state->Buffer[I915_DESTREG_DRAWRECT3] =
- (ctx->DrawBuffer->Width & 0xffff) |
- (ctx->DrawBuffer->Height << 16);
- state->Buffer[I915_DESTREG_DRAWRECT4] = 0; /* xoff, yoff */
- state->Buffer[I915_DESTREG_DRAWRECT5] = 0;
+ /* We set up the drawing rectangle to be offset into the color
+ * region's location in the miptree. If it doesn't match with
+ * depth's offsets, we can't render to it.
+ *
+ * (Well, not actually true -- the hw grew a bit to let depth's
+ * offset get forced to 0,0. We may want to use that if people are
+ * hitting that case. Also, some configurations may be supportable
+ * by tweaking the start offset of the buffers around, which we
+ * can't do in general due to tiling)
+ */
+ FALLBACK(intel, I915_FALLBACK_DRAW_OFFSET,
+ (depth_region && color_regions[0]) &&
+ (depth_region->draw_x != color_regions[0]->draw_x ||
+ depth_region->draw_y != color_regions[0]->draw_y));
+
+ if (color_regions[0]) {
+ draw_x = color_regions[0]->draw_x;
+ draw_y = color_regions[0]->draw_y;
+ } else if (depth_region) {
+ draw_x = depth_region->draw_x;
+ draw_y = depth_region->draw_y;
+ } else {
+ draw_x = 0;
+ draw_y = 0;
+ }
+
+ /* When changing drawing rectangle offset, an MI_FLUSH is first required. */
+ state->Buffer[I915_DESTREG_DRAWRECT0] = MI_FLUSH;
+ state->Buffer[I915_DESTREG_DRAWRECT1] = _3DSTATE_DRAWRECT_INFO;
+ state->Buffer[I915_DESTREG_DRAWRECT2] = 0;
+ state->Buffer[I915_DESTREG_DRAWRECT3] = (draw_y << 16) | draw_x;
+ state->Buffer[I915_DESTREG_DRAWRECT4] =
+ ((ctx->DrawBuffer->Width + draw_x) & 0xffff) |
+ ((ctx->DrawBuffer->Height + draw_y) << 16);
+ state->Buffer[I915_DESTREG_DRAWRECT5] = (draw_y << 16) | draw_x;
I915_STATECHANGE(i915, I915_UPLOAD_BUFFERS);
}
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index 0afbda2436..fb191fe346 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.c
+++ b/src/mesa/drivers/dri/i915/intel_tris.c
@@ -603,7 +603,6 @@ static struct
#define DO_POINTS 1
#define DO_FULL_QUAD 1
-#define HAVE_RGBA 1
#define HAVE_SPEC 1
#define HAVE_BACK_COLORS 0
#define HAVE_HW_FLATSHADE 1
@@ -1177,6 +1176,8 @@ static char *fallbackStrings[] = {
[17] = "Logic op",
[18] = "Smooth polygon",
[19] = "Smooth point",
+ [20] = "point sprite coord origin",
+ [21] = "depth/color drawing offset",
};
diff --git a/src/mesa/drivers/dri/i915/server/intel_dri.c b/src/mesa/drivers/dri/i915/server/intel_dri.c
deleted file mode 120000
index effdd26448..0000000000
--- a/src/mesa/drivers/dri/i915/server/intel_dri.c
+++ /dev/null
@@ -1 +0,0 @@
-../../intel/server/intel_dri.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/i965/Makefile b/src/mesa/drivers/dri/i965/Makefile
index f98a1a27db..a242580273 100644
--- a/src/mesa/drivers/dri/i965/Makefile
+++ b/src/mesa/drivers/dri/i965/Makefile
@@ -99,7 +99,6 @@ DRIVER_SOURCES = \
C_SOURCES = \
$(COMMON_SOURCES) \
- $(MINIGLX_SOURCES) \
$(DRIVER_SOURCES)
ASM_SOURCES =
diff --git a/src/mesa/drivers/dri/i965/brw_curbe.c b/src/mesa/drivers/dri/i965/brw_curbe.c
index 6f2ead793d..4e78b08cfe 100644
--- a/src/mesa/drivers/dri/i965/brw_curbe.c
+++ b/src/mesa/drivers/dri/i965/brw_curbe.c
@@ -179,7 +179,6 @@ static GLfloat fixed_plane[6][4] = {
*/
static void prepare_constant_buffer(struct brw_context *brw)
{
- struct intel_context *intel = &brw->intel;
GLcontext *ctx = &brw->intel.ctx;
const struct brw_vertex_program *vp =
brw_vertex_program_const(brw->vertex_program);
@@ -307,7 +306,7 @@ static void prepare_constant_buffer(struct brw_context *brw)
if (brw->curbe.curbe_bo != NULL &&
brw->curbe.curbe_next_offset + bufsz > brw->curbe.curbe_bo->size)
{
- intel_bo_unmap_gtt_preferred(intel, brw->curbe.curbe_bo);
+ drm_intel_gem_bo_unmap_gtt(brw->curbe.curbe_bo);
dri_bo_unreference(brw->curbe.curbe_bo);
brw->curbe.curbe_bo = NULL;
}
@@ -319,7 +318,7 @@ static void prepare_constant_buffer(struct brw_context *brw)
brw->curbe.curbe_bo = dri_bo_alloc(brw->intel.bufmgr, "CURBE",
4096, 1 << 6);
brw->curbe.curbe_next_offset = 0;
- intel_bo_map_gtt_preferred(intel, brw->curbe.curbe_bo, GL_TRUE);
+ drm_intel_gem_bo_map_gtt(brw->curbe.curbe_bo);
}
brw->curbe.curbe_offset = brw->curbe.curbe_next_offset;
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index f0a4e8ad65..71a43577bf 100644
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
@@ -276,7 +276,6 @@ copy_array_to_vbo_array( struct brw_context *brw,
struct brw_vertex_element *element,
GLuint dst_stride)
{
- struct intel_context *intel = &brw->intel;
GLuint size = element->count * dst_stride;
get_space(brw, size, &element->bo, &element->offset);
@@ -289,52 +288,26 @@ copy_array_to_vbo_array( struct brw_context *brw,
}
if (dst_stride == element->glarray->StrideB) {
- if (intel->intelScreen->kernel_exec_fencing) {
- drm_intel_gem_bo_map_gtt(element->bo);
- memcpy((char *)element->bo->virtual + element->offset,
- element->glarray->Ptr, size);
- drm_intel_gem_bo_unmap_gtt(element->bo);
- } else {
- dri_bo_subdata(element->bo,
- element->offset,
- size,
- element->glarray->Ptr);
- }
+ drm_intel_gem_bo_map_gtt(element->bo);
+ memcpy((char *)element->bo->virtual + element->offset,
+ element->glarray->Ptr, size);
+ drm_intel_gem_bo_unmap_gtt(element->bo);
} else {
char *dest;
const unsigned char *src = element->glarray->Ptr;
int i;
- if (intel->intelScreen->kernel_exec_fencing) {
- drm_intel_gem_bo_map_gtt(element->bo);
- dest = element->bo->virtual;
- dest += element->offset;
-
- for (i = 0; i < element->count; i++) {
- memcpy(dest, src, dst_stride);
- src += element->glarray->StrideB;
- dest += dst_stride;
- }
-
- drm_intel_gem_bo_unmap_gtt(element->bo);
- } else {
- void *data;
-
- data = malloc(dst_stride * element->count);
- dest = data;
- for (i = 0; i < element->count; i++) {
- memcpy(dest, src, dst_stride);
- src += element->glarray->StrideB;
- dest += dst_stride;
- }
-
- dri_bo_subdata(element->bo,
- element->offset,
- size,
- data);
+ drm_intel_gem_bo_map_gtt(element->bo);
+ dest = element->bo->virtual;
+ dest += element->offset;
- free(data);
+ for (i = 0; i < element->count; i++) {
+ memcpy(dest, src, dst_stride);
+ src += element->glarray->StrideB;
+ dest += dst_stride;
}
+
+ drm_intel_gem_bo_unmap_gtt(element->bo);
}
}
@@ -646,13 +619,9 @@ static void brw_prepare_indices(struct brw_context *brw)
/* Straight upload
*/
- if (intel->intelScreen->kernel_exec_fencing) {
- drm_intel_gem_bo_map_gtt(bo);
- memcpy((char *)bo->virtual + offset, index_buffer->ptr, ib_size);
- drm_intel_gem_bo_unmap_gtt(bo);
- } else {
- dri_bo_subdata(bo, offset, ib_size, index_buffer->ptr);
- }
+ drm_intel_gem_bo_map_gtt(bo);
+ memcpy((char *)bo->virtual + offset, index_buffer->ptr, ib_size);
+ drm_intel_gem_bo_unmap_gtt(bo);
} else {
offset = (GLuint) (unsigned long) index_buffer->ptr;
brw->ib.start_vertex_offset = 0;
diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c
index e0be3cc6e3..a7c4b58972 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c
@@ -281,10 +281,12 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
*/
attributes_in_vue = MAX2(c->nr_outputs, c->nr_inputs);
- if (intel->is_ironlake || intel->gen >= 6)
- c->prog_data.urb_entry_size = (attributes_in_vue + 6 + 3) / 4;
+ if (intel->gen >= 6)
+ c->prog_data.urb_entry_size = (attributes_in_vue + 4 + 7) / 8;
+ else if (intel->is_ironlake)
+ c->prog_data.urb_entry_size = (attributes_in_vue + 6 + 3) / 4;
else
- c->prog_data.urb_entry_size = (attributes_in_vue + 2 + 3) / 4;
+ c->prog_data.urb_entry_size = (attributes_in_vue + 2 + 3) / 4;
c->prog_data.total_grf = reg;
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 ead623fc0e..4007b5a15c 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c
@@ -67,13 +67,13 @@ brw_vs_update_constant_buffer(struct brw_context *brw)
*/
_mesa_load_state_parameters(&brw->intel.ctx, vp->program.Base.Parameters);
- intel_bo_map_gtt_preferred(intel, const_buffer, GL_TRUE);
+ drm_intel_gem_bo_map_gtt(const_buffer);
for (i = 0; i < params->NumParameters; i++) {
memcpy(const_buffer->virtual + i * 4 * sizeof(float),
params->ParameterValues[i],
4 * sizeof(float));
}
- intel_bo_unmap_gtt_preferred(intel, const_buffer);
+ drm_intel_gem_bo_unmap_gtt(const_buffer);
return const_buffer;
}
@@ -104,7 +104,7 @@ brw_update_vs_constant_surface( GLcontext *ctx,
/* If there's no constant buffer, then no surface BO is needed to point at
* it.
*/
- if (vp->const_buffer == 0) {
+ if (vp->const_buffer == NULL) {
drm_intel_bo_unreference(brw->vs.surf_bo[surf]);
brw->vs.surf_bo[surf] = NULL;
return;
@@ -132,7 +132,7 @@ brw_update_vs_constant_surface( GLcontext *ctx,
brw->vs.surf_bo[surf] = brw_search_cache(&brw->surface_cache,
BRW_SS_SURFACE,
&key, sizeof(key),
- &key.bo, key.bo ? 1 : 0,
+ &key.bo, 1,
NULL);
if (brw->vs.surf_bo[surf] == NULL) {
brw->vs.surf_bo[surf] = brw_create_constant_surface(brw, &key);
diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c
index 27a2a3e8a7..96a44bfbec 100644
--- a/src/mesa/drivers/dri/i965/brw_vtbl.c
+++ b/src/mesa/drivers/dri/i965/brw_vtbl.c
@@ -144,7 +144,7 @@ static void brw_finish_batch(struct intel_context *intel)
brw_emit_query_end(brw);
if (brw->curbe.curbe_bo) {
- intel_bo_unmap_gtt_preferred(intel, brw->curbe.curbe_bo);
+ drm_intel_gem_bo_unmap_gtt(brw->curbe.curbe_bo);
drm_intel_bo_unreference(brw->curbe.curbe_bo);
brw->curbe.curbe_bo = NULL;
}
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 c232cd2791..d7650af3d9 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
@@ -89,7 +89,6 @@ struct wm_sampler_key {
float max_aniso;
GLenum minfilter, magfilter;
GLenum comparemode, comparefunc;
- dri_bo *sdc_bo;
/** If target is cubemap, take context setting.
*/
@@ -230,7 +229,7 @@ brw_wm_sampler_populate_key(struct brw_context *brw,
GLcontext *ctx = &brw->intel.ctx;
int unit;
- memset(key, 0, sizeof(*key));
+ key->sampler_count = 0;
for (unit = 0; unit < BRW_MAX_TEX_UNIT; unit++) {
if (ctx->Texture.Unit[unit]._ReallyEnabled) {
@@ -241,6 +240,8 @@ brw_wm_sampler_populate_key(struct brw_context *brw,
struct gl_texture_image *firstImage =
texObj->Image[0][intelObj->firstLevel];
+ memset(entry, 0, sizeof(*entry));
+
entry->tex_target = texObj->Target;
entry->seamless_cube_map = (texObj->Target == GL_TEXTURE_CUBE_MAP)
@@ -289,7 +290,7 @@ static void upload_wm_samplers( struct brw_context *brw )
{
GLcontext *ctx = &brw->intel.ctx;
struct wm_sampler_key key;
- int i;
+ int i, sampler_key_size;
brw_wm_sampler_populate_key(brw, &key);
@@ -303,8 +304,11 @@ static void upload_wm_samplers( struct brw_context *brw )
if (brw->wm.sampler_count == 0)
return;
+ /* Only include the populated portion of the key in the search. */
+ sampler_key_size = offsetof(struct wm_sampler_key,
+ sampler[key.sampler_count]);
brw->wm.sampler_bo = brw_search_cache(&brw->cache, BRW_SAMPLER,
- &key, sizeof(key),
+ &key, sampler_key_size,
brw->wm.sdc_bo, key.sampler_count,
NULL);
@@ -324,7 +328,7 @@ static void upload_wm_samplers( struct brw_context *brw )
}
brw->wm.sampler_bo = brw_upload_cache(&brw->cache, BRW_SAMPLER,
- &key, sizeof(key),
+ &key, sampler_key_size,
brw->wm.sdc_bo, key.sampler_count,
&sampler, sizeof(sampler));
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 a42067611c..ce0bf0b97d 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -207,33 +207,14 @@ brw_create_texture_surface( struct brw_context *brw,
surf.ss0.mipmap_layout_mode = BRW_SURFACE_MIPMAPLAYOUT_BELOW;
surf.ss0.surface_type = translate_tex_target(key->target);
- if (key->bo) {
- surf.ss0.surface_format = translate_tex_format(key->format,
- key->internal_format,
- key->depthmode);
- }
- else {
- switch (key->depth) {
- case 32:
- surf.ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
- break;
- default:
- case 24:
- surf.ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8X8_UNORM;
- break;
- case 16:
- surf.ss0.surface_format = BRW_SURFACEFORMAT_B5G6R5_UNORM;
- break;
- }
- }
+ surf.ss0.surface_format = translate_tex_format(key->format,
+ key->internal_format,
+ key->depthmode);
/* This is ok for all textures with channel width 8bit or less:
*/
/* surf.ss0.data_return_format = BRW_SURFACERETURNFORMAT_S1; */
- if (key->bo)
- surf.ss1.base_addr = key->bo->offset; /* reloc */
- else
- surf.ss1.base_addr = key->offset;
+ surf.ss1.base_addr = key->bo->offset; /* reloc */
surf.ss2.mip_count = key->last_level - key->first_level;
surf.ss2.width = key->width - 1;
@@ -255,17 +236,14 @@ brw_create_texture_surface( struct brw_context *brw,
bo = brw_upload_cache(&brw->surface_cache, BRW_SS_SURFACE,
key, sizeof(*key),
- &key->bo, key->bo ? 1 : 0,
+ &key->bo, 1,
&surf, sizeof(surf));
- if (key->bo) {
- /* Emit relocation to surface contents */
- dri_bo_emit_reloc(bo,
- I915_GEM_DOMAIN_SAMPLER, 0,
- 0,
- offsetof(struct brw_surface_state, ss1),
- key->bo);
- }
+ /* Emit relocation to surface contents */
+ drm_intel_bo_emit_reloc(bo, offsetof(struct brw_surface_state, ss1),
+ key->bo, 0,
+ I915_GEM_DOMAIN_SAMPLER, 0);
+
return bo;
}
@@ -281,19 +259,12 @@ brw_update_texture_surface( GLcontext *ctx, GLuint unit )
memset(&key, 0, sizeof(key));
- if (intelObj->imageOverride) {
- key.pitch = intelObj->pitchOverride / intelObj->mt->cpp;
- key.depth = intelObj->depthOverride;
- key.bo = NULL;
- key.offset = intelObj->textureOffset;
- } else {
- key.format = firstImage->TexFormat;
- key.internal_format = firstImage->InternalFormat;
- key.pitch = intelObj->mt->pitch;
- key.depth = firstImage->Depth;
- key.bo = intelObj->mt->region->buffer;
- key.offset = 0;
- }
+ key.format = firstImage->TexFormat;
+ key.internal_format = firstImage->InternalFormat;
+ key.pitch = intelObj->mt->pitch;
+ key.depth = firstImage->Depth;
+ key.bo = intelObj->mt->region->buffer;
+ key.offset = 0;
key.target = tObj->Target;
key.depthmode = tObj->DepthMode;
@@ -308,7 +279,7 @@ brw_update_texture_surface( GLcontext *ctx, GLuint unit )
brw->wm.surf_bo[surf] = brw_search_cache(&brw->surface_cache,
BRW_SS_SURFACE,
&key, sizeof(key),
- &key.bo, key.bo ? 1 : 0,
+ &key.bo, 1,
NULL);
if (brw->wm.surf_bo[surf] == NULL) {
brw->wm.surf_bo[surf] = brw_create_texture_surface(brw, &key);
@@ -336,10 +307,7 @@ brw_create_constant_surface( struct brw_context *brw,
surf.ss0.surface_format = BRW_SURFACEFORMAT_R32G32B32A32_FLOAT;
assert(key->bo);
- if (key->bo)
- surf.ss1.base_addr = key->bo->offset; /* reloc */
- else
- surf.ss1.base_addr = key->offset;
+ surf.ss1.base_addr = key->bo->offset; /* reloc */
surf.ss2.width = w & 0x7f; /* bits 6:0 of size or width */
surf.ss2.height = (w >> 7) & 0x1fff; /* bits 19:7 of size or width */
@@ -349,20 +317,16 @@ brw_create_constant_surface( struct brw_context *brw,
bo = brw_upload_cache(&brw->surface_cache, BRW_SS_SURFACE,
key, sizeof(*key),
- &key->bo, key->bo ? 1 : 0,
+ &key->bo, 1,
&surf, sizeof(surf));
- if (key->bo) {
- /* Emit relocation to surface contents. Section 5.1.1 of the gen4
- * bspec ("Data Cache") says that the data cache does not exist as
- * a separate cache and is just the sampler cache.
- */
- dri_bo_emit_reloc(bo,
- I915_GEM_DOMAIN_SAMPLER, 0,
- 0,
- offsetof(struct brw_surface_state, ss1),
- key->bo);
- }
+ /* Emit relocation to surface contents. Section 5.1.1 of the gen4
+ * bspec ("Data Cache") says that the data cache does not exist as
+ * a separate cache and is just the sampler cache.
+ */
+ drm_intel_bo_emit_reloc(bo, offsetof(struct brw_surface_state, ss1),
+ key->bo, 0,
+ I915_GEM_DOMAIN_SAMPLER, 0);
return bo;
}
@@ -420,7 +384,7 @@ brw_update_wm_constant_surface( GLcontext *ctx,
/* If there's no constant buffer, then no surface BO is needed to point at
* it.
*/
- if (fp->const_buffer == 0) {
+ if (fp->const_buffer == NULL) {
drm_intel_bo_unreference(brw->wm.surf_bo[surf]);
brw->wm.surf_bo[surf] = NULL;
return;
@@ -448,7 +412,7 @@ brw_update_wm_constant_surface( GLcontext *ctx,
brw->wm.surf_bo[surf] = brw_search_cache(&brw->surface_cache,
BRW_SS_SURFACE,
&key, sizeof(key),
- &key.bo, key.bo ? 1 : 0,
+ &key.bo, 1,
NULL);
if (brw->wm.surf_bo[surf] == NULL) {
brw->wm.surf_bo[surf] = brw_create_constant_surface(brw, &key);
diff --git a/src/mesa/drivers/dri/i965/gen6_cc.c b/src/mesa/drivers/dri/i965/gen6_cc.c
index 65e16e70c7..f7acad6912 100644
--- a/src/mesa/drivers/dri/i965/gen6_cc.c
+++ b/src/mesa/drivers/dri/i965/gen6_cc.c
@@ -30,9 +30,11 @@
#include "brw_defines.h"
#include "brw_util.h"
#include "intel_batchbuffer.h"
+#include "main/macros.h"
-struct brw_blend_state_key {
+struct gen6_blend_state_key {
GLboolean color_blend, alpha_enabled;
+ GLboolean dither;
GLenum logic_op;
@@ -41,13 +43,11 @@ struct brw_blend_state_key {
GLenum blend_dst_rgb, blend_dst_a;
GLenum alpha_func;
-
- GLboolean dither;
};
static void
blend_state_populate_key(struct brw_context *brw,
- struct brw_blend_state_key *key)
+ struct gen6_blend_state_key *key)
{
GLcontext *ctx = &brw->intel.ctx;
@@ -85,7 +85,7 @@ blend_state_populate_key(struct brw_context *brw,
*/
static drm_intel_bo *
blend_state_create_from_key(struct brw_context *brw,
- struct brw_blend_state_key *key)
+ struct gen6_blend_state_key *key)
{
struct gen6_blend_state blend;
drm_intel_bo *bo;
@@ -148,7 +148,7 @@ blend_state_create_from_key(struct brw_context *brw,
static void
prepare_blend_state(struct brw_context *brw)
{
- struct brw_blend_state_key key;
+ struct gen6_blend_state_key key;
blend_state_populate_key(brw, &key);
@@ -171,7 +171,7 @@ const struct brw_tracked_state gen6_blend_state = {
.prepare = prepare_blend_state,
};
-struct brw_color_calc_state_key {
+struct gen6_color_calc_state_key {
GLubyte blend_constant_color[4];
GLclampf alpha_ref;
GLubyte stencil_ref[2];
@@ -179,7 +179,7 @@ struct brw_color_calc_state_key {
static void
color_calc_state_populate_key(struct brw_context *brw,
- struct brw_color_calc_state_key *key)
+ struct gen6_color_calc_state_key *key)
{
GLcontext *ctx = &brw->intel.ctx;
@@ -209,7 +209,7 @@ color_calc_state_populate_key(struct brw_context *brw,
*/
static drm_intel_bo *
color_calc_state_create_from_key(struct brw_context *brw,
- struct brw_color_calc_state_key *key)
+ struct gen6_color_calc_state_key *key)
{
struct gen6_color_calc_state cc;
drm_intel_bo *bo;
@@ -238,7 +238,7 @@ color_calc_state_create_from_key(struct brw_context *brw,
static void
prepare_color_calc_state(struct brw_context *brw)
{
- struct brw_color_calc_state_key key;
+ struct gen6_color_calc_state_key key;
color_calc_state_populate_key(brw, &key);
diff --git a/src/mesa/drivers/dri/i965/gen6_sf_state.c b/src/mesa/drivers/dri/i965/gen6_sf_state.c
index 08e6753a91..8d96b44f1d 100644
--- a/src/mesa/drivers/dri/i965/gen6_sf_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_sf_state.c
@@ -32,6 +32,25 @@
#include "main/macros.h"
#include "intel_batchbuffer.h"
+static uint32_t
+get_attr_override(struct brw_context *brw, int attr)
+{
+ uint32_t attr_override;
+ int attr_index = 0, i;
+
+ /* Find the source index (0 = first attribute after the 4D position)
+ * for this output attribute. attr is currently a VERT_RESULT_* but should
+ * be FRAG_ATTRIB_*.
+ */
+ for (i = 0; i < attr; i++) {
+ if (brw->vs.prog_data->outputs_written & BITFIELD64_BIT(i))
+ attr_index++;
+ }
+ attr_override = attr_index;
+
+ return attr_index;
+}
+
static void
upload_sf_state(struct brw_context *brw)
{
@@ -45,10 +64,11 @@ upload_sf_state(struct brw_context *brw)
int i;
/* _NEW_BUFFER */
GLboolean render_to_fbo = brw->intel.ctx.DrawBuffer->Name != 0;
+ int attr = 0;
dw1 =
num_outputs << GEN6_SF_NUM_OUTPUTS_SHIFT |
- num_inputs << GEN6_SF_URB_ENTRY_READ_LENGTH_SHIFT |
+ (num_inputs + 1) / 2 << GEN6_SF_URB_ENTRY_READ_LENGTH_SHIFT |
3 << GEN6_SF_URB_ENTRY_READ_OFFSET_SHIFT;
dw2 = GEN6_SF_VIEWPORT_TRANSFORM_ENABLE |
GEN6_SF_STATISTICS_ENABLE;
@@ -122,8 +142,27 @@ upload_sf_state(struct brw_context *brw)
OUT_BATCH_F(ctx->Polygon.OffsetFactor); /* scale */
OUT_BATCH_F(0.0); /* XXX: global depth offset clamp */
for (i = 0; i < 8; i++) {
- /* attribute overrides */
- OUT_BATCH(0);
+ uint32_t attr_overrides = 0;
+
+ /* These should be generating FS inputs read instead of VS
+ * outputs written
+ */
+ for (; attr < 64; attr++) {
+ if (brw->vs.prog_data->outputs_written & BITFIELD64_BIT(attr)) {
+ attr_overrides |= get_attr_override(brw, attr);
+ attr++;
+ break;
+ }
+ }
+
+ for (; attr < 64; attr++) {
+ if (brw->vs.prog_data->outputs_written & BITFIELD64_BIT(attr)) {
+ attr_overrides |= get_attr_override(brw, attr) << 16;
+ attr++;
+ break;
+ }
+ }
+ OUT_BATCH(attr_overrides);
}
OUT_BATCH(0); /* point sprite texcoord bitmask */
OUT_BATCH(0); /* constant interp bitmask */
diff --git a/src/mesa/drivers/dri/i965/gen6_vs_state.c b/src/mesa/drivers/dri/i965/gen6_vs_state.c
index 211a6231c9..fe597dfb94 100644
--- a/src/mesa/drivers/dri/i965/gen6_vs_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_vs_state.c
@@ -65,13 +65,13 @@ upload_vs_state(struct brw_context *brw)
constant_bo = drm_intel_bo_alloc(intel->bufmgr, "VS constant_bo",
nr_params * 4 * sizeof(float),
4096);
- intel_bo_map_gtt_preferred(intel, constant_bo, GL_TRUE);
+ drm_intel_gem_bo_map_gtt(constant_bo);
for (i = 0; i < nr_params; i++) {
memcpy((char *)constant_bo->virtual + i * 4 * sizeof(float),
vp->program.Base.Parameters->ParameterValues[i],
4 * sizeof(float));
}
- intel_bo_unmap_gtt_preferred(intel, constant_bo);
+ drm_intel_gem_bo_unmap_gtt(constant_bo);
BEGIN_BATCH(5);
OUT_BATCH(CMD_3D_CONSTANT_VS_STATE << 16 |
diff --git a/src/mesa/drivers/dri/i965/gen6_wm_state.c b/src/mesa/drivers/dri/i965/gen6_wm_state.c
index e355261769..1eb17ca627 100644
--- a/src/mesa/drivers/dri/i965/gen6_wm_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_wm_state.c
@@ -63,13 +63,13 @@ upload_wm_state(struct brw_context *brw)
constant_bo = drm_intel_bo_alloc(intel->bufmgr, "WM constant_bo",
nr_params * 4 * sizeof(float),
4096);
- intel_bo_map_gtt_preferred(intel, constant_bo, GL_TRUE);
+ drm_intel_gem_bo_map_gtt(constant_bo);
for (i = 0; i < nr_params; i++) {
memcpy((char *)constant_bo->virtual + i * 4 * sizeof(float),
fp->program.Base.Parameters->ParameterValues[i],
4 * sizeof(float));
}
- intel_bo_unmap_gtt_preferred(intel, constant_bo);
+ drm_intel_gem_bo_unmap_gtt(constant_bo);
BEGIN_BATCH(5);
OUT_BATCH(CMD_3D_CONSTANT_PS_STATE << 16 |
diff --git a/src/mesa/drivers/dri/i965/server/intel_dri.c b/src/mesa/drivers/dri/i965/server/intel_dri.c
deleted file mode 120000
index effdd26448..0000000000
--- a/src/mesa/drivers/dri/i965/server/intel_dri.c
+++ /dev/null
@@ -1 +0,0 @@
-../../intel/server/intel_dri.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.c b/src/mesa/drivers/dri/intel/intel_batchbuffer.c
index e38f10ebc6..9768b0deee 100644
--- a/src/mesa/drivers/dri/intel/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/intel/intel_batchbuffer.c
@@ -210,6 +210,8 @@ intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
{
int ret;
+ assert(delta < buffer->size);
+
if (batch->ptr - batch->map > batch->buf->size)
printf ("bad relocation ptr %p map %p offset %d size %lu\n",
batch->ptr, batch->map, batch->ptr - batch->map, batch->buf->size);
@@ -226,6 +228,33 @@ intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
return GL_TRUE;
}
+GLboolean
+intel_batchbuffer_emit_reloc_fenced(struct intel_batchbuffer *batch,
+ drm_intel_bo *buffer,
+ uint32_t read_domains, uint32_t write_domain,
+ uint32_t delta)
+{
+ int ret;
+
+ assert(delta < buffer->size);
+
+ if (batch->ptr - batch->map > batch->buf->size)
+ printf ("bad relocation ptr %p map %p offset %d size %lu\n",
+ batch->ptr, batch->map, batch->ptr - batch->map, batch->buf->size);
+ ret = drm_intel_bo_emit_reloc_fence(batch->buf, batch->ptr - batch->map,
+ buffer, delta,
+ read_domains, write_domain);
+
+ /*
+ * Using the old buffer offset, write in what the right data would
+ * be, in case the buffer doesn't move and we can short-circuit the
+ * relocation processing in the kernel
+ */
+ intel_batchbuffer_emit_dword (batch, buffer->offset + delta);
+
+ return GL_TRUE;
+}
+
void
intel_batchbuffer_data(struct intel_batchbuffer *batch,
const void *data, GLuint bytes)
diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.h b/src/mesa/drivers/dri/intel/intel_batchbuffer.h
index 4daada205a..e5ad2617ab 100644
--- a/src/mesa/drivers/dri/intel/intel_batchbuffer.h
+++ b/src/mesa/drivers/dri/intel/intel_batchbuffer.h
@@ -24,11 +24,13 @@ struct intel_batchbuffer
GLuint size;
+#ifdef DEBUG
/** Tracking of BEGIN_BATCH()/OUT_BATCH()/ADVANCE_BATCH() debugging */
struct {
GLuint total;
GLubyte *start_ptr;
} emit;
+#endif
GLuint dirty_state;
GLuint reserved_space;
@@ -64,8 +66,24 @@ GLboolean intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
uint32_t read_domains,
uint32_t write_domain,
uint32_t offset);
+GLboolean intel_batchbuffer_emit_reloc_fenced(struct intel_batchbuffer *batch,
+ drm_intel_bo *buffer,
+ uint32_t read_domains,
+ uint32_t write_domain,
+ uint32_t offset);
void intel_batchbuffer_emit_mi_flush(struct intel_batchbuffer *batch);
+static INLINE uint32_t float_as_int(float f)
+{
+ union {
+ float f;
+ uint32_t d;
+ } fi;
+
+ fi.f = f;
+ return fi.d;
+}
+
/* Inline functions - might actually be better off with these
* non-inlined. Certainly better off switching all command packets to
* be passed as structs rather than dwords, but that's a little bit of
@@ -81,62 +99,73 @@ intel_batchbuffer_space(struct intel_batchbuffer *batch)
static INLINE void
intel_batchbuffer_emit_dword(struct intel_batchbuffer *batch, GLuint dword)
{
- assert(batch->map);
+#ifdef DEBUG
assert(intel_batchbuffer_space(batch) >= 4);
+#endif
*(GLuint *) (batch->ptr) = dword;
batch->ptr += 4;
}
static INLINE void
+intel_batchbuffer_emit_float(struct intel_batchbuffer *batch, float f)
+{
+ intel_batchbuffer_emit_dword(batch, float_as_int(f));
+}
+
+static INLINE void
intel_batchbuffer_require_space(struct intel_batchbuffer *batch,
GLuint sz)
{
+#ifdef DEBUG
assert(sz < batch->size - 8);
+#endif
if (intel_batchbuffer_space(batch) < sz)
intel_batchbuffer_flush(batch);
}
-static INLINE uint32_t float_as_int(float f)
+static INLINE void
+intel_batchbuffer_begin(struct intel_batchbuffer *batch, int n)
{
- union {
- float f;
- uint32_t d;
- } fi;
+ intel_batchbuffer_require_space(batch, n * 4);
+#ifdef DEBUG
+ assert(batch->map);
+ assert(batch->emit.start_ptr == NULL);
+ batch->emit.total = n * 4;
+ batch->emit.start_ptr = batch->ptr;
+#endif
+}
- fi.f = f;
- return fi.d;
+static INLINE void
+intel_batchbuffer_advance(struct intel_batchbuffer *batch)
+{
+#ifdef DEBUG
+ unsigned int _n = batch->ptr - batch->emit.start_ptr;
+ assert(batch->emit.start_ptr != NULL);
+ if (_n != batch->emit.total) {
+ fprintf(stderr, "ADVANCE_BATCH: %d of %d dwords emitted\n",
+ _n, batch->emit.total);
+ abort();
+ }
+ batch->emit.start_ptr = NULL;
+#endif
}
/* Here are the crusty old macros, to be removed:
*/
#define BATCH_LOCALS
-#define BEGIN_BATCH(n) do { \
- intel_batchbuffer_require_space(intel->batch, (n)*4); \
- assert(intel->batch->emit.start_ptr == NULL); \
- intel->batch->emit.total = (n) * 4; \
- intel->batch->emit.start_ptr = intel->batch->ptr; \
-} while (0)
-
+#define BEGIN_BATCH(n) intel_batchbuffer_begin(intel->batch, n)
#define OUT_BATCH(d) intel_batchbuffer_emit_dword(intel->batch, d)
-#define OUT_BATCH_F(f) intel_batchbuffer_emit_dword(intel->batch, \
- float_as_int(f))
-
+#define OUT_BATCH_F(f) intel_batchbuffer_emit_float(intel->batch,f)
#define OUT_RELOC(buf, read_domains, write_domain, delta) do { \
- assert((unsigned) (delta) < buf->size); \
intel_batchbuffer_emit_reloc(intel->batch, buf, \
read_domains, write_domain, delta); \
} while (0)
+#define OUT_RELOC_FENCED(buf, read_domains, write_domain, delta) do { \
+ intel_batchbuffer_emit_reloc_fenced(intel->batch, buf, \
+ read_domains, write_domain, delta); \
+} while (0)
-#define ADVANCE_BATCH() do { \
- unsigned int _n = intel->batch->ptr - intel->batch->emit.start_ptr; \
- assert(intel->batch->emit.start_ptr != NULL); \
- if (_n != intel->batch->emit.total) { \
- fprintf(stderr, "ADVANCE_BATCH: %d of %d dwords emitted\n", \
- _n, intel->batch->emit.total); \
- abort(); \
- } \
- intel->batch->emit.start_ptr = NULL; \
-} while(0)
+#define ADVANCE_BATCH() intel_batchbuffer_advance(intel->batch);
#endif
diff --git a/src/mesa/drivers/dri/intel/intel_blit.c b/src/mesa/drivers/dri/intel/intel_blit.c
index 196a64a47a..f2769aa3e8 100644
--- a/src/mesa/drivers/dri/intel/intel_blit.c
+++ b/src/mesa/drivers/dri/intel/intel_blit.c
@@ -122,21 +122,20 @@ intelEmitCopyBlit(struct intel_context *intel,
intel_prepare_render(intel);
if (pass >= 2) {
- dri_bo_map(dst_buffer, GL_TRUE);
- dri_bo_map(src_buffer, GL_FALSE);
- _mesa_copy_rect((GLubyte *)dst_buffer->virtual + dst_offset,
- cpp,
- dst_pitch,
- dst_x, dst_y,
- w, h,
- (GLubyte *)src_buffer->virtual + src_offset,
- src_pitch,
- src_x, src_y);
-
- dri_bo_unmap(src_buffer);
- dri_bo_unmap(dst_buffer);
-
- return GL_TRUE;
+ drm_intel_gem_bo_map_gtt(dst_buffer);
+ drm_intel_gem_bo_map_gtt(src_buffer);
+ _mesa_copy_rect((GLubyte *)dst_buffer->virtual + dst_offset,
+ cpp,
+ dst_pitch,
+ dst_x, dst_y,
+ w, h,
+ (GLubyte *)src_buffer->virtual + src_offset,
+ src_pitch,
+ src_x, src_y);
+ drm_intel_gem_bo_unmap_gtt(src_buffer);
+ drm_intel_gem_bo_unmap_gtt(dst_buffer);
+
+ return GL_TRUE;
}
intel_batchbuffer_require_space(intel->batch, 8 * 4);
@@ -189,14 +188,14 @@ intelEmitCopyBlit(struct intel_context *intel,
OUT_BATCH(BR13 | (uint16_t)dst_pitch);
OUT_BATCH((dst_y << 16) | dst_x);
OUT_BATCH((dst_y2 << 16) | dst_x2);
- OUT_RELOC(dst_buffer,
- I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
- dst_offset);
+ OUT_RELOC_FENCED(dst_buffer,
+ I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
+ dst_offset);
OUT_BATCH((src_y << 16) | src_x);
OUT_BATCH((uint16_t)src_pitch);
- OUT_RELOC(src_buffer,
- I915_GEM_DOMAIN_RENDER, 0,
- src_offset);
+ OUT_RELOC_FENCED(src_buffer,
+ I915_GEM_DOMAIN_RENDER, 0,
+ src_offset);
ADVANCE_BATCH();
intel_batchbuffer_emit_mi_flush(intel->batch);
@@ -366,9 +365,9 @@ intelClearWithBlit(GLcontext *ctx, GLbitfield mask)
OUT_BATCH(BR13);
OUT_BATCH((y1 << 16) | x1);
OUT_BATCH((y2 << 16) | x2);
- OUT_RELOC(write_buffer,
- I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
- 0);
+ OUT_RELOC_FENCED(write_buffer,
+ I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
+ 0);
OUT_BATCH(clear_val);
ADVANCE_BATCH();
@@ -449,9 +448,9 @@ intelEmitImmediateColorExpandBlit(struct intel_context *intel,
OUT_BATCH(br13);
OUT_BATCH((0 << 16) | 0); /* clip x1, y1 */
OUT_BATCH((100 << 16) | 100); /* clip x2, y2 */
- OUT_RELOC(dst_buffer,
- I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
- dst_offset);
+ OUT_RELOC_FENCED(dst_buffer,
+ I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
+ dst_offset);
OUT_BATCH(0); /* bg */
OUT_BATCH(fg_color); /* fg */
OUT_BATCH(0); /* pattern base addr */
diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
index 312866d865..103aaf2b95 100644
--- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
@@ -31,10 +31,12 @@
#include "main/macros.h"
#include "main/bufferobj.h"
-#include "intel_context.h"
#include "intel_blit.h"
#include "intel_buffer_objects.h"
#include "intel_batchbuffer.h"
+#include "intel_context.h"
+#include "intel_fbo.h"
+#include "intel_mipmap_tree.h"
#include "intel_regions.h"
static GLboolean
@@ -285,7 +287,7 @@ intel_bufferobj_map(GLcontext * ctx,
return NULL;
}
- if (write_only && intel->intelScreen->kernel_exec_fencing) {
+ if (write_only) {
drm_intel_gem_bo_map_gtt(intel_obj->buffer);
intel_obj->mapped_gtt = GL_TRUE;
} else {
@@ -379,8 +381,7 @@ intel_bufferobj_map_range(GLcontext * ctx,
intel_obj->range_map_bo = drm_intel_bo_alloc(intel->bufmgr,
"range map",
length, 64);
- if (!(access & GL_MAP_READ_BIT) &&
- intel->intelScreen->kernel_exec_fencing) {
+ if (!(access & GL_MAP_READ_BIT)) {
drm_intel_gem_bo_map_gtt(intel_obj->range_map_bo);
intel_obj->mapped_gtt = GL_TRUE;
} else {
@@ -393,8 +394,7 @@ intel_bufferobj_map_range(GLcontext * ctx,
return obj->Pointer;
}
- if (!(access & GL_MAP_READ_BIT) &&
- intel->intelScreen->kernel_exec_fencing) {
+ if (!(access & GL_MAP_READ_BIT)) {
drm_intel_gem_bo_map_gtt(intel_obj->buffer);
intel_obj->mapped_gtt = GL_TRUE;
} else {
@@ -588,6 +588,126 @@ intel_bufferobj_copy_subdata(GLcontext *ctx,
intel_batchbuffer_emit_mi_flush(intel->batch);
}
+#if FEATURE_APPLE_object_purgeable
+static GLenum
+intel_buffer_purgeable(GLcontext * ctx,
+ drm_intel_bo *buffer,
+ GLenum option)
+{
+ int retained = 0;
+
+ if (buffer != NULL)
+ retained = drm_intel_bo_madvise (buffer, I915_MADV_DONTNEED);
+
+ return retained ? GL_VOLATILE_APPLE : GL_RELEASED_APPLE;
+}
+
+static GLenum
+intel_buffer_object_purgeable(GLcontext * ctx,
+ struct gl_buffer_object *obj,
+ GLenum option)
+{
+ struct intel_buffer_object *intel;
+
+ intel = intel_buffer_object (obj);
+ if (intel->buffer != NULL)
+ return intel_buffer_purgeable (ctx, intel->buffer, option);
+
+ if (option == GL_RELEASED_APPLE) {
+ if (intel->sys_buffer != NULL) {
+ free(intel->sys_buffer);
+ intel->sys_buffer = NULL;
+ }
+
+ return GL_RELEASED_APPLE;
+ } else {
+ /* XXX Create the buffer and madvise(MADV_DONTNEED)? */
+ return intel_buffer_purgeable (ctx,
+ intel_bufferobj_buffer(intel_context(ctx),
+ intel, INTEL_READ),
+ option);
+ }
+}
+
+static GLenum
+intel_texture_object_purgeable(GLcontext * ctx,
+ struct gl_texture_object *obj,
+ GLenum option)
+{
+ struct intel_texture_object *intel;
+
+ intel = intel_texture_object(obj);
+ if (intel->mt == NULL || intel->mt->region == NULL)
+ return GL_RELEASED_APPLE;
+
+ return intel_buffer_purgeable (ctx, intel->mt->region->buffer, option);
+}
+
+static GLenum
+intel_render_object_purgeable(GLcontext * ctx,
+ struct gl_renderbuffer *obj,
+ GLenum option)
+{
+ struct intel_renderbuffer *intel;
+
+ intel = intel_renderbuffer(obj);
+ if (intel->region == NULL)
+ return GL_RELEASED_APPLE;
+
+ return intel_buffer_purgeable (ctx, intel->region->buffer, option);
+}
+
+static GLenum
+intel_buffer_unpurgeable(GLcontext * ctx,
+ drm_intel_bo *buffer,
+ GLenum option)
+{
+ int retained;
+
+ retained = 0;
+ if (buffer != NULL)
+ retained = drm_intel_bo_madvise (buffer, I915_MADV_WILLNEED);
+
+ return retained ? GL_RETAINED_APPLE : GL_UNDEFINED_APPLE;
+}
+
+static GLenum
+intel_buffer_object_unpurgeable(GLcontext * ctx,
+ struct gl_buffer_object *obj,
+ GLenum option)
+{
+ return intel_buffer_unpurgeable (ctx, intel_buffer_object (obj)->buffer, option);
+}
+
+static GLenum
+intel_texture_object_unpurgeable(GLcontext * ctx,
+ struct gl_texture_object *obj,
+ GLenum option)
+{
+ struct intel_texture_object *intel;
+
+ intel = intel_texture_object(obj);
+ if (intel->mt == NULL || intel->mt->region == NULL)
+ return GL_UNDEFINED_APPLE;
+
+ return intel_buffer_unpurgeable (ctx, intel->mt->region->buffer, option);
+}
+
+static GLenum
+intel_render_object_unpurgeable(GLcontext * ctx,
+ struct gl_renderbuffer *obj,
+ GLenum option)
+{
+ struct intel_renderbuffer *intel;
+
+ intel = intel_renderbuffer(obj);
+ if (intel->region == NULL)
+ return GL_UNDEFINED_APPLE;
+
+ return intel_buffer_unpurgeable (ctx, intel->region->buffer, option);
+}
+#endif
+
void
intelInitBufferObjectFuncs(struct dd_function_table *functions)
{
@@ -601,4 +721,14 @@ intelInitBufferObjectFuncs(struct dd_function_table *functions)
functions->FlushMappedBufferRange = intel_bufferobj_flush_mapped_range;
functions->UnmapBuffer = intel_bufferobj_unmap;
functions->CopyBufferSubData = intel_bufferobj_copy_subdata;
+
+#if FEATURE_APPLE_object_purgeable
+ functions->BufferObjectPurgeable = intel_buffer_object_purgeable;
+ functions->TextureObjectPurgeable = intel_texture_object_purgeable;
+ functions->RenderObjectPurgeable = intel_render_object_purgeable;
+
+ functions->BufferObjectUnpurgeable = intel_buffer_object_unpurgeable;
+ functions->TextureObjectUnpurgeable = intel_texture_object_unpurgeable;
+ functions->RenderObjectUnpurgeable = intel_render_object_unpurgeable;
+#endif
}
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 767ad8c9d2..d6a1ba6952 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -755,12 +755,6 @@ intelInitContext(struct intel_context *intel,
}
intel->use_texture_tiling = driQueryOptionb(&intel->optionCache,
"texture_tiling");
- if (intel->use_texture_tiling &&
- !intel->intelScreen->kernel_exec_fencing) {
- fprintf(stderr, "No kernel support for execution fencing, "
- "disabling texture tiling\n");
- intel->use_texture_tiling = GL_FALSE;
- }
intel->use_early_z = driQueryOptionb(&intel->optionCache, "early_z");
intel->prim.primitive = ~0;
@@ -891,7 +885,7 @@ intelMakeCurrent(__DRIcontext * driContextPriv,
intel->driDrawable = driDrawPriv;
driContextPriv->dri2.draw_stamp = driDrawPriv->dri2.stamp - 1;
driContextPriv->dri2.read_stamp = driReadPriv->dri2.stamp - 1;
- intel_prepare_render(&intel->ctx);
+ intel_prepare_render(intel);
}
else {
_mesa_make_current(NULL, NULL, NULL);
diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h
index d20d44497e..22736a9327 100644
--- a/src/mesa/drivers/dri/intel/intel_context.h
+++ b/src/mesa/drivers/dri/intel/intel_context.h
@@ -475,25 +475,4 @@ is_power_of_two(uint32_t value)
return (value & (value - 1)) == 0;
}
-static INLINE void
-intel_bo_map_gtt_preferred(struct intel_context *intel,
- drm_intel_bo *bo,
- GLboolean write)
-{
- if (intel->intelScreen->kernel_exec_fencing)
- drm_intel_gem_bo_map_gtt(bo);
- else
- drm_intel_bo_map(bo, write);
-}
-
-static INLINE void
-intel_bo_unmap_gtt_preferred(struct intel_context *intel,
- drm_intel_bo *bo)
-{
- if (intel->intelScreen->kernel_exec_fencing)
- drm_intel_gem_bo_unmap_gtt(bo);
- else
- drm_intel_bo_unmap(bo);
-}
-
#endif
diff --git a/src/mesa/drivers/dri/intel/intel_depthtmp.h b/src/mesa/drivers/dri/intel/intel_depthtmp.h
deleted file mode 100644
index a9c75d44cf..0000000000
--- a/src/mesa/drivers/dri/intel/intel_depthtmp.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright © 2009 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 <eric@anholt.net>
- *
- */
-
-/**
- * Wrapper around the depthtmp.h macrofest to generate spans code for
- * all the tiling styles.
- */
-
-#define VALUE_TYPE INTEL_VALUE_TYPE
-#define WRITE_DEPTH(_x, _y, d) \
- (*(INTEL_VALUE_TYPE *)(irb->region->buffer->virtual + \
- NO_TILE(_x, _y)) = d)
-#define READ_DEPTH(d, _x, _y) \
- d = *(INTEL_VALUE_TYPE *)(irb->region->buffer->virtual + \
- NO_TILE(_x, _y))
-#define TAG(x) INTEL_TAG(intel_gttmap_##x)
-#include "depthtmp.h"
-
-#define VALUE_TYPE INTEL_VALUE_TYPE
-#define WRITE_DEPTH(_x, _y, d) INTEL_WRITE_DEPTH(NO_TILE(_x, _y), d)
-#define READ_DEPTH(d, _x, _y) d = INTEL_READ_DEPTH(NO_TILE(_x, _y))
-#define TAG(x) INTEL_TAG(intel##x)
-#include "depthtmp.h"
-
-#define VALUE_TYPE INTEL_VALUE_TYPE
-#define WRITE_DEPTH(_x, _y, d) INTEL_WRITE_DEPTH(X_TILE(_x, _y), d)
-#define READ_DEPTH(d, _x, _y) d = INTEL_READ_DEPTH(X_TILE(_x, _y))
-#define TAG(x) INTEL_TAG(intel_XTile_##x)
-#include "depthtmp.h"
-
-#define VALUE_TYPE INTEL_VALUE_TYPE
-#define WRITE_DEPTH(_x, _y, d) INTEL_WRITE_DEPTH(Y_TILE(_x, _y), d)
-#define READ_DEPTH(d, _x, _y) d = INTEL_READ_DEPTH(Y_TILE(_x, _y))
-#define TAG(x) INTEL_TAG(intel_YTile_##x)
-#include "depthtmp.h"
-
-#undef INTEL_VALUE_TYPE
-#undef INTEL_WRITE_DEPTH
-#undef INTEL_READ_DEPTH
-#undef INTEL_TAG
diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c
index e16c33b33d..a1aac699c9 100644
--- a/src/mesa/drivers/dri/intel/intel_extensions.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions.c
@@ -58,6 +58,7 @@
#define need_GL_EXT_secondary_color
#define need_GL_EXT_stencil_two_side
#define need_GL_APPLE_vertex_array_object
+#define need_GL_APPLE_object_purgeable
#define need_GL_ATI_separate_stencil
#define need_GL_ATI_envmap_bumpmap
#define need_GL_NV_point_sprite
@@ -121,6 +122,7 @@ static const struct dri_extension card_extensions[] = {
{ "GL_EXT_texture_lod_bias", NULL },
{ "GL_3DFX_texture_compression_FXT1", NULL },
{ "GL_APPLE_client_storage", NULL },
+ { "GL_APPLE_object_purgeable", GL_APPLE_object_purgeable_functions },
{ "GL_APPLE_vertex_array_object", GL_APPLE_vertex_array_object_functions},
{ "GL_MESA_pack_invert", NULL },
{ "GL_MESA_ycbcr_texture", NULL },
@@ -182,6 +184,7 @@ static const struct dri_extension arb_oq_extensions[] = {
{ NULL, NULL }
};
+
static const struct dri_extension fragment_shader_extensions[] = {
{ "GL_ARB_fragment_shader", NULL },
{ NULL, NULL }
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 82c7b19eef..a429f8d003 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -70,9 +70,6 @@ intel_delete_renderbuffer(struct gl_renderbuffer *rb)
ASSERT(irb);
- if (irb->span_cache != NULL)
- free(irb->span_cache);
-
if (intel && irb->region) {
intel_region_release(&irb->region);
}
@@ -222,6 +219,7 @@ intel_image_target_renderbuffer_storage(GLcontext *ctx,
intel_region_release(&irb->region);
intel_region_reference(&irb->region, image->region);
+ rb->InternalFormat = image->internal_format;
rb->Width = image->region->width;
rb->Height = image->region->height;
rb->Format = image->format;
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.h b/src/mesa/drivers/dri/intel/intel_fbo.h
index 586dbbbb25..72413f7369 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.h
+++ b/src/mesa/drivers/dri/intel/intel_fbo.h
@@ -40,9 +40,6 @@ struct intel_renderbuffer
{
struct gl_renderbuffer Base;
struct intel_region *region;
-
- uint8_t *span_cache;
- unsigned long span_cache_offset;
};
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index cb5a341050..4f14946ec7 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -119,8 +119,7 @@ intel_miptree_create(struct intel_context *intel,
struct intel_mipmap_tree *mt;
uint32_t tiling;
- if (intel->use_texture_tiling && compress_byte == 0 &&
- intel->intelScreen->kernel_exec_fencing) {
+ if (intel->use_texture_tiling && compress_byte == 0) {
if (intel->gen >= 4 &&
(base_format == GL_DEPTH_COMPONENT ||
base_format == GL_DEPTH_STENCIL_EXT))
@@ -238,11 +237,11 @@ int intel_miptree_pitch_align (struct intel_context *intel,
pitch = ALIGN(pitch * mt->cpp, pitch_align);
#ifdef I915
- /* XXX: At least the i915 seems very upset when the pitch is a multiple
- * of 1024 and sometimes 512 bytes - performance can drop by several
- * times. Go to the next multiple of the required alignment for now.
+ /* Do a little adjustment to linear allocations so that we avoid
+ * hitting the same channel of memory for 2 different pages when
+ * reading a 2x2 subspan or doing bilinear filtering.
*/
- if (!(pitch & 511) &&
+ if (tiling == I915_TILING_NONE && !(pitch & 511) &&
(pitch + pitch_align) < (1 << ctx->Const.MaxTextureLevels))
pitch += pitch_align;
#endif
diff --git a/src/mesa/drivers/dri/intel/intel_regions.c b/src/mesa/drivers/dri/intel/intel_regions.c
index f63d3a4082..f042bcbc28 100644
--- a/src/mesa/drivers/dri/intel/intel_regions.c
+++ b/src/mesa/drivers/dri/intel/intel_regions.c
@@ -118,8 +118,7 @@ intel_region_map(struct intel_context *intel, struct intel_region *region)
if (region->pbo)
intel_region_cow(intel, region);
- if (region->tiling != I915_TILING_NONE &&
- intel->intelScreen->kernel_exec_fencing)
+ if (region->tiling != I915_TILING_NONE)
drm_intel_gem_bo_map_gtt(region->buffer);
else
dri_bo_map(region->buffer, GL_TRUE);
@@ -134,8 +133,7 @@ intel_region_unmap(struct intel_context *intel, struct intel_region *region)
{
_DBG("%s %p\n", __FUNCTION__, region);
if (!--region->map_refcount) {
- if (region->tiling != I915_TILING_NONE &&
- intel->intelScreen->kernel_exec_fencing)
+ if (region->tiling != I915_TILING_NONE)
drm_intel_gem_bo_unmap_gtt(region->buffer);
else
dri_bo_unmap(region->buffer);
@@ -180,36 +178,19 @@ intel_region_alloc(struct intel_context *intel,
{
dri_bo *buffer;
struct intel_region *region;
+ unsigned long flags = 0;
+ unsigned long aligned_pitch;
- /* If we're tiled, our allocations are in 8 or 32-row blocks, so
- * failure to align our height means that we won't allocate enough pages.
- *
- * If we're untiled, we still have to align to 2 rows high because the
- * data port accesses 2x2 blocks even if the bottom row isn't to be
- * rendered, so failure to align means we could walk off the end of the
- * GTT and fault.
- */
- if (tiling == I915_TILING_X)
- height = ALIGN(height, 8);
- else if (tiling == I915_TILING_Y)
- height = ALIGN(height, 32);
- else
- height = ALIGN(height, 2);
-
- /* If we're untiled, we have to align to 2 rows high because the
- * data port accesses 2x2 blocks even if the bottom row isn't to be
- * rendered, so failure to align means we could walk off the end of the
- * GTT and fault.
+ if (expect_accelerated_upload)
+ flags |= BO_ALLOC_FOR_RENDER;
+
+ buffer = drm_intel_bo_alloc_tiled(intel->bufmgr, "region",
+ width, height, cpp,
+ &tiling, &aligned_pitch, flags);
+ /* We've already chosen a pitch as part of miptree layout. It had
+ * better be the same.
*/
- height = ALIGN(height, 2);
-
- if (expect_accelerated_upload) {
- buffer = drm_intel_bo_alloc_for_render(intel->bufmgr, "region",
- pitch * cpp * height, 64);
- } else {
- buffer = drm_intel_bo_alloc(intel->bufmgr, "region",
- pitch * cpp * height, 64);
- }
+ assert(aligned_pitch == pitch * cpp);
region = intel_region_alloc_internal(intel, cpp, width, height,
pitch, buffer);
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index bc394d048e..6e4bb64365 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -47,9 +47,6 @@
#include "i915_drm.h"
#define DRI_CONF_TEXTURE_TILING(def) \
- DRI_CONF_OPT_BEGIN(texture_tiling, bool, def) \
- DRI_CONF_DESC(en, "Enable texture tiling") \
- DRI_CONF_OPT_END \
PUBLIC const char __driConfigOptions[] =
DRI_CONF_BEGIN
@@ -65,11 +62,9 @@ PUBLIC const char __driConfigOptions[] =
DRI_CONF_DESC_END
DRI_CONF_OPT_END
-#ifdef I915
- DRI_CONF_TEXTURE_TILING(false)
-#else
- DRI_CONF_TEXTURE_TILING(true)
-#endif
+ DRI_CONF_OPT_BEGIN(texture_tiling, bool, true)
+ DRI_CONF_DESC(en, "Enable texture tiling")
+ DRI_CONF_OPT_END
DRI_CONF_OPT_BEGIN(early_z, bool, false)
DRI_CONF_DESC(en, "Enable early Z in classic mode (unstable, 945-only).")
@@ -101,11 +96,6 @@ const GLuint __driNConfigOptions = 11;
static PFNGLXCREATECONTEXTMODES create_context_modes = NULL;
#endif /*USE_NEW_INTERFACE */
-static const __DRItexOffsetExtension intelTexOffsetExtension = {
- { __DRI_TEX_OFFSET },
- intelSetTexOffset,
-};
-
static const __DRItexBufferExtension intelTexBufferExtension = {
{ __DRI_TEX_BUFFER, __DRI_TEX_BUFFER_VERSION },
intelSetTexBuffer,
@@ -232,7 +222,6 @@ static struct __DRIimageExtensionRec intelImageExtension = {
static const __DRIextension *intelScreenExtensions[] = {
&driReadDrawableExtension,
- &intelTexOffsetExtension.base,
&intelTexBufferExtension.base,
&intelFlushExtension.base,
&intelImageExtension.base,
@@ -421,10 +410,13 @@ intel_init_bufmgr(struct intel_screen *intelScreen)
return GL_FALSE;
}
- if (intel_get_param(spriv, I915_PARAM_NUM_FENCES_AVAIL, &num_fences))
- intelScreen->kernel_exec_fencing = !!num_fences;
- else
- intelScreen->kernel_exec_fencing = GL_FALSE;
+ if (!intel_get_param(spriv, I915_PARAM_NUM_FENCES_AVAIL, &num_fences) ||
+ num_fences == 0) {
+ fprintf(stderr, "[%s: %u] Kernel 2.6.29 required.\n", __func__, __LINE__);
+ return GL_FALSE;
+ }
+
+ drm_intel_bufmgr_gem_enable_fenced_relocs(intelScreen->bufmgr);
intelScreen->named_regions = _mesa_NewHashTable();
diff --git a/src/mesa/drivers/dri/intel/intel_screen.h b/src/mesa/drivers/dri/intel/intel_screen.h
index 1ce476daca..5863093f00 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.h
+++ b/src/mesa/drivers/dri/intel/intel_screen.h
@@ -46,7 +46,6 @@ struct intel_screen
GLboolean no_vbo;
dri_bufmgr *bufmgr;
- GLboolean kernel_exec_fencing;
struct _mesa_HashTable *named_regions;
/**
diff --git a/src/mesa/drivers/dri/intel/intel_span.c b/src/mesa/drivers/dri/intel/intel_span.c
index 0072bb15fc..fb5c01bc4d 100644
--- a/src/mesa/drivers/dri/intel/intel_span.c
+++ b/src/mesa/drivers/dri/intel/intel_span.c
@@ -43,218 +43,6 @@ static void
intel_set_span_functions(struct intel_context *intel,
struct gl_renderbuffer *rb);
-#define SPAN_CACHE_SIZE 4096
-
-static void
-get_span_cache(struct intel_renderbuffer *irb, uint32_t offset)
-{
- if (irb->span_cache == NULL) {
- irb->span_cache = malloc(SPAN_CACHE_SIZE);
- irb->span_cache_offset = -1;
- }
-
- if ((offset & ~(SPAN_CACHE_SIZE - 1)) != irb->span_cache_offset) {
- irb->span_cache_offset = offset & ~(SPAN_CACHE_SIZE - 1);
- dri_bo_get_subdata(irb->region->buffer, irb->span_cache_offset,
- SPAN_CACHE_SIZE, irb->span_cache);
- }
-}
-
-static void
-clear_span_cache(struct intel_renderbuffer *irb)
-{
- irb->span_cache_offset = -1;
-}
-
-static uint32_t
-pread_32(struct intel_renderbuffer *irb, uint32_t offset)
-{
- get_span_cache(irb, offset);
-
- return *(uint32_t *)(irb->span_cache + (offset & (SPAN_CACHE_SIZE - 1)));
-}
-
-static uint32_t
-pread_xrgb8888(struct intel_renderbuffer *irb, uint32_t offset)
-{
- get_span_cache(irb, offset);
-
- return *(uint32_t *)(irb->span_cache + (offset & (SPAN_CACHE_SIZE - 1))) |
- 0xff000000;
-}
-
-static uint16_t
-pread_16(struct intel_renderbuffer *irb, uint32_t offset)
-{
- get_span_cache(irb, offset);
-
- return *(uint16_t *)(irb->span_cache + (offset & (SPAN_CACHE_SIZE - 1)));
-}
-
-static uint8_t
-pread_8(struct intel_renderbuffer *irb, uint32_t offset)
-{
- get_span_cache(irb, offset);
-
- return *(uint8_t *)(irb->span_cache + (offset & (SPAN_CACHE_SIZE - 1)));
-}
-
-static void
-pwrite_32(struct intel_renderbuffer *irb, uint32_t offset, uint32_t val)
-{
- clear_span_cache(irb);
-
- dri_bo_subdata(irb->region->buffer, offset, 4, &val);
-}
-
-static void
-pwrite_xrgb8888(struct intel_renderbuffer *irb, uint32_t offset, uint32_t val)
-{
- clear_span_cache(irb);
-
- dri_bo_subdata(irb->region->buffer, offset, 3, &val);
-}
-
-static void
-pwrite_16(struct intel_renderbuffer *irb, uint32_t offset, uint16_t val)
-{
- clear_span_cache(irb);
-
- dri_bo_subdata(irb->region->buffer, offset, 2, &val);
-}
-
-static void
-pwrite_8(struct intel_renderbuffer *irb, uint32_t offset, uint8_t val)
-{
- clear_span_cache(irb);
-
- dri_bo_subdata(irb->region->buffer, offset, 1, &val);
-}
-
-static uint32_t no_tile_swizzle(struct intel_renderbuffer *irb,
- int x, int y)
-{
- return (y * irb->region->pitch + x) * irb->region->cpp;
-}
-
-/*
- * Deal with tiled surfaces
- */
-
-static uint32_t x_tile_swizzle(struct intel_renderbuffer *irb,
- int x, int y)
-{
- int tile_stride;
- int xbyte;
- int x_tile_off, y_tile_off;
- int x_tile_number, y_tile_number;
- int tile_off, tile_base;
-
- x += irb->region->draw_x;
- y += irb->region->draw_y;
-
- tile_stride = (irb->region->pitch * irb->region->cpp) << 3;
-
- xbyte = x * irb->region->cpp;
-
- x_tile_off = xbyte & 0x1ff;
- y_tile_off = y & 7;
-
- x_tile_number = xbyte >> 9;
- y_tile_number = y >> 3;
-
- tile_off = (y_tile_off << 9) + x_tile_off;
-
- switch (irb->region->bit_6_swizzle) {
- case I915_BIT_6_SWIZZLE_NONE:
- break;
- case I915_BIT_6_SWIZZLE_9:
- tile_off ^= ((tile_off >> 3) & 64);
- break;
- case I915_BIT_6_SWIZZLE_9_10:
- tile_off ^= ((tile_off >> 3) & 64) ^ ((tile_off >> 4) & 64);
- break;
- case I915_BIT_6_SWIZZLE_9_11:
- tile_off ^= ((tile_off >> 3) & 64) ^ ((tile_off >> 5) & 64);
- break;
- case I915_BIT_6_SWIZZLE_9_10_11:
- tile_off ^= ((tile_off >> 3) & 64) ^ ((tile_off >> 4) & 64) ^
- ((tile_off >> 5) & 64);
- break;
- default:
- fprintf(stderr, "Unknown tile swizzling mode %d\n",
- irb->region->bit_6_swizzle);
- exit(1);
- }
-
- tile_base = (x_tile_number << 12) + y_tile_number * tile_stride;
-
-#if 0
- printf("(%d,%d) -> %d + %d = %d (pitch = %d, tstride = %d)\n",
- x, y, tile_off, tile_base,
- tile_off + tile_base,
- irb->region->pitch, tile_stride);
-#endif
-
- return tile_base + tile_off;
-}
-
-static uint32_t y_tile_swizzle(struct intel_renderbuffer *irb,
- int x, int y)
-{
- int tile_stride;
- int xbyte;
- int x_tile_off, y_tile_off;
- int x_tile_number, y_tile_number;
- int tile_off, tile_base;
-
- x += irb->region->draw_x;
- y += irb->region->draw_y;
-
- tile_stride = (irb->region->pitch * irb->region->cpp) << 5;
-
- xbyte = x * irb->region->cpp;
-
- x_tile_off = xbyte & 0x7f;
- y_tile_off = y & 0x1f;
-
- x_tile_number = xbyte >> 7;
- y_tile_number = y >> 5;
-
- tile_off = ((x_tile_off & ~0xf) << 5) + (y_tile_off << 4) +
- (x_tile_off & 0xf);
-
- switch (irb->region->bit_6_swizzle) {
- case I915_BIT_6_SWIZZLE_NONE:
- break;
- case I915_BIT_6_SWIZZLE_9:
- tile_off ^= ((tile_off >> 3) & 64);
- break;
- case I915_BIT_6_SWIZZLE_9_10:
- tile_off ^= ((tile_off >> 3) & 64) ^ ((tile_off >> 4) & 64);
- break;
- case I915_BIT_6_SWIZZLE_9_11:
- tile_off ^= ((tile_off >> 3) & 64) ^ ((tile_off >> 5) & 64);
- break;
- case I915_BIT_6_SWIZZLE_9_10_11:
- tile_off ^= ((tile_off >> 3) & 64) ^ ((tile_off >> 4) & 64) ^
- ((tile_off >> 5) & 64);
- break;
- default:
- fprintf(stderr, "Unknown tile swizzling mode %d\n",
- irb->region->bit_6_swizzle);
- exit(1);
- }
-
- tile_base = (x_tile_number << 12) + y_tile_number * tile_stride;
-
- return tile_base + tile_off;
-}
-
-/*
- break intelWriteRGBASpan_ARGB8888
-*/
-
#undef DBG
#define DBG 0
@@ -280,50 +68,43 @@ static uint32_t y_tile_swizzle(struct intel_renderbuffer *irb,
#define HW_UNLOCK()
-/* Convenience macros to avoid typing the swizzle argument over and over */
-#define NO_TILE(_X, _Y) no_tile_swizzle(irb, (_X), (_Y))
-#define X_TILE(_X, _Y) x_tile_swizzle(irb, (_X), (_Y))
-#define Y_TILE(_X, _Y) y_tile_swizzle(irb, (_X), (_Y))
+/* Convenience macros to avoid typing the address argument over and over */
+#define NO_TILE(_X, _Y) (((_Y) * irb->region->pitch + (_X)) * irb->region->cpp)
/* r5g6b5 color span and pixel functions */
-#define INTEL_PIXEL_FMT GL_RGB
-#define INTEL_PIXEL_TYPE GL_UNSIGNED_SHORT_5_6_5
-#define INTEL_READ_VALUE(offset) pread_16(irb, offset)
-#define INTEL_WRITE_VALUE(offset, v) pwrite_16(irb, offset, v)
-#define INTEL_TAG(x) x##_RGB565
-#include "intel_spantmp.h"
+#define SPANTMP_PIXEL_FMT GL_RGB
+#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_SHORT_5_6_5
+#define TAG(x) intel_##x##_RGB565
+#define TAG2(x,y) intel_##x##y_RGB565
+#include "spantmp2.h"
/* a4r4g4b4 color span and pixel functions */
-#define INTEL_PIXEL_FMT GL_BGRA
-#define INTEL_PIXEL_TYPE GL_UNSIGNED_SHORT_4_4_4_4_REV
-#define INTEL_READ_VALUE(offset) pread_16(irb, offset)
-#define INTEL_WRITE_VALUE(offset, v) pwrite_16(irb, offset, v)
-#define INTEL_TAG(x) x##_ARGB4444
-#include "intel_spantmp.h"
+#define SPANTMP_PIXEL_FMT GL_BGRA
+#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_SHORT_4_4_4_4_REV
+#define TAG(x) intel_##x##_ARGB4444
+#define TAG2(x,y) intel_##x##y_ARGB4444
+#include "spantmp2.h"
/* a1r5g5b5 color span and pixel functions */
-#define INTEL_PIXEL_FMT GL_BGRA
-#define INTEL_PIXEL_TYPE GL_UNSIGNED_SHORT_1_5_5_5_REV
-#define INTEL_READ_VALUE(offset) pread_16(irb, offset)
-#define INTEL_WRITE_VALUE(offset, v) pwrite_16(irb, offset, v)
-#define INTEL_TAG(x) x##_ARGB1555
-#include "intel_spantmp.h"
+#define SPANTMP_PIXEL_FMT GL_BGRA
+#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_SHORT_1_5_5_5_REV
+#define TAG(x) intel_##x##_ARGB1555
+#define TAG2(x,y) intel_##x##y##_ARGB1555
+#include "spantmp2.h"
/* a8r8g8b8 color span and pixel functions */
-#define INTEL_PIXEL_FMT GL_BGRA
-#define INTEL_PIXEL_TYPE GL_UNSIGNED_INT_8_8_8_8_REV
-#define INTEL_READ_VALUE(offset) pread_32(irb, offset)
-#define INTEL_WRITE_VALUE(offset, v) pwrite_32(irb, offset, v)
-#define INTEL_TAG(x) x##_ARGB8888
-#include "intel_spantmp.h"
+#define SPANTMP_PIXEL_FMT GL_BGRA
+#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_INT_8_8_8_8_REV
+#define TAG(x) intel_##x##_ARGB8888
+#define TAG2(x,y) intel_##x##y##_ARGB8888
+#include "spantmp2.h"
/* x8r8g8b8 color span and pixel functions */
-#define INTEL_PIXEL_FMT GL_BGR
-#define INTEL_PIXEL_TYPE GL_UNSIGNED_INT_8_8_8_8_REV
-#define INTEL_READ_VALUE(offset) pread_xrgb8888(irb, offset)
-#define INTEL_WRITE_VALUE(offset, v) pwrite_xrgb8888(irb, offset, v)
-#define INTEL_TAG(x) x##_xRGB8888
-#include "intel_spantmp.h"
+#define SPANTMP_PIXEL_FMT GL_BGR
+#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_INT_8_8_8_8_REV
+#define TAG(x) intel_##x##_xRGB8888
+#define TAG2(x,y) intel_##x##y##_xRGB8888
+#include "spantmp2.h"
#define LOCAL_DEPTH_VARS \
struct intel_renderbuffer *irb = intel_renderbuffer(rb); \
@@ -339,52 +120,22 @@ static uint32_t y_tile_swizzle(struct intel_renderbuffer *irb,
#define LOCAL_STENCIL_VARS LOCAL_DEPTH_VARS
/* z16 depthbuffer functions. */
-#define INTEL_VALUE_TYPE GLushort
-#define INTEL_WRITE_DEPTH(offset, d) pwrite_16(irb, offset, d)
-#define INTEL_READ_DEPTH(offset) pread_16(irb, offset)
-#define INTEL_TAG(name) name##_z16
-#include "intel_depthtmp.h"
-
-/* z24x8 depthbuffer functions. */
-#define INTEL_VALUE_TYPE GLuint
-#define INTEL_WRITE_DEPTH(offset, d) pwrite_32(irb, offset, d)
-#define INTEL_READ_DEPTH(offset) pread_32(irb, offset)
-#define INTEL_TAG(name) name##_z24_x8
-#include "intel_depthtmp.h"
-
-
-/**
- ** 8-bit stencil function (XXX FBO: This is obsolete)
- **/
-/* XXX */
-#define WRITE_STENCIL(_x, _y, d) pwrite_8(irb, NO_TILE(_x, _y) + 3, d)
-#define READ_STENCIL(d, _x, _y) d = pread_8(irb, NO_TILE(_x, _y) + 3);
-#define TAG(x) intel_gttmap_##x##_z24_s8
-#include "stenciltmp.h"
-
-/**
- ** 8-bit stencil function (XXX FBO: This is obsolete)
- **/
-#define WRITE_STENCIL(_x, _y, d) pwrite_8(irb, NO_TILE(_x, _y) + 3, d)
-#define READ_STENCIL(d, _x, _y) d = pread_8(irb, NO_TILE(_x, _y) + 3);
-#define TAG(x) intel##x##_z24_s8
-#include "stenciltmp.h"
-
-/**
- ** 8-bit x-tile stencil function (XXX FBO: This is obsolete)
- **/
-#define WRITE_STENCIL(_x, _y, d) pwrite_8(irb, X_TILE(_x, _y) + 3, d)
-#define READ_STENCIL(d, _x, _y) d = pread_8(irb, X_TILE(_x, _y) + 3);
-#define TAG(x) intel_XTile_##x##_z24_s8
-#include "stenciltmp.h"
-
-/**
- ** 8-bit y-tile stencil function (XXX FBO: This is obsolete)
- **/
-#define WRITE_STENCIL(_x, _y, d) pwrite_8(irb, Y_TILE(_x, _y) + 3, d)
-#define READ_STENCIL(d, _x, _y) d = pread_8(irb, Y_TILE(_x, _y) + 3)
-#define TAG(x) intel_YTile_##x##_z24_s8
-#include "stenciltmp.h"
+#define VALUE_TYPE GLushort
+#define WRITE_DEPTH(_x, _y, d) \
+ (*(uint16_t *)(irb->region->buffer->virtual + NO_TILE(_x, _y)) = d)
+#define READ_DEPTH(d, _x, _y) \
+ d = *(uint16_t *)(irb->region->buffer->virtual + NO_TILE(_x, _y))
+#define TAG(x) intel_##x##_z16
+#include "depthtmp.h"
+
+/* z24_s8 and z24_x8 depthbuffer functions. */
+#define VALUE_TYPE GLuint
+#define WRITE_DEPTH(_x, _y, d) \
+ (*(uint32_t *)(irb->region->buffer->virtual + NO_TILE(_x, _y)) = d)
+#define READ_DEPTH(d, _x, _y) \
+ d = *(uint32_t *)(irb->region->buffer->virtual + NO_TILE(_x, _y))
+#define TAG(x) intel_##x##_z24_x8
+#include "depthtmp.h"
void
intel_renderbuffer_map(struct intel_context *intel, struct gl_renderbuffer *rb)
@@ -394,8 +145,7 @@ intel_renderbuffer_map(struct intel_context *intel, struct gl_renderbuffer *rb)
if (irb == NULL || irb->region == NULL)
return;
- if (intel->intelScreen->kernel_exec_fencing)
- drm_intel_gem_bo_map_gtt(irb->region->buffer);
+ drm_intel_gem_bo_map_gtt(irb->region->buffer);
intel_set_span_functions(intel, rb);
}
@@ -409,10 +159,7 @@ intel_renderbuffer_unmap(struct intel_context *intel,
if (irb == NULL || irb->region == NULL)
return;
- if (intel->intelScreen->kernel_exec_fencing)
- drm_intel_gem_bo_unmap_gtt(irb->region->buffer);
- else
- clear_span_cache(irb);
+ drm_intel_gem_bo_unmap_gtt(irb->region->buffer);
rb->GetRow = NULL;
rb->PutRow = NULL;
@@ -592,182 +339,34 @@ intel_set_span_functions(struct intel_context *intel,
struct gl_renderbuffer *rb)
{
struct intel_renderbuffer *irb = (struct intel_renderbuffer *) rb;
- uint32_t tiling = irb->region->tiling;
-
- if (intel->intelScreen->kernel_exec_fencing) {
- switch (irb->Base.Format) {
- case MESA_FORMAT_RGB565:
- intel_gttmap_InitPointers_RGB565(rb);
- break;
- case MESA_FORMAT_ARGB4444:
- intel_gttmap_InitPointers_ARGB4444(rb);
- break;
- case MESA_FORMAT_ARGB1555:
- intel_gttmap_InitPointers_ARGB1555(rb);
- break;
- case MESA_FORMAT_XRGB8888:
- intel_gttmap_InitPointers_xRGB8888(rb);
- break;
- case MESA_FORMAT_ARGB8888:
- intel_gttmap_InitPointers_ARGB8888(rb);
- break;
- case MESA_FORMAT_Z16:
- intel_gttmap_InitDepthPointers_z16(rb);
- break;
- case MESA_FORMAT_X8_Z24:
- intel_gttmap_InitDepthPointers_z24_x8(rb);
- break;
- case MESA_FORMAT_S8_Z24:
- /* There are a few different ways SW asks us to access the S8Z24 data:
- * Z24 depth-only depth reads
- * S8Z24 depth reads
- * S8Z24 stencil reads.
- */
- if (rb->Format == MESA_FORMAT_S8_Z24) {
- intel_gttmap_InitDepthPointers_z24_x8(rb);
- } else if (rb->Format == MESA_FORMAT_S8) {
- intel_gttmap_InitStencilPointers_z24_s8(rb);
- }
- break;
- default:
- _mesa_problem(NULL,
- "Unexpected MesaFormat %d in intelSetSpanFunctions",
- irb->Base.Format);
- break;
- }
- return;
- }
- /* If in GEM mode, we need to do the tile address swizzling ourselves,
- * instead of the fence registers handling it.
- */
switch (irb->Base.Format) {
case MESA_FORMAT_RGB565:
- switch (tiling) {
- case I915_TILING_NONE:
- default:
- intelInitPointers_RGB565(rb);
- break;
- case I915_TILING_X:
- intel_XTile_InitPointers_RGB565(rb);
- break;
- case I915_TILING_Y:
- intel_YTile_InitPointers_RGB565(rb);
- break;
- }
+ intel_InitPointers_RGB565(rb);
break;
case MESA_FORMAT_ARGB4444:
- switch (tiling) {
- case I915_TILING_NONE:
- default:
- intelInitPointers_ARGB4444(rb);
- break;
- case I915_TILING_X:
- intel_XTile_InitPointers_ARGB4444(rb);
- break;
- case I915_TILING_Y:
- intel_YTile_InitPointers_ARGB4444(rb);
- break;
- }
+ intel_InitPointers_ARGB4444(rb);
break;
case MESA_FORMAT_ARGB1555:
- switch (tiling) {
- case I915_TILING_NONE:
- default:
- intelInitPointers_ARGB1555(rb);
- break;
- case I915_TILING_X:
- intel_XTile_InitPointers_ARGB1555(rb);
- break;
- case I915_TILING_Y:
- intel_YTile_InitPointers_ARGB1555(rb);
- break;
- }
+ intel_InitPointers_ARGB1555(rb);
break;
case MESA_FORMAT_XRGB8888:
- switch (tiling) {
- case I915_TILING_NONE:
- default:
- intelInitPointers_xRGB8888(rb);
- break;
- case I915_TILING_X:
- intel_XTile_InitPointers_xRGB8888(rb);
- break;
- case I915_TILING_Y:
- intel_YTile_InitPointers_xRGB8888(rb);
- break;
- }
+ intel_InitPointers_xRGB8888(rb);
break;
case MESA_FORMAT_ARGB8888:
- /* 8888 RGBA */
- switch (tiling) {
- case I915_TILING_NONE:
- default:
- intelInitPointers_ARGB8888(rb);
- break;
- case I915_TILING_X:
- intel_XTile_InitPointers_ARGB8888(rb);
- break;
- case I915_TILING_Y:
- intel_YTile_InitPointers_ARGB8888(rb);
- break;
- }
+ intel_InitPointers_ARGB8888(rb);
break;
case MESA_FORMAT_Z16:
- switch (tiling) {
- case I915_TILING_NONE:
- default:
- intelInitDepthPointers_z16(rb);
- break;
- case I915_TILING_X:
- intel_XTile_InitDepthPointers_z16(rb);
- break;
- case I915_TILING_Y:
- intel_YTile_InitDepthPointers_z16(rb);
- break;
- }
+ intel_InitDepthPointers_z16(rb);
break;
case MESA_FORMAT_X8_Z24:
case MESA_FORMAT_S8_Z24:
- /* There are a few different ways SW asks us to access the S8Z24 data:
- * Z24 depth-only depth reads
- * S8Z24 depth reads
- * S8Z24 stencil reads.
- */
- if (rb->Format == MESA_FORMAT_S8_Z24) {
- switch (tiling) {
- case I915_TILING_NONE:
- default:
- intelInitDepthPointers_z24_x8(rb);
- break;
- case I915_TILING_X:
- intel_XTile_InitDepthPointers_z24_x8(rb);
- break;
- case I915_TILING_Y:
- intel_YTile_InitDepthPointers_z24_x8(rb);
- break;
- }
- } else if (rb->Format == MESA_FORMAT_S8) {
- switch (tiling) {
- case I915_TILING_NONE:
- default:
- intelInitStencilPointers_z24_s8(rb);
- break;
- case I915_TILING_X:
- intel_XTile_InitStencilPointers_z24_s8(rb);
- break;
- case I915_TILING_Y:
- intel_YTile_InitStencilPointers_z24_s8(rb);
- break;
- }
- } else {
- _mesa_problem(NULL,
- "Unexpected ActualFormat in intelSetSpanFunctions");
- }
+ intel_InitDepthPointers_z24_x8(rb);
break;
default:
_mesa_problem(NULL,
- "Unexpected MesaFormat in intelSetSpanFunctions");
+ "Unexpected MesaFormat %d in intelSetSpanFunctions",
+ irb->Base.Format);
break;
}
}
diff --git a/src/mesa/drivers/dri/intel/intel_spantmp.h b/src/mesa/drivers/dri/intel/intel_spantmp.h
deleted file mode 100644
index bad03398f6..0000000000
--- a/src/mesa/drivers/dri/intel/intel_spantmp.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright © 2009 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 <eric@anholt.net>
- *
- */
-
-/**
- * Wrapper around the spantmp.h macrofest to generate spans code for
- * all the tiling styles.
- */
-
-#define SPANTMP_PIXEL_FMT INTEL_PIXEL_FMT
-#define SPANTMP_PIXEL_TYPE INTEL_PIXEL_TYPE
-#define TAG(x) INTEL_TAG(intel_gttmap_##x)
-#define TAG2(x, y) INTEL_TAG(intel_gttmap_##x##y)
-#include "spantmp2.h"
-
-#define SPANTMP_PIXEL_FMT INTEL_PIXEL_FMT
-#define SPANTMP_PIXEL_TYPE INTEL_PIXEL_TYPE
-#define PUT_VALUE(_x, _y, v) INTEL_WRITE_VALUE(NO_TILE(_x, _y), v)
-#define GET_VALUE(_x, _y) INTEL_READ_VALUE(NO_TILE(_x, _y))
-#define TAG(x) INTEL_TAG(intel##x)
-#define TAG2(x, y) INTEL_TAG(intel##x)##y
-#include "spantmp2.h"
-
-#define SPANTMP_PIXEL_FMT INTEL_PIXEL_FMT
-#define SPANTMP_PIXEL_TYPE INTEL_PIXEL_TYPE
-#define PUT_VALUE(_x, _y, v) INTEL_WRITE_VALUE(X_TILE(_x, _y), v)
-#define GET_VALUE(_x, _y) INTEL_READ_VALUE(X_TILE(_x, _y))
-#define TAG(x) INTEL_TAG(intel_XTile_##x)
-#define TAG2(x, y) INTEL_TAG(intel_XTile_##x)##y
-#include "spantmp2.h"
-
-#define SPANTMP_PIXEL_FMT INTEL_PIXEL_FMT
-#define SPANTMP_PIXEL_TYPE INTEL_PIXEL_TYPE
-#define PUT_VALUE(_x, _y, v) INTEL_WRITE_VALUE(Y_TILE(_x, _y), v)
-#define GET_VALUE(_x, _y) INTEL_READ_VALUE(Y_TILE(_x, _y))
-#define TAG(x) INTEL_TAG(intel_YTile_##x)
-#define TAG2(x, y) INTEL_TAG(intel_YTile_##x)##y
-#include "spantmp2.h"
-
-#undef INTEL_PIXEL_FMT
-#undef INTEL_PIXEL_TYPE
-#undef INTEL_WRITE_VALUE
-#undef INTEL_READ_VALUE
-#undef INTEL_TAG
diff --git a/src/mesa/drivers/dri/intel/intel_tex.h b/src/mesa/drivers/dri/intel/intel_tex.h
index f3cc0fff5c..4bb012dc65 100644
--- a/src/mesa/drivers/dri/intel/intel_tex.h
+++ b/src/mesa/drivers/dri/intel/intel_tex.h
@@ -45,8 +45,6 @@ void intelInitTextureCopyImageFuncs(struct dd_function_table *functions);
gl_format intelChooseTextureFormat(GLcontext *ctx, GLint internalFormat,
GLenum format, GLenum type);
-void intelSetTexOffset(__DRIcontext *pDRICtx, GLint texname,
- unsigned long long offset, GLint depth, GLuint pitch);
void intelSetTexBuffer(__DRIcontext *pDRICtx,
GLint target, __DRIdrawable *pDraw);
void intelSetTexBuffer2(__DRIcontext *pDRICtx,
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index f586aee992..bac36eeb56 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -706,29 +706,6 @@ intelGetCompressedTexImage(GLcontext *ctx, GLenum target, GLint level,
texObj, texImage, GL_TRUE);
}
-
-void
-intelSetTexOffset(__DRIcontext *pDRICtx, GLint texname,
- unsigned long long offset, GLint depth, GLuint pitch)
-{
- struct intel_context *intel = pDRICtx->driverPrivate;
- struct gl_texture_object *tObj = _mesa_lookup_texture(&intel->ctx, texname);
- struct intel_texture_object *intelObj = intel_texture_object(tObj);
-
- if (!intelObj)
- return;
-
- if (intelObj->mt)
- intel_miptree_release(intel, &intelObj->mt);
-
- intelObj->imageOverride = GL_TRUE;
- intelObj->depthOverride = depth;
- intelObj->pitchOverride = pitch;
-
- if (offset)
- intelObj->textureOffset = offset;
-}
-
void
intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
GLint texture_format,
diff --git a/src/mesa/drivers/dri/intel/intel_tex_obj.h b/src/mesa/drivers/dri/intel/intel_tex_obj.h
index 3ad10d3d23..5f60e0ea4f 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_obj.h
+++ b/src/mesa/drivers/dri/intel/intel_tex_obj.h
@@ -46,10 +46,6 @@ struct intel_texture_object
* regions will be copied to this region and the old storage freed.
*/
struct intel_mipmap_tree *mt;
-
- GLboolean imageOverride;
- GLint depthOverride;
- GLuint pitchOverride;
};
struct intel_texture_image
diff --git a/src/mesa/drivers/dri/intel/server/intel_dri.c b/src/mesa/drivers/dri/intel/server/intel_dri.c
deleted file mode 100644
index e49c4214ad..0000000000
--- a/src/mesa/drivers/dri/intel/server/intel_dri.c
+++ /dev/null
@@ -1,1306 +0,0 @@
-/**
- * \file server/intel_dri.c
- * \brief File to perform the device-specific initialization tasks typically
- * done in the X server.
- *
- * Here they are converted to run in the client (or perhaps a standalone
- * process), and to work with the frame buffer device rather than the X
- * server infrastructure.
- *
- * Copyright (C) 2006 Dave Airlie (airlied@linux.ie)
-
- 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, sub license, 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 NON-INFRINGEMENT.
- IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND/OR THEIR 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.
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-
-#include "driver.h"
-#include "drm.h"
-
-#include "intel.h"
-#include "i830_dri.h"
-
-#include "memops.h"
-#include "pciaccess.h"
-
-static size_t drm_page_size;
-static int nextTile = 0;
-#define xf86DrvMsg(...) do {} while(0)
-
-static const int pitches[] = {
- 128 * 8,
- 128 * 16,
- 128 * 32,
- 128 * 64,
- 0
-};
-
-static Bool I830DRIDoMappings(DRIDriverContext *ctx, I830Rec *pI830, drmI830Sarea *sarea);
-
-static unsigned long
-GetBestTileAlignment(unsigned long size)
-{
- unsigned long i;
-
- for (i = KB(512); i < size; i <<= 1)
- ;
-
- if (i > MB(64))
- i = MB(64);
-
- return i;
-}
-
-static void SetFenceRegs(const DRIDriverContext *ctx, I830Rec *pI830)
-{
- int i;
- unsigned char *MMIO = ctx->MMIOAddress;
-
- for (i = 0; i < 8; i++) {
- OUTREG(FENCE + i * 4, pI830->Fence[i]);
- // if (I810_DEBUG & DEBUG_VERBOSE_VGA)
- fprintf(stderr,"Fence Register : %x\n", pI830->Fence[i]);
- }
-}
-
-/* Tiled memory is good... really, really good...
- *
- * Need to make it less likely that we miss out on this - probably
- * need to move the frontbuffer away from the 'guarenteed' alignment
- * of the first memory segment, or perhaps allocate a discontigous
- * framebuffer to get more alignment 'sweet spots'.
- */
-static void
-SetFence(const DRIDriverContext *ctx, I830Rec *pI830,
- int nr, unsigned int start, unsigned int pitch,
- unsigned int size)
-{
- unsigned int val;
- unsigned int fence_mask = 0;
- unsigned int fence_pitch;
-
- if (nr < 0 || nr > 7) {
- fprintf(stderr,
- "SetFence: fence %d out of range\n",nr);
- return;
- }
-
- pI830->Fence[nr] = 0;
-
- if (IS_I9XX(pI830))
- fence_mask = ~I915G_FENCE_START_MASK;
- else
- fence_mask = ~I830_FENCE_START_MASK;
-
- if (start & fence_mask) {
- fprintf(stderr,
- "SetFence: %d: start (0x%08x) is not %s aligned\n",
- nr, start, (IS_I9XX(pI830)) ? "1MB" : "512k");
- return;
- }
-
- if (start % size) {
- fprintf(stderr,
- "SetFence: %d: start (0x%08x) is not size (%dk) aligned\n",
- nr, start, size / 1024);
- return;
- }
-
- if (pitch & 127) {
- fprintf(stderr,
- "SetFence: %d: pitch (%d) not a multiple of 128 bytes\n",
- nr, pitch);
- return;
- }
-
- val = (start | FENCE_X_MAJOR | FENCE_VALID);
-
- if (IS_I9XX(pI830)) {
- switch (size) {
- case MB(1):
- val |= I915G_FENCE_SIZE_1M;
- break;
- case MB(2):
- val |= I915G_FENCE_SIZE_2M;
- break;
- case MB(4):
- val |= I915G_FENCE_SIZE_4M;
- break;
- case MB(8):
- val |= I915G_FENCE_SIZE_8M;
- break;
- case MB(16):
- val |= I915G_FENCE_SIZE_16M;
- break;
- case MB(32):
- val |= I915G_FENCE_SIZE_32M;
- break;
- case MB(64):
- val |= I915G_FENCE_SIZE_64M;
- break;
- default:
- fprintf(stderr,
- "SetFence: %d: illegal size (%d kByte)\n", nr, size / 1024);
- return;
- }
- } else {
- switch (size) {
- case KB(512):
- val |= FENCE_SIZE_512K;
- break;
- case MB(1):
- val |= FENCE_SIZE_1M;
- break;
- case MB(2):
- val |= FENCE_SIZE_2M;
- break;
- case MB(4):
- val |= FENCE_SIZE_4M;
- break;
- case MB(8):
- val |= FENCE_SIZE_8M;
- break;
- case MB(16):
- val |= FENCE_SIZE_16M;
- break;
- case MB(32):
- val |= FENCE_SIZE_32M;
- break;
- case MB(64):
- val |= FENCE_SIZE_64M;
- break;
- default:
- fprintf(stderr,
- "SetFence: %d: illegal size (%d kByte)\n", nr, size / 1024);
- return;
- }
- }
-
- if (IS_I9XX(pI830))
- fence_pitch = pitch / 512;
- else
- fence_pitch = pitch / 128;
-
- switch (fence_pitch) {
- case 1:
- val |= FENCE_PITCH_1;
- break;
- case 2:
- val |= FENCE_PITCH_2;
- break;
- case 4:
- val |= FENCE_PITCH_4;
- break;
- case 8:
- val |= FENCE_PITCH_8;
- break;
- case 16:
- val |= FENCE_PITCH_16;
- break;
- case 32:
- val |= FENCE_PITCH_32;
- break;
- case 64:
- val |= FENCE_PITCH_64;
- break;
- default:
- fprintf(stderr,
- "SetFence: %d: illegal pitch (%d)\n", nr, pitch);
- return;
- }
-
- pI830->Fence[nr] = val;
-}
-
-static Bool
-MakeTiles(const DRIDriverContext *ctx, I830Rec *pI830, I830MemRange *pMem)
-{
- int pitch, ntiles, i;
-
- pitch = pMem->Pitch * ctx->cpp;
- /*
- * Simply try to break the region up into at most four pieces of size
- * equal to the alignment.
- */
- ntiles = ROUND_TO(pMem->Size, pMem->Alignment) / pMem->Alignment;
- if (ntiles >= 4) {
- return FALSE;
- }
-
- for (i = 0; i < ntiles; i++, nextTile++) {
- SetFence(ctx, pI830, nextTile, pMem->Start + i * pMem->Alignment,
- pitch, pMem->Alignment);
- }
- return TRUE;
-}
-
-static void I830SetupMemoryTiling(const DRIDriverContext *ctx, I830Rec *pI830)
-{
- int i;
-
- /* Clear out */
- for (i = 0; i < 8; i++)
- pI830->Fence[i] = 0;
-
- nextTile = 0;
-
- if (pI830->BackBuffer.Alignment >= KB(512)) {
- if (MakeTiles(ctx, pI830, &(pI830->BackBuffer))) {
- fprintf(stderr,
- "Activating tiled memory for the back buffer.\n");
- } else {
- fprintf(stderr,
- "MakeTiles failed for the back buffer.\n");
- pI830->allowPageFlip = FALSE;
- }
- }
-
- if (pI830->DepthBuffer.Alignment >= KB(512)) {
- if (MakeTiles(ctx, pI830, &(pI830->DepthBuffer))) {
- fprintf(stderr,
- "Activating tiled memory for the depth buffer.\n");
- } else {
- fprintf(stderr,
- "MakeTiles failed for the depth buffer.\n");
- }
- }
-
- return;
-}
-
-static int I830DetectMemory(const DRIDriverContext *ctx, I830Rec *pI830)
-{
- struct pci_device host_bridge, ig_dev;
- uint32_t gmch_ctrl;
- int memsize = 0;
- int range;
- uint32_t aper_size;
- uint32_t membase2 = 0;
-
- memset(&host_bridge, 0, sizeof(host_bridge));
- memset(&ig_dev, 0, sizeof(ig_dev));
-
- ig_dev.dev = 2;
-
- pci_device_cfg_read_u32(&host_bridge, &gmch_ctrl, I830_GMCH_CTRL);
-
- if (IS_I830(pI830) || IS_845G(pI830)) {
- if ((gmch_ctrl & I830_GMCH_MEM_MASK) == I830_GMCH_MEM_128M) {
- aper_size = 0x80000000;
- } else {
- aper_size = 0x40000000;
- }
- } else {
- if (IS_I9XX(pI830)) {
- int ret;
- ret = pci_device_cfg_read_u32(&ig_dev, &membase2, 0x18);
- if (membase2 & 0x08000000)
- aper_size = 0x8000000;
- else
- aper_size = 0x10000000;
-
- fprintf(stderr,"aper size is %08X %08x %d\n", aper_size, membase2, ret);
- } else
- aper_size = 0x8000000;
- }
-
- pI830->aper_size = aper_size;
-
-
- /* We need to reduce the stolen size, by the GTT and the popup.
- * The GTT varying according the the FbMapSize and the popup is 4KB */
- range = (ctx->shared.fbSize / (1024*1024)) + 4;
-
- if (IS_I85X(pI830) || IS_I865G(pI830) || IS_I9XX(pI830)) {
- switch (gmch_ctrl & I830_GMCH_GMS_MASK) {
- case I855_GMCH_GMS_STOLEN_1M:
- memsize = MB(1) - KB(range);
- break;
- case I855_GMCH_GMS_STOLEN_4M:
- memsize = MB(4) - KB(range);
- break;
- case I855_GMCH_GMS_STOLEN_8M:
- memsize = MB(8) - KB(range);
- break;
- case I855_GMCH_GMS_STOLEN_16M:
- memsize = MB(16) - KB(range);
- break;
- case I855_GMCH_GMS_STOLEN_32M:
- memsize = MB(32) - KB(range);
- break;
- case I915G_GMCH_GMS_STOLEN_48M:
- if (IS_I9XX(pI830))
- memsize = MB(48) - KB(range);
- break;
- case I915G_GMCH_GMS_STOLEN_64M:
- if (IS_I9XX(pI830))
- memsize = MB(64) - KB(range);
- break;
- }
- } else {
- switch (gmch_ctrl & I830_GMCH_GMS_MASK) {
- case I830_GMCH_GMS_STOLEN_512:
- memsize = KB(512) - KB(range);
- break;
- case I830_GMCH_GMS_STOLEN_1024:
- memsize = MB(1) - KB(range);
- break;
- case I830_GMCH_GMS_STOLEN_8192:
- memsize = MB(8) - KB(range);
- break;
- case I830_GMCH_GMS_LOCAL:
- memsize = 0;
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "Local memory found, but won't be used.\n");
- break;
- }
- }
- if (memsize > 0) {
- fprintf(stderr,
- "detected %d kB stolen memory.\n", memsize / 1024);
- } else {
- fprintf(stderr,
- "no video memory detected.\n");
- }
- return memsize;
-}
-
-static int AgpInit(const DRIDriverContext *ctx, I830Rec *info)
-{
- unsigned long mode = 0x4;
-
- if (drmAgpAcquire(ctx->drmFD) < 0) {
- fprintf(stderr, "[gart] AGP not available\n");
- return 0;
- }
-
- if (drmAgpEnable(ctx->drmFD, mode) < 0) {
- fprintf(stderr, "[gart] AGP not enabled\n");
- drmAgpRelease(ctx->drmFD);
- return 0;
- }
- else
- fprintf(stderr, "[gart] AGP enabled at %dx\n", ctx->agpmode);
-
- return 1;
-}
-
-/*
- * Allocate memory from the given pool. Grow the pool if needed and if
- * possible.
- */
-static unsigned long
-AllocFromPool(const DRIDriverContext *ctx, I830Rec *pI830,
- I830MemRange *result, I830MemPool *pool,
- long size, unsigned long alignment, int flags)
-{
- long needed, start, end;
-
- if (!result || !pool || !size)
- return 0;
-
- /* Calculate how much space is needed. */
- if (alignment <= GTT_PAGE_SIZE)
- needed = size;
- else {
- start = ROUND_TO(pool->Free.Start, alignment);
- end = ROUND_TO(start + size, alignment);
- needed = end - pool->Free.Start;
- }
- if (needed > pool->Free.Size) {
- return 0;
- }
-
- result->Start = ROUND_TO(pool->Free.Start, alignment);
- pool->Free.Start += needed;
- result->End = pool->Free.Start;
-
- pool->Free.Size = pool->Free.End - pool->Free.Start;
- result->Size = result->End - result->Start;
- result->Pool = pool;
- result->Alignment = alignment;
- return needed;
-}
-
-static unsigned long AllocFromAGP(const DRIDriverContext *ctx, I830Rec *pI830, long size, unsigned long alignment, I830MemRange *result)
-{
- unsigned long start, end;
- unsigned long newApStart, newApEnd;
- int ret;
- if (!result || !size)
- return 0;
-
- if (!alignment)
- alignment = 4;
-
- start = ROUND_TO(pI830->MemoryAperture.Start, alignment);
- end = ROUND_TO(start + size, alignment);
- newApStart = end;
- newApEnd = pI830->MemoryAperture.End;
-
- ret=drmAgpAlloc(ctx->drmFD, size, 0, &(result->Physical), (drm_handle_t *)&(result->Key));
-
- if (ret)
- {
- fprintf(stderr,"drmAgpAlloc failed %d\n", ret);
- return 0;
- }
- pI830->allocatedMemory += size;
- pI830->MemoryAperture.Start = newApStart;
- pI830->MemoryAperture.End = newApEnd;
- pI830->MemoryAperture.Size = newApEnd - newApStart;
- // pI830->FreeMemory -= size;
- result->Start = start;
- result->End = start + size;
- result->Size = size;
- result->Offset = start;
- result->Alignment = alignment;
- result->Pool = NULL;
-
- return size;
-}
-
-unsigned long
-I830AllocVidMem(const DRIDriverContext *ctx, I830Rec *pI830,
- I830MemRange *result, I830MemPool *pool, long size,
- unsigned long alignment, int flags)
-{
- unsigned long ret;
-
- if (!result)
- return 0;
-
- /* Make sure these are initialised. */
- result->Size = 0;
- result->Key = -1;
-
- if (!size) {
- return 0;
- }
-
- if (pool->Free.Size < size) {
- ret = AllocFromAGP(ctx, pI830, size, alignment, result);
- }
- else {
- ret = AllocFromPool(ctx, pI830, result, pool, size, alignment, flags);
- if (ret == 0)
- ret = AllocFromAGP(ctx, pI830, size, alignment, result);
- }
- return ret;
-}
-
-static Bool BindAgpRange(const DRIDriverContext *ctx, I830MemRange *mem)
-{
- if (!mem)
- return FALSE;
-
- if (mem->Key == -1)
- return TRUE;
-
- return !drmAgpBind(ctx->drmFD, mem->Key, mem->Offset);
-}
-
-/* simple memory allocation routines needed */
-/* put ring buffer in low memory */
-/* need to allocate front, back, depth buffers aligned correctly,
- allocate ring buffer,
-*/
-
-/* */
-static Bool
-I830AllocateMemory(const DRIDriverContext *ctx, I830Rec *pI830)
-{
- unsigned long size, ret;
- unsigned long lines, lineSize, align;
-
- /* allocate ring buffer */
- memset(pI830->LpRing, 0, sizeof(I830RingBuffer));
- pI830->LpRing->mem.Key = -1;
-
- size = PRIMARY_RINGBUFFER_SIZE;
-
- ret = I830AllocVidMem(ctx, pI830, &pI830->LpRing->mem, &pI830->StolenPool, size, 0x1000, 0);
-
- if (ret != size)
- {
- fprintf(stderr,"unable to allocate ring buffer %ld\n", ret);
- return FALSE;
- }
-
- pI830->LpRing->tail_mask = pI830->LpRing->mem.Size - 1;
-
-
- /* allocate front buffer */
- memset(&(pI830->FrontBuffer), 0, sizeof(pI830->FrontBuffer));
- pI830->FrontBuffer.Key = -1;
- pI830->FrontBuffer.Pitch = ctx->shared.virtualWidth;
-
- align = KB(512);
-
- lineSize = ctx->shared.virtualWidth * ctx->cpp;
- lines = (ctx->shared.virtualHeight + 15) / 16 * 16;
- size = lineSize * lines;
- size = ROUND_TO_PAGE(size);
-
- align = GetBestTileAlignment(size);
-
- ret = I830AllocVidMem(ctx, pI830, &pI830->FrontBuffer, &pI830->StolenPool, size, align, 0);
- if (ret < size)
- {
- fprintf(stderr,"unable to allocate front buffer %ld\n", ret);
- return FALSE;
- }
-
- memset(&(pI830->BackBuffer), 0, sizeof(pI830->BackBuffer));
- pI830->BackBuffer.Key = -1;
- pI830->BackBuffer.Pitch = ctx->shared.virtualWidth;
-
- ret = I830AllocVidMem(ctx, pI830, &pI830->BackBuffer, &pI830->StolenPool, size, align, 0);
- if (ret < size)
- {
- fprintf(stderr,"unable to allocate back buffer %ld\n", ret);
- return FALSE;
- }
-
- memset(&(pI830->DepthBuffer), 0, sizeof(pI830->DepthBuffer));
- pI830->DepthBuffer.Key = -1;
- pI830->DepthBuffer.Pitch = ctx->shared.virtualWidth;
-
- ret = I830AllocVidMem(ctx, pI830, &pI830->DepthBuffer, &pI830->StolenPool, size, align, 0);
- if (ret < size)
- {
- fprintf(stderr,"unable to allocate depth buffer %ld\n", ret);
- return FALSE;
- }
-
- memset(&(pI830->ContextMem), 0, sizeof(pI830->ContextMem));
- pI830->ContextMem.Key = -1;
- size = KB(32);
-
- ret = I830AllocVidMem(ctx, pI830, &pI830->ContextMem, &pI830->StolenPool, size, align, 0);
- if (ret < size)
- {
- fprintf(stderr,"unable to allocate context buffer %ld\n", ret);
- return FALSE;
- }
-
-#if 0
- memset(&(pI830->TexMem), 0, sizeof(pI830->TexMem));
- pI830->TexMem.Key = -1;
-
- size = 32768 * 1024;
- ret = AllocFromAGP(ctx, pI830, size, align, &pI830->TexMem);
- if (ret < size)
- {
- fprintf(stderr,"unable to allocate texture memory %ld\n", ret);
- return FALSE;
- }
-#endif
-
- return TRUE;
-}
-
-static Bool
-I830BindMemory(const DRIDriverContext *ctx, I830Rec *pI830)
-{
- if (!BindAgpRange(ctx, &pI830->LpRing->mem))
- return FALSE;
- if (!BindAgpRange(ctx, &pI830->FrontBuffer))
- return FALSE;
- if (!BindAgpRange(ctx, &pI830->BackBuffer))
- return FALSE;
- if (!BindAgpRange(ctx, &pI830->DepthBuffer))
- return FALSE;
- if (!BindAgpRange(ctx, &pI830->ContextMem))
- return FALSE;
-#if 0
- if (!BindAgpRange(ctx, &pI830->TexMem))
- return FALSE;
-#endif
- return TRUE;
-}
-
-static void SetupDRIMM(const DRIDriverContext *ctx, I830Rec *pI830)
-{
- unsigned long aperEnd = ROUND_DOWN_TO(pI830->aper_size, GTT_PAGE_SIZE) / GTT_PAGE_SIZE;
- unsigned long aperStart = ROUND_TO(pI830->aper_size - KB(32768), GTT_PAGE_SIZE) / GTT_PAGE_SIZE;
-
- fprintf(stderr, "aper size is %08X\n", ctx->shared.fbSize);
- if (drmMMInit(ctx->drmFD, aperStart, aperEnd - aperStart, DRM_BO_MEM_TT)) {
- fprintf(stderr,
- "DRM MM Initialization Failed\n");
- } else {
- fprintf(stderr,
- "DRM MM Initialized at offset 0x%lx length %d page\n", aperStart, aperEnd-aperStart);
- }
-
-}
-
-static Bool
-I830CleanupDma(const DRIDriverContext *ctx)
-{
- drmI830Init info;
-
- memset(&info, 0, sizeof(drmI830Init));
- info.func = I830_CLEANUP_DMA;
-
- if (drmCommandWrite(ctx->drmFD, DRM_I830_INIT,
- &info, sizeof(drmI830Init))) {
- fprintf(stderr, "I830 Dma Cleanup Failed\n");
- return FALSE;
- }
-
- return TRUE;
-}
-
-static Bool
-I830InitDma(const DRIDriverContext *ctx, I830Rec *pI830)
-{
- I830RingBuffer *ring = pI830->LpRing;
- drmI830Init info;
-
- memset(&info, 0, sizeof(drmI830Init));
- info.func = I830_INIT_DMA;
-
- info.ring_start = ring->mem.Start + pI830->LinearAddr;
- info.ring_end = ring->mem.End + pI830->LinearAddr;
- info.ring_size = ring->mem.Size;
-
- info.mmio_offset = (unsigned int)ctx->MMIOStart;
-
- info.sarea_priv_offset = sizeof(drm_sarea_t);
-
- info.front_offset = pI830->FrontBuffer.Start;
- info.back_offset = pI830->BackBuffer.Start;
- info.depth_offset = pI830->DepthBuffer.Start;
- info.w = ctx->shared.virtualWidth;
- info.h = ctx->shared.virtualHeight;
- info.pitch = ctx->shared.virtualWidth;
- info.back_pitch = pI830->BackBuffer.Pitch;
- info.depth_pitch = pI830->DepthBuffer.Pitch;
- info.cpp = ctx->cpp;
-
- if (drmCommandWrite(ctx->drmFD, DRM_I830_INIT,
- &info, sizeof(drmI830Init))) {
- fprintf(stderr,
- "I830 Dma Initialization Failed\n");
- return FALSE;
- }
-
- return TRUE;
-}
-
-static int I830CheckDRMVersion( const DRIDriverContext *ctx,
- I830Rec *pI830 )
-{
- drmVersionPtr version;
-
- version = drmGetVersion(ctx->drmFD);
-
- if (version) {
- int req_minor, req_patch;
-
- req_minor = 4;
- req_patch = 0;
-
- if (version->version_major != 1 ||
- version->version_minor < req_minor ||
- (version->version_minor == req_minor &&
- version->version_patchlevel < req_patch)) {
- /* Incompatible drm version */
- fprintf(stderr,
- "[dri] I830DRIScreenInit failed because of a version "
- "mismatch.\n"
- "[dri] i915.o kernel module version is %d.%d.%d "
- "but version 1.%d.%d or newer is needed.\n"
- "[dri] Disabling DRI.\n",
- version->version_major,
- version->version_minor,
- version->version_patchlevel,
- req_minor,
- req_patch);
- drmFreeVersion(version);
- return 0;
- }
-
- pI830->drmMinor = version->version_minor;
- drmFreeVersion(version);
- }
- return 1;
-}
-
-static void
-I830SetRingRegs(const DRIDriverContext *ctx, I830Rec *pI830)
-{
- unsigned int itemp;
- unsigned char *MMIO = ctx->MMIOAddress;
-
- OUTREG(LP_RING + RING_LEN, 0);
- OUTREG(LP_RING + RING_TAIL, 0);
- OUTREG(LP_RING + RING_HEAD, 0);
-
- if ((long)(pI830->LpRing->mem.Start & I830_RING_START_MASK) !=
- pI830->LpRing->mem.Start) {
- fprintf(stderr,
- "I830SetRingRegs: Ring buffer start (%lx) violates its "
- "mask (%x)\n", pI830->LpRing->mem.Start, I830_RING_START_MASK);
- }
- /* Don't care about the old value. Reserved bits must be zero anyway. */
- itemp = pI830->LpRing->mem.Start & I830_RING_START_MASK;
- OUTREG(LP_RING + RING_START, itemp);
-
- if (((pI830->LpRing->mem.Size - 4096) & I830_RING_NR_PAGES) !=
- pI830->LpRing->mem.Size - 4096) {
- fprintf(stderr,
- "I830SetRingRegs: Ring buffer size - 4096 (%lx) violates its "
- "mask (%x)\n", pI830->LpRing->mem.Size - 4096,
- I830_RING_NR_PAGES);
- }
- /* Don't care about the old value. Reserved bits must be zero anyway. */
- itemp = (pI830->LpRing->mem.Size - 4096) & I830_RING_NR_PAGES;
- itemp |= (RING_NO_REPORT | RING_VALID);
- OUTREG(LP_RING + RING_LEN, itemp);
-
- pI830->LpRing->head = INREG(LP_RING + RING_HEAD) & I830_HEAD_MASK;
- pI830->LpRing->tail = INREG(LP_RING + RING_TAIL);
- pI830->LpRing->space = pI830->LpRing->head - (pI830->LpRing->tail + 8);
- if (pI830->LpRing->space < 0)
- pI830->LpRing->space += pI830->LpRing->mem.Size;
-
- SetFenceRegs(ctx, pI830);
-
- /* RESET THE DISPLAY PIPE TO POINT TO THE FRONTBUFFER - hacky
- hacky hacky */
- OUTREG(DSPABASE, pI830->FrontBuffer.Start + pI830->LinearAddr);
-
-}
-
-static Bool
-I830SetParam(const DRIDriverContext *ctx, int param, int value)
-{
- drmI830SetParam sp;
-
- memset(&sp, 0, sizeof(sp));
- sp.param = param;
- sp.value = value;
-
- if (drmCommandWrite(ctx->drmFD, DRM_I830_SETPARAM, &sp, sizeof(sp))) {
- fprintf(stderr, "I830 SetParam Failed\n");
- return FALSE;
- }
-
- return TRUE;
-}
-
-static Bool
-I830DRIMapScreenRegions(DRIDriverContext *ctx, I830Rec *pI830, drmI830Sarea *sarea)
-{
- fprintf(stderr,
- "[drm] Mapping front buffer\n");
-
- if (drmAddMap(ctx->drmFD,
- (drm_handle_t)(sarea->front_offset + pI830->LinearAddr),
- sarea->front_size,
- DRM_FRAME_BUFFER, /*DRM_AGP,*/
- 0,
- &sarea->front_handle) < 0) {
- fprintf(stderr,
- "[drm] drmAddMap(front_handle) failed. Disabling DRI\n");
- return FALSE;
- }
- ctx->shared.hFrameBuffer = sarea->front_handle;
- ctx->shared.fbSize = sarea->front_size;
- fprintf(stderr, "[drm] Front Buffer = 0x%08x\n",
- sarea->front_handle);
-
- if (drmAddMap(ctx->drmFD,
- (drm_handle_t)(sarea->back_offset),
- sarea->back_size, DRM_AGP, 0,
- &sarea->back_handle) < 0) {
- fprintf(stderr,
- "[drm] drmAddMap(back_handle) failed. Disabling DRI\n");
- return FALSE;
- }
- fprintf(stderr, "[drm] Back Buffer = 0x%08x\n",
- sarea->back_handle);
-
- if (drmAddMap(ctx->drmFD,
- (drm_handle_t)sarea->depth_offset,
- sarea->depth_size, DRM_AGP, 0,
- &sarea->depth_handle) < 0) {
- fprintf(stderr,
- "[drm] drmAddMap(depth_handle) failed. Disabling DRI\n");
- return FALSE;
- }
- fprintf(stderr, "[drm] Depth Buffer = 0x%08x\n",
- sarea->depth_handle);
-
-#if 0
- if (drmAddMap(ctx->drmFD,
- (drm_handle_t)sarea->tex_offset,
- sarea->tex_size, DRM_AGP, 0,
- &sarea->tex_handle) < 0) {
- fprintf(stderr,
- "[drm] drmAddMap(tex_handle) failed. Disabling DRI\n");
- return FALSE;
- }
- fprintf(stderr, "[drm] textures = 0x%08x\n",
- sarea->tex_handle);
-#endif
- return TRUE;
-}
-
-
-static void
-I830DRIUnmapScreenRegions(const DRIDriverContext *ctx, I830Rec *pI830, drmI830Sarea *sarea)
-{
-#if 1
- if (sarea->front_handle) {
- drmRmMap(ctx->drmFD, sarea->front_handle);
- sarea->front_handle = 0;
- }
-#endif
- if (sarea->back_handle) {
- drmRmMap(ctx->drmFD, sarea->back_handle);
- sarea->back_handle = 0;
- }
- if (sarea->depth_handle) {
- drmRmMap(ctx->drmFD, sarea->depth_handle);
- sarea->depth_handle = 0;
- }
- if (sarea->tex_handle) {
- drmRmMap(ctx->drmFD, sarea->tex_handle);
- sarea->tex_handle = 0;
- }
-}
-
-static Bool
-I830DRIDoMappings(DRIDriverContext *ctx, I830Rec *pI830, drmI830Sarea *sarea)
-{
- if (drmAddMap(ctx->drmFD,
- (drm_handle_t)pI830->LpRing->mem.Start,
- pI830->LpRing->mem.Size, DRM_AGP, 0,
- &pI830->ring_map) < 0) {
- fprintf(stderr,
- "[drm] drmAddMap(ring_map) failed. Disabling DRI\n");
- return FALSE;
- }
- fprintf(stderr, "[drm] ring buffer = 0x%08x\n",
- pI830->ring_map);
-
- if (I830InitDma(ctx, pI830) == FALSE) {
- return FALSE;
- }
-
- /* init to zero to be safe */
-
- I830DRIMapScreenRegions(ctx, pI830, sarea);
- SetupDRIMM(ctx, pI830);
-
- if (ctx->pciDevice != PCI_CHIP_845_G &&
- ctx->pciDevice != PCI_CHIP_I830_M) {
- I830SetParam(ctx, I830_SETPARAM_USE_MI_BATCHBUFFER_START, 1 );
- }
-
- /* Okay now initialize the dma engine */
- {
- pI830->irq = drmGetInterruptFromBusID(ctx->drmFD,
- ctx->pciBus,
- ctx->pciDevice,
- ctx->pciFunc);
-
- if (drmCtlInstHandler(ctx->drmFD, pI830->irq)) {
- fprintf(stderr,
- "[drm] failure adding irq handler\n");
- pI830->irq = 0;
- return FALSE;
- }
- else
- fprintf(stderr,
- "[drm] dma control initialized, using IRQ %d\n",
- pI830->irq);
- }
-
- fprintf(stderr, "[dri] visual configs initialized\n");
-
- return TRUE;
-}
-
-static Bool
-I830ClearScreen(DRIDriverContext *ctx, I830Rec *pI830, drmI830Sarea *sarea)
-{
- /* need to drmMap front and back buffers and zero them */
- drmAddress map_addr;
- int ret;
-
- ret = drmMap(ctx->drmFD,
- sarea->front_handle,
- sarea->front_size,
- &map_addr);
-
- if (ret)
- {
- fprintf(stderr, "Unable to map front buffer\n");
- return FALSE;
- }
-
- drimemsetio((char *)map_addr,
- 0,
- sarea->front_size);
- drmUnmap(map_addr, sarea->front_size);
-
-
- ret = drmMap(ctx->drmFD,
- sarea->back_handle,
- sarea->back_size,
- &map_addr);
-
- if (ret)
- {
- fprintf(stderr, "Unable to map back buffer\n");
- return FALSE;
- }
-
- drimemsetio((char *)map_addr,
- 0,
- sarea->back_size);
- drmUnmap(map_addr, sarea->back_size);
-
- return TRUE;
-}
-
-static Bool
-I830ScreenInit(DRIDriverContext *ctx, I830Rec *pI830)
-
-{
- I830DRIPtr pI830DRI;
- drmI830Sarea *pSAREAPriv;
- int err;
-
- drm_page_size = getpagesize();
-
- pI830->registerSize = ctx->MMIOSize;
- /* This is a hack for now. We have to have more than a 4k page here
- * because of the size of the state. However, the state should be
- * in a per-context mapping. This will be added in the Mesa 3.5 port
- * of the I830 driver.
- */
- ctx->shared.SAREASize = SAREA_MAX;
-
- /* Note that drmOpen will try to load the kernel module, if needed. */
- ctx->drmFD = drmOpen("i915", NULL );
- if (ctx->drmFD < 0) {
- fprintf(stderr, "[drm] drmOpen failed\n");
- return 0;
- }
-
- if ((err = drmSetBusid(ctx->drmFD, ctx->pciBusID)) < 0) {
- fprintf(stderr, "[drm] drmSetBusid failed (%d, %s), %s\n",
- ctx->drmFD, ctx->pciBusID, strerror(-err));
- return 0;
- }
-
- if (drmAddMap( ctx->drmFD,
- 0,
- ctx->shared.SAREASize,
- DRM_SHM,
- DRM_CONTAINS_LOCK,
- &ctx->shared.hSAREA) < 0)
- {
- fprintf(stderr, "[drm] drmAddMap failed\n");
- return 0;
- }
-
- fprintf(stderr, "[drm] added %d byte SAREA at 0x%08x\n",
- ctx->shared.SAREASize, ctx->shared.hSAREA);
-
- if (drmMap( ctx->drmFD,
- ctx->shared.hSAREA,
- ctx->shared.SAREASize,
- (drmAddressPtr)(&ctx->pSAREA)) < 0)
- {
- fprintf(stderr, "[drm] drmMap failed\n");
- return 0;
-
- }
-
- memset(ctx->pSAREA, 0, ctx->shared.SAREASize);
- fprintf(stderr, "[drm] mapped SAREA 0x%08x to %p, size %d\n",
- ctx->shared.hSAREA, ctx->pSAREA, ctx->shared.SAREASize);
-
-
- if (drmAddMap(ctx->drmFD,
- ctx->MMIOStart,
- ctx->MMIOSize,
- DRM_REGISTERS,
- DRM_READ_ONLY,
- &pI830->registerHandle) < 0) {
- fprintf(stderr, "[drm] drmAddMap mmio failed\n");
- return 0;
- }
- fprintf(stderr,
- "[drm] register handle = 0x%08x\n", pI830->registerHandle);
-
-
- if (!I830CheckDRMVersion(ctx, pI830)) {
- return FALSE;
- }
-
- /* Create a 'server' context so we can grab the lock for
- * initialization ioctls.
- */
- if ((err = drmCreateContext(ctx->drmFD, &ctx->serverContext)) != 0) {
- fprintf(stderr, "%s: drmCreateContext failed %d\n", __FUNCTION__, err);
- return 0;
- }
-
- DRM_LOCK(ctx->drmFD, ctx->pSAREA, ctx->serverContext, 0);
-
- /* Initialize the SAREA private data structure */
- pSAREAPriv = (drmI830Sarea *)(((char*)ctx->pSAREA) +
- sizeof(drm_sarea_t));
- memset(pSAREAPriv, 0, sizeof(*pSAREAPriv));
-
- pI830->StolenMemory.Size = I830DetectMemory(ctx, pI830);
- pI830->StolenMemory.Start = 0;
- pI830->StolenMemory.End = pI830->StolenMemory.Size;
-
- pI830->MemoryAperture.Start = pI830->StolenMemory.End;
- pI830->MemoryAperture.End = KB(40000);
- pI830->MemoryAperture.Size = pI830->MemoryAperture.End - pI830->MemoryAperture.Start;
-
- pI830->StolenPool.Fixed = pI830->StolenMemory;
- pI830->StolenPool.Total = pI830->StolenMemory;
- pI830->StolenPool.Free = pI830->StolenPool.Total;
- pI830->FreeMemory = pI830->StolenPool.Total.Size;
-
- if (!AgpInit(ctx, pI830))
- return FALSE;
-
- if (I830AllocateMemory(ctx, pI830) == FALSE)
- {
- return FALSE;
- }
-
- if (I830BindMemory(ctx, pI830) == FALSE)
- {
- return FALSE;
- }
-
- pSAREAPriv->rotated_offset = -1;
- pSAREAPriv->rotated_size = 0;
- pSAREAPriv->rotated_pitch = ctx->shared.virtualWidth;
-
- pSAREAPriv->front_offset = pI830->FrontBuffer.Start;
- pSAREAPriv->front_size = pI830->FrontBuffer.Size;
- pSAREAPriv->width = ctx->shared.virtualWidth;
- pSAREAPriv->height = ctx->shared.virtualHeight;
- pSAREAPriv->pitch = ctx->shared.virtualWidth;
- pSAREAPriv->virtualX = ctx->shared.virtualWidth;
- pSAREAPriv->virtualY = ctx->shared.virtualHeight;
- pSAREAPriv->back_offset = pI830->BackBuffer.Start;
- pSAREAPriv->back_size = pI830->BackBuffer.Size;
- pSAREAPriv->depth_offset = pI830->DepthBuffer.Start;
- pSAREAPriv->depth_size = pI830->DepthBuffer.Size;
-#if 0
- pSAREAPriv->tex_offset = pI830->TexMem.Start;
- pSAREAPriv->tex_size = pI830->TexMem.Size;
-#endif
- pSAREAPriv->log_tex_granularity = pI830->TexGranularity;
-
- ctx->driverClientMsg = malloc(sizeof(I830DRIRec));
- ctx->driverClientMsgSize = sizeof(I830DRIRec);
- pI830DRI = (I830DRIPtr)ctx->driverClientMsg;
- pI830DRI->deviceID = pI830->Chipset;
- pI830DRI->regsSize = I830_REG_SIZE;
- pI830DRI->width = ctx->shared.virtualWidth;
- pI830DRI->height = ctx->shared.virtualHeight;
- pI830DRI->mem = ctx->shared.fbSize;
- pI830DRI->cpp = ctx->cpp;
-
- pI830DRI->bitsPerPixel = ctx->bpp;
- pI830DRI->sarea_priv_offset = sizeof(drm_sarea_t);
-
- err = I830DRIDoMappings(ctx, pI830, pSAREAPriv);
- if (err == FALSE)
- return FALSE;
-
- I830SetupMemoryTiling(ctx, pI830);
-
- /* Quick hack to clear the front & back buffers. Could also use
- * the clear ioctl to do this, but would need to setup hw state
- * first.
- */
- I830ClearScreen(ctx, pI830, pSAREAPriv);
-
- I830SetRingRegs(ctx, pI830);
-
- return TRUE;
-}
-
-
-/**
- * \brief Validate the fbdev mode.
- *
- * \param ctx display handle.
- *
- * \return one on success, or zero on failure.
- *
- * Saves some registers and returns 1.
- *
- * \sa radeonValidateMode().
- */
-static int i830ValidateMode( const DRIDriverContext *ctx )
-{
- return 1;
-}
-
-/**
- * \brief Examine mode returned by fbdev.
- *
- * \param ctx display handle.
- *
- * \return one on success, or zero on failure.
- *
- * Restores registers that fbdev has clobbered and returns 1.
- *
- * \sa i810ValidateMode().
- */
-static int i830PostValidateMode( const DRIDriverContext *ctx )
-{
- I830Rec *pI830 = ctx->driverPrivate;
-
- I830SetRingRegs(ctx, pI830);
- return 1;
-}
-
-
-/**
- * \brief Initialize the framebuffer device mode
- *
- * \param ctx display handle.
- *
- * \return one on success, or zero on failure.
- *
- * Fills in \p info with some default values and some information from \p ctx
- * and then calls I810ScreenInit() for the screen initialization.
- *
- * Before exiting clears the framebuffer memory accessing it directly.
- */
-static int i830InitFBDev( DRIDriverContext *ctx )
-{
- I830Rec *pI830 = calloc(1, sizeof(I830Rec));
- int i;
-
- {
- int dummy = ctx->shared.virtualWidth;
-
- switch (ctx->bpp / 8) {
- case 1: dummy = (ctx->shared.virtualWidth + 127) & ~127; break;
- case 2: dummy = (ctx->shared.virtualWidth + 31) & ~31; break;
- case 3:
- case 4: dummy = (ctx->shared.virtualWidth + 15) & ~15; break;
- }
-
- ctx->shared.virtualWidth = dummy;
- ctx->shared.Width = ctx->shared.virtualWidth;
- }
-
-
- for (i = 0; pitches[i] != 0; i++) {
- if (pitches[i] >= ctx->shared.virtualWidth) {
- ctx->shared.virtualWidth = pitches[i];
- break;
- }
- }
-
- ctx->driverPrivate = (void *)pI830;
-
- pI830->LpRing = calloc(1, sizeof(I830RingBuffer));
- pI830->Chipset = ctx->chipset;
- pI830->LinearAddr = ctx->FBStart;
-
- if (!I830ScreenInit( ctx, pI830 ))
- return 0;
-
-
- return 1;
-}
-
-
-/**
- * \brief The screen is being closed, so clean up any state and free any
- * resources used by the DRI.
- *
- * \param ctx display handle.
- *
- * Unmaps the SAREA, closes the DRM device file descriptor and frees the driver
- * private data.
- */
-static void i830HaltFBDev( DRIDriverContext *ctx )
-{
- drmI830Sarea *pSAREAPriv;
- I830Rec *pI830 = ctx->driverPrivate;
-
- if (pI830->irq) {
- drmCtlUninstHandler(ctx->drmFD);
- pI830->irq = 0; }
-
- I830CleanupDma(ctx);
-
- pSAREAPriv = (drmI830Sarea *)(((char*)ctx->pSAREA) +
- sizeof(drm_sarea_t));
-
- I830DRIUnmapScreenRegions(ctx, pI830, pSAREAPriv);
- drmUnmap( ctx->pSAREA, ctx->shared.SAREASize );
- drmClose(ctx->drmFD);
-
- if (ctx->driverPrivate) {
- free(ctx->driverPrivate);
- ctx->driverPrivate = 0;
- }
-}
-
-
-extern void i810NotifyFocus( int );
-
-/**
- * \brief Exported driver interface for Mini GLX.
- *
- * \sa DRIDriverRec.
- */
-const struct DRIDriverRec __driDriver = {
- i830ValidateMode,
- i830PostValidateMode,
- i830InitFBDev,
- i830HaltFBDev,
- NULL,//I830EngineShutdown,
- NULL, //I830EngineRestore,
-#ifndef _EMBEDDED
- 0,
-#else
- i810NotifyFocus,
-#endif
-};
diff --git a/src/mesa/drivers/dri/mach64/Makefile b/src/mesa/drivers/dri/mach64/Makefile
index a8f463e9fd..c20fdece29 100644
--- a/src/mesa/drivers/dri/mach64/Makefile
+++ b/src/mesa/drivers/dri/mach64/Makefile
@@ -5,9 +5,6 @@ include $(TOP)/configs/current
LIBNAME = mach64_dri.so
-# Not yet
-# MINIGLX_SOURCES = server/mach64_dri.c
-
DRIVER_SOURCES = \
mach64_context.c \
mach64_ioctl.c \
diff --git a/src/mesa/drivers/dri/mach64/mach64_state.c b/src/mesa/drivers/dri/mach64/mach64_state.c
index b9093b5a13..69a5aea02c 100644
--- a/src/mesa/drivers/dri/mach64/mach64_state.c
+++ b/src/mesa/drivers/dri/mach64/mach64_state.c
@@ -1156,12 +1156,10 @@ void mach64DDInitStateFuncs( GLcontext *ctx )
{
ctx->Driver.UpdateState = mach64DDInvalidateState;
- ctx->Driver.ClearIndex = NULL;
ctx->Driver.ClearColor = mach64DDClearColor;
ctx->Driver.DrawBuffer = mach64DDDrawBuffer;
ctx->Driver.ReadBuffer = mach64DDReadBuffer;
- ctx->Driver.IndexMask = NULL;
ctx->Driver.ColorMask = mach64DDColorMask;
ctx->Driver.AlphaFunc = mach64DDAlphaFunc;
ctx->Driver.BlendEquationSeparate = mach64DDBlendEquationSeparate;
diff --git a/src/mesa/drivers/dri/mach64/mach64_tris.c b/src/mesa/drivers/dri/mach64/mach64_tris.c
index c2a0adfef0..a81d21afff 100644
--- a/src/mesa/drivers/dri/mach64/mach64_tris.c
+++ b/src/mesa/drivers/dri/mach64/mach64_tris.c
@@ -1248,7 +1248,6 @@ static struct {
#define DO_POINTS 1
#define DO_FULL_QUAD 1
-#define HAVE_RGBA 1
#define HAVE_SPEC 1
#define HAVE_BACK_COLORS 0
#define HAVE_HW_FLATSHADE 1
diff --git a/src/mesa/drivers/dri/mga/Makefile b/src/mesa/drivers/dri/mga/Makefile
index 0cc329fb22..92533bccc2 100644
--- a/src/mesa/drivers/dri/mga/Makefile
+++ b/src/mesa/drivers/dri/mga/Makefile
@@ -5,8 +5,6 @@ include $(TOP)/configs/current
LIBNAME = mga_dri.so
-MINIGLX_SOURCES = server/mga_dri.c
-
DRIVER_SOURCES = \
mgadd.c \
mgaioctl.c \
diff --git a/src/mesa/drivers/dri/mga/mgastate.c b/src/mesa/drivers/dri/mga/mgastate.c
index 0253044761..745d5e9852 100644
--- a/src/mesa/drivers/dri/mga/mgastate.c
+++ b/src/mesa/drivers/dri/mga/mgastate.c
@@ -1193,8 +1193,5 @@ void mgaDDInitStateFuncs( GLcontext *ctx )
ctx->Driver.Viewport = mgaViewport;
ctx->Driver.RenderMode = mgaRenderMode;
- ctx->Driver.ClearIndex = 0;
- ctx->Driver.IndexMask = 0;
-
TNL_CONTEXT(ctx)->Driver.RunPipeline = mgaRunPipeline;
}
diff --git a/src/mesa/drivers/dri/mga/mgatris.c b/src/mesa/drivers/dri/mga/mgatris.c
index 4c58c3bdb0..07cf682f6e 100644
--- a/src/mesa/drivers/dri/mga/mgatris.c
+++ b/src/mesa/drivers/dri/mga/mgatris.c
@@ -347,7 +347,6 @@ static struct {
#define DO_POINTS 1
#define DO_FULL_QUAD 1
-#define HAVE_RGBA 1
#define HAVE_BACK_COLORS 0
#define HAVE_SPEC 1
#define HAVE_HW_FLATSHADE 0
diff --git a/src/mesa/drivers/dri/mga/server/mga_dri.c b/src/mesa/drivers/dri/mga/server/mga_dri.c
deleted file mode 100644
index bc575e62ee..0000000000
--- a/src/mesa/drivers/dri/mga/server/mga_dri.c
+++ /dev/null
@@ -1,1088 +0,0 @@
-
-/*
- * Copyright 2000 VA Linux Systems Inc., Fremont, California.
- * 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
- * VA LINUX SYSTEMS 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.
- *
- * Authors:
- * Keith Whitwell <keith@tungstengraphics.com>
- * Gareth Hughes <gareth@valinux.com>
- */
-
-#include <errno.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <inttypes.h>
-
-#include "driver.h"
-#include "drm.h"
-#include "memops.h"
-
-#include "mga_reg.h"
-#include "mga.h"
-#include "mga_macros.h"
-#include "mga_dri.h"
-
-
-/* Quiescence, locking
- */
-#define MGA_TIMEOUT 2048
-
-static void MGAWaitForIdleDMA( struct DRIDriverContextRec *ctx, MGAPtr pMga )
-{
- drm_lock_t lock;
- int ret;
- int i = 0;
-
- memset( &lock, 0, sizeof(lock) );
-
- for (;;) {
- do {
- /* first ask for quiescent and flush */
- lock.flags = DRM_LOCK_QUIESCENT | DRM_LOCK_FLUSH;
- do {
- ret = drmCommandWrite( ctx->drmFD, DRM_MGA_FLUSH,
- &lock, sizeof( lock ) );
- } while ( ret == -EBUSY && i++ < DRM_MGA_IDLE_RETRY );
-
- /* if it's still busy just try quiescent */
- if ( ret == -EBUSY ) {
- lock.flags = DRM_LOCK_QUIESCENT;
- do {
- ret = drmCommandWrite( ctx->drmFD, DRM_MGA_FLUSH,
- &lock, sizeof( lock ) );
- } while ( ret == -EBUSY && i++ < DRM_MGA_IDLE_RETRY );
- }
- } while ( ( ret == -EBUSY ) && ( i++ < MGA_TIMEOUT ) );
-
- if ( ret == 0 )
- return;
-
- fprintf( stderr,
- "[dri] Idle timed out, resetting engine...\n" );
-
- drmCommandNone( ctx->drmFD, DRM_MGA_RESET );
- }
-}
-
-static unsigned int mylog2( unsigned int n )
-{
- unsigned int log2 = 1;
- while ( n > 1 ) n >>= 1, log2++;
- return log2;
-}
-
-static int MGADRIAgpInit(struct DRIDriverContextRec *ctx, MGAPtr pMga)
-{
- unsigned long mode;
- unsigned int vendor, device;
- int ret, count, i;
-
- if(pMga->agpSize < 12)pMga->agpSize = 12;
- if(pMga->agpSize > 64)pMga->agpSize = 64; /* cap */
-
- /* FIXME: Make these configurable...
- */
- pMga->agp.size = pMga->agpSize * 1024 * 1024;
-
- pMga->warp.offset = 0;
- pMga->warp.size = MGA_WARP_UCODE_SIZE;
-
- pMga->primary.offset = (pMga->warp.offset +
- pMga->warp.size);
- pMga->primary.size = 1024 * 1024;
-
- pMga->buffers.offset = (pMga->primary.offset +
- pMga->primary.size);
- pMga->buffers.size = MGA_NUM_BUFFERS * MGA_BUFFER_SIZE;
-
-
- pMga->agpTextures.offset = (pMga->buffers.offset +
- pMga->buffers.size);
-
- pMga->agpTextures.size = pMga->agp.size -
- pMga->agpTextures.offset;
-
- if ( drmAgpAcquire( ctx->drmFD ) < 0 ) {
- fprintf( stderr, "[agp] AGP not available\n" );
- return 0;
- }
-
- mode = drmAgpGetMode( ctx->drmFD ); /* Default mode */
- vendor = drmAgpVendorId( ctx->drmFD );
- device = drmAgpDeviceId( ctx->drmFD );
-
- mode &= ~MGA_AGP_MODE_MASK;
- switch ( pMga->agpMode ) {
- case 4:
- mode |= MGA_AGP_4X_MODE;
- case 2:
- mode |= MGA_AGP_2X_MODE;
- case 1:
- default:
- mode |= MGA_AGP_1X_MODE;
- }
-
-#if 0
- fprintf( stderr,
- "[agp] Mode 0x%08lx [AGP 0x%04x/0x%04x; Card 0x%04x/0x%04x]\n",
- mode, vendor, device,
- ctx->pciVendor,
- ctx->pciChipType );
-#endif
-
- if ( drmAgpEnable( ctx->drmFD, mode ) < 0 ) {
- fprintf( stderr, "[agp] AGP not enabled\n" );
- drmAgpRelease( ctx->drmFD );
- return 0;
- }
-
- if ( pMga->Chipset == PCI_CHIP_MGAG200 ) {
- switch ( pMga->agpMode ) {
- case 2:
- fprintf( stderr,
- "[drm] Enabling AGP 2x PLL encoding\n" );
- OUTREG( MGAREG_AGP_PLL, MGA_AGP2XPLL_ENABLE );
- break;
-
- case 1:
- default:
- fprintf( stderr,
- "[drm] Disabling AGP 2x PLL encoding\n" );
- OUTREG( MGAREG_AGP_PLL, MGA_AGP2XPLL_DISABLE );
- pMga->agpMode = 1;
- break;
- }
- }
-
- ret = drmAgpAlloc( ctx->drmFD, pMga->agp.size,
- 0, NULL, &pMga->agp.handle );
- if ( ret < 0 ) {
- fprintf( stderr, "[agp] Out of memory (%d)\n", ret );
- drmAgpRelease( ctx->drmFD );
- return 0;
- }
- fprintf( stderr,
- "[agp] %d kB allocated with handle 0x%08x\n",
- pMga->agp.size/1024, (unsigned int)pMga->agp.handle );
-
- if ( drmAgpBind( ctx->drmFD, pMga->agp.handle, 0 ) < 0 ) {
- fprintf( stderr, "[agp] Could not bind memory\n" );
- drmAgpFree( ctx->drmFD, pMga->agp.handle );
- drmAgpRelease( ctx->drmFD );
- return 0;
- }
-
- /* WARP microcode space
- */
- if ( drmAddMap( ctx->drmFD,
- pMga->warp.offset,
- pMga->warp.size,
- DRM_AGP, DRM_READ_ONLY,
- &pMga->warp.handle ) < 0 ) {
- fprintf( stderr,
- "[agp] Could not add WARP microcode mapping\n" );
- return 0;
- }
- fprintf( stderr,
- "[agp] WARP microcode handle = 0x%08x\n",
- pMga->warp.handle );
-
- if ( drmMap( ctx->drmFD,
- pMga->warp.handle,
- pMga->warp.size,
- &pMga->warp.map ) < 0 ) {
- fprintf( stderr,
- "[agp] Could not map WARP microcode\n" );
- return 0;
- }
- fprintf( stderr,
- "[agp] WARP microcode mapped at 0x%08lx\n",
- (unsigned long)pMga->warp.map );
-
- /* Primary DMA space
- */
- if ( drmAddMap( ctx->drmFD,
- pMga->primary.offset,
- pMga->primary.size,
- DRM_AGP, DRM_READ_ONLY,
- &pMga->primary.handle ) < 0 ) {
- fprintf( stderr,
- "[agp] Could not add primary DMA mapping\n" );
- return 0;
- }
- fprintf( stderr,
- "[agp] Primary DMA handle = 0x%08x\n",
- pMga->primary.handle );
-
- if ( drmMap( ctx->drmFD,
- pMga->primary.handle,
- pMga->primary.size,
- &pMga->primary.map ) < 0 ) {
- fprintf( stderr,
- "[agp] Could not map primary DMA\n" );
- return 0;
- }
- fprintf( stderr,
- "[agp] Primary DMA mapped at 0x%08lx\n",
- (unsigned long)pMga->primary.map );
-
- /* DMA buffers
- */
- if ( drmAddMap( ctx->drmFD,
- pMga->buffers.offset,
- pMga->buffers.size,
- DRM_AGP, 0,
- &pMga->buffers.handle ) < 0 ) {
- fprintf( stderr,
- "[agp] Could not add DMA buffers mapping\n" );
- return 0;
- }
- fprintf( stderr,
- "[agp] DMA buffers handle = 0x%08x\n",
- pMga->buffers.handle );
-
- if ( drmMap( ctx->drmFD,
- pMga->buffers.handle,
- pMga->buffers.size,
- &pMga->buffers.map ) < 0 ) {
- fprintf( stderr,
- "[agp] Could not map DMA buffers\n" );
- return 0;
- }
- fprintf( stderr,
- "[agp] DMA buffers mapped at 0x%08lx\n",
- (unsigned long)pMga->buffers.map );
-
- count = drmAddBufs( ctx->drmFD,
- MGA_NUM_BUFFERS, MGA_BUFFER_SIZE,
- DRM_AGP_BUFFER, pMga->buffers.offset );
- if ( count <= 0 ) {
- fprintf( stderr,
- "[drm] failure adding %d %d byte DMA buffers\n",
- MGA_NUM_BUFFERS, MGA_BUFFER_SIZE );
- return 0;
- }
- fprintf( stderr,
- "[drm] Added %d %d byte DMA buffers\n",
- count, MGA_BUFFER_SIZE );
-
- i = mylog2(pMga->agpTextures.size / MGA_NR_TEX_REGIONS);
- if(i < MGA_LOG_MIN_TEX_REGION_SIZE)
- i = MGA_LOG_MIN_TEX_REGION_SIZE;
- pMga->agpTextures.size = (pMga->agpTextures.size >> i) << i;
-
- if ( drmAddMap( ctx->drmFD,
- pMga->agpTextures.offset,
- pMga->agpTextures.size,
- DRM_AGP, 0,
- &pMga->agpTextures.handle ) < 0 ) {
- fprintf( stderr,
- "[agp] Could not add agpTexture mapping\n" );
- return 0;
- }
-/* should i map it ? */
- fprintf( stderr,
- "[agp] agpTexture handle = 0x%08x\n",
- pMga->agpTextures.handle );
- fprintf( stderr,
- "[agp] agpTexture size: %d kb\n", pMga->agpTextures.size/1024 );
-
- return 1;
-}
-
-static int MGADRIMapInit( struct DRIDriverContextRec *ctx, MGAPtr pMga )
-{
- pMga->registers.size = MGAIOMAPSIZE;
-
- if ( drmAddMap( ctx->drmFD,
- (drm_handle_t)pMga->IOAddress,
- pMga->registers.size,
- DRM_REGISTERS, DRM_READ_ONLY,
- &pMga->registers.handle ) < 0 ) {
- fprintf( stderr,
- "[drm] Could not add MMIO registers mapping\n" );
- return 0;
- }
- fprintf( stderr,
- "[drm] Registers handle = 0x%08lx\n",
- pMga->registers.handle );
-
- pMga->status.size = SAREA_MAX;
-
- if ( drmAddMap( ctx->drmFD, 0, pMga->status.size,
- DRM_SHM, DRM_READ_ONLY | DRM_LOCKED | DRM_KERNEL,
- &pMga->status.handle ) < 0 ) {
- fprintf( stderr,
- "[drm] Could not add status page mapping\n" );
- return 0;
- }
- fprintf( stderr,
- "[drm] Status handle = 0x%08x\n",
- pMga->status.handle );
-
- if ( drmMap( ctx->drmFD,
- pMga->status.handle,
- pMga->status.size,
- &pMga->status.map ) < 0 ) {
- fprintf( stderr,
- "[agp] Could not map status page\n" );
- return 0;
- }
- fprintf( stderr,
- "[agp] Status page mapped at 0x%08lx\n",
- (unsigned long)pMga->status.map );
-
- return 1;
-}
-
-static int MGADRIKernelInit( struct DRIDriverContextRec *ctx, MGAPtr pMga )
-{
- drm_mga_init_t init;
- int ret;
-
- memset( &init, 0, sizeof(init) );
-
- init.func = MGA_INIT_DMA;
- init.sarea_priv_offset = sizeof(drm_sarea_t);
-
- switch ( pMga->Chipset ) {
- case PCI_CHIP_MGAG550:
- case PCI_CHIP_MGAG400:
- init.chipset = MGA_CARD_TYPE_G400;
- break;
- case PCI_CHIP_MGAG200:
- case PCI_CHIP_MGAG200_PCI:
- init.chipset = MGA_CARD_TYPE_G200;
- break;
- default:
- return 0;
- }
-
- init.sgram = 0; /* FIXME !pMga->HasSDRAM; */
-
-
- switch (ctx->bpp)
- {
- case 16:
- init.maccess = MGA_MACCESS_PW16;
- break;
- case 32:
- init.maccess = MGA_MACCESS_PW32;
- break;
- default:
- fprintf( stderr, "[mga] invalid bpp (%d)\n", ctx->bpp );
- return 0;
- }
-
-
- init.fb_cpp = ctx->bpp / 8;
- init.front_offset = pMga->frontOffset;
- init.front_pitch = pMga->frontPitch / init.fb_cpp;
- init.back_offset = pMga->backOffset;
- init.back_pitch = pMga->backPitch / init.fb_cpp;
-
- init.depth_cpp = ctx->bpp / 8;
- init.depth_offset = pMga->depthOffset;
- init.depth_pitch = pMga->depthPitch / init.depth_cpp;
-
- init.texture_offset[0] = pMga->textureOffset;
- init.texture_size[0] = pMga->textureSize;
-
- init.fb_offset = ctx->shared.hFrameBuffer;
- init.mmio_offset = pMga->registers.handle;
- init.status_offset = pMga->status.handle;
-
- init.warp_offset = pMga->warp.handle;
- init.primary_offset = pMga->primary.handle;
- init.buffers_offset = pMga->buffers.handle;
-
- init.texture_offset[1] = pMga->agpTextures.handle;
- init.texture_size[1] = pMga->agpTextures.size;
-
- ret = drmCommandWrite( ctx->drmFD, DRM_MGA_INIT, &init, sizeof(init));
- if ( ret < 0 ) {
- fprintf( stderr,
- "[drm] Failed to initialize DMA! (%d)\n", ret );
- return 0;
- }
-
- return 1;
-}
-
-static void MGADRIIrqInit(struct DRIDriverContextRec *ctx, MGAPtr pMga)
-{
- if (!pMga->irq)
- {
- pMga->irq = drmGetInterruptFromBusID(ctx->drmFD,
- ctx->pciBus,
- ctx->pciDevice,
- ctx->pciFunc);
-
- fprintf(stderr, "[drm] got IRQ %d\n", pMga->irq);
-
- if((drmCtlInstHandler(ctx->drmFD, pMga->irq)) != 0)
- {
- fprintf(stderr,
- "[drm] failure adding irq handler, "
- "there is a device already using that irq\n"
- "[drm] falling back to irq-free operation\n");
- pMga->irq = 0;
- }
- else
- {
- pMga->reg_ien = INREG( MGAREG_IEN );
- }
- }
-
- if (pMga->irq)
- fprintf(stderr,
- "[drm] dma control initialized, using IRQ %d\n",
- pMga->irq);
-}
-
-static int MGADRIBuffersInit( struct DRIDriverContextRec *ctx, MGAPtr pMga )
-{
- pMga->drmBuffers = drmMapBufs( ctx->drmFD );
- if ( !pMga->drmBuffers )
- {
- fprintf( stderr,
- "[drm] Failed to map DMA buffers list\n" );
- return 0;
- }
-
- fprintf( stderr,
- "[drm] Mapped %d DMA buffers\n",
- pMga->drmBuffers->count );
-
- return 1;
-}
-
-static int MGAMemoryInit( struct DRIDriverContextRec *ctx, MGAPtr pMga )
-{
- int width_bytes = ctx->shared.virtualWidth * ctx->cpp;
- int bufferSize = ((ctx->shared.virtualHeight * width_bytes
- + MGA_BUFFER_ALIGN)
- & ~MGA_BUFFER_ALIGN);
- int depthSize = ((((ctx->shared.virtualHeight+15) & ~15) * width_bytes
- + MGA_BUFFER_ALIGN)
- & ~MGA_BUFFER_ALIGN);
- int l;
-
- pMga->frontOffset = 0;
- pMga->frontPitch = ctx->shared.virtualWidth * ctx->cpp;
-
- fprintf(stderr,
- "Using %d MB AGP aperture\n", pMga->agpSize);
- fprintf(stderr,
- "Using %d MB for vertex/indirect buffers\n", pMga->buffers.size>>20);
- fprintf(stderr,
- "Using %d MB for AGP textures\n", pMga->agpTextures.size>>20);
-
- /* Front, back and depth buffers - everything else texture??
- */
- pMga->textureSize = ctx->shared.fbSize - 2 * bufferSize - depthSize;
-
- if (pMga->textureSize < 0)
- return 0;
-
- l = mylog2( pMga->textureSize / MGA_NR_TEX_REGIONS );
- if ( l < MGA_LOG_MIN_TEX_REGION_SIZE )
- l = MGA_LOG_MIN_TEX_REGION_SIZE;
-
- /* Round the texture size up to the nearest whole number of
- * texture regions. Again, be greedy about this, don't
- * round down.
- */
- pMga->logTextureGranularity = l;
- pMga->textureSize = (pMga->textureSize >> l) << l;
-
- /* Set a minimum usable local texture heap size. This will fit
- * two 256x256x32bpp textures.
- */
- if (pMga->textureSize < 512 * 1024) {
- pMga->textureOffset = 0;
- pMga->textureSize = 0;
- }
-
- /* Reserve space for textures */
- pMga->textureOffset = ((ctx->shared.fbSize - pMga->textureSize +
- MGA_BUFFER_ALIGN) &
- ~MGA_BUFFER_ALIGN);
-
- /* Reserve space for the shared depth
- * buffer.
- */
- pMga->depthOffset = ((pMga->textureOffset - depthSize +
- MGA_BUFFER_ALIGN) &
- ~MGA_BUFFER_ALIGN);
- pMga->depthPitch = ctx->shared.virtualWidth * ctx->cpp;
-
- pMga->backOffset = ((pMga->depthOffset - bufferSize +
- MGA_BUFFER_ALIGN) &
- ~MGA_BUFFER_ALIGN);
- pMga->backPitch = ctx->shared.virtualWidth * ctx->cpp;
-
-
- fprintf(stderr,
- "Will use back buffer at offset 0x%x\n",
- pMga->backOffset);
- fprintf(stderr,
- "Will use depth buffer at offset 0x%x\n",
- pMga->depthOffset);
- fprintf(stderr,
- "Will use %d kb for textures at offset 0x%x\n",
- pMga->textureSize/1024, pMga->textureOffset);
-
- return 1;
-}
-
-static int MGACheckDRMVersion( struct DRIDriverContextRec *ctx, MGAPtr pMga )
-{
- drmVersionPtr version;
-
- /* Check the MGA DRM version */
- version = drmGetVersion(ctx->drmFD);
- if ( version ) {
- if ( version->version_major != 3 ||
- version->version_minor < 0 ) {
- /* incompatible drm version */
- fprintf( stderr,
- "[dri] MGADRIScreenInit failed because of a version mismatch.\n"
- "[dri] mga.o kernel module version is %d.%d.%d but version 3.0.x is needed.\n"
- "[dri] Disabling DRI.\n",
- version->version_major,
- version->version_minor,
- version->version_patchlevel );
- drmFreeVersion( version );
- return 0;
- }
- drmFreeVersion( version );
- }
-
- return 1;
-}
-
-static void print_client_msg( MGADRIPtr pMGADRI )
-{
- fprintf( stderr, "chipset: %d\n", pMGADRI->chipset );
-
- fprintf( stderr, "width: %d\n", pMGADRI->width );
- fprintf( stderr, "height: %d\n", pMGADRI->height );
- fprintf( stderr, "mem: %d\n", pMGADRI->mem );
- fprintf( stderr, "cpp: %d\n", pMGADRI->cpp );
-
- fprintf( stderr, "agpMode: %d\n", pMGADRI->agpMode );
-
- fprintf( stderr, "frontOffset: %d\n", pMGADRI->frontOffset );
- fprintf( stderr, "frontPitch: %d\n", pMGADRI->frontPitch );
-
- fprintf( stderr, "backOffset: %d\n", pMGADRI->backOffset );
- fprintf( stderr, "backPitch: %d\n", pMGADRI->backPitch );
-
- fprintf( stderr, "depthOffset: %d\n", pMGADRI->depthOffset );
- fprintf( stderr, "depthPitch: %d\n", pMGADRI->depthPitch );
-
- fprintf( stderr, "textureOffset: %d\n", pMGADRI->textureOffset );
- fprintf( stderr, "textureSize: %d\n", pMGADRI->textureSize );
-
- fprintf( stderr, "logTextureGranularity: %d\n", pMGADRI->logTextureGranularity );
- fprintf( stderr, "logAgpTextureGranularity: %d\n", pMGADRI->logAgpTextureGranularity );
-
- fprintf( stderr, "agpTextureHandle: %u\n", (unsigned int)pMGADRI->agpTextureOffset );
- fprintf( stderr, "agpTextureSize: %u\n", (unsigned int)pMGADRI->agpTextureSize );
-
-#if 0
- pMGADRI->registers.handle = pMga->registers.handle;
- pMGADRI->registers.size = pMga->registers.size;
- pMGADRI->status.handle = pMga->status.handle;
- pMGADRI->status.size = pMga->status.size;
- pMGADRI->primary.handle = pMga->primary.handle;
- pMGADRI->primary.size = pMga->primary.size;
- pMGADRI->buffers.handle = pMga->buffers.handle;
- pMGADRI->buffers.size = pMga->buffers.size;
- pMGADRI->sarea_priv_offset = sizeof(drm_sarea_t);
-#endif
-}
-
-static int MGAScreenInit( struct DRIDriverContextRec *ctx, MGAPtr pMga )
-{
- int i;
- int err;
- MGADRIPtr pMGADRI;
-
- usleep(100);
- /*assert(!ctx->IsClient);*/
-
- {
- int width_bytes = (ctx->shared.virtualWidth * ctx->cpp);
- int maxy = ctx->shared.fbSize / width_bytes;
-
-
- if (maxy <= ctx->shared.virtualHeight * 3) {
- fprintf(stderr,
- "Static buffer allocation failed -- "
- "need at least %d kB video memory (have %d kB)\n",
- (ctx->shared.virtualWidth * ctx->shared.virtualHeight *
- ctx->cpp * 3 + 1023) / 1024,
- ctx->shared.fbSize / 1024);
- return 0;
- }
- }
-
- switch(pMga->Chipset) {
- case PCI_CHIP_MGAG550:
- case PCI_CHIP_MGAG400:
- case PCI_CHIP_MGAG200:
-#if 0
- case PCI_CHIP_MGAG200_PCI:
-#endif
- break;
- default:
- fprintf(stderr, "[drm] Direct rendering only supported with G200/G400/G550 AGP\n");
- return 0;
- }
-
- fprintf( stderr,
- "[drm] bpp: %d depth: %d\n",
- ctx->bpp, ctx->bpp /* FIXME: depth */ );
-
- if ( (ctx->bpp / 8) != 2 &&
- (ctx->bpp / 8) != 4 ) {
- fprintf( stderr,
- "[dri] Direct rendering only supported in 16 and 32 bpp modes\n" );
- return 0;
- }
-
- ctx->shared.SAREASize = SAREA_MAX;
-
-
- /* Note that drmOpen will try to load the kernel module, if needed. */
- ctx->drmFD = drmOpen("mga", NULL );
- if (ctx->drmFD < 0) {
- fprintf(stderr, "[drm] drmOpen failed\n");
- return 0;
- }
-
- if ((err = drmSetBusid(ctx->drmFD, ctx->pciBusID)) < 0) {
- fprintf(stderr, "[drm] drmSetBusid failed (%d, %s), %s\n",
- ctx->drmFD, ctx->pciBusID, strerror(-err));
- return 0;
- }
-
-
- if (drmAddMap( ctx->drmFD,
- 0,
- ctx->shared.SAREASize,
- DRM_SHM,
- DRM_CONTAINS_LOCK,
- &ctx->shared.hSAREA) < 0)
- {
- fprintf(stderr, "[drm] drmAddMap failed\n");
- return 0;
- }
- fprintf(stderr, "[drm] added %d byte SAREA at 0x%08lx\n",
- ctx->shared.SAREASize, ctx->shared.hSAREA);
-
- if (drmMap( ctx->drmFD,
- ctx->shared.hSAREA,
- ctx->shared.SAREASize,
- (drmAddressPtr)(&ctx->pSAREA)) < 0)
- {
- fprintf(stderr, "[drm] drmMap failed\n");
- return 0;
- }
- memset(ctx->pSAREA, 0, ctx->shared.SAREASize);
- fprintf(stderr, "[drm] mapped SAREA 0x%08lx to %p, size %d\n",
- ctx->shared.hSAREA, ctx->pSAREA, ctx->shared.SAREASize);
-
- /* Need to AddMap the framebuffer and mmio regions here:
- */
- if (drmAddMap( ctx->drmFD,
- (drm_handle_t)ctx->FBStart,
- ctx->FBSize,
- DRM_FRAME_BUFFER,
- 0,
- &ctx->shared.hFrameBuffer) < 0)
- {
- fprintf(stderr, "[drm] drmAddMap framebuffer failed\n");
- return 0;
- }
- fprintf(stderr, "[drm] framebuffer handle = 0x%08lx\n",
- ctx->shared.hFrameBuffer);
-
-
-#if 0 /* will be done in MGADRIMapInit */
- if (drmAddMap(ctx->drmFD,
- ctx->FixedInfo.mmio_start,
- ctx->FixedInfo.mmio_len,
- DRM_REGISTERS,
- DRM_READ_ONLY,
- &pMga->registers.handle) < 0) {
- fprintf(stderr, "[drm] drmAddMap mmio failed\n");
- return 0;
- }
- fprintf(stderr,
- "[drm] register handle = 0x%08lx\n", pMga->registers.handle);
-#endif
-
-
- /* Check the mga DRM version */
- if (!MGACheckDRMVersion(ctx, pMga)) {
- return 0;
- }
-
- if ( !MGADRIAgpInit( ctx, pMga ) ) {
- return 0;
- }
-
- if ( !MGADRIMapInit( ctx, pMga ) ) {
- return 0;
- }
-
- /* Memory manager setup */
- if (!MGAMemoryInit(ctx, pMga)) {
- return 0;
- }
-
-
- /* Create a 'server' context so we can grab the lock for
- * initialization ioctls.
- */
- if ((err = drmCreateContext(ctx->drmFD, &ctx->serverContext)) != 0) {
- fprintf(stderr, "%s: drmCreateContext failed %d\n", __FUNCTION__, err);
- return 0;
- }
-
- DRM_LOCK(ctx->drmFD, ctx->pSAREA, ctx->serverContext, 0);
-
- /* Initialize the kernel data structures */
- if (!MGADRIKernelInit(ctx, pMga)) {
- fprintf(stderr, "MGADRIKernelInit failed\n");
- DRM_UNLOCK(ctx->drmFD, ctx->pSAREA, ctx->serverContext);
- return 0;
- }
-
- /* Initialize the vertex buffers list */
- if (!MGADRIBuffersInit(ctx, pMga)) {
- fprintf(stderr, "MGADRIBuffersInit failed\n");
- DRM_UNLOCK(ctx->drmFD, ctx->pSAREA, ctx->serverContext);
- return 0;
- }
-
- /* Initialize IRQ */
- MGADRIIrqInit(ctx, pMga);
-
-
- /* Initialize the SAREA private data structure */
- {
- drm_mga_sarea_t *pSAREAPriv;
- pSAREAPriv = (drm_mga_sarea_t *)(((char*)ctx->pSAREA) +
- sizeof(drm_sarea_t));
- memset(pSAREAPriv, 0, sizeof(*pSAREAPriv));
- }
-
- /* Quick hack to clear the front & back buffers. Could also use
- * the clear ioctl to do this, but would need to setup hw state
- * first.
- */
- drimemsetio((char *)ctx->FBAddress + pMga->frontOffset,
- 0,
- pMga->frontPitch * ctx->shared.virtualHeight );
-
- drimemsetio((char *)ctx->FBAddress + pMga->backOffset,
- 0,
- pMga->backPitch * ctx->shared.virtualHeight );
-
- /* Can release the lock now */
-/* DRM_UNLOCK(ctx->drmFD, ctx->pSAREA, ctx->serverContext);*/
-
- /* This is the struct passed to radeon_dri.so for its initialization */
- ctx->driverClientMsg = malloc(sizeof(MGADRIRec));
- ctx->driverClientMsgSize = sizeof(MGADRIRec);
-
- pMGADRI = (MGADRIPtr)ctx->driverClientMsg;
-
-
- switch(pMga->Chipset) {
- case PCI_CHIP_MGAG550:
- case PCI_CHIP_MGAG400:
- pMGADRI->chipset = MGA_CARD_TYPE_G400;
- break;
- case PCI_CHIP_MGAG200:
- case PCI_CHIP_MGAG200_PCI:
- pMGADRI->chipset = MGA_CARD_TYPE_G200;
- break;
- default:
- return 0;
- }
- pMGADRI->width = ctx->shared.virtualWidth;
- pMGADRI->height = ctx->shared.virtualHeight;
- pMGADRI->mem = ctx->shared.fbSize;
- pMGADRI->cpp = ctx->bpp / 8;
-
- pMGADRI->agpMode = pMga->agpMode;
-
- pMGADRI->frontOffset = pMga->frontOffset;
- pMGADRI->frontPitch = pMga->frontPitch;
- pMGADRI->backOffset = pMga->backOffset;
- pMGADRI->backPitch = pMga->backPitch;
- pMGADRI->depthOffset = pMga->depthOffset;
- pMGADRI->depthPitch = pMga->depthPitch;
- pMGADRI->textureOffset = pMga->textureOffset;
- pMGADRI->textureSize = pMga->textureSize;
- pMGADRI->logTextureGranularity = pMga->logTextureGranularity;
-
- i = mylog2( pMga->agpTextures.size / MGA_NR_TEX_REGIONS );
- if ( i < MGA_LOG_MIN_TEX_REGION_SIZE )
- i = MGA_LOG_MIN_TEX_REGION_SIZE;
-
- pMGADRI->logAgpTextureGranularity = i;
- pMGADRI->agpTextureOffset = (unsigned int)pMga->agpTextures.handle;
- pMGADRI->agpTextureSize = (unsigned int)pMga->agpTextures.size;
-
- pMGADRI->registers.handle = pMga->registers.handle;
- pMGADRI->registers.size = pMga->registers.size;
- pMGADRI->status.handle = pMga->status.handle;
- pMGADRI->status.size = pMga->status.size;
- pMGADRI->primary.handle = pMga->primary.handle;
- pMGADRI->primary.size = pMga->primary.size;
- pMGADRI->buffers.handle = pMga->buffers.handle;
- pMGADRI->buffers.size = pMga->buffers.size;
- pMGADRI->sarea_priv_offset = sizeof(drm_sarea_t);
-
- print_client_msg( pMGADRI );
-
- return 1;
-}
-
-
-/**
- * \brief Validate the fbdev mode.
- *
- * \param ctx display handle.
- *
- * \return one on success, or zero on failure.
- *
- * Saves some registers and returns 1.
- *
- * \sa mgaValidateMode().
- */
-static int mgaValidateMode( const DRIDriverContext *ctx )
-{
- return 1;
-}
-
-
-/**
- * \brief Examine mode returned by fbdev.
- *
- * \param ctx display handle.
- *
- * \return one on success, or zero on failure.
- *
- * Restores registers that fbdev has clobbered and returns 1.
- *
- * \sa mgaValidateMode().
- */
-static int mgaPostValidateMode( const DRIDriverContext *ctx )
-{
- return 1;
-}
-
-
-/**
- * \brief Initialize the framebuffer device mode
- *
- * \param ctx display handle.
- *
- * \return one on success, or zero on failure.
- *
- * Fills in \p info with some default values and some information from \p ctx
- * and then calls MGAScreenInit() for the screen initialization.
- *
- * Before exiting clears the framebuffer memomry accessing it directly.
- */
-static int mgaInitFBDev( struct DRIDriverContextRec *ctx )
-{
- MGAPtr pMga = calloc(1, sizeof(*pMga));
-
- {
- int dummy = ctx->shared.virtualWidth;
-
- switch (ctx->bpp / 8) {
- case 1: dummy = (ctx->shared.virtualWidth + 127) & ~127; break;
- case 2: dummy = (ctx->shared.virtualWidth + 31) & ~31; break;
- case 3:
- case 4: dummy = (ctx->shared.virtualWidth + 15) & ~15; break;
- }
-
- ctx->shared.virtualWidth = dummy;
- }
-
- ctx->driverPrivate = (void *)pMga;
-
- pMga->agpMode = MGA_DEFAULT_AGP_MODE;
- pMga->agpSize = MGA_DEFAULT_AGP_SIZE;
-
- pMga->Chipset = ctx->chipset;
-
- pMga->IOAddress = ctx->MMIOStart;
- pMga->IOBase = ctx->MMIOAddress;
-
- pMga->frontPitch = ctx->shared.virtualWidth * ctx->cpp;
-
- if (!MGAScreenInit( ctx, pMga ))
- return 0;
-
- return 1;
-}
-
-
-/**
- * \brief The screen is being closed, so clean up any state and free any
- * resources used by the DRI.
- *
- * \param ctx display handle.
- *
- * Unmaps the SAREA, closes the DRM device file descriptor and frees the driver
- * private data.
- */
-static void mgaHaltFBDev( struct DRIDriverContextRec *ctx )
-{
- drmUnmap( ctx->pSAREA, ctx->shared.SAREASize );
- drmClose(ctx->drmFD);
-
- if (ctx->driverPrivate) {
- free(ctx->driverPrivate);
- ctx->driverPrivate = NULL;
- }
-}
-
-
-static int mgaEngineShutdown( const DRIDriverContext *ctx )
-{
- fprintf(stderr, "%s() is not yet implemented!\n", __FUNCTION__);
-
- return 1;
-}
-
-static int mgaEngineRestore( const DRIDriverContext *ctx )
-{
- fprintf(stderr, "%s() is not yet implemented!\n", __FUNCTION__);
-
- return 1;
-}
-
-/**
- * \brief Exported driver interface for Mini GLX.
- *
- * \sa DRIDriverRec.
- */
-struct DRIDriverRec __driDriver = {
- mgaValidateMode,
- mgaPostValidateMode,
- mgaInitFBDev,
- mgaHaltFBDev,
- mgaEngineShutdown,
- mgaEngineRestore,
- 0
-};
-
-
-
-
-#if 0
-void MGADRICloseScreen( ScreenPtr pScreen )
-{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- MGAPtr pMga = MGAPTR(pScrn);
- MGADRIServerPrivatePtr pMga = pMga->DRIServerInfo;
- drmMGAInit init;
-
- if ( pMga->drmBuffers ) {
- drmUnmapBufs( pMga->drmBuffers );
- pMga->drmBuffers = NULL;
- }
-
- if (pMga->irq) {
- drmCtlUninstHandler(ctx->drmFD);
- pMga->irq = 0;
- }
-
- /* Cleanup DMA */
- memset( &init, 0, sizeof(drmMGAInit) );
- init.func = MGA_CLEANUP_DMA;
- drmCommandWrite( ctx->drmFD, DRM_MGA_INIT, &init, sizeof(drmMGAInit) );
-
- if ( pMga->status.map ) {
- drmUnmap( pMga->status.map, pMga->status.size );
- pMga->status.map = NULL;
- }
- if ( pMga->buffers.map ) {
- drmUnmap( pMga->buffers.map, pMga->buffers.size );
- pMga->buffers.map = NULL;
- }
- if ( pMga->primary.map ) {
- drmUnmap( pMga->primary.map, pMga->primary.size );
- pMga->primary.map = NULL;
- }
- if ( pMga->warp.map ) {
- drmUnmap( pMga->warp.map, pMga->warp.size );
- pMga->warp.map = NULL;
- }
-
- if ( pMga->agpTextures.map ) {
- drmUnmap( pMga->agpTextures.map, pMga->agpTextures.size );
- pMga->agpTextures.map = NULL;
- }
-
- if ( pMga->agp.handle ) {
- drmAgpUnbind( ctx->drmFD, pMga->agp.handle );
- drmAgpFree( ctx->drmFD, pMga->agp.handle );
- pMga->agp.handle = 0;
- drmAgpRelease( ctx->drmFD );
- }
-
- DRICloseScreen( pScreen );
-
- if ( pMga->pDRIInfo ) {
- if ( pMga->pDRIpMga->devPrivate ) {
- xfree( pMga->pDRIpMga->devPrivate );
- pMga->pDRIpMga->devPrivate = 0;
- }
- DRIDestroyInfoRec( pMga->pDRIInfo );
- pMga->pDRIInfo = 0;
- }
- if ( pMga->DRIServerInfo ) {
- xfree( pMga->DRIServerInfo );
- pMga->DRIServerInfo = 0;
- }
- if ( pMga->pVisualConfigs ) {
- xfree( pMga->pVisualConfigs );
- }
- if ( pMga->pVisualConfigsPriv ) {
- xfree( pMga->pVisualConfigsPriv );
- }
-}
-#endif
diff --git a/src/mesa/drivers/dri/nouveau/Makefile b/src/mesa/drivers/dri/nouveau/Makefile
index 49e8933561..7be19b26fd 100644
--- a/src/mesa/drivers/dri/nouveau/Makefile
+++ b/src/mesa/drivers/dri/nouveau/Makefile
@@ -8,8 +8,6 @@ DRI_LIB_DEPS += $(shell pkg-config libdrm_nouveau --libs)
LIBNAME = nouveau_vieux_dri.so
-MINIGLX_SOURCES =
-
DRIVER_SOURCES = \
nouveau_screen.c \
nouveau_context.c \
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c
index 2629733273..502e01255c 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_context.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c
@@ -43,18 +43,23 @@
#define need_GL_EXT_framebuffer_object
#define need_GL_EXT_fog_coord
+#define need_GL_EXT_secondary_color
#include "main/remap_helper.h"
static const struct dri_extension nouveau_extensions[] = {
- { "GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions },
{ "GL_ARB_multitexture", NULL },
- { "GL_EXT_texture_lod_bias", NULL },
- { "GL_SGIS_generate_mipmap", NULL },
+ { "GL_ARB_texture_env_add", NULL },
{ "GL_ARB_texture_env_combine", NULL },
{ "GL_ARB_texture_env_dot3", NULL },
- { "GL_ARB_texture_env_add", NULL },
+ { "GL_ARB_texture_mirrored_repeat", NULL },
{ "GL_EXT_fog_coord", GL_EXT_fog_coord_functions },
+ { "GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions },
+ { "GL_EXT_secondary_color", GL_EXT_secondary_color_functions },
+ { "GL_EXT_stencil_wrap", NULL },
+ { "GL_EXT_texture_lod_bias", NULL },
+ { "GL_NV_blend_square", NULL },
+ { "GL_SGIS_generate_mipmap", NULL },
{ NULL, NULL }
};
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
index 846478650e..2ec3dc9242 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
@@ -72,7 +72,7 @@ set_renderbuffer_format(struct gl_renderbuffer *rb, GLenum internalFormat)
case GL_DEPTH24_STENCIL8_EXT:
rb->_BaseFormat = GL_DEPTH_STENCIL;
rb->Format = MESA_FORMAT_Z24_S8;
- rb->DataType = GL_UNSIGNED_INT;
+ rb->DataType = GL_UNSIGNED_INT_24_8_EXT;
s->cpp = 4;
break;
default:
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c
index 5d593ed4dd..bc610451b4 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_state.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c
@@ -150,6 +150,7 @@ nouveau_enable(GLcontext *ctx, GLenum cap, GLboolean state)
break;
case GL_COLOR_SUM_EXT:
context_dirty(ctx, FRAG);
+ context_dirty(ctx, LIGHT_MODEL);
break;
case GL_CULL_FACE:
context_dirty(ctx, CULL_FACE);
@@ -243,12 +244,6 @@ nouveau_fog(GLcontext *ctx, GLenum pname, const GLfloat *params)
}
static void
-nouveau_index_mask(GLcontext *ctx, GLuint mask)
-{
- context_dirty(ctx, INDEX_MASK);
-}
-
-static void
nouveau_light(GLcontext *ctx, GLenum light, GLenum pname, const GLfloat *params)
{
switch (pname) {
@@ -504,7 +499,6 @@ nouveau_state_init(GLcontext *ctx)
ctx->Driver.DrawBuffers = nouveau_draw_buffers;
ctx->Driver.Enable = nouveau_enable;
ctx->Driver.Fogfv = nouveau_fog;
- ctx->Driver.IndexMask = nouveau_index_mask;
ctx->Driver.Lightfv = nouveau_light;
ctx->Driver.LightModelfv = nouveau_light_model;
ctx->Driver.LineStipple = nouveau_line_stipple;
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.h b/src/mesa/drivers/dri/nouveau/nouveau_state.h
index d001fa259a..d01d962c9f 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_state.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_state.h
@@ -47,7 +47,6 @@ enum {
NOUVEAU_STATE_FRAG,
NOUVEAU_STATE_FRAMEBUFFER,
NOUVEAU_STATE_FOG,
- NOUVEAU_STATE_INDEX_MASK,
NOUVEAU_STATE_LIGHT_ENABLE,
NOUVEAU_STATE_LIGHT_MODEL,
NOUVEAU_STATE_LIGHT_SOURCE0,
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c b/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c
index 02c8580760..a365b977f2 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c
@@ -24,8 +24,11 @@
*
*/
-#include "main/bufferobj.h"
#include "nouveau_bufferobj.h"
+#include "nouveau_util.h"
+
+#include "main/bufferobj.h"
+#include "main/image.h"
/* Arbitrary pushbuf length we can assume we can get with a single
* WAIT_RING. */
@@ -58,7 +61,11 @@ vbo_init_array(struct nouveau_array_state *a, int attr, int stride,
} else {
nouveau_bo_ref(NULL, &a->bo);
a->offset = 0;
- a->buf = ptr;
+
+ if (map)
+ a->buf = ptr;
+ else
+ a->buf = NULL;
}
if (a->buf)
@@ -94,11 +101,20 @@ vbo_init_arrays(GLcontext *ctx, const struct _mesa_index_buffer *ib,
if (attr >= 0) {
const struct gl_client_array *array = arrays[attr];
+ int stride;
+
+ if (render->mode == VBO &&
+ !_mesa_is_bufferobj(array->BufferObj))
+ /* Pack client buffers. */
+ stride = align(_mesa_sizeof_type(array->Type)
+ * array->Size, 4);
+ else
+ stride = array->StrideB;
vbo_init_array(&render->attrs[attr], attr,
- array->StrideB, array->Size,
- array->Type, array->BufferObj,
- array->Ptr, render->mode == IMM);
+ stride, array->Size, array->Type,
+ array->BufferObj, array->Ptr,
+ render->mode == IMM);
}
}
}
@@ -227,6 +243,23 @@ vbo_choose_attrs(GLcontext *ctx, const struct gl_client_array **arrays)
vbo_emit_attr(ctx, arrays, VERT_ATTRIB_POS);
}
+static unsigned
+get_max_client_stride(GLcontext *ctx)
+{
+ struct nouveau_render_state *render = to_render_state(ctx);
+ int i, s = 0;
+
+ for (i = 0; i < render->attr_count; i++) {
+ int attr = render->map[i];
+ struct nouveau_array_state *a = &render->attrs[attr];
+
+ if (attr >= 0 && !a->bo)
+ s = MAX2(a->stride, s);
+ }
+
+ return s;
+}
+
static void
TAG(vbo_render_prims)(GLcontext *ctx, const struct gl_client_array **arrays,
const struct _mesa_prim *prims, GLuint nr_prims,
@@ -241,12 +274,20 @@ vbo_maybe_split(GLcontext *ctx, const struct gl_client_array **arrays,
GLuint min_index, GLuint max_index)
{
struct nouveau_context *nctx = to_nouveau_context(ctx);
+ struct nouveau_render_state *render = to_render_state(ctx);
unsigned pushbuf_avail = PUSHBUF_DWORDS - 2 * nctx->bo.count,
vert_avail = get_max_vertices(ctx, NULL, pushbuf_avail),
idx_avail = get_max_vertices(ctx, ib, pushbuf_avail);
+ int stride;
- if ((ib && ib->count > idx_avail) ||
- (!ib && max_index - min_index > vert_avail)) {
+ /* Try to keep client buffers smaller than the scratch BOs. */
+ if (render->mode == VBO &&
+ (stride = get_max_client_stride(ctx)))
+ vert_avail = MIN2(vert_avail,
+ RENDER_SCRATCH_SIZE / stride);
+
+ if (max_index - min_index > vert_avail ||
+ (ib && ib->count > idx_avail)) {
struct split_limits limits = {
.max_verts = vert_avail,
.max_indices = idx_avail,
@@ -276,17 +317,21 @@ vbo_bind_vertices(GLcontext *ctx, const struct gl_client_array **arrays,
if (attr >= 0) {
const struct gl_client_array *array = arrays[attr];
struct nouveau_array_state *a = &render->attrs[attr];
- unsigned delta = (basevertex + min_index) * a->stride,
- size = (max_index - min_index + 1) * a->stride;
+ unsigned delta = (basevertex + min_index)
+ * array->StrideB;
if (a->bo) {
a->offset = (intptr_t)array->Ptr + delta;
} else {
- void *scratch = get_scratch_vbo(ctx, size,
- &a->bo,
- &a->offset);
-
- memcpy(scratch, a->buf + delta, size);
+ int j, n = max_index - min_index + 1;
+ char *sp = (char *)array->Ptr + delta;
+ char *dp = get_scratch_vbo(ctx, n * a->stride,
+ &a->bo, &a->offset);
+
+ for (j = 0; j < n; j++)
+ memcpy(dp + j * a->stride,
+ sp + j * array->StrideB,
+ a->stride);
}
}
}
diff --git a/src/mesa/drivers/dri/nouveau/nv04_context.c b/src/mesa/drivers/dri/nouveau/nv04_context.c
index 1acd41de54..a442425e44 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_context.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_context.c
@@ -265,7 +265,6 @@ const struct nouveau_driver nv04_driver = {
nouveau_emit_nothing,
nouveau_emit_nothing,
nouveau_emit_nothing,
- nouveau_emit_nothing,
nv04_emit_scissor,
nv04_defer_blend,
nv04_defer_control,
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_fb.c b/src/mesa/drivers/dri/nouveau/nv04_state_fb.c
index aad1e491d2..5e5e0c5874 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_fb.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_fb.c
@@ -63,7 +63,7 @@ nv04_emit_framebuffer(GLcontext *ctx, int emit)
return;
/* Render target */
- if (fb->_NumColorDrawBuffers) {
+ if (fb->_ColorDrawBuffers[0]) {
s = &to_nouveau_renderbuffer(
fb->_ColorDrawBuffers[0])->surface;
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
index 89c6753694..c191571a5f 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
@@ -71,6 +71,10 @@ get_stencil_op(unsigned op)
return 0x5;
case GL_INVERT:
return 0x6;
+ case GL_INCR_WRAP:
+ return 0x7;
+ case GL_DECR_WRAP:
+ return 0x8;
default:
assert(0);
}
@@ -271,6 +275,10 @@ nv04_emit_blend(GLcontext *ctx, int emit)
else
blend |= NV04_MULTITEX_TRIANGLE_BLEND_SHADE_MODE_FLAT;
+ /* Secondary color */
+ if (NEED_SECONDARY_COLOR(ctx))
+ blend |= NV04_MULTITEX_TRIANGLE_BLEND_SPECULAR_ENABLE;
+
/* Fog. */
if (ctx->Fog.Enabled)
blend |= NV04_MULTITEX_TRIANGLE_BLEND_FOG_ENABLE;
@@ -305,6 +313,10 @@ nv04_emit_blend(GLcontext *ctx, int emit)
else
blend |= get_texenv_mode(GL_MODULATE);
+ /* Secondary color */
+ if (NEED_SECONDARY_COLOR(ctx))
+ blend |= NV04_TEXTURED_TRIANGLE_BLEND_SPECULAR_ENABLE;
+
/* Fog. */
if (ctx->Fog.Enabled)
blend |= NV04_TEXTURED_TRIANGLE_BLEND_FOG_ENABLE;
diff --git a/src/mesa/drivers/dri/nouveau/nv10_context.c b/src/mesa/drivers/dri/nouveau/nv10_context.c
index 8e70c419ed..860d0aeb8f 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_context.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_context.c
@@ -370,7 +370,6 @@ const struct nouveau_driver nv10_driver = {
nv10_emit_frag,
nv10_emit_framebuffer,
nv10_emit_fog,
- nv10_emit_index_mask,
nv10_emit_light_enable,
nv10_emit_light_model,
nv10_emit_light_source,
diff --git a/src/mesa/drivers/dri/nouveau/nv10_driver.h b/src/mesa/drivers/dri/nouveau/nv10_driver.h
index b5ab19b3bc..d662712533 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_driver.h
+++ b/src/mesa/drivers/dri/nouveau/nv10_driver.h
@@ -100,9 +100,6 @@ void
nv10_emit_dither(GLcontext *ctx, int emit);
void
-nv10_emit_index_mask(GLcontext *ctx, int emit);
-
-void
nv10_emit_logic_opcode(GLcontext *ctx, int emit);
void
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
index 05c36b4f8f..6bd383ebcd 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
@@ -111,7 +111,7 @@ nv10_emit_framebuffer(GLcontext *ctx, int emit)
}
/* Render target */
- if (fb->_NumColorDrawBuffers) {
+ if (fb->_ColorDrawBuffers[0]) {
s = &to_nouveau_renderbuffer(
fb->_ColorDrawBuffers[0])->surface;
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_raster.c b/src/mesa/drivers/dri/nouveau/nv10_state_raster.c
index 68882ef05f..a62cd807a9 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_raster.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_raster.c
@@ -119,11 +119,6 @@ nv10_emit_dither(GLcontext *ctx, int emit)
}
void
-nv10_emit_index_mask(GLcontext *ctx, int emit)
-{
-}
-
-void
nv10_emit_logic_opcode(GLcontext *ctx, int emit)
{
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 6db14d83b8..406e24c455 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c
@@ -201,8 +201,10 @@ nv10_emit_light_model(GLcontext *ctx, int emit)
BEGIN_RING(chan, celsius, NV10TCL_LIGHT_MODEL, 1);
OUT_RING(chan, ((m->LocalViewer ?
NV10TCL_LIGHT_MODEL_LOCAL_VIEWER : 0) |
- (m->ColorControl == GL_SEPARATE_SPECULAR_COLOR ?
- NV10TCL_LIGHT_MODEL_SEPARATE_SPECULAR : 0)));
+ (NEED_SECONDARY_COLOR(ctx) ?
+ NV10TCL_LIGHT_MODEL_SEPARATE_SPECULAR : 0) |
+ (!ctx->Light.Enabled && ctx->Fog.ColorSumEnabled ?
+ NV10TCL_LIGHT_MODEL_VERTEX_SPECULAR : 0)));
}
static float
diff --git a/src/mesa/drivers/dri/nouveau/nv20_context.c b/src/mesa/drivers/dri/nouveau/nv20_context.c
index 635b5c0996..db39ef7075 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_context.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_context.c
@@ -459,7 +459,6 @@ const struct nouveau_driver nv20_driver = {
nv20_emit_frag,
nv20_emit_framebuffer,
nv20_emit_fog,
- nv10_emit_index_mask,
nv10_emit_light_enable,
nv20_emit_light_model,
nv20_emit_light_source,
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_fb.c b/src/mesa/drivers/dri/nouveau/nv20_state_fb.c
index 869acd6e31..d638541df9 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_fb.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_fb.c
@@ -67,7 +67,7 @@ nv20_emit_framebuffer(GLcontext *ctx, int emit)
return;
/* Render target */
- if (fb->_NumColorDrawBuffers) {
+ if (fb->_ColorDrawBuffers[0]) {
s = &to_nouveau_renderbuffer(
fb->_ColorDrawBuffers[0])->surface;
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c b/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c
index 0d566064f6..43f8c72312 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c
@@ -158,7 +158,7 @@ nv20_emit_light_model(GLcontext *ctx, int emit)
OUT_RING(chan, ((m->LocalViewer ?
NV20TCL_LIGHT_MODEL_VIEWER_LOCAL :
NV20TCL_LIGHT_MODEL_VIEWER_NONLOCAL) |
- (m->ColorControl == GL_SEPARATE_SPECULAR_COLOR ?
+ (NEED_SECONDARY_COLOR(ctx) ?
NV20TCL_LIGHT_MODEL_SEPARATE_SPECULAR :
0)));
diff --git a/src/mesa/drivers/dri/r128/Makefile b/src/mesa/drivers/dri/r128/Makefile
index 52c5a38a70..8144c9b43f 100644
--- a/src/mesa/drivers/dri/r128/Makefile
+++ b/src/mesa/drivers/dri/r128/Makefile
@@ -5,8 +5,6 @@ include $(TOP)/configs/current
LIBNAME = r128_dri.so
-MINIGLX_SOURCES = server/r128_dri.c
-
DRIVER_SOURCES = \
r128_context.c \
r128_lock.c \
diff --git a/src/mesa/drivers/dri/r128/r128_state.c b/src/mesa/drivers/dri/r128/r128_state.c
index 42f6dd7388..4d773feaaa 100644
--- a/src/mesa/drivers/dri/r128/r128_state.c
+++ b/src/mesa/drivers/dri/r128/r128_state.c
@@ -1407,13 +1407,11 @@ void r128DDInitStateFuncs( GLcontext *ctx )
{
ctx->Driver.UpdateState = r128DDInvalidateState;
- ctx->Driver.ClearIndex = NULL;
ctx->Driver.ClearColor = r128DDClearColor;
ctx->Driver.ClearStencil = r128DDClearStencil;
ctx->Driver.DrawBuffer = r128DDDrawBuffer;
ctx->Driver.ReadBuffer = r128DDReadBuffer;
- ctx->Driver.IndexMask = NULL;
ctx->Driver.ColorMask = r128DDColorMask;
ctx->Driver.AlphaFunc = r128DDAlphaFunc;
ctx->Driver.BlendEquationSeparate = r128DDBlendEquationSeparate;
diff --git a/src/mesa/drivers/dri/r128/r128_tris.c b/src/mesa/drivers/dri/r128/r128_tris.c
index 86d4717b05..9ea2a9d162 100644
--- a/src/mesa/drivers/dri/r128/r128_tris.c
+++ b/src/mesa/drivers/dri/r128/r128_tris.c
@@ -158,7 +158,6 @@ static struct {
#define DO_POINTS 1
#define DO_FULL_QUAD 1
-#define HAVE_RGBA 1
#define HAVE_SPEC 1
#define HAVE_BACK_COLORS 0
#define HAVE_HW_FLATSHADE 1
diff --git a/src/mesa/drivers/dri/r128/server/r128_dri.c b/src/mesa/drivers/dri/r128/server/r128_dri.c
deleted file mode 100644
index 6e3db948af..0000000000
--- a/src/mesa/drivers/dri/r128/server/r128_dri.c
+++ /dev/null
@@ -1,1112 +0,0 @@
-/*
- * Copyright 1999, 2000 ATI Technologies Inc., Markham, Ontario,
- * Precision Insight, Inc., Cedar Park, Texas, and
- * VA Linux Systems Inc., Fremont, California.
- *
- * 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 on 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
- * NON-INFRINGEMENT. IN NO EVENT SHALL ATI, PRECISION INSIGHT, VA LINUX
- * SYSTEMS AND/OR THEIR 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.
- */
-
-/*
- * Authors:
- * Kevin E. Martin <martin@valinux.com>
- * Rickard E. Faith <faith@valinux.com>
- * Daryll Strauss <daryll@valinux.com>
- * Gareth Hughes <gareth@valinux.com>
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-// Fix this to use kernel pci_ids.h when all of these IDs make it into the kernel
-#include "pci_ids.h"
-
-#include "driver.h"
-#include "drm.h"
-#include "memops.h"
-
-#include "r128.h"
-#include "r128_dri.h"
-#include "r128_macros.h"
-#include "r128_reg.h"
-#include "r128_version.h"
-#include "r128_drm.h"
-
-static size_t r128_drm_page_size;
-
-/* Compute log base 2 of val. */
-static int R128MinBits(int val)
-{
- int bits;
-
- if (!val) return 1;
- for (bits = 0; val; val >>= 1, ++bits);
- return bits;
-}
-
-/* Initialize the AGP state. Request memory for use in AGP space, and
- initialize the Rage 128 registers to point to that memory. */
-static GLboolean R128DRIAgpInit(const DRIDriverContext *ctx)
-{
- unsigned char *R128MMIO = ctx->MMIOAddress;
- R128InfoPtr info = ctx->driverPrivate;
- unsigned long mode;
- unsigned int vendor, device;
- int ret;
- unsigned long cntl, chunk;
- int s, l;
- int flags;
- unsigned long agpBase;
-
- if (drmAgpAcquire(ctx->drmFD) < 0) {
- fprintf(stderr, "[agp] AGP not available\n");
- return GL_FALSE;
- }
-
- /* Modify the mode if the default mode is
- not appropriate for this particular
- combination of graphics card and AGP
- chipset. */
-
- mode = drmAgpGetMode(ctx->drmFD); /* Default mode */
- vendor = drmAgpVendorId(ctx->drmFD);
- device = drmAgpDeviceId(ctx->drmFD);
-
- mode &= ~R128_AGP_MODE_MASK;
- switch (info->agpMode) {
- case 4: mode |= R128_AGP_4X_MODE;
- case 2: mode |= R128_AGP_2X_MODE;
- case 1: default: mode |= R128_AGP_1X_MODE;
- }
-
- fprintf(stderr,
- "[agp] Mode 0x%08lx [AGP 0x%04x/0x%04x; Card 0x%04x/0x%04x]\n",
- mode, vendor, device,
- 0x1002,
- info->Chipset);
-
- if (drmAgpEnable(ctx->drmFD, mode) < 0) {
- fprintf(stderr, "[agp] AGP not enabled\n");
- drmAgpRelease(ctx->drmFD);
- return GL_FALSE;
- }
-
- info->agpOffset = 0;
-
- if ((ret = drmAgpAlloc(ctx->drmFD, info->agpSize*1024*1024, 0, NULL,
- &info->agpMemHandle)) < 0) {
- fprintf(stderr, "[agp] Out of memory (%d)\n", ret);
- drmAgpRelease(ctx->drmFD);
- return GL_FALSE;
- }
- fprintf(stderr,
- "[agp] %d kB allocated with handle 0x%08x\n",
- info->agpSize*1024, info->agpMemHandle);
-
- if (drmAgpBind(ctx->drmFD, info->agpMemHandle, info->agpOffset) < 0) {
- fprintf(stderr, "[agp] Could not bind\n");
- drmAgpFree(ctx->drmFD, info->agpMemHandle);
- drmAgpRelease(ctx->drmFD);
- return GL_FALSE;
- }
-
- /* Initialize the CCE ring buffer data */
- info->ringStart = info->agpOffset;
- info->ringMapSize = info->ringSize*1024*1024 + r128_drm_page_size;
- info->ringSizeLog2QW = R128MinBits(info->ringSize*1024*1024/8) - 1;
-
- info->ringReadOffset = info->ringStart + info->ringMapSize;
- info->ringReadMapSize = r128_drm_page_size;
-
- /* Reserve space for vertex/indirect buffers */
- info->bufStart = info->ringReadOffset + info->ringReadMapSize;
- info->bufMapSize = info->bufSize*1024*1024;
-
- /* Reserve the rest for AGP textures */
- info->agpTexStart = info->bufStart + info->bufMapSize;
- s = (info->agpSize*1024*1024 - info->agpTexStart);
- l = R128MinBits((s-1) / R128_NR_TEX_REGIONS);
- if (l < R128_LOG_TEX_GRANULARITY) l = R128_LOG_TEX_GRANULARITY;
- info->agpTexMapSize = (s >> l) << l;
- info->log2AGPTexGran = l;
-
- if (info->CCESecure) flags = DRM_READ_ONLY;
- else flags = 0;
-
- if (drmAddMap(ctx->drmFD, info->ringStart, info->ringMapSize,
- DRM_AGP, flags, &info->ringHandle) < 0) {
- fprintf(stderr,
- "[agp] Could not add ring mapping\n");
- return GL_FALSE;
- }
- fprintf(stderr,
- "[agp] ring handle = 0x%08x\n", info->ringHandle);
-
- if (drmMap(ctx->drmFD, info->ringHandle, info->ringMapSize,
- (drmAddressPtr)&info->ring) < 0) {
- fprintf(stderr, "[agp] Could not map ring\n");
- return GL_FALSE;
- }
- fprintf(stderr,
- "[agp] Ring mapped at 0x%08lx\n",
- (unsigned long)info->ring);
-
- if (drmAddMap(ctx->drmFD, info->ringReadOffset, info->ringReadMapSize,
- DRM_AGP, flags, &info->ringReadPtrHandle) < 0) {
- fprintf(stderr,
- "[agp] Could not add ring read ptr mapping\n");
- return GL_FALSE;
- }
- fprintf(stderr,
- "[agp] ring read ptr handle = 0x%08x\n",
- info->ringReadPtrHandle);
-
- if (drmMap(ctx->drmFD, info->ringReadPtrHandle, info->ringReadMapSize,
- (drmAddressPtr)&info->ringReadPtr) < 0) {
- fprintf(stderr,
- "[agp] Could not map ring read ptr\n");
- return GL_FALSE;
- }
- fprintf(stderr,
- "[agp] Ring read ptr mapped at 0x%08lx\n",
- (unsigned long)info->ringReadPtr);
-
- if (drmAddMap(ctx->drmFD, info->bufStart, info->bufMapSize,
- DRM_AGP, 0, &info->bufHandle) < 0) {
- fprintf(stderr,
- "[agp] Could not add vertex/indirect buffers mapping\n");
- return GL_FALSE;
- }
- fprintf(stderr,
- "[agp] vertex/indirect buffers handle = 0x%08lx\n",
- info->bufHandle);
-
- if (drmMap(ctx->drmFD, info->bufHandle, info->bufMapSize,
- (drmAddressPtr)&info->buf) < 0) {
- fprintf(stderr,
- "[agp] Could not map vertex/indirect buffers\n");
- return GL_FALSE;
- }
- fprintf(stderr,
- "[agp] Vertex/indirect buffers mapped at 0x%08lx\n",
- (unsigned long)info->buf);
-
- if (drmAddMap(ctx->drmFD, info->agpTexStart, info->agpTexMapSize,
- DRM_AGP, 0, &info->agpTexHandle) < 0) {
- fprintf(stderr,
- "[agp] Could not add AGP texture map mapping\n");
- return GL_FALSE;
- }
- fprintf(stderr,
- "[agp] AGP texture map handle = 0x%08lx\n",
- info->agpTexHandle);
-
- if (drmMap(ctx->drmFD, info->agpTexHandle, info->agpTexMapSize,
- (drmAddressPtr)&info->agpTex) < 0) {
- fprintf(stderr,
- "[agp] Could not map AGP texture map\n");
- return GL_FALSE;
- }
- fprintf(stderr,
- "[agp] AGP Texture map mapped at 0x%08lx\n",
- (unsigned long)info->agpTex);
-
- /* Initialize Rage 128's AGP registers */
- cntl = INREG(R128_AGP_CNTL);
- cntl &= ~R128_AGP_APER_SIZE_MASK;
- switch (info->agpSize) {
- case 256: cntl |= R128_AGP_APER_SIZE_256MB; break;
- case 128: cntl |= R128_AGP_APER_SIZE_128MB; break;
- case 64: cntl |= R128_AGP_APER_SIZE_64MB; break;
- case 32: cntl |= R128_AGP_APER_SIZE_32MB; break;
- case 16: cntl |= R128_AGP_APER_SIZE_16MB; break;
- case 8: cntl |= R128_AGP_APER_SIZE_8MB; break;
- case 4: cntl |= R128_AGP_APER_SIZE_4MB; break;
- default:
- fprintf(stderr,
- "[agp] Illegal aperture size %d kB\n",
- info->agpSize*1024);
- return GL_FALSE;
- }
- agpBase = drmAgpBase(ctx->drmFD);
- OUTREG(R128_AGP_BASE, agpBase);
- OUTREG(R128_AGP_CNTL, cntl);
-
- /* Disable Rage 128's PCIGART registers */
- chunk = INREG(R128_BM_CHUNK_0_VAL);
- chunk &= ~(R128_BM_PTR_FORCE_TO_PCI |
- R128_BM_PM4_RD_FORCE_TO_PCI |
- R128_BM_GLOBAL_FORCE_TO_PCI);
- OUTREG(R128_BM_CHUNK_0_VAL, chunk);
-
- OUTREG(R128_PCI_GART_PAGE, 1); /* Ensure AGP GART is used (for now) */
-
- return GL_TRUE;
-}
-
-static GLboolean R128DRIPciInit(const DRIDriverContext *ctx)
-{
- R128InfoPtr info = ctx->driverPrivate;
- unsigned char *R128MMIO = ctx->MMIOAddress;
- uint32_t chunk;
- int ret;
- int flags;
-
- info->agpOffset = 0;
-
- ret = drmScatterGatherAlloc(ctx->drmFD, info->agpSize*1024*1024,
- &info->pciMemHandle);
- if (ret < 0) {
- fprintf(stderr, "[pci] Out of memory (%d)\n", ret);
- return GL_FALSE;
- }
- fprintf(stderr,
- "[pci] %d kB allocated with handle 0x%08x\n",
- info->agpSize*1024, info->pciMemHandle);
-
- /* Initialize the CCE ring buffer data */
- info->ringStart = info->agpOffset;
- info->ringMapSize = info->ringSize*1024*1024 + r128_drm_page_size;
- info->ringSizeLog2QW = R128MinBits(info->ringSize*1024*1024/8) - 1;
-
- info->ringReadOffset = info->ringStart + info->ringMapSize;
- info->ringReadMapSize = r128_drm_page_size;
-
- /* Reserve space for vertex/indirect buffers */
- info->bufStart = info->ringReadOffset + info->ringReadMapSize;
- info->bufMapSize = info->bufSize*1024*1024;
-
- flags = DRM_READ_ONLY | DRM_LOCKED | DRM_KERNEL;
-
- if (drmAddMap(ctx->drmFD, info->ringStart, info->ringMapSize,
- DRM_SCATTER_GATHER, flags, &info->ringHandle) < 0) {
- fprintf(stderr,
- "[pci] Could not add ring mapping\n");
- return GL_FALSE;
- }
- fprintf(stderr,
- "[pci] ring handle = 0x%08lx\n", info->ringHandle);
-
- if (drmMap(ctx->drmFD, info->ringHandle, info->ringMapSize,
- (drmAddressPtr)&info->ring) < 0) {
- fprintf(stderr, "[pci] Could not map ring\n");
- return GL_FALSE;
- }
- fprintf(stderr,
- "[pci] Ring mapped at 0x%08lx\n",
- (unsigned long)info->ring);
- fprintf(stderr,
- "[pci] Ring contents 0x%08lx\n",
- *(unsigned long *)info->ring);
-
- if (drmAddMap(ctx->drmFD, info->ringReadOffset, info->ringReadMapSize,
- DRM_SCATTER_GATHER, flags, &info->ringReadPtrHandle) < 0) {
- fprintf(stderr,
- "[pci] Could not add ring read ptr mapping\n");
- return GL_FALSE;
- }
- fprintf(stderr,
- "[pci] ring read ptr handle = 0x%08lx\n",
- info->ringReadPtrHandle);
-
- if (drmMap(ctx->drmFD, info->ringReadPtrHandle, info->ringReadMapSize,
- (drmAddressPtr)&info->ringReadPtr) < 0) {
- fprintf(stderr,
- "[pci] Could not map ring read ptr\n");
- return GL_FALSE;
- }
- fprintf(stderr,
- "[pci] Ring read ptr mapped at 0x%08lx\n",
- (unsigned long)info->ringReadPtr);
- fprintf(stderr,
- "[pci] Ring read ptr contents 0x%08lx\n",
- *(unsigned long *)info->ringReadPtr);
-
- if (drmAddMap(ctx->drmFD, info->bufStart, info->bufMapSize,
- DRM_SCATTER_GATHER, 0, &info->bufHandle) < 0) {
- fprintf(stderr,
- "[pci] Could not add vertex/indirect buffers mapping\n");
- return GL_FALSE;
- }
- fprintf(stderr,
- "[pci] vertex/indirect buffers handle = 0x%08lx\n",
- info->bufHandle);
-
- if (drmMap(ctx->drmFD, info->bufHandle, info->bufMapSize,
- (drmAddressPtr)&info->buf) < 0) {
- fprintf(stderr,
- "[pci] Could not map vertex/indirect buffers\n");
- return GL_FALSE;
- }
- fprintf(stderr,
- "[pci] Vertex/indirect buffers mapped at 0x%08lx\n",
- (unsigned long)info->buf);
- fprintf(stderr,
- "[pci] Vertex/indirect buffers contents 0x%08lx\n",
- *(unsigned long *)info->buf);
-
- if (!info->IsPCI) {
- /* This is really an AGP card, force PCI GART mode */
- chunk = INREG(R128_BM_CHUNK_0_VAL);
- chunk |= (R128_BM_PTR_FORCE_TO_PCI |
- R128_BM_PM4_RD_FORCE_TO_PCI |
- R128_BM_GLOBAL_FORCE_TO_PCI);
- OUTREG(R128_BM_CHUNK_0_VAL, chunk);
- OUTREG(R128_PCI_GART_PAGE, 0); /* Ensure PCI GART is used */
- }
-
- return GL_TRUE;
-}
-
-/* Add a map for the MMIO registers that will be accessed by any
- DRI-based clients. */
-static GLboolean R128DRIMapInit(const DRIDriverContext *ctx)
-{
- R128InfoPtr info = ctx->driverPrivate;
- int flags;
-
- if (info->CCESecure) flags = DRM_READ_ONLY;
- else flags = 0;
-
- /* Map registers */
- if (drmAddMap(ctx->drmFD, ctx->MMIOStart, ctx->MMIOSize,
- DRM_REGISTERS, flags, &info->registerHandle) < 0) {
- return GL_FALSE;
- }
- fprintf(stderr,
- "[drm] register handle = 0x%08x\n", info->registerHandle);
-
- return GL_TRUE;
-}
-
-/* Initialize the kernel data structures. */
-static int R128DRIKernelInit(const DRIDriverContext *ctx)
-{
- R128InfoPtr info = ctx->driverPrivate;
- drm_r128_init_t drmInfo;
-
- memset( &drmInfo, 0, sizeof(&drmInfo) );
-
- drmInfo.func = R128_INIT_CCE;
- drmInfo.sarea_priv_offset = sizeof(drm_sarea_t);
- drmInfo.is_pci = info->IsPCI;
- drmInfo.cce_mode = info->CCEMode;
- drmInfo.cce_secure = info->CCESecure;
- drmInfo.ring_size = info->ringSize*1024*1024;
- drmInfo.usec_timeout = info->CCEusecTimeout;
-
- drmInfo.fb_bpp = ctx->bpp;
- drmInfo.depth_bpp = ctx->bpp;
-
- drmInfo.front_offset = info->frontOffset;
- drmInfo.front_pitch = info->frontPitch;
-
- drmInfo.back_offset = info->backOffset;
- drmInfo.back_pitch = info->backPitch;
-
- drmInfo.depth_offset = info->depthOffset;
- drmInfo.depth_pitch = info->depthPitch;
- drmInfo.span_offset = info->spanOffset;
-
- drmInfo.fb_offset = info->LinearAddr;
- drmInfo.mmio_offset = info->registerHandle;
- drmInfo.ring_offset = info->ringHandle;
- drmInfo.ring_rptr_offset = info->ringReadPtrHandle;
- drmInfo.buffers_offset = info->bufHandle;
- drmInfo.agp_textures_offset = info->agpTexHandle;
-
- if (drmCommandWrite(ctx->drmFD, DRM_R128_INIT,
- &drmInfo, sizeof(drmInfo)) < 0)
- return GL_FALSE;
-
- return GL_TRUE;
-}
-
-/* Add a map for the vertex buffers that will be accessed by any
- DRI-based clients. */
-static GLboolean R128DRIBufInit(const DRIDriverContext *ctx)
-{
- R128InfoPtr info = ctx->driverPrivate;
- /* Initialize vertex buffers */
- if (info->IsPCI) {
- info->bufNumBufs = drmAddBufs(ctx->drmFD,
- info->bufMapSize / R128_BUFFER_SIZE,
- R128_BUFFER_SIZE,
- DRM_SG_BUFFER,
- info->bufStart);
- } else {
- info->bufNumBufs = drmAddBufs(ctx->drmFD,
- info->bufMapSize / R128_BUFFER_SIZE,
- R128_BUFFER_SIZE,
- DRM_AGP_BUFFER,
- info->bufStart);
- }
- if (info->bufNumBufs <= 0) {
- fprintf(stderr,
- "[drm] Could not create vertex/indirect buffers list\n");
- return GL_FALSE;
- }
- fprintf(stderr,
- "[drm] Added %d %d byte vertex/indirect buffers\n",
- info->bufNumBufs, R128_BUFFER_SIZE);
-
- if (!(info->buffers = drmMapBufs(ctx->drmFD))) {
- fprintf(stderr,
- "[drm] Failed to map vertex/indirect buffers list\n");
- return GL_FALSE;
- }
- fprintf(stderr,
- "[drm] Mapped %d vertex/indirect buffers\n",
- info->buffers->count);
-
- return GL_TRUE;
-}
-
-static void R128DRIIrqInit(const DRIDriverContext *ctx)
-{
- R128InfoPtr info = ctx->driverPrivate;
- unsigned char *R128MMIO = ctx->MMIOAddress;
-
- if (!info->irq) {
- info->irq = drmGetInterruptFromBusID(
- ctx->drmFD,
- ctx->pciBus,
- ctx->pciDevice,
- ctx->pciFunc);
-
- if((drmCtlInstHandler(ctx->drmFD, info->irq)) != 0) {
- fprintf(stderr,
- "[drm] failure adding irq handler, "
- "there is a device already using that irq\n"
- "[drm] falling back to irq-free operation\n");
- info->irq = 0;
- } else {
- info->gen_int_cntl = INREG( R128_GEN_INT_CNTL );
- }
- }
-
- if (info->irq)
- fprintf(stderr,
- "[drm] dma control initialized, using IRQ %d\n",
- info->irq);
-}
-
-static int R128CCEStop(const DRIDriverContext *ctx)
-{
- R128InfoPtr info = ctx->driverPrivate;
- drm_r128_cce_stop_t stop;
- int ret, i;
-
- stop.flush = 1;
- stop.idle = 1;
-
- ret = drmCommandWrite( ctx->drmFD, DRM_R128_CCE_STOP,
- &stop, sizeof(stop) );
-
- if ( ret == 0 ) {
- return 0;
- } else if ( errno != EBUSY ) {
- return -errno;
- }
-
- stop.flush = 0;
-
- i = 0;
- do {
- ret = drmCommandWrite( ctx->drmFD, DRM_R128_CCE_STOP,
- &stop, sizeof(stop) );
- } while ( ret && errno == EBUSY && i++ < R128_IDLE_RETRY );
-
- if ( ret == 0 ) {
- return 0;
- } else if ( errno != EBUSY ) {
- return -errno;
- }
-
- stop.idle = 0;
-
- if ( drmCommandWrite( ctx->drmFD, DRM_R128_CCE_STOP,
- &stop, sizeof(stop) )) {
- return -errno;
- } else {
- return 0;
- }
-}
-
-/* Initialize the CCE state, and start the CCE (if used by the X server) */
-static void R128DRICCEInit(const DRIDriverContext *ctx)
-{
- R128InfoPtr info = ctx->driverPrivate;
-
- /* Turn on bus mastering */
- info->BusCntl &= ~R128_BUS_MASTER_DIS;
-
- /* CCEMode is initialized in r128_driver.c */
- switch (info->CCEMode) {
- case R128_PM4_NONPM4: info->CCEFifoSize = 0; break;
- case R128_PM4_192PIO: info->CCEFifoSize = 192; break;
- case R128_PM4_192BM: info->CCEFifoSize = 192; break;
- case R128_PM4_128PIO_64INDBM: info->CCEFifoSize = 128; break;
- case R128_PM4_128BM_64INDBM: info->CCEFifoSize = 128; break;
- case R128_PM4_64PIO_128INDBM: info->CCEFifoSize = 64; break;
- case R128_PM4_64BM_128INDBM: info->CCEFifoSize = 64; break;
- case R128_PM4_64PIO_64VCBM_64INDBM: info->CCEFifoSize = 64; break;
- case R128_PM4_64BM_64VCBM_64INDBM: info->CCEFifoSize = 64; break;
- case R128_PM4_64PIO_64VCPIO_64INDPIO: info->CCEFifoSize = 64; break;
- }
-
- /* Make sure the CCE is on for the X server */
- R128CCE_START(ctx, info);
-}
-
-
-static int R128MemoryInit(const DRIDriverContext *ctx)
-{
- R128InfoPtr info = ctx->driverPrivate;
- int width_bytes = ctx->shared.virtualWidth * ctx->cpp;
- int cpp = ctx->cpp;
- int bufferSize = ((ctx->shared.virtualHeight * width_bytes
- + R128_BUFFER_ALIGN)
- & ~R128_BUFFER_ALIGN);
- int depthSize = ((((ctx->shared.virtualHeight+15) & ~15) * width_bytes
- + R128_BUFFER_ALIGN)
- & ~R128_BUFFER_ALIGN);
- int l;
-
- info->frontOffset = 0;
- info->frontPitch = ctx->shared.virtualWidth;
-
- fprintf(stderr,
- "Using %d MB AGP aperture\n", info->agpSize);
- fprintf(stderr,
- "Using %d MB for the ring buffer\n", info->ringSize);
- fprintf(stderr,
- "Using %d MB for vertex/indirect buffers\n", info->bufSize);
- fprintf(stderr,
- "Using %d MB for AGP textures\n", info->agpTexSize);
-
- /* Front, back and depth buffers - everything else texture??
- */
- info->textureSize = ctx->shared.fbSize - 2 * bufferSize - depthSize;
-
- if (info->textureSize < 0)
- return 0;
-
- l = R128MinBits((info->textureSize-1) / R128_NR_TEX_REGIONS);
- if (l < R128_LOG_TEX_GRANULARITY) l = R128_LOG_TEX_GRANULARITY;
-
- /* Round the texture size up to the nearest whole number of
- * texture regions. Again, be greedy about this, don't
- * round down.
- */
- info->log2TexGran = l;
- info->textureSize = (info->textureSize >> l) << l;
-
- /* Set a minimum usable local texture heap size. This will fit
- * two 256x256x32bpp textures.
- */
- if (info->textureSize < 512 * 1024) {
- info->textureOffset = 0;
- info->textureSize = 0;
- }
-
- /* Reserve space for textures */
- info->textureOffset = ((ctx->shared.fbSize - info->textureSize +
- R128_BUFFER_ALIGN) &
- ~R128_BUFFER_ALIGN);
-
- /* Reserve space for the shared depth
- * buffer.
- */
- info->depthOffset = ((info->textureOffset - depthSize +
- R128_BUFFER_ALIGN) &
- ~R128_BUFFER_ALIGN);
- info->depthPitch = ctx->shared.virtualWidth;
-
- info->backOffset = ((info->depthOffset - bufferSize +
- R128_BUFFER_ALIGN) &
- ~R128_BUFFER_ALIGN);
- info->backPitch = ctx->shared.virtualWidth;
-
-
- fprintf(stderr,
- "Will use back buffer at offset 0x%x\n",
- info->backOffset);
- fprintf(stderr,
- "Will use depth buffer at offset 0x%x\n",
- info->depthOffset);
- fprintf(stderr,
- "Will use %d kb for textures at offset 0x%x\n",
- info->textureSize/1024, info->textureOffset);
-
- return 1;
-}
-
-
-/* Initialize the screen-specific data structures for the DRI and the
- Rage 128. This is the main entry point to the device-specific
- initialization code. It calls device-independent DRI functions to
- create the DRI data structures and initialize the DRI state. */
-static GLboolean R128DRIScreenInit(DRIDriverContext *ctx)
-{
- R128InfoPtr info = ctx->driverPrivate;
- R128DRIPtr pR128DRI;
- int err, major, minor, patch;
- drmVersionPtr version;
- drm_r128_sarea_t *pSAREAPriv;
-
- switch (ctx->bpp) {
- case 8:
- /* These modes are not supported (yet). */
- case 15:
- case 24:
- fprintf(stderr,
- "[dri] R128DRIScreenInit failed (depth %d not supported). "
- "[dri] Disabling DRI.\n", ctx->bpp);
- return GL_FALSE;
-
- /* Only 16 and 32 color depths are supports currently. */
- case 16:
- case 32:
- break;
- }
- r128_drm_page_size = getpagesize();
-
- info->registerSize = ctx->MMIOSize;
- ctx->shared.SAREASize = SAREA_MAX;
-
- /* Note that drmOpen will try to load the kernel module, if needed. */
- ctx->drmFD = drmOpen("r128", NULL );
- if (ctx->drmFD < 0) {
- fprintf(stderr, "[drm] drmOpen failed\n");
- return 0;
- }
-
- /* Check the r128 DRM version */
- version = drmGetVersion(ctx->drmFD);
- if (version) {
- if (version->version_major != 2 ||
- version->version_minor < 2) {
- /* incompatible drm version */
- fprintf(stderr,
- "[dri] R128DRIScreenInit failed because of a version mismatch.\n"
- "[dri] r128.o kernel module version is %d.%d.%d but version 2.2 or greater is needed.\n"
- "[dri] Disabling the DRI.\n",
- version->version_major,
- version->version_minor,
- version->version_patchlevel);
- drmFreeVersion(version);
- return GL_FALSE;
- }
- info->drmMinor = version->version_minor;
- drmFreeVersion(version);
- }
-
- if ((err = drmSetBusid(ctx->drmFD, ctx->pciBusID)) < 0) {
- fprintf(stderr, "[drm] drmSetBusid failed (%d, %s), %s\n",
- ctx->drmFD, ctx->pciBusID, strerror(-err));
- return 0;
- }
-
- if (drmAddMap( ctx->drmFD,
- 0,
- ctx->shared.SAREASize,
- DRM_SHM,
- DRM_CONTAINS_LOCK,
- &ctx->shared.hSAREA) < 0)
- {
- fprintf(stderr, "[drm] drmAddMap failed\n");
- return 0;
- }
- fprintf(stderr, "[drm] added %d byte SAREA at 0x%08lx\n",
- ctx->shared.SAREASize, ctx->shared.hSAREA);
-
- if (drmMap( ctx->drmFD,
- ctx->shared.hSAREA,
- ctx->shared.SAREASize,
- (drmAddressPtr)(&ctx->pSAREA)) < 0)
- {
- fprintf(stderr, "[drm] drmMap failed\n");
- return 0;
- }
- memset(ctx->pSAREA, 0, ctx->shared.SAREASize);
- fprintf(stderr, "[drm] mapped SAREA 0x%08lx to %p, size %d\n",
- ctx->shared.hSAREA, ctx->pSAREA, ctx->shared.SAREASize);
-
- /* Need to AddMap the framebuffer and mmio regions here:
- */
- if (drmAddMap( ctx->drmFD,
- (drm_handle_t)ctx->FBStart,
- ctx->FBSize,
- DRM_FRAME_BUFFER,
- 0,
- &ctx->shared.hFrameBuffer) < 0)
- {
- fprintf(stderr, "[drm] drmAddMap framebuffer failed\n");
- return 0;
- }
-
- fprintf(stderr, "[drm] framebuffer handle = 0x%08lx\n",
- ctx->shared.hFrameBuffer);
-
- if (!R128MemoryInit(ctx))
- return GL_FALSE;
-
- /* Initialize AGP */
- if (!info->IsPCI && !R128DRIAgpInit(ctx)) {
- info->IsPCI = GL_TRUE;
- fprintf(stderr,
- "[agp] AGP failed to initialize -- falling back to PCI mode.\n");
- fprintf(stderr,
- "[agp] Make sure you have the agpgart kernel module loaded.\n");
- }
-
- /* Initialize PCIGART */
- if (info->IsPCI && !R128DRIPciInit(ctx)) {
- return GL_FALSE;
- }
-
- /* DRIScreenInit doesn't add all the
- common mappings. Add additional
- mappings here. */
- if (!R128DRIMapInit(ctx)) {
- return GL_FALSE;
- }
-
- /* Create a 'server' context so we can grab the lock for
- * initialization ioctls.
- */
- if ((err = drmCreateContext(ctx->drmFD, &ctx->serverContext)) != 0) {
- fprintf(stderr, "%s: drmCreateContext failed %d\n", __FUNCTION__, err);
- return 0;
- }
-
- DRM_LOCK(ctx->drmFD, ctx->pSAREA, ctx->serverContext, 0);
-
- /* Initialize the kernel data structures */
- if (!R128DRIKernelInit(ctx)) {
- return GL_FALSE;
- }
-
- /* Initialize the vertex buffers list */
- if (!R128DRIBufInit(ctx)) {
- return GL_FALSE;
- }
-
- /* Initialize IRQ */
- R128DRIIrqInit(ctx);
-
- /* Initialize and start the CCE if required */
- R128DRICCEInit(ctx);
-
- /* Quick hack to clear the front & back buffers. Could also use
- * the clear ioctl to do this, but would need to setup hw state
- * first.
- */
- drimemsetio((char *)ctx->FBAddress + info->frontOffset,
- 0,
- info->frontPitch * ctx->cpp * ctx->shared.virtualHeight );
-
- drimemsetio((char *)ctx->FBAddress + info->backOffset,
- 0,
- info->backPitch * ctx->cpp * ctx->shared.virtualHeight );
-
- pSAREAPriv = (drm_r128_sarea_t *)(((char*)ctx->pSAREA) +
- sizeof(drm_sarea_t));
- memset(pSAREAPriv, 0, sizeof(*pSAREAPriv));
-
- /* This is the struct passed to radeon_dri.so for its initialization */
- ctx->driverClientMsg = malloc(sizeof(R128DRIRec));
- ctx->driverClientMsgSize = sizeof(R128DRIRec);
-
- pR128DRI = (R128DRIPtr)ctx->driverClientMsg;
- pR128DRI->deviceID = info->Chipset;
- pR128DRI->width = ctx->shared.virtualWidth;
- pR128DRI->height = ctx->shared.virtualHeight;
- pR128DRI->depth = ctx->bpp;
- pR128DRI->bpp = ctx->bpp;
-
- pR128DRI->IsPCI = info->IsPCI;
- pR128DRI->AGPMode = info->agpMode;
-
- pR128DRI->frontOffset = info->frontOffset;
- pR128DRI->frontPitch = info->frontPitch;
- pR128DRI->backOffset = info->backOffset;
- pR128DRI->backPitch = info->backPitch;
- pR128DRI->depthOffset = info->depthOffset;
- pR128DRI->depthPitch = info->depthPitch;
- pR128DRI->spanOffset = info->spanOffset;
- pR128DRI->textureOffset = info->textureOffset;
- pR128DRI->textureSize = info->textureSize;
- pR128DRI->log2TexGran = info->log2TexGran;
-
- pR128DRI->registerHandle = info->registerHandle;
- pR128DRI->registerSize = info->registerSize;
-
- pR128DRI->agpTexHandle = info->agpTexHandle;
- pR128DRI->agpTexMapSize = info->agpTexMapSize;
- pR128DRI->log2AGPTexGran = info->log2AGPTexGran;
- pR128DRI->agpTexOffset = info->agpTexStart;
- pR128DRI->sarea_priv_offset = sizeof(drm_sarea_t);
-
- return GL_TRUE;
-}
-
-/* The screen is being closed, so clean up any state and free any
- resources used by the DRI. */
-void R128DRICloseScreen(const DRIDriverContext *ctx)
-{
- R128InfoPtr info = ctx->driverPrivate;
- drm_r128_init_t drmInfo;
-
- /* Stop the CCE if it is still in use */
- R128CCE_STOP(ctx, info);
-
- if (info->irq) {
- drmCtlUninstHandler(ctx->drmFD);
- info->irq = 0;
- }
-
- /* De-allocate vertex buffers */
- if (info->buffers) {
- drmUnmapBufs(info->buffers);
- info->buffers = NULL;
- }
-
- /* De-allocate all kernel resources */
- memset(&drmInfo, 0, sizeof(drmInfo));
- drmInfo.func = R128_CLEANUP_CCE;
- drmCommandWrite(ctx->drmFD, DRM_R128_INIT,
- &drmInfo, sizeof(drmInfo));
-
- /* De-allocate all AGP resources */
- if (info->agpTex) {
- drmUnmap(info->agpTex, info->agpTexMapSize);
- info->agpTex = NULL;
- }
- if (info->buf) {
- drmUnmap(info->buf, info->bufMapSize);
- info->buf = NULL;
- }
- if (info->ringReadPtr) {
- drmUnmap(info->ringReadPtr, info->ringReadMapSize);
- info->ringReadPtr = NULL;
- }
- if (info->ring) {
- drmUnmap(info->ring, info->ringMapSize);
- info->ring = NULL;
- }
- if (info->agpMemHandle != DRM_AGP_NO_HANDLE) {
- drmAgpUnbind(ctx->drmFD, info->agpMemHandle);
- drmAgpFree(ctx->drmFD, info->agpMemHandle);
- info->agpMemHandle = 0;
- drmAgpRelease(ctx->drmFD);
- }
- if (info->pciMemHandle) {
- drmScatterGatherFree(ctx->drmFD, info->pciMemHandle);
- info->pciMemHandle = 0;
- }
-}
-
-static GLboolean R128PreInitDRI(const DRIDriverContext *ctx)
-{
- R128InfoPtr info = ctx->driverPrivate;
-
- /*info->CCEMode = R128_DEFAULT_CCE_PIO_MODE;*/
- info->CCEMode = R128_DEFAULT_CCE_BM_MODE;
- info->CCESecure = GL_TRUE;
-
- info->agpMode = R128_DEFAULT_AGP_MODE;
- info->agpSize = R128_DEFAULT_AGP_SIZE;
- info->ringSize = R128_DEFAULT_RING_SIZE;
- info->bufSize = R128_DEFAULT_BUFFER_SIZE;
- info->agpTexSize = R128_DEFAULT_AGP_TEX_SIZE;
-
- info->CCEusecTimeout = R128_DEFAULT_CCE_TIMEOUT;
-
- return GL_TRUE;
-}
-
-/**
- * \brief Initialize the framebuffer device mode
- *
- * \param ctx display handle.
- *
- * \return one on success, or zero on failure.
- *
- * Fills in \p info with some default values and some information from \p ctx
- * and then calls R128ScreenInit() for the screen initialization.
- *
- * Before exiting clears the framebuffer memory accessing it directly.
- */
-static int R128InitFBDev( DRIDriverContext *ctx )
-{
- R128InfoPtr info = calloc(1, sizeof(*info));
-
- {
- int dummy = ctx->shared.virtualWidth;
-
- switch (ctx->bpp / 8) {
- case 1: dummy = (ctx->shared.virtualWidth + 127) & ~127; break;
- case 2: dummy = (ctx->shared.virtualWidth + 31) & ~31; break;
- case 3:
- case 4: dummy = (ctx->shared.virtualWidth + 15) & ~15; break;
- }
-
- ctx->shared.virtualWidth = dummy;
- }
-
- ctx->driverPrivate = (void *)info;
-
- info->Chipset = ctx->chipset;
-
- switch (info->Chipset) {
- case PCI_DEVICE_ID_ATI_RAGE128_LE:
- case PCI_DEVICE_ID_ATI_RAGE128_RE:
- case PCI_DEVICE_ID_ATI_RAGE128_RK:
- case PCI_DEVICE_ID_ATI_RAGE128_PD:
- case PCI_DEVICE_ID_ATI_RAGE128_PP:
- case PCI_DEVICE_ID_ATI_RAGE128_PR:
- /* This is a PCI card */
- info->IsPCI = GL_TRUE;
- break;
- default:
- /* This is an AGP card */
- info->IsPCI = GL_FALSE;
- break;
- }
-
- info->frontPitch = ctx->shared.virtualWidth;
- info->LinearAddr = ctx->FBStart & 0xfc000000;
-
- if (!R128PreInitDRI(ctx))
- return 0;
-
- if (!R128DRIScreenInit(ctx))
- return 0;
-
- return 1;
-}
-
-
-/**
- * \brief The screen is being closed, so clean up any state and free any
- * resources used by the DRI.
- *
- * \param ctx display handle.
- *
- * Unmaps the SAREA, closes the DRM device file descriptor and frees the driver
- * private data.
- */
-static void R128HaltFBDev( DRIDriverContext *ctx )
-{
- drmUnmap( ctx->pSAREA, ctx->shared.SAREASize );
- drmClose(ctx->drmFD);
-
- if (ctx->driverPrivate) {
- free(ctx->driverPrivate);
- ctx->driverPrivate = 0;
- }
-}
-
-
-/**
- * \brief Validate the fbdev mode.
- *
- * \param ctx display handle.
- *
- * \return one on success, or zero on failure.
- *
- * Saves some registers and returns 1.
- *
- * \sa R128PostValidateMode().
- */
-static int R128ValidateMode( const DRIDriverContext *ctx )
-{
- return 1;
-}
-
-
-/**
- * \brief Examine mode returned by fbdev.
- *
- * \param ctx display handle.
- *
- * \return one on success, or zero on failure.
- *
- * Restores registers that fbdev has clobbered and returns 1.
- *
- * \sa R128ValidateMode().
- */
-static int R128PostValidateMode( const DRIDriverContext *ctx )
-{
- return 1;
-}
-
-
-/**
- * \brief Shutdown the drawing engine.
- *
- * \param ctx display handle
- *
- * Turns off the command processor engine & restores the graphics card
- * to a state that fbdev understands.
- */
-static int R128EngineShutdown( const DRIDriverContext *ctx )
-{
- return 1;
-}
-
-/**
- * \brief Restore the drawing engine.
- *
- * \param ctx display handle
- *
- * Resets the graphics card and sets initial values for several registers of
- * the card's drawing engine.
- *
- * Turns on the R128 command processor engine (i.e., the ringbuffer).
- */
-static int R128EngineRestore( const DRIDriverContext *ctx )
-{
- return 1;
-}
-
-
-/**
- * \brief Exported driver interface for Mini GLX.
- *
- * \sa DRIDriverRec.
- */
-const struct DRIDriverRec __driDriver = {
- R128ValidateMode,
- R128PostValidateMode,
- R128InitFBDev,
- R128HaltFBDev,
- R128EngineShutdown,
- R128EngineRestore,
- 0,
-};
diff --git a/src/mesa/drivers/dri/r200/Makefile b/src/mesa/drivers/dri/r200/Makefile
index 14eb96c1ba..3f87100570 100644
--- a/src/mesa/drivers/dri/r200/Makefile
+++ b/src/mesa/drivers/dri/r200/Makefile
@@ -7,8 +7,6 @@ CFLAGS += $(RADEON_CFLAGS)
LIBNAME = r200_dri.so
-MINIGLX_SOURCES = server/radeon_dri.c
-
ifeq ($(RADEON_LDFLAGS),)
CS_SOURCES = radeon_cs_space_drm.c radeon_bo.c radeon_cs.c
endif
@@ -26,7 +24,9 @@ RADEON_COMMON_SOURCES = \
radeon_queryobj.c \
radeon_span.c \
radeon_texture.c \
- radeon_tex_copy.c
+ radeon_tex_copy.c \
+ radeon_tex_getimage.c \
+ radeon_tile.c
DRIVER_SOURCES = r200_context.c \
r200_ioctl.c \
diff --git a/src/mesa/drivers/dri/r200/r200_blit.c b/src/mesa/drivers/dri/r200/r200_blit.c
index e446d532cf..b56327dad5 100644
--- a/src/mesa/drivers/dri/r200/r200_blit.c
+++ b/src/mesa/drivers/dri/r200/r200_blit.c
@@ -38,7 +38,7 @@ static inline uint32_t cmdpacket0(struct radeon_screen *rscrn,
}
/* common formats supported as both textures and render targets */
-static unsigned is_blit_supported(gl_format mesa_format)
+unsigned r200_check_blit(gl_format mesa_format)
{
/* XXX others? BE/LE? */
switch (mesa_format) {
@@ -211,11 +211,15 @@ static GLboolean validate_buffers(struct r200_context *r200,
struct radeon_bo *dst_bo)
{
int ret;
- radeon_cs_space_add_persistent_bo(r200->radeon.cmdbuf.cs,
- src_bo, RADEON_GEM_DOMAIN_VRAM, 0);
+ ret = radeon_cs_space_check_with_bo(r200->radeon.cmdbuf.cs,
+ src_bo, RADEON_GEM_DOMAIN_VRAM, 0);
+ if (ret)
+ return GL_FALSE;
- radeon_cs_space_add_persistent_bo(r200->radeon.cmdbuf.cs,
- dst_bo, 0, RADEON_GEM_DOMAIN_VRAM);
+ ret = radeon_cs_space_check_with_bo(r200->radeon.cmdbuf.cs,
+ dst_bo, 0, RADEON_GEM_DOMAIN_VRAM);
+ if (ret)
+ return GL_FALSE;
ret = radeon_cs_space_check_with_bo(r200->radeon.cmdbuf.cs,
first_elem(&r200->radeon.dma.reserved)->bo,
@@ -333,7 +337,7 @@ unsigned r200_blit(GLcontext *ctx,
{
struct r200_context *r200 = R200_CONTEXT(ctx);
- if (!is_blit_supported(dst_mesaformat))
+ if (!r200_check_blit(dst_mesaformat))
return GL_FALSE;
/* Make sure that colorbuffer has even width - hw limitation */
diff --git a/src/mesa/drivers/dri/r200/r200_blit.h b/src/mesa/drivers/dri/r200/r200_blit.h
index 38487266ae..53206f0b47 100644
--- a/src/mesa/drivers/dri/r200/r200_blit.h
+++ b/src/mesa/drivers/dri/r200/r200_blit.h
@@ -30,6 +30,8 @@
void r200_blit_init(struct r200_context *r200);
+unsigned r200_check_blit(gl_format mesa_format);
+
unsigned r200_blit(GLcontext *ctx,
struct radeon_bo *src_bo,
intptr_t src_offset,
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c
index 6ecd46ecd9..dad2580e08 100644
--- a/src/mesa/drivers/dri/r200/r200_context.c
+++ b/src/mesa/drivers/dri/r200/r200_context.c
@@ -264,6 +264,7 @@ static void r200_init_vtbl(radeonContextPtr radeon)
radeon->vtbl.fallback = r200Fallback;
radeon->vtbl.update_scissor = r200_vtbl_update_scissor;
radeon->vtbl.emit_query_finish = r200_emit_query_finish;
+ radeon->vtbl.check_blit = r200_check_blit;
radeon->vtbl.blit = r200_blit;
}
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
index b9ec6f428f..050e5aa877 100644
--- a/src/mesa/drivers/dri/r200/r200_state.c
+++ b/src/mesa/drivers/dri/r200/r200_state.c
@@ -2501,7 +2501,6 @@ void r200InitStateFuncs( struct dd_function_table *functions )
functions->BlendFuncSeparate = r200BlendFuncSeparate;
functions->ClearColor = r200ClearColor;
functions->ClearDepth = r200ClearDepth;
- functions->ClearIndex = NULL;
functions->ClearStencil = r200ClearStencil;
functions->ClipPlane = r200ClipPlane;
functions->ColorMask = r200ColorMask;
@@ -2513,7 +2512,6 @@ void r200InitStateFuncs( struct dd_function_table *functions )
functions->Fogfv = r200Fogfv;
functions->FrontFace = r200FrontFace;
functions->Hint = NULL;
- functions->IndexMask = NULL;
functions->LightModelfv = r200LightModelfv;
functions->Lightfv = r200Lightfv;
functions->LineStipple = r200LineStipple;
diff --git a/src/mesa/drivers/dri/r200/r200_swtcl.c b/src/mesa/drivers/dri/r200/r200_swtcl.c
index e220e40b01..262fe3cdde 100644
--- a/src/mesa/drivers/dri/r200/r200_swtcl.c
+++ b/src/mesa/drivers/dri/r200/r200_swtcl.c
@@ -420,7 +420,6 @@ static struct {
#define DO_POINTS 1
#define DO_FULL_QUAD 1
-#define HAVE_RGBA 1
#define HAVE_SPEC 1
#define HAVE_BACK_COLORS 0
#define HAVE_HW_FLATSHADE 1
diff --git a/src/mesa/drivers/dri/r200/radeon_tex_getimage.c b/src/mesa/drivers/dri/r200/radeon_tex_getimage.c
new file mode 120000
index 0000000000..d9836d7326
--- /dev/null
+++ b/src/mesa/drivers/dri/r200/radeon_tex_getimage.c
@@ -0,0 +1 @@
+../radeon/radeon_tex_getimage.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r200/radeon_tile.c b/src/mesa/drivers/dri/r200/radeon_tile.c
new file mode 120000
index 0000000000..d4bfe27da6
--- /dev/null
+++ b/src/mesa/drivers/dri/r200/radeon_tile.c
@@ -0,0 +1 @@
+../radeon/radeon_tile.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r200/radeon_tile.h b/src/mesa/drivers/dri/r200/radeon_tile.h
new file mode 120000
index 0000000000..31074c581e
--- /dev/null
+++ b/src/mesa/drivers/dri/r200/radeon_tile.h
@@ -0,0 +1 @@
+../radeon/radeon_tile.h \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r200/server/radeon_dri.c b/src/mesa/drivers/dri/r200/server/radeon_dri.c
deleted file mode 120000
index d05847d650..0000000000
--- a/src/mesa/drivers/dri/r200/server/radeon_dri.c
+++ /dev/null
@@ -1 +0,0 @@
-../../radeon/server/radeon_dri.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r300/Makefile b/src/mesa/drivers/dri/r300/Makefile
index 04459c2ddf..4257a32b89 100644
--- a/src/mesa/drivers/dri/r300/Makefile
+++ b/src/mesa/drivers/dri/r300/Makefile
@@ -7,8 +7,6 @@ CFLAGS += $(RADEON_CFLAGS)
LIBNAME = r300_dri.so
-MINIGLX_SOURCES = server/radeon_dri.c
-
ifeq ($(RADEON_LDFLAGS),)
CS_SOURCES = radeon_cs_space_drm.c radeon_bo.c radeon_cs.c
endif
@@ -36,7 +34,9 @@ RADEON_COMMON_SOURCES = \
radeon_span.c \
radeon_queryobj.c \
radeon_texture.c \
- radeon_tex_copy.c
+ radeon_tex_copy.c \
+ radeon_tex_getimage.c \
+ radeon_tile.c
DRIVER_SOURCES = \
radeon_screen.c \
diff --git a/src/mesa/drivers/dri/r300/r300_blit.c b/src/mesa/drivers/dri/r300/r300_blit.c
index 54ac2510e7..d870c7f852 100644
--- a/src/mesa/drivers/dri/r300/r300_blit.c
+++ b/src/mesa/drivers/dri/r300/r300_blit.c
@@ -97,6 +97,7 @@ static void create_fragment_program(struct r300_context *r300)
struct r300_fragment_program_compiler compiler;
struct rc_instruction *inst;
+ memset(&compiler, 0, sizeof(struct r300_fragment_program_compiler));
rc_init(&compiler.Base);
inst = rc_insert_new_instruction(&compiler.Base, compiler.Base.Program.Instructions.Prev);
@@ -125,7 +126,8 @@ static void create_fragment_program(struct r300_context *r300)
void r300_blit_init(struct r300_context *r300)
{
- create_vertex_program(r300);
+ if (r300->options.hw_tcl_enabled)
+ create_vertex_program(r300);
create_fragment_program(r300);
}
@@ -340,8 +342,14 @@ static void emit_pvs_setup(struct r300_context *r300,
static void emit_vap_setup(struct r300_context *r300)
{
+ int tex_offset;
BATCH_LOCALS(&r300->radeon);
+ if (r300->options.hw_tcl_enabled)
+ tex_offset = 1;
+ else
+ tex_offset = 6;
+
BEGIN_BATCH(12);
OUT_BATCH_REGSEQ(R300_SE_VTE_CNTL, 2);
OUT_BATCH(R300_VTX_XY_FMT | R300_VTX_Z_FMT);
@@ -350,7 +358,7 @@ static void emit_vap_setup(struct r300_context *r300)
OUT_BATCH_REGVAL(R300_VAP_PSC_SGN_NORM_CNTL, 0xaaaaaaaa);
OUT_BATCH_REGVAL(R300_VAP_PROG_STREAM_CNTL_0,
((R300_DATA_TYPE_FLOAT_2 | (0 << R300_DST_VEC_LOC_SHIFT)) << 0) |
- (((1 << R300_DST_VEC_LOC_SHIFT) | R300_DATA_TYPE_FLOAT_2 | R300_LAST_VEC) << 16));
+ (((tex_offset << R300_DST_VEC_LOC_SHIFT) | R300_DATA_TYPE_FLOAT_2 | R300_LAST_VEC) << 16));
OUT_BATCH_REGVAL(R300_VAP_PROG_STREAM_CNTL_EXT_0,
((((R300_SWIZZLE_SELECT_X << R300_SWIZZLE_SELECT_X_SHIFT) |
(R300_SWIZZLE_SELECT_Y << R300_SWIZZLE_SELECT_Y_SHIFT) |
@@ -373,15 +381,16 @@ static GLboolean validate_buffers(struct r300_context *r300,
struct radeon_bo *dst_bo)
{
int ret;
- radeon_cs_space_add_persistent_bo(r300->radeon.cmdbuf.cs,
- src_bo, RADEON_GEM_DOMAIN_VRAM, 0);
- radeon_cs_space_add_persistent_bo(r300->radeon.cmdbuf.cs,
- dst_bo, 0, RADEON_GEM_DOMAIN_VRAM);
+ radeon_cs_space_reset_bos(r300->radeon.cmdbuf.cs);
ret = radeon_cs_space_check_with_bo(r300->radeon.cmdbuf.cs,
- first_elem(&r300->radeon.dma.reserved)->bo,
- RADEON_GEM_DOMAIN_GTT, 0);
+ src_bo, RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT, 0);
+ if (ret)
+ return GL_FALSE;
+
+ ret = radeon_cs_space_check_with_bo(r300->radeon.cmdbuf.cs,
+ dst_bo, 0, RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT);
if (ret)
return GL_FALSE;
@@ -445,7 +454,7 @@ static void other_stuff(struct r300_context *r300)
{
BATCH_LOCALS(&r300->radeon);
- BEGIN_BATCH(15);
+ BEGIN_BATCH(13);
OUT_BATCH_REGVAL(R300_GA_POLY_MODE,
R300_GA_POLY_MODE_FRONT_PTYPE_TRI | R300_GA_POLY_MODE_BACK_PTYPE_TRI);
OUT_BATCH_REGVAL(R300_SU_CULL_MODE, R300_FRONT_FACE_CCW);
@@ -454,9 +463,13 @@ static void other_stuff(struct r300_context *r300)
OUT_BATCH_REGSEQ(R300_RB3D_CBLEND, 2);
OUT_BATCH(0x0);
OUT_BATCH(0x0);
- OUT_BATCH_REGVAL(R300_VAP_CLIP_CNTL, R300_CLIP_DISABLE);
OUT_BATCH_REGVAL(R300_ZB_CNTL, 0);
END_BATCH();
+ if (r300->options.hw_tcl_enabled) {
+ BEGIN_BATCH(2);
+ OUT_BATCH_REGVAL(R300_VAP_CLIP_CNTL, R300_CLIP_DISABLE);
+ END_BATCH();
+ }
}
static void emit_cb_setup(struct r300_context *r300,
@@ -494,7 +507,7 @@ static void emit_cb_setup(struct r300_context *r300,
END_BATCH();
}
-static unsigned is_blit_supported(gl_format dst_format)
+unsigned r300_check_blit(gl_format dst_format)
{
switch (dst_format) {
case MESA_FORMAT_RGB565:
@@ -562,7 +575,7 @@ unsigned r300_blit(GLcontext *ctx,
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
- if (!is_blit_supported(dst_mesaformat))
+ if (!r300_check_blit(dst_mesaformat))
return 0;
/* Make sure that colorbuffer has even width - hw limitation */
@@ -629,7 +642,9 @@ unsigned r300_blit(GLcontext *ctx,
r300_emit_rs_setup(r300);
}
- emit_pvs_setup(r300, r300->blit.vp_code.body.d, 2);
+ if (r300->options.hw_tcl_enabled)
+ emit_pvs_setup(r300, r300->blit.vp_code.body.d, 2);
+
emit_vap_setup(r300);
emit_cb_setup(r300, dst_bo, dst_offset, dst_mesaformat, dst_pitch, dst_width, dst_height);
diff --git a/src/mesa/drivers/dri/r300/r300_blit.h b/src/mesa/drivers/dri/r300/r300_blit.h
index 735acaddd7..39b157a57b 100644
--- a/src/mesa/drivers/dri/r300/r300_blit.h
+++ b/src/mesa/drivers/dri/r300/r300_blit.h
@@ -30,6 +30,8 @@
void r300_blit_init(struct r300_context *r300);
+unsigned r300_check_blit(gl_format mesa_format);
+
unsigned r300_blit(GLcontext *ctx,
struct radeon_bo *src_bo,
intptr_t src_offset,
@@ -51,4 +53,4 @@ unsigned r300_blit(GLcontext *ctx,
unsigned reg_height,
unsigned flip_y);
-#endif // R300_BLIT_H \ No newline at end of file
+#endif // R300_BLIT_H
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
index 4787bafc66..6cfa5686f4 100644
--- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c
+++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
@@ -90,8 +90,7 @@ void r300_emit_vpu(struct r300_context *r300,
{
BATCH_LOCALS(&r300->radeon);
- BEGIN_BATCH_NO_AUTOSTATE(5 + len);
- OUT_BATCH_REGVAL(R300_VAP_PVS_STATE_FLUSH_REG, 0);
+ BEGIN_BATCH_NO_AUTOSTATE(3 + len);
OUT_BATCH_REGVAL(R300_VAP_PVS_VECTOR_INDX_REG, addr);
OUT_BATCH(CP_PACKET0(R300_VAP_PVS_UPLOAD_DATA, len-1) | RADEON_ONE_REG_WR);
OUT_BATCH_TABLE(data, len);
@@ -778,24 +777,6 @@ void r300InitCmdBuf(r300ContextPtr r300)
/* VPU only on TCL */
if (has_tcl) {
int i;
- if (r300->radeon.radeonScreen->kernel_mm) {
- ALLOC_STATE(vap_flush, always, 10, 0);
- /* flush processing vertices */
- r300->hw.vap_flush.cmd[0] = cmdpacket0(r300->radeon.radeonScreen, R300_SC_SCREENDOOR, 1);
- r300->hw.vap_flush.cmd[1] = 0;
- r300->hw.vap_flush.cmd[2] = cmdpacket0(r300->radeon.radeonScreen, R300_RB3D_DSTCACHE_CTLSTAT, 1);
- r300->hw.vap_flush.cmd[3] = R300_RB3D_DSTCACHE_CTLSTAT_DC_FLUSH_FLUSH_DIRTY_3D;
- r300->hw.vap_flush.cmd[4] = cmdpacket0(r300->radeon.radeonScreen, RADEON_WAIT_UNTIL, 1);
- r300->hw.vap_flush.cmd[5] = RADEON_WAIT_3D_IDLECLEAN;
- r300->hw.vap_flush.cmd[6] = cmdpacket0(r300->radeon.radeonScreen, R300_SC_SCREENDOOR, 1);
- r300->hw.vap_flush.cmd[7] = 0xffffff;
- r300->hw.vap_flush.cmd[8] = cmdpacket0(r300->radeon.radeonScreen, R300_VAP_PVS_STATE_FLUSH_REG, 1);
- r300->hw.vap_flush.cmd[9] = 0;
- } else {
- ALLOC_STATE(vap_flush, never, 10, 0);
- }
-
-
ALLOC_STATE(vpi, vpu, R300_VPI_CMDSIZE, 0);
r300->hw.vpi.cmd[0] =
cmdvpu(r300->radeon.radeonScreen, R300_PVS_CODE_START, 0);
diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c
index fe2ed22dc2..ff35cd5275 100644
--- a/src/mesa/drivers/dri/r300/r300_context.c
+++ b/src/mesa/drivers/dri/r300/r300_context.c
@@ -109,7 +109,6 @@ static const struct dri_extension card_extensions[] = {
{"GL_EXT_blend_func_separate", GL_EXT_blend_func_separate_functions},
{"GL_EXT_blend_minmax", GL_EXT_blend_minmax_functions},
{"GL_EXT_blend_subtract", NULL},
- {"GL_EXT_packed_depth_stencil", NULL},
{"GL_EXT_fog_coord", GL_EXT_fog_coord_functions },
{"GL_EXT_gpu_program_parameters", GL_EXT_gpu_program_parameters_functions},
{"GL_EXT_provoking_vertex", GL_EXT_provoking_vertex_functions },
@@ -320,7 +319,8 @@ static void r300_init_vtbl(radeonContextPtr radeon)
} else
radeon->vtbl.emit_query_finish = r300_emit_query_finish;
- radeon->vtbl.blit = r300_blit;
+ radeon->vtbl.check_blit = r300_check_blit;
+ radeon->vtbl.blit = r300_blit;
}
static void r300InitConstValues(GLcontext *ctx, radeonScreenPtr screen)
@@ -455,6 +455,9 @@ static void r300InitGLExtensions(GLcontext *ctx)
}
if (r300->radeon.radeonScreen->chip_family >= CHIP_FAMILY_RV350)
_mesa_enable_extension(ctx, "GL_ARB_half_float_vertex");
+
+ if (r300->radeon.radeonScreen->chip_family >= CHIP_FAMILY_RV515)
+ _mesa_enable_extension(ctx, "GL_EXT_packed_depth_stencil");
}
static void r300InitIoctlFuncs(struct dd_function_table *functions)
diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h
index 78ab43a99f..df7115e7da 100644
--- a/src/mesa/drivers/dri/r300/r300_context.h
+++ b/src/mesa/drivers/dri/r300/r300_context.h
@@ -355,7 +355,6 @@ struct r300_hw_state {
struct radeon_state_atom zb_hiz_offset; /* (4F44) */
struct radeon_state_atom zb_hiz_pitch; /* (4F54) */
- struct radeon_state_atom vap_flush;
struct radeon_state_atom vpi; /* vp instructions */
struct radeon_state_atom vpp; /* vp parameters */
struct radeon_state_atom vps; /* vertex point size (?) */
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index 9d1ff6e2ba..5979dedac4 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -366,7 +366,6 @@ static void r300ClipPlane( GLcontext *ctx, GLenum plane, const GLfloat *eq )
p = (GLint) plane - (GLint) GL_CLIP_PLANE0;
ip = (GLint *)ctx->Transform._ClipUserPlane[p];
- R300_STATECHANGE( rmesa, vap_flush );
R300_STATECHANGE( rmesa, vpucp[p] );
rmesa->hw.vpucp[p].cmd[R300_VPUCP_X] = ip[0];
rmesa->hw.vpucp[p].cmd[R300_VPUCP_Y] = ip[1];
@@ -794,12 +793,14 @@ static void r300PointParameter(GLcontext * ctx, GLenum pname, const GLfloat * pa
R300_STATECHANGE(r300, ga_point_minmax);
r300->hw.ga_point_minmax.cmd[1] &= ~R300_GA_POINT_MINMAX_MIN_MASK;
r300->hw.ga_point_minmax.cmd[1] |= (GLuint)(ctx->Point.MinSize * 6.0);
+ r300PointSize(ctx, ctx->Point.Size);
break;
case GL_POINT_SIZE_MAX:
R300_STATECHANGE(r300, ga_point_minmax);
r300->hw.ga_point_minmax.cmd[1] &= ~R300_GA_POINT_MINMAX_MAX_MASK;
r300->hw.ga_point_minmax.cmd[1] |= (GLuint)(ctx->Point.MaxSize * 6.0)
<< R300_GA_POINT_MINMAX_MAX_SHIFT;
+ r300PointSize(ctx, ctx->Point.Size);
break;
case GL_POINT_DISTANCE_ATTENUATION:
break;
@@ -1762,8 +1763,6 @@ static void r300ResetHwState(r300ContextPtr r300)
if (RADEON_DEBUG & RADEON_STATE)
fprintf(stderr, "%s\n", __FUNCTION__);
- radeon_firevertices(&r300->radeon);
-
r300ColorMask(ctx,
ctx->Color.ColorMask[0][RCOMP],
ctx->Color.ColorMask[0][GCOMP],
@@ -1985,23 +1984,6 @@ void r300UpdateShaders(r300ContextPtr rmesa)
if (rmesa->options.hw_tcl_enabled) {
struct r300_vertex_program *vp;
- if (rmesa->radeon.NewGLState) {
- int i;
- for (i = _TNL_FIRST_MAT; i <= _TNL_LAST_MAT; i++) {
- rmesa->temp_attrib[i] =
- TNL_CONTEXT(ctx)->vb.AttribPtr[i];
- TNL_CONTEXT(ctx)->vb.AttribPtr[i] =
- &rmesa->dummy_attrib[i];
- }
-
- _tnl_UpdateFixedFunctionProgram(ctx);
-
- for (i = _TNL_FIRST_MAT; i <= _TNL_LAST_MAT; i++) {
- TNL_CONTEXT(ctx)->vb.AttribPtr[i] =
- rmesa->temp_attrib[i];
- }
- }
-
vp = r300SelectAndTranslateVertexShader(ctx);
r300SwitchFallback(ctx, R300_FALLBACK_VERTEX_PROGRAM, vp->error);
diff --git a/src/mesa/drivers/dri/r300/r300_swtcl.c b/src/mesa/drivers/dri/r300/r300_swtcl.c
index 93983cee20..4dcc7cb022 100644
--- a/src/mesa/drivers/dri/r300/r300_swtcl.c
+++ b/src/mesa/drivers/dri/r300/r300_swtcl.c
@@ -364,7 +364,6 @@ static struct {
#define DO_POINTS 1
#define DO_FULL_QUAD 1
-#define HAVE_RGBA 1
#define HAVE_SPEC 1
#define HAVE_BACK_COLORS 0
#define HAVE_HW_FLATSHADE 1
diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c
index cbe4cb8304..129004fee7 100644
--- a/src/mesa/drivers/dri/r300/r300_vertprog.c
+++ b/src/mesa/drivers/dri/r300/r300_vertprog.c
@@ -342,8 +342,6 @@ static void r300EmitVertexProgram(r300ContextPtr r300, int dest, struct r300_ver
assert((code->length > 0) && (code->length % 4 == 0));
- R300_STATECHANGE( r300, vap_flush );
-
switch ((dest >> 8) & 0xf) {
case 0:
R300_STATECHANGE(r300, vpi);
@@ -381,7 +379,7 @@ void r300SetupVertexProgram(r300ContextPtr rmesa)
((drm_r300_cmd_header_t *) rmesa->hw.vpi.cmd)->vpu.count = 0;
((drm_r300_cmd_header_t *) rmesa->hw.vps.cmd)->vpu.count = 0;
- R300_STATECHANGE(rmesa, vap_flush);
+ R300_STATECHANGE(rmesa, vap_cntl);
R300_STATECHANGE(rmesa, vpp);
param_count = r300VertexProgUpdateParams(ctx, prog, (float *)&rmesa->hw.vpp.cmd[R300_VPP_PARAM_0]);
bump_vpu_count(rmesa->hw.vpp.cmd, param_count);
diff --git a/src/mesa/drivers/dri/r300/radeon_tex_getimage.c b/src/mesa/drivers/dri/r300/radeon_tex_getimage.c
new file mode 120000
index 0000000000..d9836d7326
--- /dev/null
+++ b/src/mesa/drivers/dri/r300/radeon_tex_getimage.c
@@ -0,0 +1 @@
+../radeon/radeon_tex_getimage.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r300/radeon_tile.c b/src/mesa/drivers/dri/r300/radeon_tile.c
new file mode 120000
index 0000000000..d4bfe27da6
--- /dev/null
+++ b/src/mesa/drivers/dri/r300/radeon_tile.c
@@ -0,0 +1 @@
+../radeon/radeon_tile.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r300/radeon_tile.h b/src/mesa/drivers/dri/r300/radeon_tile.h
new file mode 120000
index 0000000000..31074c581e
--- /dev/null
+++ b/src/mesa/drivers/dri/r300/radeon_tile.h
@@ -0,0 +1 @@
+../radeon/radeon_tile.h \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r300/server/radeon_dri.c b/src/mesa/drivers/dri/r300/server/radeon_dri.c
deleted file mode 120000
index d05847d650..0000000000
--- a/src/mesa/drivers/dri/r300/server/radeon_dri.c
+++ /dev/null
@@ -1 +0,0 @@
-../../radeon/server/radeon_dri.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r600/Makefile b/src/mesa/drivers/dri/r600/Makefile
index 5d50941539..f76859d11e 100644
--- a/src/mesa/drivers/dri/r600/Makefile
+++ b/src/mesa/drivers/dri/r600/Makefile
@@ -7,8 +7,6 @@ CFLAGS += $(RADEON_CFLAGS)
LIBNAME = r600_dri.so
-MINIGLX_SOURCES = server/radeon_dri.c
-
ifeq ($(RADEON_LDFLAGS),)
CS_SOURCES = radeon_cs_space_drm.c radeon_bo.c radeon_cs.c
endif
@@ -36,7 +34,9 @@ RADEON_COMMON_SOURCES = \
radeon_span.c \
radeon_texture.c \
radeon_queryobj.c \
- radeon_tex_copy.c
+ radeon_tex_copy.c \
+ radeon_tex_getimage.c \
+ radeon_tile.c
DRIVER_SOURCES = \
radeon_screen.c \
diff --git a/src/mesa/drivers/dri/r600/r600_blit.c b/src/mesa/drivers/dri/r600/r600_blit.c
index 4bb77a398f..9d17463cae 100644
--- a/src/mesa/drivers/dri/r600/r600_blit.c
+++ b/src/mesa/drivers/dri/r600/r600_blit.c
@@ -33,7 +33,7 @@
#include "r600_cmdbuf.h"
/* common formats supported as both textures and render targets */
-static unsigned is_blit_supported(gl_format mesa_format)
+unsigned r600_check_blit(gl_format mesa_format)
{
switch (mesa_format) {
case MESA_FORMAT_RGBA8888:
@@ -1532,14 +1532,16 @@ static GLboolean validate_buffers(context_t *rmesa,
struct radeon_bo *dst_bo)
{
int ret;
- radeon_cs_space_add_persistent_bo(rmesa->radeon.cmdbuf.cs,
- src_bo, RADEON_GEM_DOMAIN_VRAM, 0);
- radeon_cs_space_add_persistent_bo(rmesa->radeon.cmdbuf.cs,
- dst_bo, 0, RADEON_GEM_DOMAIN_VRAM);
+ ret = radeon_cs_space_check_with_bo(rmesa->radeon.cmdbuf.cs,
+ src_bo, RADEON_GEM_DOMAIN_VRAM, 0);
+ if (ret)
+ return GL_FALSE;
- radeon_cs_space_add_persistent_bo(rmesa->radeon.cmdbuf.cs,
- rmesa->blit_bo, RADEON_GEM_DOMAIN_GTT, 0);
+ ret = radeon_cs_space_check_with_bo(rmesa->radeon.cmdbuf.cs,
+ dst_bo, 0, RADEON_GEM_DOMAIN_VRAM);
+ if (ret)
+ return GL_FALSE;
ret = radeon_cs_space_check_with_bo(rmesa->radeon.cmdbuf.cs,
rmesa->blit_bo,
@@ -1580,7 +1582,7 @@ unsigned r600_blit(GLcontext *ctx,
context_t *context = R700_CONTEXT(ctx);
int id = 0;
- if (!is_blit_supported(dst_mesaformat))
+ if (!r600_check_blit(dst_mesaformat))
return GL_FALSE;
if (src_bo == dst_bo) {
diff --git a/src/mesa/drivers/dri/r600/r600_blit.h b/src/mesa/drivers/dri/r600/r600_blit.h
index f280e23489..d56b21ba9b 100644
--- a/src/mesa/drivers/dri/r600/r600_blit.h
+++ b/src/mesa/drivers/dri/r600/r600_blit.h
@@ -1,3 +1,35 @@
+/*
+ * Copyright (C) 2009 Advanced Micro Devices, 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 (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.
+ *
+ */
+
+#ifndef R600_BLIT_H
+#define R600_BLIT_H
+
+unsigned r600_check_blit(gl_format mesa_format);
+
unsigned r600_blit(GLcontext *ctx,
struct radeon_bo *src_bo,
intptr_t src_offset,
@@ -19,3 +51,4 @@ unsigned r600_blit(GLcontext *ctx,
unsigned h,
unsigned flip_y);
+#endif // R600_BLIT_H
diff --git a/src/mesa/drivers/dri/r600/r600_context.c b/src/mesa/drivers/dri/r600/r600_context.c
index 1a4b014d9f..3d6802e735 100644
--- a/src/mesa/drivers/dri/r600/r600_context.c
+++ b/src/mesa/drivers/dri/r600/r600_context.c
@@ -236,6 +236,7 @@ static void r600_init_vtbl(radeonContextPtr radeon)
radeon->vtbl.pre_emit_atoms = r600_vtbl_pre_emit_atoms;
radeon->vtbl.fallback = r600_fallback;
radeon->vtbl.emit_query_finish = r600_emit_query_finish;
+ radeon->vtbl.check_blit = r600_check_blit;
radeon->vtbl.blit = r600_blit;
}
diff --git a/src/mesa/drivers/dri/r600/r700_render.c b/src/mesa/drivers/dri/r600/r700_render.c
index 1d7a94cbb2..1929b7cc12 100644
--- a/src/mesa/drivers/dri/r600/r700_render.c
+++ b/src/mesa/drivers/dri/r600/r700_render.c
@@ -829,11 +829,10 @@ static void r700SetupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer
#if MESA_BIG_ENDIAN
if (mesa_ind_buf->type == GL_UNSIGNED_INT)
- {
#else
if (mesa_ind_buf->type != GL_UNSIGNED_BYTE)
- {
#endif
+ {
const GLvoid *src_ptr;
GLvoid *dst_ptr;
GLboolean mapped_named_bo = GL_FALSE;
@@ -872,6 +871,14 @@ static void r700SetupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer
}
}
+static GLboolean check_fallbacks(GLcontext *ctx)
+{
+ if (ctx->RenderMode != GL_RENDER)
+ return GL_TRUE;
+
+ return GL_FALSE;
+}
+
static GLboolean r700TryDrawPrims(GLcontext *ctx,
const struct gl_client_array *arrays[],
const struct _mesa_prim *prim,
@@ -888,6 +895,9 @@ static GLboolean r700TryDrawPrims(GLcontext *ctx,
if (ctx->NewState)
_mesa_update_state( ctx );
+ if (check_fallbacks(ctx))
+ return GL_FALSE;
+
_tnl_UpdateFixedFunctionProgram(ctx);
r700SetVertexFormat(ctx, arrays, max_index + 1);
/* shaders need to be updated before buffers are validated */
@@ -983,8 +993,10 @@ static void r700DrawPrims(GLcontext *ctx,
retval = r700TryDrawPrims(ctx, arrays, prim, nr_prims, ib, min_index, max_index);
/* If failed run tnl pipeline - it should take care of fallbacks */
- if (!retval)
+ if (!retval) {
+ _swsetup_Wakeup(ctx);
_tnl_draw_prims(ctx, arrays, prim, nr_prims, ib, min_index, max_index);
+ }
}
void r700InitDraw(GLcontext *ctx)
diff --git a/src/mesa/drivers/dri/r600/radeon_tex_getimage.c b/src/mesa/drivers/dri/r600/radeon_tex_getimage.c
new file mode 120000
index 0000000000..d9836d7326
--- /dev/null
+++ b/src/mesa/drivers/dri/r600/radeon_tex_getimage.c
@@ -0,0 +1 @@
+../radeon/radeon_tex_getimage.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r600/radeon_tile.c b/src/mesa/drivers/dri/r600/radeon_tile.c
new file mode 120000
index 0000000000..d4bfe27da6
--- /dev/null
+++ b/src/mesa/drivers/dri/r600/radeon_tile.c
@@ -0,0 +1 @@
+../radeon/radeon_tile.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r600/radeon_tile.h b/src/mesa/drivers/dri/r600/radeon_tile.h
new file mode 120000
index 0000000000..31074c581e
--- /dev/null
+++ b/src/mesa/drivers/dri/r600/radeon_tile.h
@@ -0,0 +1 @@
+../radeon/radeon_tile.h \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r600/server/radeon_dri.c b/src/mesa/drivers/dri/r600/server/radeon_dri.c
deleted file mode 120000
index d05847d650..0000000000
--- a/src/mesa/drivers/dri/r600/server/radeon_dri.c
+++ /dev/null
@@ -1 +0,0 @@
-../../radeon/server/radeon_dri.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/radeon/Makefile b/src/mesa/drivers/dri/radeon/Makefile
index a54ea16ec6..6904ebbee3 100644
--- a/src/mesa/drivers/dri/radeon/Makefile
+++ b/src/mesa/drivers/dri/radeon/Makefile
@@ -8,8 +8,6 @@ CFLAGS += $(RADEON_CFLAGS)
LIBNAME = radeon_dri.so
-MINIGLX_SOURCES = server/radeon_dri.c
-
ifeq ($(RADEON_LDFLAGS),)
CS_SOURCES = radeon_cs_space_drm.c radeon_bo.c radeon_cs.c
endif
@@ -27,7 +25,9 @@ RADEON_COMMON_SOURCES = \
radeon_queryobj.c \
radeon_span.c \
radeon_texture.c \
- radeon_tex_copy.c
+ radeon_tex_copy.c \
+ radeon_tex_getimage.c \
+ radeon_tile.c
DRIVER_SOURCES = \
radeon_context.c \
diff --git a/src/mesa/drivers/dri/radeon/radeon_blit.c b/src/mesa/drivers/dri/radeon/radeon_blit.c
index 0df4fbb33c..e188a122d5 100644
--- a/src/mesa/drivers/dri/radeon/radeon_blit.c
+++ b/src/mesa/drivers/dri/radeon/radeon_blit.c
@@ -38,7 +38,7 @@ static inline uint32_t cmdpacket0(struct radeon_screen *rscrn,
}
/* common formats supported as both textures and render targets */
-static unsigned is_blit_supported(gl_format mesa_format)
+unsigned r100_check_blit(gl_format mesa_format)
{
/* XXX others? BE/LE? */
switch (mesa_format) {
@@ -204,11 +204,15 @@ static GLboolean validate_buffers(struct r100_context *r100,
struct radeon_bo *dst_bo)
{
int ret;
- radeon_cs_space_add_persistent_bo(r100->radeon.cmdbuf.cs,
- src_bo, RADEON_GEM_DOMAIN_VRAM, 0);
+ ret = radeon_cs_space_check_with_bo(r100->radeon.cmdbuf.cs,
+ src_bo, RADEON_GEM_DOMAIN_VRAM, 0);
+ if (ret)
+ return GL_FALSE;
- radeon_cs_space_add_persistent_bo(r100->radeon.cmdbuf.cs,
- dst_bo, 0, RADEON_GEM_DOMAIN_VRAM);
+ ret = radeon_cs_space_check_with_bo(r100->radeon.cmdbuf.cs,
+ dst_bo, 0, RADEON_GEM_DOMAIN_VRAM);
+ if (ret)
+ return GL_FALSE;
ret = radeon_cs_space_check_with_bo(r100->radeon.cmdbuf.cs,
first_elem(&r100->radeon.dma.reserved)->bo,
@@ -329,7 +333,7 @@ unsigned r100_blit(GLcontext *ctx,
{
struct r100_context *r100 = R100_CONTEXT(ctx);
- if (!is_blit_supported(dst_mesaformat))
+ if (!r100_check_blit(dst_mesaformat))
return GL_FALSE;
/* Make sure that colorbuffer has even width - hw limitation */
diff --git a/src/mesa/drivers/dri/radeon/radeon_blit.h b/src/mesa/drivers/dri/radeon/radeon_blit.h
index d36366ff79..d7d0b5554a 100644
--- a/src/mesa/drivers/dri/radeon/radeon_blit.h
+++ b/src/mesa/drivers/dri/radeon/radeon_blit.h
@@ -30,6 +30,8 @@
void r100_blit_init(struct r100_context *r100);
+unsigned r100_check_blit(gl_format mesa_format);
+
unsigned r100_blit(GLcontext *ctx,
struct radeon_bo *src_bo,
intptr_t src_offset,
diff --git a/src/mesa/drivers/dri/radeon/radeon_chipset.h b/src/mesa/drivers/dri/radeon/radeon_chipset.h
index 46a9cd5ff8..f17a305bce 100644
--- a/src/mesa/drivers/dri/radeon/radeon_chipset.h
+++ b/src/mesa/drivers/dri/radeon/radeon_chipset.h
@@ -340,6 +340,7 @@
#define PCI_CHIP_RS880_9712 0x9712
#define PCI_CHIP_RS880_9713 0x9713
#define PCI_CHIP_RS880_9714 0x9714
+#define PCI_CHIP_RS880_9715 0x9715
#define PCI_CHIP_RV770_9440 0x9440
#define PCI_CHIP_RV770_9441 0x9441
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index 79f3ff7da6..13f1f0611b 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -1325,11 +1325,6 @@ void rcommonBeginBatch(radeonContextPtr rmesa, int n,
const char *function,
int line)
{
- if (!rmesa->cmdbuf.cs->cdw && dostate) {
- radeon_print(RADEON_STATE, RADEON_NORMAL,
- "Reemit state after flush (from %s)\n", function);
- radeonEmitState(rmesa);
- }
radeon_cs_begin(rmesa->cmdbuf.cs, n, file, function, line);
radeon_print(RADEON_CS, RADEON_VERBOSE, "BEGIN_BATCH(%d) at %d, from %s:%i\n",
diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.h b/src/mesa/drivers/dri/radeon/radeon_common_context.h
index e397ee8c22..d1a24e265f 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.h
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.h
@@ -518,6 +518,7 @@ struct radeon_context {
void (*free_context)(GLcontext *ctx);
void (*emit_query_finish)(radeonContextPtr radeon);
void (*update_scissor)(GLcontext *ctx);
+ unsigned (*check_blit)(gl_format mesa_format);
unsigned (*blit)(GLcontext *ctx,
struct radeon_bo *src_bo,
intptr_t src_offset,
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c
index 4625af14ad..878a453bd5 100644
--- a/src/mesa/drivers/dri/radeon/radeon_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_context.c
@@ -198,6 +198,7 @@ static void r100_init_vtbl(radeonContextPtr radeon)
radeon->vtbl.fallback = radeonFallback;
radeon->vtbl.free_context = r100_vtbl_free_context;
radeon->vtbl.emit_query_finish = r100_emit_query_finish;
+ radeon->vtbl.check_blit = r100_check_blit;
radeon->vtbl.blit = r100_blit;
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_dma.c b/src/mesa/drivers/dri/radeon/radeon_dma.c
index d31e4e47dd..22499bc38d 100644
--- a/src/mesa/drivers/dri/radeon/radeon_dma.c
+++ b/src/mesa/drivers/dri/radeon/radeon_dma.c
@@ -184,6 +184,8 @@ void radeonRefillCurrentDmaRegion(radeonContextPtr rmesa, int size)
radeon_print(RADEON_DMA, RADEON_NORMAL, "%s size %d minimum_size %d\n",
__FUNCTION__, size, rmesa->dma.minimum_size);
+ if (!is_empty_list(&rmesa->dma.reserved))
+ radeon_bo_unmap(first_elem(&rmesa->dma.reserved)->bo);
if (is_empty_list(&rmesa->dma.free)
|| last_elem(&rmesa->dma.free)->bo->size < size) {
@@ -211,7 +213,7 @@ again_alloc:
rmesa->dma.current_used = 0;
rmesa->dma.current_vertexptr = 0;
-
+
if (radeon_cs_space_check_with_bo(rmesa->cmdbuf.cs,
first_elem(&rmesa->dma.reserved)->bo,
RADEON_GEM_DOMAIN_GTT, 0))
@@ -221,6 +223,7 @@ again_alloc:
/* Cmd buff have been flushed in radeon_revalidate_bos */
goto again_alloc;
}
+ radeon_bo_map(first_elem(&rmesa->dma.reserved)->bo, 1);
}
/* Allocates a region from rmesa->dma.current. If there isn't enough
@@ -332,6 +335,10 @@ void radeonReleaseDmaRegions(radeonContextPtr rmesa)
/* request updated cs processing information from kernel */
legacy_track_pending(rmesa->radeonScreen->bom, 0);
}
+
+ if (!is_empty_list(&rmesa->dma.reserved))
+ radeon_bo_unmap(first_elem(&rmesa->dma.reserved)->bo);
+
/* move waiting bos to free list.
wait list provides gpu time to handle data before reuse */
foreach_s(dma_bo, temp, &rmesa->dma.wait) {
@@ -349,8 +356,11 @@ void radeonReleaseDmaRegions(radeonContextPtr rmesa)
FREE(dma_bo);
continue;
}
- if (!radeon_bo_is_idle(dma_bo->bo))
+ if (!radeon_bo_is_idle(dma_bo->bo)) {
+ if (rmesa->radeonScreen->driScreen->dri2.enabled)
+ break;
continue;
+ }
remove_from_list(dma_bo);
dma_bo->expire_counter = expire_at;
insert_at_tail(&rmesa->dma.free, dma_bo);
@@ -388,7 +398,7 @@ void rcommon_flush_last_swtcl_prim( GLcontext *ctx )
{
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
struct radeon_dma *dma = &rmesa->dma;
-
+
if (RADEON_DEBUG & RADEON_IOCTL)
fprintf(stderr, "%s\n", __FUNCTION__);
dma->flush = NULL;
diff --git a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
index cd843d965e..c6cc417dd6 100644
--- a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
+++ b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
@@ -36,6 +36,7 @@
#include "main/texobj.h"
#include "main/enums.h"
#include "radeon_texture.h"
+#include "radeon_tile.h"
static unsigned get_aligned_compressed_row_stride(
gl_format format,
@@ -69,16 +70,51 @@ static unsigned get_aligned_compressed_row_stride(
return stride;
}
-static unsigned get_compressed_image_size(
+unsigned get_texture_image_size(
gl_format format,
unsigned rowStride,
- unsigned height)
+ unsigned height,
+ unsigned depth,
+ unsigned tiling)
{
- unsigned blockWidth, blockHeight;
+ if (_mesa_is_format_compressed(format)) {
+ unsigned blockWidth, blockHeight;
- _mesa_get_format_block_size(format, &blockWidth, &blockHeight);
+ _mesa_get_format_block_size(format, &blockWidth, &blockHeight);
+
+ return rowStride * ((height + blockHeight - 1) / blockHeight) * depth;
+ } else if (tiling) {
+ /* Need to align height to tile height */
+ unsigned tileWidth, tileHeight;
- return rowStride * ((height + blockHeight - 1) / blockHeight);
+ get_tile_size(format, &tileWidth, &tileHeight);
+ tileHeight--;
+
+ height = (height + tileHeight) & ~tileHeight;
+ }
+
+ return rowStride * height * depth;
+}
+
+unsigned get_texture_image_row_stride(radeonContextPtr rmesa, gl_format format, unsigned width, unsigned tiling)
+{
+ if (_mesa_is_format_compressed(format)) {
+ return get_aligned_compressed_row_stride(format, width, rmesa->texture_compressed_row_align);
+ } else {
+ unsigned row_align;
+
+ if (!_mesa_is_pow_two(width)) {
+ row_align = rmesa->texture_rect_row_align - 1;
+ } else if (tiling) {
+ unsigned tileWidth, tileHeight;
+ get_tile_size(format, &tileWidth, &tileHeight);
+ row_align = tileWidth * _mesa_get_format_bytes(format) - 1;
+ } else {
+ row_align = rmesa->texture_row_align - 1;
+ }
+
+ return (_mesa_format_row_stride(format, width) + row_align) & ~row_align;
+ }
}
/**
@@ -92,34 +128,15 @@ static void compute_tex_image_offset(radeonContextPtr rmesa, radeon_mipmap_tree
GLuint face, GLuint level, GLuint* curOffset)
{
radeon_mipmap_level *lvl = &mt->levels[level];
- uint32_t row_align;
GLuint height;
height = _mesa_next_pow_two_32(lvl->height);
- /* Find image size in bytes */
- if (_mesa_is_format_compressed(mt->mesaFormat)) {
- lvl->rowstride = get_aligned_compressed_row_stride(mt->mesaFormat, lvl->width, rmesa->texture_compressed_row_align);
- lvl->size = get_compressed_image_size(mt->mesaFormat, lvl->rowstride, height);
- } else if (mt->target == GL_TEXTURE_RECTANGLE_NV) {
- row_align = rmesa->texture_rect_row_align - 1;
- lvl->rowstride = (_mesa_format_row_stride(mt->mesaFormat, lvl->width) + row_align) & ~row_align;
- lvl->size = lvl->rowstride * height;
- } else if (mt->tilebits & RADEON_TXO_MICRO_TILE) {
- /* tile pattern is 16 bytes x2. mipmaps stay 32 byte aligned,
- * though the actual offset may be different (if texture is less than
- * 32 bytes width) to the untiled case */
- lvl->rowstride = (_mesa_format_row_stride(mt->mesaFormat, lvl->width) * 2 + 31) & ~31;
- lvl->size = lvl->rowstride * ((height + 1) / 2) * lvl->depth;
- } else {
- row_align = rmesa->texture_row_align - 1;
- lvl->rowstride = (_mesa_format_row_stride(mt->mesaFormat, lvl->width) + row_align) & ~row_align;
- lvl->size = lvl->rowstride * height * lvl->depth;
- }
+ lvl->rowstride = get_texture_image_row_stride(rmesa, mt->mesaFormat, lvl->width, mt->tilebits);
+ lvl->size = get_texture_image_size(mt->mesaFormat, lvl->rowstride, lvl->height, lvl->depth, mt->tilebits);
+
assert(lvl->size > 0);
- /* All images are aligned to a 32-byte offset */
- *curOffset = (*curOffset + 0x1f) & ~0x1f;
lvl->faces[face].offset = *curOffset;
*curOffset += lvl->size;
diff --git a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h
index c911688c1a..088f970172 100644
--- a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h
+++ b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h
@@ -89,4 +89,13 @@ void radeon_try_alloc_miptree(radeonContextPtr rmesa, radeonTexObj *t);
GLuint radeon_miptree_image_offset(radeon_mipmap_tree *mt,
GLuint face, GLuint level);
uint32_t get_base_teximage_offset(radeonTexObj *texObj);
+
+unsigned get_texture_image_row_stride(radeonContextPtr rmesa, gl_format format, unsigned width, unsigned tiling);
+
+unsigned get_texture_image_size(
+ gl_format format,
+ unsigned rowStride,
+ unsigned height,
+ unsigned depth,
+ unsigned tiling);
#endif /* __RADEON_MIPMAP_TREE_H_ */
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index 631f729048..6415ec1239 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -826,6 +826,7 @@ static int radeon_set_screen_flags(radeonScreenPtr screen, int device_id)
case PCI_CHIP_RS880_9712:
case PCI_CHIP_RS880_9713:
case PCI_CHIP_RS880_9714:
+ case PCI_CHIP_RS880_9715:
screen->chip_family = CHIP_FAMILY_RS880;
screen->chip_flags = RADEON_CHIPSET_TCL;
break;
diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c
index 7db745a180..0ce97e8697 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state.c
@@ -2254,7 +2254,6 @@ void radeonInitStateFuncs( GLcontext *ctx , GLboolean dri2 )
ctx->Driver.BlendFuncSeparate = radeonBlendFuncSeparate;
ctx->Driver.ClearColor = radeonClearColor;
ctx->Driver.ClearDepth = radeonClearDepth;
- ctx->Driver.ClearIndex = NULL;
ctx->Driver.ClearStencil = radeonClearStencil;
ctx->Driver.ClipPlane = radeonClipPlane;
ctx->Driver.ColorMask = radeonColorMask;
@@ -2266,7 +2265,6 @@ void radeonInitStateFuncs( GLcontext *ctx , GLboolean dri2 )
ctx->Driver.Fogfv = radeonFogfv;
ctx->Driver.FrontFace = radeonFrontFace;
ctx->Driver.Hint = NULL;
- ctx->Driver.IndexMask = NULL;
ctx->Driver.LightModelfv = radeonLightModelfv;
ctx->Driver.Lightfv = radeonLightfv;
ctx->Driver.LineStipple = radeonLineStipple;
diff --git a/src/mesa/drivers/dri/radeon/radeon_swtcl.c b/src/mesa/drivers/dri/radeon/radeon_swtcl.c
index 5a71b510fa..f2fcb46688 100644
--- a/src/mesa/drivers/dri/radeon/radeon_swtcl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_swtcl.c
@@ -524,7 +524,6 @@ static struct {
#define DO_POINTS 1
#define DO_FULL_QUAD 1
-#define HAVE_RGBA 1
#define HAVE_SPEC 1
#define HAVE_BACK_COLORS 0
#define HAVE_HW_FLATSHADE 1
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex_copy.c b/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
index 18cf182e54..a4bb03d5d3 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
@@ -46,6 +46,16 @@ do_copy_texsubimage(GLcontext *ctx,
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
struct radeon_renderbuffer *rrb;
+ unsigned src_bpp;
+ unsigned dst_bpp;
+ gl_format src_mesaformat;
+ gl_format dst_mesaformat;
+ unsigned src_width;
+ unsigned dst_width;
+
+ if (!radeon->vtbl.blit) {
+ return GL_FALSE;
+ }
if (_mesa_get_format_bits(timg->base.TexFormat, GL_DEPTH_BITS) > 0) {
rrb = radeon_get_depthbuffer(radeon);
@@ -76,12 +86,40 @@ do_copy_texsubimage(GLcontext *ctx,
}
+ src_mesaformat = rrb->base.Format;
+ dst_mesaformat = timg->base.TexFormat;
+ src_width = rrb->base.Width;
+ dst_width = timg->base.Width;
+ src_bpp = _mesa_get_format_bytes(src_mesaformat);
+ dst_bpp = _mesa_get_format_bytes(dst_mesaformat);
+ if (!radeon->vtbl.check_blit(dst_mesaformat)) {
+ if (src_bpp != dst_bpp)
+ return GL_FALSE;
+
+ switch (dst_bpp) {
+ case 2:
+ src_mesaformat = MESA_FORMAT_RGB565;
+ dst_mesaformat = MESA_FORMAT_RGB565;
+ break;
+ case 4:
+ src_mesaformat = MESA_FORMAT_ARGB8888;
+ dst_mesaformat = MESA_FORMAT_ARGB8888;
+ break;
+ case 1:
+ src_mesaformat = MESA_FORMAT_A8;
+ dst_mesaformat = MESA_FORMAT_A8;
+ break;
+ default:
+ return GL_FALSE;
+ }
+ }
+
/* blit from src buffer to texture */
- return radeon->vtbl.blit(ctx, rrb->bo, src_offset, rrb->base.Format, rrb->pitch/rrb->cpp,
- rrb->base.Width, rrb->base.Height, x, y,
- timg->mt->bo, dst_offset, timg->base.TexFormat,
- timg->mt->levels[level].rowstride / _mesa_get_format_bytes(timg->base.TexFormat),
- timg->base.Width, timg->base.Height,
+ return radeon->vtbl.blit(ctx, rrb->bo, src_offset, src_mesaformat, rrb->pitch/rrb->cpp,
+ src_width, rrb->base.Height, x, y,
+ timg->mt->bo, dst_offset, dst_mesaformat,
+ timg->mt->levels[level].rowstride / dst_bpp,
+ dst_width, timg->base.Height,
dstx, dsty, width, height, 1);
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex_getimage.c b/src/mesa/drivers/dri/radeon/radeon_tex_getimage.c
new file mode 100644
index 0000000000..7bf6dcc2e3
--- /dev/null
+++ b/src/mesa/drivers/dri/radeon/radeon_tex_getimage.c
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2009 Maciej Cencora.
+ * Copyright (C) 2008 Nicolai Haehnle.
+ * Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved.
+ *
+ * The Weather Channel (TM) funded Tungsten Graphics to develop the
+ * initial release of the Radeon 8500 driver under the XFree86 license.
+ * This notice must be preserved.
+ *
+ * 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.
+ *
+ */
+
+#include "radeon_common_context.h"
+#include "radeon_texture.h"
+#include "radeon_mipmap_tree.h"
+
+#include "main/texgetimage.h"
+
+/**
+ * Need to map texture image into memory before copying image data,
+ * then unmap it.
+ */
+static void
+radeon_get_tex_image(GLcontext * ctx, GLenum target, GLint level,
+ GLenum format, GLenum type, GLvoid * pixels,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage, int compressed)
+{
+ radeon_texture_image *image = get_radeon_texture_image(texImage);
+
+ radeon_print(RADEON_TEXTURE, RADEON_NORMAL,
+ "%s(%p, tex %p, image %p) compressed %d.\n",
+ __func__, ctx, texObj, image, compressed);
+
+ if (image->mt) {
+ /* Map the texture image read-only */
+ radeon_teximage_map(image, GL_FALSE);
+ } else {
+ /* Image hasn't been uploaded to a miptree yet */
+ assert(image->base.Data);
+ }
+
+ if (compressed) {
+ /* FIXME: this can't work for small textures (mips) which
+ use different hw stride */
+ _mesa_get_compressed_teximage(ctx, target, level, pixels,
+ texObj, texImage);
+ } else {
+ _mesa_get_teximage(ctx, target, level, format, type, pixels,
+ texObj, texImage);
+ }
+
+ if (image->mt) {
+ radeon_teximage_unmap(image);
+ }
+}
+
+void
+radeonGetTexImage(GLcontext * ctx, GLenum target, GLint level,
+ GLenum format, GLenum type, GLvoid * pixels,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage)
+{
+ radeon_get_tex_image(ctx, target, level, format, type, pixels,
+ texObj, texImage, 0);
+}
+
+void
+radeonGetCompressedTexImage(GLcontext *ctx, GLenum target, GLint level,
+ GLvoid *pixels,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage)
+{
+ radeon_get_tex_image(ctx, target, level, 0, 0, pixels,
+ texObj, texImage, 1);
+}
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c
index ff37fd3e86..3ccc711253 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.c
@@ -39,7 +39,6 @@
#include "main/texstore.h"
#include "main/teximage.h"
#include "main/texobj.h"
-#include "main/texgetimage.h"
#include "xmlpool.h" /* for symbolic values of enum-type options */
@@ -559,6 +558,15 @@ gl_format radeonChooseTextureFormat(GLcontext * ctx,
case GL_COMPRESSED_SLUMINANCE_ALPHA:
return MESA_FORMAT_SLA8;
+ case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
+ return MESA_FORMAT_SRGB_DXT1;
+ case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
+ return MESA_FORMAT_SRGBA_DXT1;
+ case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
+ return MESA_FORMAT_SRGBA_DXT3;
+ case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
+ return MESA_FORMAT_SRGBA_DXT5;
+
default:
_mesa_problem(ctx,
"unexpected internalFormat 0x%x in %s",
@@ -664,6 +672,7 @@ static void radeon_store_teximage(GLcontext* ctx, int dims,
struct gl_texture_image *texImage,
int compressed)
{
+ radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
radeonTexObj *t = radeon_tex_obj(texObj);
radeon_texture_image* image = get_radeon_texture_image(texImage);
@@ -678,8 +687,7 @@ static void radeon_store_teximage(GLcontext* ctx, int dims,
dstRowStride = image->mt->levels[image->mtlevel].rowstride;
} else if (t->bo) {
/* TFP case */
- /* TODO */
- assert(0);
+ dstRowStride = get_texture_image_row_stride(rmesa, texImage->TexFormat, width, 0);
} else {
dstRowStride = _mesa_format_row_stride(texImage->TexFormat, texImage->Width);
}
@@ -998,62 +1006,3 @@ void radeonTexSubImage3D(GLcontext * ctx, GLenum target, GLint level,
radeon_texsubimage(ctx, 3, target, level, xoffset, yoffset, zoffset, width, height, depth, 0,
format, type, pixels, packing, texObj, texImage, 0);
}
-
-/**
- * Need to map texture image into memory before copying image data,
- * then unmap it.
- */
-static void
-radeon_get_tex_image(GLcontext * ctx, GLenum target, GLint level,
- GLenum format, GLenum type, GLvoid * pixels,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage, int compressed)
-{
- radeon_texture_image *image = get_radeon_texture_image(texImage);
-
- radeon_print(RADEON_TEXTURE, RADEON_NORMAL,
- "%s(%p, tex %p, image %p) compressed %d.\n",
- __func__, ctx, texObj, image, compressed);
-
- if (image->mt) {
- /* Map the texture image read-only */
- radeon_teximage_map(image, GL_FALSE);
- } else {
- /* Image hasn't been uploaded to a miptree yet */
- assert(image->base.Data);
- }
-
- if (compressed) {
- /* FIXME: this can't work for small textures (mips) which
- use different hw stride */
- _mesa_get_compressed_teximage(ctx, target, level, pixels,
- texObj, texImage);
- } else {
- _mesa_get_teximage(ctx, target, level, format, type, pixels,
- texObj, texImage);
- }
-
- if (image->mt) {
- radeon_teximage_unmap(image);
- }
-}
-
-void
-radeonGetTexImage(GLcontext * ctx, GLenum target, GLint level,
- GLenum format, GLenum type, GLvoid * pixels,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage)
-{
- radeon_get_tex_image(ctx, target, level, format, type, pixels,
- texObj, texImage, 0);
-}
-
-void
-radeonGetCompressedTexImage(GLcontext *ctx, GLenum target, GLint level,
- GLvoid *pixels,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage)
-{
- radeon_get_tex_image(ctx, target, level, 0, 0, pixels,
- texObj, texImage, 1);
-}
diff --git a/src/mesa/drivers/dri/radeon/radeon_tile.c b/src/mesa/drivers/dri/radeon/radeon_tile.c
new file mode 100644
index 0000000000..403da11010
--- /dev/null
+++ b/src/mesa/drivers/dri/radeon/radeon_tile.c
@@ -0,0 +1,512 @@
+/*
+ * Copyright (C) 2010 Maciej Cencora <m.cencora@gmail.com>
+ *
+ * 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.
+ *
+ */
+
+#include "radeon_tile.h"
+
+#include <stdint.h>
+#include <string.h>
+
+#include "main/macros.h"
+#include "radeon_debug.h"
+
+#define MICRO_TILE_SIZE 32
+
+static void micro_tile_8_x_4_8bit(const void * const src, unsigned src_pitch,
+ void * const dst, unsigned dst_pitch,
+ unsigned width, unsigned height)
+{
+ unsigned row; /* current source row */
+ unsigned col; /* current source column */
+ unsigned k; /* number of processed tiles */
+ const unsigned tile_width = 8, tile_height = 4;
+ const unsigned tiles_in_row = (width + (tile_width - 1)) / tile_width;
+
+ k = 0;
+ for (row = 0; row < height; row += tile_height)
+ {
+ for (col = 0; col < width; col += tile_width, ++k)
+ {
+ uint8_t *src2 = (uint8_t *)src + src_pitch * row + col;
+ uint8_t *dst2 = (uint8_t *)dst + row * dst_pitch +
+ (k % tiles_in_row) * MICRO_TILE_SIZE / sizeof(uint8_t);
+ unsigned j;
+
+ for (j = 0; j < MIN2(tile_height, height - row); ++j)
+ {
+ unsigned columns = MIN2(tile_width, width - col);
+ memcpy(dst2, src2, columns * sizeof(uint8_t));
+ dst2 += tile_width;
+ src2 += src_pitch;
+ }
+ }
+ }
+}
+
+static void micro_tile_4_x_4_16bit(const void * const src, unsigned src_pitch,
+ void * const dst, unsigned dst_pitch,
+ unsigned width, unsigned height)
+{
+ unsigned row; /* current source row */
+ unsigned col; /* current source column */
+ unsigned k; /* number of processed tiles */
+ const unsigned tile_width = 4, tile_height = 4;
+ const unsigned tiles_in_row = (width + (tile_width - 1)) / tile_width;
+
+ k = 0;
+ for (row = 0; row < height; row += tile_height)
+ {
+ for (col = 0; col < width; col += tile_width, ++k)
+ {
+ uint16_t *src2 = (uint16_t *)src + src_pitch * row + col;
+ uint16_t *dst2 = (uint16_t *)dst + row * dst_pitch +
+ (k % tiles_in_row) * MICRO_TILE_SIZE / sizeof(uint16_t);
+ unsigned j;
+
+ for (j = 0; j < MIN2(tile_height, height - row); ++j)
+ {
+ unsigned columns = MIN2(tile_width, width - col);
+ memcpy(dst2, src2, columns * sizeof(uint16_t));
+ dst2 += tile_width;
+ src2 += src_pitch;
+ }
+ }
+ }
+}
+
+static void micro_tile_8_x_2_16bit(const void * const src, unsigned src_pitch,
+ void * const dst, unsigned dst_pitch,
+ unsigned width, unsigned height)
+{
+ unsigned row; /* current source row */
+ unsigned col; /* current source column */
+ unsigned k; /* number of processed tiles */
+ const unsigned tile_width = 8, tile_height = 2;
+ const unsigned tiles_in_row = (width + (tile_width - 1)) / tile_width;
+
+ k = 0;
+ for (row = 0; row < height; row += tile_height)
+ {
+ for (col = 0; col < width; col += tile_width, ++k)
+ {
+ uint16_t *src2 = (uint16_t *)src + src_pitch * row + col;
+ uint16_t *dst2 = (uint16_t *)dst + row * dst_pitch +
+ (k % tiles_in_row) * MICRO_TILE_SIZE / sizeof(uint16_t);
+ unsigned j;
+
+ for (j = 0; j < MIN2(tile_height, height - row); ++j)
+ {
+ unsigned columns = MIN2(tile_width, width - col);
+ memcpy(dst2, src2, columns * sizeof(uint16_t));
+ dst2 += tile_width;
+ src2 += src_pitch;
+ }
+ }
+ }
+}
+
+static void micro_tile_4_x_2_32bit(const void * const src, unsigned src_pitch,
+ void * const dst, unsigned dst_pitch,
+ unsigned width, unsigned height)
+{
+ unsigned row; /* current source row */
+ unsigned col; /* current source column */
+ unsigned k; /* number of processed tiles */
+ const unsigned tile_width = 4, tile_height = 2;
+ const unsigned tiles_in_row = (width + (tile_width - 1)) / tile_width;
+
+ k = 0;
+ for (row = 0; row < height; row += tile_height)
+ {
+ for (col = 0; col < width; col += tile_width, ++k)
+ {
+ uint32_t *src2 = (uint32_t *)src + src_pitch * row + col;
+ uint32_t *dst2 = (uint32_t *)dst + row * dst_pitch +
+ (k % tiles_in_row) * MICRO_TILE_SIZE / sizeof(uint32_t);
+ unsigned j;
+
+ for (j = 0; j < MIN2(tile_height, height - row); ++j)
+ {
+ unsigned columns = MIN2(tile_width, width - col);
+ memcpy(dst2, src2, columns * sizeof(uint32_t));
+ dst2 += tile_width;
+ src2 += src_pitch;
+ }
+ }
+ }
+}
+
+static void micro_tile_2_x_2_64bit(const void * const src, unsigned src_pitch,
+ void * const dst, unsigned dst_pitch,
+ unsigned width, unsigned height)
+{
+ unsigned row; /* current source row */
+ unsigned col; /* current source column */
+ unsigned k; /* number of processed tiles */
+ const unsigned tile_width = 2, tile_height = 2;
+ const unsigned tiles_in_row = (width + (tile_width - 1)) / tile_width;
+
+ k = 0;
+ for (row = 0; row < height; row += tile_height)
+ {
+ for (col = 0; col < width; col += tile_width, ++k)
+ {
+ uint64_t *src2 = (uint64_t *)src + src_pitch * row + col;
+ uint64_t *dst2 = (uint64_t *)dst + row * dst_pitch +
+ (k % tiles_in_row) * MICRO_TILE_SIZE / sizeof(uint64_t);
+ unsigned j;
+
+ for (j = 0; j < MIN2(tile_height, height - row); ++j)
+ {
+ unsigned columns = MIN2(tile_width, width - col);
+ memcpy(dst2, src2, columns * sizeof(uint64_t));
+ dst2 += tile_width;
+ src2 += src_pitch;
+ }
+ }
+ }
+}
+
+static void micro_tile_1_x_1_128bit(const void * src, unsigned src_pitch,
+ void * dst, unsigned dst_pitch,
+ unsigned width, unsigned height)
+{
+ unsigned i, j;
+ const unsigned elem_size = 16; /* sizeof(uint128_t) */
+
+ for (j = 0; j < height; ++j)
+ {
+ for (i = 0; i < width; ++i)
+ {
+ memcpy(dst, src, width * elem_size);
+ dst += dst_pitch * elem_size;
+ src += src_pitch * elem_size;
+ }
+ }
+}
+
+void tile_image(const void * src, unsigned src_pitch,
+ void *dst, unsigned dst_pitch,
+ gl_format format, unsigned width, unsigned height)
+{
+ assert(src_pitch >= width);
+ assert(dst_pitch >= width);
+
+ radeon_print(RADEON_TEXTURE, RADEON_TRACE,
+ "Software tiling: src_pitch %d, dst_pitch %d, width %d, height %d, bpp %d\n",
+ src_pitch, dst_pitch, width, height, _mesa_get_format_bytes(format));
+
+ switch (_mesa_get_format_bytes(format))
+ {
+ case 16:
+ micro_tile_1_x_1_128bit(src, src_pitch, dst, dst_pitch, width, height);
+ break;
+ case 8:
+ micro_tile_2_x_2_64bit(src, src_pitch, dst, dst_pitch, width, height);
+ break;
+ case 4:
+ micro_tile_4_x_2_32bit(src, src_pitch, dst, dst_pitch, width, height);
+ break;
+ case 2:
+ if (_mesa_get_format_bits(format, GL_DEPTH_BITS))
+ {
+ micro_tile_4_x_4_16bit(src, src_pitch, dst, dst_pitch, width, height);
+ }
+ else
+ {
+ micro_tile_8_x_2_16bit(src, src_pitch, dst, dst_pitch, width, height);
+ }
+ break;
+ case 1:
+ micro_tile_8_x_4_8bit(src, src_pitch, dst, dst_pitch, width, height);
+ break;
+ default:
+ assert(0);
+ break;
+ }
+}
+
+static void micro_untile_8_x_4_8bit(const void * const src, unsigned src_pitch,
+ void * const dst, unsigned dst_pitch,
+ unsigned width, unsigned height)
+{
+ unsigned row; /* current destination row */
+ unsigned col; /* current destination column */
+ unsigned k; /* current tile number */
+ const unsigned tile_width = 8, tile_height = 4;
+ const unsigned tiles_in_row = (width + (tile_width - 1)) / tile_width;
+
+ assert(src_pitch % tile_width == 0);
+
+ k = 0;
+ for (row = 0; row < height; row += tile_height)
+ {
+ for (col = 0; col < width; col += tile_width, ++k)
+ {
+ uint8_t *src2 = (uint8_t *)src + row * src_pitch +
+ (k % tiles_in_row) * MICRO_TILE_SIZE / sizeof(uint8_t);
+ uint8_t *dst2 = (uint8_t *)dst + dst_pitch * row + col;
+ unsigned j;
+
+ for (j = 0; j < MIN2(tile_height, height - row); ++j)
+ {
+ unsigned columns = MIN2(tile_width, width - col);
+ memcpy(dst2, src2, columns * sizeof(uint8_t));
+ dst2 += dst_pitch;
+ src2 += tile_width;
+ }
+ }
+ }
+}
+
+static void micro_untile_8_x_2_16bit(const void * const src, unsigned src_pitch,
+ void * const dst, unsigned dst_pitch,
+ unsigned width, unsigned height)
+{
+ unsigned row; /* current destination row */
+ unsigned col; /* current destination column */
+ unsigned k; /* current tile number */
+ const unsigned tile_width = 8, tile_height = 2;
+ const unsigned tiles_in_row = (width + (tile_width - 1)) / tile_width;
+
+ assert(src_pitch % tile_width == 0);
+
+ k = 0;
+ for (row = 0; row < height; row += tile_height)
+ {
+ for (col = 0; col < width; col += tile_width, ++k)
+ {
+ uint16_t *src2 = (uint16_t *)src + row * src_pitch +
+ (k % tiles_in_row) * MICRO_TILE_SIZE / sizeof(uint16_t);
+ uint16_t *dst2 = (uint16_t *)dst + dst_pitch * row + col;
+ unsigned j;
+
+ for (j = 0; j < MIN2(tile_height, height - row); ++j)
+ {
+ unsigned columns = MIN2(tile_width, width - col);
+ memcpy(dst2, src2, columns * sizeof(uint16_t));
+ dst2 += dst_pitch;
+ src2 += tile_width;
+ }
+ }
+ }
+}
+
+static void micro_untile_4_x_4_16bit(const void * const src, unsigned src_pitch,
+ void * const dst, unsigned dst_pitch,
+ unsigned width, unsigned height)
+{
+ unsigned row; /* current destination row */
+ unsigned col; /* current destination column */
+ unsigned k; /* current tile number */
+ const unsigned tile_width = 4, tile_height = 4;
+ const unsigned tiles_in_row = (width + (tile_width - 1)) / tile_width;
+
+ assert(src_pitch % tile_width == 0);
+
+ k = 0;
+ for (row = 0; row < height; row += tile_height)
+ {
+ for (col = 0; col < width; col += tile_width, ++k)
+ {
+ uint16_t *src2 = (uint16_t *)src + row * src_pitch +
+ (k % tiles_in_row) * MICRO_TILE_SIZE / sizeof(uint16_t);
+ uint16_t *dst2 = (uint16_t *)dst + dst_pitch * row + col;
+ unsigned j;
+
+ for (j = 0; j < MIN2(tile_height, height - row); ++j)
+ {
+ unsigned columns = MIN2(tile_width, width - col);
+ memcpy(dst2, src2, columns * sizeof(uint16_t));
+ dst2 += dst_pitch;
+ src2 += tile_width;
+ }
+ }
+ }
+}
+
+static void micro_untile_4_x_2_32bit(const void * const src, unsigned src_pitch,
+ void * const dst, unsigned dst_pitch,
+ unsigned width, unsigned height)
+{
+ unsigned row; /* current destination row */
+ unsigned col; /* current destination column */
+ unsigned k; /* current tile number */
+ const unsigned tile_width = 4, tile_height = 2;
+ const unsigned tiles_in_row = (width + (tile_width - 1)) / tile_width;
+
+ assert(src_pitch % tile_width == 0);
+
+ k = 0;
+ for (row = 0; row < height; row += tile_height)
+ {
+ for (col = 0; col < width; col += tile_width, ++k)
+ {
+ uint32_t *src2 = (uint32_t *)src + row * src_pitch +
+ (k % tiles_in_row) * MICRO_TILE_SIZE / sizeof(uint32_t);
+ uint32_t *dst2 = (uint32_t *)dst + dst_pitch * row + col;
+ unsigned j;
+
+ for (j = 0; j < MIN2(tile_height, height - row); ++j)
+ {
+ unsigned columns = MIN2(tile_width, width - col);
+ memcpy(dst2, src2, columns * sizeof(uint32_t));
+ dst2 += dst_pitch;
+ src2 += tile_width;
+ }
+ }
+ }
+}
+
+static void micro_untile_2_x_2_64bit(const void * const src, unsigned src_pitch,
+ void * const dst, unsigned dst_pitch,
+ unsigned width, unsigned height)
+{
+ unsigned row; /* current destination row */
+ unsigned col; /* current destination column */
+ unsigned k; /* current tile number */
+ const unsigned tile_width = 2, tile_height = 2;
+ const unsigned tiles_in_row = (width + (tile_width - 1)) / tile_width;
+
+ assert(src_pitch % tile_width == 0);
+
+ k = 0;
+ for (row = 0; row < height; row += tile_height)
+ {
+ for (col = 0; col < width; col += tile_width, ++k)
+ {
+ uint64_t *src2 = (uint64_t *)src + row * src_pitch +
+ (k % tiles_in_row) * MICRO_TILE_SIZE / sizeof(uint64_t);
+ uint64_t *dst2 = (uint64_t *)dst + dst_pitch * row + col;
+ unsigned j;
+
+ for (j = 0; j < MIN2(tile_height, height - row); ++j)
+ {
+ unsigned columns = MIN2(tile_width, width - col);
+ memcpy(dst2, src2, columns * sizeof(uint64_t));
+ dst2 += dst_pitch;
+ src2 += tile_width;
+ }
+ }
+ }
+}
+
+static void micro_untile_1_x_1_128bit(const void * src, unsigned src_pitch,
+ void * dst, unsigned dst_pitch,
+ unsigned width, unsigned height)
+{
+ unsigned i, j;
+ const unsigned elem_size = 16; /* sizeof(uint128_t) */
+
+ for (j = 0; j < height; ++j)
+ {
+ for (i = 0; i < width; ++i)
+ {
+ memcpy(dst, src, width * elem_size);
+ dst += dst_pitch * elem_size;
+ src += src_pitch * elem_size;
+ }
+ }
+}
+
+void untile_image(const void * src, unsigned src_pitch,
+ void *dst, unsigned dst_pitch,
+ gl_format format, unsigned width, unsigned height)
+{
+ assert(src_pitch >= width);
+ assert(dst_pitch >= width);
+
+ radeon_print(RADEON_TEXTURE, RADEON_TRACE,
+ "Software untiling: src_pitch %d, dst_pitch %d, width %d, height %d, bpp %d\n",
+ src_pitch, dst_pitch, width, height, _mesa_get_format_bytes(format));
+
+ switch (_mesa_get_format_bytes(format))
+ {
+ case 16:
+ micro_untile_1_x_1_128bit(src, src_pitch, dst, dst_pitch, width, height);
+ break;
+ case 8:
+ micro_untile_2_x_2_64bit(src, src_pitch, dst, dst_pitch, width, height);
+ break;
+ case 4:
+ micro_untile_4_x_2_32bit(src, src_pitch, dst, dst_pitch, width, height);
+ break;
+ case 2:
+ if (_mesa_get_format_bits(format, GL_DEPTH_BITS))
+ {
+ micro_untile_4_x_4_16bit(src, src_pitch, dst, dst_pitch, width, height);
+ }
+ else
+ {
+ micro_untile_8_x_2_16bit(src, src_pitch, dst, dst_pitch, width, height);
+ }
+ break;
+ case 1:
+ micro_untile_8_x_4_8bit(src, src_pitch, dst, dst_pitch, width, height);
+ break;
+ default:
+ assert(0);
+ break;
+ }
+}
+
+void get_tile_size(gl_format format, unsigned *block_width, unsigned *block_height)
+{
+ switch (_mesa_get_format_bytes(format))
+ {
+ case 16:
+ *block_width = 1;
+ *block_height = 1;
+ break;
+ case 8:
+ *block_width = 2;
+ *block_height = 2;
+ break;
+ case 4:
+ *block_width = 4;
+ *block_height = 2;
+ break;
+ case 2:
+ if (_mesa_get_format_bits(format, GL_DEPTH_BITS))
+ {
+ *block_width = 4;
+ *block_height = 4;
+ }
+ else
+ {
+ *block_width = 8;
+ *block_height = 2;
+ }
+ break;
+ case 1:
+ *block_width = 8;
+ *block_height = 4;
+ break;
+ default:
+ assert(0);
+ break;
+ }
+}
diff --git a/src/mesa/drivers/dri/radeon/radeon_tile.h b/src/mesa/drivers/dri/radeon/radeon_tile.h
new file mode 100644
index 0000000000..31d9c5611c
--- /dev/null
+++ b/src/mesa/drivers/dri/radeon/radeon_tile.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2010 Maciej Cencora <m.cencora@gmail.com>
+ *
+ * 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.
+ *
+ */
+
+#include <main/formats.h>
+
+void tile_image(const void * src, unsigned src_pitch,
+ void *dst, unsigned dst_pitch,
+ gl_format format, unsigned width, unsigned height);
+
+void untile_image(const void * src, unsigned src_pitch,
+ void *dst, unsigned dst_pitch,
+ gl_format format, unsigned width, unsigned height);
+
+void get_tile_size(gl_format format, unsigned *block_width, unsigned *block_height);
diff --git a/src/mesa/drivers/dri/radeon/server/radeon_dri.c b/src/mesa/drivers/dri/radeon/server/radeon_dri.c
deleted file mode 100644
index 7ead588dac..0000000000
--- a/src/mesa/drivers/dri/radeon/server/radeon_dri.c
+++ /dev/null
@@ -1,1337 +0,0 @@
-/**
- * \file server/radeon_dri.c
- * \brief File to perform the device-specific initialization tasks typically
- * done in the X server.
- *
- * Here they are converted to run in the client (or perhaps a standalone
- * process), and to work with the frame buffer device rather than the X
- * server infrastructure.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-
-#include "driver.h"
-#include "drm.h"
-#include "memops.h"
-
-#include "radeon.h"
-#include "radeon_dri.h"
-#include "radeon_macros.h"
-#include "radeon_reg.h"
-#include "drm_sarea.h"
-
-static size_t radeon_drm_page_size;
-
-static int RadeonSetParam(const DRIDriverContext *ctx, int param, int value)
-{
- drm_radeon_setparam_t sp;
-
- memset(&sp, 0, sizeof(sp));
- sp.param = param;
- sp.value = value;
-
- if (drmCommandWrite(ctx->drmFD, DRM_RADEON_SETPARAM, &sp, sizeof(sp))) {
- return -1;
- }
-
- return 0;
-}
-
-/**
- * \brief Wait for free FIFO entries.
- *
- * \param ctx display handle.
- * \param entries number of free entries to wait.
- *
- * It polls the free entries from the chip until it reaches the requested value
- * or a timeout (3000 tries) occurs. Aborts the program if the FIFO times out.
- */
-static void RADEONWaitForFifo( const DRIDriverContext *ctx,
- int entries )
-{
- unsigned char *RADEONMMIO = ctx->MMIOAddress;
- int i;
-
- for (i = 0; i < 3000; i++) {
- int fifo_slots =
- INREG(RADEON_RBBM_STATUS) & RADEON_RBBM_FIFOCNT_MASK;
- if (fifo_slots >= entries) return;
- }
-
- /* There are recoveries possible, but I haven't seen them work
- * in practice:
- */
- fprintf(stderr, "FIFO timed out: %d entries, stat=0x%08x\n",
- INREG(RADEON_RBBM_STATUS) & RADEON_RBBM_FIFOCNT_MASK,
- INREG(RADEON_RBBM_STATUS));
- exit(1);
-}
-
-/**
- * \brief Read a PLL register.
- *
- * \param ctx display handle.
- * \param addr PLL register index.
- *
- * \return value of the PLL register.
- */
-static unsigned int RADEONINPLL( const DRIDriverContext *ctx, int addr)
-{
- unsigned char *RADEONMMIO = ctx->MMIOAddress;
- unsigned int data;
-
- OUTREG8(RADEON_CLOCK_CNTL_INDEX, addr & 0x3f);
- data = INREG(RADEON_CLOCK_CNTL_DATA);
-
- return data;
-}
-
-/**
- * \brief Reset graphics card to known state.
- *
- * \param ctx display handle.
- *
- * Resets the values of several Radeon registers.
- */
-static void RADEONEngineReset( const DRIDriverContext *ctx )
-{
- unsigned char *RADEONMMIO = ctx->MMIOAddress;
- unsigned int clock_cntl_index;
- unsigned int mclk_cntl;
- unsigned int rbbm_soft_reset;
- unsigned int host_path_cntl;
- int i;
-
- OUTREGP(RADEON_RB2D_DSTCACHE_CTLSTAT,
- RADEON_RB2D_DC_FLUSH_ALL,
- ~RADEON_RB2D_DC_FLUSH_ALL);
- for (i = 0; i < 512; i++) {
- if (!(INREG(RADEON_RB2D_DSTCACHE_CTLSTAT) & RADEON_RB2D_DC_BUSY))
- break;
- }
-
- clock_cntl_index = INREG(RADEON_CLOCK_CNTL_INDEX);
-
- mclk_cntl = INPLL(ctx, RADEON_MCLK_CNTL);
- OUTPLL(RADEON_MCLK_CNTL, (mclk_cntl |
- RADEON_FORCEON_MCLKA |
- RADEON_FORCEON_MCLKB |
- RADEON_FORCEON_YCLKA |
- RADEON_FORCEON_YCLKB |
- RADEON_FORCEON_MC |
- RADEON_FORCEON_AIC));
-
- /* Soft resetting HDP thru RBBM_SOFT_RESET register can cause some
- * unexpected behaviour on some machines. Here we use
- * RADEON_HOST_PATH_CNTL to reset it.
- */
- host_path_cntl = INREG(RADEON_HOST_PATH_CNTL);
- rbbm_soft_reset = INREG(RADEON_RBBM_SOFT_RESET);
-
- OUTREG(RADEON_RBBM_SOFT_RESET, (rbbm_soft_reset |
- RADEON_SOFT_RESET_CP |
- RADEON_SOFT_RESET_HI |
- RADEON_SOFT_RESET_SE |
- RADEON_SOFT_RESET_RE |
- RADEON_SOFT_RESET_PP |
- RADEON_SOFT_RESET_E2 |
- RADEON_SOFT_RESET_RB));
- INREG(RADEON_RBBM_SOFT_RESET);
- OUTREG(RADEON_RBBM_SOFT_RESET, (rbbm_soft_reset &
- (unsigned int) ~(RADEON_SOFT_RESET_CP |
- RADEON_SOFT_RESET_HI |
- RADEON_SOFT_RESET_SE |
- RADEON_SOFT_RESET_RE |
- RADEON_SOFT_RESET_PP |
- RADEON_SOFT_RESET_E2 |
- RADEON_SOFT_RESET_RB)));
- INREG(RADEON_RBBM_SOFT_RESET);
-
- OUTREG(RADEON_HOST_PATH_CNTL, host_path_cntl | RADEON_HDP_SOFT_RESET);
- INREG(RADEON_HOST_PATH_CNTL);
- OUTREG(RADEON_HOST_PATH_CNTL, host_path_cntl);
-
- OUTREG(RADEON_RBBM_SOFT_RESET, rbbm_soft_reset);
-
- OUTREG(RADEON_CLOCK_CNTL_INDEX, clock_cntl_index);
- OUTPLL(RADEON_MCLK_CNTL, mclk_cntl);
-}
-
-/**
- * \brief Restore the drawing engine.
- *
- * \param ctx display handle
- *
- * Resets the graphics card and sets initial values for several registers of
- * the card's drawing engine.
- *
- * Turns on the radeon command processor engine (i.e., the ringbuffer).
- */
-static int RADEONEngineRestore( const DRIDriverContext *ctx )
-{
- RADEONInfoPtr info = ctx->driverPrivate;
- unsigned char *RADEONMMIO = ctx->MMIOAddress;
- int pitch64, datatype, dp_gui_master_cntl, err;
-
- fprintf(stderr, "%s\n", __FUNCTION__);
-
- OUTREG(RADEON_RB3D_CNTL, 0);
- RADEONEngineReset( ctx );
-
- switch (ctx->bpp) {
- case 16: datatype = 4; break;
- case 32: datatype = 6; break;
- default: return 0;
- }
-
- dp_gui_master_cntl =
- ((datatype << RADEON_GMC_DST_DATATYPE_SHIFT)
- | RADEON_GMC_CLR_CMP_CNTL_DIS);
-
- pitch64 = ((ctx->shared.virtualWidth * (ctx->bpp / 8) + 0x3f)) >> 6;
-
- RADEONWaitForFifo(ctx, 1);
- OUTREG(RADEON_DEFAULT_OFFSET, ((INREG(RADEON_DEFAULT_OFFSET) & 0xC0000000)
- | (pitch64 << 22)));
-
- RADEONWaitForFifo(ctx, 1);
- OUTREG(RADEON_SURFACE_CNTL, RADEON_SURF_TRANSLATION_DIS);
-
- RADEONWaitForFifo(ctx, 1);
- OUTREG(RADEON_DEFAULT_SC_BOTTOM_RIGHT, (RADEON_DEFAULT_SC_RIGHT_MAX
- | RADEON_DEFAULT_SC_BOTTOM_MAX));
-
- RADEONWaitForFifo(ctx, 1);
- OUTREG(RADEON_DP_GUI_MASTER_CNTL, (dp_gui_master_cntl
- | RADEON_GMC_BRUSH_SOLID_COLOR
- | RADEON_GMC_SRC_DATATYPE_COLOR));
-
- RADEONWaitForFifo(ctx, 7);
- OUTREG(RADEON_DST_LINE_START, 0);
- OUTREG(RADEON_DST_LINE_END, 0);
- OUTREG(RADEON_DP_BRUSH_FRGD_CLR, 0xffffffff);
- OUTREG(RADEON_DP_BRUSH_BKGD_CLR, 0);
- OUTREG(RADEON_DP_SRC_FRGD_CLR, 0xffffffff);
- OUTREG(RADEON_DP_SRC_BKGD_CLR, 0);
- OUTREG(RADEON_DP_WRITE_MASK, 0xffffffff);
- OUTREG(RADEON_AUX_SC_CNTL, 0);
-
-/* RADEONWaitForIdleMMIO(ctx); */
- usleep(100);
-
-
- OUTREG(RADEON_GEN_INT_CNTL, info->gen_int_cntl);
- if (info->colorTiling)
- info->crtc_offset_cntl |= RADEON_CRTC_TILE_EN;
- OUTREG(RADEON_CRTC_OFFSET_CNTL, info->crtc_offset_cntl);
-
- /* Initialize and start the CP if required */
- if ((err = drmCommandNone(ctx->drmFD, DRM_RADEON_CP_START)) != 0) {
- fprintf(stderr, "%s: CP start %d\n", __FUNCTION__, err);
- return 0;
- }
-
- return 1;
-}
-
-
-/**
- * \brief Shutdown the drawing engine.
- *
- * \param ctx display handle
- *
- * Turns off the command processor engine & restores the graphics card
- * to a state that fbdev understands.
- */
-static int RADEONEngineShutdown( const DRIDriverContext *ctx )
-{
- drm_radeon_cp_stop_t stop;
- int ret, i;
-
- stop.flush = 1;
- stop.idle = 1;
-
- ret = drmCommandWrite(ctx->drmFD, DRM_RADEON_CP_STOP, &stop,
- sizeof(drm_radeon_cp_stop_t));
-
- if (ret == 0) {
- return 0;
- } else if (errno != EBUSY) {
- return -errno;
- }
-
- stop.flush = 0;
-
- i = 0;
- do {
- ret = drmCommandWrite(ctx->drmFD, DRM_RADEON_CP_STOP, &stop,
- sizeof(drm_radeon_cp_stop_t));
- } while (ret && errno == EBUSY && i++ < 10);
-
- if (ret == 0) {
- return 0;
- } else if (errno != EBUSY) {
- return -errno;
- }
-
- stop.idle = 0;
-
- if (drmCommandWrite(ctx->drmFD, DRM_RADEON_CP_STOP,
- &stop, sizeof(drm_radeon_cp_stop_t))) {
- return -errno;
- } else {
- return 0;
- }
-}
-
-/**
- * \brief Compute base 2 logarithm.
- *
- * \param val value.
- *
- * \return base 2 logarithm of \p val.
- */
-static int RADEONMinBits(int val)
-{
- int bits;
-
- if (!val) return 1;
- for (bits = 0; val; val >>= 1, ++bits);
- return bits;
-}
-
-/**
- * \brief Initialize the AGP state
- *
- * \param ctx display handle.
- * \param info driver private data.
- *
- * \return one on success, or zero on failure.
- *
- * Acquires and enables the AGP device. Reserves memory in the AGP space for
- * the ring buffer, vertex buffers and textures. Initialize the Radeon
- * registers to point to that memory and add client mappings.
- */
-static int RADEONDRIAgpInit( const DRIDriverContext *ctx, RADEONInfoPtr info)
-{
- unsigned char *RADEONMMIO = ctx->MMIOAddress;
- unsigned long mode;
- int ret;
- int s, l;
-
- if (drmAgpAcquire(ctx->drmFD) < 0) {
- fprintf(stderr, "[gart] AGP not available\n");
- return 0;
- }
-
- /* Modify the mode if the default mode is not appropriate for this
- * particular combination of graphics card and AGP chipset.
- */
- mode = drmAgpGetMode(ctx->drmFD); /* Default mode */
-
- /* Disable fast write entirely - too many lockups.
- */
- mode &= ~RADEON_AGP_MODE_MASK;
- switch (ctx->agpmode) {
- case 4: mode |= RADEON_AGP_4X_MODE;
- case 2: mode |= RADEON_AGP_2X_MODE;
- case 1: default: mode |= RADEON_AGP_1X_MODE;
- }
-
- if (drmAgpEnable(ctx->drmFD, mode) < 0) {
- fprintf(stderr, "[gart] AGP not enabled\n");
- drmAgpRelease(ctx->drmFD);
- return 0;
- }
- else
- fprintf(stderr, "[gart] AGP enabled at %dx\n", ctx->agpmode);
-
- /* Workaround for some hardware bugs */
- if (info->ChipFamily < CHIP_FAMILY_R200)
- OUTREG(RADEON_AGP_CNTL, INREG(RADEON_AGP_CNTL) | 0x000e0000);
-
- info->gartOffset = 0;
-
- if ((ret = drmAgpAlloc(ctx->drmFD, info->gartSize*1024*1024, 0, NULL,
- &info->gartMemHandle)) < 0) {
- fprintf(stderr, "[gart] Out of memory (%d)\n", ret);
- drmAgpRelease(ctx->drmFD);
- return 0;
- }
- fprintf(stderr,
- "[gart] %d kB allocated with handle 0x%08x\n",
- info->gartSize*1024, (unsigned)info->gartMemHandle);
-
- if (drmAgpBind(ctx->drmFD,
- info->gartMemHandle, info->gartOffset) < 0) {
- fprintf(stderr, "[gart] Could not bind\n");
- drmAgpFree(ctx->drmFD, info->gartMemHandle);
- drmAgpRelease(ctx->drmFD);
- return 0;
- }
-
- /* Initialize the CP ring buffer data */
- info->ringStart = info->gartOffset;
- info->ringMapSize = info->ringSize*1024*1024 + radeon_drm_page_size;
-
- info->ringReadOffset = info->ringStart + info->ringMapSize;
- info->ringReadMapSize = radeon_drm_page_size;
-
- /* Reserve space for vertex/indirect buffers */
- info->bufStart = info->ringReadOffset + info->ringReadMapSize;
- info->bufMapSize = info->bufSize*1024*1024;
-
- /* Reserve the rest for AGP textures */
- info->gartTexStart = info->bufStart + info->bufMapSize;
- s = (info->gartSize*1024*1024 - info->gartTexStart);
- l = RADEONMinBits((s-1) / RADEON_NR_TEX_REGIONS);
- if (l < RADEON_LOG_TEX_GRANULARITY) l = RADEON_LOG_TEX_GRANULARITY;
- info->gartTexMapSize = (s >> l) << l;
- info->log2GARTTexGran = l;
-
- if (drmAddMap(ctx->drmFD, info->ringStart, info->ringMapSize,
- DRM_AGP, DRM_READ_ONLY, &info->ringHandle) < 0) {
- fprintf(stderr, "[gart] Could not add ring mapping\n");
- return 0;
- }
- fprintf(stderr, "[gart] ring handle = 0x%08x\n", info->ringHandle);
-
-
- if (drmAddMap(ctx->drmFD, info->ringReadOffset, info->ringReadMapSize,
- DRM_AGP, DRM_READ_ONLY, &info->ringReadPtrHandle) < 0) {
- fprintf(stderr,
- "[gart] Could not add ring read ptr mapping\n");
- return 0;
- }
-
- fprintf(stderr,
- "[gart] ring read ptr handle = 0x%08lx\n",
- info->ringReadPtrHandle);
-
- if (drmAddMap(ctx->drmFD, info->bufStart, info->bufMapSize,
- DRM_AGP, 0, &info->bufHandle) < 0) {
- fprintf(stderr,
- "[gart] Could not add vertex/indirect buffers mapping\n");
- return 0;
- }
- fprintf(stderr,
- "[gart] vertex/indirect buffers handle = 0x%08x\n",
- info->bufHandle);
-
- if (drmAddMap(ctx->drmFD, info->gartTexStart, info->gartTexMapSize,
- DRM_AGP, 0, &info->gartTexHandle) < 0) {
- fprintf(stderr,
- "[gart] Could not add AGP texture map mapping\n");
- return 0;
- }
- fprintf(stderr,
- "[gart] AGP texture map handle = 0x%08lx\n",
- info->gartTexHandle);
-
- /* Initialize Radeon's AGP registers */
- /* Ring buffer is at AGP offset 0 */
- OUTREG(RADEON_AGP_BASE, info->ringHandle);
-
- return 1;
-}
-
-/* Initialize the PCI GART state. Request memory for use in PCI space,
- * and initialize the Radeon registers to point to that memory.
- */
-static int RADEONDRIPciInit(const DRIDriverContext *ctx, RADEONInfoPtr info)
-{
- int ret;
- int flags = DRM_READ_ONLY | DRM_LOCKED | DRM_KERNEL;
- int s, l;
-
- ret = drmScatterGatherAlloc(ctx->drmFD, info->gartSize*1024*1024,
- &info->gartMemHandle);
- if (ret < 0) {
- fprintf(stderr, "[pci] Out of memory (%d)\n", ret);
- return 0;
- }
- fprintf(stderr,
- "[pci] %d kB allocated with handle 0x%08lx\n",
- info->gartSize*1024, info->gartMemHandle);
-
- info->gartOffset = 0;
-
- /* Initialize the CP ring buffer data */
- info->ringStart = info->gartOffset;
- info->ringMapSize = info->ringSize*1024*1024 + radeon_drm_page_size;
-
- info->ringReadOffset = info->ringStart + info->ringMapSize;
- info->ringReadMapSize = radeon_drm_page_size;
-
- /* Reserve space for vertex/indirect buffers */
- info->bufStart = info->ringReadOffset + info->ringReadMapSize;
- info->bufMapSize = info->bufSize*1024*1024;
-
- /* Reserve the rest for AGP textures */
- info->gartTexStart = info->bufStart + info->bufMapSize;
- s = (info->gartSize*1024*1024 - info->gartTexStart);
- l = RADEONMinBits((s-1) / RADEON_NR_TEX_REGIONS);
- if (l < RADEON_LOG_TEX_GRANULARITY) l = RADEON_LOG_TEX_GRANULARITY;
- info->gartTexMapSize = (s >> l) << l;
- info->log2GARTTexGran = l;
-
- if (drmAddMap(ctx->drmFD, info->ringStart, info->ringMapSize,
- DRM_SCATTER_GATHER, flags, &info->ringHandle) < 0) {
- fprintf(stderr,
- "[pci] Could not add ring mapping\n");
- return 0;
- }
- fprintf(stderr,
- "[pci] ring handle = 0x%08x\n", info->ringHandle);
-
- if (drmAddMap(ctx->drmFD, info->ringReadOffset, info->ringReadMapSize,
- DRM_SCATTER_GATHER, flags, &info->ringReadPtrHandle) < 0) {
- fprintf(stderr,
- "[pci] Could not add ring read ptr mapping\n");
- return 0;
- }
- fprintf(stderr,
- "[pci] ring read ptr handle = 0x%08lx\n",
- info->ringReadPtrHandle);
-
- if (drmAddMap(ctx->drmFD, info->bufStart, info->bufMapSize,
- DRM_SCATTER_GATHER, 0, &info->bufHandle) < 0) {
- fprintf(stderr,
- "[pci] Could not add vertex/indirect buffers mapping\n");
- return 0;
- }
- fprintf(stderr,
- "[pci] vertex/indirect buffers handle = 0x%08lx\n",
- info->bufHandle);
-
- if (drmAddMap(ctx->drmFD, info->gartTexStart, info->gartTexMapSize,
- DRM_SCATTER_GATHER, 0, &info->gartTexHandle) < 0) {
- fprintf(stderr,
- "[pci] Could not add GART texture map mapping\n");
- return 0;
- }
- fprintf(stderr,
- "[pci] GART texture map handle = 0x%08x\n",
- info->gartTexHandle);
-
- return 1;
-}
-
-
-/**
- * \brief Initialize the kernel data structures and enable the CP engine.
- *
- * \param ctx display handle.
- * \param info driver private data.
- *
- * \return non-zero on success, or zero on failure.
- *
- * This function is a wrapper around the DRM_RADEON_CP_INIT command, passing
- * all the parameters in a drm_radeon_init_t structure.
- */
-static int RADEONDRIKernelInit( const DRIDriverContext *ctx,
- RADEONInfoPtr info)
-{
- int cpp = ctx->bpp / 8;
- drm_radeon_init_t drmInfo;
- int ret;
-
- memset(&drmInfo, 0, sizeof(drm_radeon_init_t));
-
- if ( (info->ChipFamily == CHIP_FAMILY_R200) ||
- (info->ChipFamily == CHIP_FAMILY_RV250) ||
- (info->ChipFamily == CHIP_FAMILY_M9) ||
- (info->ChipFamily == CHIP_FAMILY_RV280) )
- drmInfo.func = RADEON_INIT_R200_CP;
- else
- drmInfo.func = RADEON_INIT_CP;
-
- /* This is the struct passed to the kernel module for its initialization */
- drmInfo.sarea_priv_offset = sizeof(drm_sarea_t);
- drmInfo.is_pci = ctx->isPCI;
- drmInfo.cp_mode = RADEON_DEFAULT_CP_BM_MODE;
- drmInfo.gart_size = info->gartSize*1024*1024;
- drmInfo.ring_size = info->ringSize*1024*1024;
- drmInfo.usec_timeout = 1000;
- drmInfo.fb_bpp = ctx->bpp;
- drmInfo.depth_bpp = ctx->bpp;
- drmInfo.front_offset = info->frontOffset;
- drmInfo.front_pitch = info->frontPitch * cpp;
- drmInfo.back_offset = info->backOffset;
- drmInfo.back_pitch = info->backPitch * cpp;
- drmInfo.depth_offset = info->depthOffset;
- drmInfo.depth_pitch = info->depthPitch * cpp;
- drmInfo.fb_offset = info->LinearAddr;
- drmInfo.mmio_offset = info->registerHandle;
- drmInfo.ring_offset = info->ringHandle;
- drmInfo.ring_rptr_offset = info->ringReadPtrHandle;
- drmInfo.buffers_offset = info->bufHandle;
- drmInfo.gart_textures_offset = info->gartTexHandle;
-
- ret = drmCommandWrite(ctx->drmFD, DRM_RADEON_CP_INIT, &drmInfo,
- sizeof(drm_radeon_init_t));
-
- return ret >= 0;
-}
-
-
-/**
- * \brief Initialize the AGP heap.
- *
- * \param ctx display handle.
- * \param info driver private data.
- *
- * This function is a wrapper around the DRM_RADEON_INIT_HEAP command, passing
- * all the parameters in a drm_radeon_mem_init_heap structure.
- */
-static void RADEONDRIAgpHeapInit(const DRIDriverContext *ctx,
- RADEONInfoPtr info)
-{
- drm_radeon_mem_init_heap_t drmHeap;
-
- /* Start up the simple memory manager for gart space */
- drmHeap.region = RADEON_MEM_REGION_GART;
- drmHeap.start = 0;
- drmHeap.size = info->gartTexMapSize;
-
- if (drmCommandWrite(ctx->drmFD, DRM_RADEON_INIT_HEAP,
- &drmHeap, sizeof(drmHeap))) {
- fprintf(stderr,
- "[drm] Failed to initialized gart heap manager\n");
- } else {
- fprintf(stderr,
- "[drm] Initialized kernel gart heap manager, %d\n",
- info->gartTexMapSize);
- }
-}
-
-/**
- * \brief Add a map for the vertex buffers that will be accessed by any
- * DRI-based clients.
- *
- * \param ctx display handle.
- * \param info driver private data.
- *
- * \return one on success, or zero on failure.
- *
- * Calls drmAddBufs() with the previously allocated vertex buffers.
- */
-static int RADEONDRIBufInit( const DRIDriverContext *ctx, RADEONInfoPtr info )
-{
- /* Initialize vertex buffers */
- info->bufNumBufs = drmAddBufs(ctx->drmFD,
- info->bufMapSize / RADEON_BUFFER_SIZE,
- RADEON_BUFFER_SIZE,
- ctx->isPCI ? DRM_SG_BUFFER : DRM_AGP_BUFFER,
- info->bufStart);
-
- if (info->bufNumBufs <= 0) {
- fprintf(stderr,
- "[drm] Could not create vertex/indirect buffers list\n");
- return 0;
- }
- fprintf(stderr,
- "[drm] Added %d %d byte vertex/indirect buffers\n",
- info->bufNumBufs, RADEON_BUFFER_SIZE);
-
- return 1;
-}
-
-/**
- * \brief Install an IRQ handler.
- *
- * \param ctx display handle.
- * \param info driver private data.
- *
- * Attempts to install an IRQ handler via drmCtlInstHandler(), falling back to
- * IRQ-free operation on failure.
- */
-static void RADEONDRIIrqInit(const DRIDriverContext *ctx,
- RADEONInfoPtr info)
-{
- if (!info->irq) {
- info->irq = drmGetInterruptFromBusID(ctx->drmFD,
- ctx->pciBus,
- ctx->pciDevice,
- ctx->pciFunc);
-
- if ((drmCtlInstHandler(ctx->drmFD, info->irq)) != 0) {
- fprintf(stderr,
- "[drm] failure adding irq handler, "
- "there is a device already using that irq\n"
- "[drm] falling back to irq-free operation\n");
- info->irq = 0;
- }
- }
-
- if (info->irq)
- fprintf(stderr,
- "[drm] dma control initialized, using IRQ %d\n",
- info->irq);
-}
-
-static int RADEONCheckDRMVersion( const DRIDriverContext *ctx,
- RADEONInfoPtr info )
-{
- drmVersionPtr version;
-
- version = drmGetVersion(ctx->drmFD);
- if (version) {
- int req_minor, req_patch;
-
- /* Need 1.8.x for proper cleanup-on-client-exit behaviour.
- */
- req_minor = 8;
- req_patch = 0;
-
- if (version->version_major != 1 ||
- version->version_minor < req_minor ||
- (version->version_minor == req_minor &&
- version->version_patchlevel < req_patch)) {
- /* Incompatible drm version */
- fprintf(stderr,
- "[dri] RADEONDRIScreenInit failed because of a version "
- "mismatch.\n"
- "[dri] radeon.o kernel module version is %d.%d.%d "
- "but version 1.%d.%d or newer is needed.\n"
- "[dri] Disabling DRI.\n",
- version->version_major,
- version->version_minor,
- version->version_patchlevel,
- req_minor,
- req_patch);
- drmFreeVersion(version);
- return 0;
- }
-
- info->drmMinor = version->version_minor;
- drmFreeVersion(version);
- }
-
- return 1;
-}
-
-static int RADEONMemoryInit( const DRIDriverContext *ctx, RADEONInfoPtr info )
-{
- int width_bytes = ctx->shared.virtualWidth * ctx->cpp;
- int cpp = ctx->cpp;
- int bufferSize = ((((ctx->shared.virtualHeight+15) & ~15) * width_bytes + RADEON_BUFFER_ALIGN) & ~RADEON_BUFFER_ALIGN);
- int depthSize = ((((ctx->shared.virtualHeight+15) & ~15) * width_bytes
- + RADEON_BUFFER_ALIGN) & ~RADEON_BUFFER_ALIGN);
- int l;
-
- info->frontOffset = 0;
- info->frontPitch = ctx->shared.virtualWidth;
-
- fprintf(stderr,
- "Using %d MB AGP aperture\n", info->gartSize);
- fprintf(stderr,
- "Using %d MB for the ring buffer\n", info->ringSize);
- fprintf(stderr,
- "Using %d MB for vertex/indirect buffers\n", info->bufSize);
- fprintf(stderr,
- "Using %d MB for AGP textures\n", info->gartTexSize);
-
- /* Front, back and depth buffers - everything else texture??
- */
- info->textureSize = ctx->shared.fbSize - 2 * bufferSize - depthSize;
-
- if (ctx->colorTiling==1)
- {
- info->textureSize = ctx->shared.fbSize - ((ctx->shared.fbSize - info->textureSize + width_bytes * 16 - 1) / (width_bytes * 16)) * (width_bytes*16);
- }
-
- if (info->textureSize < 0)
- return 0;
-
- l = RADEONMinBits((info->textureSize-1) / RADEON_NR_TEX_REGIONS);
- if (l < RADEON_LOG_TEX_GRANULARITY) l = RADEON_LOG_TEX_GRANULARITY;
-
- /* Round the texture size up to the nearest whole number of
- * texture regions. Again, be greedy about this, don't
- * round down.
- */
- info->log2TexGran = l;
- info->textureSize = (info->textureSize >> l) << l;
-
- /* Set a minimum usable local texture heap size. This will fit
- * two 256x256x32bpp textures.
- */
- if (info->textureSize < 512 * 1024) {
- info->textureOffset = 0;
- info->textureSize = 0;
- }
-
- /* Reserve space for textures */
- if (ctx->colorTiling==1)
- {
- info->textureOffset = ((ctx->shared.fbSize - info->textureSize) /
- (width_bytes * 16)) * (width_bytes*16);
- }
- else
- {
- info->textureOffset = ((ctx->shared.fbSize - info->textureSize +
- RADEON_BUFFER_ALIGN) &
- ~RADEON_BUFFER_ALIGN);
- }
- /* Reserve space for the shared depth
- * buffer.
- */
- info->depthOffset = ((info->textureOffset - depthSize +
- RADEON_BUFFER_ALIGN) &
- ~RADEON_BUFFER_ALIGN);
- info->depthPitch = ctx->shared.virtualWidth;
-
- info->backOffset = ((info->depthOffset - bufferSize +
- RADEON_BUFFER_ALIGN) &
- ~RADEON_BUFFER_ALIGN);
- info->backPitch = ctx->shared.virtualWidth;
-
-
- fprintf(stderr,
- "Will use back buffer at offset 0x%x\n",
- info->backOffset);
- fprintf(stderr,
- "Will use depth buffer at offset 0x%x\n",
- info->depthOffset);
- fprintf(stderr,
- "Will use %d kb for textures at offset 0x%x\n",
- info->textureSize/1024, info->textureOffset);
-
- info->frontPitchOffset = (((info->frontPitch * cpp / 64) << 22) |
- (info->frontOffset >> 10));
-
- info->backPitchOffset = (((info->backPitch * cpp / 64) << 22) |
- (info->backOffset >> 10));
-
- info->depthPitchOffset = (((info->depthPitch * cpp / 64) << 22) |
- (info->depthOffset >> 10));
-
- return 1;
-}
-
-static int RADEONColorTilingInit( const DRIDriverContext *ctx, RADEONInfoPtr info )
-{
- int width_bytes = ctx->shared.virtualWidth * ctx->cpp;
- int bufferSize = ((((ctx->shared.virtualHeight+15) & ~15) * width_bytes + RADEON_BUFFER_ALIGN)
- & ~RADEON_BUFFER_ALIGN);
- /* Setup color tiling */
- if (info->drmMinor<14)
- info->colorTiling=0;
-
- if (info->colorTiling)
- {
-
- int colorTilingFlag;
- drm_radeon_surface_alloc_t front,back;
-
- RadeonSetParam(ctx, RADEON_SETPARAM_SWITCH_TILING, info->colorTiling ? 1 : 0);
-
- /* Setup the surfaces */
- if (info->ChipFamily < CHIP_FAMILY_R200)
- colorTilingFlag=RADEON_SURF_TILE_COLOR_MACRO;
- else
- colorTilingFlag=R200_SURF_TILE_COLOR_MACRO;
-
- front.address = info->frontOffset;
- front.size = bufferSize;
- front.flags = (width_bytes) | colorTilingFlag;
- drmCommandWrite(ctx->drmFD, DRM_RADEON_SURF_ALLOC, &front,sizeof(front));
-
- back.address = info->backOffset;
- back.size = bufferSize;
- back.flags = (width_bytes) | colorTilingFlag;
- drmCommandWrite(ctx->drmFD, DRM_RADEON_SURF_ALLOC, &back,sizeof(back));
-
- }
- return 1;
-}
-
-
-
-/**
- * Called at the start of each server generation.
- *
- * \param ctx display handle.
- * \param info driver private data.
- *
- * \return non-zero on success, or zero on failure.
- *
- * Performs static frame buffer allocation. Opens the DRM device and add maps
- * to the SAREA, framebuffer and MMIO regions. Fills in \p info with more
- * information. Creates a \e server context to grab the lock for the
- * initialization ioctls and calls the other initilization functions in this
- * file. Starts the CP engine via the DRM_RADEON_CP_START command.
- *
- * Setups a RADEONDRIRec structure to be passed to radeon_dri.so for its
- * initialization.
- */
-static int RADEONScreenInit( DRIDriverContext *ctx, RADEONInfoPtr info )
-{
- RADEONDRIPtr pRADEONDRI;
- int err;
-
- usleep(100);
- /*assert(!ctx->IsClient);*/
-
- {
- int width_bytes = (ctx->shared.virtualWidth * ctx->cpp);
- int maxy = ctx->shared.fbSize / width_bytes;
-
-
- if (maxy <= ctx->shared.virtualHeight * 3) {
- fprintf(stderr,
- "Static buffer allocation failed -- "
- "need at least %d kB video memory (have %d kB)\n",
- (ctx->shared.virtualWidth * ctx->shared.virtualHeight *
- ctx->cpp * 3 + 1023) / 1024,
- ctx->shared.fbSize / 1024);
- return 0;
- }
- }
-
-
- if (info->ChipFamily >= CHIP_FAMILY_R300) {
- fprintf(stderr,
- "Direct rendering not yet supported on "
- "Radeon 9700 and newer cards\n");
- return 0;
- }
-
- radeon_drm_page_size = getpagesize();
-
- info->registerSize = ctx->MMIOSize;
- ctx->shared.SAREASize = SAREA_MAX;
-
- /* Note that drmOpen will try to load the kernel module, if needed. */
- ctx->drmFD = drmOpen("radeon", NULL );
- if (ctx->drmFD < 0) {
- fprintf(stderr, "[drm] drmOpen failed\n");
- return 0;
- }
-
- if ((err = drmSetBusid(ctx->drmFD, ctx->pciBusID)) < 0) {
- fprintf(stderr, "[drm] drmSetBusid failed (%d, %s), %s\n",
- ctx->drmFD, ctx->pciBusID, strerror(-err));
- return 0;
- }
-
- if (drmAddMap( ctx->drmFD,
- 0,
- ctx->shared.SAREASize,
- DRM_SHM,
- DRM_CONTAINS_LOCK,
- &ctx->shared.hSAREA) < 0)
- {
- fprintf(stderr, "[drm] drmAddMap failed\n");
- return 0;
- }
- fprintf(stderr, "[drm] added %d byte SAREA at 0x%08lx\n",
- ctx->shared.SAREASize, ctx->shared.hSAREA);
-
- if (drmMap( ctx->drmFD,
- ctx->shared.hSAREA,
- ctx->shared.SAREASize,
- (drmAddressPtr)(&ctx->pSAREA)) < 0)
- {
- fprintf(stderr, "[drm] drmMap failed\n");
- return 0;
- }
- memset(ctx->pSAREA, 0, ctx->shared.SAREASize);
- fprintf(stderr, "[drm] mapped SAREA 0x%08lx to %p, size %d\n",
- ctx->shared.hSAREA, ctx->pSAREA, ctx->shared.SAREASize);
-
- /* Need to AddMap the framebuffer and mmio regions here:
- */
- if (drmAddMap( ctx->drmFD,
- (drm_handle_t)ctx->FBStart,
- ctx->FBSize,
- DRM_FRAME_BUFFER,
-#ifndef _EMBEDDED
- 0,
-#else
- DRM_READ_ONLY,
-#endif
- &ctx->shared.hFrameBuffer) < 0)
- {
- fprintf(stderr, "[drm] drmAddMap framebuffer failed\n");
- return 0;
- }
-
- fprintf(stderr, "[drm] framebuffer handle = 0x%08lx\n",
- ctx->shared.hFrameBuffer);
-
-
-
- if (drmAddMap(ctx->drmFD,
- ctx->MMIOStart,
- ctx->MMIOSize,
- DRM_REGISTERS,
- DRM_READ_ONLY,
- &info->registerHandle) < 0) {
- fprintf(stderr, "[drm] drmAddMap mmio failed\n");
- return 0;
- }
- fprintf(stderr,
- "[drm] register handle = 0x%08lx\n", info->registerHandle);
-
- /* Check the radeon DRM version */
- if (!RADEONCheckDRMVersion(ctx, info)) {
- return 0;
- }
-
- if (ctx->isPCI) {
- /* Initialize PCI */
- if (!RADEONDRIPciInit(ctx, info))
- return 0;
- }
- else {
- /* Initialize AGP */
- if (!RADEONDRIAgpInit(ctx, info))
- return 0;
- }
-
- /* Memory manager setup */
- if (!RADEONMemoryInit(ctx, info)) {
- return 0;
- }
-
- /* Create a 'server' context so we can grab the lock for
- * initialization ioctls.
- */
- if ((err = drmCreateContext(ctx->drmFD, &ctx->serverContext)) != 0) {
- fprintf(stderr, "%s: drmCreateContext failed %d\n", __FUNCTION__, err);
- return 0;
- }
-
- DRM_LOCK(ctx->drmFD, ctx->pSAREA, ctx->serverContext, 0);
-
- /* Initialize the kernel data structures */
- if (!RADEONDRIKernelInit(ctx, info)) {
- fprintf(stderr, "RADEONDRIKernelInit failed\n");
- DRM_UNLOCK(ctx->drmFD, ctx->pSAREA, ctx->serverContext);
- return 0;
- }
-
- /* Initialize the vertex buffers list */
- if (!RADEONDRIBufInit(ctx, info)) {
- fprintf(stderr, "RADEONDRIBufInit failed\n");
- DRM_UNLOCK(ctx->drmFD, ctx->pSAREA, ctx->serverContext);
- return 0;
- }
-
- RADEONColorTilingInit(ctx, info);
-
- /* Initialize IRQ */
- RADEONDRIIrqInit(ctx, info);
-
- /* Initialize kernel gart memory manager */
- RADEONDRIAgpHeapInit(ctx, info);
-
- fprintf(stderr,"color tiling %sabled\n", info->colorTiling?"en":"dis");
- fprintf(stderr,"page flipping %sabled\n", info->page_flip_enable?"en":"dis");
- /* Initialize the SAREA private data structure */
- {
- drm_radeon_sarea_t *pSAREAPriv;
- pSAREAPriv = (drm_radeon_sarea_t *)(((char*)ctx->pSAREA) +
- sizeof(drm_sarea_t));
- memset(pSAREAPriv, 0, sizeof(*pSAREAPriv));
- pSAREAPriv->pfState = info->page_flip_enable;
- }
-
-
- /* Quick hack to clear the front & back buffers. Could also use
- * the clear ioctl to do this, but would need to setup hw state
- * first.
- */
- drimemsetio((char *)ctx->FBAddress + info->frontOffset,
- 0,
- info->frontPitch * ctx->cpp * ctx->shared.virtualHeight );
-
- drimemsetio((char *)ctx->FBAddress + info->backOffset,
- 0,
- info->backPitch * ctx->cpp * ctx->shared.virtualHeight );
-
- /* This is the struct passed to radeon_dri.so for its initialization */
- ctx->driverClientMsg = malloc(sizeof(RADEONDRIRec));
- ctx->driverClientMsgSize = sizeof(RADEONDRIRec);
- pRADEONDRI = (RADEONDRIPtr)ctx->driverClientMsg;
- pRADEONDRI->deviceID = info->Chipset;
- pRADEONDRI->width = ctx->shared.virtualWidth;
- pRADEONDRI->height = ctx->shared.virtualHeight;
- pRADEONDRI->depth = ctx->bpp; /* XXX: depth */
- pRADEONDRI->bpp = ctx->bpp;
- pRADEONDRI->IsPCI = ctx->isPCI;
- pRADEONDRI->AGPMode = ctx->agpmode;
- pRADEONDRI->frontOffset = info->frontOffset;
- pRADEONDRI->frontPitch = info->frontPitch;
- pRADEONDRI->backOffset = info->backOffset;
- pRADEONDRI->backPitch = info->backPitch;
- pRADEONDRI->depthOffset = info->depthOffset;
- pRADEONDRI->depthPitch = info->depthPitch;
- pRADEONDRI->textureOffset = info->textureOffset;
- pRADEONDRI->textureSize = info->textureSize;
- pRADEONDRI->log2TexGran = info->log2TexGran;
- pRADEONDRI->registerHandle = info->registerHandle;
- pRADEONDRI->registerSize = info->registerSize;
- pRADEONDRI->statusHandle = info->ringReadPtrHandle;
- pRADEONDRI->statusSize = info->ringReadMapSize;
- pRADEONDRI->gartTexHandle = info->gartTexHandle;
- pRADEONDRI->gartTexMapSize = info->gartTexMapSize;
- pRADEONDRI->log2GARTTexGran = info->log2GARTTexGran;
- pRADEONDRI->gartTexOffset = info->gartTexStart;
- pRADEONDRI->sarea_priv_offset = sizeof(drm_sarea_t);
-
- /* Don't release the lock now - let the VT switch handler do it. */
-
- return 1;
-}
-
-
-/**
- * \brief Get Radeon chip family from chipset number.
- *
- * \param info driver private data.
- *
- * \return non-zero on success, or zero on failure.
- *
- * Called by radeonInitFBDev() to set RADEONInfoRec::ChipFamily
- * according to the value of RADEONInfoRec::Chipset. Fails if the
- * chipset is unrecognized or not appropriate for this driver (i.e., not
- * an r100 style radeon)
- */
-static int get_chipfamily_from_chipset( RADEONInfoPtr info )
-{
- switch (info->Chipset) {
- case PCI_CHIP_RADEON_LY:
- case PCI_CHIP_RADEON_LZ:
- info->ChipFamily = CHIP_FAMILY_M6;
- break;
-
- case PCI_CHIP_RADEON_QY:
- case PCI_CHIP_RADEON_QZ:
- info->ChipFamily = CHIP_FAMILY_VE;
- break;
-
- case PCI_CHIP_R200_QL:
- case PCI_CHIP_R200_QN:
- case PCI_CHIP_R200_QO:
- case PCI_CHIP_R200_Ql:
- case PCI_CHIP_R200_BB:
- info->ChipFamily = CHIP_FAMILY_R200;
- break;
-
- case PCI_CHIP_RV200_QW: /* RV200 desktop */
- case PCI_CHIP_RV200_QX:
- info->ChipFamily = CHIP_FAMILY_RV200;
- break;
-
- case PCI_CHIP_RADEON_LW:
- case PCI_CHIP_RADEON_LX:
- info->ChipFamily = CHIP_FAMILY_M7;
- break;
-
- case PCI_CHIP_RV250_Id:
- case PCI_CHIP_RV250_Ie:
- case PCI_CHIP_RV250_If:
- case PCI_CHIP_RV250_Ig:
- info->ChipFamily = CHIP_FAMILY_RV250;
- break;
-
- case PCI_CHIP_RV250_Ld:
- case PCI_CHIP_RV250_Le:
- case PCI_CHIP_RV250_Lf:
- case PCI_CHIP_RV250_Lg:
- info->ChipFamily = CHIP_FAMILY_M9;
- break;
-
- case PCI_CHIP_RV280_Y_:
- case PCI_CHIP_RV280_Ya:
- case PCI_CHIP_RV280_Yb:
- case PCI_CHIP_RV280_Yc:
- info->ChipFamily = CHIP_FAMILY_RV280;
- break;
-
- case PCI_CHIP_R300_ND:
- case PCI_CHIP_R300_NE:
- case PCI_CHIP_R300_NF:
- case PCI_CHIP_R300_NG:
- info->ChipFamily = CHIP_FAMILY_R300;
- break;
-
- default:
- /* Original Radeon/7200 */
- info->ChipFamily = CHIP_FAMILY_RADEON;
- }
-
- return 1;
-}
-
-
-/**
- * \brief Validate the fbdev mode.
- *
- * \param ctx display handle.
- *
- * \return one on success, or zero on failure.
- *
- * Saves some registers and returns 1.
- *
- * \sa radeonValidateMode().
- */
-static int radeonValidateMode( const DRIDriverContext *ctx )
-{
- unsigned char *RADEONMMIO = ctx->MMIOAddress;
- RADEONInfoPtr info = ctx->driverPrivate;
-
- info->gen_int_cntl = INREG(RADEON_GEN_INT_CNTL);
- info->crtc_offset_cntl = INREG(RADEON_CRTC_OFFSET_CNTL);
-
- if (info->colorTiling)
- info->crtc_offset_cntl |= RADEON_CRTC_TILE_EN;
- return 1;
-}
-
-
-/**
- * \brief Examine mode returned by fbdev.
- *
- * \param ctx display handle.
- *
- * \return one on success, or zero on failure.
- *
- * Restores registers that fbdev has clobbered and returns 1.
- *
- * \sa radeonValidateMode().
- */
-static int radeonPostValidateMode( const DRIDriverContext *ctx )
-{
- unsigned char *RADEONMMIO = ctx->MMIOAddress;
- RADEONInfoPtr info = ctx->driverPrivate;
-
- RADEONColorTilingInit( ctx, info);
- OUTREG(RADEON_GEN_INT_CNTL, info->gen_int_cntl);
- if (info->colorTiling)
- info->crtc_offset_cntl |= RADEON_CRTC_TILE_EN;
- OUTREG(RADEON_CRTC_OFFSET_CNTL, info->crtc_offset_cntl);
-
- return 1;
-}
-
-
-/**
- * \brief Initialize the framebuffer device mode
- *
- * \param ctx display handle.
- *
- * \return one on success, or zero on failure.
- *
- * Fills in \p info with some default values and some information from \p ctx
- * and then calls RADEONScreenInit() for the screen initialization.
- *
- * Before exiting clears the framebuffer memory accessing it directly.
- */
-static int radeonInitFBDev( DRIDriverContext *ctx )
-{
- RADEONInfoPtr info = calloc(1, sizeof(*info));
-
- {
- int dummy = ctx->shared.virtualWidth;
-
- if (ctx->colorTiling==1)
- {
- switch (ctx->bpp / 8) {
- case 1: dummy = (ctx->shared.virtualWidth + 255) & ~255; break;
- case 2: dummy = (ctx->shared.virtualWidth + 127) & ~127; break;
- case 3:
- case 4: dummy = (ctx->shared.virtualWidth + 63) & ~63; break;
- }
- } else {
- switch (ctx->bpp / 8) {
- case 1: dummy = (ctx->shared.virtualWidth + 127) & ~127; break;
- case 2: dummy = (ctx->shared.virtualWidth + 31) & ~31; break;
- case 3:
- case 4: dummy = (ctx->shared.virtualWidth + 15) & ~15; break;
- }
- }
-
- ctx->shared.virtualWidth = dummy;
- ctx->shared.Width = dummy;
- }
-
- fprintf(stderr,"shared virtual width is %d\n", ctx->shared.virtualWidth);
- ctx->driverPrivate = (void *)info;
-
- info->gartFastWrite = RADEON_DEFAULT_AGP_FAST_WRITE;
- info->gartSize = RADEON_DEFAULT_AGP_SIZE;
- info->gartTexSize = RADEON_DEFAULT_AGP_TEX_SIZE;
- info->bufSize = RADEON_DEFAULT_BUFFER_SIZE;
- info->ringSize = RADEON_DEFAULT_RING_SIZE;
- info->page_flip_enable = RADEON_DEFAULT_PAGE_FLIP;
- info->colorTiling = ctx->colorTiling;
-
- info->Chipset = ctx->chipset;
-
- if (!get_chipfamily_from_chipset( info )) {
- fprintf(stderr, "Unknown or non-radeon chipset -- cannot continue\n");
- fprintf(stderr, "==> Verify PCI BusID is correct in miniglx.conf\n");
- return 0;
- }
-
- info->frontPitch = ctx->shared.virtualWidth;
- info->LinearAddr = ctx->FBStart & 0xfc000000;
-
-
- if (!RADEONScreenInit( ctx, info ))
- return 0;
-
-
- return 1;
-}
-
-
-/**
- * \brief The screen is being closed, so clean up any state and free any
- * resources used by the DRI.
- *
- * \param ctx display handle.
- *
- * Unmaps the SAREA, closes the DRM device file descriptor and frees the driver
- * private data.
- */
-static void radeonHaltFBDev( DRIDriverContext *ctx )
-{
- drmUnmap( ctx->pSAREA, ctx->shared.SAREASize );
- drmClose(ctx->drmFD);
-
- if (ctx->driverPrivate) {
- free(ctx->driverPrivate);
- ctx->driverPrivate = 0;
- }
-}
-
-
-extern void radeonNotifyFocus( int );
-
-/**
- * \brief Exported driver interface for Mini GLX.
- *
- * \sa DRIDriverRec.
- */
-const struct DRIDriverRec __driDriver = {
- radeonValidateMode,
- radeonPostValidateMode,
- radeonInitFBDev,
- radeonHaltFBDev,
- RADEONEngineShutdown,
- RADEONEngineRestore,
-#ifndef _EMBEDDED
- 0,
-#else
- radeonNotifyFocus,
-#endif
-};
diff --git a/src/mesa/drivers/dri/savage/Makefile b/src/mesa/drivers/dri/savage/Makefile
index 2e5c40802c..53511552c6 100644
--- a/src/mesa/drivers/dri/savage/Makefile
+++ b/src/mesa/drivers/dri/savage/Makefile
@@ -5,9 +5,6 @@ include $(TOP)/configs/current
LIBNAME = savage_dri.so
-# Doesn't exist yet.
-#MINIGLX_SOURCES = server/savage_dri.c
-
DRIVER_SOURCES = \
savage_xmesa.c \
savagedd.c \
diff --git a/src/mesa/drivers/dri/savage/savagetris.c b/src/mesa/drivers/dri/savage/savagetris.c
index a177a7d2b6..0050485e31 100644
--- a/src/mesa/drivers/dri/savage/savagetris.c
+++ b/src/mesa/drivers/dri/savage/savagetris.c
@@ -387,7 +387,6 @@ static struct {
#define DO_POINTS 1
#define DO_FULL_QUAD 1
-#define HAVE_RGBA 1
#define HAVE_SPEC 1
#define HAVE_BACK_COLORS 0
#define HAVE_HW_FLATSHADE 1
diff --git a/src/mesa/drivers/dri/sis/Makefile b/src/mesa/drivers/dri/sis/Makefile
index ad009fc239..6b4f938bab 100644
--- a/src/mesa/drivers/dri/sis/Makefile
+++ b/src/mesa/drivers/dri/sis/Makefile
@@ -5,10 +5,6 @@ include $(TOP)/configs/current
LIBNAME = sis_dri.so
-
-# Not yet
-# MINIGLX_SOURCES = server/sis_dri.c
-
DRIVER_SOURCES = \
sis6326_state.c \
sis6326_clear.c \
diff --git a/src/mesa/drivers/dri/sis/sis_tris.c b/src/mesa/drivers/dri/sis/sis_tris.c
index e7471f9789..d109a8c41e 100644
--- a/src/mesa/drivers/dri/sis/sis_tris.c
+++ b/src/mesa/drivers/dri/sis/sis_tris.c
@@ -375,7 +375,6 @@ static struct {
#define DO_POINTS 1
#define DO_FULL_QUAD 1
-#define HAVE_RGBA 1
#define HAVE_SPEC 1
#define HAVE_BACK_COLORS 0
#define HAVE_HW_FLATSHADE 1
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index b2e7df34e8..03c672ecf1 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -203,34 +203,28 @@ static const __DRIextension **driGetExtensions(__DRIscreen *psp)
static GLuint
choose_pixel_format(const GLvisual *v)
{
- if (v->rgbMode) {
- int depth = v->rgbBits;
-
- if (depth == 32
- && v->redMask == 0xff0000
- && v->greenMask == 0x00ff00
- && v->blueMask == 0x0000ff)
- return PF_A8R8G8B8;
- else if (depth == 24
- && v->redMask == 0xff0000
- && v->greenMask == 0x00ff00
- && v->blueMask == 0x0000ff)
- return PF_X8R8G8B8;
- else if (depth == 16
- && v->redMask == 0xf800
- && v->greenMask == 0x07e0
- && v->blueMask == 0x001f)
- return PF_R5G6B5;
- else if (depth == 8
- && v->redMask == 0x07
- && v->greenMask == 0x38
- && v->blueMask == 0xc0)
- return PF_R3G3B2;
- }
- else {
- if (v->indexBits == 8)
- return PF_CI8;
- }
+ int depth = v->rgbBits;
+
+ if (depth == 32
+ && v->redMask == 0xff0000
+ && v->greenMask == 0x00ff00
+ && v->blueMask == 0x0000ff)
+ return PF_A8R8G8B8;
+ else if (depth == 24
+ && v->redMask == 0xff0000
+ && v->greenMask == 0x00ff00
+ && v->blueMask == 0x0000ff)
+ return PF_X8R8G8B8;
+ else if (depth == 16
+ && v->redMask == 0xf800
+ && v->greenMask == 0x07e0
+ && v->blueMask == 0x001f)
+ return PF_R5G6B5;
+ else if (depth == 8
+ && v->redMask == 0x07
+ && v->greenMask == 0x38
+ && v->blueMask == 0xc0)
+ return PF_R3G3B2;
_mesa_problem( NULL, "unexpected format in %s", __FUNCTION__ );
return 0;
@@ -335,13 +329,6 @@ swrast_new_renderbuffer(const GLvisual *visual, GLboolean front)
xrb->Base.DataType = GL_UNSIGNED_BYTE;
xrb->bpp = 8;
break;
- case PF_CI8:
- xrb->Base.Format = MESA_FORMAT_CI8;
- xrb->Base.InternalFormat = GL_COLOR_INDEX8_EXT;
- xrb->Base._BaseFormat = GL_COLOR_INDEX;
- xrb->Base.DataType = GL_UNSIGNED_BYTE;
- xrb->bpp = 8;
- break;
default:
return NULL;
}
diff --git a/src/mesa/drivers/dri/swrast/swrast_priv.h b/src/mesa/drivers/dri/swrast/swrast_priv.h
index 59b4a6d228..4722007f95 100644
--- a/src/mesa/drivers/dri/swrast/swrast_priv.h
+++ b/src/mesa/drivers/dri/swrast/swrast_priv.h
@@ -116,11 +116,10 @@ swrast_renderbuffer(struct gl_renderbuffer *rb)
/**
* Pixel formats we support
*/
-#define PF_CI8 1 /**< Color Index mode */
-#define PF_A8R8G8B8 2 /**< 32bpp TrueColor: 8-A, 8-R, 8-G, 8-B bits */
-#define PF_R5G6B5 3 /**< 16bpp TrueColor: 5-R, 6-G, 5-B bits */
-#define PF_R3G3B2 4 /**< 8bpp TrueColor: 3-R, 3-G, 2-B bits */
-#define PF_X8R8G8B8 5 /**< 32bpp TrueColor: 8-R, 8-G, 8-B bits */
+#define PF_A8R8G8B8 1 /**< 32bpp TrueColor: 8-A, 8-R, 8-G, 8-B bits */
+#define PF_R5G6B5 2 /**< 16bpp TrueColor: 5-R, 6-G, 5-B bits */
+#define PF_R3G3B2 3 /**< 8bpp TrueColor: 3-R, 3-G, 2-B bits */
+#define PF_X8R8G8B8 4 /**< 32bpp TrueColor: 8-R, 8-G, 8-B bits */
/**
* Renderbuffer pitch alignment (in bits).
diff --git a/src/mesa/drivers/dri/swrast/swrast_span.c b/src/mesa/drivers/dri/swrast/swrast_span.c
index f8e503463f..5290dc82b9 100644
--- a/src/mesa/drivers/dri/swrast/swrast_span.c
+++ b/src/mesa/drivers/dri/swrast/swrast_span.c
@@ -193,23 +193,6 @@ static const GLubyte kernel[16] = {
#include "swrast/s_spantemp.h"
-/* 8-bit color index */
-#define NAME(FUNC) FUNC##_CI8
-#define CI_MODE
-#define RB_TYPE GLubyte
-#define SPAN_VARS \
- struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
-#define INIT_PIXEL_PTR(P, X, Y) \
- GLubyte *P = (GLubyte *)xrb->Base.Data + YFLIP(xrb, Y) * xrb->pitch + (X);
-#define INC_PIXEL_PTR(P) P += 1
-#define STORE_PIXEL(DST, X, Y, VALUE) \
- *DST = VALUE[0]
-#define FETCH_PIXEL(DST, SRC) \
- DST = SRC[0]
-
-#include "swrast/s_spantemp.h"
-
-
/*
* Generate code for front-buffer span functions.
*/
@@ -282,23 +265,6 @@ static const GLubyte kernel[16] = {
#include "swrast_spantemp.h"
-/* 8-bit color index */
-#define NAME(FUNC) FUNC##_CI8_front
-#define CI_MODE
-#define RB_TYPE GLubyte
-#define SPAN_VARS \
- struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
-#define INIT_PIXEL_PTR(P, X, Y) \
- GLubyte *P = (GLubyte *)row;
-#define INC_PIXEL_PTR(P) P += 1
-#define STORE_PIXEL(DST, X, Y, VALUE) \
- *DST = VALUE[0]
-#define FETCH_PIXEL(DST, SRC) \
- DST = SRC[0]
-
-#include "swrast_spantemp.h"
-
-
/*
* Back-buffers are malloced memory and always private.
*
@@ -346,14 +312,6 @@ swrast_set_span_funcs_back(struct swrast_renderbuffer *xrb,
xrb->Base.PutValues = put_values_R3G3B2;
xrb->Base.PutMonoValues = put_mono_values_R3G3B2;
break;
- case PF_CI8:
- xrb->Base.GetRow = get_row_CI8;
- xrb->Base.GetValues = get_values_CI8;
- xrb->Base.PutRow = put_row_CI8;
- xrb->Base.PutMonoRow = put_mono_row_CI8;
- xrb->Base.PutValues = put_values_CI8;
- xrb->Base.PutMonoValues = put_mono_values_CI8;
- break;
default:
assert(0);
return;
@@ -410,14 +368,6 @@ swrast_set_span_funcs_front(struct swrast_renderbuffer *xrb,
xrb->Base.PutValues = put_values_R3G3B2_front;
xrb->Base.PutMonoValues = put_mono_values_R3G3B2_front;
break;
- case PF_CI8:
- xrb->Base.GetRow = get_row_CI8_front;
- xrb->Base.GetValues = get_values_CI8_front;
- xrb->Base.PutRow = put_row_CI8_front;
- xrb->Base.PutMonoRow = put_mono_row_CI8_front;
- xrb->Base.PutValues = put_values_CI8_front;
- xrb->Base.PutMonoValues = put_mono_values_CI8_front;
- break;
default:
assert(0);
return;
diff --git a/src/mesa/drivers/dri/swrast/swrast_spantemp.h b/src/mesa/drivers/dri/swrast/swrast_spantemp.h
index e0cb241429..879a0c12e7 100644
--- a/src/mesa/drivers/dri/swrast/swrast_spantemp.h
+++ b/src/mesa/drivers/dri/swrast/swrast_spantemp.h
@@ -98,7 +98,6 @@ GET_ROW( GLcontext *glCtx, GLint x, GLint y, GLuint n, char *row )
* Define the following macros before including this file:
* NAME(BASE) to generate the function name (i.e. add prefix or suffix)
* RB_TYPE the renderbuffer DataType
- * CI_MODE if set, color index mode, else RGBA
* SPAN_VARS to declare any local variables
* INIT_PIXEL_PTR(P, X, Y) to initialize a pointer to a pixel
* INC_PIXEL_PTR(P) to increment a pixel pointer by one pixel
@@ -113,9 +112,7 @@ GET_ROW( GLcontext *glCtx, GLint x, GLint y, GLuint n, char *row )
#include "main/macros.h"
-#ifdef CI_MODE
-#define RB_COMPONENTS 1
-#elif !defined(RB_COMPONENTS)
+#if !defined(RB_COMPONENTS)
#define RB_COMPONENTS 4
#endif
@@ -127,11 +124,7 @@ NAME(get_row)( GLcontext *ctx, struct gl_renderbuffer *rb,
#ifdef SPAN_VARS
SPAN_VARS
#endif
-#ifdef CI_MODE
- RB_TYPE *dest = (RB_TYPE *) values;
-#else
RB_TYPE (*dest)[RB_COMPONENTS] = (RB_TYPE (*)[RB_COMPONENTS]) values;
-#endif
GLuint i;
char *row = swrast_drawable(ctx->ReadBuffer)->row;
INIT_PIXEL_PTR(pixel, x, y);
@@ -151,11 +144,7 @@ NAME(get_values)( GLcontext *ctx, struct gl_renderbuffer *rb,
#ifdef SPAN_VARS
SPAN_VARS
#endif
-#ifdef CI_MODE
- RB_TYPE *dest = (RB_TYPE *) values;
-#else
RB_TYPE (*dest)[RB_COMPONENTS] = (RB_TYPE (*)[RB_COMPONENTS]) values;
-#endif
GLuint i;
for (i = 0; i < count; i++) {
RB_TYPE pixel[4];
@@ -198,7 +187,6 @@ NAME(put_row)( GLcontext *ctx, struct gl_renderbuffer *rb,
}
-#if !defined(CI_MODE)
static void
NAME(put_row_rgb)( GLcontext *ctx, struct gl_renderbuffer *rb,
GLuint count, GLint x, GLint y,
@@ -237,7 +225,6 @@ NAME(put_row_rgb)( GLcontext *ctx, struct gl_renderbuffer *rb,
}
(void) rb;
}
-#endif
static void
@@ -319,7 +306,6 @@ NAME(put_mono_values)( GLcontext *ctx, struct gl_renderbuffer *rb,
#undef NAME
#undef RB_TYPE
#undef RB_COMPONENTS
-#undef CI_MODE
#undef SPAN_VARS
#undef INIT_PIXEL_PTR
#undef INC_PIXEL_PTR
diff --git a/src/mesa/drivers/dri/tdfx/Makefile b/src/mesa/drivers/dri/tdfx/Makefile
index b9f25db4fe..96bd8f8202 100644
--- a/src/mesa/drivers/dri/tdfx/Makefile
+++ b/src/mesa/drivers/dri/tdfx/Makefile
@@ -5,9 +5,6 @@ include $(TOP)/configs/current
LIBNAME = tdfx_dri.so
-# not yet
-# MINIGLX_SOURCES = server/tdfx_dri.c
-
DRIVER_SOURCES = \
tdfx_context.c \
tdfx_dd.c \
diff --git a/src/mesa/drivers/dri/tdfx/server/tdfx_dri.c b/src/mesa/drivers/dri/tdfx/server/tdfx_dri.c
deleted file mode 100644
index 63fe875f59..0000000000
--- a/src/mesa/drivers/dri/tdfx/server/tdfx_dri.c
+++ /dev/null
@@ -1,471 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 5.1
- *
- * Copyright (C) 1999-2003 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:
- * Keith Whitwell
- * Daniel Borca
- */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-
-#include "driver.h"
-#include "drm.h"
-#include "imports.h"
-
-#include "dri_util.h"
-
-#include "tdfx_context.h"
-#include "tdfx_dri.h"
-#include "xf86drm.h"
-
-
-#define TILE_WIDTH 128
-#define TILE_HEIGHT 32
-
-#define CMDFIFO_PAGES 64
-
-
-static int
-calcBufferStride (int xres, int tiled, int cpp)
-{
- int strideInTiles;
-
- if (tiled) {
- /* Calculate tile width stuff */
- strideInTiles = (xres+TILE_WIDTH-1)/TILE_WIDTH;
-
- return strideInTiles*cpp*TILE_WIDTH;
- } else {
- return xres*cpp;
- }
-} /* calcBufferStride */
-
-
-static int
-calcBufferHeightInTiles (int yres)
-{
- int heightInTiles; /* Height of buffer in tiles */
-
- /* Calculate tile height stuff */
- heightInTiles = yres >> 5;
-
- if (yres & (TILE_HEIGHT - 1))
- heightInTiles++;
-
- return heightInTiles;
-
-} /* calcBufferHeightInTiles */
-
-
-static int
-calcBufferSize (int xres, int yres, int tiled, int cpp)
-{
- int stride, height, bufSize;
-
- if (tiled) {
- stride = calcBufferStride(xres, tiled, cpp);
- height = TILE_HEIGHT * calcBufferHeightInTiles(yres);
- } else {
- stride = xres*cpp;
- height = yres;
- }
-
- bufSize = stride * height;
-
- return bufSize;
-} /* calcBufferSize */
-
-
-static void allocateMemory (const DRIDriverContext *ctx, TDFXDRIPtr pTDFX)
-{
- int memRemaining, fifoSize, screenSizeInTiles;
- int fbSize;
- char *str;
- int pixmapCacheLinesMin;
- int cursorOffset, cursorSize;
-
- pTDFX->stride = calcBufferStride(pTDFX->width, !0, pTDFX->cpp);
-
- /* enough to do DVD */
- pixmapCacheLinesMin = ((720*480*pTDFX->cpp) +
- pTDFX->stride - 1)/pTDFX->stride;
-
- if (pTDFX->deviceID > PCI_CHIP_VOODOO3) {
- if ((pixmapCacheLinesMin + pTDFX->height) > 4095)
- pixmapCacheLinesMin = 4095 - pTDFX->height;
- } else {
- if ((pixmapCacheLinesMin + pTDFX->height) > 2047)
- pixmapCacheLinesMin = 2047 - pTDFX->height;
- }
-
- if (pTDFX->cpp!=3) {
- screenSizeInTiles=calcBufferSize(pTDFX->width, pTDFX->height,
- !0, pTDFX->cpp);
- }
- else {
- /* cpp==3 needs to bump up to 4 */
- screenSizeInTiles=calcBufferSize(pTDFX->width, pTDFX->height,
- !0, 4);
- }
-
- /*
- * Layout is:
- * cursor, fifo, fb, tex, bb, db
- */
-
- fbSize = (pTDFX->height + pixmapCacheLinesMin) * pTDFX->stride;
-
- memRemaining=(pTDFX->mem - 1) &~ 0xFFF;
- /* Note that a page is 4096 bytes, and a */
- /* tile is 32 x 128 = 4096 bytes. So, */
- /* page and tile boundaries are the same */
- /* Place the depth offset first, forcing */
- /* it to be on an *odd* page boundary. */
- pTDFX->depthOffset = (memRemaining - screenSizeInTiles) &~ 0xFFF;
- if ((pTDFX->depthOffset & (0x1 << 12)) == 0) {
- pTDFX->depthOffset -= (0x1 << 12);
- }
- /* Now, place the back buffer, forcing it */
- /* to be on an *even* page boundary. */
- pTDFX->backOffset = (pTDFX->depthOffset - screenSizeInTiles) &~ 0xFFF;
- if (pTDFX->backOffset & (0x1 << 12)) {
- pTDFX->backOffset -= (0x1 << 12);
- }
- /* Give the cmd fifo at least */
- /* CMDFIFO_PAGES pages, but no more than */
- /* 64. NOTE: Don't go higher than 64, as */
- /* there is suspect code in Glide3 ! */
- fifoSize = ((64 <= CMDFIFO_PAGES) ? 64 : CMDFIFO_PAGES) << 12;
-
- /* We give 4096 bytes to the cursor */
- cursorSize = 0/*4096*/;
- cursorOffset = 0;
-
- pTDFX->fifoOffset = cursorOffset + cursorSize;
- pTDFX->fifoSize = fifoSize;
- /* Now, place the front buffer, forcing */
- /* it to be on a page boundary too, just */
- /* for giggles. */
- pTDFX->fbOffset = pTDFX->fifoOffset + pTDFX->fifoSize;
- pTDFX->textureOffset = pTDFX->fbOffset + fbSize;
- if (pTDFX->depthOffset <= pTDFX->textureOffset ||
- pTDFX->backOffset <= pTDFX->textureOffset) {
- /*
- * pTDFX->textureSize < 0 means that the DRI is disabled. pTDFX->backOffset
- * is used to calculate the maximum amount of memory available for
- * 2D offscreen use. With DRI disabled, set this to the top of memory.
- */
-
- pTDFX->textureSize = -1;
- pTDFX->backOffset = pTDFX->mem;
- pTDFX->depthOffset = -1;
- fprintf(stderr,
- "Not enough video memory available for textures and depth buffer\n"
- "\tand/or back buffer. Disabling DRI. To use DRI try lower\n"
- "\tresolution modes and/or a smaller virtual screen size\n");
- } else {
- pTDFX->textureSize = pTDFX->backOffset - pTDFX->textureOffset;
- }
-}
-
-
-static int createScreen (DRIDriverContext *ctx, TDFXDRIPtr pTDFX)
-{
- int err;
-
- {
- int width_bytes = (ctx->shared.virtualWidth * ctx->cpp);
- int maxy = ctx->shared.fbSize / width_bytes;
-
-
- if (maxy <= ctx->shared.virtualHeight * 3) {
- fprintf(stderr,
- "Static buffer allocation failed -- "
- "need at least %d kB video memory (have %d kB)\n",
- (ctx->shared.virtualWidth * ctx->shared.virtualHeight *
- ctx->cpp * 3 + 1023) / 1024,
- ctx->shared.fbSize / 1024);
- return 0;
- }
- }
-
- ctx->shared.SAREASize = SAREA_MAX;
- pTDFX->regsSize = ctx->MMIOSize;
-
- /* Note that drmOpen will try to load the kernel module, if needed. */
- ctx->drmFD = drmOpen("tdfx", NULL );
- if (ctx->drmFD < 0) {
- fprintf(stderr, "[drm] drmOpen failed\n");
- return 0;
- }
-
- if ((err = drmSetBusid(ctx->drmFD, ctx->pciBusID)) < 0) {
- fprintf(stderr, "[drm] drmSetBusid failed (%d, %s), %s\n",
- ctx->drmFD, ctx->pciBusID, strerror(-err));
- return 0;
- }
-
- if (drmAddMap( ctx->drmFD,
- 0,
- ctx->shared.SAREASize,
- DRM_SHM,
- DRM_CONTAINS_LOCK,
- &ctx->shared.hSAREA) < 0)
- {
- fprintf(stderr, "[drm] drmAddMap failed\n");
- return 0;
- }
- fprintf(stderr, "[drm] added %d byte SAREA at 0x%08lx\n",
- ctx->shared.SAREASize, ctx->shared.hSAREA);
-
- if (drmMap( ctx->drmFD,
- ctx->shared.hSAREA,
- ctx->shared.SAREASize,
- (drmAddressPtr)(&ctx->pSAREA)) < 0)
- {
- fprintf(stderr, "[drm] drmMap failed\n");
- return 0;
- }
- memset(ctx->pSAREA, 0, ctx->shared.SAREASize);
- fprintf(stderr, "[drm] mapped SAREA 0x%08lx to %p, size %d\n",
- ctx->shared.hSAREA, ctx->pSAREA, ctx->shared.SAREASize);
-
- /* Need to AddMap the framebuffer and mmio regions here:
- */
- if (drmAddMap( ctx->drmFD,
- (drm_handle_t)ctx->FBStart,
- ctx->FBSize,
- DRM_FRAME_BUFFER,
-#ifndef _EMBEDDED
- 0,
-#else
- DRM_READ_ONLY,
-#endif
- &ctx->shared.hFrameBuffer) < 0)
- {
- fprintf(stderr, "[drm] drmAddMap framebuffer failed\n");
- return 0;
- }
-
- fprintf(stderr, "[drm] framebuffer handle = 0x%08lx\n",
- ctx->shared.hFrameBuffer);
-
-
- if (drmAddMap(ctx->drmFD,
- ctx->MMIOStart,
- ctx->MMIOSize,
- DRM_REGISTERS,
- DRM_READ_ONLY,
- &pTDFX->regs) < 0) {
- fprintf(stderr, "[drm] drmAddMap mmio failed\n");
- return 0;
- }
- fprintf(stderr,
- "[drm] register handle = 0x%08lx\n", pTDFX->regs);
-
-
- /* Create a 'server' context so we can grab the lock for
- * initialization ioctls.
- */
- if ((err = drmCreateContext(ctx->drmFD, &ctx->serverContext)) != 0) {
- fprintf(stderr, "%s: drmCreateContext failed %d\n", __FUNCTION__, err);
- return 0;
- }
-
- DRM_LOCK(ctx->drmFD, ctx->pSAREA, ctx->serverContext, 0);
-
- /* Initialize the kernel data structures */
-
- /* Initialize kernel gart memory manager */
- allocateMemory(ctx, pTDFX);
-
- /* Initialize the SAREA private data structure */
-
-
- /* Quick hack to clear the front & back buffers. Could also use
- * the clear ioctl to do this, but would need to setup hw state
- * first.
- */
-
-
- /* This is the struct passed to tdfx_dri.so for its initialization */
- ctx->driverClientMsg = malloc(sizeof(TDFXDRIRec));
- ctx->driverClientMsgSize = sizeof(TDFXDRIRec);
- memcpy(ctx->driverClientMsg, pTDFX, ctx->driverClientMsgSize);
- pTDFX = (TDFXDRIPtr)ctx->driverClientMsg;
-
- /* Don't release the lock now - let the VT switch handler do it. */
-
- return 1;
-}
-
-
-/**
- * \brief Validate the fbdev mode.
- *
- * \param ctx display handle.
- *
- * \return one on success, or zero on failure.
- *
- * Saves some registers and returns 1.
- *
- * \sa tdfxValidateMode().
- */
-static int tdfxValidateMode( const DRIDriverContext *ctx )
-{
- return 1;
-}
-
-
-/**
- * \brief Examine mode returned by fbdev.
- *
- * \param ctx display handle.
- *
- * \return one on success, or zero on failure.
- *
- * Restores registers that fbdev has clobbered and returns 1.
- *
- * \sa tdfxValidateMode().
- */
-static int tdfxPostValidateMode( const DRIDriverContext *ctx )
-{
- return 1;
-}
-
-
-/**
- * \brief Initialize the framebuffer device mode
- *
- * \param ctx display handle.
- *
- * \return one on success, or zero on failure.
- *
- * Before exiting clears the framebuffer memory accessing it directly.
- */
-static int tdfxInitFBDev( DRIDriverContext *ctx )
-{
- TDFXDRIPtr pTDFX = calloc(1, sizeof(TDFXDRIRec));
-
- {
- int dummy = ctx->shared.virtualWidth;
-
- switch (ctx->bpp / 8) {
- case 1: dummy = (ctx->shared.virtualWidth + 127) & ~127; break;
- case 2: dummy = (ctx->shared.virtualWidth + 31) & ~31; break;
- case 3:
- case 4: dummy = (ctx->shared.virtualWidth + 15) & ~15; break;
- }
-
- ctx->shared.virtualWidth = dummy;
- }
-
- ctx->driverPrivate = (void *)pTDFX;
-
- pTDFX->deviceID = ctx->chipset;
- pTDFX->width = ctx->shared.virtualWidth;
- pTDFX->height = ctx->shared.virtualHeight;
- pTDFX->cpp = ctx->cpp;
- pTDFX->mem = ctx->FBSize; /* ->shared.fbSize? mem probe? */
- pTDFX->sarea_priv_offset = sizeof(drm_sarea_t);
-
- if (!createScreen(ctx, pTDFX))
- return 0;
-
- return 1;
-}
-
-
-/**
- * \brief The screen is being closed, so clean up any state and free any
- * resources used by the DRI.
- *
- * \param ctx display handle.
- *
- * Unmaps the SAREA, closes the DRM device file descriptor and frees the driver
- * private data.
- */
-static void tdfxHaltFBDev( DRIDriverContext *ctx )
-{
- drmUnmap( ctx->pSAREA, ctx->shared.SAREASize );
- drmClose(ctx->drmFD);
-
- if (ctx->driverPrivate) {
- free(ctx->driverPrivate);
- ctx->driverPrivate = 0;
- }
-}
-
-
-/**
- * \brief Shutdown the drawing engine.
- *
- * \param ctx display handle
- *
- * Turns off the 3D engine & restores the graphics card
- * to a state that fbdev understands.
- */
-static int tdfxEngineShutdown( const DRIDriverContext *ctx )
-{
- fprintf(stderr, "%s: not implemented\n", __FUNCTION__);
- return 1;
-}
-
-
-/**
- * \brief Restore the drawing engine.
- *
- * \param ctx display handle
- *
- * Resets the graphics card and sets initial values for several registers of
- * the card's drawing engine.
- *
- * Turns on 3dfx
- */
-static int tdfxEngineRestore( const DRIDriverContext *ctx )
-{
- fprintf(stderr, "%s: not implemented\n", __FUNCTION__);
- return 1;
-}
-
-
-/**
- * \brief Exported driver interface for Mini GLX.
- *
- * \sa DRIDriverRec.
- */
-struct DRIDriverRec __driDriver = {
- tdfxValidateMode,
- tdfxPostValidateMode,
- tdfxInitFBDev,
- tdfxHaltFBDev,
- tdfxEngineShutdown,
- tdfxEngineRestore,
- 0
-};
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_tris.c b/src/mesa/drivers/dri/tdfx/tdfx_tris.c
index 8824988895..d65833c20b 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_tris.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_tris.c
@@ -320,7 +320,6 @@ static struct {
#define DO_POINTS 1
#define DO_FULL_QUAD 1
-#define HAVE_RGBA 1
#define HAVE_SPEC 0
#define HAVE_HW_FLATSHADE 0
#define HAVE_BACK_COLORS 0
diff --git a/src/mesa/drivers/dri/unichrome/Makefile b/src/mesa/drivers/dri/unichrome/Makefile
index 344d34fce3..14cf9f3038 100644
--- a/src/mesa/drivers/dri/unichrome/Makefile
+++ b/src/mesa/drivers/dri/unichrome/Makefile
@@ -5,8 +5,6 @@ include $(TOP)/configs/current
LIBNAME = unichrome_dri.so
-MINIGLX_SOURCES = server/via_dri.c
-
DRIVER_SOURCES = \
via_context.c \
via_fb.c \
diff --git a/src/mesa/drivers/dri/unichrome/server/via_dri.c b/src/mesa/drivers/dri/unichrome/server/via_dri.c
deleted file mode 100644
index 74034485e2..0000000000
--- a/src/mesa/drivers/dri/unichrome/server/via_dri.c
+++ /dev/null
@@ -1,1251 +0,0 @@
-/*
- * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
- * Copyright 2001-2003 S3 Graphics, 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, sub license,
- * 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 NON-INFRINGEMENT. IN NO EVENT SHALL
- * VIA, S3 GRAPHICS, 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.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-
-#include "driver.h"
-#include "drm.h"
-#include "imports.h"
-
-#include "dri_util.h"
-
-#include "via_context.h"
-#include "via_dri.h"
-#include "via_driver.h"
-#include "xf86drm.h"
-
-static void VIAEnableMMIO(DRIDriverContext * ctx);
-static void VIADisableMMIO(DRIDriverContext * ctx);
-static void VIADisableExtendedFIFO(DRIDriverContext *ctx);
-static void VIAEnableExtendedFIFO(DRIDriverContext *ctx);
-static void VIAInitialize2DEngine(DRIDriverContext *ctx);
-static void VIAInitialize3DEngine(DRIDriverContext *ctx);
-
-static int VIADRIScreenInit(DRIDriverContext * ctx);
-static void VIADRICloseScreen(DRIDriverContext * ctx);
-static int VIADRIFinishScreenInit(DRIDriverContext * ctx);
-
-/* _SOLO : missing macros normally defined by X code */
-#define xf86DrvMsg(a, b, ...) fprintf(stderr, __VA_ARGS__)
-#define MMIO_IN8(base, addr) ((*(((volatile uint8_t*)base)+(addr)))+0)
-#define MMIO_OUT8(base, addr, val) ((*(((volatile uint8_t*)base)+(addr)))=((uint8_t)val))
-#define MMIO_OUT16(base, addr, val) ((*(volatile uint16_t*)(((uint8_t*)base)+(addr)))=((uint16_t)val))
-
-#define VIDEO 0
-#define AGP 1
-#define AGP_PAGE_SIZE 4096
-#define AGP_PAGES 8192
-#define AGP_SIZE (AGP_PAGE_SIZE * AGP_PAGES)
-#define AGP_CMDBUF_PAGES 512
-#define AGP_CMDBUF_SIZE (AGP_PAGE_SIZE * AGP_CMDBUF_PAGES)
-
-static char VIAKernelDriverName[] = "via";
-static char VIAClientDriverName[] = "unichrome";
-
-static int VIADRIAgpInit(const DRIDriverContext *ctx, VIAPtr pVia);
-static int VIADRIPciInit(DRIDriverContext * ctx, VIAPtr pVia);
-static int VIADRIFBInit(DRIDriverContext * ctx, VIAPtr pVia);
-static int VIADRIKernelInit(DRIDriverContext * ctx, VIAPtr pVia);
-static int VIADRIMapInit(DRIDriverContext * ctx, VIAPtr pVia);
-
-static void VIADRIIrqInit( DRIDriverContext *ctx )
-{
- VIAPtr pVia = VIAPTR(ctx);
- VIADRIPtr pVIADRI = pVia->devPrivate;
-
- pVIADRI->irqEnabled = drmGetInterruptFromBusID(pVia->drmFD,
- ctx->pciBus,
- ctx->pciDevice,
- ctx->pciFunc);
-
- if ((drmCtlInstHandler(pVia->drmFD, pVIADRI->irqEnabled))) {
- xf86DrvMsg(pScreen->myNum, X_WARNING,
- "[drm] Failure adding irq handler. "
- "Falling back to irq-free operation.\n");
- pVIADRI->irqEnabled = 0;
- }
-
- if (pVIADRI->irqEnabled)
- xf86DrvMsg(pScreen->myNum, X_INFO,
- "[drm] Irq handler installed, using IRQ %d.\n",
- pVIADRI->irqEnabled);
-}
-
-static void VIADRIIrqExit( DRIDriverContext *ctx ) {
- VIAPtr pVia = VIAPTR(ctx);
- VIADRIPtr pVIADRI = pVia->devPrivate;
-
- if (pVIADRI->irqEnabled) {
- if (drmCtlUninstHandler(pVia->drmFD)) {
- xf86DrvMsg(pScreen-myNum, X_INFO,"[drm] Irq handler uninstalled.\n");
- } else {
- xf86DrvMsg(pScreen->myNum, X_ERROR,
- "[drm] Could not uninstall irq handler.\n");
- }
- }
-}
-
-static void VIADRIRingBufferCleanup(DRIDriverContext *ctx)
-{
- VIAPtr pVia = VIAPTR(ctx);
- VIADRIPtr pVIADRI = pVia->devPrivate;
- drm_via_dma_init_t ringBufInit;
-
- if (pVIADRI->ringBufActive) {
- xf86DrvMsg(pScreen->myNum, X_INFO,
- "[drm] Cleaning up DMA ring-buffer.\n");
- ringBufInit.func = VIA_CLEANUP_DMA;
- if (drmCommandWrite(pVia->drmFD, DRM_VIA_DMA_INIT, &ringBufInit,
- sizeof(ringBufInit))) {
- xf86DrvMsg(pScreen->myNum, X_WARNING,
- "[drm] Failed to clean up DMA ring-buffer: %d\n", errno);
- }
- pVIADRI->ringBufActive = 0;
- }
-}
-
-static int VIADRIRingBufferInit(DRIDriverContext *ctx)
-{
- VIAPtr pVia = VIAPTR(ctx);
- VIADRIPtr pVIADRI = pVia->devPrivate;
- drm_via_dma_init_t ringBufInit;
- drmVersionPtr drmVer;
-
- pVIADRI->ringBufActive = 0;
-
- if (NULL == (drmVer = drmGetVersion(pVia->drmFD))) {
- return GL_FALSE;
- }
-
- if (((drmVer->version_major <= 1) && (drmVer->version_minor <= 3))) {
- return GL_FALSE;
- }
-
- /*
- * Info frome code-snippet on DRI-DEVEL list; Erdi Chen.
- */
-
- switch (pVia->ChipId) {
- case PCI_CHIP_VT3259:
- ringBufInit.reg_pause_addr = 0x40c;
- break;
- default:
- ringBufInit.reg_pause_addr = 0x418;
- break;
- }
-
- ringBufInit.offset = pVia->agpSize;
- ringBufInit.size = AGP_CMDBUF_SIZE;
- ringBufInit.func = VIA_INIT_DMA;
- if (drmCommandWrite(pVia->drmFD, DRM_VIA_DMA_INIT, &ringBufInit,
- sizeof(ringBufInit))) {
- xf86DrvMsg(pScreen->myNum, X_ERROR,
- "[drm] Failed to initialize DMA ring-buffer: %d\n", errno);
- return GL_FALSE;
- }
- xf86DrvMsg(pScreen->myNum, X_INFO,
- "[drm] Initialized AGP ring-buffer, size 0x%lx at AGP offset 0x%lx.\n",
- ringBufInit.size, ringBufInit.offset);
-
- pVIADRI->ringBufActive = 1;
- return GL_TRUE;
-}
-
-static int VIADRIAgpInit(const DRIDriverContext *ctx, VIAPtr pVia)
-{
- unsigned long agp_phys;
- drmAddress agpaddr;
- VIADRIPtr pVIADRI;
- pVIADRI = pVia->devPrivate;
- pVia->agpSize = 0;
-
- if (drmAgpAcquire(pVia->drmFD) < 0) {
- xf86DrvMsg(pScreen->myNum, X_ERROR, "[drm] drmAgpAcquire failed %d\n", errno);
- return GL_FALSE;
- }
-
- if (drmAgpEnable(pVia->drmFD, drmAgpGetMode(pVia->drmFD)&~0x0) < 0) {
- xf86DrvMsg(pScreen->myNum, X_ERROR, "[drm] drmAgpEnable failed\n");
- return GL_FALSE;
- }
-
- xf86DrvMsg(pScreen->myNum, X_INFO, "[drm] drmAgpEnabled succeeded\n");
-
- if (drmAgpAlloc(pVia->drmFD, AGP_SIZE, 0, &agp_phys, &pVia->agpHandle) < 0) {
- xf86DrvMsg(pScreen->myNum, X_ERROR,
- "[drm] drmAgpAlloc failed\n");
- drmAgpRelease(pVia->drmFD);
- return GL_FALSE;
- }
-
- if (drmAgpBind(pVia->drmFD, pVia->agpHandle, 0) < 0) {
- xf86DrvMsg(pScreen->myNum, X_ERROR,
- "[drm] drmAgpBind failed\n");
- drmAgpFree(pVia->drmFD, pVia->agpHandle);
- drmAgpRelease(pVia->drmFD);
-
- return GL_FALSE;
- }
-
- /*
- * Place the ring-buffer last in the AGP region, and restrict the
- * public map not to include the buffer for security reasons.
- */
-
- pVia->agpSize = AGP_SIZE - AGP_CMDBUF_SIZE;
- pVia->agpAddr = drmAgpBase(pVia->drmFD);
- xf86DrvMsg(pScreen->myNum, X_INFO,
- "[drm] agpAddr = 0x%08lx\n",pVia->agpAddr);
-
- pVIADRI->agp.size = pVia->agpSize;
- if (drmAddMap(pVia->drmFD, (drm_handle_t)0,
- pVIADRI->agp.size, DRM_AGP, 0,
- &pVIADRI->agp.handle) < 0) {
- xf86DrvMsg(pScreen->myNum, X_ERROR,
- "[drm] Failed to map public agp area\n");
- pVIADRI->agp.size = 0;
- return GL_FALSE;
- }
- /* Map AGP from kernel to Xserver - Not really needed */
- drmMap(pVia->drmFD, pVIADRI->agp.handle,pVIADRI->agp.size, &agpaddr);
-
- xf86DrvMsg(pScreen->myNum, X_INFO,
- "[drm] agpAddr = 0x%08lx\n", pVia->agpAddr);
- xf86DrvMsg(pScreen->myNum, X_INFO,
- "[drm] agpSize = 0x%08lx\n", pVia->agpSize);
- xf86DrvMsg(pScreen->myNum, X_INFO,
- "[drm] agp physical addr = 0x%08lx\n", agp_phys);
-
- {
- drm_via_agp_t agp;
- agp.offset = 0;
- agp.size = AGP_SIZE-AGP_CMDBUF_SIZE;
- if (drmCommandWrite(pVia->drmFD, DRM_VIA_AGP_INIT, &agp,
- sizeof(drm_via_agp_t)) < 0) {
- drmUnmap(&agpaddr,pVia->agpSize);
- drmRmMap(pVia->drmFD,pVIADRI->agp.handle);
- drmAgpUnbind(pVia->drmFD, pVia->agpHandle);
- drmAgpFree(pVia->drmFD, pVia->agpHandle);
- drmAgpRelease(pVia->drmFD);
- return GL_FALSE;
- }
- }
-
- return GL_TRUE;
-}
-
-static int VIADRIFBInit(DRIDriverContext * ctx, VIAPtr pVia)
-{
- int FBSize = pVia->FBFreeEnd-pVia->FBFreeStart;
- int FBOffset = pVia->FBFreeStart;
- VIADRIPtr pVIADRI = pVia->devPrivate;
- pVIADRI->fbOffset = FBOffset;
- pVIADRI->fbSize = pVia->videoRambytes;
-
- {
- drm_via_fb_t fb;
- fb.offset = FBOffset;
- fb.size = FBSize;
-
- if (drmCommandWrite(pVia->drmFD, DRM_VIA_FB_INIT, &fb,
- sizeof(drm_via_fb_t)) < 0) {
- xf86DrvMsg(pScreen->myNum, X_ERROR,
- "[drm] failed to init frame buffer area\n");
- return GL_FALSE;
- } else {
- xf86DrvMsg(pScreen->myNum, X_INFO,
- "[drm] FBFreeStart= 0x%08x FBFreeEnd= 0x%08x "
- "FBSize= 0x%08x\n",
- pVia->FBFreeStart, pVia->FBFreeEnd, FBSize);
- return GL_TRUE;
- }
- }
-}
-
-static int VIADRIPciInit(DRIDriverContext * ctx, VIAPtr pVia)
-{
- return GL_TRUE;
-}
-
-static int VIADRIScreenInit(DRIDriverContext * ctx)
-{
- VIAPtr pVia = VIAPTR(ctx);
- VIADRIPtr pVIADRI;
- int err;
-
-#if 0
- ctx->shared.SAREASize = ((sizeof(drm_sarea_t) + 0xfff) & 0x1000);
-#else
- if (sizeof(drm_sarea_t)+sizeof(drm_via_sarea_t) > SAREA_MAX) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "Data does not fit in SAREA\n");
- return GL_FALSE;
- }
- ctx->shared.SAREASize = SAREA_MAX;
-#endif
-
- ctx->drmFD = drmOpen(VIAKernelDriverName, NULL);
- if (ctx->drmFD < 0) {
- fprintf(stderr, "[drm] drmOpen failed\n");
- return 0;
- }
- pVia->drmFD = ctx->drmFD;
-
- err = drmSetBusid(ctx->drmFD, ctx->pciBusID);
- if (err < 0) {
- fprintf(stderr, "[drm] drmSetBusid failed (%d, %s), %s\n",
- ctx->drmFD, ctx->pciBusID, strerror(-err));
- return 0;
- }
-
- err = drmAddMap(ctx->drmFD, 0, ctx->shared.SAREASize, DRM_SHM,
- DRM_CONTAINS_LOCK, &ctx->shared.hSAREA);
- if (err < 0) {
- fprintf(stderr, "[drm] drmAddMap failed\n");
- return 0;
- }
- fprintf(stderr, "[drm] added %d byte SAREA at 0x%08lx\n",
- ctx->shared.SAREASize, ctx->shared.hSAREA);
-
- if (drmMap(ctx->drmFD,
- ctx->shared.hSAREA,
- ctx->shared.SAREASize,
- (drmAddressPtr)(&ctx->pSAREA)) < 0)
- {
- fprintf(stderr, "[drm] drmMap failed\n");
- return 0;
- }
- memset(ctx->pSAREA, 0, ctx->shared.SAREASize);
- fprintf(stderr, "[drm] mapped SAREA 0x%08lx to %p, size %d\n",
- ctx->shared.hSAREA, ctx->pSAREA, ctx->shared.SAREASize);
-
- /* Need to AddMap the framebuffer and mmio regions here:
- */
- if (drmAddMap(ctx->drmFD,
- (drm_handle_t)ctx->FBStart,
- ctx->FBSize,
- DRM_FRAME_BUFFER,
-#ifndef _EMBEDDED
- 0,
-#else
- DRM_READ_ONLY,
-#endif
- &ctx->shared.hFrameBuffer) < 0)
- {
- fprintf(stderr, "[drm] drmAddMap framebuffer failed\n");
- return 0;
- }
-
- fprintf(stderr, "[drm] framebuffer handle = 0x%08lx\n",
- ctx->shared.hFrameBuffer);
-
- pVIADRI = (VIADRIPtr) CALLOC(sizeof(VIADRIRec));
- if (!pVIADRI) {
- drmClose(ctx->drmFD);
- return GL_FALSE;
- }
- pVia->devPrivate = pVIADRI;
- ctx->driverClientMsg = pVIADRI;
- ctx->driverClientMsgSize = sizeof(*pVIADRI);
-
- /* DRIScreenInit doesn't add all the common mappings. Add additional mappings here. */
- if (!VIADRIMapInit(ctx, pVia)) {
- VIADRICloseScreen(ctx);
- return GL_FALSE;
- }
-
- pVIADRI->regs.size = VIA_MMIO_REGSIZE;
- pVIADRI->regs.handle = pVia->registerHandle;
- xf86DrvMsg(pScreen->myNum, X_INFO, "[drm] mmio Registers = 0x%08lx\n",
- pVIADRI->regs.handle);
-
- if (drmMap(pVia->drmFD,
- pVIADRI->regs.handle,
- pVIADRI->regs.size,
- (drmAddress *)&pVia->MapBase) != 0)
- {
- VIADRICloseScreen(ctx);
- return GL_FALSE;
- }
-
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[dri] mmio mapped.\n" );
-
- VIAEnableMMIO(ctx);
-
- /* Get video memory clock. */
- VGAOUT8(0x3D4, 0x3D);
- pVia->MemClk = (VGAIN8(0x3D5) & 0xF0) >> 4;
- xf86DrvMsg(0, X_INFO, "[dri] MemClk (0x%x)\n", pVia->MemClk);
-
- /* 3D rendering has noise if not enabled. */
- VIAEnableExtendedFIFO(ctx);
-
- VIAInitialize2DEngine(ctx);
-
- /* Must disable MMIO or 3D won't work. */
- VIADisableMMIO(ctx);
-
- VIAInitialize3DEngine(ctx);
-
- pVia->IsPCI = !VIADRIAgpInit(ctx, pVia);
-
- if (pVia->IsPCI) {
- VIADRIPciInit(ctx, pVia);
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[dri] use pci.\n" );
- }
- else
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[dri] use agp.\n" );
-
- if (!(VIADRIFBInit(ctx, pVia))) {
- VIADRICloseScreen(ctx);
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[dri] frame buffer initialize fail .\n" );
- return GL_FALSE;
- }
-
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[dri] frame buffer initialized.\n" );
-
- return VIADRIFinishScreenInit(ctx);
-}
-
-static void
-VIADRICloseScreen(DRIDriverContext * ctx)
-{
- VIAPtr pVia = VIAPTR(ctx);
- VIADRIPtr pVIADRI=(VIADRIPtr)pVia->devPrivate;
-
- VIADRIRingBufferCleanup(ctx);
-
- if (pVia->MapBase) {
- xf86DrvMsg(pScreen->myNum, X_INFO, "[drm] Unmapping MMIO registers\n");
- drmUnmap(pVia->MapBase, pVIADRI->regs.size);
- }
-
- if (pVia->agpSize) {
- xf86DrvMsg(pScreen->myNum, X_INFO, "[drm] Freeing agp memory\n");
- drmAgpFree(pVia->drmFD, pVia->agpHandle);
- xf86DrvMsg(pScreen->myNum, X_INFO, "[drm] Releasing agp module\n");
- drmAgpRelease(pVia->drmFD);
- }
-
-#if 0
- if (pVia->DRIIrqEnable)
-#endif
- VIADRIIrqExit(ctx);
-}
-
-static int
-VIADRIFinishScreenInit(DRIDriverContext * ctx)
-{
- VIAPtr pVia = VIAPTR(ctx);
- VIADRIPtr pVIADRI;
- int err;
-
- err = drmCreateContext(ctx->drmFD, &ctx->serverContext);
- if (err != 0) {
- fprintf(stderr, "%s: drmCreateContext failed %d\n", __FUNCTION__, err);
- return GL_FALSE;
- }
-
- DRM_LOCK(ctx->drmFD, ctx->pSAREA, ctx->serverContext, 0);
-
-
- if (!VIADRIKernelInit(ctx, pVia)) {
- VIADRICloseScreen(ctx);
- return GL_FALSE;
- }
- xf86DrvMsg(pScreen->myNum, X_INFO, "[dri] kernel data initialized.\n");
-
- /* set SAREA value */
- {
- drm_via_sarea_t *saPriv;
-
- saPriv=(drm_via_sarea_t*)(((char*)ctx->pSAREA) +
- sizeof(drm_sarea_t));
- assert(saPriv);
- memset(saPriv, 0, sizeof(*saPriv));
- saPriv->ctxOwner = -1;
- }
- pVIADRI=(VIADRIPtr)pVia->devPrivate;
- pVIADRI->deviceID=pVia->Chipset;
- pVIADRI->width=ctx->shared.virtualWidth;
- pVIADRI->height=ctx->shared.virtualHeight;
- pVIADRI->mem=ctx->shared.fbSize;
- pVIADRI->bytesPerPixel= (ctx->bpp+7) / 8;
- pVIADRI->sarea_priv_offset = sizeof(drm_sarea_t);
- /* TODO */
- pVIADRI->scrnX=pVIADRI->width;
- pVIADRI->scrnY=pVIADRI->height;
-
- /* Initialize IRQ */
-#if 0
- if (pVia->DRIIrqEnable)
-#endif
- VIADRIIrqInit(ctx);
-
- pVIADRI->ringBufActive = 0;
- VIADRIRingBufferInit(ctx);
-
- return GL_TRUE;
-}
-
-/* Initialize the kernel data structures. */
-static int VIADRIKernelInit(DRIDriverContext * ctx, VIAPtr pVia)
-{
- drm_via_init_t drmInfo;
- memset(&drmInfo, 0, sizeof(drm_via_init_t));
- drmInfo.sarea_priv_offset = sizeof(drm_sarea_t);
- drmInfo.func = VIA_INIT_MAP;
- drmInfo.fb_offset = pVia->FrameBufferBase;
- drmInfo.mmio_offset = pVia->registerHandle;
- if (pVia->IsPCI)
- drmInfo.agpAddr = (uint32_t)NULL;
- else
- drmInfo.agpAddr = (uint32_t)pVia->agpAddr;
-
- if ((drmCommandWrite(pVia->drmFD, DRM_VIA_MAP_INIT,&drmInfo,
- sizeof(drm_via_init_t))) < 0)
- return GL_FALSE;
-
- return GL_TRUE;
-}
-/* Add a map for the MMIO registers */
-static int VIADRIMapInit(DRIDriverContext * ctx, VIAPtr pVia)
-{
- int flags = 0;
-
- if (drmAddMap(pVia->drmFD, pVia->MmioBase, VIA_MMIO_REGSIZE,
- DRM_REGISTERS, flags, &pVia->registerHandle) < 0) {
- return GL_FALSE;
- }
-
- xf86DrvMsg(pScreen->myNum, X_INFO,
- "[drm] register handle = 0x%08lx\n", pVia->registerHandle);
-
- return GL_TRUE;
-}
-
-static int viaValidateMode(const DRIDriverContext *ctx)
-{
- VIAPtr pVia = VIAPTR(ctx);
-
- return 1;
-}
-
-static int viaPostValidateMode(const DRIDriverContext *ctx)
-{
- VIAPtr pVia = VIAPTR(ctx);
-
- return 1;
-}
-
-static void VIAEnableMMIO(DRIDriverContext * ctx)
-{
- /*vgaHWPtr hwp = VGAHWPTR(ctx);*/
- VIAPtr pVia = VIAPTR(ctx);
- unsigned char val;
-
-#if 0
- if (xf86IsPrimaryPci(pVia->PciInfo)) {
- /* If we are primary card, we still use std vga port. If we use
- * MMIO, system will hang in vgaHWSave when our card used in
- * PLE and KLE (integrated Trident MVP4)
- */
- vgaHWSetStdFuncs(hwp);
- }
- else {
- vgaHWSetMmioFuncs(hwp, pVia->MapBase, 0x8000);
- }
-#endif
-
- val = VGAIN8(0x3c3);
- VGAOUT8(0x3c3, val | 0x01);
- val = VGAIN8(0x3cc);
- VGAOUT8(0x3c2, val | 0x01);
-
- /* Unlock Extended IO Space */
- VGAOUT8(0x3c4, 0x10);
- VGAOUT8(0x3c5, 0x01);
-
- /* Enable MMIO */
- if(!pVia->IsSecondary) {
- VGAOUT8(0x3c4, 0x1a);
- val = VGAIN8(0x3c5);
-#ifdef DEBUG
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "primary val = %x\n", val);
-#endif
- VGAOUT8(0x3c5, val | 0x68);
- }
- else {
- VGAOUT8(0x3c4, 0x1a);
- val = VGAIN8(0x3c5);
-#ifdef DEBUG
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "secondary val = %x\n", val);
-#endif
- VGAOUT8(0x3c5, val | 0x38);
- }
-
- /* Unlock CRTC registers */
- VGAOUT8(0x3d4, 0x47);
- VGAOUT8(0x3d5, 0x00);
-
- return;
-}
-
-static void VIADisableMMIO(DRIDriverContext * ctx)
-{
- VIAPtr pVia = VIAPTR(ctx);
- unsigned char val;
-
- VGAOUT8(0x3c4, 0x1a);
- val = VGAIN8(0x3c5);
- VGAOUT8(0x3c5, val & 0x97);
-
- return;
-}
-
-static void VIADisableExtendedFIFO(DRIDriverContext *ctx)
-{
- VIAPtr pVia = VIAPTR(ctx);
- uint32_t dwGE230, dwGE298;
-
- /* Cause of exit XWindow will dump back register value, others chipset no
- * need to set extended fifo value */
- if (pVia->Chipset == VIA_CLE266 && pVia->ChipRev < 15 &&
- (ctx->shared.virtualWidth > 1024 || pVia->HasSecondary)) {
- /* Turn off Extend FIFO */
- /* 0x298[29] */
- dwGE298 = VIAGETREG(0x298);
- VIASETREG(0x298, dwGE298 | 0x20000000);
- /* 0x230[21] */
- dwGE230 = VIAGETREG(0x230);
- VIASETREG(0x230, dwGE230 & ~0x00200000);
- /* 0x298[29] */
- dwGE298 = VIAGETREG(0x298);
- VIASETREG(0x298, dwGE298 & ~0x20000000);
- }
-}
-
-static void VIAEnableExtendedFIFO(DRIDriverContext *ctx)
-{
- VIAPtr pVia = VIAPTR(ctx);
- uint8_t bRegTemp;
- uint32_t dwGE230, dwGE298;
-
- switch (pVia->Chipset) {
- case VIA_CLE266:
- if (pVia->ChipRev > 14) { /* For 3123Cx */
- if (pVia->HasSecondary) { /* SAMM or DuoView case */
- if (ctx->shared.virtualWidth >= 1024)
- {
- /* 3c5.16[0:5] */
- VGAOUT8(0x3C4, 0x16);
- bRegTemp = VGAIN8(0x3C5);
- bRegTemp &= ~0x3F;
- bRegTemp |= 0x1C;
- VGAOUT8(0x3C5, bRegTemp);
- /* 3c5.17[0:6] */
- VGAOUT8(0x3C4, 0x17);
- bRegTemp = VGAIN8(0x3C5);
- bRegTemp &= ~0x7F;
- bRegTemp |= 0x3F;
- VGAOUT8(0x3C5, bRegTemp);
- pVia->EnableExtendedFIFO = GL_TRUE;
- }
- }
- else /* Single view or Simultaneoue case */
- {
- if (ctx->shared.virtualWidth > 1024)
- {
- /* 3c5.16[0:5] */
- VGAOUT8(0x3C4, 0x16);
- bRegTemp = VGAIN8(0x3C5);
- bRegTemp &= ~0x3F;
- bRegTemp |= 0x17;
- VGAOUT8(0x3C5, bRegTemp);
- /* 3c5.17[0:6] */
- VGAOUT8(0x3C4, 0x17);
- bRegTemp = VGAIN8(0x3C5);
- bRegTemp &= ~0x7F;
- bRegTemp |= 0x2F;
- VGAOUT8(0x3C5, bRegTemp);
- pVia->EnableExtendedFIFO = GL_TRUE;
- }
- }
- /* 3c5.18[0:5] */
- VGAOUT8(0x3C4, 0x18);
- bRegTemp = VGAIN8(0x3C5);
- bRegTemp &= ~0x3F;
- bRegTemp |= 0x17;
- bRegTemp |= 0x40; /* force the preq always higher than treq */
- VGAOUT8(0x3C5, bRegTemp);
- }
- else { /* for 3123Ax */
- if (ctx->shared.virtualWidth > 1024 || pVia->HasSecondary) {
- /* Turn on Extend FIFO */
- /* 0x298[29] */
- dwGE298 = VIAGETREG(0x298);
- VIASETREG(0x298, dwGE298 | 0x20000000);
- /* 0x230[21] */
- dwGE230 = VIAGETREG(0x230);
- VIASETREG(0x230, dwGE230 | 0x00200000);
- /* 0x298[29] */
- dwGE298 = VIAGETREG(0x298);
- VIASETREG(0x298, dwGE298 & ~0x20000000);
-
- /* 3c5.16[0:5] */
- VGAOUT8(0x3C4, 0x16);
- bRegTemp = VGAIN8(0x3C5);
- bRegTemp &= ~0x3F;
- bRegTemp |= 0x17;
- /* bRegTemp |= 0x10; */
- VGAOUT8(0x3C5, bRegTemp);
- /* 3c5.17[0:6] */
- VGAOUT8(0x3C4, 0x17);
- bRegTemp = VGAIN8(0x3C5);
- bRegTemp &= ~0x7F;
- bRegTemp |= 0x2F;
- /*bRegTemp |= 0x1F;*/
- VGAOUT8(0x3C5, bRegTemp);
- /* 3c5.18[0:5] */
- VGAOUT8(0x3C4, 0x18);
- bRegTemp = VGAIN8(0x3C5);
- bRegTemp &= ~0x3F;
- bRegTemp |= 0x17;
- bRegTemp |= 0x40; /* force the preq always higher than treq */
- VGAOUT8(0x3C5, bRegTemp);
- pVia->EnableExtendedFIFO = GL_TRUE;
- }
- }
- break;
- case VIA_KM400:
- if (pVia->HasSecondary) { /* SAMM or DuoView case */
- if ((ctx->shared.virtualWidth >= 1600) &&
- (pVia->MemClk <= VIA_MEM_DDR200)) {
- /* enable CRT extendded FIFO */
- VGAOUT8(0x3C4, 0x17);
- VGAOUT8(0x3C5, 0x1C);
- /* revise second display queue depth and read threshold */
- VGAOUT8(0x3C4, 0x16);
- bRegTemp = VGAIN8(0x3C5);
- bRegTemp &= ~0x3F;
- bRegTemp = (bRegTemp) | (0x09);
- VGAOUT8(0x3C5, bRegTemp);
- }
- else {
- /* enable CRT extendded FIFO */
- VGAOUT8(0x3C4, 0x17);
- VGAOUT8(0x3C5,0x3F);
- /* revise second display queue depth and read threshold */
- VGAOUT8(0x3C4, 0x16);
- bRegTemp = VGAIN8(0x3C5);
- bRegTemp &= ~0x3F;
- bRegTemp = (bRegTemp) | (0x1C);
- VGAOUT8(0x3C5, bRegTemp);
- }
- /* 3c5.18[0:5] */
- VGAOUT8(0x3C4, 0x18);
- bRegTemp = VGAIN8(0x3C5);
- bRegTemp &= ~0x3F;
- bRegTemp |= 0x17;
- bRegTemp |= 0x40; /* force the preq always higher than treq */
- VGAOUT8(0x3C5, bRegTemp);
- pVia->EnableExtendedFIFO = GL_TRUE;
- }
- else {
- if ( (ctx->shared.virtualWidth > 1024) && (ctx->shared.virtualWidth <= 1280) )
- {
- /* enable CRT extendded FIFO */
- VGAOUT8(0x3C4, 0x17);
- VGAOUT8(0x3C5, 0x3F);
- /* revise second display queue depth and read threshold */
- VGAOUT8(0x3C4, 0x16);
- bRegTemp = VGAIN8(0x3C5);
- bRegTemp &= ~0x3F;
- bRegTemp = (bRegTemp) | (0x17);
- VGAOUT8(0x3C5, bRegTemp);
- pVia->EnableExtendedFIFO = GL_TRUE;
- }
- else if ((ctx->shared.virtualWidth > 1280))
- {
- /* enable CRT extendded FIFO */
- VGAOUT8(0x3C4, 0x17);
- VGAOUT8(0x3C5, 0x3F);
- /* revise second display queue depth and read threshold */
- VGAOUT8(0x3C4, 0x16);
- bRegTemp = VGAIN8(0x3C5);
- bRegTemp &= ~0x3F;
- bRegTemp = (bRegTemp) | (0x1C);
- VGAOUT8(0x3C5, bRegTemp);
- pVia->EnableExtendedFIFO = GL_TRUE;
- }
- else
- {
- /* enable CRT extendded FIFO */
- VGAOUT8(0x3C4, 0x17);
- VGAOUT8(0x3C5, 0x3F);
- /* revise second display queue depth and read threshold */
- VGAOUT8(0x3C4, 0x16);
- bRegTemp = VGAIN8(0x3C5);
- bRegTemp &= ~0x3F;
- bRegTemp = (bRegTemp) | (0x10);
- VGAOUT8(0x3C5, bRegTemp);
- }
- /* 3c5.18[0:5] */
- VGAOUT8(0x3C4, 0x18);
- bRegTemp = VGAIN8(0x3C5);
- bRegTemp &= ~0x3F;
- bRegTemp |= 0x17;
- bRegTemp |= 0x40; /* force the preq always higher than treq */
- VGAOUT8(0x3C5, bRegTemp);
- }
- break;
- case VIA_K8M800:
- /*=* R1 Display FIFO depth (384 /8 -1 -> 0xbf) SR17[7:0] (8bits) *=*/
- VGAOUT8(0x3c4, 0x17);
- VGAOUT8(0x3c5, 0xbf);
-
- /*=* R2 Display fetch datum threshold value (328/4 -> 0x52)
- SR16[5:0], SR16[7] (7bits) *=*/
- VGAOUT8(0x3c4, 0x16);
- bRegTemp = VGAIN8(0x3c5) & ~0xBF;
- bRegTemp |= (0x52 & 0x3F);
- bRegTemp |= ((0x52 & 0x40) << 1);
- VGAOUT8(0x3c5, bRegTemp);
-
- /*=* R3 Switch to the highest agent threshold value (74 -> 0x4a)
- SR18[5:0], SR18[7] (7bits) *=*/
- VGAOUT8(0x3c4, 0x18);
- bRegTemp = VGAIN8(0x3c5) & ~0xBF;
- bRegTemp |= (0x4a & 0x3F);
- bRegTemp |= ((0x4a & 0x40) << 1);
- VGAOUT8(0x3c5, bRegTemp);
-#if 0
- /*=* R4 Fetch Number for a scan line (unit: 8 bytes)
- SR1C[7:0], SR1D[1:0] (10bits) *=*/
- wRegTemp = (pBIOSInfo->offsetWidthByQWord >> 1) + 4;
- VGAOUT8(0x3c4, 0x1c);
- VGAOUT8(0x3c5, (uint8_t)(wRegTemp & 0xFF));
- VGAOUT8(0x3c4, 0x1d);
- bRegTemp = VGAIN8(0x3c5) & ~0x03;
- VGAOUT8(0x3c5, bRegTemp | ((wRegTemp & 0x300) >> 8));
-#endif
- if (ctx->shared.virtualWidth >= 1400 && ctx->bpp == 32)
- {
- /*=* Max. length for a request SR22[4:0] (64/4 -> 0x10) *=*/
- VGAOUT8(0x3c4, 0x22);
- bRegTemp = VGAIN8(0x3c5) & ~0x1F;
- VGAOUT8(0x3c5, bRegTemp | 0x10);
- }
- else
- {
- /*=* Max. length for a request SR22[4:0]
- (128/4 -> over flow 0x0) *=*/
- VGAOUT8(0x3c4, 0x22);
- bRegTemp = VGAIN8(0x3c5) & ~0x1F;
- VGAOUT8(0x3c5, bRegTemp);
- }
- break;
- case VIA_PM800:
- /*=* R1 Display FIFO depth (96-1 -> 0x5f) SR17[7:0] (8bits) *=*/
- VGAOUT8(0x3c4, 0x17);
- VGAOUT8(0x3c5, 0x5f);
-
- /*=* R2 Display fetch datum threshold value (32 -> 0x20)
- SR16[5:0], SR16[7] (7bits) *=*/
- VGAOUT8(0x3c4, 0x16);
- bRegTemp = VGAIN8(0x3c5) & ~0xBF;
- bRegTemp |= (0x20 & 0x3F);
- bRegTemp |= ((0x20 & 0x40) << 1);
- VGAOUT8(0x3c5, bRegTemp);
-
- /*=* R3 Switch to the highest agent threshold value (16 -> 0x10)
- SR18[5:0], SR18[7] (7bits) *=*/
- VGAOUT8(0x3c4, 0x18);
- bRegTemp = VGAIN8(0x3c5) & ~0xBF;
- bRegTemp |= (0x10 & 0x3F);
- bRegTemp |= ((0x10 & 0x40) << 1);
- VGAOUT8(0x3c5, bRegTemp);
-#if 0
- /*=* R4 Fetch Number for a scan line (unit: 8 bytes)
- SR1C[7:0], SR1D[1:0] (10bits) *=*/
- wRegTemp = (pBIOSInfo->offsetWidthByQWord >> 1) + 4;
- VGAOUT8(0x3c4, 0x1c);
- VGAOUT8(0x3c5, (uint8_t)(wRegTemp & 0xFF));
- VGAOUT8(0x3c4, 0x1d);
- bRegTemp = VGAIN8(0x3c5) & ~0x03;
- VGAOUT8(0x3c5, bRegTemp | ((wRegTemp & 0x300) >> 8));
-#endif
- if (ctx->shared.virtualWidth >= 1400 && ctx->bpp == 32)
- {
- /*=* Max. length for a request SR22[4:0] (64/4 -> 0x10) *=*/
- VGAOUT8(0x3c4, 0x22);
- bRegTemp = VGAIN8(0x3c5) & ~0x1F;
- VGAOUT8(0x3c5, bRegTemp | 0x10);
- }
- else
- {
- /*=* Max. length for a request SR22[4:0] (0x1F) *=*/
- VGAOUT8(0x3c4, 0x22);
- bRegTemp = VGAIN8(0x3c5) & ~0x1F;
- VGAOUT8(0x3c5, bRegTemp | 0x1F);
- }
- break;
- default:
- break;
- }
-}
-
-static void VIAInitialize2DEngine(DRIDriverContext *ctx)
-{
- VIAPtr pVia = VIAPTR(ctx);
- uint32_t dwVQStartAddr, dwVQEndAddr;
- uint32_t dwVQLen, dwVQStartL, dwVQEndL, dwVQStartEndH;
- uint32_t dwGEMode;
-
- /* init 2D engine regs to reset 2D engine */
- VIASETREG(0x04, 0x0);
- VIASETREG(0x08, 0x0);
- VIASETREG(0x0c, 0x0);
- VIASETREG(0x10, 0x0);
- VIASETREG(0x14, 0x0);
- VIASETREG(0x18, 0x0);
- VIASETREG(0x1c, 0x0);
- VIASETREG(0x20, 0x0);
- VIASETREG(0x24, 0x0);
- VIASETREG(0x28, 0x0);
- VIASETREG(0x2c, 0x0);
- VIASETREG(0x30, 0x0);
- VIASETREG(0x34, 0x0);
- VIASETREG(0x38, 0x0);
- VIASETREG(0x3c, 0x0);
- VIASETREG(0x40, 0x0);
-
- VIADisableMMIO(ctx);
-
- /* Init AGP and VQ regs */
- VIASETREG(0x43c, 0x00100000);
- VIASETREG(0x440, 0x00000000);
- VIASETREG(0x440, 0x00333004);
- VIASETREG(0x440, 0x60000000);
- VIASETREG(0x440, 0x61000000);
- VIASETREG(0x440, 0x62000000);
- VIASETREG(0x440, 0x63000000);
- VIASETREG(0x440, 0x64000000);
- VIASETREG(0x440, 0x7D000000);
-
- VIASETREG(0x43c, 0xfe020000);
- VIASETREG(0x440, 0x00000000);
-
- if (pVia->VQStart != 0) {
- /* Enable VQ */
- dwVQStartAddr = pVia->VQStart;
- dwVQEndAddr = pVia->VQEnd;
- dwVQStartL = 0x50000000 | (dwVQStartAddr & 0xFFFFFF);
- dwVQEndL = 0x51000000 | (dwVQEndAddr & 0xFFFFFF);
- dwVQStartEndH = 0x52000000 | ((dwVQStartAddr & 0xFF000000) >> 24) |
- ((dwVQEndAddr & 0xFF000000) >> 16);
- dwVQLen = 0x53000000 | (VIA_VQ_SIZE >> 3);
-
- VIASETREG(0x43c, 0x00fe0000);
- VIASETREG(0x440, 0x080003fe);
- VIASETREG(0x440, 0x0a00027c);
- VIASETREG(0x440, 0x0b000260);
- VIASETREG(0x440, 0x0c000274);
- VIASETREG(0x440, 0x0d000264);
- VIASETREG(0x440, 0x0e000000);
- VIASETREG(0x440, 0x0f000020);
- VIASETREG(0x440, 0x1000027e);
- VIASETREG(0x440, 0x110002fe);
- VIASETREG(0x440, 0x200f0060);
-
- VIASETREG(0x440, 0x00000006);
- VIASETREG(0x440, 0x40008c0f);
- VIASETREG(0x440, 0x44000000);
- VIASETREG(0x440, 0x45080c04);
- VIASETREG(0x440, 0x46800408);
-
- VIASETREG(0x440, dwVQStartEndH);
- VIASETREG(0x440, dwVQStartL);
- VIASETREG(0x440, dwVQEndL);
- VIASETREG(0x440, dwVQLen);
- }
- else {
- /* Diable VQ */
- VIASETREG(0x43c, 0x00fe0000);
- VIASETREG(0x440, 0x00000004);
- VIASETREG(0x440, 0x40008c0f);
- VIASETREG(0x440, 0x44000000);
- VIASETREG(0x440, 0x45080c04);
- VIASETREG(0x440, 0x46800408);
- }
-
- dwGEMode = 0;
-
- switch (ctx->bpp) {
- case 16:
- dwGEMode |= VIA_GEM_16bpp;
- break;
- case 32:
- dwGEMode |= VIA_GEM_32bpp;
- break;
- default:
- dwGEMode |= VIA_GEM_8bpp;
- break;
- }
-
-#if 0
- switch (ctx->shared.virtualWidth) {
- case 800:
- dwGEMode |= VIA_GEM_800;
- break;
- case 1024:
- dwGEMode |= VIA_GEM_1024;
- break;
- case 1280:
- dwGEMode |= VIA_GEM_1280;
- break;
- case 1600:
- dwGEMode |= VIA_GEM_1600;
- break;
- case 2048:
- dwGEMode |= VIA_GEM_2048;
- break;
- default:
- dwGEMode |= VIA_GEM_640;
- break;
- }
-#endif
-
- VIAEnableMMIO(ctx);
-
- /* Set BPP and Pitch */
- VIASETREG(VIA_REG_GEMODE, dwGEMode);
-
- /* Set Src and Dst base address and pitch, pitch is qword */
- VIASETREG(VIA_REG_SRCBASE, 0x0);
- VIASETREG(VIA_REG_DSTBASE, 0x0);
- VIASETREG(VIA_REG_PITCH, VIA_PITCH_ENABLE |
- ((ctx->shared.virtualWidth * ctx->bpp >> 3) >> 3) |
- (((ctx->shared.virtualWidth * ctx->bpp >> 3) >> 3) << 16));
-}
-
-static int b3DRegsInitialized = 0;
-
-static void VIAInitialize3DEngine(DRIDriverContext *ctx)
-{
- VIAPtr pVia = VIAPTR(ctx);
- int i;
-
- if (!b3DRegsInitialized)
- {
-
- VIASETREG(0x43C, 0x00010000);
-
- for (i = 0; i <= 0x7D; i++)
- {
- VIASETREG(0x440, (uint32_t) i << 24);
- }
-
- VIASETREG(0x43C, 0x00020000);
-
- for (i = 0; i <= 0x94; i++)
- {
- VIASETREG(0x440, (uint32_t) i << 24);
- }
-
- VIASETREG(0x440, 0x82400000);
-
- VIASETREG(0x43C, 0x01020000);
-
-
- for (i = 0; i <= 0x94; i++)
- {
- VIASETREG(0x440, (uint32_t) i << 24);
- }
-
- VIASETREG(0x440, 0x82400000);
- VIASETREG(0x43C, 0xfe020000);
-
- for (i = 0; i <= 0x03; i++)
- {
- VIASETREG(0x440, (uint32_t) i << 24);
- }
-
- VIASETREG(0x43C, 0x00030000);
-
- for (i = 0; i <= 0xff; i++)
- {
- VIASETREG(0x440, 0);
- }
- VIASETREG(0x43C, 0x00100000);
- VIASETREG(0x440, 0x00333004);
- VIASETREG(0x440, 0x10000002);
- VIASETREG(0x440, 0x60000000);
- VIASETREG(0x440, 0x61000000);
- VIASETREG(0x440, 0x62000000);
- VIASETREG(0x440, 0x63000000);
- VIASETREG(0x440, 0x64000000);
-
- VIASETREG(0x43C, 0x00fe0000);
-
- if (pVia->ChipRev >= 3 )
- VIASETREG(0x440,0x40008c0f);
- else
- VIASETREG(0x440,0x4000800f);
-
- VIASETREG(0x440,0x44000000);
- VIASETREG(0x440,0x45080C04);
- VIASETREG(0x440,0x46800408);
- VIASETREG(0x440,0x50000000);
- VIASETREG(0x440,0x51000000);
- VIASETREG(0x440,0x52000000);
- VIASETREG(0x440,0x53000000);
-
- b3DRegsInitialized = 1;
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "3D Engine has been initialized.\n");
- }
-
- VIASETREG(0x43C,0x00fe0000);
- VIASETREG(0x440,0x08000001);
- VIASETREG(0x440,0x0A000183);
- VIASETREG(0x440,0x0B00019F);
- VIASETREG(0x440,0x0C00018B);
- VIASETREG(0x440,0x0D00019B);
- VIASETREG(0x440,0x0E000000);
- VIASETREG(0x440,0x0F000000);
- VIASETREG(0x440,0x10000000);
- VIASETREG(0x440,0x11000000);
- VIASETREG(0x440,0x20000000);
-}
-
-static int
-WaitIdleCLE266(VIAPtr pVia)
-{
- int loop = 0;
-
- /*mem_barrier();*/
-
- while (!(VIAGETREG(VIA_REG_STATUS) & VIA_VR_QUEUE_BUSY) && (loop++ < MAXLOOP))
- ;
-
- while ((VIAGETREG(VIA_REG_STATUS) &
- (VIA_CMD_RGTR_BUSY | VIA_2D_ENG_BUSY | VIA_3D_ENG_BUSY)) &&
- (loop++ < MAXLOOP))
- ;
-
- return loop >= MAXLOOP;
-}
-
-static int viaInitFBDev(DRIDriverContext *ctx)
-{
- VIAPtr pVia = CALLOC(sizeof(*pVia));
-
- ctx->driverPrivate = (void *)pVia;
-
- switch (ctx->chipset) {
- case PCI_CHIP_CLE3122:
- case PCI_CHIP_CLE3022:
- pVia->Chipset = VIA_CLE266;
- break;
- case PCI_CHIP_VT7205:
- case PCI_CHIP_VT3205:
- pVia->Chipset = VIA_KM400;
- break;
- case PCI_CHIP_VT3204:
- case PCI_CHIP_VT3344:
- pVia->Chipset = VIA_K8M800;
- break;
- case PCI_CHIP_VT3259:
- pVia->Chipset = VIA_PM800;
- break;
- default:
- xf86DrvMsg(0, X_ERROR, "VIA: Unknown device ID (0x%x)\n", ctx->chipset);
- }
-
- /* _SOLO TODO XXX need to read ChipRev too */
- pVia->ChipRev = 0;
-
- pVia->videoRambytes = ctx->shared.fbSize;
- pVia->MmioBase = ctx->MMIOStart;
- pVia->FrameBufferBase = ctx->FBStart & 0xfc000000;
-
- pVia->FBFreeStart = ctx->shared.virtualWidth * ctx->cpp *
- ctx->shared.virtualHeight;
-
-#if 1
- /* Alloc a second framebuffer for the second head */
- pVia->FBFreeStart += ctx->shared.virtualWidth * ctx->cpp *
- ctx->shared.virtualHeight;
-#endif
-
- pVia->VQStart = pVia->FBFreeStart;
- pVia->VQEnd = pVia->FBFreeStart + VIA_VQ_SIZE - 1;
-
- pVia->FBFreeStart += VIA_VQ_SIZE;
-
- pVia->FBFreeEnd = pVia->videoRambytes;
-
- if (!VIADRIScreenInit(ctx))
- return 0;
-
- return 1;
-}
-
-static void viaHaltFBDev(DRIDriverContext *ctx)
-{
- drmUnmap( ctx->pSAREA, ctx->shared.SAREASize );
- drmClose(ctx->drmFD);
-
- if (ctx->driverPrivate) {
- free(ctx->driverPrivate);
- ctx->driverPrivate = 0;
- }
-}
-
-static int viaEngineShutdown(const DRIDriverContext *ctx)
-{
- return 1;
-}
-
-static int viaEngineRestore(const DRIDriverContext *ctx)
-{
- return 1;
-}
-
-const struct DRIDriverRec __driDriver =
-{
- viaValidateMode,
- viaPostValidateMode,
- viaInitFBDev,
- viaHaltFBDev,
- viaEngineShutdown,
- viaEngineRestore,
- 0,
-};
-
diff --git a/src/mesa/drivers/dri/unichrome/via_tris.c b/src/mesa/drivers/dri/unichrome/via_tris.c
index 01359d51ea..be3c9a770f 100644
--- a/src/mesa/drivers/dri/unichrome/via_tris.c
+++ b/src/mesa/drivers/dri/unichrome/via_tris.c
@@ -257,7 +257,6 @@ static struct {
#define DO_POINTS 1
#define DO_FULL_QUAD 1
-#define HAVE_RGBA 1
#define HAVE_SPEC 1
#define HAVE_BACK_COLORS 0
#define HAVE_HW_FLATSHADE 1
diff --git a/src/mesa/drivers/fbdev/glfbdev.c b/src/mesa/drivers/fbdev/glfbdev.c
index 4e369ceac4..0ea2796eaa 100644
--- a/src/mesa/drivers/fbdev/glfbdev.c
+++ b/src/mesa/drivers/fbdev/glfbdev.c
@@ -70,7 +70,6 @@
#define PF_B8G8R8A8 2
#define PF_B5G6R5 3
#define PF_B5G5R5 4
-#define PF_CI8 5
/**
@@ -264,25 +263,6 @@ viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
#include "swrast/s_spantemp.h"
-/* 8-bit color index */
-#define NAME(PREFIX) PREFIX##_CI8
-#define CI_MODE
-#define RB_TYPE GLubyte
-#define SPAN_VARS \
- struct GLFBDevRenderbufferRec *frb = (struct GLFBDevRenderbufferRec *) rb;
-#define INIT_PIXEL_PTR(P, X, Y) \
- GLubyte *P = frb->bottom - (Y) * frb->rowStride + (X)
-#define INC_PIXEL_PTR(P) P += 1
-#define STORE_PIXEL(DST, X, Y, VALUE) \
- *DST = VALUE[0]
-#define FETCH_PIXEL(DST, SRC) \
- DST = SRC[0]
-
-#include "swrast/s_spantemp.h"
-
-
-
-
/**********************************************************************/
/* Public API functions */
/**********************************************************************/
@@ -345,9 +325,9 @@ glFBDevCreateVisual( const struct fb_fix_screeninfo *fixInfo,
{
GLFBDevVisualPtr vis;
const int *attrib;
- GLboolean rgbFlag = GL_TRUE, dbFlag = GL_FALSE, stereoFlag = GL_FALSE;
+ GLboolean dbFlag = GL_FALSE, stereoFlag = GL_FALSE;
GLint redBits = 0, greenBits = 0, blueBits = 0, alphaBits = 0;
- GLint indexBits = 0, depthBits = 0, stencilBits = 0;
+ GLint depthBits = 0, stencilBits = 0;
GLint accumRedBits = 0, accumGreenBits = 0;
GLint accumBlueBits = 0, accumAlphaBits = 0;
GLint numSamples = 0;
@@ -367,9 +347,6 @@ glFBDevCreateVisual( const struct fb_fix_screeninfo *fixInfo,
case GLFBDEV_DOUBLE_BUFFER:
dbFlag = GL_TRUE;
break;
- case GLFBDEV_COLOR_INDEX:
- rgbFlag = GL_FALSE;
- break;
case GLFBDEV_DEPTH_SIZE:
depthBits = attrib[1];
attrib++;
@@ -390,6 +367,8 @@ glFBDevCreateVisual( const struct fb_fix_screeninfo *fixInfo,
numSamples = attrib[1];
attrib++;
break;
+ case GLFBDEV_COLOR_INDEX:
+ /* Mesa no longer supports color-index rendering. */
default:
/* unexpected token */
free(vis);
@@ -397,62 +376,47 @@ glFBDevCreateVisual( const struct fb_fix_screeninfo *fixInfo,
}
}
- if (rgbFlag) {
- redBits = varInfo->red.length;
- greenBits = varInfo->green.length;
- blueBits = varInfo->blue.length;
- alphaBits = varInfo->transp.length;
-
- if (fixInfo->visual == FB_VISUAL_TRUECOLOR ||
- fixInfo->visual == FB_VISUAL_DIRECTCOLOR) {
- if (varInfo->bits_per_pixel == 24
- && varInfo->red.offset == 16
- && varInfo->green.offset == 8
- && varInfo->blue.offset == 0) {
- vis->pixelFormat = PF_B8G8R8;
- }
- else if (varInfo->bits_per_pixel == 32
- && varInfo->red.offset == 16
- && varInfo->green.offset == 8
- && varInfo->blue.offset == 0) {
- vis->pixelFormat = PF_B8G8R8A8;
- }
- else if (varInfo->bits_per_pixel == 16
- && varInfo->red.offset == 11
- && varInfo->green.offset == 5
- && varInfo->blue.offset == 0) {
- vis->pixelFormat = PF_B5G6R5;
- }
- else if (varInfo->bits_per_pixel == 16
- && varInfo->red.offset == 10
- && varInfo->green.offset == 5
- && varInfo->blue.offset == 0) {
- vis->pixelFormat = PF_B5G5R5;
- }
- else {
- _mesa_problem(NULL, "Unsupported fbdev RGB visual/bitdepth!\n");
- free(vis);
- return NULL;
- }
+ redBits = varInfo->red.length;
+ greenBits = varInfo->green.length;
+ blueBits = varInfo->blue.length;
+ alphaBits = varInfo->transp.length;
+
+ if (fixInfo->visual == FB_VISUAL_TRUECOLOR ||
+ fixInfo->visual == FB_VISUAL_DIRECTCOLOR) {
+ if (varInfo->bits_per_pixel == 24
+ && varInfo->red.offset == 16
+ && varInfo->green.offset == 8
+ && varInfo->blue.offset == 0) {
+ vis->pixelFormat = PF_B8G8R8;
}
- }
- else {
- indexBits = varInfo->bits_per_pixel;
- if ((fixInfo->visual == FB_VISUAL_PSEUDOCOLOR ||
- fixInfo->visual == FB_VISUAL_STATIC_PSEUDOCOLOR)
- && varInfo->bits_per_pixel == 8) {
- vis->pixelFormat = PF_CI8;
+ else if (varInfo->bits_per_pixel == 32
+ && varInfo->red.offset == 16
+ && varInfo->green.offset == 8
+ && varInfo->blue.offset == 0) {
+ vis->pixelFormat = PF_B8G8R8A8;
+ }
+ else if (varInfo->bits_per_pixel == 16
+ && varInfo->red.offset == 11
+ && varInfo->green.offset == 5
+ && varInfo->blue.offset == 0) {
+ vis->pixelFormat = PF_B5G6R5;
+ }
+ else if (varInfo->bits_per_pixel == 16
+ && varInfo->red.offset == 10
+ && varInfo->green.offset == 5
+ && varInfo->blue.offset == 0) {
+ vis->pixelFormat = PF_B5G5R5;
}
else {
- _mesa_problem(NULL, "Unsupported fbdev CI visual/bitdepth!\n");
+ _mesa_problem(NULL, "Unsupported fbdev RGB visual/bitdepth!\n");
free(vis);
return NULL;
}
}
- if (!_mesa_initialize_visual(&vis->glvisual, rgbFlag, dbFlag, stereoFlag,
+ if (!_mesa_initialize_visual(&vis->glvisual, dbFlag, stereoFlag,
redBits, greenBits, blueBits, alphaBits,
- indexBits, depthBits, stencilBits,
+ depthBits, stencilBits,
accumRedBits, accumGreenBits,
accumBlueBits, accumAlphaBits,
numSamples)) {
@@ -554,23 +518,9 @@ new_glfbdev_renderbuffer(void *bufferStart, const GLFBDevVisualPtr visual)
rb->Base.PutValues = put_values_B5G5R5;
rb->Base.PutMonoValues = put_mono_values_B5G5R5;
}
- else if (pixelFormat == PF_CI8) {
- rb->Base.GetRow = get_row_CI8;
- rb->Base.GetValues = get_values_CI8;
- rb->Base.PutRow = put_row_CI8;
- rb->Base.PutMonoRow = put_mono_row_CI8;
- rb->Base.PutValues = put_values_CI8;
- rb->Base.PutMonoValues = put_mono_values_CI8;
- }
- if (pixelFormat == PF_CI8) {
- rb->Base.InternalFormat = GL_COLOR_INDEX8_EXT;
- rb->Base._BaseFormat = GL_COLOR_INDEX;
- }
- else {
- rb->Base.InternalFormat = GL_RGBA;
- rb->Base._BaseFormat = GL_RGBA;
- }
+ rb->Base.InternalFormat = GL_RGBA;
+ rb->Base._BaseFormat = GL_RGBA;
rb->Base.DataType = GL_UNSIGNED_BYTE;
rb->Base.Data = bufferStart;
diff --git a/src/mesa/drivers/glslcompiler/glslcompiler.c b/src/mesa/drivers/glslcompiler/glslcompiler.c
index 448029dace..66035a4a43 100644
--- a/src/mesa/drivers/glslcompiler/glslcompiler.c
+++ b/src/mesa/drivers/glslcompiler/glslcompiler.c
@@ -113,9 +113,9 @@ CreateContext(void)
GLcontext *ctx;
CompilerContext *cc;
- vis = _mesa_create_visual(GL_TRUE, GL_FALSE, GL_FALSE, /* RGB */
+ vis = _mesa_create_visual(GL_FALSE, GL_FALSE, /* RGB */
8, 8, 8, 8, /* color */
- 0, 0, 0, /* z, stencil */
+ 0, 0, /* z, stencil */
0, 0, 0, 0, 1); /* accum */
buf = _mesa_create_framebuffer(vis);
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index f9672d888e..e20507ae92 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -484,24 +484,6 @@ osmesa_update_state( GLcontext *ctx, GLuint new_state )
#include "swrast/s_spantemp.h"
-/* color index */
-#define NAME(PREFIX) PREFIX##_CI
-#define CI_MODE
-#define RB_TYPE GLubyte
-#define SPAN_VARS \
- const OSMesaContext osmesa = OSMESA_CONTEXT(ctx);
-#define INIT_PIXEL_PTR(P, X, Y) \
- GLubyte *P = (GLubyte *) osmesa->rowaddr[Y] + (X)
-#define INC_PIXEL_PTR(P) P += 1
-#define STORE_PIXEL(DST, X, Y, VALUE) \
- *DST = VALUE[0]
-#define FETCH_PIXEL(DST, SRC) \
- DST = SRC[0]
-#include "swrast/s_spantemp.h"
-
-
-
-
/**
* Macros for optimized line/triangle rendering.
* Only for 8-bit channel, RGBA, BGRA, ARGB formats.
@@ -776,11 +758,7 @@ compute_row_addresses( OSMesaContext osmesa )
return;
}
- if (osmesa->format == OSMESA_COLOR_INDEX) {
- /* CI mode */
- bytesPerPixel = 1 * sizeof(GLubyte);
- }
- else if ((osmesa->format == OSMESA_RGB) || (osmesa->format == OSMESA_BGR)) {
+ if ((osmesa->format == OSMESA_RGB) || (osmesa->format == OSMESA_BGR)) {
/* RGB mode */
bytesPerPixel = 3 * bpc;
}
@@ -999,14 +977,6 @@ osmesa_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
rb->PutValues = put_values_RGB_565;
rb->PutMonoValues = put_mono_values_RGB_565;
}
- else if (osmesa->format == OSMESA_COLOR_INDEX) {
- rb->GetRow = get_row_CI;
- rb->GetValues = get_values_CI;
- rb->PutRow = put_row_CI;
- rb->PutMonoRow = put_mono_row_CI;
- rb->PutValues = put_values_CI;
- rb->PutMonoValues = put_mono_values_CI;
- }
else {
_mesa_problem(ctx, "bad pixel format in osmesa renderbuffer_storage");
}
@@ -1033,18 +1003,10 @@ new_osmesa_renderbuffer(GLcontext *ctx, GLenum format, GLenum type)
rb->Delete = osmesa_delete_renderbuffer;
rb->AllocStorage = osmesa_renderbuffer_storage;
- if (format == OSMESA_COLOR_INDEX) {
- rb->InternalFormat = GL_COLOR_INDEX;
- rb->Format = MESA_FORMAT_CI8;
- rb->_BaseFormat = GL_COLOR_INDEX;
- rb->DataType = GL_UNSIGNED_BYTE;
- }
- else {
- rb->InternalFormat = GL_RGBA;
- rb->Format = MESA_FORMAT_RGBA8888;
- rb->_BaseFormat = GL_RGBA;
- rb->DataType = type;
- }
+ rb->InternalFormat = GL_RGBA;
+ rb->Format = MESA_FORMAT_RGBA8888;
+ rb->_BaseFormat = GL_RGBA;
+ rb->DataType = type;
}
return rb;
}
@@ -1059,7 +1021,7 @@ new_osmesa_renderbuffer(GLcontext *ctx, GLenum format, GLenum type)
* Create an Off-Screen Mesa rendering context. The only attribute needed is
* an RGBA vs Color-Index mode flag.
*
- * Input: format - either GL_RGBA or GL_COLOR_INDEX
+ * Input: format - Must be GL_RGBA
* sharelist - specifies another OSMesaContext with which to share
* display lists. NULL indicates no sharing.
* Return: an OSMesaContext or 0 if error
@@ -1067,9 +1029,8 @@ new_osmesa_renderbuffer(GLcontext *ctx, GLenum format, GLenum type)
GLAPI OSMesaContext GLAPIENTRY
OSMesaCreateContext( GLenum format, OSMesaContext sharelist )
{
- const GLint accumBits = (format == OSMESA_COLOR_INDEX) ? 0 : 16;
return OSMesaCreateContextExt(format, DEFAULT_SOFTWARE_DEPTH_BITS,
- 8, accumBits, sharelist);
+ 8, 0, sharelist);
}
@@ -1086,17 +1047,11 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
OSMesaContext osmesa;
struct dd_function_table functions;
GLint rind, gind, bind, aind;
- GLint indexBits = 0, redBits = 0, greenBits = 0, blueBits = 0, alphaBits =0;
- GLboolean rgbmode;
+ GLint redBits = 0, greenBits = 0, blueBits = 0, alphaBits =0;
GLenum type = CHAN_TYPE;
rind = gind = bind = aind = 0;
- if (format==OSMESA_COLOR_INDEX) {
- indexBits = 8;
- rgbmode = GL_FALSE;
- }
- else if (format==OSMESA_RGBA) {
- indexBits = 0;
+ if (format==OSMESA_RGBA) {
redBits = CHAN_BITS;
greenBits = CHAN_BITS;
blueBits = CHAN_BITS;
@@ -1105,10 +1060,8 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
gind = 1;
bind = 2;
aind = 3;
- rgbmode = GL_TRUE;
}
else if (format==OSMESA_BGRA) {
- indexBits = 0;
redBits = CHAN_BITS;
greenBits = CHAN_BITS;
blueBits = CHAN_BITS;
@@ -1117,10 +1070,8 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
gind = 1;
rind = 2;
aind = 3;
- rgbmode = GL_TRUE;
}
else if (format==OSMESA_ARGB) {
- indexBits = 0;
redBits = CHAN_BITS;
greenBits = CHAN_BITS;
blueBits = CHAN_BITS;
@@ -1129,10 +1080,8 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
rind = 1;
gind = 2;
bind = 3;
- rgbmode = GL_TRUE;
}
else if (format==OSMESA_RGB) {
- indexBits = 0;
redBits = CHAN_BITS;
greenBits = CHAN_BITS;
blueBits = CHAN_BITS;
@@ -1140,10 +1089,8 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
rind = 0;
gind = 1;
bind = 2;
- rgbmode = GL_TRUE;
}
else if (format==OSMESA_BGR) {
- indexBits = 0;
redBits = CHAN_BITS;
greenBits = CHAN_BITS;
blueBits = CHAN_BITS;
@@ -1151,11 +1098,9 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
rind = 2;
gind = 1;
bind = 0;
- rgbmode = GL_TRUE;
}
#if CHAN_TYPE == GL_UNSIGNED_BYTE
else if (format==OSMESA_RGB_565) {
- indexBits = 0;
redBits = 5;
greenBits = 6;
blueBits = 5;
@@ -1163,7 +1108,6 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
rind = 0; /* not used */
gind = 0;
bind = 0;
- rgbmode = GL_TRUE;
}
#endif
else {
@@ -1172,14 +1116,12 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
osmesa = (OSMesaContext) CALLOC_STRUCT(osmesa_context);
if (osmesa) {
- osmesa->gl_visual = _mesa_create_visual( rgbmode,
- GL_FALSE, /* double buffer */
+ osmesa->gl_visual = _mesa_create_visual( GL_FALSE, /* double buffer */
GL_FALSE, /* stereo */
redBits,
greenBits,
blueBits,
alphaBits,
- indexBits,
depthBits,
stencilBits,
accumBits,
diff --git a/src/mesa/drivers/windows/gdi/mesa.def b/src/mesa/drivers/windows/gdi/mesa.def
index baa592f136..b537b3460c 100644
--- a/src/mesa/drivers/windows/gdi/mesa.def
+++ b/src/mesa/drivers/windows/gdi/mesa.def
@@ -867,7 +867,6 @@ EXPORTS
_glapi_get_proc_address
_mesa_add_soft_renderbuffers
_mesa_add_renderbuffer
- _mesa_bzero
_mesa_check_conditional_render
_mesa_choose_tex_format
_mesa_create_framebuffer
diff --git a/src/mesa/drivers/windows/gdi/wmesa.c b/src/mesa/drivers/windows/gdi/wmesa.c
index 2fdcb387be..91ddc3615a 100644
--- a/src/mesa/drivers/windows/gdi/wmesa.c
+++ b/src/mesa/drivers/windows/gdi/wmesa.c
@@ -1461,12 +1461,10 @@ WMesaContext WMesaCreateContext(HDC hDC,
break;
}
/* Create visual based on flags */
- visual = _mesa_create_visual(rgb_flag,
- db_flag, /* db_flag */
+ visual = _mesa_create_visual(db_flag, /* db_flag */
GL_FALSE, /* stereo */
red_bits, green_bits, blue_bits, /* color RGB */
alpha_flag ? alpha_bits : 0, /* color A */
- 0, /* index bits */
DEFAULT_SOFTWARE_DEPTH_BITS, /* depth_bits */
8, /* stencil_bits */
16,16,16, /* accum RGB */
diff --git a/src/mesa/drivers/windows/gldirect/dglcontext.c b/src/mesa/drivers/windows/gldirect/dglcontext.c
index e9c23d1ccb..a420b36ffb 100644
--- a/src/mesa/drivers/windows/gldirect/dglcontext.c
+++ b/src/mesa/drivers/windows/gldirect/dglcontext.c
@@ -1377,14 +1377,12 @@ SkipPrimaryCreate:
#ifdef _USE_GLD3_WGL
lpCtx->glVis = _mesa_create_visual(
- GL_TRUE, // RGB mode
bDouble, /* double buffer */
GL_FALSE, // stereo
lpPFD->cRedBits,
lpPFD->cGreenBits,
lpPFD->cBlueBits,
dwAlphaBits,
- 0, // index bits
dwDepthBits,
dwStencilBits,
lpPFD->cAccumRedBits, // accum bits
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 7ac425a109..f927abfa11 100644
--- a/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c
+++ b/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c
@@ -631,21 +631,6 @@ static void flush(GLcontext* ctx)
//---------------------------------------------------------------------------
-
-/*
- * Set the color index used to clear the color buffer.
- */
-static void clear_index(GLcontext* ctx, GLuint index)
-{
- GLD_context *gldCtx = GLD_GET_CONTEXT(ctx);
- WMesaContext *Current = GLD_GET_WMESA_DRIVER(gldCtx);
- Current->clearpixel = index;
-}
-
-
-
-//---------------------------------------------------------------------------
-
/*
* Set the color used to clear the color buffer.
*/
@@ -1367,7 +1352,6 @@ static void wmesa_update_state_first_time(
ctx->Driver.Clear = clear;
ctx->Driver.Flush = flush;
- ctx->Driver.ClearIndex = clear_index;
ctx->Driver.ClearColor = clear_color;
ctx->Driver.Enable = enable;
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index 33a3ff6d5f..f1e62b6bd4 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -152,13 +152,8 @@ is_usable_visual( XVisualInfo *vinfo )
return GL_TRUE;
case StaticColor:
case PseudoColor:
- /* Any StaticColor/PseudoColor visual of at least 4 bits */
- if (vinfo->depth>=4) {
- return GL_TRUE;
- }
- else {
- return GL_FALSE;
- }
+ /* Color-index rendering is not supported. */
+ return GL_FALSE;
case TrueColor:
case DirectColor:
/* Any depth of TrueColor or DirectColor works in RGB mode */
@@ -268,7 +263,7 @@ level_of_visual( Display *dpy, XVisualInfo *vinfo )
*/
static XMesaVisual
save_glx_visual( Display *dpy, XVisualInfo *vinfo,
- GLboolean rgbFlag, GLboolean alphaFlag, GLboolean dbFlag,
+ GLboolean alphaFlag, GLboolean dbFlag,
GLboolean stereoFlag,
GLint depth_size, GLint stencil_size,
GLint accumRedSize, GLint accumGreenSize,
@@ -309,7 +304,7 @@ save_glx_visual( Display *dpy, XVisualInfo *vinfo,
comparePointers = GL_FALSE;
/* Force the visual to have an alpha channel */
- if (rgbFlag && _mesa_getenv("MESA_GLX_FORCE_ALPHA"))
+ if (_mesa_getenv("MESA_GLX_FORCE_ALPHA"))
alphaFlag = GL_TRUE;
/* First check if a matching visual is already in the list */
@@ -319,7 +314,6 @@ save_glx_visual( Display *dpy, XVisualInfo *vinfo,
&& v->mesa_visual.level == level
&& v->mesa_visual.numAuxBuffers == numAuxBuffers
&& v->ximage_flag == ximageFlag
- && v->mesa_visual.rgbMode == rgbFlag
&& v->mesa_visual.doubleBufferMode == dbFlag
&& v->mesa_visual.stereoMode == stereoFlag
&& (v->mesa_visual.alphaBits > 0) == alphaFlag
@@ -339,7 +333,7 @@ save_glx_visual( Display *dpy, XVisualInfo *vinfo,
/* Create a new visual and add it to the list. */
- xmvis = XMesaCreateVisual( dpy, vinfo, rgbFlag, alphaFlag, dbFlag,
+ xmvis = XMesaCreateVisual( dpy, vinfo, GL_TRUE, alphaFlag, dbFlag,
stereoFlag, ximageFlag,
depth_size, stencil_size,
accumRedSize, accumBlueSize,
@@ -422,53 +416,26 @@ create_glx_visual( Display *dpy, XVisualInfo *visinfo )
vislevel = level_of_visual( dpy, visinfo );
if (vislevel) {
- /* Configure this visual as a CI, single-buffered overlay */
- return save_glx_visual( dpy, visinfo,
- GL_FALSE, /* rgb */
- GL_FALSE, /* alpha */
- GL_FALSE, /* double */
- GL_FALSE, /* stereo */
- 0, /* depth bits */
- 0, /* stencil bits */
- 0,0,0,0, /* accum bits */
- vislevel, /* level */
- 0 /* numAux */
- );
+ /* Color-index rendering to overlays is not supported. */
+ return NULL;
}
else if (is_usable_visual( visinfo )) {
- if (_mesa_getenv("MESA_GLX_FORCE_CI")) {
- /* Configure this visual as a COLOR INDEX visual. */
- return save_glx_visual( dpy, visinfo,
- GL_FALSE, /* rgb */
- GL_FALSE, /* alpha */
- GL_TRUE, /* double */
- GL_FALSE, /* stereo */
- zBits,
- STENCIL_BITS,
- 0, 0, 0, 0, /* accum bits */
- 0, /* level */
- 0 /* numAux */
- );
- }
- else {
- /* Configure this visual as RGB, double-buffered, depth-buffered. */
- /* This is surely wrong for some people's needs but what else */
- /* can be done? They should use glXChooseVisual(). */
- return save_glx_visual( dpy, visinfo,
- GL_TRUE, /* rgb */
- alphaFlag, /* alpha */
- GL_TRUE, /* double */
- GL_FALSE, /* stereo */
- zBits,
- STENCIL_BITS,
- accBits, /* r */
- accBits, /* g */
- accBits, /* b */
- accBits, /* a */
- 0, /* level */
- 0 /* numAux */
- );
- }
+ /* Configure this visual as RGB, double-buffered, depth-buffered. */
+ /* This is surely wrong for some people's needs but what else */
+ /* can be done? They should use glXChooseVisual(). */
+ return save_glx_visual( dpy, visinfo,
+ alphaFlag, /* alpha */
+ GL_TRUE, /* double */
+ GL_FALSE, /* stereo */
+ zBits,
+ STENCIL_BITS,
+ accBits, /* r */
+ accBits, /* g */
+ accBits, /* b */
+ accBits, /* a */
+ 0, /* level */
+ 0 /* numAux */
+ );
}
else {
_mesa_warning(NULL, "Mesa: error in glXCreateContext: bad visual\n");
@@ -623,8 +590,6 @@ get_env_visual(Display *dpy, int scr, const char *varname)
if (strcmp(type,"TrueColor")==0) xclass = TrueColor;
else if (strcmp(type,"DirectColor")==0) xclass = DirectColor;
- else if (strcmp(type,"PseudoColor")==0) xclass = PseudoColor;
- else if (strcmp(type,"StaticColor")==0) xclass = StaticColor;
else if (strcmp(type,"GrayScale")==0) xclass = GrayScale;
else if (strcmp(type,"StaticGray")==0) xclass = StaticGray;
@@ -646,160 +611,79 @@ get_env_visual(Display *dpy, int scr, const char *varname)
/*
* Select an X visual which satisfies the RGBA/CI flag and minimum depth.
* Input: dpy, screen - X display and screen number
- * rgba - GL_TRUE = RGBA mode, GL_FALSE = CI mode
* min_depth - minimum visual depth
* preferred_class - preferred GLX visual class or DONT_CARE
* Return: pointer to an XVisualInfo or NULL.
*/
static XVisualInfo *
-choose_x_visual( Display *dpy, int screen, GLboolean rgba, int min_depth,
- int preferred_class )
+choose_x_visual(Display *dpy, int screen, int min_depth, int preferred_class)
{
XVisualInfo *vis;
int xclass, visclass = 0;
int depth;
- if (rgba) {
- Atom hp_cr_maps = XInternAtom(dpy, "_HP_RGB_SMOOTH_MAP_LIST", True);
- /* First see if the MESA_RGB_VISUAL env var is defined */
- vis = get_env_visual( dpy, screen, "MESA_RGB_VISUAL" );
- if (vis) {
- return vis;
- }
- /* Otherwise, search for a suitable visual */
- if (preferred_class==DONT_CARE) {
- for (xclass=0;xclass<6;xclass++) {
- switch (xclass) {
- case 0: visclass = TrueColor; break;
- case 1: visclass = DirectColor; break;
- case 2: visclass = PseudoColor; break;
- case 3: visclass = StaticColor; break;
- case 4: visclass = GrayScale; break;
- case 5: visclass = StaticGray; break;
- }
- if (min_depth==0) {
- /* start with shallowest */
- for (depth=0;depth<=32;depth++) {
- if (visclass==TrueColor && depth==8 && !hp_cr_maps) {
- /* Special case: try to get 8-bit PseudoColor before */
- /* 8-bit TrueColor */
- vis = get_visual( dpy, screen, 8, PseudoColor );
- if (vis) {
- return vis;
- }
- }
- vis = get_visual( dpy, screen, depth, visclass );
- if (vis) {
- return vis;
- }
- }
- }
- else {
- /* start with deepest */
- for (depth=32;depth>=min_depth;depth--) {
- if (visclass==TrueColor && depth==8 && !hp_cr_maps) {
- /* Special case: try to get 8-bit PseudoColor before */
- /* 8-bit TrueColor */
- vis = get_visual( dpy, screen, 8, PseudoColor );
- if (vis) {
- return vis;
- }
- }
- vis = get_visual( dpy, screen, depth, visclass );
- if (vis) {
- return vis;
- }
- }
- }
- }
- }
- else {
- /* search for a specific visual class */
- switch (preferred_class) {
- case GLX_TRUE_COLOR_EXT: visclass = TrueColor; break;
- case GLX_DIRECT_COLOR_EXT: visclass = DirectColor; break;
- case GLX_PSEUDO_COLOR_EXT: visclass = PseudoColor; break;
- case GLX_STATIC_COLOR_EXT: visclass = StaticColor; break;
- case GLX_GRAY_SCALE_EXT: visclass = GrayScale; break;
- case GLX_STATIC_GRAY_EXT: visclass = StaticGray; break;
- default: return NULL;
- }
- if (min_depth==0) {
- /* start with shallowest */
- for (depth=0;depth<=32;depth++) {
- vis = get_visual( dpy, screen, depth, visclass );
- if (vis) {
- return vis;
- }
- }
- }
- else {
- /* start with deepest */
- for (depth=32;depth>=min_depth;depth--) {
- vis = get_visual( dpy, screen, depth, visclass );
- if (vis) {
- return vis;
- }
- }
- }
+ /* First see if the MESA_RGB_VISUAL env var is defined */
+ vis = get_env_visual( dpy, screen, "MESA_RGB_VISUAL" );
+ if (vis) {
+ return vis;
+ }
+ /* Otherwise, search for a suitable visual */
+ if (preferred_class==DONT_CARE) {
+ for (xclass=0;xclass<4;xclass++) {
+ switch (xclass) {
+ case 0: visclass = TrueColor; break;
+ case 1: visclass = DirectColor; break;
+ case 2: visclass = GrayScale; break;
+ case 3: visclass = StaticGray; break;
+ }
+ if (min_depth==0) {
+ /* start with shallowest */
+ for (depth=0;depth<=32;depth++) {
+ vis = get_visual( dpy, screen, depth, visclass );
+ if (vis) {
+ return vis;
+ }
+ }
+ }
+ else {
+ /* start with deepest */
+ for (depth=32;depth>=min_depth;depth--) {
+ vis = get_visual( dpy, screen, depth, visclass );
+ if (vis) {
+ return vis;
+ }
+ }
+ }
}
}
else {
- /* First see if the MESA_CI_VISUAL env var is defined */
- vis = get_env_visual( dpy, screen, "MESA_CI_VISUAL" );
- if (vis) {
- return vis;
+ /* search for a specific visual class */
+ switch (preferred_class) {
+ case GLX_TRUE_COLOR_EXT: visclass = TrueColor; break;
+ case GLX_DIRECT_COLOR_EXT: visclass = DirectColor; break;
+ case GLX_GRAY_SCALE_EXT: visclass = GrayScale; break;
+ case GLX_STATIC_GRAY_EXT: visclass = StaticGray; break;
+ case GLX_PSEUDO_COLOR_EXT:
+ case GLX_STATIC_COLOR_EXT:
+ default: return NULL;
}
- /* Otherwise, search for a suitable visual, starting with shallowest */
- if (preferred_class==DONT_CARE) {
- for (xclass=0;xclass<4;xclass++) {
- switch (xclass) {
- case 0: visclass = PseudoColor; break;
- case 1: visclass = StaticColor; break;
- case 2: visclass = GrayScale; break;
- case 3: visclass = StaticGray; break;
- }
- /* try 8-bit up through 16-bit */
- for (depth=8;depth<=16;depth++) {
- vis = get_visual( dpy, screen, depth, visclass );
- if (vis) {
- return vis;
- }
- }
- /* try min_depth up to 8-bit */
- for (depth=min_depth;depth<8;depth++) {
- vis = get_visual( dpy, screen, depth, visclass );
- if (vis) {
- return vis;
- }
- }
- }
+ if (min_depth==0) {
+ /* start with shallowest */
+ for (depth=0;depth<=32;depth++) {
+ vis = get_visual( dpy, screen, depth, visclass );
+ if (vis) {
+ return vis;
+ }
+ }
}
else {
- /* search for a specific visual class */
- switch (preferred_class) {
- case GLX_TRUE_COLOR_EXT: visclass = TrueColor; break;
- case GLX_DIRECT_COLOR_EXT: visclass = DirectColor; break;
- case GLX_PSEUDO_COLOR_EXT: visclass = PseudoColor; break;
- case GLX_STATIC_COLOR_EXT: visclass = StaticColor; break;
- case GLX_GRAY_SCALE_EXT: visclass = GrayScale; break;
- case GLX_STATIC_GRAY_EXT: visclass = StaticGray; break;
- default: return NULL;
- }
- /* try 8-bit up through 16-bit */
- for (depth=8;depth<=16;depth++) {
- vis = get_visual( dpy, screen, depth, visclass );
- if (vis) {
- return vis;
- }
- }
- /* try min_depth up to 8-bit */
- for (depth=min_depth;depth<8;depth++) {
- vis = get_visual( dpy, screen, depth, visclass );
- if (vis) {
- return vis;
- }
- }
+ /* start with deepest */
+ for (depth=32;depth>=min_depth;depth--) {
+ vis = get_visual( dpy, screen, depth, visclass );
+ if (vis) {
+ return vis;
+ }
+ }
}
}
@@ -822,7 +706,7 @@ choose_x_visual( Display *dpy, int screen, GLboolean rgba, int min_depth,
* Return: pointer to an XVisualInfo or NULL.
*/
static XVisualInfo *
-choose_x_overlay_visual( Display *dpy, int scr, GLboolean rgbFlag,
+choose_x_overlay_visual( Display *dpy, int scr,
int level, int trans_type, int trans_value,
int min_depth, int preferred_class )
{
@@ -889,14 +773,8 @@ choose_x_overlay_visual( Display *dpy, int scr, GLboolean rgbFlag,
continue;
}
- /* if RGB was requested, make sure we have True/DirectColor */
- if (rgbFlag && vislist->CLASS != TrueColor
- && vislist->CLASS != DirectColor)
- continue;
-
- /* if CI was requested, make sure we have a color indexed visual */
- if (!rgbFlag
- && (vislist->CLASS == TrueColor || vislist->CLASS == DirectColor))
+ /* Color-index rendering is not supported. Make sure we have True/DirectColor */
+ if (vislist->CLASS != TrueColor && vislist->CLASS != DirectColor)
continue;
if (deepvis==NULL || vislist->depth > deepest) {
@@ -1266,6 +1144,9 @@ choose_visual( Display *dpy, int screen, const int *list, GLboolean fbConfig )
}
}
+ if (!rgb_flag)
+ return NULL;
+
(void) caveat;
/*
@@ -1285,46 +1166,27 @@ choose_visual( Display *dpy, int screen, const int *list, GLboolean fbConfig )
if (vis) {
/* give the visual some useful GLX attributes */
double_flag = GL_TRUE;
- if (vis->depth > 8)
- rgb_flag = GL_TRUE;
+ if (vis->depth <= 8)
+ return NULL;
depth_size = default_depth_bits();
stencil_size = STENCIL_BITS;
/* XXX accum??? */
}
}
- else if (level==0) {
- /* normal color planes */
- if (rgb_flag) {
- /* Get an RGB visual */
- int min_rgb = min_red + min_green + min_blue;
- if (min_rgb>1 && min_rgb<8) {
- /* a special case to be sure we can get a monochrome visual */
- min_rgb = 1;
- }
- vis = choose_x_visual( dpy, screen, rgb_flag, min_rgb, visual_type );
- }
- else {
- /* Get a color index visual */
- vis = choose_x_visual( dpy, screen, rgb_flag, min_ci, visual_type );
- accumRedSize = accumGreenSize = accumBlueSize = accumAlphaSize = 0;
- }
- }
else {
- /* over/underlay planes */
- if (rgb_flag) {
- /* rgba overlay */
- int min_rgb = min_red + min_green + min_blue;
- if (min_rgb>1 && min_rgb<8) {
- /* a special case to be sure we can get a monochrome visual */
- min_rgb = 1;
- }
- vis = choose_x_overlay_visual( dpy, screen, rgb_flag, level,
- trans_type, trans_value, min_rgb, visual_type );
+ /* RGB visual */
+ int min_rgb = min_red + min_green + min_blue;
+ if (min_rgb>1 && min_rgb<8) {
+ /* a special case to be sure we can get a monochrome visual */
+ min_rgb = 1;
+ }
+
+ if (level==0) {
+ vis = choose_x_visual(dpy, screen, min_rgb, visual_type);
}
else {
- /* color index overlay */
- vis = choose_x_overlay_visual( dpy, screen, rgb_flag, level,
- trans_type, trans_value, min_ci, visual_type );
+ vis = choose_x_overlay_visual(dpy, screen, level,
+ trans_type, trans_value, min_rgb, visual_type);
}
}
@@ -1357,7 +1219,7 @@ choose_visual( Display *dpy, int screen, const int *list, GLboolean fbConfig )
accumAlphaSize = alpha_flag ? accumRedSize : 0;
}
- xmvis = save_glx_visual( dpy, vis, rgb_flag, alpha_flag, double_flag,
+ xmvis = save_glx_visual( dpy, vis, alpha_flag, double_flag,
stereo_flag, depth_size, stencil_size,
accumRedSize, accumGreenSize,
accumBlueSize, accumAlphaSize, level, numAux );
@@ -2493,10 +2355,7 @@ Fake_glXQueryContext( Display *dpy, GLXContext ctx, int attribute, int *value )
*value = xmctx->xm_visual->visinfo->visualid;
break;
case GLX_RENDER_TYPE:
- if (xmctx->xm_visual->mesa_visual.rgbMode)
- *value = GLX_RGBA_TYPE;
- else
- *value = GLX_COLOR_INDEX_TYPE;
+ *value = GLX_RGBA_TYPE;
break;
case GLX_SCREEN:
*value = 0;
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index 3711c88148..a1723fa37b 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -684,9 +684,7 @@ setup_grayscale(int client, XMesaVisual v,
}
prevBuffer = xmesa_find_buffer(v->display, cmap, buffer);
- if (prevBuffer &&
- (buffer->xm_visual->mesa_visual.rgbMode ==
- prevBuffer->xm_visual->mesa_visual.rgbMode)) {
+ if (prevBuffer) {
/* Copy colormap stuff from previous XMesaBuffer which uses same
* X colormap. Do this to avoid time spent in noFaultXAllocColor.
*/
@@ -773,9 +771,7 @@ setup_dithered_color(int client, XMesaVisual v,
}
prevBuffer = xmesa_find_buffer(v->display, cmap, buffer);
- if (prevBuffer &&
- (buffer->xm_visual->mesa_visual.rgbMode ==
- prevBuffer->xm_visual->mesa_visual.rgbMode)) {
+ if (prevBuffer) {
/* Copy colormap stuff from previous, matching XMesaBuffer.
* Do this to avoid time spent in noFaultXAllocColor.
*/
@@ -1047,10 +1043,11 @@ setup_monochrome( XMesaVisual v, XMesaBuffer b )
*/
static GLboolean
initialize_visual_and_buffer(XMesaVisual v, XMesaBuffer b,
- GLboolean rgb_flag, XMesaDrawable window,
+ XMesaDrawable window,
XMesaColormap cmap)
{
int client = 0;
+ const int xclass = v->mesa_visual.visualType;
#ifdef XFree86Server
client = (window) ? CLIENT_ID(window->id) : 0;
@@ -1062,45 +1059,34 @@ initialize_visual_and_buffer(XMesaVisual v, XMesaBuffer b,
v->BitsPerPixel = bits_per_pixel(v);
assert(v->BitsPerPixel > 0);
- if (rgb_flag == GL_FALSE) {
- /* COLOR-INDEXED WINDOW:
- * Even if the visual is TrueColor or DirectColor we treat it as
- * being color indexed. This is weird but might be useful to someone.
- */
- v->dithered_pf = v->undithered_pf = PF_Index;
- v->mesa_visual.indexBits = GET_VISUAL_DEPTH(v);
+ /* RGB WINDOW:
+ * We support RGB rendering into almost any kind of visual.
+ */
+ if (xclass == GLX_TRUE_COLOR || xclass == GLX_DIRECT_COLOR) {
+ setup_truecolor( v, b, cmap );
}
- else {
- /* RGB WINDOW:
- * We support RGB rendering into almost any kind of visual.
- */
- const int xclass = v->mesa_visual.visualType;
- if (xclass == GLX_TRUE_COLOR || xclass == GLX_DIRECT_COLOR) {
- setup_truecolor( v, b, cmap );
- }
- else if (xclass == GLX_STATIC_GRAY && GET_VISUAL_DEPTH(v) == 1) {
- setup_monochrome( v, b );
- }
- else if (xclass == GLX_GRAY_SCALE || xclass == GLX_STATIC_GRAY) {
- if (!setup_grayscale( client, v, b, cmap )) {
- return GL_FALSE;
- }
- }
- else if ((xclass == GLX_PSEUDO_COLOR || xclass == GLX_STATIC_COLOR)
- && GET_VISUAL_DEPTH(v)>=4 && GET_VISUAL_DEPTH(v)<=16) {
- if (!setup_dithered_color( client, v, b, cmap )) {
- return GL_FALSE;
- }
+ else if (xclass == GLX_STATIC_GRAY && GET_VISUAL_DEPTH(v) == 1) {
+ setup_monochrome( v, b );
+ }
+ else if (xclass == GLX_GRAY_SCALE || xclass == GLX_STATIC_GRAY) {
+ if (!setup_grayscale( client, v, b, cmap )) {
+ return GL_FALSE;
}
- else {
- _mesa_warning(NULL, "XMesa: RGB mode rendering not supported in given visual.\n");
+ }
+ else if ((xclass == GLX_PSEUDO_COLOR || xclass == GLX_STATIC_COLOR)
+ && GET_VISUAL_DEPTH(v)>=4 && GET_VISUAL_DEPTH(v)<=16) {
+ if (!setup_dithered_color( client, v, b, cmap )) {
return GL_FALSE;
}
- v->mesa_visual.indexBits = 0;
+ }
+ else {
+ _mesa_warning(NULL, "XMesa: RGB mode rendering not supported in given visual.\n");
+ return GL_FALSE;
+ }
+ v->mesa_visual.indexBits = 0;
- if (_mesa_getenv("MESA_NO_DITHER")) {
- v->dithered_pf = v->undithered_pf;
- }
+ if (_mesa_getenv("MESA_NO_DITHER")) {
+ v->dithered_pf = v->undithered_pf;
}
@@ -1359,6 +1345,10 @@ XMesaVisual XMesaCreateVisual( XMesaDisplay *display,
}
#endif
+ /* Color-index rendering not supported. */
+ if (!rgb_flag)
+ return NULL;
+
v = (XMesaVisual) CALLOC_STRUCT(xmesa_visual);
if (!v) {
return NULL;
@@ -1428,7 +1418,7 @@ XMesaVisual XMesaCreateVisual( XMesaDisplay *display,
if (alpha_flag)
v->mesa_visual.alphaBits = 8;
- (void) initialize_visual_and_buffer( v, NULL, rgb_flag, 0, 0 );
+ (void) initialize_visual_and_buffer( v, NULL, 0, 0 );
{
const int xclass = v->mesa_visual.visualType;
@@ -1453,10 +1443,9 @@ XMesaVisual XMesaCreateVisual( XMesaDisplay *display,
}
_mesa_initialize_visual( &v->mesa_visual,
- rgb_flag, db_flag, stereo_flag,
+ db_flag, stereo_flag,
red_bits, green_bits,
blue_bits, alpha_bits,
- v->mesa_visual.indexBits,
depth_size,
stencil_size,
accum_red_size, accum_green_size,
@@ -1655,8 +1644,7 @@ XMesaCreateWindowBuffer(XMesaVisual v, XMesaWindow w)
if (!b)
return NULL;
- if (!initialize_visual_and_buffer( v, b, v->mesa_visual.rgbMode,
- (XMesaDrawable) w, cmap )) {
+ if (!initialize_visual_and_buffer( v, b, (XMesaDrawable) w, cmap )) {
xmesa_free_buffer(b);
return NULL;
}
@@ -1686,8 +1674,7 @@ XMesaCreatePixmapBuffer(XMesaVisual v, XMesaPixmap p, XMesaColormap cmap)
if (!b)
return NULL;
- if (!initialize_visual_and_buffer(v, b, v->mesa_visual.rgbMode,
- (XMesaDrawable) p, cmap)) {
+ if (!initialize_visual_and_buffer(v, b, (XMesaDrawable) p, cmap)) {
xmesa_free_buffer(b);
return NULL;
}
@@ -1747,8 +1734,7 @@ XMesaCreatePixmapTextureBuffer(XMesaVisual v, XMesaPixmap p,
b->TextureFormat = format;
b->TextureMipmap = mipmap;
- if (!initialize_visual_and_buffer(v, b, v->mesa_visual.rgbMode,
- (XMesaDrawable) p, cmap)) {
+ if (!initialize_visual_and_buffer(v, b, (XMesaDrawable) p, cmap)) {
xmesa_free_buffer(b);
return NULL;
}
@@ -1778,8 +1764,7 @@ XMesaCreatePBuffer(XMesaVisual v, XMesaColormap cmap,
if (!b)
return NULL;
- if (!initialize_visual_and_buffer(v, b, v->mesa_visual.rgbMode,
- drawable, cmap)) {
+ if (!initialize_visual_and_buffer(v, b, drawable, cmap)) {
xmesa_free_buffer(b);
return NULL;
}
@@ -1874,19 +1859,17 @@ GLboolean XMesaMakeCurrent2( XMesaContext c, XMesaBuffer drawBuffer,
&drawBuffer->mesa_buffer,
&readBuffer->mesa_buffer);
- if (c->xm_visual->mesa_visual.rgbMode) {
- /*
- * Must recompute and set these pixel values because colormap
- * can be different for different windows.
- */
- c->clearpixel = xmesa_color_to_pixel( &c->mesa,
- c->clearcolor[0],
- c->clearcolor[1],
- c->clearcolor[2],
- c->clearcolor[3],
- c->xm_visual->undithered_pf);
- XMesaSetForeground(c->display, drawBuffer->cleargc, c->clearpixel);
- }
+ /*
+ * Must recompute and set these pixel values because colormap
+ * can be different for different windows.
+ */
+ c->clearpixel = xmesa_color_to_pixel( &c->mesa,
+ c->clearcolor[0],
+ c->clearcolor[1],
+ c->clearcolor[2],
+ c->clearcolor[3],
+ c->xm_visual->undithered_pf);
+ XMesaSetForeground(c->display, drawBuffer->cleargc, c->clearpixel);
/* Solution to Stephane Rehel's problem with glXReleaseBuffersMESA(): */
drawBuffer->wasCurrent = GL_TRUE;
diff --git a/src/mesa/drivers/x11/xm_buffer.c b/src/mesa/drivers/x11/xm_buffer.c
index 5ffe110484..e47949750a 100644
--- a/src/mesa/drivers/x11/xm_buffer.c
+++ b/src/mesa/drivers/x11/xm_buffer.c
@@ -337,18 +337,10 @@ xmesa_new_renderbuffer(GLcontext *ctx, GLuint name, const GLvisual *visual,
else
xrb->Base.AllocStorage = xmesa_alloc_front_storage;
- if (visual->rgbMode) {
- xrb->Base.InternalFormat = GL_RGBA;
- xrb->Base.Format = MESA_FORMAT_RGBA8888;
- xrb->Base._BaseFormat = GL_RGBA;
- xrb->Base.DataType = GL_UNSIGNED_BYTE;
- }
- else {
- xrb->Base.InternalFormat = GL_COLOR_INDEX;
- xrb->Base.Format = MESA_FORMAT_CI8;
- xrb->Base._BaseFormat = GL_COLOR_INDEX;
- xrb->Base.DataType = GL_UNSIGNED_INT;
- }
+ xrb->Base.InternalFormat = GL_RGBA;
+ xrb->Base.Format = MESA_FORMAT_RGBA8888;
+ xrb->Base._BaseFormat = GL_RGBA;
+ xrb->Base.DataType = GL_UNSIGNED_BYTE;
/* only need to set Red/Green/EtcBits fields for user-created RBs */
}
return xrb;
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index d304192f4c..5edafb890b 100644
--- a/src/mesa/drivers/x11/xm_dd.c
+++ b/src/mesa/drivers/x11/xm_dd.c
@@ -107,18 +107,6 @@ finish_or_flush( GLcontext *ctx )
static void
-clear_index( GLcontext *ctx, GLuint index )
-{
- if (ctx->DrawBuffer->Name == 0) {
- const XMesaContext xmesa = XMESA_CONTEXT(ctx);
- XMesaBuffer xmbuf = XMESA_BUFFER(ctx->DrawBuffer);
- xmesa->clearpixel = (unsigned long) index;
- XMesaSetForeground( xmesa->display, xmbuf->cleargc, (unsigned long) index );
- }
-}
-
-
-static void
clear_color( GLcontext *ctx, const GLfloat color[4] )
{
if (ctx->DrawBuffer->Name == 0) {
@@ -144,26 +132,6 @@ clear_color( GLcontext *ctx, const GLfloat color[4] )
-/* Set index mask ala glIndexMask */
-static void
-index_mask( GLcontext *ctx, GLuint mask )
-{
- const XMesaContext xmesa = XMESA_CONTEXT(ctx);
- XMesaBuffer xmbuf = XMESA_BUFFER(ctx->DrawBuffer);
- /* not sure this conditional is really needed */
- if (xmbuf->backxrb && xmbuf->backxrb->pixmap) {
- unsigned long m;
- if (mask==0xffffffff) {
- m = ((unsigned long)~0L);
- }
- else {
- m = (unsigned long) mask;
- }
- XMesaSetPlaneMask( xmesa->display, xmbuf->cleargc, m );
- }
-}
-
-
/* Implements glColorMask() */
static void
color_mask(GLcontext *ctx,
@@ -1143,9 +1111,7 @@ xmesa_init_driver_functions( XMesaVisual xmvisual,
driver->GetBufferSize = NULL; /* OBSOLETE */
driver->Flush = finish_or_flush;
driver->Finish = finish_or_flush;
- driver->ClearIndex = clear_index;
driver->ClearColor = clear_color;
- driver->IndexMask = index_mask;
driver->ColorMask = color_mask;
driver->Enable = enable;
driver->Viewport = xmesa_viewport;
diff --git a/src/mesa/es/glapi/es_EXT.xml b/src/mesa/es/glapi/es_EXT.xml
index 629ba90528..291a53b4b2 100644
--- a/src/mesa/es/glapi/es_EXT.xml
+++ b/src/mesa/es/glapi/es_EXT.xml
@@ -18,6 +18,9 @@
<enum name="PALETTE8_RGB5_A1_OES" value="0x8B99"/>
</category>
+<!-- 23. GL_OES_EGL_image -->
+<xi:include href="../../glapi/gen/OES_EGL_image.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
<category name="GL_OES_depth24" number="24">
<enum name="DEPTH_COMPONENT24_OES" value="0x81A6"/>
</category>
diff --git a/src/mesa/es/main/APIspec.xml b/src/mesa/es/main/APIspec.xml
index f6f33130b1..17665d8df5 100644
--- a/src/mesa/es/main/APIspec.xml
+++ b/src/mesa/es/main/APIspec.xml
@@ -3502,6 +3502,31 @@
</desc>
</template>
+<template name="EGLImageTargetTexture2D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="image" type="GLeglImageOES"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_2D"/>
+ </desc>
+</template>
+
+<template name="EGLImageTargetRenderbufferStorage">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="image" type="GLeglImageOES"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_RENDERBUFFER_OES" category="OES_framebuffer_object"/>
+ <value name="GL_RENDERBUFFER" category="GLES2.0"/>
+ </desc>
+</template>
+
<api name="mesa" implementation="true">
<category name="MESA"/>
@@ -3770,6 +3795,10 @@
<!-- EXT_multi_draw_arrays -->
<function name="MultiDrawArraysEXT" template="MultiDrawArrays"/>
<function name="MultiDrawElementsEXT" template="MultiDrawElements"/>
+
+ <!-- OES_EGL_image -->
+ <function name="EGLImageTargetTexture2DOES" template="EGLImageTargetTexture2D"/>
+ <function name="EGLImageTargetRenderbufferStorageOES" template="EGLImageTargetRenderbufferStorage"/>
</api>
<api name="GLES1.1">
@@ -3811,6 +3840,7 @@
<category name="EXT_blend_minmax"/>
-->
<category name="EXT_multi_draw_arrays"/>
+ <category name="OES_EGL_image"/>
<category name="OES_matrix_palette"/>
@@ -4068,6 +4098,10 @@
<!-- EXT_multi_draw_arrays -->
<function name="MultiDrawArraysEXT" template="MultiDrawArrays"/>
<function name="MultiDrawElementsEXT" template="MultiDrawElements"/>
+
+ <!-- OES_EGL_image -->
+ <function name="EGLImageTargetTexture2DOES" template="EGLImageTargetTexture2D"/>
+ <function name="EGLImageTargetRenderbufferStorageOES" template="EGLImageTargetRenderbufferStorage"/>
</api>
<api name="GLES2.0">
@@ -4095,6 +4129,7 @@
<category name="EXT_blend_minmax"/>
-->
<category name="EXT_multi_draw_arrays"/>
+ <category name="OES_EGL_image"/>
<function name="CullFace" template="CullFace"/>
@@ -4292,6 +4327,10 @@
<!-- EXT_multi_draw_arrays -->
<function name="MultiDrawArraysEXT" template="MultiDrawArrays"/>
<function name="MultiDrawElementsEXT" template="MultiDrawElements"/>
+
+ <!-- OES_EGL_image -->
+ <function name="EGLImageTargetTexture2DOES" template="EGLImageTargetTexture2D"/>
+ <function name="EGLImageTargetRenderbufferStorageOES" template="EGLImageTargetRenderbufferStorage"/>
</api>
</apispec>
diff --git a/src/mesa/es/main/mfeatures_es1.h b/src/mesa/es/main/mfeatures_es1.h
index 6c2ece2608..1793550268 100644
--- a/src/mesa/es/main/mfeatures_es1.h
+++ b/src/mesa/es/main/mfeatures_es1.h
@@ -106,6 +106,8 @@
#define FEATURE_OES_draw_texture 1
#define FEATURE_OES_mapbuffer 1
+#define FEATURE_OES_EGL_image 1
+
#define FEATURE_extra_context_init 1
/*@}*/
diff --git a/src/mesa/es/main/mfeatures_es2.h b/src/mesa/es/main/mfeatures_es2.h
index f34782fedb..a463bed11c 100644
--- a/src/mesa/es/main/mfeatures_es2.h
+++ b/src/mesa/es/main/mfeatures_es2.h
@@ -106,6 +106,8 @@
#define FEATURE_OES_draw_texture 0
#define FEATURE_OES_mapbuffer 1
+#define FEATURE_OES_EGL_image 1
+
#define FEATURE_extra_context_init 1
/*@}*/
diff --git a/src/mesa/glapi/gen/APPLE_object_purgeable.xml b/src/mesa/glapi/gen/APPLE_object_purgeable.xml
new file mode 100644
index 0000000000..62fa64ad21
--- /dev/null
+++ b/src/mesa/glapi/gen/APPLE_object_purgeable.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<OpenGLAPI>
+<category name="GL_APPLE_object_purgeable" number="371">
+ <enum name="RELEASED_APPLE" value="0x8A19"/>
+ <enum name="VOLATILE_APPLE" value="0x8A1A"/>
+ <enum name="RETAINED_APPLE" value="0x8A1B"/>
+ <enum name="UNDEFINED_APPLE" value="0x8A1C"/>
+ <enum name="PURGEABLE_APPLE" count="1" value="0x8A1D">
+ <size name="GetObjectParameterivAPPLE" count="1" mode="get"/>
+ </enum>
+
+ <enum name="BUFFER_OBJECT_APPLE" value="0x85B3"/>
+
+ <function name="ObjectPurgeableAPPLE" offset="assign">
+ <param name="objectType" type="GLenum"/>
+ <param name="name" type="GLuint"/>
+ <param name="option" type="GLenum"/>
+ <return type="GLenum"/>
+ </function>
+
+ <function name="ObjectUnpurgeableAPPLE" offset="assign">
+ <param name="objectType" type="GLenum"/>
+ <param name="name" type="GLuint"/>
+ <param name="option" type="GLenum"/>
+ <return type="GLenum"/>
+ </function>
+
+ <function name="GetObjectParameterivAPPLE" offset="assign">
+ <param name="objectType" type="GLenum"/>
+ <param name="name" type="GLuint"/>
+ <param name="pname" type="GLenum"/>
+ <param name="value" type="GLint *" output="true"/>
+ </function>
+</category>
+</OpenGLAPI>
diff --git a/src/mesa/glapi/gen/Makefile b/src/mesa/glapi/gen/Makefile
index 8e9c909f31..8aa74ce434 100644
--- a/src/mesa/glapi/gen/Makefile
+++ b/src/mesa/glapi/gen/Makefile
@@ -79,6 +79,7 @@ API_XML = \
ARB_seamless_cube_map.xml \
ARB_sync.xml \
ARB_vertex_array_object.xml \
+ APPLE_object_purgeable.xml \
APPLE_vertex_array_object.xml \
EXT_draw_buffers2.xml \
EXT_framebuffer_object.xml \
diff --git a/src/mesa/glapi/gen/glX_proto_send.py b/src/mesa/glapi/gen/glX_proto_send.py
index 4d484c833a..c52b85bfb4 100644
--- a/src/mesa/glapi/gen/glX_proto_send.py
+++ b/src/mesa/glapi/gen/glX_proto_send.py
@@ -182,7 +182,7 @@ class PrintGlxProtoStubs(glX_proto_common.glx_print_proto):
self.printFastcall()
self.printNoinline()
print ''
- print '#if !defined __GNUC__ || __GNUC__ < 3'
+ print '#ifndef __GNUC__'
print '# define __builtin_expect(x, y) x'
print '#endif'
print ''
diff --git a/src/mesa/glapi/gen/gl_API.xml b/src/mesa/glapi/gen/gl_API.xml
index 0b3d57baa6..4a4d0d5382 100644
--- a/src/mesa/glapi/gen/gl_API.xml
+++ b/src/mesa/glapi/gen/gl_API.xml
@@ -11978,6 +11978,7 @@
</function>
</category>
+<xi:include href="APPLE_object_purgeable.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="APPLE_vertex_array_object.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<category name="GL_APPLE_ycbcr_422" number="275">
diff --git a/src/mesa/glapi/gen/gl_XML.py b/src/mesa/glapi/gen/gl_XML.py
index a10a35e513..660c8cfb71 100644
--- a/src/mesa/glapi/gen/gl_XML.py
+++ b/src/mesa/glapi/gen/gl_XML.py
@@ -184,7 +184,7 @@ class gl_print_base:
The name is also added to the file's undef_list.
"""
self.undef_list.append("PURE")
- print """# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+ print """# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define PURE __attribute__((pure))
# else
# define PURE
@@ -224,7 +224,7 @@ class gl_print_base:
"""
self.undef_list.append(S)
- print """# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))) && defined(__ELF__)
+ print """# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) && defined(__ELF__)
# define %s __attribute__((visibility("%s")))
# else
# define %s
diff --git a/src/mesa/glapi/gen/gl_x86-64_asm.py b/src/mesa/glapi/gen/gl_x86-64_asm.py
index 31c1a2b93a..e6e78c42f3 100644
--- a/src/mesa/glapi/gen/gl_x86-64_asm.py
+++ b/src/mesa/glapi/gen/gl_x86-64_asm.py
@@ -124,7 +124,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
print ''
print '#include "x86/assyntax.h"'
print ''
- print '#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303'
+ print '#ifdef __GNUC__'
print '# pragma GCC visibility push(default)'
print '# define HIDDEN(x) .hidden x'
print '#else'
@@ -138,7 +138,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
print '# define GL_PREFIX(n) GLNAME(CONCAT(gl,n))'
print '# endif'
print ''
- print '#if defined(PTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)'
+ print '#if defined(PTHREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)'
print '# define THREADS'
print '#endif'
print ''
diff --git a/src/mesa/glapi/gen/gl_x86_asm.py b/src/mesa/glapi/gen/gl_x86_asm.py
index d210f3a248..a48724ee61 100644
--- a/src/mesa/glapi/gen/gl_x86_asm.py
+++ b/src/mesa/glapi/gen/gl_x86_asm.py
@@ -79,7 +79,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
print '#define GLOBL_FN(x) GLOBL x'
print '#endif'
print ''
- print '#if defined(PTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)'
+ print '#if defined(PTHREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)'
print '# define THREADS'
print '#endif'
print ''
diff --git a/src/mesa/glapi/glapi.c b/src/mesa/glapi/glapi.c
index 2fa673d307..13de594aaf 100644
--- a/src/mesa/glapi/glapi.c
+++ b/src/mesa/glapi/glapi.c
@@ -59,7 +59,6 @@
#endif
#include "glapi/glapi.h"
-#include "glapi/glapioffsets.h"
#include "glapi/glapitable.h"
extern _glapi_proc __glapi_noop_table[];
@@ -106,39 +105,23 @@ PUBLIC __thread void * _glapi_tls_Context
__attribute__((tls_model("initial-exec")));
PUBLIC const struct _glapi_table *_glapi_Dispatch = NULL;
+
PUBLIC const void *_glapi_Context = NULL;
#else
#if defined(THREADS)
-#ifdef WIN32_THREADS
-/* _glthread_DECLARE_STATIC_MUTEX is broken on windows. There will be race! */
-#define CHECK_MULTITHREAD_LOCK()
-#define CHECK_MULTITHREAD_UNLOCK()
-#else
-_glthread_DECLARE_STATIC_MUTEX(ThreadCheckMutex);
-#define CHECK_MULTITHREAD_LOCK() _glthread_LOCK_MUTEX(ThreadCheckMutex)
-#define CHECK_MULTITHREAD_UNLOCK() _glthread_UNLOCK_MUTEX(ThreadCheckMutex)
-#endif
-
static GLboolean ThreadSafe = GL_FALSE; /**< In thread-safe mode? */
+
_glthread_TSD _gl_DispatchTSD; /**< Per-thread dispatch pointer */
-static _glthread_TSD ContextTSD; /**< Per-thread context pointer */
-#if defined(WIN32_THREADS)
-void FreeTSD(_glthread_TSD *p);
-void FreeAllTSD(void)
-{
- FreeTSD(&_gl_DispatchTSD);
- FreeTSD(&ContextTSD);
-}
-#endif /* defined(WIN32_THREADS) */
+static _glthread_TSD ContextTSD; /**< Per-thread context pointer */
#endif /* defined(THREADS) */
-PUBLIC struct _glapi_table *_glapi_Dispatch =
- (struct _glapi_table *) __glapi_noop_table;
+PUBLIC struct _glapi_table *_glapi_Dispatch = (struct _glapi_table *) __glapi_noop_table;
+
PUBLIC void *_glapi_Context = NULL;
#endif /* defined(GLX_USE_TLS) */
@@ -146,6 +129,36 @@ PUBLIC void *_glapi_Context = NULL;
+#if defined(THREADS) && !defined(GLX_USE_TLS)
+
+void
+_glapi_init_multithread(void)
+{
+ _glthread_InitTSD(&_gl_DispatchTSD);
+ _glthread_InitTSD(&ContextTSD);
+}
+
+void
+_glapi_destroy_multithread(void)
+{
+#ifdef WIN32_THREADS
+ _glthread_DestroyTSD(&_gl_DispatchTSD);
+ _glthread_DestroyTSD(&ContextTSD);
+#endif
+}
+
+/**
+ * Mutex for multithread check.
+ */
+#ifdef WIN32_THREADS
+/* _glthread_DECLARE_STATIC_MUTEX is broken on windows. There will be race! */
+#define CHECK_MULTITHREAD_LOCK()
+#define CHECK_MULTITHREAD_UNLOCK()
+#else
+_glthread_DECLARE_STATIC_MUTEX(ThreadCheckMutex);
+#define CHECK_MULTITHREAD_LOCK() _glthread_LOCK_MUTEX(ThreadCheckMutex)
+#define CHECK_MULTITHREAD_UNLOCK() _glthread_UNLOCK_MUTEX(ThreadCheckMutex)
+#endif
/**
* We should call this periodically from a function such as glXMakeCurrent
@@ -154,7 +167,6 @@ PUBLIC void *_glapi_Context = NULL;
PUBLIC void
_glapi_check_multithread(void)
{
-#if defined(THREADS) && !defined(GLX_USE_TLS)
static unsigned long knownID;
static GLboolean firstCall = GL_TRUE;
@@ -163,9 +175,7 @@ _glapi_check_multithread(void)
CHECK_MULTITHREAD_LOCK();
if (firstCall) {
- /* initialize TSDs */
- (void) _glthread_GetTSD(&ContextTSD);
- (void) _glthread_GetTSD(&_gl_DispatchTSD);
+ _glapi_init_multithread();
knownID = _glthread_GetID();
firstCall = GL_FALSE;
@@ -176,9 +186,21 @@ _glapi_check_multithread(void)
_glapi_set_context(NULL);
}
CHECK_MULTITHREAD_UNLOCK();
-#endif
}
+#else
+
+void
+_glapi_init_multithread(void) { }
+
+void
+_glapi_destroy_multithread(void) { }
+
+PUBLIC void
+_glapi_check_multithread(void) { }
+
+#endif
+
/**
@@ -212,198 +234,12 @@ _glapi_get_context(void)
#if defined(GLX_USE_TLS)
return _glapi_tls_Context;
#elif defined(THREADS)
- if (ThreadSafe) {
- return _glthread_GetTSD(&ContextTSD);
- }
- else {
- return _glapi_Context;
- }
+ return (ThreadSafe) ? _glthread_GetTSD(&ContextTSD) : _glapi_Context;
#else
return _glapi_Context;
#endif
}
-#ifdef USE_X86_ASM
-
-#if defined( GLX_USE_TLS )
-extern GLubyte gl_dispatch_functions_start[];
-extern GLubyte gl_dispatch_functions_end[];
-#else
-extern const GLubyte gl_dispatch_functions_start[];
-#endif
-
-#endif /* USE_X86_ASM */
-
-
-#if defined(USE_X64_64_ASM) && defined(GLX_USE_TLS)
-# define DISPATCH_FUNCTION_SIZE 16
-#elif defined(USE_X86_ASM)
-# if defined(THREADS) && !defined(GLX_USE_TLS)
-# define DISPATCH_FUNCTION_SIZE 32
-# else
-# define DISPATCH_FUNCTION_SIZE 16
-# endif
-#endif
-
-#ifdef USE_SPARC_ASM
-#ifdef GLX_USE_TLS
-extern unsigned int __glapi_sparc_tls_stub;
-#else
-extern unsigned int __glapi_sparc_pthread_stub;
-#endif
-#endif
-
-#if !defined(DISPATCH_FUNCTION_SIZE) && !defined(XFree86Server) && !defined(XGLServer)
-# define NEED_FUNCTION_POINTER
-#endif
-
-#if defined(PTHREADS) || defined(GLX_USE_TLS)
-/**
- * Perform platform-specific GL API entry-point fixups.
- */
-static void
-init_glapi_relocs( void )
-{
-#if defined(USE_X86_ASM) && defined(GLX_USE_TLS) && !defined(GLX_X86_READONLY_TEXT)
- extern unsigned long _x86_get_dispatch(void);
- char run_time_patch[] = {
- 0x65, 0xa1, 0, 0, 0, 0 /* movl %gs:0,%eax */
- };
- GLuint *offset = (GLuint *) &run_time_patch[2]; /* 32-bits for x86/32 */
- const GLubyte * const get_disp = (const GLubyte *) run_time_patch;
- GLubyte * curr_func = (GLubyte *) gl_dispatch_functions_start;
-
- *offset = _x86_get_dispatch();
- while ( curr_func != (GLubyte *) gl_dispatch_functions_end ) {
- (void) memcpy( curr_func, get_disp, sizeof(run_time_patch));
- curr_func += DISPATCH_FUNCTION_SIZE;
- }
-#endif
-#ifdef USE_SPARC_ASM
- extern void __glapi_sparc_icache_flush(unsigned int *);
- static const unsigned int template[] = {
-#ifdef GLX_USE_TLS
- 0x05000000, /* sethi %hi(_glapi_tls_Dispatch), %g2 */
- 0x8730e00a, /* srl %g3, 10, %g3 */
- 0x8410a000, /* or %g2, %lo(_glapi_tls_Dispatch), %g2 */
-#ifdef __arch64__
- 0xc259c002, /* ldx [%g7 + %g2], %g1 */
- 0xc2584003, /* ldx [%g1 + %g3], %g1 */
-#else
- 0xc201c002, /* ld [%g7 + %g2], %g1 */
- 0xc2004003, /* ld [%g1 + %g3], %g1 */
-#endif
- 0x81c04000, /* jmp %g1 */
- 0x01000000, /* nop */
-#else
-#ifdef __arch64__
- 0x03000000, /* 64-bit 0x00 --> sethi %hh(_glapi_Dispatch), %g1 */
- 0x05000000, /* 64-bit 0x04 --> sethi %lm(_glapi_Dispatch), %g2 */
- 0x82106000, /* 64-bit 0x08 --> or %g1, %hm(_glapi_Dispatch), %g1 */
- 0x8730e00a, /* 64-bit 0x0c --> srl %g3, 10, %g3 */
- 0x83287020, /* 64-bit 0x10 --> sllx %g1, 32, %g1 */
- 0x82004002, /* 64-bit 0x14 --> add %g1, %g2, %g1 */
- 0xc2586000, /* 64-bit 0x18 --> ldx [%g1 + %lo(_glapi_Dispatch)], %g1 */
-#else
- 0x03000000, /* 32-bit 0x00 --> sethi %hi(_glapi_Dispatch), %g1 */
- 0x8730e00a, /* 32-bit 0x04 --> srl %g3, 10, %g3 */
- 0xc2006000, /* 32-bit 0x08 --> ld [%g1 + %lo(_glapi_Dispatch)], %g1 */
-#endif
- 0x80a06000, /* --> cmp %g1, 0 */
- 0x02800005, /* --> be +4*5 */
- 0x01000000, /* --> nop */
-#ifdef __arch64__
- 0xc2584003, /* 64-bit --> ldx [%g1 + %g3], %g1 */
-#else
- 0xc2004003, /* 32-bit --> ld [%g1 + %g3], %g1 */
-#endif
- 0x81c04000, /* --> jmp %g1 */
- 0x01000000, /* --> nop */
-#ifdef __arch64__
- 0x9de3bf80, /* 64-bit --> save %sp, -128, %sp */
-#else
- 0x9de3bfc0, /* 32-bit --> save %sp, -64, %sp */
-#endif
- 0xa0100003, /* --> mov %g3, %l0 */
- 0x40000000, /* --> call _glapi_get_dispatch */
- 0x01000000, /* --> nop */
- 0x82100008, /* --> mov %o0, %g1 */
- 0x86100010, /* --> mov %l0, %g3 */
- 0x10bffff7, /* --> ba -4*9 */
- 0x81e80000, /* --> restore */
-#endif
- };
-#ifdef GLX_USE_TLS
- extern unsigned long __glapi_sparc_get_dispatch(void);
- unsigned int *code = &__glapi_sparc_tls_stub;
- unsigned long dispatch = __glapi_sparc_get_dispatch();
-#else
- unsigned int *code = &__glapi_sparc_pthread_stub;
- unsigned long dispatch = (unsigned long) &_glapi_Dispatch;
- unsigned long call_dest = (unsigned long ) &_glapi_get_dispatch;
- int idx;
-#endif
-
-#if defined(GLX_USE_TLS)
- code[0] = template[0] | (dispatch >> 10);
- code[1] = template[1];
- __glapi_sparc_icache_flush(&code[0]);
- code[2] = template[2] | (dispatch & 0x3ff);
- code[3] = template[3];
- __glapi_sparc_icache_flush(&code[2]);
- code[4] = template[4];
- code[5] = template[5];
- __glapi_sparc_icache_flush(&code[4]);
- code[6] = template[6];
- __glapi_sparc_icache_flush(&code[6]);
-#else
-#if defined(__arch64__)
- code[0] = template[0] | (dispatch >> (32 + 10));
- code[1] = template[1] | ((dispatch & 0xffffffff) >> 10);
- __glapi_sparc_icache_flush(&code[0]);
- code[2] = template[2] | ((dispatch >> 32) & 0x3ff);
- code[3] = template[3];
- __glapi_sparc_icache_flush(&code[2]);
- code[4] = template[4];
- code[5] = template[5];
- __glapi_sparc_icache_flush(&code[4]);
- code[6] = template[6] | (dispatch & 0x3ff);
- idx = 7;
-#else
- code[0] = template[0] | (dispatch >> 10);
- code[1] = template[1];
- __glapi_sparc_icache_flush(&code[0]);
- code[2] = template[2] | (dispatch & 0x3ff);
- idx = 3;
-#endif
- code[idx + 0] = template[idx + 0];
- __glapi_sparc_icache_flush(&code[idx - 1]);
- code[idx + 1] = template[idx + 1];
- code[idx + 2] = template[idx + 2];
- __glapi_sparc_icache_flush(&code[idx + 1]);
- code[idx + 3] = template[idx + 3];
- code[idx + 4] = template[idx + 4];
- __glapi_sparc_icache_flush(&code[idx + 3]);
- code[idx + 5] = template[idx + 5];
- code[idx + 6] = template[idx + 6];
- __glapi_sparc_icache_flush(&code[idx + 5]);
- code[idx + 7] = template[idx + 7];
- code[idx + 8] = template[idx + 8] |
- (((call_dest - ((unsigned long) &code[idx + 8]))
- >> 2) & 0x3fffffff);
- __glapi_sparc_icache_flush(&code[idx + 7]);
- code[idx + 9] = template[idx + 9];
- code[idx + 10] = template[idx + 10];
- __glapi_sparc_icache_flush(&code[idx + 9]);
- code[idx + 11] = template[idx + 11];
- code[idx + 12] = template[idx + 12];
- __glapi_sparc_icache_flush(&code[idx + 11]);
- code[idx + 13] = template[idx + 13];
- __glapi_sparc_icache_flush(&code[idx + 13]);
-#endif
-#endif
-}
-#endif /* defined(PTHREADS) || defined(GLX_USE_TLS) */
/**
@@ -414,17 +250,15 @@ init_glapi_relocs( void )
PUBLIC void
_glapi_set_dispatch(struct _glapi_table *dispatch)
{
-#if defined(PTHREADS) || defined(GLX_USE_TLS)
- static pthread_once_t once_control = PTHREAD_ONCE_INIT;
- pthread_once( & once_control, init_glapi_relocs );
-#endif
+ init_glapi_relocs_once();
- if (!dispatch) {
+ if (dispatch == NULL) {
/* use the no-op functions */
dispatch = (struct _glapi_table *) __glapi_noop_table;
}
#ifdef DEBUG
else {
+ _glapi_check_table_not_null(dispatch);
_glapi_check_table(dispatch);
}
#endif
@@ -434,9 +268,9 @@ _glapi_set_dispatch(struct _glapi_table *dispatch)
#elif defined(THREADS)
_glthread_SetTSD(&_gl_DispatchTSD, (void *) dispatch);
_glapi_Dispatch = (ThreadSafe) ? NULL : dispatch;
-#else /*THREADS*/
+#else
_glapi_Dispatch = dispatch;
-#endif /*THREADS*/
+#endif
}
@@ -447,17 +281,15 @@ _glapi_set_dispatch(struct _glapi_table *dispatch)
PUBLIC struct _glapi_table *
_glapi_get_dispatch(void)
{
- struct _glapi_table * api;
#if defined(GLX_USE_TLS)
- api = _glapi_tls_Dispatch;
+ return _glapi_tls_Dispatch;
#elif defined(THREADS)
- api = (ThreadSafe)
+ return (ThreadSafe)
? (struct _glapi_table *) _glthread_GetTSD(&_gl_DispatchTSD)
: _glapi_Dispatch;
#else
- api = _glapi_Dispatch;
+ return _glapi_Dispatch;
#endif
- return api;
}
@@ -488,75 +320,15 @@ _glapi_get_dispatch_table_size(void)
* Intended for debugging purposes.
*/
void
-_glapi_check_table(const struct _glapi_table *table)
+_glapi_check_table_not_null(const struct _glapi_table *table)
{
-#if 0 /* Enable this for extra DEBUG */
+#if 0 /* enable this for extra DEBUG */
const GLuint entries = _glapi_get_dispatch_table_size();
const void **tab = (const void **) table;
GLuint i;
for (i = 1; i < entries; i++) {
assert(tab[i]);
}
-
- /* Do some spot checks to be sure that the dispatch table
- * slots are assigned correctly.
- */
- {
- GLuint BeginOffset = _glapi_get_proc_offset("glBegin");
- char *BeginFunc = (char*) &table->Begin;
- GLuint offset = (BeginFunc - (char *) table) / sizeof(void *);
- assert(BeginOffset == _gloffset_Begin);
- assert(BeginOffset == offset);
- }
- {
- GLuint viewportOffset = _glapi_get_proc_offset("glViewport");
- char *viewportFunc = (char*) &table->Viewport;
- GLuint offset = (viewportFunc - (char *) table) / sizeof(void *);
- assert(viewportOffset == _gloffset_Viewport);
- assert(viewportOffset == offset);
- }
- {
- GLuint VertexPointerOffset = _glapi_get_proc_offset("glVertexPointer");
- char *VertexPointerFunc = (char*) &table->VertexPointer;
- GLuint offset = (VertexPointerFunc - (char *) table) / sizeof(void *);
- assert(VertexPointerOffset == _gloffset_VertexPointer);
- assert(VertexPointerOffset == offset);
- }
- {
- GLuint ResetMinMaxOffset = _glapi_get_proc_offset("glResetMinmax");
- char *ResetMinMaxFunc = (char*) &table->ResetMinmax;
- GLuint offset = (ResetMinMaxFunc - (char *) table) / sizeof(void *);
- assert(ResetMinMaxOffset == _gloffset_ResetMinmax);
- assert(ResetMinMaxOffset == offset);
- }
- {
- GLuint blendColorOffset = _glapi_get_proc_offset("glBlendColor");
- char *blendColorFunc = (char*) &table->BlendColor;
- GLuint offset = (blendColorFunc - (char *) table) / sizeof(void *);
- assert(blendColorOffset == _gloffset_BlendColor);
- assert(blendColorOffset == offset);
- }
- {
- GLuint secondaryColor3fOffset = _glapi_get_proc_offset("glSecondaryColor3fEXT");
- char *secondaryColor3fFunc = (char*) &table->SecondaryColor3fEXT;
- GLuint offset = (secondaryColor3fFunc - (char *) table) / sizeof(void *);
- assert(secondaryColor3fOffset == _gloffset_SecondaryColor3fEXT);
- assert(secondaryColor3fOffset == offset);
- }
- {
- GLuint pointParameterivOffset = _glapi_get_proc_offset("glPointParameterivNV");
- char *pointParameterivFunc = (char*) &table->PointParameterivNV;
- GLuint offset = (pointParameterivFunc - (char *) table) / sizeof(void *);
- assert(pointParameterivOffset == _gloffset_PointParameterivNV);
- assert(pointParameterivOffset == offset);
- }
- {
- GLuint setFenceOffset = _glapi_get_proc_offset("glSetFenceNV");
- char *setFenceFunc = (char*) &table->SetFenceNV;
- GLuint offset = (setFenceFunc - (char *) table) / sizeof(void *);
- assert(setFenceOffset == _gloffset_SetFenceNV);
- assert(setFenceOffset == offset);
- }
#else
(void) table;
#endif
diff --git a/src/mesa/glapi/glapi.h b/src/mesa/glapi/glapi.h
index f802a61d3b..1ca2e4beff 100644
--- a/src/mesa/glapi/glapi.h
+++ b/src/mesa/glapi/glapi.h
@@ -44,8 +44,6 @@
#ifndef _GLAPI_H
#define _GLAPI_H
-#define GL_GLEXT_PROTOTYPES
-
#include "glthread.h"
@@ -59,40 +57,61 @@ typedef void (*_glapi_proc)(void); /* generic function pointer */
#define _glapi_get_dispatch _mglapi_get_dispatch
#define _glapi_set_context _mglapi_set_context
#define _glapi_get_context _mglapi_get_context
-#define _glapi_Context _mglapi_Context
#define _glapi_Dispatch _mglapi_Dispatch
+#define _glapi_Context _mglapi_Context
#endif
-/*
- * Number of extension functions which we can dynamically add at runtime.
- */
-#define MAX_EXTENSION_FUNCS 300
+#if defined(__GNUC__)
+# define likely(x) __builtin_expect(!!(x), 1)
+# define unlikely(x) __builtin_expect(!!(x), 0)
+#else
+# define likely(x) (x)
+# define unlikely(x) (x)
+#endif
/**
- ** Define the GET_CURRENT_CONTEXT() macro.
+ ** Define the GET_DISPATCH() and GET_CURRENT_CONTEXT() macros.
+ **
** \param C local variable which will hold the current context.
**/
#if defined (GLX_USE_TLS)
-extern const void *_glapi_Context;
extern const struct _glapi_table *_glapi_Dispatch;
+extern const void *_glapi_Context;
+
+extern __thread struct _glapi_table * _glapi_tls_Dispatch
+ __attribute__((tls_model("initial-exec")));
+
extern __thread void * _glapi_tls_Context
__attribute__((tls_model("initial-exec")));
+# define GET_DISPATCH() _glapi_tls_Dispatch
+
# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_tls_Context
#else
-extern void *_glapi_Context;
extern struct _glapi_table *_glapi_Dispatch;
+extern void *_glapi_Context;
+
# ifdef THREADS
-# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) (_glapi_Context ? _glapi_Context : _glapi_get_context())
+
+# define GET_DISPATCH() \
+ (likely(_glapi_Dispatch) ? _glapi_Dispatch : _glapi_get_dispatch())
+
+# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) \
+ (likely(_glapi_Context) ? _glapi_Context : _glapi_get_context())
+
# else
+
+# define GET_DISPATCH() _glapi_Dispatch
+
# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_Context
+
# endif
#endif /* defined (GLX_USE_TLS) */
@@ -103,6 +122,14 @@ extern struct _glapi_table *_glapi_Dispatch;
**/
extern void
+_glapi_init_multithread(void);
+
+
+extern void
+_glapi_destroy_multithread(void);
+
+
+extern void
_glapi_check_multithread(void);
@@ -122,26 +149,10 @@ extern struct _glapi_table *
_glapi_get_dispatch(void);
-extern int
-_glapi_begin_dispatch_override(struct _glapi_table *override);
-
-
-extern void
-_glapi_end_dispatch_override(int layer);
-
-
-struct _glapi_table *
-_glapi_get_override_dispatch(int layer);
-
-
extern unsigned int
_glapi_get_dispatch_table_size(void);
-extern void
-_glapi_check_table(const struct _glapi_table *table);
-
-
extern int
_glapi_add_dispatch( const char * const * function_names,
const char * parameter_signature );
@@ -154,8 +165,29 @@ extern _glapi_proc
_glapi_get_proc_address(const char *funcName);
+/**
+ * GL API local functions and defines
+ */
+
+extern void
+init_glapi_relocs_once(void);
+
+extern void
+_glapi_check_table_not_null(const struct _glapi_table *table);
+
+
+extern void
+_glapi_check_table(const struct _glapi_table *table);
+
+
extern const char *
_glapi_get_proc_name(unsigned int offset);
+/*
+ * Number of extension functions which we can dynamically add at runtime.
+ */
+#define MAX_EXTENSION_FUNCS 300
+
+
#endif
diff --git a/src/mesa/glapi/glapi_getproc.c b/src/mesa/glapi/glapi_getproc.c
index 69eb42c79e..a6dbf173e8 100644
--- a/src/mesa/glapi/glapi_getproc.c
+++ b/src/mesa/glapi/glapi_getproc.c
@@ -43,27 +43,6 @@
#include "glapi/glapitable.h"
-static void
-fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset);
-
-
-/**
- * strdup() is actually not a standard ANSI C or POSIX routine.
- * Irix will not define it if ANSI mode is in effect.
- */
-static char *
-str_dup(const char *str)
-{
- char *copy;
- copy = (char*) malloc(strlen(str) + 1);
- if (!copy)
- return NULL;
- strcpy(copy, str);
- return copy;
-}
-
-
-
#if defined(USE_X64_64_ASM) && defined(GLX_USE_TLS)
# define DISPATCH_FUNCTION_SIZE 16
#elif defined(USE_X86_ASM)
@@ -121,7 +100,6 @@ get_static_proc_offset(const char *funcName)
}
-#if !defined(XFree86Server) && !defined(XGLServer)
#ifdef USE_X86_ASM
#if defined( GLX_USE_TLS )
@@ -134,6 +112,8 @@ extern const GLubyte gl_dispatch_functions_start[];
#endif /* USE_X86_ASM */
+#if !defined(XFree86Server) && !defined(XGLServer)
+
/**
* Return dispatch function address for the named static (built-in) function.
* Return NULL if function not found.
@@ -182,6 +162,172 @@ get_static_proc_name( GLuint offset )
+#if defined(PTHREADS) || defined(GLX_USE_TLS)
+
+/**
+ * Perform platform-specific GL API entry-point fixups.
+ */
+static void
+init_glapi_relocs( void )
+{
+#if defined(USE_X86_ASM) && defined(GLX_USE_TLS) && !defined(GLX_X86_READONLY_TEXT)
+ extern unsigned long _x86_get_dispatch(void);
+ char run_time_patch[] = {
+ 0x65, 0xa1, 0, 0, 0, 0 /* movl %gs:0,%eax */
+ };
+ GLuint *offset = (GLuint *) &run_time_patch[2]; /* 32-bits for x86/32 */
+ const GLubyte * const get_disp = (const GLubyte *) run_time_patch;
+ GLubyte * curr_func = (GLubyte *) gl_dispatch_functions_start;
+
+ *offset = _x86_get_dispatch();
+ while ( curr_func != (GLubyte *) gl_dispatch_functions_end ) {
+ (void) memcpy( curr_func, get_disp, sizeof(run_time_patch));
+ curr_func += DISPATCH_FUNCTION_SIZE;
+ }
+#endif
+#ifdef USE_SPARC_ASM
+ extern void __glapi_sparc_icache_flush(unsigned int *);
+ static const unsigned int template[] = {
+#ifdef GLX_USE_TLS
+ 0x05000000, /* sethi %hi(_glapi_tls_Dispatch), %g2 */
+ 0x8730e00a, /* srl %g3, 10, %g3 */
+ 0x8410a000, /* or %g2, %lo(_glapi_tls_Dispatch), %g2 */
+#ifdef __arch64__
+ 0xc259c002, /* ldx [%g7 + %g2], %g1 */
+ 0xc2584003, /* ldx [%g1 + %g3], %g1 */
+#else
+ 0xc201c002, /* ld [%g7 + %g2], %g1 */
+ 0xc2004003, /* ld [%g1 + %g3], %g1 */
+#endif
+ 0x81c04000, /* jmp %g1 */
+ 0x01000000, /* nop */
+#else
+#ifdef __arch64__
+ 0x03000000, /* 64-bit 0x00 --> sethi %hh(_glapi_Dispatch), %g1 */
+ 0x05000000, /* 64-bit 0x04 --> sethi %lm(_glapi_Dispatch), %g2 */
+ 0x82106000, /* 64-bit 0x08 --> or %g1, %hm(_glapi_Dispatch), %g1 */
+ 0x8730e00a, /* 64-bit 0x0c --> srl %g3, 10, %g3 */
+ 0x83287020, /* 64-bit 0x10 --> sllx %g1, 32, %g1 */
+ 0x82004002, /* 64-bit 0x14 --> add %g1, %g2, %g1 */
+ 0xc2586000, /* 64-bit 0x18 --> ldx [%g1 + %lo(_glapi_Dispatch)], %g1 */
+#else
+ 0x03000000, /* 32-bit 0x00 --> sethi %hi(_glapi_Dispatch), %g1 */
+ 0x8730e00a, /* 32-bit 0x04 --> srl %g3, 10, %g3 */
+ 0xc2006000, /* 32-bit 0x08 --> ld [%g1 + %lo(_glapi_Dispatch)], %g1 */
+#endif
+ 0x80a06000, /* --> cmp %g1, 0 */
+ 0x02800005, /* --> be +4*5 */
+ 0x01000000, /* --> nop */
+#ifdef __arch64__
+ 0xc2584003, /* 64-bit --> ldx [%g1 + %g3], %g1 */
+#else
+ 0xc2004003, /* 32-bit --> ld [%g1 + %g3], %g1 */
+#endif
+ 0x81c04000, /* --> jmp %g1 */
+ 0x01000000, /* --> nop */
+#ifdef __arch64__
+ 0x9de3bf80, /* 64-bit --> save %sp, -128, %sp */
+#else
+ 0x9de3bfc0, /* 32-bit --> save %sp, -64, %sp */
+#endif
+ 0xa0100003, /* --> mov %g3, %l0 */
+ 0x40000000, /* --> call _glapi_get_dispatch */
+ 0x01000000, /* --> nop */
+ 0x82100008, /* --> mov %o0, %g1 */
+ 0x86100010, /* --> mov %l0, %g3 */
+ 0x10bffff7, /* --> ba -4*9 */
+ 0x81e80000, /* --> restore */
+#endif
+ };
+#ifdef GLX_USE_TLS
+ extern unsigned int __glapi_sparc_tls_stub;
+ extern unsigned long __glapi_sparc_get_dispatch(void);
+ unsigned int *code = &__glapi_sparc_tls_stub;
+ unsigned long dispatch = __glapi_sparc_get_dispatch();
+#else
+ extern unsigned int __glapi_sparc_pthread_stub;
+ unsigned int *code = &__glapi_sparc_pthread_stub;
+ unsigned long dispatch = (unsigned long) &_glapi_Dispatch;
+ unsigned long call_dest = (unsigned long ) &_glapi_get_dispatch;
+ int idx;
+#endif
+
+#if defined(GLX_USE_TLS)
+ code[0] = template[0] | (dispatch >> 10);
+ code[1] = template[1];
+ __glapi_sparc_icache_flush(&code[0]);
+ code[2] = template[2] | (dispatch & 0x3ff);
+ code[3] = template[3];
+ __glapi_sparc_icache_flush(&code[2]);
+ code[4] = template[4];
+ code[5] = template[5];
+ __glapi_sparc_icache_flush(&code[4]);
+ code[6] = template[6];
+ __glapi_sparc_icache_flush(&code[6]);
+#else
+#if defined(__arch64__)
+ code[0] = template[0] | (dispatch >> (32 + 10));
+ code[1] = template[1] | ((dispatch & 0xffffffff) >> 10);
+ __glapi_sparc_icache_flush(&code[0]);
+ code[2] = template[2] | ((dispatch >> 32) & 0x3ff);
+ code[3] = template[3];
+ __glapi_sparc_icache_flush(&code[2]);
+ code[4] = template[4];
+ code[5] = template[5];
+ __glapi_sparc_icache_flush(&code[4]);
+ code[6] = template[6] | (dispatch & 0x3ff);
+ idx = 7;
+#else
+ code[0] = template[0] | (dispatch >> 10);
+ code[1] = template[1];
+ __glapi_sparc_icache_flush(&code[0]);
+ code[2] = template[2] | (dispatch & 0x3ff);
+ idx = 3;
+#endif
+ code[idx + 0] = template[idx + 0];
+ __glapi_sparc_icache_flush(&code[idx - 1]);
+ code[idx + 1] = template[idx + 1];
+ code[idx + 2] = template[idx + 2];
+ __glapi_sparc_icache_flush(&code[idx + 1]);
+ code[idx + 3] = template[idx + 3];
+ code[idx + 4] = template[idx + 4];
+ __glapi_sparc_icache_flush(&code[idx + 3]);
+ code[idx + 5] = template[idx + 5];
+ code[idx + 6] = template[idx + 6];
+ __glapi_sparc_icache_flush(&code[idx + 5]);
+ code[idx + 7] = template[idx + 7];
+ code[idx + 8] = template[idx + 8] |
+ (((call_dest - ((unsigned long) &code[idx + 8]))
+ >> 2) & 0x3fffffff);
+ __glapi_sparc_icache_flush(&code[idx + 7]);
+ code[idx + 9] = template[idx + 9];
+ code[idx + 10] = template[idx + 10];
+ __glapi_sparc_icache_flush(&code[idx + 9]);
+ code[idx + 11] = template[idx + 11];
+ code[idx + 12] = template[idx + 12];
+ __glapi_sparc_icache_flush(&code[idx + 11]);
+ code[idx + 13] = template[idx + 13];
+ __glapi_sparc_icache_flush(&code[idx + 13]);
+#endif
+#endif
+}
+
+void
+init_glapi_relocs_once( void )
+{
+ static pthread_once_t once_control = PTHREAD_ONCE_INIT;
+ pthread_once( & once_control, init_glapi_relocs );
+}
+
+#else
+
+void
+init_glapi_relocs_once( void ) { }
+
+#endif /* defined(PTHREADS) || defined(GLX_USE_TLS) */
+
+
+
/**********************************************************************
* Extension function management.
*/
@@ -239,6 +385,9 @@ static GLuint NumExtEntryPoints = 0;
extern void __glapi_sparc_icache_flush(unsigned int *);
#endif
+static void
+fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset);
+
/**
* Generate a dispatch function (entrypoint) which jumps through
* the given slot number (offset) in the current dispatch table.
@@ -263,7 +412,9 @@ generate_entrypoint(GLuint functionOffset)
}
return (_glapi_proc) code;
-#elif defined(USE_SPARC_ASM) && (defined(PTHREADS) || defined(GLX_USE_TLS))
+#elif defined(USE_SPARC_ASM)
+
+#if defined(PTHREADS) || defined(GLX_USE_TLS)
static const unsigned int template[] = {
0x07000000, /* sethi %hi(0), %g3 */
0x8210000f, /* mov %o7, %g1 */
@@ -289,6 +440,8 @@ generate_entrypoint(GLuint functionOffset)
__glapi_sparc_icache_flush(&code[2]);
}
return (_glapi_proc) code;
+#endif
+
#else
(void) functionOffset;
return NULL;
@@ -333,6 +486,22 @@ fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset)
/**
+ * strdup() is actually not a standard ANSI C or POSIX routine.
+ * Irix will not define it if ANSI mode is in effect.
+ */
+static char *
+str_dup(const char *str)
+{
+ char *copy;
+ copy = (char*) malloc(strlen(str) + 1);
+ if (!copy)
+ return NULL;
+ strcpy(copy, str);
+ return copy;
+}
+
+
+/**
* Generate new entrypoint
*
* Use a temporary dispatch offset of ~0 (i.e. -1). Later, when the driver
@@ -594,3 +763,74 @@ _glapi_get_proc_name(GLuint offset)
}
return NULL;
}
+
+
+
+/**
+ * Do some spot checks to be sure that the dispatch table
+ * slots are assigned correctly. For debugging only.
+ */
+void
+_glapi_check_table(const struct _glapi_table *table)
+{
+#if 0 /* enable this for extra DEBUG */
+ {
+ GLuint BeginOffset = _glapi_get_proc_offset("glBegin");
+ char *BeginFunc = (char*) &table->Begin;
+ GLuint offset = (BeginFunc - (char *) table) / sizeof(void *);
+ assert(BeginOffset == _gloffset_Begin);
+ assert(BeginOffset == offset);
+ }
+ {
+ GLuint viewportOffset = _glapi_get_proc_offset("glViewport");
+ char *viewportFunc = (char*) &table->Viewport;
+ GLuint offset = (viewportFunc - (char *) table) / sizeof(void *);
+ assert(viewportOffset == _gloffset_Viewport);
+ assert(viewportOffset == offset);
+ }
+ {
+ GLuint VertexPointerOffset = _glapi_get_proc_offset("glVertexPointer");
+ char *VertexPointerFunc = (char*) &table->VertexPointer;
+ GLuint offset = (VertexPointerFunc - (char *) table) / sizeof(void *);
+ assert(VertexPointerOffset == _gloffset_VertexPointer);
+ assert(VertexPointerOffset == offset);
+ }
+ {
+ GLuint ResetMinMaxOffset = _glapi_get_proc_offset("glResetMinmax");
+ char *ResetMinMaxFunc = (char*) &table->ResetMinmax;
+ GLuint offset = (ResetMinMaxFunc - (char *) table) / sizeof(void *);
+ assert(ResetMinMaxOffset == _gloffset_ResetMinmax);
+ assert(ResetMinMaxOffset == offset);
+ }
+ {
+ GLuint blendColorOffset = _glapi_get_proc_offset("glBlendColor");
+ char *blendColorFunc = (char*) &table->BlendColor;
+ GLuint offset = (blendColorFunc - (char *) table) / sizeof(void *);
+ assert(blendColorOffset == _gloffset_BlendColor);
+ assert(blendColorOffset == offset);
+ }
+ {
+ GLuint secondaryColor3fOffset = _glapi_get_proc_offset("glSecondaryColor3fEXT");
+ char *secondaryColor3fFunc = (char*) &table->SecondaryColor3fEXT;
+ GLuint offset = (secondaryColor3fFunc - (char *) table) / sizeof(void *);
+ assert(secondaryColor3fOffset == _gloffset_SecondaryColor3fEXT);
+ assert(secondaryColor3fOffset == offset);
+ }
+ {
+ GLuint pointParameterivOffset = _glapi_get_proc_offset("glPointParameterivNV");
+ char *pointParameterivFunc = (char*) &table->PointParameterivNV;
+ GLuint offset = (pointParameterivFunc - (char *) table) / sizeof(void *);
+ assert(pointParameterivOffset == _gloffset_PointParameterivNV);
+ assert(pointParameterivOffset == offset);
+ }
+ {
+ GLuint setFenceOffset = _glapi_get_proc_offset("glSetFenceNV");
+ char *setFenceFunc = (char*) &table->SetFenceNV;
+ GLuint offset = (setFenceFunc - (char *) table) / sizeof(void *);
+ assert(setFenceOffset == _gloffset_SetFenceNV);
+ assert(setFenceOffset == offset);
+ }
+#else
+ (void) table;
+#endif
+}
diff --git a/src/mesa/glapi/glapidispatch.h b/src/mesa/glapi/glapidispatch.h
index b7f661c535..7e0f21390f 100644
--- a/src/mesa/glapi/glapidispatch.h
+++ b/src/mesa/glapi/glapidispatch.h
@@ -2455,6 +2455,15 @@
#define CALL_TextureRangeAPPLE(disp, parameters) (*((disp)->TextureRangeAPPLE)) parameters
#define GET_TextureRangeAPPLE(disp) ((disp)->TextureRangeAPPLE)
#define SET_TextureRangeAPPLE(disp, fn) ((disp)->TextureRangeAPPLE = fn)
+#define CALL_GetObjectParameterivAPPLE(disp, parameters) (*((disp)->GetObjectParameterivAPPLE)) parameters
+#define GET_GetObjectParameterivAPPLE(disp) ((disp)->GetObjectParameterivAPPLE)
+#define SET_GetObjectParameterivAPPLE(disp, fn) ((disp)->GetObjectParameterivAPPLE = fn)
+#define CALL_ObjectPurgeableAPPLE(disp, parameters) (*((disp)->ObjectPurgeableAPPLE)) parameters
+#define GET_ObjectPurgeableAPPLE(disp) ((disp)->ObjectPurgeableAPPLE)
+#define SET_ObjectPurgeableAPPLE(disp, fn) ((disp)->ObjectPurgeableAPPLE = fn)
+#define CALL_ObjectUnpurgeableAPPLE(disp, parameters) (*((disp)->ObjectUnpurgeableAPPLE)) parameters
+#define GET_ObjectUnpurgeableAPPLE(disp) ((disp)->ObjectUnpurgeableAPPLE)
+#define SET_ObjectUnpurgeableAPPLE(disp, fn) ((disp)->ObjectUnpurgeableAPPLE = fn)
#define CALL_StencilFuncSeparateATI(disp, parameters) (*((disp)->StencilFuncSeparateATI)) parameters
#define GET_StencilFuncSeparateATI(disp) ((disp)->StencilFuncSeparateATI)
#define SET_StencilFuncSeparateATI(disp, fn) ((disp)->StencilFuncSeparateATI = fn)
@@ -2479,7 +2488,7 @@
#else
-#define driDispatchRemapTable_size 397
+#define driDispatchRemapTable_size 400
extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define AttachShader_remap_index 0
@@ -2872,13 +2881,16 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define ProvokingVertexEXT_remap_index 387
#define GetTexParameterPointervAPPLE_remap_index 388
#define TextureRangeAPPLE_remap_index 389
-#define StencilFuncSeparateATI_remap_index 390
-#define ProgramEnvParameters4fvEXT_remap_index 391
-#define ProgramLocalParameters4fvEXT_remap_index 392
-#define GetQueryObjecti64vEXT_remap_index 393
-#define GetQueryObjectui64vEXT_remap_index 394
-#define EGLImageTargetRenderbufferStorageOES_remap_index 395
-#define EGLImageTargetTexture2DOES_remap_index 396
+#define GetObjectParameterivAPPLE_remap_index 390
+#define ObjectPurgeableAPPLE_remap_index 391
+#define ObjectUnpurgeableAPPLE_remap_index 392
+#define StencilFuncSeparateATI_remap_index 393
+#define ProgramEnvParameters4fvEXT_remap_index 394
+#define ProgramLocalParameters4fvEXT_remap_index 395
+#define GetQueryObjecti64vEXT_remap_index 396
+#define GetQueryObjectui64vEXT_remap_index 397
+#define EGLImageTargetRenderbufferStorageOES_remap_index 398
+#define EGLImageTargetTexture2DOES_remap_index 399
#define CALL_AttachShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), driDispatchRemapTable[AttachShader_remap_index], parameters)
#define GET_AttachShader(disp) GET_by_offset(disp, driDispatchRemapTable[AttachShader_remap_index])
@@ -4050,6 +4062,15 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define CALL_TextureRangeAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLvoid *)), driDispatchRemapTable[TextureRangeAPPLE_remap_index], parameters)
#define GET_TextureRangeAPPLE(disp) GET_by_offset(disp, driDispatchRemapTable[TextureRangeAPPLE_remap_index])
#define SET_TextureRangeAPPLE(disp, fn) SET_by_offset(disp, driDispatchRemapTable[TextureRangeAPPLE_remap_index], fn)
+#define CALL_GetObjectParameterivAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLint *)), driDispatchRemapTable[GetObjectParameterivAPPLE_remap_index], parameters)
+#define GET_GetObjectParameterivAPPLE(disp) GET_by_offset(disp, driDispatchRemapTable[GetObjectParameterivAPPLE_remap_index])
+#define SET_GetObjectParameterivAPPLE(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetObjectParameterivAPPLE_remap_index], fn)
+#define CALL_ObjectPurgeableAPPLE(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum, GLuint, GLenum)), driDispatchRemapTable[ObjectPurgeableAPPLE_remap_index], parameters)
+#define GET_ObjectPurgeableAPPLE(disp) GET_by_offset(disp, driDispatchRemapTable[ObjectPurgeableAPPLE_remap_index])
+#define SET_ObjectPurgeableAPPLE(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ObjectPurgeableAPPLE_remap_index], fn)
+#define CALL_ObjectUnpurgeableAPPLE(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum, GLuint, GLenum)), driDispatchRemapTable[ObjectUnpurgeableAPPLE_remap_index], parameters)
+#define GET_ObjectUnpurgeableAPPLE(disp) GET_by_offset(disp, driDispatchRemapTable[ObjectUnpurgeableAPPLE_remap_index])
+#define SET_ObjectUnpurgeableAPPLE(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ObjectUnpurgeableAPPLE_remap_index], fn)
#define CALL_StencilFuncSeparateATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLuint)), driDispatchRemapTable[StencilFuncSeparateATI_remap_index], parameters)
#define GET_StencilFuncSeparateATI(disp) GET_by_offset(disp, driDispatchRemapTable[StencilFuncSeparateATI_remap_index])
#define SET_StencilFuncSeparateATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[StencilFuncSeparateATI_remap_index], fn)
diff --git a/src/mesa/glapi/glapioffsets.h b/src/mesa/glapi/glapioffsets.h
index 8e16e22983..6d7bc2a0fa 100644
--- a/src/mesa/glapi/glapioffsets.h
+++ b/src/mesa/glapi/glapioffsets.h
@@ -832,14 +832,17 @@
#define _gloffset_ProvokingVertexEXT 795
#define _gloffset_GetTexParameterPointervAPPLE 796
#define _gloffset_TextureRangeAPPLE 797
-#define _gloffset_StencilFuncSeparateATI 798
-#define _gloffset_ProgramEnvParameters4fvEXT 799
-#define _gloffset_ProgramLocalParameters4fvEXT 800
-#define _gloffset_GetQueryObjecti64vEXT 801
-#define _gloffset_GetQueryObjectui64vEXT 802
-#define _gloffset_EGLImageTargetRenderbufferStorageOES 803
-#define _gloffset_EGLImageTargetTexture2DOES 804
-#define _gloffset_FIRST_DYNAMIC 805
+#define _gloffset_GetObjectParameterivAPPLE 798
+#define _gloffset_ObjectPurgeableAPPLE 799
+#define _gloffset_ObjectUnpurgeableAPPLE 800
+#define _gloffset_StencilFuncSeparateATI 801
+#define _gloffset_ProgramEnvParameters4fvEXT 802
+#define _gloffset_ProgramLocalParameters4fvEXT 803
+#define _gloffset_GetQueryObjecti64vEXT 804
+#define _gloffset_GetQueryObjectui64vEXT 805
+#define _gloffset_EGLImageTargetRenderbufferStorageOES 806
+#define _gloffset_EGLImageTargetTexture2DOES 807
+#define _gloffset_FIRST_DYNAMIC 808
#else
@@ -1233,6 +1236,9 @@
#define _gloffset_ProvokingVertexEXT driDispatchRemapTable[ProvokingVertexEXT_remap_index]
#define _gloffset_GetTexParameterPointervAPPLE driDispatchRemapTable[GetTexParameterPointervAPPLE_remap_index]
#define _gloffset_TextureRangeAPPLE driDispatchRemapTable[TextureRangeAPPLE_remap_index]
+#define _gloffset_GetObjectParameterivAPPLE driDispatchRemapTable[GetObjectParameterivAPPLE_remap_index]
+#define _gloffset_ObjectPurgeableAPPLE driDispatchRemapTable[ObjectPurgeableAPPLE_remap_index]
+#define _gloffset_ObjectUnpurgeableAPPLE driDispatchRemapTable[ObjectUnpurgeableAPPLE_remap_index]
#define _gloffset_StencilFuncSeparateATI driDispatchRemapTable[StencilFuncSeparateATI_remap_index]
#define _gloffset_ProgramEnvParameters4fvEXT driDispatchRemapTable[ProgramEnvParameters4fvEXT_remap_index]
#define _gloffset_ProgramLocalParameters4fvEXT driDispatchRemapTable[ProgramLocalParameters4fvEXT_remap_index]
diff --git a/src/mesa/glapi/glapitable.h b/src/mesa/glapi/glapitable.h
index 8aeb450b99..149ff3f3c4 100644
--- a/src/mesa/glapi/glapitable.h
+++ b/src/mesa/glapi/glapitable.h
@@ -838,13 +838,16 @@ struct _glapi_table
void (GLAPIENTRYP ProvokingVertexEXT)(GLenum mode); /* 795 */
void (GLAPIENTRYP GetTexParameterPointervAPPLE)(GLenum target, GLenum pname, GLvoid ** params); /* 796 */
void (GLAPIENTRYP TextureRangeAPPLE)(GLenum target, GLsizei length, GLvoid * pointer); /* 797 */
- void (GLAPIENTRYP StencilFuncSeparateATI)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); /* 798 */
- void (GLAPIENTRYP ProgramEnvParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 799 */
- void (GLAPIENTRYP ProgramLocalParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 800 */
- void (GLAPIENTRYP GetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64EXT * params); /* 801 */
- void (GLAPIENTRYP GetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64EXT * params); /* 802 */
- void (GLAPIENTRYP EGLImageTargetRenderbufferStorageOES)(GLenum target, GLvoid * writeOffset); /* 803 */
- void (GLAPIENTRYP EGLImageTargetTexture2DOES)(GLenum target, GLvoid * writeOffset); /* 804 */
+ void (GLAPIENTRYP GetObjectParameterivAPPLE)(GLenum objectType, GLuint name, GLenum pname, GLint * value); /* 798 */
+ GLenum (GLAPIENTRYP ObjectPurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option); /* 799 */
+ GLenum (GLAPIENTRYP ObjectUnpurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option); /* 800 */
+ void (GLAPIENTRYP StencilFuncSeparateATI)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); /* 801 */
+ void (GLAPIENTRYP ProgramEnvParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 802 */
+ void (GLAPIENTRYP ProgramLocalParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 803 */
+ void (GLAPIENTRYP GetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64EXT * params); /* 804 */
+ void (GLAPIENTRYP GetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64EXT * params); /* 805 */
+ void (GLAPIENTRYP EGLImageTargetRenderbufferStorageOES)(GLenum target, GLvoid * writeOffset); /* 806 */
+ void (GLAPIENTRYP EGLImageTargetTexture2DOES)(GLenum target, GLvoid * writeOffset); /* 807 */
};
#endif /* !defined( _GLAPI_TABLE_H_ ) */
diff --git a/src/mesa/glapi/glapitemp.h b/src/mesa/glapi/glapitemp.h
index 2ef4728e09..ea6b61159d 100644
--- a/src/mesa/glapi/glapitemp.h
+++ b/src/mesa/glapi/glapitemp.h
@@ -27,7 +27,7 @@
*/
-# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))) && defined(__ELF__)
+# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) && defined(__ELF__)
# define HIDDEN __attribute__((visibility("hidden")))
# else
# define HIDDEN
@@ -5577,37 +5577,52 @@ KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_797)(GLenum target, GLsizei lengt
DISPATCH(TextureRangeAPPLE, (target, length, pointer), (F, "glTextureRangeAPPLE(0x%x, %d, %p);\n", target, length, (const void *) pointer));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_798)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+KEYWORD1 void KEYWORD2 NAME(GetObjectParameterivAPPLE)(GLenum objectType, GLuint name, GLenum pname, GLint * value)
+{
+ DISPATCH(GetObjectParameterivAPPLE, (objectType, name, pname, value), (F, "glGetObjectParameterivAPPLE(0x%x, %d, 0x%x, %p);\n", objectType, name, pname, (const void *) value));
+}
+
+KEYWORD1 GLenum KEYWORD2 NAME(ObjectPurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option)
+{
+ RETURN_DISPATCH(ObjectPurgeableAPPLE, (objectType, name, option), (F, "glObjectPurgeableAPPLE(0x%x, %d, 0x%x);\n", objectType, name, option));
+}
+
+KEYWORD1 GLenum KEYWORD2 NAME(ObjectUnpurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option)
+{
+ RETURN_DISPATCH(ObjectUnpurgeableAPPLE, (objectType, name, option), (F, "glObjectUnpurgeableAPPLE(0x%x, %d, 0x%x);\n", objectType, name, option));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_801)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_798)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_801)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask)
{
DISPATCH(StencilFuncSeparateATI, (frontfunc, backfunc, ref, mask), (F, "glStencilFuncSeparateATI(0x%x, 0x%x, %d, %d);\n", frontfunc, backfunc, ref, mask));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_799)(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_802)(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_799)(GLenum target, GLuint index, GLsizei count, const GLfloat * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_802)(GLenum target, GLuint index, GLsizei count, const GLfloat * params)
{
DISPATCH(ProgramEnvParameters4fvEXT, (target, index, count, params), (F, "glProgramEnvParameters4fvEXT(0x%x, %d, %d, %p);\n", target, index, count, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_800)(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_803)(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_800)(GLenum target, GLuint index, GLsizei count, const GLfloat * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_803)(GLenum target, GLuint index, GLsizei count, const GLfloat * params)
{
DISPATCH(ProgramLocalParameters4fvEXT, (target, index, count, params), (F, "glProgramLocalParameters4fvEXT(0x%x, %d, %d, %p);\n", target, index, count, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_801)(GLuint id, GLenum pname, GLint64EXT * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_804)(GLuint id, GLenum pname, GLint64EXT * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_801)(GLuint id, GLenum pname, GLint64EXT * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_804)(GLuint id, GLenum pname, GLint64EXT * params)
{
DISPATCH(GetQueryObjecti64vEXT, (id, pname, params), (F, "glGetQueryObjecti64vEXT(%d, 0x%x, %p);\n", id, pname, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_802)(GLuint id, GLenum pname, GLuint64EXT * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_805)(GLuint id, GLenum pname, GLuint64EXT * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_802)(GLuint id, GLenum pname, GLuint64EXT * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_805)(GLuint id, GLenum pname, GLuint64EXT * params)
{
DISPATCH(GetQueryObjectui64vEXT, (id, pname, params), (F, "glGetQueryObjectui64vEXT(%d, 0x%x, %p);\n", id, pname, (const void *) params));
}
@@ -6573,11 +6588,14 @@ _glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(ProvokingVertexEXT),
TABLE_ENTRY(_dispatch_stub_796),
TABLE_ENTRY(_dispatch_stub_797),
- TABLE_ENTRY(_dispatch_stub_798),
- TABLE_ENTRY(_dispatch_stub_799),
- TABLE_ENTRY(_dispatch_stub_800),
+ TABLE_ENTRY(GetObjectParameterivAPPLE),
+ TABLE_ENTRY(ObjectPurgeableAPPLE),
+ TABLE_ENTRY(ObjectUnpurgeableAPPLE),
TABLE_ENTRY(_dispatch_stub_801),
TABLE_ENTRY(_dispatch_stub_802),
+ TABLE_ENTRY(_dispatch_stub_803),
+ TABLE_ENTRY(_dispatch_stub_804),
+ TABLE_ENTRY(_dispatch_stub_805),
TABLE_ENTRY(EGLImageTargetRenderbufferStorageOES),
TABLE_ENTRY(EGLImageTargetTexture2DOES),
/* A whole bunch of no-op functions. These might be called
diff --git a/src/mesa/glapi/glprocs.h b/src/mesa/glapi/glprocs.h
index 513fa89726..44861863e6 100644
--- a/src/mesa/glapi/glprocs.h
+++ b/src/mesa/glapi/glprocs.h
@@ -850,6 +850,9 @@ static const char gl_string_table[] =
"glProvokingVertexEXT\0"
"glGetTexParameterPointervAPPLE\0"
"glTextureRangeAPPLE\0"
+ "glGetObjectParameterivAPPLE\0"
+ "glObjectPurgeableAPPLE\0"
+ "glObjectUnpurgeableAPPLE\0"
"glStencilFuncSeparateATI\0"
"glProgramEnvParameters4fvEXT\0"
"glProgramLocalParameters4fvEXT\0"
@@ -1208,11 +1211,11 @@ static const char gl_string_table[] =
#define gl_dispatch_stub_785 mgl_dispatch_stub_785
#define gl_dispatch_stub_796 mgl_dispatch_stub_796
#define gl_dispatch_stub_797 mgl_dispatch_stub_797
-#define gl_dispatch_stub_798 mgl_dispatch_stub_798
-#define gl_dispatch_stub_799 mgl_dispatch_stub_799
-#define gl_dispatch_stub_800 mgl_dispatch_stub_800
#define gl_dispatch_stub_801 mgl_dispatch_stub_801
#define gl_dispatch_stub_802 mgl_dispatch_stub_802
+#define gl_dispatch_stub_803 mgl_dispatch_stub_803
+#define gl_dispatch_stub_804 mgl_dispatch_stub_804
+#define gl_dispatch_stub_805 mgl_dispatch_stub_805
#endif /* USE_MGL_NAMESPACE */
@@ -1262,11 +1265,11 @@ void GLAPIENTRY gl_dispatch_stub_784(GLenum target, GLenum pname, GLint param);
void GLAPIENTRY gl_dispatch_stub_785(GLenum target, GLintptr offset, GLsizeiptr size);
void GLAPIENTRY gl_dispatch_stub_796(GLenum target, GLenum pname, GLvoid ** params);
void GLAPIENTRY gl_dispatch_stub_797(GLenum target, GLsizei length, GLvoid * pointer);
-void GLAPIENTRY gl_dispatch_stub_798(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
-void GLAPIENTRY gl_dispatch_stub_799(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_800(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_801(GLuint id, GLenum pname, GLint64EXT * params);
-void GLAPIENTRY gl_dispatch_stub_802(GLuint id, GLenum pname, GLuint64EXT * params);
+void GLAPIENTRY gl_dispatch_stub_801(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+void GLAPIENTRY gl_dispatch_stub_802(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
+void GLAPIENTRY gl_dispatch_stub_803(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
+void GLAPIENTRY gl_dispatch_stub_804(GLuint id, GLenum pname, GLint64EXT * params);
+void GLAPIENTRY gl_dispatch_stub_805(GLuint id, GLenum pname, GLuint64EXT * params);
#endif /* defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) */
static const glprocs_table_t static_functions[] = {
@@ -2068,315 +2071,318 @@ static const glprocs_table_t static_functions[] = {
NAME_FUNC_OFFSET(14050, glProvokingVertexEXT, glProvokingVertexEXT, NULL, _gloffset_ProvokingVertexEXT),
NAME_FUNC_OFFSET(14071, gl_dispatch_stub_796, gl_dispatch_stub_796, NULL, _gloffset_GetTexParameterPointervAPPLE),
NAME_FUNC_OFFSET(14102, gl_dispatch_stub_797, gl_dispatch_stub_797, NULL, _gloffset_TextureRangeAPPLE),
- NAME_FUNC_OFFSET(14122, gl_dispatch_stub_798, gl_dispatch_stub_798, NULL, _gloffset_StencilFuncSeparateATI),
- NAME_FUNC_OFFSET(14147, gl_dispatch_stub_799, gl_dispatch_stub_799, NULL, _gloffset_ProgramEnvParameters4fvEXT),
- NAME_FUNC_OFFSET(14176, gl_dispatch_stub_800, gl_dispatch_stub_800, NULL, _gloffset_ProgramLocalParameters4fvEXT),
- NAME_FUNC_OFFSET(14207, gl_dispatch_stub_801, gl_dispatch_stub_801, NULL, _gloffset_GetQueryObjecti64vEXT),
- NAME_FUNC_OFFSET(14231, gl_dispatch_stub_802, gl_dispatch_stub_802, NULL, _gloffset_GetQueryObjectui64vEXT),
- NAME_FUNC_OFFSET(14256, glEGLImageTargetRenderbufferStorageOES, glEGLImageTargetRenderbufferStorageOES, NULL, _gloffset_EGLImageTargetRenderbufferStorageOES),
- NAME_FUNC_OFFSET(14295, glEGLImageTargetTexture2DOES, glEGLImageTargetTexture2DOES, NULL, _gloffset_EGLImageTargetTexture2DOES),
- NAME_FUNC_OFFSET(14324, glArrayElement, glArrayElement, NULL, _gloffset_ArrayElement),
- NAME_FUNC_OFFSET(14342, glBindTexture, glBindTexture, NULL, _gloffset_BindTexture),
- NAME_FUNC_OFFSET(14359, glDrawArrays, glDrawArrays, NULL, _gloffset_DrawArrays),
- NAME_FUNC_OFFSET(14375, glAreTexturesResident, glAreTexturesResidentEXT, glAreTexturesResidentEXT, _gloffset_AreTexturesResident),
- NAME_FUNC_OFFSET(14400, glCopyTexImage1D, glCopyTexImage1D, NULL, _gloffset_CopyTexImage1D),
- NAME_FUNC_OFFSET(14420, glCopyTexImage2D, glCopyTexImage2D, NULL, _gloffset_CopyTexImage2D),
- NAME_FUNC_OFFSET(14440, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, _gloffset_CopyTexSubImage1D),
- NAME_FUNC_OFFSET(14463, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, _gloffset_CopyTexSubImage2D),
- NAME_FUNC_OFFSET(14486, glDeleteTextures, glDeleteTexturesEXT, glDeleteTexturesEXT, _gloffset_DeleteTextures),
- NAME_FUNC_OFFSET(14506, glGenTextures, glGenTexturesEXT, glGenTexturesEXT, _gloffset_GenTextures),
- NAME_FUNC_OFFSET(14523, glGetPointerv, glGetPointerv, NULL, _gloffset_GetPointerv),
- NAME_FUNC_OFFSET(14540, glIsTexture, glIsTextureEXT, glIsTextureEXT, _gloffset_IsTexture),
- NAME_FUNC_OFFSET(14555, glPrioritizeTextures, glPrioritizeTextures, NULL, _gloffset_PrioritizeTextures),
- NAME_FUNC_OFFSET(14579, glTexSubImage1D, glTexSubImage1D, NULL, _gloffset_TexSubImage1D),
- NAME_FUNC_OFFSET(14598, glTexSubImage2D, glTexSubImage2D, NULL, _gloffset_TexSubImage2D),
- NAME_FUNC_OFFSET(14617, glBlendColor, glBlendColor, NULL, _gloffset_BlendColor),
- NAME_FUNC_OFFSET(14633, glBlendEquation, glBlendEquation, NULL, _gloffset_BlendEquation),
- NAME_FUNC_OFFSET(14652, glDrawRangeElements, glDrawRangeElements, NULL, _gloffset_DrawRangeElements),
- NAME_FUNC_OFFSET(14675, glColorTable, glColorTable, NULL, _gloffset_ColorTable),
- NAME_FUNC_OFFSET(14691, glColorTable, glColorTable, NULL, _gloffset_ColorTable),
- NAME_FUNC_OFFSET(14707, glColorTableParameterfv, glColorTableParameterfv, NULL, _gloffset_ColorTableParameterfv),
- NAME_FUNC_OFFSET(14734, glColorTableParameteriv, glColorTableParameteriv, NULL, _gloffset_ColorTableParameteriv),
- NAME_FUNC_OFFSET(14761, glCopyColorTable, glCopyColorTable, NULL, _gloffset_CopyColorTable),
- NAME_FUNC_OFFSET(14781, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable),
- NAME_FUNC_OFFSET(14800, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable),
- NAME_FUNC_OFFSET(14819, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv),
- NAME_FUNC_OFFSET(14849, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv),
- NAME_FUNC_OFFSET(14879, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv),
- NAME_FUNC_OFFSET(14909, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv),
- NAME_FUNC_OFFSET(14939, glColorSubTable, glColorSubTable, NULL, _gloffset_ColorSubTable),
- NAME_FUNC_OFFSET(14958, glCopyColorSubTable, glCopyColorSubTable, NULL, _gloffset_CopyColorSubTable),
- NAME_FUNC_OFFSET(14981, glConvolutionFilter1D, glConvolutionFilter1D, NULL, _gloffset_ConvolutionFilter1D),
- NAME_FUNC_OFFSET(15006, glConvolutionFilter2D, glConvolutionFilter2D, NULL, _gloffset_ConvolutionFilter2D),
- NAME_FUNC_OFFSET(15031, glConvolutionParameterf, glConvolutionParameterf, NULL, _gloffset_ConvolutionParameterf),
- NAME_FUNC_OFFSET(15058, glConvolutionParameterfv, glConvolutionParameterfv, NULL, _gloffset_ConvolutionParameterfv),
- NAME_FUNC_OFFSET(15086, glConvolutionParameteri, glConvolutionParameteri, NULL, _gloffset_ConvolutionParameteri),
- NAME_FUNC_OFFSET(15113, glConvolutionParameteriv, glConvolutionParameteriv, NULL, _gloffset_ConvolutionParameteriv),
- NAME_FUNC_OFFSET(15141, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, _gloffset_CopyConvolutionFilter1D),
- NAME_FUNC_OFFSET(15170, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, _gloffset_CopyConvolutionFilter2D),
- NAME_FUNC_OFFSET(15199, glGetConvolutionFilter, gl_dispatch_stub_356, gl_dispatch_stub_356, _gloffset_GetConvolutionFilter),
- NAME_FUNC_OFFSET(15225, glGetConvolutionParameterfv, gl_dispatch_stub_357, gl_dispatch_stub_357, _gloffset_GetConvolutionParameterfv),
- NAME_FUNC_OFFSET(15256, glGetConvolutionParameteriv, gl_dispatch_stub_358, gl_dispatch_stub_358, _gloffset_GetConvolutionParameteriv),
- NAME_FUNC_OFFSET(15287, glGetSeparableFilter, gl_dispatch_stub_359, gl_dispatch_stub_359, _gloffset_GetSeparableFilter),
- NAME_FUNC_OFFSET(15311, glSeparableFilter2D, glSeparableFilter2D, NULL, _gloffset_SeparableFilter2D),
- NAME_FUNC_OFFSET(15334, glGetHistogram, gl_dispatch_stub_361, gl_dispatch_stub_361, _gloffset_GetHistogram),
- NAME_FUNC_OFFSET(15352, glGetHistogramParameterfv, gl_dispatch_stub_362, gl_dispatch_stub_362, _gloffset_GetHistogramParameterfv),
- NAME_FUNC_OFFSET(15381, glGetHistogramParameteriv, gl_dispatch_stub_363, gl_dispatch_stub_363, _gloffset_GetHistogramParameteriv),
- NAME_FUNC_OFFSET(15410, glGetMinmax, gl_dispatch_stub_364, gl_dispatch_stub_364, _gloffset_GetMinmax),
- NAME_FUNC_OFFSET(15425, glGetMinmaxParameterfv, gl_dispatch_stub_365, gl_dispatch_stub_365, _gloffset_GetMinmaxParameterfv),
- NAME_FUNC_OFFSET(15451, glGetMinmaxParameteriv, gl_dispatch_stub_366, gl_dispatch_stub_366, _gloffset_GetMinmaxParameteriv),
- NAME_FUNC_OFFSET(15477, glHistogram, glHistogram, NULL, _gloffset_Histogram),
- NAME_FUNC_OFFSET(15492, glMinmax, glMinmax, NULL, _gloffset_Minmax),
- NAME_FUNC_OFFSET(15504, glResetHistogram, glResetHistogram, NULL, _gloffset_ResetHistogram),
- NAME_FUNC_OFFSET(15524, glResetMinmax, glResetMinmax, NULL, _gloffset_ResetMinmax),
- NAME_FUNC_OFFSET(15541, glTexImage3D, glTexImage3D, NULL, _gloffset_TexImage3D),
- NAME_FUNC_OFFSET(15557, glTexSubImage3D, glTexSubImage3D, NULL, _gloffset_TexSubImage3D),
- NAME_FUNC_OFFSET(15576, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, _gloffset_CopyTexSubImage3D),
- NAME_FUNC_OFFSET(15599, glActiveTextureARB, glActiveTextureARB, NULL, _gloffset_ActiveTextureARB),
- NAME_FUNC_OFFSET(15615, glClientActiveTextureARB, glClientActiveTextureARB, NULL, _gloffset_ClientActiveTextureARB),
- NAME_FUNC_OFFSET(15637, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, _gloffset_MultiTexCoord1dARB),
- NAME_FUNC_OFFSET(15655, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, _gloffset_MultiTexCoord1dvARB),
- NAME_FUNC_OFFSET(15674, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, _gloffset_MultiTexCoord1fARB),
- NAME_FUNC_OFFSET(15692, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, _gloffset_MultiTexCoord1fvARB),
- NAME_FUNC_OFFSET(15711, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, _gloffset_MultiTexCoord1iARB),
- NAME_FUNC_OFFSET(15729, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, _gloffset_MultiTexCoord1ivARB),
- NAME_FUNC_OFFSET(15748, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, _gloffset_MultiTexCoord1sARB),
- NAME_FUNC_OFFSET(15766, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, _gloffset_MultiTexCoord1svARB),
- NAME_FUNC_OFFSET(15785, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, _gloffset_MultiTexCoord2dARB),
- NAME_FUNC_OFFSET(15803, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, _gloffset_MultiTexCoord2dvARB),
- NAME_FUNC_OFFSET(15822, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, _gloffset_MultiTexCoord2fARB),
- NAME_FUNC_OFFSET(15840, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, _gloffset_MultiTexCoord2fvARB),
- NAME_FUNC_OFFSET(15859, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, _gloffset_MultiTexCoord2iARB),
- NAME_FUNC_OFFSET(15877, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, _gloffset_MultiTexCoord2ivARB),
- NAME_FUNC_OFFSET(15896, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, _gloffset_MultiTexCoord2sARB),
- NAME_FUNC_OFFSET(15914, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, _gloffset_MultiTexCoord2svARB),
- NAME_FUNC_OFFSET(15933, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, _gloffset_MultiTexCoord3dARB),
- NAME_FUNC_OFFSET(15951, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, _gloffset_MultiTexCoord3dvARB),
- NAME_FUNC_OFFSET(15970, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, _gloffset_MultiTexCoord3fARB),
- NAME_FUNC_OFFSET(15988, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, _gloffset_MultiTexCoord3fvARB),
- NAME_FUNC_OFFSET(16007, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, _gloffset_MultiTexCoord3iARB),
- NAME_FUNC_OFFSET(16025, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, _gloffset_MultiTexCoord3ivARB),
- NAME_FUNC_OFFSET(16044, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, _gloffset_MultiTexCoord3sARB),
- NAME_FUNC_OFFSET(16062, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, _gloffset_MultiTexCoord3svARB),
- NAME_FUNC_OFFSET(16081, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, _gloffset_MultiTexCoord4dARB),
- NAME_FUNC_OFFSET(16099, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, _gloffset_MultiTexCoord4dvARB),
- NAME_FUNC_OFFSET(16118, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, _gloffset_MultiTexCoord4fARB),
- NAME_FUNC_OFFSET(16136, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, _gloffset_MultiTexCoord4fvARB),
- NAME_FUNC_OFFSET(16155, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, _gloffset_MultiTexCoord4iARB),
- NAME_FUNC_OFFSET(16173, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, _gloffset_MultiTexCoord4ivARB),
- NAME_FUNC_OFFSET(16192, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, _gloffset_MultiTexCoord4sARB),
- NAME_FUNC_OFFSET(16210, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, _gloffset_MultiTexCoord4svARB),
- NAME_FUNC_OFFSET(16229, glStencilOpSeparate, glStencilOpSeparate, NULL, _gloffset_StencilOpSeparate),
- NAME_FUNC_OFFSET(16252, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, _gloffset_LoadTransposeMatrixdARB),
- NAME_FUNC_OFFSET(16275, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, _gloffset_LoadTransposeMatrixfARB),
- NAME_FUNC_OFFSET(16298, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, _gloffset_MultTransposeMatrixdARB),
- NAME_FUNC_OFFSET(16321, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, _gloffset_MultTransposeMatrixfARB),
- NAME_FUNC_OFFSET(16344, glSampleCoverageARB, glSampleCoverageARB, NULL, _gloffset_SampleCoverageARB),
- NAME_FUNC_OFFSET(16361, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, _gloffset_CompressedTexImage1DARB),
- NAME_FUNC_OFFSET(16384, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, _gloffset_CompressedTexImage2DARB),
- NAME_FUNC_OFFSET(16407, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, _gloffset_CompressedTexImage3DARB),
- NAME_FUNC_OFFSET(16430, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, _gloffset_CompressedTexSubImage1DARB),
- NAME_FUNC_OFFSET(16456, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, _gloffset_CompressedTexSubImage2DARB),
- NAME_FUNC_OFFSET(16482, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, _gloffset_CompressedTexSubImage3DARB),
- NAME_FUNC_OFFSET(16508, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, _gloffset_GetCompressedTexImageARB),
- NAME_FUNC_OFFSET(16532, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, _gloffset_DisableVertexAttribArrayARB),
- NAME_FUNC_OFFSET(16559, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, _gloffset_EnableVertexAttribArrayARB),
- NAME_FUNC_OFFSET(16585, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, _gloffset_GetVertexAttribdvARB),
- NAME_FUNC_OFFSET(16605, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, _gloffset_GetVertexAttribfvARB),
- NAME_FUNC_OFFSET(16625, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, _gloffset_GetVertexAttribivARB),
- NAME_FUNC_OFFSET(16645, glProgramEnvParameter4dARB, glProgramEnvParameter4dARB, NULL, _gloffset_ProgramEnvParameter4dARB),
- NAME_FUNC_OFFSET(16668, glProgramEnvParameter4dvARB, glProgramEnvParameter4dvARB, NULL, _gloffset_ProgramEnvParameter4dvARB),
- NAME_FUNC_OFFSET(16692, glProgramEnvParameter4fARB, glProgramEnvParameter4fARB, NULL, _gloffset_ProgramEnvParameter4fARB),
- NAME_FUNC_OFFSET(16715, glProgramEnvParameter4fvARB, glProgramEnvParameter4fvARB, NULL, _gloffset_ProgramEnvParameter4fvARB),
- NAME_FUNC_OFFSET(16739, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, _gloffset_VertexAttrib1dARB),
- NAME_FUNC_OFFSET(16756, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, _gloffset_VertexAttrib1dvARB),
- NAME_FUNC_OFFSET(16774, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, _gloffset_VertexAttrib1fARB),
- NAME_FUNC_OFFSET(16791, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, _gloffset_VertexAttrib1fvARB),
- NAME_FUNC_OFFSET(16809, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, _gloffset_VertexAttrib1sARB),
- NAME_FUNC_OFFSET(16826, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, _gloffset_VertexAttrib1svARB),
- NAME_FUNC_OFFSET(16844, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, _gloffset_VertexAttrib2dARB),
- NAME_FUNC_OFFSET(16861, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, _gloffset_VertexAttrib2dvARB),
- NAME_FUNC_OFFSET(16879, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, _gloffset_VertexAttrib2fARB),
- NAME_FUNC_OFFSET(16896, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, _gloffset_VertexAttrib2fvARB),
- NAME_FUNC_OFFSET(16914, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, _gloffset_VertexAttrib2sARB),
- NAME_FUNC_OFFSET(16931, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, _gloffset_VertexAttrib2svARB),
- NAME_FUNC_OFFSET(16949, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, _gloffset_VertexAttrib3dARB),
- NAME_FUNC_OFFSET(16966, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, _gloffset_VertexAttrib3dvARB),
- NAME_FUNC_OFFSET(16984, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, _gloffset_VertexAttrib3fARB),
- NAME_FUNC_OFFSET(17001, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, _gloffset_VertexAttrib3fvARB),
- NAME_FUNC_OFFSET(17019, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, _gloffset_VertexAttrib3sARB),
- NAME_FUNC_OFFSET(17036, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, _gloffset_VertexAttrib3svARB),
- NAME_FUNC_OFFSET(17054, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, _gloffset_VertexAttrib4NbvARB),
- NAME_FUNC_OFFSET(17073, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, _gloffset_VertexAttrib4NivARB),
- NAME_FUNC_OFFSET(17092, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, _gloffset_VertexAttrib4NsvARB),
- NAME_FUNC_OFFSET(17111, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, _gloffset_VertexAttrib4NubARB),
- NAME_FUNC_OFFSET(17130, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, _gloffset_VertexAttrib4NubvARB),
- NAME_FUNC_OFFSET(17150, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, _gloffset_VertexAttrib4NuivARB),
- NAME_FUNC_OFFSET(17170, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, _gloffset_VertexAttrib4NusvARB),
- NAME_FUNC_OFFSET(17190, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, _gloffset_VertexAttrib4bvARB),
- NAME_FUNC_OFFSET(17208, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, _gloffset_VertexAttrib4dARB),
- NAME_FUNC_OFFSET(17225, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, _gloffset_VertexAttrib4dvARB),
- NAME_FUNC_OFFSET(17243, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, _gloffset_VertexAttrib4fARB),
- NAME_FUNC_OFFSET(17260, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, _gloffset_VertexAttrib4fvARB),
- NAME_FUNC_OFFSET(17278, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, _gloffset_VertexAttrib4ivARB),
- NAME_FUNC_OFFSET(17296, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, _gloffset_VertexAttrib4sARB),
- NAME_FUNC_OFFSET(17313, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, _gloffset_VertexAttrib4svARB),
- NAME_FUNC_OFFSET(17331, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, _gloffset_VertexAttrib4ubvARB),
- NAME_FUNC_OFFSET(17350, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, _gloffset_VertexAttrib4uivARB),
- NAME_FUNC_OFFSET(17369, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, _gloffset_VertexAttrib4usvARB),
- NAME_FUNC_OFFSET(17388, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, _gloffset_VertexAttribPointerARB),
- NAME_FUNC_OFFSET(17410, glBindBufferARB, glBindBufferARB, NULL, _gloffset_BindBufferARB),
- NAME_FUNC_OFFSET(17423, glBufferDataARB, glBufferDataARB, NULL, _gloffset_BufferDataARB),
- NAME_FUNC_OFFSET(17436, glBufferSubDataARB, glBufferSubDataARB, NULL, _gloffset_BufferSubDataARB),
- NAME_FUNC_OFFSET(17452, glDeleteBuffersARB, glDeleteBuffersARB, NULL, _gloffset_DeleteBuffersARB),
- NAME_FUNC_OFFSET(17468, glGenBuffersARB, glGenBuffersARB, NULL, _gloffset_GenBuffersARB),
- NAME_FUNC_OFFSET(17481, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, _gloffset_GetBufferParameterivARB),
- NAME_FUNC_OFFSET(17504, glGetBufferPointervARB, glGetBufferPointervARB, NULL, _gloffset_GetBufferPointervARB),
- NAME_FUNC_OFFSET(17524, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, _gloffset_GetBufferSubDataARB),
- NAME_FUNC_OFFSET(17543, glIsBufferARB, glIsBufferARB, NULL, _gloffset_IsBufferARB),
- NAME_FUNC_OFFSET(17554, glMapBufferARB, glMapBufferARB, NULL, _gloffset_MapBufferARB),
- NAME_FUNC_OFFSET(17566, glUnmapBufferARB, glUnmapBufferARB, NULL, _gloffset_UnmapBufferARB),
- NAME_FUNC_OFFSET(17580, glBeginQueryARB, glBeginQueryARB, NULL, _gloffset_BeginQueryARB),
- NAME_FUNC_OFFSET(17593, glDeleteQueriesARB, glDeleteQueriesARB, NULL, _gloffset_DeleteQueriesARB),
- NAME_FUNC_OFFSET(17609, glEndQueryARB, glEndQueryARB, NULL, _gloffset_EndQueryARB),
- NAME_FUNC_OFFSET(17620, glGenQueriesARB, glGenQueriesARB, NULL, _gloffset_GenQueriesARB),
- NAME_FUNC_OFFSET(17633, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, _gloffset_GetQueryObjectivARB),
- NAME_FUNC_OFFSET(17652, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, _gloffset_GetQueryObjectuivARB),
- NAME_FUNC_OFFSET(17672, glGetQueryivARB, glGetQueryivARB, NULL, _gloffset_GetQueryivARB),
- NAME_FUNC_OFFSET(17685, glIsQueryARB, glIsQueryARB, NULL, _gloffset_IsQueryARB),
- NAME_FUNC_OFFSET(17695, glCompileShaderARB, glCompileShaderARB, NULL, _gloffset_CompileShaderARB),
- NAME_FUNC_OFFSET(17711, glGetActiveUniformARB, glGetActiveUniformARB, NULL, _gloffset_GetActiveUniformARB),
- NAME_FUNC_OFFSET(17730, glGetShaderSourceARB, glGetShaderSourceARB, NULL, _gloffset_GetShaderSourceARB),
- NAME_FUNC_OFFSET(17748, glGetUniformLocationARB, glGetUniformLocationARB, NULL, _gloffset_GetUniformLocationARB),
- NAME_FUNC_OFFSET(17769, glGetUniformfvARB, glGetUniformfvARB, NULL, _gloffset_GetUniformfvARB),
- NAME_FUNC_OFFSET(17784, glGetUniformivARB, glGetUniformivARB, NULL, _gloffset_GetUniformivARB),
- NAME_FUNC_OFFSET(17799, glLinkProgramARB, glLinkProgramARB, NULL, _gloffset_LinkProgramARB),
- NAME_FUNC_OFFSET(17813, glShaderSourceARB, glShaderSourceARB, NULL, _gloffset_ShaderSourceARB),
- NAME_FUNC_OFFSET(17828, glUniform1fARB, glUniform1fARB, NULL, _gloffset_Uniform1fARB),
- NAME_FUNC_OFFSET(17840, glUniform1fvARB, glUniform1fvARB, NULL, _gloffset_Uniform1fvARB),
- NAME_FUNC_OFFSET(17853, glUniform1iARB, glUniform1iARB, NULL, _gloffset_Uniform1iARB),
- NAME_FUNC_OFFSET(17865, glUniform1ivARB, glUniform1ivARB, NULL, _gloffset_Uniform1ivARB),
- NAME_FUNC_OFFSET(17878, glUniform2fARB, glUniform2fARB, NULL, _gloffset_Uniform2fARB),
- NAME_FUNC_OFFSET(17890, glUniform2fvARB, glUniform2fvARB, NULL, _gloffset_Uniform2fvARB),
- NAME_FUNC_OFFSET(17903, glUniform2iARB, glUniform2iARB, NULL, _gloffset_Uniform2iARB),
- NAME_FUNC_OFFSET(17915, glUniform2ivARB, glUniform2ivARB, NULL, _gloffset_Uniform2ivARB),
- NAME_FUNC_OFFSET(17928, glUniform3fARB, glUniform3fARB, NULL, _gloffset_Uniform3fARB),
- NAME_FUNC_OFFSET(17940, glUniform3fvARB, glUniform3fvARB, NULL, _gloffset_Uniform3fvARB),
- NAME_FUNC_OFFSET(17953, glUniform3iARB, glUniform3iARB, NULL, _gloffset_Uniform3iARB),
- NAME_FUNC_OFFSET(17965, glUniform3ivARB, glUniform3ivARB, NULL, _gloffset_Uniform3ivARB),
- NAME_FUNC_OFFSET(17978, glUniform4fARB, glUniform4fARB, NULL, _gloffset_Uniform4fARB),
- NAME_FUNC_OFFSET(17990, glUniform4fvARB, glUniform4fvARB, NULL, _gloffset_Uniform4fvARB),
- NAME_FUNC_OFFSET(18003, glUniform4iARB, glUniform4iARB, NULL, _gloffset_Uniform4iARB),
- NAME_FUNC_OFFSET(18015, glUniform4ivARB, glUniform4ivARB, NULL, _gloffset_Uniform4ivARB),
- NAME_FUNC_OFFSET(18028, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, _gloffset_UniformMatrix2fvARB),
- NAME_FUNC_OFFSET(18047, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, _gloffset_UniformMatrix3fvARB),
- NAME_FUNC_OFFSET(18066, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, _gloffset_UniformMatrix4fvARB),
- NAME_FUNC_OFFSET(18085, glUseProgramObjectARB, glUseProgramObjectARB, NULL, _gloffset_UseProgramObjectARB),
- NAME_FUNC_OFFSET(18098, glValidateProgramARB, glValidateProgramARB, NULL, _gloffset_ValidateProgramARB),
- NAME_FUNC_OFFSET(18116, glBindAttribLocationARB, glBindAttribLocationARB, NULL, _gloffset_BindAttribLocationARB),
- NAME_FUNC_OFFSET(18137, glGetActiveAttribARB, glGetActiveAttribARB, NULL, _gloffset_GetActiveAttribARB),
- NAME_FUNC_OFFSET(18155, glGetAttribLocationARB, glGetAttribLocationARB, NULL, _gloffset_GetAttribLocationARB),
- NAME_FUNC_OFFSET(18175, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB),
- NAME_FUNC_OFFSET(18189, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB),
- NAME_FUNC_OFFSET(18206, glRenderbufferStorageMultisample, glRenderbufferStorageMultisample, NULL, _gloffset_RenderbufferStorageMultisample),
- NAME_FUNC_OFFSET(18242, gl_dispatch_stub_584, gl_dispatch_stub_584, NULL, _gloffset_SampleMaskSGIS),
- NAME_FUNC_OFFSET(18258, gl_dispatch_stub_585, gl_dispatch_stub_585, NULL, _gloffset_SamplePatternSGIS),
- NAME_FUNC_OFFSET(18277, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
- NAME_FUNC_OFFSET(18295, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
- NAME_FUNC_OFFSET(18316, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
- NAME_FUNC_OFFSET(18338, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
- NAME_FUNC_OFFSET(18357, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
- NAME_FUNC_OFFSET(18379, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
- NAME_FUNC_OFFSET(18402, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT),
- NAME_FUNC_OFFSET(18421, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT),
- NAME_FUNC_OFFSET(18441, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT),
- NAME_FUNC_OFFSET(18460, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT),
- NAME_FUNC_OFFSET(18480, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT),
- NAME_FUNC_OFFSET(18499, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT),
- NAME_FUNC_OFFSET(18519, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT),
- NAME_FUNC_OFFSET(18538, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT),
- NAME_FUNC_OFFSET(18558, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT),
- NAME_FUNC_OFFSET(18577, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT),
- NAME_FUNC_OFFSET(18597, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT),
- NAME_FUNC_OFFSET(18617, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT),
- NAME_FUNC_OFFSET(18638, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT),
- NAME_FUNC_OFFSET(18658, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT),
- NAME_FUNC_OFFSET(18679, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT),
- NAME_FUNC_OFFSET(18699, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT),
- NAME_FUNC_OFFSET(18720, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT),
- NAME_FUNC_OFFSET(18744, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT),
- NAME_FUNC_OFFSET(18762, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT),
- NAME_FUNC_OFFSET(18782, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT),
- NAME_FUNC_OFFSET(18800, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT),
- NAME_FUNC_OFFSET(18812, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT),
- NAME_FUNC_OFFSET(18825, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT),
- NAME_FUNC_OFFSET(18837, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT),
- NAME_FUNC_OFFSET(18850, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
- NAME_FUNC_OFFSET(18870, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
- NAME_FUNC_OFFSET(18894, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
- NAME_FUNC_OFFSET(18908, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
- NAME_FUNC_OFFSET(18925, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
- NAME_FUNC_OFFSET(18940, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
- NAME_FUNC_OFFSET(18958, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
- NAME_FUNC_OFFSET(18972, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
- NAME_FUNC_OFFSET(18989, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
- NAME_FUNC_OFFSET(19004, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
- NAME_FUNC_OFFSET(19022, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
- NAME_FUNC_OFFSET(19036, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
- NAME_FUNC_OFFSET(19053, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
- NAME_FUNC_OFFSET(19068, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
- NAME_FUNC_OFFSET(19086, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
- NAME_FUNC_OFFSET(19100, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
- NAME_FUNC_OFFSET(19117, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
- NAME_FUNC_OFFSET(19132, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
- NAME_FUNC_OFFSET(19150, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
- NAME_FUNC_OFFSET(19164, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
- NAME_FUNC_OFFSET(19181, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
- NAME_FUNC_OFFSET(19196, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
- NAME_FUNC_OFFSET(19214, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
- NAME_FUNC_OFFSET(19228, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
- NAME_FUNC_OFFSET(19245, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
- NAME_FUNC_OFFSET(19260, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
- NAME_FUNC_OFFSET(19278, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
- NAME_FUNC_OFFSET(19292, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
- NAME_FUNC_OFFSET(19309, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
- NAME_FUNC_OFFSET(19324, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
- NAME_FUNC_OFFSET(19342, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
- NAME_FUNC_OFFSET(19356, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
- NAME_FUNC_OFFSET(19373, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
- NAME_FUNC_OFFSET(19388, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
- NAME_FUNC_OFFSET(19406, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV),
- NAME_FUNC_OFFSET(19423, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV),
- NAME_FUNC_OFFSET(19443, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV),
- NAME_FUNC_OFFSET(19460, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
- NAME_FUNC_OFFSET(19486, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
- NAME_FUNC_OFFSET(19515, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV),
- NAME_FUNC_OFFSET(19530, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV),
- NAME_FUNC_OFFSET(19548, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV),
- NAME_FUNC_OFFSET(19567, gl_dispatch_stub_755, gl_dispatch_stub_755, NULL, _gloffset_DeleteVertexArraysAPPLE),
- NAME_FUNC_OFFSET(19588, gl_dispatch_stub_757, gl_dispatch_stub_757, NULL, _gloffset_IsVertexArrayAPPLE),
- NAME_FUNC_OFFSET(19604, gl_dispatch_stub_765, gl_dispatch_stub_765, NULL, _gloffset_BlendEquationSeparateEXT),
- NAME_FUNC_OFFSET(19628, gl_dispatch_stub_765, gl_dispatch_stub_765, NULL, _gloffset_BlendEquationSeparateEXT),
- NAME_FUNC_OFFSET(19655, glBindFramebufferEXT, glBindFramebufferEXT, NULL, _gloffset_BindFramebufferEXT),
- NAME_FUNC_OFFSET(19673, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, _gloffset_BindRenderbufferEXT),
- NAME_FUNC_OFFSET(19692, glCheckFramebufferStatusEXT, glCheckFramebufferStatusEXT, NULL, _gloffset_CheckFramebufferStatusEXT),
- NAME_FUNC_OFFSET(19717, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, NULL, _gloffset_DeleteFramebuffersEXT),
- NAME_FUNC_OFFSET(19738, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, NULL, _gloffset_DeleteRenderbuffersEXT),
- NAME_FUNC_OFFSET(19760, glFramebufferRenderbufferEXT, glFramebufferRenderbufferEXT, NULL, _gloffset_FramebufferRenderbufferEXT),
- NAME_FUNC_OFFSET(19786, glFramebufferTexture1DEXT, glFramebufferTexture1DEXT, NULL, _gloffset_FramebufferTexture1DEXT),
- NAME_FUNC_OFFSET(19809, glFramebufferTexture2DEXT, glFramebufferTexture2DEXT, NULL, _gloffset_FramebufferTexture2DEXT),
- NAME_FUNC_OFFSET(19832, glFramebufferTexture3DEXT, glFramebufferTexture3DEXT, NULL, _gloffset_FramebufferTexture3DEXT),
- NAME_FUNC_OFFSET(19855, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, _gloffset_GenFramebuffersEXT),
- NAME_FUNC_OFFSET(19873, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, _gloffset_GenRenderbuffersEXT),
- NAME_FUNC_OFFSET(19892, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, _gloffset_GenerateMipmapEXT),
- NAME_FUNC_OFFSET(19909, glGetFramebufferAttachmentParameterivEXT, glGetFramebufferAttachmentParameterivEXT, NULL, _gloffset_GetFramebufferAttachmentParameterivEXT),
- NAME_FUNC_OFFSET(19947, glGetRenderbufferParameterivEXT, glGetRenderbufferParameterivEXT, NULL, _gloffset_GetRenderbufferParameterivEXT),
- NAME_FUNC_OFFSET(19976, glIsFramebufferEXT, glIsFramebufferEXT, NULL, _gloffset_IsFramebufferEXT),
- NAME_FUNC_OFFSET(19992, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, _gloffset_IsRenderbufferEXT),
- NAME_FUNC_OFFSET(20009, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, _gloffset_RenderbufferStorageEXT),
- NAME_FUNC_OFFSET(20031, gl_dispatch_stub_783, gl_dispatch_stub_783, NULL, _gloffset_BlitFramebufferEXT),
- NAME_FUNC_OFFSET(20049, glFramebufferTextureLayerEXT, glFramebufferTextureLayerEXT, NULL, _gloffset_FramebufferTextureLayerEXT),
- NAME_FUNC_OFFSET(20075, glProvokingVertexEXT, glProvokingVertexEXT, NULL, _gloffset_ProvokingVertexEXT),
+ NAME_FUNC_OFFSET(14122, glGetObjectParameterivAPPLE, glGetObjectParameterivAPPLE, NULL, _gloffset_GetObjectParameterivAPPLE),
+ NAME_FUNC_OFFSET(14150, glObjectPurgeableAPPLE, glObjectPurgeableAPPLE, NULL, _gloffset_ObjectPurgeableAPPLE),
+ NAME_FUNC_OFFSET(14173, glObjectUnpurgeableAPPLE, glObjectUnpurgeableAPPLE, NULL, _gloffset_ObjectUnpurgeableAPPLE),
+ NAME_FUNC_OFFSET(14198, gl_dispatch_stub_801, gl_dispatch_stub_801, NULL, _gloffset_StencilFuncSeparateATI),
+ NAME_FUNC_OFFSET(14223, gl_dispatch_stub_802, gl_dispatch_stub_802, NULL, _gloffset_ProgramEnvParameters4fvEXT),
+ NAME_FUNC_OFFSET(14252, gl_dispatch_stub_803, gl_dispatch_stub_803, NULL, _gloffset_ProgramLocalParameters4fvEXT),
+ NAME_FUNC_OFFSET(14283, gl_dispatch_stub_804, gl_dispatch_stub_804, NULL, _gloffset_GetQueryObjecti64vEXT),
+ NAME_FUNC_OFFSET(14307, gl_dispatch_stub_805, gl_dispatch_stub_805, NULL, _gloffset_GetQueryObjectui64vEXT),
+ NAME_FUNC_OFFSET(14332, glEGLImageTargetRenderbufferStorageOES, glEGLImageTargetRenderbufferStorageOES, NULL, _gloffset_EGLImageTargetRenderbufferStorageOES),
+ NAME_FUNC_OFFSET(14371, glEGLImageTargetTexture2DOES, glEGLImageTargetTexture2DOES, NULL, _gloffset_EGLImageTargetTexture2DOES),
+ NAME_FUNC_OFFSET(14400, glArrayElement, glArrayElement, NULL, _gloffset_ArrayElement),
+ NAME_FUNC_OFFSET(14418, glBindTexture, glBindTexture, NULL, _gloffset_BindTexture),
+ NAME_FUNC_OFFSET(14435, glDrawArrays, glDrawArrays, NULL, _gloffset_DrawArrays),
+ NAME_FUNC_OFFSET(14451, glAreTexturesResident, glAreTexturesResidentEXT, glAreTexturesResidentEXT, _gloffset_AreTexturesResident),
+ NAME_FUNC_OFFSET(14476, glCopyTexImage1D, glCopyTexImage1D, NULL, _gloffset_CopyTexImage1D),
+ NAME_FUNC_OFFSET(14496, glCopyTexImage2D, glCopyTexImage2D, NULL, _gloffset_CopyTexImage2D),
+ NAME_FUNC_OFFSET(14516, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, _gloffset_CopyTexSubImage1D),
+ NAME_FUNC_OFFSET(14539, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, _gloffset_CopyTexSubImage2D),
+ NAME_FUNC_OFFSET(14562, glDeleteTextures, glDeleteTexturesEXT, glDeleteTexturesEXT, _gloffset_DeleteTextures),
+ NAME_FUNC_OFFSET(14582, glGenTextures, glGenTexturesEXT, glGenTexturesEXT, _gloffset_GenTextures),
+ NAME_FUNC_OFFSET(14599, glGetPointerv, glGetPointerv, NULL, _gloffset_GetPointerv),
+ NAME_FUNC_OFFSET(14616, glIsTexture, glIsTextureEXT, glIsTextureEXT, _gloffset_IsTexture),
+ NAME_FUNC_OFFSET(14631, glPrioritizeTextures, glPrioritizeTextures, NULL, _gloffset_PrioritizeTextures),
+ NAME_FUNC_OFFSET(14655, glTexSubImage1D, glTexSubImage1D, NULL, _gloffset_TexSubImage1D),
+ NAME_FUNC_OFFSET(14674, glTexSubImage2D, glTexSubImage2D, NULL, _gloffset_TexSubImage2D),
+ NAME_FUNC_OFFSET(14693, glBlendColor, glBlendColor, NULL, _gloffset_BlendColor),
+ NAME_FUNC_OFFSET(14709, glBlendEquation, glBlendEquation, NULL, _gloffset_BlendEquation),
+ NAME_FUNC_OFFSET(14728, glDrawRangeElements, glDrawRangeElements, NULL, _gloffset_DrawRangeElements),
+ NAME_FUNC_OFFSET(14751, glColorTable, glColorTable, NULL, _gloffset_ColorTable),
+ NAME_FUNC_OFFSET(14767, glColorTable, glColorTable, NULL, _gloffset_ColorTable),
+ NAME_FUNC_OFFSET(14783, glColorTableParameterfv, glColorTableParameterfv, NULL, _gloffset_ColorTableParameterfv),
+ NAME_FUNC_OFFSET(14810, glColorTableParameteriv, glColorTableParameteriv, NULL, _gloffset_ColorTableParameteriv),
+ NAME_FUNC_OFFSET(14837, glCopyColorTable, glCopyColorTable, NULL, _gloffset_CopyColorTable),
+ NAME_FUNC_OFFSET(14857, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable),
+ NAME_FUNC_OFFSET(14876, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable),
+ NAME_FUNC_OFFSET(14895, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv),
+ NAME_FUNC_OFFSET(14925, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv),
+ NAME_FUNC_OFFSET(14955, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv),
+ NAME_FUNC_OFFSET(14985, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv),
+ NAME_FUNC_OFFSET(15015, glColorSubTable, glColorSubTable, NULL, _gloffset_ColorSubTable),
+ NAME_FUNC_OFFSET(15034, glCopyColorSubTable, glCopyColorSubTable, NULL, _gloffset_CopyColorSubTable),
+ NAME_FUNC_OFFSET(15057, glConvolutionFilter1D, glConvolutionFilter1D, NULL, _gloffset_ConvolutionFilter1D),
+ NAME_FUNC_OFFSET(15082, glConvolutionFilter2D, glConvolutionFilter2D, NULL, _gloffset_ConvolutionFilter2D),
+ NAME_FUNC_OFFSET(15107, glConvolutionParameterf, glConvolutionParameterf, NULL, _gloffset_ConvolutionParameterf),
+ NAME_FUNC_OFFSET(15134, glConvolutionParameterfv, glConvolutionParameterfv, NULL, _gloffset_ConvolutionParameterfv),
+ NAME_FUNC_OFFSET(15162, glConvolutionParameteri, glConvolutionParameteri, NULL, _gloffset_ConvolutionParameteri),
+ NAME_FUNC_OFFSET(15189, glConvolutionParameteriv, glConvolutionParameteriv, NULL, _gloffset_ConvolutionParameteriv),
+ NAME_FUNC_OFFSET(15217, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, _gloffset_CopyConvolutionFilter1D),
+ NAME_FUNC_OFFSET(15246, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, _gloffset_CopyConvolutionFilter2D),
+ NAME_FUNC_OFFSET(15275, glGetConvolutionFilter, gl_dispatch_stub_356, gl_dispatch_stub_356, _gloffset_GetConvolutionFilter),
+ NAME_FUNC_OFFSET(15301, glGetConvolutionParameterfv, gl_dispatch_stub_357, gl_dispatch_stub_357, _gloffset_GetConvolutionParameterfv),
+ NAME_FUNC_OFFSET(15332, glGetConvolutionParameteriv, gl_dispatch_stub_358, gl_dispatch_stub_358, _gloffset_GetConvolutionParameteriv),
+ NAME_FUNC_OFFSET(15363, glGetSeparableFilter, gl_dispatch_stub_359, gl_dispatch_stub_359, _gloffset_GetSeparableFilter),
+ NAME_FUNC_OFFSET(15387, glSeparableFilter2D, glSeparableFilter2D, NULL, _gloffset_SeparableFilter2D),
+ NAME_FUNC_OFFSET(15410, glGetHistogram, gl_dispatch_stub_361, gl_dispatch_stub_361, _gloffset_GetHistogram),
+ NAME_FUNC_OFFSET(15428, glGetHistogramParameterfv, gl_dispatch_stub_362, gl_dispatch_stub_362, _gloffset_GetHistogramParameterfv),
+ NAME_FUNC_OFFSET(15457, glGetHistogramParameteriv, gl_dispatch_stub_363, gl_dispatch_stub_363, _gloffset_GetHistogramParameteriv),
+ NAME_FUNC_OFFSET(15486, glGetMinmax, gl_dispatch_stub_364, gl_dispatch_stub_364, _gloffset_GetMinmax),
+ NAME_FUNC_OFFSET(15501, glGetMinmaxParameterfv, gl_dispatch_stub_365, gl_dispatch_stub_365, _gloffset_GetMinmaxParameterfv),
+ NAME_FUNC_OFFSET(15527, glGetMinmaxParameteriv, gl_dispatch_stub_366, gl_dispatch_stub_366, _gloffset_GetMinmaxParameteriv),
+ NAME_FUNC_OFFSET(15553, glHistogram, glHistogram, NULL, _gloffset_Histogram),
+ NAME_FUNC_OFFSET(15568, glMinmax, glMinmax, NULL, _gloffset_Minmax),
+ NAME_FUNC_OFFSET(15580, glResetHistogram, glResetHistogram, NULL, _gloffset_ResetHistogram),
+ NAME_FUNC_OFFSET(15600, glResetMinmax, glResetMinmax, NULL, _gloffset_ResetMinmax),
+ NAME_FUNC_OFFSET(15617, glTexImage3D, glTexImage3D, NULL, _gloffset_TexImage3D),
+ NAME_FUNC_OFFSET(15633, glTexSubImage3D, glTexSubImage3D, NULL, _gloffset_TexSubImage3D),
+ NAME_FUNC_OFFSET(15652, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, _gloffset_CopyTexSubImage3D),
+ NAME_FUNC_OFFSET(15675, glActiveTextureARB, glActiveTextureARB, NULL, _gloffset_ActiveTextureARB),
+ NAME_FUNC_OFFSET(15691, glClientActiveTextureARB, glClientActiveTextureARB, NULL, _gloffset_ClientActiveTextureARB),
+ NAME_FUNC_OFFSET(15713, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, _gloffset_MultiTexCoord1dARB),
+ NAME_FUNC_OFFSET(15731, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, _gloffset_MultiTexCoord1dvARB),
+ NAME_FUNC_OFFSET(15750, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, _gloffset_MultiTexCoord1fARB),
+ NAME_FUNC_OFFSET(15768, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, _gloffset_MultiTexCoord1fvARB),
+ NAME_FUNC_OFFSET(15787, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, _gloffset_MultiTexCoord1iARB),
+ NAME_FUNC_OFFSET(15805, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, _gloffset_MultiTexCoord1ivARB),
+ NAME_FUNC_OFFSET(15824, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, _gloffset_MultiTexCoord1sARB),
+ NAME_FUNC_OFFSET(15842, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, _gloffset_MultiTexCoord1svARB),
+ NAME_FUNC_OFFSET(15861, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, _gloffset_MultiTexCoord2dARB),
+ NAME_FUNC_OFFSET(15879, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, _gloffset_MultiTexCoord2dvARB),
+ NAME_FUNC_OFFSET(15898, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, _gloffset_MultiTexCoord2fARB),
+ NAME_FUNC_OFFSET(15916, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, _gloffset_MultiTexCoord2fvARB),
+ NAME_FUNC_OFFSET(15935, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, _gloffset_MultiTexCoord2iARB),
+ NAME_FUNC_OFFSET(15953, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, _gloffset_MultiTexCoord2ivARB),
+ NAME_FUNC_OFFSET(15972, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, _gloffset_MultiTexCoord2sARB),
+ NAME_FUNC_OFFSET(15990, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, _gloffset_MultiTexCoord2svARB),
+ NAME_FUNC_OFFSET(16009, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, _gloffset_MultiTexCoord3dARB),
+ NAME_FUNC_OFFSET(16027, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, _gloffset_MultiTexCoord3dvARB),
+ NAME_FUNC_OFFSET(16046, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, _gloffset_MultiTexCoord3fARB),
+ NAME_FUNC_OFFSET(16064, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, _gloffset_MultiTexCoord3fvARB),
+ NAME_FUNC_OFFSET(16083, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, _gloffset_MultiTexCoord3iARB),
+ NAME_FUNC_OFFSET(16101, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, _gloffset_MultiTexCoord3ivARB),
+ NAME_FUNC_OFFSET(16120, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, _gloffset_MultiTexCoord3sARB),
+ NAME_FUNC_OFFSET(16138, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, _gloffset_MultiTexCoord3svARB),
+ NAME_FUNC_OFFSET(16157, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, _gloffset_MultiTexCoord4dARB),
+ NAME_FUNC_OFFSET(16175, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, _gloffset_MultiTexCoord4dvARB),
+ NAME_FUNC_OFFSET(16194, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, _gloffset_MultiTexCoord4fARB),
+ NAME_FUNC_OFFSET(16212, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, _gloffset_MultiTexCoord4fvARB),
+ NAME_FUNC_OFFSET(16231, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, _gloffset_MultiTexCoord4iARB),
+ NAME_FUNC_OFFSET(16249, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, _gloffset_MultiTexCoord4ivARB),
+ NAME_FUNC_OFFSET(16268, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, _gloffset_MultiTexCoord4sARB),
+ NAME_FUNC_OFFSET(16286, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, _gloffset_MultiTexCoord4svARB),
+ NAME_FUNC_OFFSET(16305, glStencilOpSeparate, glStencilOpSeparate, NULL, _gloffset_StencilOpSeparate),
+ NAME_FUNC_OFFSET(16328, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, _gloffset_LoadTransposeMatrixdARB),
+ NAME_FUNC_OFFSET(16351, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, _gloffset_LoadTransposeMatrixfARB),
+ NAME_FUNC_OFFSET(16374, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, _gloffset_MultTransposeMatrixdARB),
+ NAME_FUNC_OFFSET(16397, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, _gloffset_MultTransposeMatrixfARB),
+ NAME_FUNC_OFFSET(16420, glSampleCoverageARB, glSampleCoverageARB, NULL, _gloffset_SampleCoverageARB),
+ NAME_FUNC_OFFSET(16437, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, _gloffset_CompressedTexImage1DARB),
+ NAME_FUNC_OFFSET(16460, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, _gloffset_CompressedTexImage2DARB),
+ NAME_FUNC_OFFSET(16483, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, _gloffset_CompressedTexImage3DARB),
+ NAME_FUNC_OFFSET(16506, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, _gloffset_CompressedTexSubImage1DARB),
+ NAME_FUNC_OFFSET(16532, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, _gloffset_CompressedTexSubImage2DARB),
+ NAME_FUNC_OFFSET(16558, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, _gloffset_CompressedTexSubImage3DARB),
+ NAME_FUNC_OFFSET(16584, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, _gloffset_GetCompressedTexImageARB),
+ NAME_FUNC_OFFSET(16608, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, _gloffset_DisableVertexAttribArrayARB),
+ NAME_FUNC_OFFSET(16635, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, _gloffset_EnableVertexAttribArrayARB),
+ NAME_FUNC_OFFSET(16661, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, _gloffset_GetVertexAttribdvARB),
+ NAME_FUNC_OFFSET(16681, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, _gloffset_GetVertexAttribfvARB),
+ NAME_FUNC_OFFSET(16701, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, _gloffset_GetVertexAttribivARB),
+ NAME_FUNC_OFFSET(16721, glProgramEnvParameter4dARB, glProgramEnvParameter4dARB, NULL, _gloffset_ProgramEnvParameter4dARB),
+ NAME_FUNC_OFFSET(16744, glProgramEnvParameter4dvARB, glProgramEnvParameter4dvARB, NULL, _gloffset_ProgramEnvParameter4dvARB),
+ NAME_FUNC_OFFSET(16768, glProgramEnvParameter4fARB, glProgramEnvParameter4fARB, NULL, _gloffset_ProgramEnvParameter4fARB),
+ NAME_FUNC_OFFSET(16791, glProgramEnvParameter4fvARB, glProgramEnvParameter4fvARB, NULL, _gloffset_ProgramEnvParameter4fvARB),
+ NAME_FUNC_OFFSET(16815, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, _gloffset_VertexAttrib1dARB),
+ NAME_FUNC_OFFSET(16832, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, _gloffset_VertexAttrib1dvARB),
+ NAME_FUNC_OFFSET(16850, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, _gloffset_VertexAttrib1fARB),
+ NAME_FUNC_OFFSET(16867, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, _gloffset_VertexAttrib1fvARB),
+ NAME_FUNC_OFFSET(16885, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, _gloffset_VertexAttrib1sARB),
+ NAME_FUNC_OFFSET(16902, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, _gloffset_VertexAttrib1svARB),
+ NAME_FUNC_OFFSET(16920, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, _gloffset_VertexAttrib2dARB),
+ NAME_FUNC_OFFSET(16937, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, _gloffset_VertexAttrib2dvARB),
+ NAME_FUNC_OFFSET(16955, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, _gloffset_VertexAttrib2fARB),
+ NAME_FUNC_OFFSET(16972, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, _gloffset_VertexAttrib2fvARB),
+ NAME_FUNC_OFFSET(16990, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, _gloffset_VertexAttrib2sARB),
+ NAME_FUNC_OFFSET(17007, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, _gloffset_VertexAttrib2svARB),
+ NAME_FUNC_OFFSET(17025, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, _gloffset_VertexAttrib3dARB),
+ NAME_FUNC_OFFSET(17042, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, _gloffset_VertexAttrib3dvARB),
+ NAME_FUNC_OFFSET(17060, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, _gloffset_VertexAttrib3fARB),
+ NAME_FUNC_OFFSET(17077, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, _gloffset_VertexAttrib3fvARB),
+ NAME_FUNC_OFFSET(17095, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, _gloffset_VertexAttrib3sARB),
+ NAME_FUNC_OFFSET(17112, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, _gloffset_VertexAttrib3svARB),
+ NAME_FUNC_OFFSET(17130, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, _gloffset_VertexAttrib4NbvARB),
+ NAME_FUNC_OFFSET(17149, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, _gloffset_VertexAttrib4NivARB),
+ NAME_FUNC_OFFSET(17168, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, _gloffset_VertexAttrib4NsvARB),
+ NAME_FUNC_OFFSET(17187, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, _gloffset_VertexAttrib4NubARB),
+ NAME_FUNC_OFFSET(17206, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, _gloffset_VertexAttrib4NubvARB),
+ NAME_FUNC_OFFSET(17226, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, _gloffset_VertexAttrib4NuivARB),
+ NAME_FUNC_OFFSET(17246, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, _gloffset_VertexAttrib4NusvARB),
+ NAME_FUNC_OFFSET(17266, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, _gloffset_VertexAttrib4bvARB),
+ NAME_FUNC_OFFSET(17284, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, _gloffset_VertexAttrib4dARB),
+ NAME_FUNC_OFFSET(17301, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, _gloffset_VertexAttrib4dvARB),
+ NAME_FUNC_OFFSET(17319, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, _gloffset_VertexAttrib4fARB),
+ NAME_FUNC_OFFSET(17336, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, _gloffset_VertexAttrib4fvARB),
+ NAME_FUNC_OFFSET(17354, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, _gloffset_VertexAttrib4ivARB),
+ NAME_FUNC_OFFSET(17372, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, _gloffset_VertexAttrib4sARB),
+ NAME_FUNC_OFFSET(17389, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, _gloffset_VertexAttrib4svARB),
+ NAME_FUNC_OFFSET(17407, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, _gloffset_VertexAttrib4ubvARB),
+ NAME_FUNC_OFFSET(17426, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, _gloffset_VertexAttrib4uivARB),
+ NAME_FUNC_OFFSET(17445, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, _gloffset_VertexAttrib4usvARB),
+ NAME_FUNC_OFFSET(17464, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, _gloffset_VertexAttribPointerARB),
+ NAME_FUNC_OFFSET(17486, glBindBufferARB, glBindBufferARB, NULL, _gloffset_BindBufferARB),
+ NAME_FUNC_OFFSET(17499, glBufferDataARB, glBufferDataARB, NULL, _gloffset_BufferDataARB),
+ NAME_FUNC_OFFSET(17512, glBufferSubDataARB, glBufferSubDataARB, NULL, _gloffset_BufferSubDataARB),
+ NAME_FUNC_OFFSET(17528, glDeleteBuffersARB, glDeleteBuffersARB, NULL, _gloffset_DeleteBuffersARB),
+ NAME_FUNC_OFFSET(17544, glGenBuffersARB, glGenBuffersARB, NULL, _gloffset_GenBuffersARB),
+ NAME_FUNC_OFFSET(17557, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, _gloffset_GetBufferParameterivARB),
+ NAME_FUNC_OFFSET(17580, glGetBufferPointervARB, glGetBufferPointervARB, NULL, _gloffset_GetBufferPointervARB),
+ NAME_FUNC_OFFSET(17600, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, _gloffset_GetBufferSubDataARB),
+ NAME_FUNC_OFFSET(17619, glIsBufferARB, glIsBufferARB, NULL, _gloffset_IsBufferARB),
+ NAME_FUNC_OFFSET(17630, glMapBufferARB, glMapBufferARB, NULL, _gloffset_MapBufferARB),
+ NAME_FUNC_OFFSET(17642, glUnmapBufferARB, glUnmapBufferARB, NULL, _gloffset_UnmapBufferARB),
+ NAME_FUNC_OFFSET(17656, glBeginQueryARB, glBeginQueryARB, NULL, _gloffset_BeginQueryARB),
+ NAME_FUNC_OFFSET(17669, glDeleteQueriesARB, glDeleteQueriesARB, NULL, _gloffset_DeleteQueriesARB),
+ NAME_FUNC_OFFSET(17685, glEndQueryARB, glEndQueryARB, NULL, _gloffset_EndQueryARB),
+ NAME_FUNC_OFFSET(17696, glGenQueriesARB, glGenQueriesARB, NULL, _gloffset_GenQueriesARB),
+ NAME_FUNC_OFFSET(17709, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, _gloffset_GetQueryObjectivARB),
+ NAME_FUNC_OFFSET(17728, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, _gloffset_GetQueryObjectuivARB),
+ NAME_FUNC_OFFSET(17748, glGetQueryivARB, glGetQueryivARB, NULL, _gloffset_GetQueryivARB),
+ NAME_FUNC_OFFSET(17761, glIsQueryARB, glIsQueryARB, NULL, _gloffset_IsQueryARB),
+ NAME_FUNC_OFFSET(17771, glCompileShaderARB, glCompileShaderARB, NULL, _gloffset_CompileShaderARB),
+ NAME_FUNC_OFFSET(17787, glGetActiveUniformARB, glGetActiveUniformARB, NULL, _gloffset_GetActiveUniformARB),
+ NAME_FUNC_OFFSET(17806, glGetShaderSourceARB, glGetShaderSourceARB, NULL, _gloffset_GetShaderSourceARB),
+ NAME_FUNC_OFFSET(17824, glGetUniformLocationARB, glGetUniformLocationARB, NULL, _gloffset_GetUniformLocationARB),
+ NAME_FUNC_OFFSET(17845, glGetUniformfvARB, glGetUniformfvARB, NULL, _gloffset_GetUniformfvARB),
+ NAME_FUNC_OFFSET(17860, glGetUniformivARB, glGetUniformivARB, NULL, _gloffset_GetUniformivARB),
+ NAME_FUNC_OFFSET(17875, glLinkProgramARB, glLinkProgramARB, NULL, _gloffset_LinkProgramARB),
+ NAME_FUNC_OFFSET(17889, glShaderSourceARB, glShaderSourceARB, NULL, _gloffset_ShaderSourceARB),
+ NAME_FUNC_OFFSET(17904, glUniform1fARB, glUniform1fARB, NULL, _gloffset_Uniform1fARB),
+ NAME_FUNC_OFFSET(17916, glUniform1fvARB, glUniform1fvARB, NULL, _gloffset_Uniform1fvARB),
+ NAME_FUNC_OFFSET(17929, glUniform1iARB, glUniform1iARB, NULL, _gloffset_Uniform1iARB),
+ NAME_FUNC_OFFSET(17941, glUniform1ivARB, glUniform1ivARB, NULL, _gloffset_Uniform1ivARB),
+ NAME_FUNC_OFFSET(17954, glUniform2fARB, glUniform2fARB, NULL, _gloffset_Uniform2fARB),
+ NAME_FUNC_OFFSET(17966, glUniform2fvARB, glUniform2fvARB, NULL, _gloffset_Uniform2fvARB),
+ NAME_FUNC_OFFSET(17979, glUniform2iARB, glUniform2iARB, NULL, _gloffset_Uniform2iARB),
+ NAME_FUNC_OFFSET(17991, glUniform2ivARB, glUniform2ivARB, NULL, _gloffset_Uniform2ivARB),
+ NAME_FUNC_OFFSET(18004, glUniform3fARB, glUniform3fARB, NULL, _gloffset_Uniform3fARB),
+ NAME_FUNC_OFFSET(18016, glUniform3fvARB, glUniform3fvARB, NULL, _gloffset_Uniform3fvARB),
+ NAME_FUNC_OFFSET(18029, glUniform3iARB, glUniform3iARB, NULL, _gloffset_Uniform3iARB),
+ NAME_FUNC_OFFSET(18041, glUniform3ivARB, glUniform3ivARB, NULL, _gloffset_Uniform3ivARB),
+ NAME_FUNC_OFFSET(18054, glUniform4fARB, glUniform4fARB, NULL, _gloffset_Uniform4fARB),
+ NAME_FUNC_OFFSET(18066, glUniform4fvARB, glUniform4fvARB, NULL, _gloffset_Uniform4fvARB),
+ NAME_FUNC_OFFSET(18079, glUniform4iARB, glUniform4iARB, NULL, _gloffset_Uniform4iARB),
+ NAME_FUNC_OFFSET(18091, glUniform4ivARB, glUniform4ivARB, NULL, _gloffset_Uniform4ivARB),
+ NAME_FUNC_OFFSET(18104, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, _gloffset_UniformMatrix2fvARB),
+ NAME_FUNC_OFFSET(18123, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, _gloffset_UniformMatrix3fvARB),
+ NAME_FUNC_OFFSET(18142, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, _gloffset_UniformMatrix4fvARB),
+ NAME_FUNC_OFFSET(18161, glUseProgramObjectARB, glUseProgramObjectARB, NULL, _gloffset_UseProgramObjectARB),
+ NAME_FUNC_OFFSET(18174, glValidateProgramARB, glValidateProgramARB, NULL, _gloffset_ValidateProgramARB),
+ NAME_FUNC_OFFSET(18192, glBindAttribLocationARB, glBindAttribLocationARB, NULL, _gloffset_BindAttribLocationARB),
+ NAME_FUNC_OFFSET(18213, glGetActiveAttribARB, glGetActiveAttribARB, NULL, _gloffset_GetActiveAttribARB),
+ NAME_FUNC_OFFSET(18231, glGetAttribLocationARB, glGetAttribLocationARB, NULL, _gloffset_GetAttribLocationARB),
+ NAME_FUNC_OFFSET(18251, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB),
+ NAME_FUNC_OFFSET(18265, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB),
+ NAME_FUNC_OFFSET(18282, glRenderbufferStorageMultisample, glRenderbufferStorageMultisample, NULL, _gloffset_RenderbufferStorageMultisample),
+ NAME_FUNC_OFFSET(18318, gl_dispatch_stub_584, gl_dispatch_stub_584, NULL, _gloffset_SampleMaskSGIS),
+ NAME_FUNC_OFFSET(18334, gl_dispatch_stub_585, gl_dispatch_stub_585, NULL, _gloffset_SamplePatternSGIS),
+ NAME_FUNC_OFFSET(18353, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
+ NAME_FUNC_OFFSET(18371, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
+ NAME_FUNC_OFFSET(18392, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
+ NAME_FUNC_OFFSET(18414, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
+ NAME_FUNC_OFFSET(18433, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
+ NAME_FUNC_OFFSET(18455, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
+ NAME_FUNC_OFFSET(18478, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT),
+ NAME_FUNC_OFFSET(18497, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT),
+ NAME_FUNC_OFFSET(18517, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT),
+ NAME_FUNC_OFFSET(18536, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT),
+ NAME_FUNC_OFFSET(18556, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT),
+ NAME_FUNC_OFFSET(18575, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT),
+ NAME_FUNC_OFFSET(18595, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT),
+ NAME_FUNC_OFFSET(18614, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT),
+ NAME_FUNC_OFFSET(18634, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT),
+ NAME_FUNC_OFFSET(18653, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT),
+ NAME_FUNC_OFFSET(18673, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT),
+ NAME_FUNC_OFFSET(18693, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT),
+ NAME_FUNC_OFFSET(18714, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT),
+ NAME_FUNC_OFFSET(18734, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT),
+ NAME_FUNC_OFFSET(18755, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT),
+ NAME_FUNC_OFFSET(18775, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT),
+ NAME_FUNC_OFFSET(18796, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT),
+ NAME_FUNC_OFFSET(18820, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT),
+ NAME_FUNC_OFFSET(18838, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT),
+ NAME_FUNC_OFFSET(18858, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT),
+ NAME_FUNC_OFFSET(18876, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT),
+ NAME_FUNC_OFFSET(18888, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT),
+ NAME_FUNC_OFFSET(18901, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT),
+ NAME_FUNC_OFFSET(18913, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT),
+ NAME_FUNC_OFFSET(18926, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
+ NAME_FUNC_OFFSET(18946, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
+ NAME_FUNC_OFFSET(18970, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
+ NAME_FUNC_OFFSET(18984, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
+ NAME_FUNC_OFFSET(19001, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
+ NAME_FUNC_OFFSET(19016, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
+ NAME_FUNC_OFFSET(19034, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
+ NAME_FUNC_OFFSET(19048, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
+ NAME_FUNC_OFFSET(19065, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
+ NAME_FUNC_OFFSET(19080, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
+ NAME_FUNC_OFFSET(19098, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
+ NAME_FUNC_OFFSET(19112, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
+ NAME_FUNC_OFFSET(19129, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
+ NAME_FUNC_OFFSET(19144, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
+ NAME_FUNC_OFFSET(19162, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
+ NAME_FUNC_OFFSET(19176, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
+ NAME_FUNC_OFFSET(19193, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
+ NAME_FUNC_OFFSET(19208, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
+ NAME_FUNC_OFFSET(19226, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
+ NAME_FUNC_OFFSET(19240, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
+ NAME_FUNC_OFFSET(19257, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
+ NAME_FUNC_OFFSET(19272, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
+ NAME_FUNC_OFFSET(19290, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
+ NAME_FUNC_OFFSET(19304, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
+ NAME_FUNC_OFFSET(19321, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
+ NAME_FUNC_OFFSET(19336, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
+ NAME_FUNC_OFFSET(19354, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
+ NAME_FUNC_OFFSET(19368, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
+ NAME_FUNC_OFFSET(19385, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
+ NAME_FUNC_OFFSET(19400, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
+ NAME_FUNC_OFFSET(19418, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
+ NAME_FUNC_OFFSET(19432, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
+ NAME_FUNC_OFFSET(19449, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
+ NAME_FUNC_OFFSET(19464, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
+ NAME_FUNC_OFFSET(19482, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV),
+ NAME_FUNC_OFFSET(19499, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV),
+ NAME_FUNC_OFFSET(19519, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV),
+ NAME_FUNC_OFFSET(19536, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
+ NAME_FUNC_OFFSET(19562, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
+ NAME_FUNC_OFFSET(19591, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV),
+ NAME_FUNC_OFFSET(19606, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV),
+ NAME_FUNC_OFFSET(19624, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV),
+ NAME_FUNC_OFFSET(19643, gl_dispatch_stub_755, gl_dispatch_stub_755, NULL, _gloffset_DeleteVertexArraysAPPLE),
+ NAME_FUNC_OFFSET(19664, gl_dispatch_stub_757, gl_dispatch_stub_757, NULL, _gloffset_IsVertexArrayAPPLE),
+ NAME_FUNC_OFFSET(19680, gl_dispatch_stub_765, gl_dispatch_stub_765, NULL, _gloffset_BlendEquationSeparateEXT),
+ NAME_FUNC_OFFSET(19704, gl_dispatch_stub_765, gl_dispatch_stub_765, NULL, _gloffset_BlendEquationSeparateEXT),
+ NAME_FUNC_OFFSET(19731, glBindFramebufferEXT, glBindFramebufferEXT, NULL, _gloffset_BindFramebufferEXT),
+ NAME_FUNC_OFFSET(19749, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, _gloffset_BindRenderbufferEXT),
+ NAME_FUNC_OFFSET(19768, glCheckFramebufferStatusEXT, glCheckFramebufferStatusEXT, NULL, _gloffset_CheckFramebufferStatusEXT),
+ NAME_FUNC_OFFSET(19793, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, NULL, _gloffset_DeleteFramebuffersEXT),
+ NAME_FUNC_OFFSET(19814, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, NULL, _gloffset_DeleteRenderbuffersEXT),
+ NAME_FUNC_OFFSET(19836, glFramebufferRenderbufferEXT, glFramebufferRenderbufferEXT, NULL, _gloffset_FramebufferRenderbufferEXT),
+ NAME_FUNC_OFFSET(19862, glFramebufferTexture1DEXT, glFramebufferTexture1DEXT, NULL, _gloffset_FramebufferTexture1DEXT),
+ NAME_FUNC_OFFSET(19885, glFramebufferTexture2DEXT, glFramebufferTexture2DEXT, NULL, _gloffset_FramebufferTexture2DEXT),
+ NAME_FUNC_OFFSET(19908, glFramebufferTexture3DEXT, glFramebufferTexture3DEXT, NULL, _gloffset_FramebufferTexture3DEXT),
+ NAME_FUNC_OFFSET(19931, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, _gloffset_GenFramebuffersEXT),
+ NAME_FUNC_OFFSET(19949, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, _gloffset_GenRenderbuffersEXT),
+ NAME_FUNC_OFFSET(19968, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, _gloffset_GenerateMipmapEXT),
+ NAME_FUNC_OFFSET(19985, glGetFramebufferAttachmentParameterivEXT, glGetFramebufferAttachmentParameterivEXT, NULL, _gloffset_GetFramebufferAttachmentParameterivEXT),
+ NAME_FUNC_OFFSET(20023, glGetRenderbufferParameterivEXT, glGetRenderbufferParameterivEXT, NULL, _gloffset_GetRenderbufferParameterivEXT),
+ NAME_FUNC_OFFSET(20052, glIsFramebufferEXT, glIsFramebufferEXT, NULL, _gloffset_IsFramebufferEXT),
+ NAME_FUNC_OFFSET(20068, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, _gloffset_IsRenderbufferEXT),
+ NAME_FUNC_OFFSET(20085, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, _gloffset_RenderbufferStorageEXT),
+ NAME_FUNC_OFFSET(20107, gl_dispatch_stub_783, gl_dispatch_stub_783, NULL, _gloffset_BlitFramebufferEXT),
+ NAME_FUNC_OFFSET(20125, glFramebufferTextureLayerEXT, glFramebufferTextureLayerEXT, NULL, _gloffset_FramebufferTextureLayerEXT),
+ NAME_FUNC_OFFSET(20151, glProvokingVertexEXT, glProvokingVertexEXT, NULL, _gloffset_ProvokingVertexEXT),
NAME_FUNC_OFFSET(-1, NULL, NULL, NULL, 0)
};
diff --git a/src/mesa/glapi/glthread.c b/src/mesa/glapi/glthread.c
index be4e2f754d..f365d17bdd 100644
--- a/src/mesa/glapi/glthread.c
+++ b/src/mesa/glapi/glthread.c
@@ -116,91 +116,15 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
/*
- * Solaris/Unix International Threads -- Use only if POSIX threads
- * aren't available on your Unix platform. Solaris 2.[34] are examples
- * of platforms where this is the case. Be sure to use -mt and/or
- * -D_REENTRANT when compiling.
- */
-#ifdef SOLARIS_THREADS
-#define USE_LOCK_FOR_KEY /* undef this to try a version without
- lock for the global key... */
-
-PUBLIC unsigned long
-_glthread_GetID(void)
-{
- abort(); /* XXX not implemented yet */
- return (unsigned long) 0;
-}
-
-
-void
-_glthread_InitTSD(_glthread_TSD *tsd)
-{
- if ((errno = mutex_init(&tsd->keylock, 0, NULL)) != 0 ||
- (errno = thr_keycreate(&(tsd->key), free)) != 0) {
- perror(INIT_TSD_ERROR);
- exit(-1);
- }
- tsd->initMagic = INIT_MAGIC;
-}
-
-
-void *
-_glthread_GetTSD(_glthread_TSD *tsd)
-{
- void* ret;
- if (tsd->initMagic != INIT_MAGIC) {
- _glthread_InitTSD(tsd);
- }
-#ifdef USE_LOCK_FOR_KEY
- mutex_lock(&tsd->keylock);
- thr_getspecific(tsd->key, &ret);
- mutex_unlock(&tsd->keylock);
-#else
- if ((errno = thr_getspecific(tsd->key, &ret)) != 0) {
- perror(GET_TSD_ERROR);
- exit(-1);
- }
-#endif
- return ret;
-}
-
-
-void
-_glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
-{
- if (tsd->initMagic != INIT_MAGIC) {
- _glthread_InitTSD(tsd);
- }
- if ((errno = thr_setspecific(tsd->key, ptr)) != 0) {
- perror(SET_TSD_ERROR);
- exit(-1);
- }
-}
-
-#undef USE_LOCK_FOR_KEY
-#endif /* SOLARIS_THREADS */
-
-
-
-/*
* Win32 Threads. The only available option for Windows 95/NT.
* Be sure that you compile using the Multithreaded runtime, otherwise
* bad things will happen.
*/
#ifdef WIN32_THREADS
-void FreeTSD(_glthread_TSD *p)
-{
- if (p->initMagic==INIT_MAGIC) {
- TlsFree(p->key);
- p->initMagic=0;
- }
-}
-
-void InsteadOf_exit(int nCode)
+static void InsteadOf_exit(int nCode)
{
- DWORD dwErr=GetLastError();
+ DWORD dwErr = GetLastError();
}
PUBLIC unsigned long
@@ -215,13 +139,24 @@ _glthread_InitTSD(_glthread_TSD *tsd)
{
tsd->key = TlsAlloc();
if (tsd->key == TLS_OUT_OF_INDEXES) {
- perror("Mesa:_glthread_InitTSD");
+ perror(INIT_TSD_ERROR);
InsteadOf_exit(-1);
}
tsd->initMagic = INIT_MAGIC;
}
+void
+_glthread_DestroyTSD(_glthread_TSD *tsd)
+{
+ if (tsd->initMagic != INIT_MAGIC) {
+ return;
+ }
+ TlsFree(tsd->key);
+ tsd->initMagic = 0x0;
+}
+
+
void *
_glthread_GetTSD(_glthread_TSD *tsd)
{
@@ -241,8 +176,8 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
_glthread_InitTSD(tsd);
}
if (TlsSetValue(tsd->key, ptr) == 0) {
- perror("Mesa:_glthread_SetTSD");
- InsteadOf_exit(-1);
+ perror(SET_TSD_ERROR);
+ InsteadOf_exit(-1);
}
}
diff --git a/src/mesa/glapi/glthread.h b/src/mesa/glapi/glthread.h
index 8ec933a851..4fe99284a8 100644
--- a/src/mesa/glapi/glthread.h
+++ b/src/mesa/glapi/glthread.h
@@ -64,21 +64,12 @@
#define GLTHREAD_H
-#if defined(USE_MGL_NAMESPACE)
-#define _glapi_Dispatch _mglapi_Dispatch
+#if defined(PTHREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)
+#ifndef THREADS
+#define THREADS
#endif
-
-
-
-#if (defined(PTHREADS) || defined(SOLARIS_THREADS) ||\
- defined(WIN32_THREADS) || defined(BEOS_THREADS)) \
- && !defined(THREADS)
-# define THREADS
#endif
-#ifdef VMS
-#include <GL/vms_x_fix.h>
-#endif
/*
* POSIX threads. This should be your choice in the Unix world
@@ -116,80 +107,7 @@ typedef pthread_mutex_t _glthread_Mutex;
#define _glthread_UNLOCK_MUTEX(name) \
(void) pthread_mutex_unlock(&(name))
-typedef pthread_cond_t _glthread_Cond;
-
-#define _glthread_DECLARE_STATIC_COND(name) \
- static _glthread_Cond name = PTHREAD_COND_INITIALIZER
-
-#define _glthread_INIT_COND(cond) \
- pthread_cond_init(&(cond), NULL)
-
-#define _glthread_DESTROY_COND(name) \
- pthread_cond_destroy(&(name))
-
-#define _glthread_COND_WAIT(cond, mutex) \
- pthread_cond_wait(&(cond), &(mutex))
-
-#define _glthread_COND_SIGNAL(cond) \
- pthread_cond_signal(&(cond))
-
-#define _glthread_COND_BROADCAST(cond) \
- pthread_cond_broadcast(&(cond))
-
-
-#else /* PTHREADS */
-
-typedef unsigned int _glthread_Cond;
-#define _glthread_DECLARE_STATIC_COND(name) \
-// #warning Condition variables not implemented.
-
-#define _glthread_INIT_COND(cond) \
- ASSERT(0);
-
-#define _glthread_DESTROY_COND(name) \
- ASSERT(0);
-
-#define _glthread_COND_WAIT(cond, mutex) \
- ASSERT(0);
-
-#define _glthread_COND_SIGNAL(cond) \
- ASSERT(0);
-
-#define _glthread_COND_BROADCAST(cond) \
- ASSERT(0);
-
-#endif
-
-
-/*
- * Solaris threads. Use only up to Solaris 2.4.
- * Solaris 2.5 and higher provide POSIX threads.
- * Be sure to compile with -mt on the Solaris compilers, or
- * use -D_REENTRANT if using gcc.
- */
-#ifdef SOLARIS_THREADS
-#include <thread.h>
-
-typedef struct {
- thread_key_t key;
- mutex_t keylock;
- int initMagic;
-} _glthread_TSD;
-
-typedef thread_t _glthread_Thread;
-
-typedef mutex_t _glthread_Mutex;
-
-/* XXX need to really implement mutex-related macros */
-#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0
-#define _glthread_INIT_MUTEX(name) (void) name
-#define _glthread_DESTROY_MUTEX(name) (void) name
-#define _glthread_LOCK_MUTEX(name) (void) name
-#define _glthread_UNLOCK_MUTEX(name) (void) name
-
-#endif /* SOLARIS_THREADS */
-
-
+#endif /* PTHREADS */
/*
@@ -209,11 +127,20 @@ typedef HANDLE _glthread_Thread;
typedef CRITICAL_SECTION _glthread_Mutex;
-#define _glthread_DECLARE_STATIC_MUTEX(name) /*static*/ _glthread_Mutex name = {0,0,0,0,0,0}
-#define _glthread_INIT_MUTEX(name) InitializeCriticalSection(&name)
-#define _glthread_DESTROY_MUTEX(name) DeleteCriticalSection(&name)
-#define _glthread_LOCK_MUTEX(name) EnterCriticalSection(&name)
-#define _glthread_UNLOCK_MUTEX(name) LeaveCriticalSection(&name)
+#define _glthread_DECLARE_STATIC_MUTEX(name) \
+ /* static */ _glthread_Mutex name = { 0, 0, 0, 0, 0, 0 }
+
+#define _glthread_INIT_MUTEX(name) \
+ InitializeCriticalSection(&name)
+
+#define _glthread_DESTROY_MUTEX(name) \
+ DeleteCriticalSection(&name)
+
+#define _glthread_LOCK_MUTEX(name) \
+ EnterCriticalSection(&name)
+
+#define _glthread_UNLOCK_MUTEX(name) \
+ LeaveCriticalSection(&name)
#endif /* WIN32_THREADS */
@@ -252,22 +179,34 @@ typedef struct {
} benaphore;
typedef benaphore _glthread_Mutex;
-#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = { 0, 0 }
-#define _glthread_INIT_MUTEX(name) name.sem = create_sem(0, #name"_benaphore"), name.lock = 0
-#define _glthread_DESTROY_MUTEX(name) delete_sem(name.sem), name.lock = 0
-#define _glthread_LOCK_MUTEX(name) if (name.sem == 0) _glthread_INIT_MUTEX(name); \
- if (atomic_add(&(name.lock), 1) >= 1) acquire_sem(name.sem)
-#define _glthread_UNLOCK_MUTEX(name) if (atomic_add(&(name.lock), -1) > 1) release_sem(name.sem)
+#define _glthread_DECLARE_STATIC_MUTEX(name) \
+ static _glthread_Mutex name = { 0, 0 }
-#endif /* BEOS_THREADS */
+#define _glthread_INIT_MUTEX(name) \
+ name.sem = create_sem(0, #name"_benaphore"), \
+ name.lock = 0
+#define _glthread_DESTROY_MUTEX(name) \
+ delete_sem(name.sem), \
+ name.lock = 0
+#define _glthread_LOCK_MUTEX(name) \
+ if (name.sem == 0) \
+ _glthread_INIT_MUTEX(name); \
+ if (atomic_add(&(name.lock), 1) >= 1) \
+ acquire_sem(name.sem)
+
+#define _glthread_UNLOCK_MUTEX(name) \
+ if (atomic_add(&(name.lock), -1) > 1) \
+ release_sem(name.sem)
+
+#endif /* BEOS_THREADS */
-#ifndef THREADS
/*
* THREADS not defined
*/
+#ifndef THREADS
typedef unsigned _glthread_TSD;
@@ -301,6 +240,10 @@ extern void
_glthread_InitTSD(_glthread_TSD *);
+extern void
+_glthread_DestroyTSD(_glthread_TSD *); /* WIN32 only */
+
+
extern void *
_glthread_GetTSD(_glthread_TSD *);
@@ -308,26 +251,5 @@ _glthread_GetTSD(_glthread_TSD *);
extern void
_glthread_SetTSD(_glthread_TSD *, void *);
-#if !defined __GNUC__ || __GNUC__ < 3
-# define __builtin_expect(x, y) x
-#endif
-
-#if defined(GLX_USE_TLS)
-
-extern __thread struct _glapi_table * _glapi_tls_Dispatch
- __attribute__((tls_model("initial-exec")));
-
-#define GET_DISPATCH() _glapi_tls_Dispatch
-
-#elif !defined(GL_CALL)
-# if defined(THREADS)
-# define GET_DISPATCH() \
- ((__builtin_expect( _glapi_Dispatch != NULL, 1 )) \
- ? _glapi_Dispatch : _glapi_get_dispatch())
-# else
-# define GET_DISPATCH() _glapi_Dispatch
-# endif /* defined(THREADS) */
-#endif /* ndef GL_CALL */
-
#endif /* THREADS_H */
diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c
index 70c154b62b..fa8d409caa 100644
--- a/src/mesa/main/api_exec.c
+++ b/src/mesa/main/api_exec.c
@@ -758,4 +758,10 @@ _mesa_init_exec_table(struct _glapi_table *exec)
SET_EGLImageTargetTexture2DOES(exec, _mesa_EGLImageTargetTexture2DOES);
SET_EGLImageTargetRenderbufferStorageOES(exec, _mesa_EGLImageTargetRenderbufferStorageOES);
#endif
+
+#if FEATURE_APPLE_object_purgeable
+ SET_ObjectPurgeableAPPLE(exec, _mesa_ObjectPurgeableAPPLE);
+ SET_ObjectUnpurgeableAPPLE(exec, _mesa_ObjectUnpurgeableAPPLE);
+ SET_GetObjectParameterivAPPLE(exec, _mesa_GetObjectParameterivAPPLE);
+#endif
}
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index 326ad6f909..4fb7b5ad61 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -123,6 +123,12 @@ check_valid_to_render(GLcontext *ctx, const char *function)
return GL_TRUE;
}
+
+/**
+ * Do bounds checking on array element indexes. Check that the vertices
+ * pointed to by the indices don't lie outside buffer object bounds.
+ * \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,
const GLvoid *indices, GLint basevertex)
@@ -147,17 +153,18 @@ check_index_bounds(GLcontext *ctx, GLsizei count, GLenum type,
vbo_get_minmax_index(ctx, &prim, &ib, &min, &max);
- if (min + basevertex < 0 ||
+ if ((int)(min + basevertex) < 0 ||
max + basevertex > ctx->Array.ArrayObj->_MaxElement) {
/* the max element is out of bounds of one or more enabled arrays */
- _mesa_warning(ctx, "glDrawElements() index=%u is "
- "out of bounds (max=%u)", max, ctx->Array.ArrayObj->_MaxElement);
+ _mesa_warning(ctx, "glDrawElements() index=%u is out of bounds (max=%u)",
+ max, ctx->Array.ArrayObj->_MaxElement);
return GL_FALSE;
}
return GL_TRUE;
}
+
/**
* Error checking for glDrawElements(). Includes parameter checking
* and VBO bounds checking.
diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c
index de60031cc8..d022770f24 100644
--- a/src/mesa/main/blend.c
+++ b/src/mesa/main/blend.c
@@ -456,9 +456,6 @@ _mesa_IndexMask( GLuint mask )
FLUSH_VERTICES(ctx, _NEW_COLOR);
ctx->Color.IndexMask = mask;
-
- if (ctx->Driver.IndexMask)
- ctx->Driver.IndexMask( ctx, mask );
}
#endif
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 971b280f3b..71d1514fe4 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -37,6 +37,8 @@
#include "image.h"
#include "context.h"
#include "bufferobj.h"
+#include "fbobject.h"
+#include "texobj.h"
/* Debug flags */
@@ -1117,20 +1119,20 @@ _mesa_BufferDataARB(GLenum target, GLsizeiptrARB size,
}
switch (usage) {
- case GL_STREAM_DRAW_ARB:
- case GL_STREAM_READ_ARB:
- case GL_STREAM_COPY_ARB:
- case GL_STATIC_DRAW_ARB:
- case GL_STATIC_READ_ARB:
- case GL_STATIC_COPY_ARB:
- case GL_DYNAMIC_DRAW_ARB:
- case GL_DYNAMIC_READ_ARB:
- case GL_DYNAMIC_COPY_ARB:
- /* OK */
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glBufferDataARB(usage)");
- return;
+ case GL_STREAM_DRAW_ARB:
+ case GL_STREAM_READ_ARB:
+ case GL_STREAM_COPY_ARB:
+ case GL_STATIC_DRAW_ARB:
+ case GL_STATIC_READ_ARB:
+ case GL_STATIC_COPY_ARB:
+ case GL_DYNAMIC_DRAW_ARB:
+ case GL_DYNAMIC_READ_ARB:
+ case GL_DYNAMIC_COPY_ARB:
+ /* OK */
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBufferDataARB(usage)");
+ return;
}
bufObj = get_buffer(ctx, target);
@@ -1223,18 +1225,18 @@ _mesa_MapBufferARB(GLenum target, GLenum access)
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, NULL);
switch (access) {
- case GL_READ_ONLY_ARB:
- accessFlags = GL_MAP_READ_BIT;
- break;
- case GL_WRITE_ONLY_ARB:
- accessFlags = GL_MAP_WRITE_BIT;
- break;
- case GL_READ_WRITE_ARB:
- accessFlags = GL_MAP_READ_BIT | GL_MAP_WRITE_BIT;
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glMapBufferARB(access)");
- return NULL;
+ case GL_READ_ONLY_ARB:
+ accessFlags = GL_MAP_READ_BIT;
+ break;
+ case GL_WRITE_ONLY_ARB:
+ accessFlags = GL_MAP_WRITE_BIT;
+ break;
+ case GL_READ_WRITE_ARB:
+ accessFlags = GL_MAP_READ_BIT | GL_MAP_WRITE_BIT;
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glMapBufferARB(access)");
+ return NULL;
}
bufObj = get_buffer(ctx, target);
@@ -1383,21 +1385,21 @@ _mesa_GetBufferParameterivARB(GLenum target, GLenum pname, GLint *params)
}
switch (pname) {
- case GL_BUFFER_SIZE_ARB:
- *params = (GLint) bufObj->Size;
- break;
- case GL_BUFFER_USAGE_ARB:
- *params = bufObj->Usage;
- break;
- case GL_BUFFER_ACCESS_ARB:
- *params = simplified_access_mode(bufObj->AccessFlags);
- break;
- case GL_BUFFER_MAPPED_ARB:
- *params = _mesa_bufferobj_mapped(bufObj);
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetBufferParameterivARB(pname)");
- return;
+ case GL_BUFFER_SIZE_ARB:
+ *params = (GLint) bufObj->Size;
+ break;
+ case GL_BUFFER_USAGE_ARB:
+ *params = bufObj->Usage;
+ break;
+ case GL_BUFFER_ACCESS_ARB:
+ *params = simplified_access_mode(bufObj->AccessFlags);
+ break;
+ case GL_BUFFER_MAPPED_ARB:
+ *params = _mesa_bufferobj_mapped(bufObj);
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetBufferParameterivARB(pname)");
+ return;
}
}
@@ -1425,21 +1427,21 @@ _mesa_GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params)
}
switch (pname) {
- case GL_BUFFER_SIZE_ARB:
- *params = bufObj->Size;
- break;
- case GL_BUFFER_USAGE_ARB:
- *params = bufObj->Usage;
- break;
- case GL_BUFFER_ACCESS_ARB:
- *params = simplified_access_mode(bufObj->AccessFlags);
- break;
- case GL_BUFFER_MAPPED_ARB:
- *params = _mesa_bufferobj_mapped(bufObj);
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetBufferParameteri64v(pname)");
- return;
+ case GL_BUFFER_SIZE_ARB:
+ *params = bufObj->Size;
+ break;
+ case GL_BUFFER_USAGE_ARB:
+ *params = bufObj->Usage;
+ break;
+ case GL_BUFFER_ACCESS_ARB:
+ *params = simplified_access_mode(bufObj->AccessFlags);
+ break;
+ case GL_BUFFER_MAPPED_ARB:
+ *params = _mesa_bufferobj_mapped(bufObj);
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetBufferParameteri64v(pname)");
+ return;
}
}
@@ -1710,3 +1712,387 @@ _mesa_FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
if (ctx->Driver.FlushMappedBufferRange)
ctx->Driver.FlushMappedBufferRange(ctx, target, offset, length, bufObj);
}
+
+
+#if FEATURE_APPLE_object_purgeable
+static GLenum
+_mesa_BufferObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option)
+{
+ struct gl_buffer_object *bufObj;
+ GLenum retval;
+
+ bufObj = _mesa_lookup_bufferobj(ctx, name);
+ if (!bufObj) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glObjectPurgeable(name = 0x%x)", name);
+ return 0;
+ }
+ if (!_mesa_is_bufferobj(bufObj)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glObjectPurgeable(buffer 0)" );
+ return 0;
+ }
+
+ if (bufObj->Purgeable) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glObjectPurgeable(name = 0x%x) is already purgeable", name);
+ return GL_VOLATILE_APPLE;
+ }
+
+ bufObj->Purgeable = GL_TRUE;
+
+ retval = GL_VOLATILE_APPLE;
+ if (ctx->Driver.BufferObjectPurgeable)
+ retval = ctx->Driver.BufferObjectPurgeable(ctx, bufObj, option);
+
+ return retval;
+}
+
+
+static GLenum
+_mesa_RenderObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option)
+{
+ struct gl_renderbuffer *bufObj;
+ GLenum retval;
+
+ bufObj = _mesa_lookup_renderbuffer(ctx, name);
+ if (!bufObj) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glObjectUnpurgeable(name = 0x%x)", name);
+ return 0;
+ }
+
+ if (bufObj->Purgeable) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glObjectPurgeable(name = 0x%x) is already purgeable", name);
+ return GL_VOLATILE_APPLE;
+ }
+
+ bufObj->Purgeable = GL_TRUE;
+
+ retval = GL_VOLATILE_APPLE;
+ if (ctx->Driver.RenderObjectPurgeable)
+ retval = ctx->Driver.RenderObjectPurgeable(ctx, bufObj, option);
+
+ return retval;
+}
+
+
+static GLenum
+_mesa_TextureObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option)
+{
+ struct gl_texture_object *bufObj;
+ GLenum retval;
+
+ bufObj = _mesa_lookup_texture(ctx, name);
+ if (!bufObj) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glObjectPurgeable(name = 0x%x)", name);
+ return 0;
+ }
+
+ if (bufObj->Purgeable) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glObjectPurgeable(name = 0x%x) is already purgeable", name);
+ return GL_VOLATILE_APPLE;
+ }
+
+ bufObj->Purgeable = GL_TRUE;
+
+ retval = GL_VOLATILE_APPLE;
+ if (ctx->Driver.TextureObjectPurgeable)
+ retval = ctx->Driver.TextureObjectPurgeable(ctx, bufObj, option);
+
+ return retval;
+}
+
+
+GLenum GLAPIENTRY
+_mesa_ObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
+{
+ GLenum retval;
+
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0);
+
+ if (name == 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glObjectPurgeable(name = 0x%x)", name);
+ return 0;
+ }
+
+ switch (option) {
+ case GL_VOLATILE_APPLE:
+ case GL_RELEASED_APPLE:
+ /* legal */
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glObjectPurgeable(name = 0x%x) invalid option: %d",
+ name, option);
+ return 0;
+ }
+
+ switch (objectType) {
+ case GL_TEXTURE:
+ retval = _mesa_TextureObjectPurgeable (ctx, name, option);
+ break;
+ case GL_RENDERBUFFER_EXT:
+ retval = _mesa_RenderObjectPurgeable (ctx, name, option);
+ break;
+ case GL_BUFFER_OBJECT_APPLE:
+ retval = _mesa_BufferObjectPurgeable (ctx, name, option);
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glObjectPurgeable(name = 0x%x) invalid type: %d",
+ name, objectType);
+ return 0;
+ }
+
+ /* In strict conformance to the spec, we must only return VOLATILE when
+ * when passed the VOLATILE option. Madness.
+ *
+ * XXX First fix the spec, then fix me.
+ */
+ return option == GL_VOLATILE_APPLE ? GL_VOLATILE_APPLE : retval;
+}
+
+
+static GLenum
+_mesa_BufferObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
+{
+ struct gl_buffer_object *bufObj;
+ GLenum retval;
+
+ bufObj = _mesa_lookup_bufferobj(ctx, name);
+ if (!bufObj) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glObjectUnpurgeable(name = 0x%x)", name);
+ return 0;
+ }
+
+ if (! bufObj->Purgeable) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glObjectUnpurgeable(name = 0x%x) object is "
+ " already \"unpurged\"", name);
+ return 0;
+ }
+
+ bufObj->Purgeable = GL_FALSE;
+
+ retval = GL_RETAINED_APPLE;
+ if (ctx->Driver.BufferObjectUnpurgeable)
+ retval = ctx->Driver.BufferObjectUnpurgeable(ctx, bufObj, option);
+
+ return retval;
+}
+
+
+static GLenum
+_mesa_RenderObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
+{
+ struct gl_renderbuffer *bufObj;
+ GLenum retval;
+
+ bufObj = _mesa_lookup_renderbuffer(ctx, name);
+ if (!bufObj) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glObjectUnpurgeable(name = 0x%x)", name);
+ return 0;
+ }
+
+ if (! bufObj->Purgeable) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glObjectUnpurgeable(name = 0x%x) object is "
+ " already \"unpurged\"", name);
+ return 0;
+ }
+
+ bufObj->Purgeable = GL_FALSE;
+
+ retval = GL_RETAINED_APPLE;
+ if (ctx->Driver.RenderObjectUnpurgeable)
+ retval = ctx->Driver.RenderObjectUnpurgeable(ctx, bufObj, option);
+
+ return option;
+}
+
+
+static GLenum
+_mesa_TextureObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option)
+{
+ struct gl_texture_object *bufObj;
+ GLenum retval;
+
+ bufObj = _mesa_lookup_texture(ctx, name);
+ if (!bufObj) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glObjectUnpurgeable(name = 0x%x)", name);
+ return 0;
+ }
+
+ if (! bufObj->Purgeable) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glObjectUnpurgeable(name = 0x%x) object is"
+ " already \"unpurged\"", name);
+ return 0;
+ }
+
+ bufObj->Purgeable = GL_FALSE;
+
+ retval = GL_RETAINED_APPLE;
+ if (ctx->Driver.TextureObjectUnpurgeable)
+ retval = ctx->Driver.TextureObjectUnpurgeable(ctx, bufObj, option);
+
+ return retval;
+}
+
+
+GLenum GLAPIENTRY
+_mesa_ObjectUnpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0);
+
+ if (name == 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glObjectUnpurgeable(name = 0x%x)", name);
+ return 0;
+ }
+
+ switch (option) {
+ case GL_RETAINED_APPLE:
+ case GL_UNDEFINED_APPLE:
+ /* legal */
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glObjectUnpurgeable(name = 0x%x) invalid option: %d",
+ name, option);
+ return 0;
+ }
+
+ switch (objectType) {
+ case GL_BUFFER_OBJECT_APPLE:
+ return _mesa_BufferObjectUnpurgeable(ctx, name, option);
+ case GL_TEXTURE:
+ return _mesa_TextureObjectUnpurgeable(ctx, name, option);
+ case GL_RENDERBUFFER_EXT:
+ return _mesa_RenderObjectUnpurgeable(ctx, name, option);
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glObjectUnpurgeable(name = 0x%x) invalid type: %d",
+ name, objectType);
+ return 0;
+ }
+}
+
+
+static void
+_mesa_GetBufferObjectParameterivAPPLE(GLcontext *ctx, GLuint name,
+ GLenum pname, GLint* params)
+{
+ struct gl_buffer_object *bufObj;
+
+ bufObj = _mesa_lookup_bufferobj(ctx, name);
+ if (!bufObj) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glGetObjectParameteriv(name = 0x%x) invalid object", name);
+ return;
+ }
+
+ switch (pname) {
+ case GL_PURGEABLE_APPLE:
+ *params = bufObj->Purgeable;
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetObjectParameteriv(name = 0x%x) invalid enum: %d",
+ name, pname);
+ break;
+ }
+}
+
+
+static void
+_mesa_GetRenderObjectParameterivAPPLE(GLcontext *ctx, GLuint name,
+ GLenum pname, GLint* params)
+{
+ struct gl_renderbuffer *bufObj;
+
+ bufObj = _mesa_lookup_renderbuffer(ctx, name);
+ if (!bufObj) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glObjectUnpurgeable(name = 0x%x)", name);
+ return;
+ }
+
+ switch (pname) {
+ case GL_PURGEABLE_APPLE:
+ *params = bufObj->Purgeable;
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetObjectParameteriv(name = 0x%x) invalid enum: %d",
+ name, pname);
+ break;
+ }
+}
+
+
+static void
+_mesa_GetTextureObjectParameterivAPPLE(GLcontext *ctx, GLuint name,
+ GLenum pname, GLint* params)
+{
+ struct gl_texture_object *bufObj;
+
+ bufObj = _mesa_lookup_texture(ctx, name);
+ if (!bufObj) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glObjectUnpurgeable(name = 0x%x)", name);
+ return;
+ }
+
+ switch (pname) {
+ case GL_PURGEABLE_APPLE:
+ *params = bufObj->Purgeable;
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetObjectParameteriv(name = 0x%x) invalid enum: %d",
+ name, pname);
+ break;
+ }
+}
+
+
+void GLAPIENTRY
+_mesa_GetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname,
+ GLint* params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (name == 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glGetObjectParameteriv(name = 0x%x)", name);
+ return;
+ }
+
+ switch (objectType) {
+ case GL_TEXTURE:
+ _mesa_GetTextureObjectParameterivAPPLE (ctx, name, pname, params);
+ break;
+ case GL_BUFFER_OBJECT_APPLE:
+ _mesa_GetBufferObjectParameterivAPPLE (ctx, name, pname, params);
+ break;
+ case GL_RENDERBUFFER_EXT:
+ _mesa_GetRenderObjectParameterivAPPLE (ctx, name, pname, params);
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetObjectParameteriv(name = 0x%x) invalid type: %d",
+ name, objectType);
+ }
+}
+
+#endif /* FEATURE_APPLE_object_purgeable */
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index f8bca5ff71..912529cfdf 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -175,4 +175,15 @@ _mesa_MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length,
extern void GLAPIENTRY
_mesa_FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length);
+#if FEATURE_APPLE_object_purgeable
+extern GLenum GLAPIENTRY
+_mesa_ObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLenum option);
+
+extern GLenum GLAPIENTRY
+_mesa_ObjectUnpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option);
+
+extern void GLAPIENTRY
+_mesa_GetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname, GLint* params);
+#endif
+
#endif
diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c
index 8085bedf1c..e76ab5527b 100644
--- a/src/mesa/main/clear.c
+++ b/src/mesa/main/clear.c
@@ -51,11 +51,6 @@ _mesa_ClearIndex( GLfloat c )
FLUSH_VERTICES(ctx, _NEW_COLOR);
ctx->Color.ClearIndex = (GLuint) c;
-
- if (!ctx->Visual.rgbMode && ctx->Driver.ClearIndex) {
- /* it's OK to call glClearIndex in RGBA mode but it should be a NOP */
- (*ctx->Driver.ClearIndex)( ctx, ctx->Color.ClearIndex );
- }
}
#endif
@@ -92,7 +87,7 @@ _mesa_ClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
FLUSH_VERTICES(ctx, _NEW_COLOR);
COPY_4V(ctx->Color.ClearColor, tmp);
- if (ctx->Visual.rgbMode && ctx->Driver.ClearColor) {
+ if (ctx->Driver.ClearColor) {
/* it's OK to call glClearColor in CI mode but it should be a NOP */
(*ctx->Driver.ClearColor)(ctx, ctx->Color.ClearColor);
}
@@ -261,11 +256,6 @@ _mesa_ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value)
FLUSH_CURRENT(ctx, 0);
- if (!ctx->DrawBuffer->Visual.rgbMode) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glClearBufferiv()");
- return;
- }
-
if (ctx->NewState) {
_mesa_update_state( ctx );
}
@@ -342,11 +332,6 @@ _mesa_ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value)
FLUSH_CURRENT(ctx, 0);
- if (!ctx->DrawBuffer->Visual.rgbMode) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glClearBufferuiv()");
- return;
- }
-
if (ctx->NewState) {
_mesa_update_state( ctx );
}
@@ -401,11 +386,6 @@ _mesa_ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value)
FLUSH_CURRENT(ctx, 0);
- if (!ctx->DrawBuffer->Visual.rgbMode) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glClearBufferfv()");
- return;
- }
-
if (ctx->NewState) {
_mesa_update_state( ctx );
}
@@ -480,11 +460,6 @@ _mesa_ClearBufferfi(GLenum buffer, GLint drawbuffer,
FLUSH_CURRENT(ctx, 0);
- if (!ctx->DrawBuffer->Visual.rgbMode) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glClearBufferfi()");
- return;
- }
-
if (buffer != GL_DEPTH_STENCIL) {
_mesa_error(ctx, GL_INVALID_ENUM, "glClearBufferfi(buffer=%s)",
_mesa_lookup_enum_by_nr(buffer));
diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h
index 9cef99f67a..81704ae2c1 100644
--- a/src/mesa/main/compiler.h
+++ b/src/mesa/main/compiler.h
@@ -173,8 +173,7 @@ extern "C" {
* We also need to define a USED attribute, so the optimizer doesn't
* inline a static function that we later use in an alias. - ajax
*/
-#if (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303) \
- || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+#if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define PUBLIC __attribute__((visibility("default")))
# define USED __attribute__((used))
#else
@@ -197,7 +196,7 @@ extern "C" {
/**
* __builtin_expect macros
*/
-#if (!defined(__GNUC__) || __GNUC__ < 3) && (!defined(__IBMC__) || __IBMC__ < 900)
+#if !defined(__GNUC__)
# define __builtin_expect(x, y) x
#endif
@@ -210,7 +209,7 @@ extern "C" {
#ifndef __FUNCTION__
# if defined(__VMS)
# define __FUNCTION__ "VMS$NL:"
-# elif ((!defined __GNUC__) || (__GNUC__ < 2)) && (!defined __xlC__) && \
+# elif !defined(__GNUC__) && !defined(__xlC__) && \
(!defined(_MSC_VER) || _MSC_VER < 1300)
# if (__STDC_VERSION__ >= 199901L) /* C99 */ || \
(defined(__SUNPRO_C) && defined(__C99FEATURES__))
@@ -322,8 +321,7 @@ static INLINE GLuint CPU_TO_LE32(GLuint x)
* LONGSTRING macro
* gcc -pedantic warns about long string literals, LONGSTRING silences that.
*/
-#if !defined(__GNUC__) || (__GNUC__ < 2) || \
- ((__GNUC__ == 2) && (__GNUC_MINOR__ <= 7))
+#if !defined(__GNUC__)
# define LONGSTRING
#else
# define LONGSTRING __extension__
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 4ecbb5ecf6..73126b9575 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -184,7 +184,6 @@ _mesa_notifySwapBuffers(__GLcontext *ctx)
* Allocates a GLvisual structure and initializes it via
* _mesa_initialize_visual().
*
- * \param rgbFlag GL_TRUE for RGB(A) mode, GL_FALSE for Color Index mode.
* \param dbFlag double buffering
* \param stereoFlag stereo buffer
* \param depthBits requested bits per depth buffer value. Any value in [0, 32]
@@ -206,14 +205,12 @@ _mesa_notifySwapBuffers(__GLcontext *ctx)
* \note Need to add params for level and numAuxBuffers (at least)
*/
GLvisual *
-_mesa_create_visual( GLboolean rgbFlag,
- GLboolean dbFlag,
+_mesa_create_visual( GLboolean dbFlag,
GLboolean stereoFlag,
GLint redBits,
GLint greenBits,
GLint blueBits,
GLint alphaBits,
- GLint indexBits,
GLint depthBits,
GLint stencilBits,
GLint accumRedBits,
@@ -224,9 +221,9 @@ _mesa_create_visual( GLboolean rgbFlag,
{
GLvisual *vis = (GLvisual *) calloc(1, sizeof(GLvisual));
if (vis) {
- if (!_mesa_initialize_visual(vis, rgbFlag, dbFlag, stereoFlag,
+ if (!_mesa_initialize_visual(vis, dbFlag, stereoFlag,
redBits, greenBits, blueBits, alphaBits,
- indexBits, depthBits, stencilBits,
+ depthBits, stencilBits,
accumRedBits, accumGreenBits,
accumBlueBits, accumAlphaBits,
numSamples)) {
@@ -248,14 +245,12 @@ _mesa_create_visual( GLboolean rgbFlag,
*/
GLboolean
_mesa_initialize_visual( GLvisual *vis,
- GLboolean rgbFlag,
GLboolean dbFlag,
GLboolean stereoFlag,
GLint redBits,
GLint greenBits,
GLint blueBits,
GLint alphaBits,
- GLint indexBits,
GLint depthBits,
GLint stencilBits,
GLint accumRedBits,
@@ -277,7 +272,7 @@ _mesa_initialize_visual( GLvisual *vis,
assert(accumBlueBits >= 0);
assert(accumAlphaBits >= 0);
- vis->rgbMode = rgbFlag;
+ vis->rgbMode = GL_TRUE;
vis->doubleBufferMode = dbFlag;
vis->stereoMode = stereoFlag;
@@ -287,7 +282,7 @@ _mesa_initialize_visual( GLvisual *vis,
vis->alphaBits = alphaBits;
vis->rgbBits = redBits + greenBits + blueBits;
- vis->indexBits = indexBits;
+ vis->indexBits = 0;
vis->depthBits = depthBits;
vis->stencilBits = stencilBits;
@@ -1169,8 +1164,6 @@ check_compatible(const GLcontext *ctx, const GLframebuffer *buffer)
if (ctxvis == bufvis)
return GL_TRUE;
- if (ctxvis->rgbMode != bufvis->rgbMode)
- return GL_FALSE;
#if 0
/* disabling this fixes the fgl_glxgears pbuffer demo */
if (ctxvis->doubleBufferMode && !bufvis->doubleBufferMode)
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index c3be1063f8..09bf1777da 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -60,14 +60,12 @@ struct _glapi_table;
/*@{*/
extern GLvisual *
-_mesa_create_visual( GLboolean rgbFlag,
- GLboolean dbFlag,
+_mesa_create_visual( GLboolean dbFlag,
GLboolean stereoFlag,
GLint redBits,
GLint greenBits,
GLint blueBits,
GLint alphaBits,
- GLint indexBits,
GLint depthBits,
GLint stencilBits,
GLint accumRedBits,
@@ -78,14 +76,12 @@ _mesa_create_visual( GLboolean rgbFlag,
extern GLboolean
_mesa_initialize_visual( GLvisual *v,
- GLboolean rgbFlag,
GLboolean dbFlag,
GLboolean stereoFlag,
GLint redBits,
GLint greenBits,
GLint blueBits,
GLint alphaBits,
- GLint indexBits,
GLint depthBits,
GLint stencilBits,
GLint accumRedBits,
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 079e44bb95..197de09b22 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -620,8 +620,6 @@ struct dd_function_table {
void (*ClearColor)(GLcontext *ctx, const GLfloat color[4]);
/** Specify the clear value for the depth buffer */
void (*ClearDepth)(GLcontext *ctx, GLclampd d);
- /** Specify the clear value for the color index buffers */
- void (*ClearIndex)(GLcontext *ctx, GLuint index);
/** Specify the clear value for the stencil buffer */
void (*ClearStencil)(GLcontext *ctx, GLint s);
/** Specify a plane against which all geometry is clipped */
@@ -653,8 +651,6 @@ struct dd_function_table {
void (*Fogfv)(GLcontext *ctx, GLenum pname, const GLfloat *params);
/** Specify implementation-specific hints */
void (*Hint)(GLcontext *ctx, GLenum target, GLenum mode);
- /** Control the writing of individual bits in the color index buffers */
- void (*IndexMask)(GLcontext *ctx, GLuint mask);
/** Set light source parameters.
* Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already
* been transformed to eye-space.
@@ -781,6 +777,23 @@ struct dd_function_table {
#endif
/**
+ * \name Functions for GL_APPLE_object_purgeable
+ */
+#if FEATURE_APPLE_object_purgeable
+ /*@{*/
+ /* 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 );
+
+ /* 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 );
+ /*@}*/
+#endif
+
+ /**
* \name Functions for GL_EXT_framebuffer_object
*/
#if FEATURE_EXT_framebuffer_object
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 673db30f25..43aadb1de5 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -9285,6 +9285,12 @@ _mesa_init_save_table(struct _glapi_table *table)
/* 364. GL_EXT_provoking_vertex */
SET_ProvokingVertexEXT(table, save_ProvokingVertexEXT);
+ /* 371. GL_APPLE_object_purgeable */
+#if FEATURE_APPLE_object_purgeable
+ SET_ObjectPurgeableAPPLE(table, _mesa_ObjectPurgeableAPPLE);
+ SET_ObjectUnpurgeableAPPLE(table, _mesa_ObjectUnpurgeableAPPLE);
+#endif
+
/* GL 3.0 */
#if 0
SET_ClearBufferiv(table, save_ClearBufferiv);
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c
index 84cb78612b..bf36a7e7a4 100644
--- a/src/mesa/main/drawpix.c
+++ b/src/mesa/main/drawpix.c
@@ -127,7 +127,6 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
_mesa_feedback_vertex( ctx,
ctx->Current.RasterPos,
ctx->Current.RasterColor,
- ctx->Current.RasterIndex,
ctx->Current.RasterTexCoords[0] );
}
else {
@@ -213,7 +212,6 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
_mesa_feedback_vertex( ctx,
ctx->Current.RasterPos,
ctx->Current.RasterColor,
- ctx->Current.RasterIndex,
ctx->Current.RasterTexCoords[0] );
}
else {
@@ -293,7 +291,6 @@ _mesa_Bitmap( GLsizei width, GLsizei height,
_mesa_feedback_vertex( ctx,
ctx->Current.RasterPos,
ctx->Current.RasterColor,
- ctx->Current.RasterIndex,
ctx->Current.RasterTexCoords[0] );
}
else {
diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c
index 140902f677..06d51d4e5c 100644
--- a/src/mesa/main/enums.c
+++ b/src/mesa/main/enums.c
@@ -145,6 +145,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_BUFFER_MAPPED_ARB\0"
"GL_BUFFER_MAP_POINTER\0"
"GL_BUFFER_MAP_POINTER_ARB\0"
+ "GL_BUFFER_OBJECT_APPLE\0"
"GL_BUFFER_SERIALIZED_MODIFY_APPLE\0"
"GL_BUFFER_SIZE\0"
"GL_BUFFER_SIZE_ARB\0"
@@ -1320,6 +1321,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_PROXY_TEXTURE_CUBE_MAP_ARB\0"
"GL_PROXY_TEXTURE_RECTANGLE_ARB\0"
"GL_PROXY_TEXTURE_RECTANGLE_NV\0"
+ "GL_PURGEABLE_APPLE\0"
"GL_Q\0"
"GL_QUADRATIC_ATTENUATION\0"
"GL_QUADS\0"
@@ -1358,6 +1360,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_REFLECTION_MAP\0"
"GL_REFLECTION_MAP_ARB\0"
"GL_REFLECTION_MAP_NV\0"
+ "GL_RELEASED_APPLE\0"
"GL_RENDER\0"
"GL_RENDERBUFFER\0"
"GL_RENDERBUFFER_ALPHA_SIZE\0"
@@ -1385,6 +1388,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_REPLICATE_BORDER_HP\0"
"GL_RESCALE_NORMAL\0"
"GL_RESCALE_NORMAL_EXT\0"
+ "GL_RETAINED_APPLE\0"
"GL_RETURN\0"
"GL_RGB\0"
"GL_RGB10\0"
@@ -1811,6 +1815,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_TRIANGLE_MESH_SUN\0"
"GL_TRIANGLE_STRIP\0"
"GL_TRUE\0"
+ "GL_UNDEFINED_APPLE\0"
"GL_UNPACK_ALIGNMENT\0"
"GL_UNPACK_IMAGE_HEIGHT\0"
"GL_UNPACK_LSB_FIRST\0"
@@ -1903,6 +1908,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_VERTEX_STATE_PROGRAM_NV\0"
"GL_VIEWPORT\0"
"GL_VIEWPORT_BIT\0"
+ "GL_VOLATILE_APPLE\0"
"GL_WAIT_FAILED\0"
"GL_WEIGHT_ARRAY_ARB\0"
"GL_WEIGHT_ARRAY_BUFFER_BINDING\0"
@@ -1923,7 +1929,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_ZOOM_Y\0"
;
-static const enum_elt all_enums[1885] =
+static const enum_elt all_enums[1891] =
{
{ 0, 0x00000600 }, /* GL_2D */
{ 6, 0x00001407 }, /* GL_2_BYTES */
@@ -2034,3136 +2040,3148 @@ static const enum_elt all_enums[1885] =
{ 1755, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */
{ 1776, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */
{ 1798, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */
- { 1824, 0x00008A12 }, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */
- { 1858, 0x00008764 }, /* GL_BUFFER_SIZE */
- { 1873, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */
- { 1892, 0x00008765 }, /* GL_BUFFER_USAGE */
- { 1908, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */
- { 1928, 0x0000877B }, /* GL_BUMP_ENVMAP_ATI */
- { 1947, 0x00008777 }, /* GL_BUMP_NUM_TEX_UNITS_ATI */
- { 1973, 0x00008775 }, /* GL_BUMP_ROT_MATRIX_ATI */
- { 1996, 0x00008776 }, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */
- { 2024, 0x0000877C }, /* GL_BUMP_TARGET_ATI */
- { 2043, 0x00008778 }, /* GL_BUMP_TEX_UNITS_ATI */
- { 2065, 0x00001400 }, /* GL_BYTE */
- { 2073, 0x00002A24 }, /* GL_C3F_V3F */
- { 2084, 0x00002A26 }, /* GL_C4F_N3F_V3F */
- { 2099, 0x00002A22 }, /* GL_C4UB_V2F */
- { 2111, 0x00002A23 }, /* GL_C4UB_V3F */
- { 2123, 0x00000901 }, /* GL_CCW */
- { 2130, 0x00002900 }, /* GL_CLAMP */
- { 2139, 0x0000812D }, /* GL_CLAMP_TO_BORDER */
- { 2158, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */
- { 2181, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */
- { 2205, 0x0000812F }, /* GL_CLAMP_TO_EDGE */
- { 2222, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */
- { 2244, 0x00001500 }, /* GL_CLEAR */
- { 2253, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */
- { 2278, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */
- { 2307, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */
- { 2333, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
- { 2362, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */
- { 2388, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */
- { 2415, 0x00003000 }, /* GL_CLIP_PLANE0 */
- { 2430, 0x00003001 }, /* GL_CLIP_PLANE1 */
- { 2445, 0x00003002 }, /* GL_CLIP_PLANE2 */
- { 2460, 0x00003003 }, /* GL_CLIP_PLANE3 */
- { 2475, 0x00003004 }, /* GL_CLIP_PLANE4 */
- { 2490, 0x00003005 }, /* GL_CLIP_PLANE5 */
- { 2505, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
- { 2538, 0x00000A00 }, /* GL_COEFF */
- { 2547, 0x00001800 }, /* GL_COLOR */
- { 2556, 0x00008076 }, /* GL_COLOR_ARRAY */
- { 2571, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */
- { 2601, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */
- { 2635, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */
- { 2658, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */
- { 2678, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */
- { 2700, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */
- { 2720, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0 */
- { 2741, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */
- { 2766, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1 */
- { 2787, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10 */
- { 2809, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */
- { 2835, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11 */
- { 2857, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */
- { 2883, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12 */
- { 2905, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */
- { 2931, 0x00008CED }, /* GL_COLOR_ATTACHMENT13 */
- { 2953, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */
- { 2979, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14 */
- { 3001, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */
- { 3027, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15 */
- { 3049, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */
- { 3075, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */
- { 3100, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2 */
- { 3121, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */
- { 3146, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3 */
- { 3167, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */
- { 3192, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4 */
- { 3213, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */
- { 3238, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5 */
- { 3259, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */
- { 3284, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6 */
- { 3305, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */
- { 3330, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7 */
- { 3351, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */
- { 3376, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8 */
- { 3397, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */
- { 3422, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9 */
- { 3443, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */
- { 3468, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */
- { 3488, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */
- { 3509, 0x00001900 }, /* GL_COLOR_INDEX */
- { 3524, 0x00001603 }, /* GL_COLOR_INDEXES */
- { 3541, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */
- { 3559, 0x00000B57 }, /* GL_COLOR_MATERIAL */
- { 3577, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */
- { 3600, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */
- { 3628, 0x000080B1 }, /* GL_COLOR_MATRIX */
- { 3644, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */
- { 3664, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */
- { 3692, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */
- { 3724, 0x00008458 }, /* GL_COLOR_SUM */
- { 3737, 0x00008458 }, /* GL_COLOR_SUM_ARB */
- { 3754, 0x000080D0 }, /* GL_COLOR_TABLE */
- { 3769, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */
- { 3795, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */
- { 3825, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */
- { 3855, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */
- { 3875, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */
- { 3899, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */
- { 3924, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */
- { 3953, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */
- { 3982, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */
- { 4004, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */
- { 4030, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */
- { 4056, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */
- { 4082, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */
- { 4112, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */
- { 4142, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */
- { 4172, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */
- { 4206, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */
- { 4240, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
- { 4270, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */
- { 4304, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */
- { 4338, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */
- { 4362, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */
- { 4390, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */
- { 4418, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */
- { 4439, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */
- { 4464, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */
- { 4485, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */
- { 4510, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */
- { 4535, 0x00000C23 }, /* GL_COLOR_WRITEMASK */
- { 4554, 0x00008570 }, /* GL_COMBINE */
- { 4565, 0x00008503 }, /* GL_COMBINE4 */
- { 4577, 0x00008572 }, /* GL_COMBINE_ALPHA */
- { 4594, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */
- { 4615, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */
- { 4636, 0x00008570 }, /* GL_COMBINE_ARB */
- { 4651, 0x00008570 }, /* GL_COMBINE_EXT */
- { 4666, 0x00008571 }, /* GL_COMBINE_RGB */
- { 4681, 0x00008571 }, /* GL_COMBINE_RGB_ARB */
- { 4700, 0x00008571 }, /* GL_COMBINE_RGB_EXT */
- { 4719, 0x0000884E }, /* GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT */
- { 4755, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */
- { 4779, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */
- { 4807, 0x00001300 }, /* GL_COMPILE */
- { 4818, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */
- { 4841, 0x00008B81 }, /* GL_COMPILE_STATUS */
- { 4859, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */
- { 4879, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */
- { 4903, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */
- { 4927, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */
- { 4955, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */
- { 4979, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */
- { 5009, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */
- { 5043, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */
- { 5071, 0x000084ED }, /* GL_COMPRESSED_RGB */
- { 5089, 0x000084EE }, /* GL_COMPRESSED_RGBA */
- { 5108, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */
- { 5131, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
- { 5160, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
- { 5193, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
- { 5226, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
- { 5259, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */
- { 5281, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */
- { 5309, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
- { 5341, 0x00008C4A }, /* GL_COMPRESSED_SLUMINANCE */
- { 5366, 0x00008C4B }, /* GL_COMPRESSED_SLUMINANCE_ALPHA */
- { 5397, 0x00008C48 }, /* GL_COMPRESSED_SRGB */
- { 5416, 0x00008C49 }, /* GL_COMPRESSED_SRGB_ALPHA */
- { 5441, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */
- { 5471, 0x0000911C }, /* GL_CONDITION_SATISFIED */
- { 5494, 0x00008576 }, /* GL_CONSTANT */
- { 5506, 0x00008003 }, /* GL_CONSTANT_ALPHA */
- { 5524, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */
- { 5546, 0x00008576 }, /* GL_CONSTANT_ARB */
- { 5562, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */
- { 5586, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */
- { 5608, 0x00008001 }, /* GL_CONSTANT_COLOR */
- { 5626, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */
- { 5648, 0x00008576 }, /* GL_CONSTANT_EXT */
- { 5664, 0x00008010 }, /* GL_CONVOLUTION_1D */
- { 5682, 0x00008011 }, /* GL_CONVOLUTION_2D */
- { 5700, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */
- { 5728, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */
- { 5759, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */
- { 5786, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */
- { 5817, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */
- { 5844, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */
- { 5875, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */
- { 5903, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */
- { 5935, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */
- { 5957, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */
- { 5983, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */
- { 6005, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */
- { 6031, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */
- { 6052, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */
- { 6077, 0x00008862 }, /* GL_COORD_REPLACE */
- { 6094, 0x00008862 }, /* GL_COORD_REPLACE_ARB */
- { 6115, 0x00008862 }, /* GL_COORD_REPLACE_NV */
- { 6135, 0x00001503 }, /* GL_COPY */
- { 6143, 0x0000150C }, /* GL_COPY_INVERTED */
- { 6160, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */
- { 6180, 0x00008F36 }, /* GL_COPY_READ_BUFFER */
- { 6200, 0x00008F37 }, /* GL_COPY_WRITE_BUFFER */
- { 6221, 0x00000B44 }, /* GL_CULL_FACE */
- { 6234, 0x00000B45 }, /* GL_CULL_FACE_MODE */
- { 6252, 0x000081AA }, /* GL_CULL_VERTEX_EXT */
- { 6271, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
- { 6303, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
- { 6338, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */
- { 6359, 0x00000001 }, /* GL_CURRENT_BIT */
- { 6374, 0x00000B00 }, /* GL_CURRENT_COLOR */
- { 6391, 0x00008453 }, /* GL_CURRENT_FOG_COORD */
- { 6412, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */
- { 6438, 0x00000B01 }, /* GL_CURRENT_INDEX */
- { 6455, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */
- { 6477, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */
- { 6505, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */
- { 6526, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
- { 6560, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */
- { 6593, 0x00000B02 }, /* GL_CURRENT_NORMAL */
- { 6611, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */
- { 6641, 0x00008B8D }, /* GL_CURRENT_PROGRAM */
- { 6660, 0x00008865 }, /* GL_CURRENT_QUERY */
- { 6677, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */
- { 6698, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */
- { 6722, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */
- { 6749, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */
- { 6773, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */
- { 6800, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */
- { 6833, 0x0000845F }, /* GL_CURRENT_RASTER_SECONDARY_COLOR */
- { 6867, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
- { 6900, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */
- { 6927, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */
- { 6953, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */
- { 6978, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */
- { 7007, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */
- { 7029, 0x00000900 }, /* GL_CW */
- { 7035, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */
- { 7056, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */
- { 7077, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */
- { 7097, 0x00002101 }, /* GL_DECAL */
- { 7106, 0x00001E03 }, /* GL_DECR */
- { 7114, 0x00008508 }, /* GL_DECR_WRAP */
- { 7127, 0x00008508 }, /* GL_DECR_WRAP_EXT */
- { 7144, 0x00008B80 }, /* GL_DELETE_STATUS */
- { 7161, 0x00001801 }, /* GL_DEPTH */
- { 7170, 0x000088F0 }, /* GL_DEPTH24_STENCIL8 */
- { 7190, 0x000088F0 }, /* GL_DEPTH24_STENCIL8_EXT */
- { 7214, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT */
- { 7234, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
- { 7258, 0x00000D1F }, /* GL_DEPTH_BIAS */
- { 7272, 0x00000D56 }, /* GL_DEPTH_BITS */
- { 7286, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
- { 7306, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
- { 7331, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
- { 7351, 0x0000864F }, /* GL_DEPTH_CLAMP */
- { 7366, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
- { 7384, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
- { 7405, 0x00001902 }, /* GL_DEPTH_COMPONENT */
- { 7424, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
- { 7445, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
- { 7470, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
- { 7496, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
- { 7517, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
- { 7542, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
- { 7568, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
- { 7589, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
- { 7614, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
- { 7640, 0x00000B74 }, /* GL_DEPTH_FUNC */
- { 7654, 0x00000B70 }, /* GL_DEPTH_RANGE */
- { 7669, 0x00000D1E }, /* GL_DEPTH_SCALE */
- { 7684, 0x000084F9 }, /* GL_DEPTH_STENCIL */
- { 7701, 0x0000821A }, /* GL_DEPTH_STENCIL_ATTACHMENT */
- { 7729, 0x000084F9 }, /* GL_DEPTH_STENCIL_EXT */
- { 7750, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
- { 7770, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
- { 7798, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
- { 7826, 0x00000B71 }, /* GL_DEPTH_TEST */
- { 7840, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
- { 7862, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
- { 7888, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
- { 7907, 0x00001201 }, /* GL_DIFFUSE */
- { 7918, 0x00000BD0 }, /* GL_DITHER */
- { 7928, 0x00000A02 }, /* GL_DOMAIN */
- { 7938, 0x00001100 }, /* GL_DONT_CARE */
- { 7951, 0x000086AE }, /* GL_DOT3_RGB */
- { 7963, 0x000086AF }, /* GL_DOT3_RGBA */
- { 7976, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
- { 7993, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
- { 8010, 0x000086AE }, /* GL_DOT3_RGB_ARB */
- { 8026, 0x00008740 }, /* GL_DOT3_RGB_EXT */
- { 8042, 0x0000140A }, /* GL_DOUBLE */
- { 8052, 0x00000C32 }, /* GL_DOUBLEBUFFER */
- { 8068, 0x00000C01 }, /* GL_DRAW_BUFFER */
- { 8083, 0x00008825 }, /* GL_DRAW_BUFFER0 */
- { 8099, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
- { 8119, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
- { 8139, 0x00008826 }, /* GL_DRAW_BUFFER1 */
- { 8155, 0x0000882F }, /* GL_DRAW_BUFFER10 */
- { 8172, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
- { 8193, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
- { 8214, 0x00008830 }, /* GL_DRAW_BUFFER11 */
- { 8231, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
- { 8252, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
- { 8273, 0x00008831 }, /* GL_DRAW_BUFFER12 */
- { 8290, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
- { 8311, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
- { 8332, 0x00008832 }, /* GL_DRAW_BUFFER13 */
- { 8349, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
- { 8370, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
- { 8391, 0x00008833 }, /* GL_DRAW_BUFFER14 */
- { 8408, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
- { 8429, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
- { 8450, 0x00008834 }, /* GL_DRAW_BUFFER15 */
- { 8467, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
- { 8488, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
- { 8509, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
- { 8529, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
- { 8549, 0x00008827 }, /* GL_DRAW_BUFFER2 */
- { 8565, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
- { 8585, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
- { 8605, 0x00008828 }, /* GL_DRAW_BUFFER3 */
- { 8621, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
- { 8641, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
- { 8661, 0x00008829 }, /* GL_DRAW_BUFFER4 */
- { 8677, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
- { 8697, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
- { 8717, 0x0000882A }, /* GL_DRAW_BUFFER5 */
- { 8733, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
- { 8753, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
- { 8773, 0x0000882B }, /* GL_DRAW_BUFFER6 */
- { 8789, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
- { 8809, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
- { 8829, 0x0000882C }, /* GL_DRAW_BUFFER7 */
- { 8845, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
- { 8865, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
- { 8885, 0x0000882D }, /* GL_DRAW_BUFFER8 */
- { 8901, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
- { 8921, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
- { 8941, 0x0000882E }, /* GL_DRAW_BUFFER9 */
- { 8957, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
- { 8977, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
- { 8997, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER */
- { 9017, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING */
- { 9045, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
- { 9077, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
- { 9101, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
- { 9121, 0x00000304 }, /* GL_DST_ALPHA */
- { 9134, 0x00000306 }, /* GL_DST_COLOR */
- { 9147, 0x0000877A }, /* GL_DU8DV8_ATI */
- { 9161, 0x00008779 }, /* GL_DUDV_ATI */
- { 9173, 0x000088EA }, /* GL_DYNAMIC_COPY */
- { 9189, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
- { 9209, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
- { 9225, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
- { 9245, 0x000088E9 }, /* GL_DYNAMIC_READ */
- { 9261, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
- { 9281, 0x00000B43 }, /* GL_EDGE_FLAG */
- { 9294, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
- { 9313, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
- { 9347, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
- { 9385, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
- { 9412, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
- { 9438, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
- { 9462, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
- { 9494, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
- { 9530, 0x00001600 }, /* GL_EMISSION */
- { 9542, 0x00002000 }, /* GL_ENABLE_BIT */
- { 9556, 0x00000202 }, /* GL_EQUAL */
- { 9565, 0x00001509 }, /* GL_EQUIV */
- { 9574, 0x00010000 }, /* GL_EVAL_BIT */
- { 9586, 0x00000800 }, /* GL_EXP */
- { 9593, 0x00000801 }, /* GL_EXP2 */
- { 9601, 0x00001F03 }, /* GL_EXTENSIONS */
- { 9615, 0x00002400 }, /* GL_EYE_LINEAR */
- { 9629, 0x00002502 }, /* GL_EYE_PLANE */
- { 9642, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
- { 9667, 0x0000855B }, /* GL_EYE_RADIAL_NV */
- { 9684, 0x00000000 }, /* GL_FALSE */
- { 9693, 0x00001101 }, /* GL_FASTEST */
- { 9704, 0x00001C01 }, /* GL_FEEDBACK */
- { 9716, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
- { 9743, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
- { 9767, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
- { 9791, 0x00001B02 }, /* GL_FILL */
- { 9799, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION */
- { 9826, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION_EXT */
- { 9857, 0x00001D00 }, /* GL_FLAT */
- { 9865, 0x00001406 }, /* GL_FLOAT */
- { 9874, 0x00008B5A }, /* GL_FLOAT_MAT2 */
- { 9888, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
- { 9906, 0x00008B65 }, /* GL_FLOAT_MAT2x3 */
- { 9922, 0x00008B66 }, /* GL_FLOAT_MAT2x4 */
- { 9938, 0x00008B5B }, /* GL_FLOAT_MAT3 */
- { 9952, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
- { 9970, 0x00008B67 }, /* GL_FLOAT_MAT3x2 */
- { 9986, 0x00008B68 }, /* GL_FLOAT_MAT3x4 */
- { 10002, 0x00008B5C }, /* GL_FLOAT_MAT4 */
- { 10016, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
- { 10034, 0x00008B69 }, /* GL_FLOAT_MAT4x2 */
- { 10050, 0x00008B6A }, /* GL_FLOAT_MAT4x3 */
- { 10066, 0x00008B50 }, /* GL_FLOAT_VEC2 */
- { 10080, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
- { 10098, 0x00008B51 }, /* GL_FLOAT_VEC3 */
- { 10112, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
- { 10130, 0x00008B52 }, /* GL_FLOAT_VEC4 */
- { 10144, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
- { 10162, 0x00000B60 }, /* GL_FOG */
- { 10169, 0x00000080 }, /* GL_FOG_BIT */
- { 10180, 0x00000B66 }, /* GL_FOG_COLOR */
- { 10193, 0x00008451 }, /* GL_FOG_COORD */
- { 10206, 0x00008451 }, /* GL_FOG_COORDINATE */
- { 10224, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
- { 10248, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
- { 10287, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
- { 10330, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
- { 10362, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
- { 10393, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
- { 10422, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
- { 10447, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
- { 10466, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
- { 10500, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
- { 10527, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
- { 10553, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
- { 10577, 0x00008450 }, /* GL_FOG_COORD_SRC */
- { 10594, 0x00000B62 }, /* GL_FOG_DENSITY */
- { 10609, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
- { 10633, 0x00000B64 }, /* GL_FOG_END */
- { 10644, 0x00000C54 }, /* GL_FOG_HINT */
- { 10656, 0x00000B61 }, /* GL_FOG_INDEX */
- { 10669, 0x00000B65 }, /* GL_FOG_MODE */
- { 10681, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
- { 10700, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
- { 10725, 0x00000B63 }, /* GL_FOG_START */
- { 10738, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
- { 10756, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
- { 10780, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
- { 10799, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
- { 10822, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
- { 10857, 0x00008D40 }, /* GL_FRAMEBUFFER */
- { 10872, 0x00008215 }, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
- { 10909, 0x00008214 }, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
- { 10945, 0x00008210 }, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
- { 10986, 0x00008211 }, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
- { 11027, 0x00008216 }, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
- { 11064, 0x00008213 }, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
- { 11101, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
- { 11139, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
- { 11181, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
- { 11219, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
- { 11261, 0x00008212 }, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
- { 11296, 0x00008217 }, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
- { 11335, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
- { 11384, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
- { 11432, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
- { 11484, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
- { 11524, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
- { 11568, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
- { 11608, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
- { 11652, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING */
- { 11675, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
- { 11702, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE */
- { 11726, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
- { 11754, 0x00008218 }, /* GL_FRAMEBUFFER_DEFAULT */
- { 11777, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
- { 11796, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
- { 11833, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
- { 11874, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
- { 11915, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
- { 11953, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
- { 11995, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
- { 12046, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
- { 12084, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
- { 12129, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
- { 12178, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
- { 12216, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT */
- { 12258, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
- { 12296, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
- { 12338, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
- { 12370, 0x00008219 }, /* GL_FRAMEBUFFER_UNDEFINED */
- { 12395, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED */
- { 12422, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
- { 12453, 0x00000404 }, /* GL_FRONT */
- { 12462, 0x00000408 }, /* GL_FRONT_AND_BACK */
- { 12480, 0x00000B46 }, /* GL_FRONT_FACE */
- { 12494, 0x00000400 }, /* GL_FRONT_LEFT */
- { 12508, 0x00000401 }, /* GL_FRONT_RIGHT */
- { 12523, 0x00008006 }, /* GL_FUNC_ADD */
- { 12535, 0x00008006 }, /* GL_FUNC_ADD_EXT */
- { 12551, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
- { 12576, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
- { 12605, 0x0000800A }, /* GL_FUNC_SUBTRACT */
- { 12622, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
- { 12643, 0x00008191 }, /* GL_GENERATE_MIPMAP */
- { 12662, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
- { 12686, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
- { 12715, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
- { 12739, 0x00000206 }, /* GL_GEQUAL */
- { 12749, 0x00000204 }, /* GL_GREATER */
- { 12760, 0x00001904 }, /* GL_GREEN */
- { 12769, 0x00000D19 }, /* GL_GREEN_BIAS */
- { 12783, 0x00000D53 }, /* GL_GREEN_BITS */
- { 12797, 0x00000D18 }, /* GL_GREEN_SCALE */
- { 12812, 0x0000140B }, /* GL_HALF_FLOAT */
- { 12826, 0x00008000 }, /* GL_HINT_BIT */
- { 12838, 0x00008024 }, /* GL_HISTOGRAM */
- { 12851, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
- { 12875, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
- { 12903, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
- { 12926, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
- { 12953, 0x00008024 }, /* GL_HISTOGRAM_EXT */
- { 12970, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
- { 12990, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
- { 13014, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
- { 13038, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
- { 13066, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
- { 13094, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
- { 13126, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
- { 13148, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
- { 13174, 0x0000802D }, /* GL_HISTOGRAM_SINK */
- { 13192, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
- { 13214, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
- { 13233, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
- { 13256, 0x0000862A }, /* GL_IDENTITY_NV */
- { 13271, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
- { 13291, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
- { 13331, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
- { 13369, 0x00001E02 }, /* GL_INCR */
- { 13377, 0x00008507 }, /* GL_INCR_WRAP */
- { 13390, 0x00008507 }, /* GL_INCR_WRAP_EXT */
- { 13407, 0x00008222 }, /* GL_INDEX */
- { 13416, 0x00008077 }, /* GL_INDEX_ARRAY */
- { 13431, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
- { 13461, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
- { 13495, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
- { 13518, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
- { 13540, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
- { 13560, 0x00000D51 }, /* GL_INDEX_BITS */
- { 13574, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
- { 13595, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
- { 13613, 0x00000C30 }, /* GL_INDEX_MODE */
- { 13627, 0x00000D13 }, /* GL_INDEX_OFFSET */
- { 13643, 0x00000D12 }, /* GL_INDEX_SHIFT */
- { 13658, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
- { 13677, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
- { 13696, 0x00001404 }, /* GL_INT */
- { 13703, 0x00008049 }, /* GL_INTENSITY */
- { 13716, 0x0000804C }, /* GL_INTENSITY12 */
- { 13731, 0x0000804C }, /* GL_INTENSITY12_EXT */
- { 13750, 0x0000804D }, /* GL_INTENSITY16 */
- { 13765, 0x0000804D }, /* GL_INTENSITY16_EXT */
- { 13784, 0x0000804A }, /* GL_INTENSITY4 */
- { 13798, 0x0000804A }, /* GL_INTENSITY4_EXT */
- { 13816, 0x0000804B }, /* GL_INTENSITY8 */
- { 13830, 0x0000804B }, /* GL_INTENSITY8_EXT */
- { 13848, 0x00008049 }, /* GL_INTENSITY_EXT */
- { 13865, 0x00008575 }, /* GL_INTERPOLATE */
- { 13880, 0x00008575 }, /* GL_INTERPOLATE_ARB */
- { 13899, 0x00008575 }, /* GL_INTERPOLATE_EXT */
- { 13918, 0x00008B53 }, /* GL_INT_VEC2 */
- { 13930, 0x00008B53 }, /* GL_INT_VEC2_ARB */
- { 13946, 0x00008B54 }, /* GL_INT_VEC3 */
- { 13958, 0x00008B54 }, /* GL_INT_VEC3_ARB */
- { 13974, 0x00008B55 }, /* GL_INT_VEC4 */
- { 13986, 0x00008B55 }, /* GL_INT_VEC4_ARB */
- { 14002, 0x00000500 }, /* GL_INVALID_ENUM */
- { 14018, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION */
- { 14051, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
- { 14088, 0x00000502 }, /* GL_INVALID_OPERATION */
- { 14109, 0x00000501 }, /* GL_INVALID_VALUE */
- { 14126, 0x0000862B }, /* GL_INVERSE_NV */
- { 14140, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
- { 14164, 0x0000150A }, /* GL_INVERT */
- { 14174, 0x00001E00 }, /* GL_KEEP */
- { 14182, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION */
- { 14208, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION_EXT */
- { 14238, 0x00000406 }, /* GL_LEFT */
- { 14246, 0x00000203 }, /* GL_LEQUAL */
- { 14256, 0x00000201 }, /* GL_LESS */
- { 14264, 0x00004000 }, /* GL_LIGHT0 */
- { 14274, 0x00004001 }, /* GL_LIGHT1 */
- { 14284, 0x00004002 }, /* GL_LIGHT2 */
- { 14294, 0x00004003 }, /* GL_LIGHT3 */
- { 14304, 0x00004004 }, /* GL_LIGHT4 */
- { 14314, 0x00004005 }, /* GL_LIGHT5 */
- { 14324, 0x00004006 }, /* GL_LIGHT6 */
- { 14334, 0x00004007 }, /* GL_LIGHT7 */
- { 14344, 0x00000B50 }, /* GL_LIGHTING */
- { 14356, 0x00000040 }, /* GL_LIGHTING_BIT */
- { 14372, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
- { 14395, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
- { 14424, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
- { 14457, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
- { 14485, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
- { 14509, 0x00001B01 }, /* GL_LINE */
- { 14517, 0x00002601 }, /* GL_LINEAR */
- { 14527, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
- { 14549, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
- { 14579, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
- { 14610, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
- { 14634, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
- { 14659, 0x00000001 }, /* GL_LINES */
- { 14668, 0x00000004 }, /* GL_LINE_BIT */
- { 14680, 0x00000002 }, /* GL_LINE_LOOP */
- { 14693, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
- { 14713, 0x00000B20 }, /* GL_LINE_SMOOTH */
- { 14728, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
- { 14748, 0x00000B24 }, /* GL_LINE_STIPPLE */
- { 14764, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
- { 14788, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
- { 14811, 0x00000003 }, /* GL_LINE_STRIP */
- { 14825, 0x00000702 }, /* GL_LINE_TOKEN */
- { 14839, 0x00000B21 }, /* GL_LINE_WIDTH */
- { 14853, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
- { 14879, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
- { 14899, 0x00008B82 }, /* GL_LINK_STATUS */
- { 14914, 0x00000B32 }, /* GL_LIST_BASE */
- { 14927, 0x00020000 }, /* GL_LIST_BIT */
- { 14939, 0x00000B33 }, /* GL_LIST_INDEX */
- { 14953, 0x00000B30 }, /* GL_LIST_MODE */
- { 14966, 0x00000101 }, /* GL_LOAD */
- { 14974, 0x00000BF1 }, /* GL_LOGIC_OP */
- { 14986, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
- { 15003, 0x00008CA1 }, /* GL_LOWER_LEFT */
- { 15017, 0x00001909 }, /* GL_LUMINANCE */
- { 15030, 0x00008041 }, /* GL_LUMINANCE12 */
- { 15045, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
- { 15068, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
- { 15095, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
- { 15117, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
- { 15143, 0x00008041 }, /* GL_LUMINANCE12_EXT */
- { 15162, 0x00008042 }, /* GL_LUMINANCE16 */
- { 15177, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
- { 15200, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
- { 15227, 0x00008042 }, /* GL_LUMINANCE16_EXT */
- { 15246, 0x0000803F }, /* GL_LUMINANCE4 */
- { 15260, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
- { 15281, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
- { 15306, 0x0000803F }, /* GL_LUMINANCE4_EXT */
- { 15324, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
- { 15345, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
- { 15370, 0x00008040 }, /* GL_LUMINANCE8 */
- { 15384, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
- { 15405, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
- { 15430, 0x00008040 }, /* GL_LUMINANCE8_EXT */
- { 15448, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
- { 15467, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
- { 15483, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
- { 15503, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
- { 15525, 0x00000D91 }, /* GL_MAP1_INDEX */
- { 15539, 0x00000D92 }, /* GL_MAP1_NORMAL */
- { 15554, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
- { 15578, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
- { 15602, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
- { 15626, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
- { 15650, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
- { 15667, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
- { 15684, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
- { 15712, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
- { 15741, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
- { 15770, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
- { 15799, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
- { 15828, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
- { 15857, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
- { 15886, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
- { 15914, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
- { 15942, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
- { 15970, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
- { 15998, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
- { 16026, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
- { 16054, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
- { 16082, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
- { 16110, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
- { 16138, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
- { 16154, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
- { 16174, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
- { 16196, 0x00000DB1 }, /* GL_MAP2_INDEX */
- { 16210, 0x00000DB2 }, /* GL_MAP2_NORMAL */
- { 16225, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
- { 16249, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
- { 16273, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
- { 16297, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
- { 16321, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
- { 16338, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
- { 16355, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
- { 16383, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
- { 16412, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
- { 16441, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
- { 16470, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
- { 16499, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
- { 16528, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
- { 16557, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
- { 16585, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
- { 16613, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
- { 16641, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
- { 16669, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
- { 16697, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
- { 16725, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
- { 16753, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
- { 16781, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
- { 16809, 0x00000D10 }, /* GL_MAP_COLOR */
- { 16822, 0x00000010 }, /* GL_MAP_FLUSH_EXPLICIT_BIT */
- { 16848, 0x00000008 }, /* GL_MAP_INVALIDATE_BUFFER_BIT */
- { 16877, 0x00000004 }, /* GL_MAP_INVALIDATE_RANGE_BIT */
- { 16905, 0x00000001 }, /* GL_MAP_READ_BIT */
- { 16921, 0x00000D11 }, /* GL_MAP_STENCIL */
- { 16936, 0x00000020 }, /* GL_MAP_UNSYNCHRONIZED_BIT */
- { 16962, 0x00000002 }, /* GL_MAP_WRITE_BIT */
- { 16979, 0x000088C0 }, /* GL_MATRIX0_ARB */
- { 16994, 0x00008630 }, /* GL_MATRIX0_NV */
- { 17008, 0x000088CA }, /* GL_MATRIX10_ARB */
- { 17024, 0x000088CB }, /* GL_MATRIX11_ARB */
- { 17040, 0x000088CC }, /* GL_MATRIX12_ARB */
- { 17056, 0x000088CD }, /* GL_MATRIX13_ARB */
- { 17072, 0x000088CE }, /* GL_MATRIX14_ARB */
- { 17088, 0x000088CF }, /* GL_MATRIX15_ARB */
- { 17104, 0x000088D0 }, /* GL_MATRIX16_ARB */
- { 17120, 0x000088D1 }, /* GL_MATRIX17_ARB */
- { 17136, 0x000088D2 }, /* GL_MATRIX18_ARB */
- { 17152, 0x000088D3 }, /* GL_MATRIX19_ARB */
- { 17168, 0x000088C1 }, /* GL_MATRIX1_ARB */
- { 17183, 0x00008631 }, /* GL_MATRIX1_NV */
- { 17197, 0x000088D4 }, /* GL_MATRIX20_ARB */
- { 17213, 0x000088D5 }, /* GL_MATRIX21_ARB */
- { 17229, 0x000088D6 }, /* GL_MATRIX22_ARB */
- { 17245, 0x000088D7 }, /* GL_MATRIX23_ARB */
- { 17261, 0x000088D8 }, /* GL_MATRIX24_ARB */
- { 17277, 0x000088D9 }, /* GL_MATRIX25_ARB */
- { 17293, 0x000088DA }, /* GL_MATRIX26_ARB */
- { 17309, 0x000088DB }, /* GL_MATRIX27_ARB */
- { 17325, 0x000088DC }, /* GL_MATRIX28_ARB */
- { 17341, 0x000088DD }, /* GL_MATRIX29_ARB */
- { 17357, 0x000088C2 }, /* GL_MATRIX2_ARB */
- { 17372, 0x00008632 }, /* GL_MATRIX2_NV */
- { 17386, 0x000088DE }, /* GL_MATRIX30_ARB */
- { 17402, 0x000088DF }, /* GL_MATRIX31_ARB */
- { 17418, 0x000088C3 }, /* GL_MATRIX3_ARB */
- { 17433, 0x00008633 }, /* GL_MATRIX3_NV */
- { 17447, 0x000088C4 }, /* GL_MATRIX4_ARB */
- { 17462, 0x00008634 }, /* GL_MATRIX4_NV */
- { 17476, 0x000088C5 }, /* GL_MATRIX5_ARB */
- { 17491, 0x00008635 }, /* GL_MATRIX5_NV */
- { 17505, 0x000088C6 }, /* GL_MATRIX6_ARB */
- { 17520, 0x00008636 }, /* GL_MATRIX6_NV */
- { 17534, 0x000088C7 }, /* GL_MATRIX7_ARB */
- { 17549, 0x00008637 }, /* GL_MATRIX7_NV */
- { 17563, 0x000088C8 }, /* GL_MATRIX8_ARB */
- { 17578, 0x000088C9 }, /* GL_MATRIX9_ARB */
- { 17593, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
- { 17619, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
- { 17653, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
- { 17684, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
- { 17717, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
- { 17748, 0x00000BA0 }, /* GL_MATRIX_MODE */
- { 17763, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
- { 17785, 0x00008008 }, /* GL_MAX */
- { 17792, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
- { 17815, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
- { 17847, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
- { 17873, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
- { 17906, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
- { 17932, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- { 17966, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
- { 17985, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS */
- { 18010, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
- { 18039, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
- { 18071, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
- { 18107, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
- { 18143, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
- { 18183, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
- { 18209, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
- { 18239, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
- { 18264, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
- { 18293, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
- { 18322, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
- { 18355, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
- { 18375, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
- { 18399, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
- { 18423, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
- { 18447, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
- { 18472, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
- { 18490, 0x00008008 }, /* GL_MAX_EXT */
- { 18501, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
- { 18536, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
- { 18575, 0x00000D31 }, /* GL_MAX_LIGHTS */
- { 18589, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
- { 18609, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
- { 18647, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
- { 18676, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
- { 18700, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
- { 18728, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
- { 18751, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
- { 18788, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
- { 18824, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
- { 18851, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
- { 18880, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
- { 18914, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
- { 18950, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
- { 18977, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
- { 19009, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
- { 19045, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
- { 19074, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
- { 19103, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
- { 19131, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
- { 19169, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- { 19213, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- { 19256, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
- { 19290, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- { 19329, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
- { 19366, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
- { 19404, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- { 19447, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- { 19490, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
- { 19520, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
- { 19551, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
- { 19587, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
- { 19623, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
- { 19653, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
- { 19687, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
- { 19720, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE */
- { 19745, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
- { 19774, 0x00008D57 }, /* GL_MAX_SAMPLES */
- { 19789, 0x00008D57 }, /* GL_MAX_SAMPLES_EXT */
- { 19808, 0x00009111 }, /* GL_MAX_SERVER_WAIT_TIMEOUT */
- { 19835, 0x00008504 }, /* GL_MAX_SHININESS_NV */
- { 19855, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
- { 19879, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
- { 19901, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
- { 19927, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
- { 19954, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
- { 19985, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
- { 20009, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
- { 20043, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
- { 20063, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
- { 20090, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
- { 20111, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
- { 20136, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
- { 20161, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
- { 20196, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
- { 20218, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
- { 20244, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
- { 20266, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
- { 20292, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
- { 20326, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
- { 20364, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
- { 20397, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
- { 20434, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
- { 20458, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
- { 20479, 0x00008007 }, /* GL_MIN */
- { 20486, 0x0000802E }, /* GL_MINMAX */
- { 20496, 0x0000802E }, /* GL_MINMAX_EXT */
- { 20510, 0x0000802F }, /* GL_MINMAX_FORMAT */
- { 20527, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
- { 20548, 0x00008030 }, /* GL_MINMAX_SINK */
- { 20563, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
- { 20582, 0x00008007 }, /* GL_MIN_EXT */
- { 20593, 0x00008370 }, /* GL_MIRRORED_REPEAT */
- { 20612, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
- { 20635, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
- { 20658, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
- { 20678, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
- { 20698, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
- { 20728, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
- { 20756, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
- { 20784, 0x00001700 }, /* GL_MODELVIEW */
- { 20797, 0x00001700 }, /* GL_MODELVIEW0_ARB */
- { 20815, 0x0000872A }, /* GL_MODELVIEW10_ARB */
- { 20834, 0x0000872B }, /* GL_MODELVIEW11_ARB */
- { 20853, 0x0000872C }, /* GL_MODELVIEW12_ARB */
- { 20872, 0x0000872D }, /* GL_MODELVIEW13_ARB */
- { 20891, 0x0000872E }, /* GL_MODELVIEW14_ARB */
- { 20910, 0x0000872F }, /* GL_MODELVIEW15_ARB */
- { 20929, 0x00008730 }, /* GL_MODELVIEW16_ARB */
- { 20948, 0x00008731 }, /* GL_MODELVIEW17_ARB */
- { 20967, 0x00008732 }, /* GL_MODELVIEW18_ARB */
- { 20986, 0x00008733 }, /* GL_MODELVIEW19_ARB */
- { 21005, 0x0000850A }, /* GL_MODELVIEW1_ARB */
- { 21023, 0x00008734 }, /* GL_MODELVIEW20_ARB */
- { 21042, 0x00008735 }, /* GL_MODELVIEW21_ARB */
- { 21061, 0x00008736 }, /* GL_MODELVIEW22_ARB */
- { 21080, 0x00008737 }, /* GL_MODELVIEW23_ARB */
- { 21099, 0x00008738 }, /* GL_MODELVIEW24_ARB */
- { 21118, 0x00008739 }, /* GL_MODELVIEW25_ARB */
- { 21137, 0x0000873A }, /* GL_MODELVIEW26_ARB */
- { 21156, 0x0000873B }, /* GL_MODELVIEW27_ARB */
- { 21175, 0x0000873C }, /* GL_MODELVIEW28_ARB */
- { 21194, 0x0000873D }, /* GL_MODELVIEW29_ARB */
- { 21213, 0x00008722 }, /* GL_MODELVIEW2_ARB */
- { 21231, 0x0000873E }, /* GL_MODELVIEW30_ARB */
- { 21250, 0x0000873F }, /* GL_MODELVIEW31_ARB */
- { 21269, 0x00008723 }, /* GL_MODELVIEW3_ARB */
- { 21287, 0x00008724 }, /* GL_MODELVIEW4_ARB */
- { 21305, 0x00008725 }, /* GL_MODELVIEW5_ARB */
- { 21323, 0x00008726 }, /* GL_MODELVIEW6_ARB */
- { 21341, 0x00008727 }, /* GL_MODELVIEW7_ARB */
- { 21359, 0x00008728 }, /* GL_MODELVIEW8_ARB */
- { 21377, 0x00008729 }, /* GL_MODELVIEW9_ARB */
- { 21395, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
- { 21415, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
- { 21442, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
- { 21467, 0x00002100 }, /* GL_MODULATE */
- { 21479, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
- { 21499, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
- { 21526, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
- { 21551, 0x00000103 }, /* GL_MULT */
- { 21559, 0x0000809D }, /* GL_MULTISAMPLE */
- { 21574, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
- { 21594, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
- { 21613, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
- { 21632, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
- { 21656, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
- { 21679, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
- { 21709, 0x00002A25 }, /* GL_N3F_V3F */
- { 21720, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
- { 21740, 0x0000150E }, /* GL_NAND */
- { 21748, 0x00002600 }, /* GL_NEAREST */
- { 21759, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
- { 21790, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
- { 21822, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
- { 21847, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
- { 21873, 0x00000200 }, /* GL_NEVER */
- { 21882, 0x00001102 }, /* GL_NICEST */
- { 21892, 0x00000000 }, /* GL_NONE */
- { 21900, 0x00001505 }, /* GL_NOOP */
- { 21908, 0x00001508 }, /* GL_NOR */
- { 21915, 0x00000BA1 }, /* GL_NORMALIZE */
- { 21928, 0x00008075 }, /* GL_NORMAL_ARRAY */
- { 21944, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
- { 21975, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
- { 22010, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
- { 22034, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
- { 22057, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
- { 22078, 0x00008511 }, /* GL_NORMAL_MAP */
- { 22092, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
- { 22110, 0x00008511 }, /* GL_NORMAL_MAP_NV */
- { 22127, 0x00000205 }, /* GL_NOTEQUAL */
- { 22139, 0x00000000 }, /* GL_NO_ERROR */
- { 22151, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
- { 22185, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
- { 22223, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
- { 22255, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
- { 22297, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
- { 22327, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
- { 22367, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
- { 22398, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
- { 22427, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
- { 22455, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
- { 22485, 0x00002401 }, /* GL_OBJECT_LINEAR */
- { 22502, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
- { 22528, 0x00002501 }, /* GL_OBJECT_PLANE */
- { 22544, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
- { 22579, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
- { 22601, 0x00009112 }, /* GL_OBJECT_TYPE */
- { 22616, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
- { 22635, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
- { 22665, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
- { 22686, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
- { 22714, 0x00000001 }, /* GL_ONE */
- { 22721, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
- { 22749, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
- { 22781, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
- { 22809, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
- { 22841, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
- { 22864, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
- { 22887, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
- { 22910, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
- { 22933, 0x00008598 }, /* GL_OPERAND0_ALPHA */
- { 22951, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
- { 22973, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
- { 22995, 0x00008590 }, /* GL_OPERAND0_RGB */
- { 23011, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
- { 23031, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
- { 23051, 0x00008599 }, /* GL_OPERAND1_ALPHA */
- { 23069, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
- { 23091, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
- { 23113, 0x00008591 }, /* GL_OPERAND1_RGB */
- { 23129, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
- { 23149, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
- { 23169, 0x0000859A }, /* GL_OPERAND2_ALPHA */
- { 23187, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
- { 23209, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
- { 23231, 0x00008592 }, /* GL_OPERAND2_RGB */
- { 23247, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
- { 23267, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
- { 23287, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
- { 23308, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
- { 23327, 0x00001507 }, /* GL_OR */
- { 23333, 0x00000A01 }, /* GL_ORDER */
- { 23342, 0x0000150D }, /* GL_OR_INVERTED */
- { 23357, 0x0000150B }, /* GL_OR_REVERSE */
- { 23371, 0x00000505 }, /* GL_OUT_OF_MEMORY */
- { 23388, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
- { 23406, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
- { 23427, 0x00008758 }, /* GL_PACK_INVERT_MESA */
- { 23447, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
- { 23465, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
- { 23484, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
- { 23504, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
- { 23524, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
- { 23542, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
- { 23561, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
- { 23586, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
- { 23610, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
- { 23631, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
- { 23653, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
- { 23675, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
- { 23700, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
- { 23724, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
- { 23745, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
- { 23767, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
- { 23789, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
- { 23811, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
- { 23842, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
- { 23862, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
- { 23887, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
- { 23907, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
- { 23932, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
- { 23952, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
- { 23977, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
- { 23997, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
- { 24022, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
- { 24042, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
- { 24067, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
- { 24087, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
- { 24112, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
- { 24132, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
- { 24157, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
- { 24177, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
- { 24202, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
- { 24222, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
- { 24247, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
- { 24267, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
- { 24292, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
- { 24310, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER */
- { 24331, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING */
- { 24360, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
- { 24393, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
- { 24418, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER */
- { 24441, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
- { 24472, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
- { 24507, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
- { 24534, 0x00001B00 }, /* GL_POINT */
- { 24543, 0x00000000 }, /* GL_POINTS */
- { 24553, 0x00000002 }, /* GL_POINT_BIT */
- { 24566, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
- { 24596, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
- { 24630, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
- { 24664, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
- { 24699, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
- { 24728, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
- { 24761, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
- { 24794, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
- { 24828, 0x00000B11 }, /* GL_POINT_SIZE */
- { 24842, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
- { 24868, 0x00008127 }, /* GL_POINT_SIZE_MAX */
- { 24886, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
- { 24908, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
- { 24930, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
- { 24953, 0x00008126 }, /* GL_POINT_SIZE_MIN */
- { 24971, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
- { 24993, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
- { 25015, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
- { 25038, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
- { 25058, 0x00000B10 }, /* GL_POINT_SMOOTH */
- { 25074, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
- { 25095, 0x00008861 }, /* GL_POINT_SPRITE */
- { 25111, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
- { 25131, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
- { 25160, 0x00008861 }, /* GL_POINT_SPRITE_NV */
- { 25179, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
- { 25205, 0x00000701 }, /* GL_POINT_TOKEN */
- { 25220, 0x00000009 }, /* GL_POLYGON */
- { 25231, 0x00000008 }, /* GL_POLYGON_BIT */
- { 25246, 0x00000B40 }, /* GL_POLYGON_MODE */
- { 25262, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
- { 25285, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
- { 25310, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
- { 25333, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
- { 25356, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
- { 25380, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
- { 25404, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
- { 25422, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
- { 25445, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
- { 25464, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
- { 25487, 0x00000703 }, /* GL_POLYGON_TOKEN */
- { 25504, 0x00001203 }, /* GL_POSITION */
- { 25516, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
- { 25548, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
- { 25584, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
- { 25617, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
- { 25654, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
- { 25685, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
- { 25720, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
- { 25752, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
- { 25788, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
- { 25821, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
- { 25853, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
- { 25889, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
- { 25922, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
- { 25959, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
- { 25989, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
- { 26023, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
- { 26054, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
- { 26089, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
- { 26120, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
- { 26155, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
- { 26187, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
- { 26223, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
- { 26253, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
- { 26287, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
- { 26318, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
- { 26353, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
- { 26385, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
- { 26416, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
- { 26451, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
- { 26483, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
- { 26519, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
- { 26548, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
- { 26581, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
- { 26611, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
- { 26645, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
- { 26684, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
- { 26717, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
- { 26757, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
- { 26791, 0x00008578 }, /* GL_PREVIOUS */
- { 26803, 0x00008578 }, /* GL_PREVIOUS_ARB */
- { 26819, 0x00008578 }, /* GL_PREVIOUS_EXT */
- { 26835, 0x00008577 }, /* GL_PRIMARY_COLOR */
- { 26852, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
- { 26873, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
- { 26894, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
- { 26927, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
- { 26959, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
- { 26982, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
- { 27005, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
- { 27035, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
- { 27064, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
- { 27092, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
- { 27114, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
- { 27142, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
- { 27170, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
- { 27192, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
- { 27213, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- { 27253, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- { 27292, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
- { 27322, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- { 27357, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
- { 27390, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
- { 27424, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- { 27463, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- { 27502, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
- { 27524, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
- { 27550, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
- { 27574, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
- { 27597, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
- { 27619, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
- { 27640, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
- { 27661, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
- { 27688, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
- { 27720, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
- { 27752, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
- { 27787, 0x00001701 }, /* GL_PROJECTION */
- { 27801, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
- { 27822, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
- { 27848, 0x00008E4F }, /* GL_PROVOKING_VERTEX */
- { 27868, 0x00008E4F }, /* GL_PROVOKING_VERTEX_EXT */
- { 27892, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
- { 27913, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
- { 27932, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
- { 27955, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
- { 27994, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
- { 28032, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
- { 28052, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
- { 28082, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
- { 28106, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
- { 28126, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
- { 28156, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
- { 28180, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
- { 28200, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
- { 28233, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
- { 28259, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
- { 28289, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
- { 28320, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
- { 28350, 0x00002003 }, /* GL_Q */
- { 28355, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
- { 28380, 0x00000007 }, /* GL_QUADS */
- { 28389, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
- { 28433, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT */
- { 28481, 0x00008614 }, /* GL_QUAD_MESH_SUN */
- { 28498, 0x00000008 }, /* GL_QUAD_STRIP */
- { 28512, 0x00008E16 }, /* GL_QUERY_BY_REGION_NO_WAIT_NV */
- { 28542, 0x00008E15 }, /* GL_QUERY_BY_REGION_WAIT_NV */
- { 28569, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
- { 28591, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
- { 28617, 0x00008E14 }, /* GL_QUERY_NO_WAIT_NV */
- { 28637, 0x00008866 }, /* GL_QUERY_RESULT */
- { 28653, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
- { 28673, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
- { 28699, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
- { 28729, 0x00008E13 }, /* GL_QUERY_WAIT_NV */
- { 28746, 0x00002002 }, /* GL_R */
- { 28751, 0x00002A10 }, /* GL_R3_G3_B2 */
- { 28763, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
- { 28796, 0x00000C02 }, /* GL_READ_BUFFER */
- { 28811, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER */
- { 28831, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING */
- { 28859, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
- { 28891, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
- { 28915, 0x000088B8 }, /* GL_READ_ONLY */
- { 28928, 0x000088B8 }, /* GL_READ_ONLY_ARB */
- { 28945, 0x000088BA }, /* GL_READ_WRITE */
- { 28959, 0x000088BA }, /* GL_READ_WRITE_ARB */
- { 28977, 0x00001903 }, /* GL_RED */
- { 28984, 0x00008016 }, /* GL_REDUCE */
- { 28994, 0x00008016 }, /* GL_REDUCE_EXT */
- { 29008, 0x00000D15 }, /* GL_RED_BIAS */
- { 29020, 0x00000D52 }, /* GL_RED_BITS */
- { 29032, 0x00000D14 }, /* GL_RED_SCALE */
- { 29045, 0x00008512 }, /* GL_REFLECTION_MAP */
- { 29063, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
- { 29085, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
- { 29106, 0x00001C00 }, /* GL_RENDER */
- { 29116, 0x00008D41 }, /* GL_RENDERBUFFER */
- { 29132, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE */
- { 29159, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING */
- { 29183, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
- { 29211, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE */
- { 29237, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE */
- { 29264, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
- { 29284, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE */
- { 29311, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT */
- { 29334, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
- { 29361, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
- { 29393, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
- { 29429, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE */
- { 29454, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES */
- { 29478, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES_EXT */
- { 29506, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE */
- { 29535, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH */
- { 29557, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
- { 29583, 0x00001F01 }, /* GL_RENDERER */
- { 29595, 0x00000C40 }, /* GL_RENDER_MODE */
- { 29610, 0x00002901 }, /* GL_REPEAT */
- { 29620, 0x00001E01 }, /* GL_REPLACE */
- { 29631, 0x00008062 }, /* GL_REPLACE_EXT */
- { 29646, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
- { 29669, 0x0000803A }, /* GL_RESCALE_NORMAL */
- { 29687, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
- { 29709, 0x00000102 }, /* GL_RETURN */
- { 29719, 0x00001907 }, /* GL_RGB */
- { 29726, 0x00008052 }, /* GL_RGB10 */
- { 29735, 0x00008059 }, /* GL_RGB10_A2 */
- { 29747, 0x00008059 }, /* GL_RGB10_A2_EXT */
- { 29763, 0x00008052 }, /* GL_RGB10_EXT */
- { 29776, 0x00008053 }, /* GL_RGB12 */
- { 29785, 0x00008053 }, /* GL_RGB12_EXT */
- { 29798, 0x00008054 }, /* GL_RGB16 */
- { 29807, 0x00008054 }, /* GL_RGB16_EXT */
- { 29820, 0x0000804E }, /* GL_RGB2_EXT */
- { 29832, 0x0000804F }, /* GL_RGB4 */
- { 29840, 0x0000804F }, /* GL_RGB4_EXT */
- { 29852, 0x000083A1 }, /* GL_RGB4_S3TC */
- { 29865, 0x00008050 }, /* GL_RGB5 */
- { 29873, 0x00008057 }, /* GL_RGB5_A1 */
- { 29884, 0x00008057 }, /* GL_RGB5_A1_EXT */
- { 29899, 0x00008050 }, /* GL_RGB5_EXT */
- { 29911, 0x00008051 }, /* GL_RGB8 */
- { 29919, 0x00008051 }, /* GL_RGB8_EXT */
- { 29931, 0x00001908 }, /* GL_RGBA */
- { 29939, 0x0000805A }, /* GL_RGBA12 */
- { 29949, 0x0000805A }, /* GL_RGBA12_EXT */
- { 29963, 0x0000805B }, /* GL_RGBA16 */
- { 29973, 0x0000805B }, /* GL_RGBA16_EXT */
- { 29987, 0x00008055 }, /* GL_RGBA2 */
- { 29996, 0x00008055 }, /* GL_RGBA2_EXT */
- { 30009, 0x00008056 }, /* GL_RGBA4 */
- { 30018, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
- { 30037, 0x00008056 }, /* GL_RGBA4_EXT */
- { 30050, 0x000083A3 }, /* GL_RGBA4_S3TC */
- { 30064, 0x00008058 }, /* GL_RGBA8 */
- { 30073, 0x00008058 }, /* GL_RGBA8_EXT */
- { 30086, 0x00008F97 }, /* GL_RGBA8_SNORM */
- { 30101, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
- { 30119, 0x00000C31 }, /* GL_RGBA_MODE */
- { 30132, 0x000083A2 }, /* GL_RGBA_S3TC */
- { 30145, 0x00008F93 }, /* GL_RGBA_SNORM */
- { 30159, 0x000083A0 }, /* GL_RGB_S3TC */
- { 30171, 0x00008573 }, /* GL_RGB_SCALE */
- { 30184, 0x00008573 }, /* GL_RGB_SCALE_ARB */
- { 30201, 0x00008573 }, /* GL_RGB_SCALE_EXT */
- { 30218, 0x00000407 }, /* GL_RIGHT */
- { 30227, 0x00002000 }, /* GL_S */
- { 30232, 0x00008B5D }, /* GL_SAMPLER_1D */
- { 30246, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
- { 30267, 0x00008B5E }, /* GL_SAMPLER_2D */
- { 30281, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
- { 30302, 0x00008B5F }, /* GL_SAMPLER_3D */
- { 30316, 0x00008B60 }, /* GL_SAMPLER_CUBE */
- { 30332, 0x000080A9 }, /* GL_SAMPLES */
- { 30343, 0x000086B4 }, /* GL_SAMPLES_3DFX */
- { 30359, 0x000080A9 }, /* GL_SAMPLES_ARB */
- { 30374, 0x00008914 }, /* GL_SAMPLES_PASSED */
- { 30392, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
- { 30414, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
- { 30442, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
- { 30474, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
- { 30497, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
- { 30524, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
- { 30542, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
- { 30565, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
- { 30587, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
- { 30606, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
- { 30629, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
- { 30655, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
- { 30685, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
- { 30710, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
- { 30739, 0x00080000 }, /* GL_SCISSOR_BIT */
- { 30754, 0x00000C10 }, /* GL_SCISSOR_BOX */
- { 30769, 0x00000C11 }, /* GL_SCISSOR_TEST */
- { 30785, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
- { 30810, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
- { 30850, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
- { 30894, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
- { 30927, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
- { 30957, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
- { 30989, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
- { 31019, 0x00001C02 }, /* GL_SELECT */
- { 31029, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
- { 31057, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
- { 31082, 0x00008012 }, /* GL_SEPARABLE_2D */
- { 31098, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
- { 31125, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
- { 31156, 0x0000150F }, /* GL_SET */
- { 31163, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
- { 31184, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
- { 31208, 0x00008B4F }, /* GL_SHADER_TYPE */
- { 31223, 0x00000B54 }, /* GL_SHADE_MODEL */
- { 31238, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
- { 31266, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
- { 31289, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
- { 31319, 0x00001601 }, /* GL_SHININESS */
- { 31332, 0x00001402 }, /* GL_SHORT */
- { 31341, 0x00009119 }, /* GL_SIGNALED */
- { 31353, 0x00008F9C }, /* GL_SIGNED_NORMALIZED */
- { 31374, 0x000081F9 }, /* GL_SINGLE_COLOR */
- { 31390, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
- { 31410, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
- { 31429, 0x00008C46 }, /* GL_SLUMINANCE */
- { 31443, 0x00008C47 }, /* GL_SLUMINANCE8 */
- { 31458, 0x00008C45 }, /* GL_SLUMINANCE8_ALPHA8 */
- { 31480, 0x00008C44 }, /* GL_SLUMINANCE_ALPHA */
- { 31500, 0x00001D01 }, /* GL_SMOOTH */
- { 31510, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
- { 31543, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
- { 31570, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
- { 31603, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
- { 31630, 0x00008588 }, /* GL_SOURCE0_ALPHA */
- { 31647, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
- { 31668, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
- { 31689, 0x00008580 }, /* GL_SOURCE0_RGB */
- { 31704, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
- { 31723, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
- { 31742, 0x00008589 }, /* GL_SOURCE1_ALPHA */
- { 31759, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
- { 31780, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
- { 31801, 0x00008581 }, /* GL_SOURCE1_RGB */
- { 31816, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
- { 31835, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
- { 31854, 0x0000858A }, /* GL_SOURCE2_ALPHA */
- { 31871, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
- { 31892, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
- { 31913, 0x00008582 }, /* GL_SOURCE2_RGB */
- { 31928, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
- { 31947, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
- { 31966, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
- { 31986, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
- { 32004, 0x00001202 }, /* GL_SPECULAR */
- { 32016, 0x00002402 }, /* GL_SPHERE_MAP */
- { 32030, 0x00001206 }, /* GL_SPOT_CUTOFF */
- { 32045, 0x00001204 }, /* GL_SPOT_DIRECTION */
- { 32063, 0x00001205 }, /* GL_SPOT_EXPONENT */
- { 32080, 0x00008588 }, /* GL_SRC0_ALPHA */
- { 32094, 0x00008580 }, /* GL_SRC0_RGB */
- { 32106, 0x00008589 }, /* GL_SRC1_ALPHA */
- { 32120, 0x00008581 }, /* GL_SRC1_RGB */
- { 32132, 0x0000858A }, /* GL_SRC2_ALPHA */
- { 32146, 0x00008582 }, /* GL_SRC2_RGB */
- { 32158, 0x00000302 }, /* GL_SRC_ALPHA */
- { 32171, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
- { 32193, 0x00000300 }, /* GL_SRC_COLOR */
- { 32206, 0x00008C40 }, /* GL_SRGB */
- { 32214, 0x00008C41 }, /* GL_SRGB8 */
- { 32223, 0x00008C43 }, /* GL_SRGB8_ALPHA8 */
- { 32239, 0x00008C42 }, /* GL_SRGB_ALPHA */
- { 32253, 0x00000503 }, /* GL_STACK_OVERFLOW */
- { 32271, 0x00000504 }, /* GL_STACK_UNDERFLOW */
- { 32290, 0x000088E6 }, /* GL_STATIC_COPY */
- { 32305, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
- { 32324, 0x000088E4 }, /* GL_STATIC_DRAW */
- { 32339, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
- { 32358, 0x000088E5 }, /* GL_STATIC_READ */
- { 32373, 0x000088E5 }, /* GL_STATIC_READ_ARB */
- { 32392, 0x00001802 }, /* GL_STENCIL */
- { 32403, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT */
- { 32425, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
- { 32451, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
- { 32472, 0x00008801 }, /* GL_STENCIL_BACK_FAIL_ATI */
- { 32497, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
- { 32518, 0x00008800 }, /* GL_STENCIL_BACK_FUNC_ATI */
- { 32543, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
- { 32575, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI */
- { 32611, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
- { 32643, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI */
- { 32679, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
- { 32699, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
- { 32726, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
- { 32752, 0x00000D57 }, /* GL_STENCIL_BITS */
- { 32768, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
- { 32790, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
- { 32813, 0x00000B94 }, /* GL_STENCIL_FAIL */
- { 32829, 0x00000B92 }, /* GL_STENCIL_FUNC */
- { 32845, 0x00001901 }, /* GL_STENCIL_INDEX */
- { 32862, 0x00008D46 }, /* GL_STENCIL_INDEX1 */
- { 32880, 0x00008D49 }, /* GL_STENCIL_INDEX16 */
- { 32899, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
- { 32922, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
- { 32944, 0x00008D47 }, /* GL_STENCIL_INDEX4 */
- { 32962, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
- { 32984, 0x00008D48 }, /* GL_STENCIL_INDEX8 */
- { 33002, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
- { 33024, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
- { 33045, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
- { 33072, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
- { 33099, 0x00000B97 }, /* GL_STENCIL_REF */
- { 33114, 0x00000B90 }, /* GL_STENCIL_TEST */
- { 33130, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
- { 33159, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
- { 33181, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
- { 33202, 0x00000C33 }, /* GL_STEREO */
- { 33212, 0x000085BE }, /* GL_STORAGE_CACHED_APPLE */
- { 33236, 0x000085BD }, /* GL_STORAGE_PRIVATE_APPLE */
- { 33261, 0x000085BF }, /* GL_STORAGE_SHARED_APPLE */
- { 33285, 0x000088E2 }, /* GL_STREAM_COPY */
- { 33300, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
- { 33319, 0x000088E0 }, /* GL_STREAM_DRAW */
- { 33334, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
- { 33353, 0x000088E1 }, /* GL_STREAM_READ */
- { 33368, 0x000088E1 }, /* GL_STREAM_READ_ARB */
- { 33387, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
- { 33404, 0x000084E7 }, /* GL_SUBTRACT */
- { 33416, 0x000084E7 }, /* GL_SUBTRACT_ARB */
- { 33432, 0x00009113 }, /* GL_SYNC_CONDITION */
- { 33450, 0x00009116 }, /* GL_SYNC_FENCE */
- { 33464, 0x00009115 }, /* GL_SYNC_FLAGS */
- { 33478, 0x00000001 }, /* GL_SYNC_FLUSH_COMMANDS_BIT */
- { 33505, 0x00009117 }, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
- { 33535, 0x00009114 }, /* GL_SYNC_STATUS */
- { 33550, 0x00002001 }, /* GL_T */
- { 33555, 0x00002A2A }, /* GL_T2F_C3F_V3F */
- { 33570, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
- { 33589, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
- { 33605, 0x00002A2B }, /* GL_T2F_N3F_V3F */
- { 33620, 0x00002A27 }, /* GL_T2F_V3F */
- { 33631, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
- { 33650, 0x00002A28 }, /* GL_T4F_V4F */
- { 33661, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
- { 33684, 0x00001702 }, /* GL_TEXTURE */
- { 33695, 0x000084C0 }, /* GL_TEXTURE0 */
- { 33707, 0x000084C0 }, /* GL_TEXTURE0_ARB */
- { 33723, 0x000084C1 }, /* GL_TEXTURE1 */
- { 33735, 0x000084CA }, /* GL_TEXTURE10 */
- { 33748, 0x000084CA }, /* GL_TEXTURE10_ARB */
- { 33765, 0x000084CB }, /* GL_TEXTURE11 */
- { 33778, 0x000084CB }, /* GL_TEXTURE11_ARB */
- { 33795, 0x000084CC }, /* GL_TEXTURE12 */
- { 33808, 0x000084CC }, /* GL_TEXTURE12_ARB */
- { 33825, 0x000084CD }, /* GL_TEXTURE13 */
- { 33838, 0x000084CD }, /* GL_TEXTURE13_ARB */
- { 33855, 0x000084CE }, /* GL_TEXTURE14 */
- { 33868, 0x000084CE }, /* GL_TEXTURE14_ARB */
- { 33885, 0x000084CF }, /* GL_TEXTURE15 */
- { 33898, 0x000084CF }, /* GL_TEXTURE15_ARB */
- { 33915, 0x000084D0 }, /* GL_TEXTURE16 */
- { 33928, 0x000084D0 }, /* GL_TEXTURE16_ARB */
- { 33945, 0x000084D1 }, /* GL_TEXTURE17 */
- { 33958, 0x000084D1 }, /* GL_TEXTURE17_ARB */
- { 33975, 0x000084D2 }, /* GL_TEXTURE18 */
- { 33988, 0x000084D2 }, /* GL_TEXTURE18_ARB */
- { 34005, 0x000084D3 }, /* GL_TEXTURE19 */
- { 34018, 0x000084D3 }, /* GL_TEXTURE19_ARB */
- { 34035, 0x000084C1 }, /* GL_TEXTURE1_ARB */
- { 34051, 0x000084C2 }, /* GL_TEXTURE2 */
- { 34063, 0x000084D4 }, /* GL_TEXTURE20 */
- { 34076, 0x000084D4 }, /* GL_TEXTURE20_ARB */
- { 34093, 0x000084D5 }, /* GL_TEXTURE21 */
- { 34106, 0x000084D5 }, /* GL_TEXTURE21_ARB */
- { 34123, 0x000084D6 }, /* GL_TEXTURE22 */
- { 34136, 0x000084D6 }, /* GL_TEXTURE22_ARB */
- { 34153, 0x000084D7 }, /* GL_TEXTURE23 */
- { 34166, 0x000084D7 }, /* GL_TEXTURE23_ARB */
- { 34183, 0x000084D8 }, /* GL_TEXTURE24 */
- { 34196, 0x000084D8 }, /* GL_TEXTURE24_ARB */
- { 34213, 0x000084D9 }, /* GL_TEXTURE25 */
- { 34226, 0x000084D9 }, /* GL_TEXTURE25_ARB */
- { 34243, 0x000084DA }, /* GL_TEXTURE26 */
- { 34256, 0x000084DA }, /* GL_TEXTURE26_ARB */
- { 34273, 0x000084DB }, /* GL_TEXTURE27 */
- { 34286, 0x000084DB }, /* GL_TEXTURE27_ARB */
- { 34303, 0x000084DC }, /* GL_TEXTURE28 */
- { 34316, 0x000084DC }, /* GL_TEXTURE28_ARB */
- { 34333, 0x000084DD }, /* GL_TEXTURE29 */
- { 34346, 0x000084DD }, /* GL_TEXTURE29_ARB */
- { 34363, 0x000084C2 }, /* GL_TEXTURE2_ARB */
- { 34379, 0x000084C3 }, /* GL_TEXTURE3 */
- { 34391, 0x000084DE }, /* GL_TEXTURE30 */
- { 34404, 0x000084DE }, /* GL_TEXTURE30_ARB */
- { 34421, 0x000084DF }, /* GL_TEXTURE31 */
- { 34434, 0x000084DF }, /* GL_TEXTURE31_ARB */
- { 34451, 0x000084C3 }, /* GL_TEXTURE3_ARB */
- { 34467, 0x000084C4 }, /* GL_TEXTURE4 */
- { 34479, 0x000084C4 }, /* GL_TEXTURE4_ARB */
- { 34495, 0x000084C5 }, /* GL_TEXTURE5 */
- { 34507, 0x000084C5 }, /* GL_TEXTURE5_ARB */
- { 34523, 0x000084C6 }, /* GL_TEXTURE6 */
- { 34535, 0x000084C6 }, /* GL_TEXTURE6_ARB */
- { 34551, 0x000084C7 }, /* GL_TEXTURE7 */
- { 34563, 0x000084C7 }, /* GL_TEXTURE7_ARB */
- { 34579, 0x000084C8 }, /* GL_TEXTURE8 */
- { 34591, 0x000084C8 }, /* GL_TEXTURE8_ARB */
- { 34607, 0x000084C9 }, /* GL_TEXTURE9 */
- { 34619, 0x000084C9 }, /* GL_TEXTURE9_ARB */
- { 34635, 0x00000DE0 }, /* GL_TEXTURE_1D */
- { 34649, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
- { 34673, 0x00000DE1 }, /* GL_TEXTURE_2D */
- { 34687, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
- { 34711, 0x0000806F }, /* GL_TEXTURE_3D */
- { 34725, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
- { 34747, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
- { 34773, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
- { 34795, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
- { 34817, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
- { 34849, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
- { 34871, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
- { 34903, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
- { 34925, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
- { 34953, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
- { 34985, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
- { 35018, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
- { 35050, 0x00040000 }, /* GL_TEXTURE_BIT */
- { 35065, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
- { 35086, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
- { 35111, 0x00001005 }, /* GL_TEXTURE_BORDER */
- { 35129, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
- { 35153, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
- { 35184, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
- { 35214, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
- { 35244, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
- { 35279, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
- { 35310, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- { 35348, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
- { 35375, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
- { 35407, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
- { 35441, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
- { 35465, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
- { 35493, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
- { 35517, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
- { 35545, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
- { 35578, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
- { 35602, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
- { 35624, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
- { 35646, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
- { 35672, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
- { 35706, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
- { 35739, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
- { 35776, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
- { 35804, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
- { 35836, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
- { 35859, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
- { 35897, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
- { 35939, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
- { 35970, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
- { 35998, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
- { 36028, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
- { 36056, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
- { 36076, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
- { 36100, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
- { 36131, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
- { 36166, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
- { 36197, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
- { 36232, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
- { 36263, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
- { 36298, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
- { 36329, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
- { 36364, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
- { 36395, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
- { 36430, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
- { 36461, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
- { 36496, 0x000088F4 }, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
- { 36525, 0x00008071 }, /* GL_TEXTURE_DEPTH */
- { 36542, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
- { 36564, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
- { 36590, 0x00002300 }, /* GL_TEXTURE_ENV */
- { 36605, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
- { 36626, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
- { 36646, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
- { 36672, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
- { 36692, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
- { 36709, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
- { 36726, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
- { 36743, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
- { 36760, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
- { 36785, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
- { 36807, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
- { 36833, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
- { 36851, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
- { 36877, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
- { 36903, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
- { 36933, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
- { 36960, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
- { 36985, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
- { 37005, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
- { 37029, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
- { 37056, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
- { 37083, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
- { 37110, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
- { 37136, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
- { 37166, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
- { 37188, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
- { 37206, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
- { 37236, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
- { 37264, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
- { 37292, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
- { 37320, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
- { 37341, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
- { 37360, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
- { 37382, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
- { 37401, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
- { 37421, 0x000085B7 }, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
- { 37451, 0x000085B8 }, /* GL_TEXTURE_RANGE_POINTER_APPLE */
- { 37482, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
- { 37507, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
- { 37531, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
- { 37551, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
- { 37575, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
- { 37595, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
- { 37618, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE */
- { 37642, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE_EXT */
- { 37670, 0x000085BC }, /* GL_TEXTURE_STORAGE_HINT_APPLE */
- { 37700, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
- { 37725, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
- { 37759, 0x00001000 }, /* GL_TEXTURE_WIDTH */
- { 37776, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
- { 37794, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
- { 37812, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
- { 37830, 0x0000911B }, /* GL_TIMEOUT_EXPIRED */
- { 37849, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
- { 37869, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
- { 37888, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
- { 37917, 0x00001000 }, /* GL_TRANSFORM_BIT */
- { 37934, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
- { 37960, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
- { 37990, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
- { 38022, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
- { 38052, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
- { 38086, 0x0000862C }, /* GL_TRANSPOSE_NV */
- { 38102, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
- { 38133, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
- { 38168, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
- { 38196, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
- { 38228, 0x00000004 }, /* GL_TRIANGLES */
- { 38241, 0x00000006 }, /* GL_TRIANGLE_FAN */
- { 38257, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
- { 38278, 0x00000005 }, /* GL_TRIANGLE_STRIP */
- { 38296, 0x00000001 }, /* GL_TRUE */
- { 38304, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
- { 38324, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
- { 38347, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
- { 38367, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
- { 38388, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
- { 38410, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
- { 38432, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
- { 38452, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
- { 38473, 0x00009118 }, /* GL_UNSIGNALED */
- { 38487, 0x00001401 }, /* GL_UNSIGNED_BYTE */
- { 38504, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
- { 38531, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
- { 38554, 0x00001405 }, /* GL_UNSIGNED_INT */
- { 38570, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
- { 38597, 0x000084FA }, /* GL_UNSIGNED_INT_24_8 */
- { 38618, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_EXT */
- { 38643, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
- { 38667, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
- { 38698, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
- { 38722, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
- { 38750, 0x00008C17 }, /* GL_UNSIGNED_NORMALIZED */
- { 38773, 0x00001403 }, /* GL_UNSIGNED_SHORT */
- { 38791, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
- { 38821, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
- { 38847, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
- { 38877, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
- { 38903, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
- { 38927, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
- { 38955, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
- { 38983, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
- { 39010, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
- { 39042, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
- { 39073, 0x00008CA2 }, /* GL_UPPER_LEFT */
- { 39087, 0x00002A20 }, /* GL_V2F */
- { 39094, 0x00002A21 }, /* GL_V3F */
- { 39101, 0x00008B83 }, /* GL_VALIDATE_STATUS */
- { 39120, 0x00001F00 }, /* GL_VENDOR */
- { 39130, 0x00001F02 }, /* GL_VERSION */
- { 39141, 0x00008074 }, /* GL_VERTEX_ARRAY */
- { 39157, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING */
- { 39181, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
- { 39211, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
- { 39242, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
- { 39277, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
- { 39301, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
- { 39322, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
- { 39345, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
- { 39366, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
- { 39393, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
- { 39421, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
- { 39449, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
- { 39477, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
- { 39505, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
- { 39533, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
- { 39561, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
- { 39588, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
- { 39615, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
- { 39642, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
- { 39669, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
- { 39696, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
- { 39723, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
- { 39750, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
- { 39777, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
- { 39804, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
- { 39842, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
- { 39884, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
- { 39915, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
- { 39950, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
- { 39984, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
- { 40022, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
- { 40053, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
- { 40088, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
- { 40116, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
- { 40148, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
- { 40178, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
- { 40212, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
- { 40240, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
- { 40272, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
- { 40292, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
- { 40314, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
- { 40343, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
- { 40364, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
- { 40393, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
- { 40426, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
- { 40458, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
- { 40485, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
- { 40516, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
- { 40546, 0x00008B31 }, /* GL_VERTEX_SHADER */
- { 40563, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
- { 40584, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
- { 40611, 0x00000BA2 }, /* GL_VIEWPORT */
- { 40623, 0x00000800 }, /* GL_VIEWPORT_BIT */
- { 40639, 0x0000911D }, /* GL_WAIT_FAILED */
- { 40654, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
- { 40674, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
- { 40705, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
- { 40740, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
- { 40768, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
- { 40793, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
- { 40820, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
- { 40845, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
- { 40869, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
- { 40888, 0x000088B9 }, /* GL_WRITE_ONLY */
- { 40902, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
- { 40920, 0x00001506 }, /* GL_XOR */
- { 40927, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
- { 40946, 0x00008757 }, /* GL_YCBCR_MESA */
- { 40960, 0x00000000 }, /* GL_ZERO */
- { 40968, 0x00000D16 }, /* GL_ZOOM_X */
- { 40978, 0x00000D17 }, /* GL_ZOOM_Y */
+ { 1824, 0x000085B3 }, /* GL_BUFFER_OBJECT_APPLE */
+ { 1847, 0x00008A12 }, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */
+ { 1881, 0x00008764 }, /* GL_BUFFER_SIZE */
+ { 1896, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */
+ { 1915, 0x00008765 }, /* GL_BUFFER_USAGE */
+ { 1931, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */
+ { 1951, 0x0000877B }, /* GL_BUMP_ENVMAP_ATI */
+ { 1970, 0x00008777 }, /* GL_BUMP_NUM_TEX_UNITS_ATI */
+ { 1996, 0x00008775 }, /* GL_BUMP_ROT_MATRIX_ATI */
+ { 2019, 0x00008776 }, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */
+ { 2047, 0x0000877C }, /* GL_BUMP_TARGET_ATI */
+ { 2066, 0x00008778 }, /* GL_BUMP_TEX_UNITS_ATI */
+ { 2088, 0x00001400 }, /* GL_BYTE */
+ { 2096, 0x00002A24 }, /* GL_C3F_V3F */
+ { 2107, 0x00002A26 }, /* GL_C4F_N3F_V3F */
+ { 2122, 0x00002A22 }, /* GL_C4UB_V2F */
+ { 2134, 0x00002A23 }, /* GL_C4UB_V3F */
+ { 2146, 0x00000901 }, /* GL_CCW */
+ { 2153, 0x00002900 }, /* GL_CLAMP */
+ { 2162, 0x0000812D }, /* GL_CLAMP_TO_BORDER */
+ { 2181, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */
+ { 2204, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */
+ { 2228, 0x0000812F }, /* GL_CLAMP_TO_EDGE */
+ { 2245, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */
+ { 2267, 0x00001500 }, /* GL_CLEAR */
+ { 2276, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */
+ { 2301, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */
+ { 2330, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */
+ { 2356, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
+ { 2385, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */
+ { 2411, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */
+ { 2438, 0x00003000 }, /* GL_CLIP_PLANE0 */
+ { 2453, 0x00003001 }, /* GL_CLIP_PLANE1 */
+ { 2468, 0x00003002 }, /* GL_CLIP_PLANE2 */
+ { 2483, 0x00003003 }, /* GL_CLIP_PLANE3 */
+ { 2498, 0x00003004 }, /* GL_CLIP_PLANE4 */
+ { 2513, 0x00003005 }, /* GL_CLIP_PLANE5 */
+ { 2528, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
+ { 2561, 0x00000A00 }, /* GL_COEFF */
+ { 2570, 0x00001800 }, /* GL_COLOR */
+ { 2579, 0x00008076 }, /* GL_COLOR_ARRAY */
+ { 2594, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */
+ { 2624, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */
+ { 2658, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */
+ { 2681, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */
+ { 2701, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */
+ { 2723, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */
+ { 2743, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0 */
+ { 2764, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */
+ { 2789, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1 */
+ { 2810, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10 */
+ { 2832, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */
+ { 2858, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11 */
+ { 2880, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */
+ { 2906, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12 */
+ { 2928, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */
+ { 2954, 0x00008CED }, /* GL_COLOR_ATTACHMENT13 */
+ { 2976, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */
+ { 3002, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14 */
+ { 3024, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */
+ { 3050, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15 */
+ { 3072, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */
+ { 3098, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */
+ { 3123, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2 */
+ { 3144, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */
+ { 3169, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3 */
+ { 3190, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */
+ { 3215, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4 */
+ { 3236, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */
+ { 3261, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5 */
+ { 3282, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */
+ { 3307, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6 */
+ { 3328, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */
+ { 3353, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7 */
+ { 3374, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */
+ { 3399, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8 */
+ { 3420, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */
+ { 3445, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9 */
+ { 3466, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */
+ { 3491, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */
+ { 3511, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */
+ { 3532, 0x00001900 }, /* GL_COLOR_INDEX */
+ { 3547, 0x00001603 }, /* GL_COLOR_INDEXES */
+ { 3564, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */
+ { 3582, 0x00000B57 }, /* GL_COLOR_MATERIAL */
+ { 3600, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */
+ { 3623, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */
+ { 3651, 0x000080B1 }, /* GL_COLOR_MATRIX */
+ { 3667, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */
+ { 3687, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */
+ { 3715, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */
+ { 3747, 0x00008458 }, /* GL_COLOR_SUM */
+ { 3760, 0x00008458 }, /* GL_COLOR_SUM_ARB */
+ { 3777, 0x000080D0 }, /* GL_COLOR_TABLE */
+ { 3792, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */
+ { 3818, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */
+ { 3848, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */
+ { 3878, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */
+ { 3898, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */
+ { 3922, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */
+ { 3947, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */
+ { 3976, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */
+ { 4005, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */
+ { 4027, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */
+ { 4053, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */
+ { 4079, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */
+ { 4105, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */
+ { 4135, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */
+ { 4165, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */
+ { 4195, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */
+ { 4229, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */
+ { 4263, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
+ { 4293, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */
+ { 4327, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */
+ { 4361, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */
+ { 4385, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */
+ { 4413, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */
+ { 4441, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */
+ { 4462, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */
+ { 4487, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */
+ { 4508, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */
+ { 4533, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */
+ { 4558, 0x00000C23 }, /* GL_COLOR_WRITEMASK */
+ { 4577, 0x00008570 }, /* GL_COMBINE */
+ { 4588, 0x00008503 }, /* GL_COMBINE4 */
+ { 4600, 0x00008572 }, /* GL_COMBINE_ALPHA */
+ { 4617, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */
+ { 4638, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */
+ { 4659, 0x00008570 }, /* GL_COMBINE_ARB */
+ { 4674, 0x00008570 }, /* GL_COMBINE_EXT */
+ { 4689, 0x00008571 }, /* GL_COMBINE_RGB */
+ { 4704, 0x00008571 }, /* GL_COMBINE_RGB_ARB */
+ { 4723, 0x00008571 }, /* GL_COMBINE_RGB_EXT */
+ { 4742, 0x0000884E }, /* GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT */
+ { 4778, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */
+ { 4802, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */
+ { 4830, 0x00001300 }, /* GL_COMPILE */
+ { 4841, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */
+ { 4864, 0x00008B81 }, /* GL_COMPILE_STATUS */
+ { 4882, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */
+ { 4902, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */
+ { 4926, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */
+ { 4950, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */
+ { 4978, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */
+ { 5002, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */
+ { 5032, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */
+ { 5066, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */
+ { 5094, 0x000084ED }, /* GL_COMPRESSED_RGB */
+ { 5112, 0x000084EE }, /* GL_COMPRESSED_RGBA */
+ { 5131, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */
+ { 5154, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
+ { 5183, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
+ { 5216, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
+ { 5249, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
+ { 5282, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */
+ { 5304, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */
+ { 5332, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
+ { 5364, 0x00008C4A }, /* GL_COMPRESSED_SLUMINANCE */
+ { 5389, 0x00008C4B }, /* GL_COMPRESSED_SLUMINANCE_ALPHA */
+ { 5420, 0x00008C48 }, /* GL_COMPRESSED_SRGB */
+ { 5439, 0x00008C49 }, /* GL_COMPRESSED_SRGB_ALPHA */
+ { 5464, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */
+ { 5494, 0x0000911C }, /* GL_CONDITION_SATISFIED */
+ { 5517, 0x00008576 }, /* GL_CONSTANT */
+ { 5529, 0x00008003 }, /* GL_CONSTANT_ALPHA */
+ { 5547, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */
+ { 5569, 0x00008576 }, /* GL_CONSTANT_ARB */
+ { 5585, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */
+ { 5609, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */
+ { 5631, 0x00008001 }, /* GL_CONSTANT_COLOR */
+ { 5649, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */
+ { 5671, 0x00008576 }, /* GL_CONSTANT_EXT */
+ { 5687, 0x00008010 }, /* GL_CONVOLUTION_1D */
+ { 5705, 0x00008011 }, /* GL_CONVOLUTION_2D */
+ { 5723, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */
+ { 5751, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */
+ { 5782, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */
+ { 5809, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */
+ { 5840, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */
+ { 5867, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */
+ { 5898, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */
+ { 5926, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */
+ { 5958, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */
+ { 5980, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */
+ { 6006, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */
+ { 6028, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */
+ { 6054, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */
+ { 6075, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */
+ { 6100, 0x00008862 }, /* GL_COORD_REPLACE */
+ { 6117, 0x00008862 }, /* GL_COORD_REPLACE_ARB */
+ { 6138, 0x00008862 }, /* GL_COORD_REPLACE_NV */
+ { 6158, 0x00001503 }, /* GL_COPY */
+ { 6166, 0x0000150C }, /* GL_COPY_INVERTED */
+ { 6183, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */
+ { 6203, 0x00008F36 }, /* GL_COPY_READ_BUFFER */
+ { 6223, 0x00008F37 }, /* GL_COPY_WRITE_BUFFER */
+ { 6244, 0x00000B44 }, /* GL_CULL_FACE */
+ { 6257, 0x00000B45 }, /* GL_CULL_FACE_MODE */
+ { 6275, 0x000081AA }, /* GL_CULL_VERTEX_EXT */
+ { 6294, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
+ { 6326, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
+ { 6361, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */
+ { 6382, 0x00000001 }, /* GL_CURRENT_BIT */
+ { 6397, 0x00000B00 }, /* GL_CURRENT_COLOR */
+ { 6414, 0x00008453 }, /* GL_CURRENT_FOG_COORD */
+ { 6435, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */
+ { 6461, 0x00000B01 }, /* GL_CURRENT_INDEX */
+ { 6478, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */
+ { 6500, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */
+ { 6528, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */
+ { 6549, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
+ { 6583, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */
+ { 6616, 0x00000B02 }, /* GL_CURRENT_NORMAL */
+ { 6634, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */
+ { 6664, 0x00008B8D }, /* GL_CURRENT_PROGRAM */
+ { 6683, 0x00008865 }, /* GL_CURRENT_QUERY */
+ { 6700, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */
+ { 6721, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */
+ { 6745, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */
+ { 6772, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */
+ { 6796, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */
+ { 6823, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */
+ { 6856, 0x0000845F }, /* GL_CURRENT_RASTER_SECONDARY_COLOR */
+ { 6890, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
+ { 6923, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */
+ { 6950, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */
+ { 6976, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */
+ { 7001, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */
+ { 7030, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */
+ { 7052, 0x00000900 }, /* GL_CW */
+ { 7058, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */
+ { 7079, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */
+ { 7100, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */
+ { 7120, 0x00002101 }, /* GL_DECAL */
+ { 7129, 0x00001E03 }, /* GL_DECR */
+ { 7137, 0x00008508 }, /* GL_DECR_WRAP */
+ { 7150, 0x00008508 }, /* GL_DECR_WRAP_EXT */
+ { 7167, 0x00008B80 }, /* GL_DELETE_STATUS */
+ { 7184, 0x00001801 }, /* GL_DEPTH */
+ { 7193, 0x000088F0 }, /* GL_DEPTH24_STENCIL8 */
+ { 7213, 0x000088F0 }, /* GL_DEPTH24_STENCIL8_EXT */
+ { 7237, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT */
+ { 7257, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
+ { 7281, 0x00000D1F }, /* GL_DEPTH_BIAS */
+ { 7295, 0x00000D56 }, /* GL_DEPTH_BITS */
+ { 7309, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
+ { 7329, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
+ { 7354, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
+ { 7374, 0x0000864F }, /* GL_DEPTH_CLAMP */
+ { 7389, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
+ { 7407, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
+ { 7428, 0x00001902 }, /* GL_DEPTH_COMPONENT */
+ { 7447, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
+ { 7468, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
+ { 7493, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
+ { 7519, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
+ { 7540, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
+ { 7565, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
+ { 7591, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
+ { 7612, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
+ { 7637, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
+ { 7663, 0x00000B74 }, /* GL_DEPTH_FUNC */
+ { 7677, 0x00000B70 }, /* GL_DEPTH_RANGE */
+ { 7692, 0x00000D1E }, /* GL_DEPTH_SCALE */
+ { 7707, 0x000084F9 }, /* GL_DEPTH_STENCIL */
+ { 7724, 0x0000821A }, /* GL_DEPTH_STENCIL_ATTACHMENT */
+ { 7752, 0x000084F9 }, /* GL_DEPTH_STENCIL_EXT */
+ { 7773, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
+ { 7793, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
+ { 7821, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
+ { 7849, 0x00000B71 }, /* GL_DEPTH_TEST */
+ { 7863, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
+ { 7885, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
+ { 7911, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
+ { 7930, 0x00001201 }, /* GL_DIFFUSE */
+ { 7941, 0x00000BD0 }, /* GL_DITHER */
+ { 7951, 0x00000A02 }, /* GL_DOMAIN */
+ { 7961, 0x00001100 }, /* GL_DONT_CARE */
+ { 7974, 0x000086AE }, /* GL_DOT3_RGB */
+ { 7986, 0x000086AF }, /* GL_DOT3_RGBA */
+ { 7999, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
+ { 8016, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
+ { 8033, 0x000086AE }, /* GL_DOT3_RGB_ARB */
+ { 8049, 0x00008740 }, /* GL_DOT3_RGB_EXT */
+ { 8065, 0x0000140A }, /* GL_DOUBLE */
+ { 8075, 0x00000C32 }, /* GL_DOUBLEBUFFER */
+ { 8091, 0x00000C01 }, /* GL_DRAW_BUFFER */
+ { 8106, 0x00008825 }, /* GL_DRAW_BUFFER0 */
+ { 8122, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
+ { 8142, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
+ { 8162, 0x00008826 }, /* GL_DRAW_BUFFER1 */
+ { 8178, 0x0000882F }, /* GL_DRAW_BUFFER10 */
+ { 8195, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
+ { 8216, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
+ { 8237, 0x00008830 }, /* GL_DRAW_BUFFER11 */
+ { 8254, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
+ { 8275, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
+ { 8296, 0x00008831 }, /* GL_DRAW_BUFFER12 */
+ { 8313, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
+ { 8334, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
+ { 8355, 0x00008832 }, /* GL_DRAW_BUFFER13 */
+ { 8372, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
+ { 8393, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
+ { 8414, 0x00008833 }, /* GL_DRAW_BUFFER14 */
+ { 8431, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
+ { 8452, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
+ { 8473, 0x00008834 }, /* GL_DRAW_BUFFER15 */
+ { 8490, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
+ { 8511, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
+ { 8532, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
+ { 8552, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
+ { 8572, 0x00008827 }, /* GL_DRAW_BUFFER2 */
+ { 8588, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
+ { 8608, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
+ { 8628, 0x00008828 }, /* GL_DRAW_BUFFER3 */
+ { 8644, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
+ { 8664, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
+ { 8684, 0x00008829 }, /* GL_DRAW_BUFFER4 */
+ { 8700, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
+ { 8720, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
+ { 8740, 0x0000882A }, /* GL_DRAW_BUFFER5 */
+ { 8756, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
+ { 8776, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
+ { 8796, 0x0000882B }, /* GL_DRAW_BUFFER6 */
+ { 8812, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
+ { 8832, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
+ { 8852, 0x0000882C }, /* GL_DRAW_BUFFER7 */
+ { 8868, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
+ { 8888, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
+ { 8908, 0x0000882D }, /* GL_DRAW_BUFFER8 */
+ { 8924, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
+ { 8944, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
+ { 8964, 0x0000882E }, /* GL_DRAW_BUFFER9 */
+ { 8980, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
+ { 9000, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
+ { 9020, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER */
+ { 9040, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING */
+ { 9068, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
+ { 9100, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
+ { 9124, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
+ { 9144, 0x00000304 }, /* GL_DST_ALPHA */
+ { 9157, 0x00000306 }, /* GL_DST_COLOR */
+ { 9170, 0x0000877A }, /* GL_DU8DV8_ATI */
+ { 9184, 0x00008779 }, /* GL_DUDV_ATI */
+ { 9196, 0x000088EA }, /* GL_DYNAMIC_COPY */
+ { 9212, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
+ { 9232, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
+ { 9248, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
+ { 9268, 0x000088E9 }, /* GL_DYNAMIC_READ */
+ { 9284, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
+ { 9304, 0x00000B43 }, /* GL_EDGE_FLAG */
+ { 9317, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
+ { 9336, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
+ { 9370, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
+ { 9408, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
+ { 9435, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
+ { 9461, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
+ { 9485, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
+ { 9517, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
+ { 9553, 0x00001600 }, /* GL_EMISSION */
+ { 9565, 0x00002000 }, /* GL_ENABLE_BIT */
+ { 9579, 0x00000202 }, /* GL_EQUAL */
+ { 9588, 0x00001509 }, /* GL_EQUIV */
+ { 9597, 0x00010000 }, /* GL_EVAL_BIT */
+ { 9609, 0x00000800 }, /* GL_EXP */
+ { 9616, 0x00000801 }, /* GL_EXP2 */
+ { 9624, 0x00001F03 }, /* GL_EXTENSIONS */
+ { 9638, 0x00002400 }, /* GL_EYE_LINEAR */
+ { 9652, 0x00002502 }, /* GL_EYE_PLANE */
+ { 9665, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
+ { 9690, 0x0000855B }, /* GL_EYE_RADIAL_NV */
+ { 9707, 0x00000000 }, /* GL_FALSE */
+ { 9716, 0x00001101 }, /* GL_FASTEST */
+ { 9727, 0x00001C01 }, /* GL_FEEDBACK */
+ { 9739, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
+ { 9766, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
+ { 9790, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
+ { 9814, 0x00001B02 }, /* GL_FILL */
+ { 9822, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION */
+ { 9849, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION_EXT */
+ { 9880, 0x00001D00 }, /* GL_FLAT */
+ { 9888, 0x00001406 }, /* GL_FLOAT */
+ { 9897, 0x00008B5A }, /* GL_FLOAT_MAT2 */
+ { 9911, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
+ { 9929, 0x00008B65 }, /* GL_FLOAT_MAT2x3 */
+ { 9945, 0x00008B66 }, /* GL_FLOAT_MAT2x4 */
+ { 9961, 0x00008B5B }, /* GL_FLOAT_MAT3 */
+ { 9975, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
+ { 9993, 0x00008B67 }, /* GL_FLOAT_MAT3x2 */
+ { 10009, 0x00008B68 }, /* GL_FLOAT_MAT3x4 */
+ { 10025, 0x00008B5C }, /* GL_FLOAT_MAT4 */
+ { 10039, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
+ { 10057, 0x00008B69 }, /* GL_FLOAT_MAT4x2 */
+ { 10073, 0x00008B6A }, /* GL_FLOAT_MAT4x3 */
+ { 10089, 0x00008B50 }, /* GL_FLOAT_VEC2 */
+ { 10103, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
+ { 10121, 0x00008B51 }, /* GL_FLOAT_VEC3 */
+ { 10135, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
+ { 10153, 0x00008B52 }, /* GL_FLOAT_VEC4 */
+ { 10167, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
+ { 10185, 0x00000B60 }, /* GL_FOG */
+ { 10192, 0x00000080 }, /* GL_FOG_BIT */
+ { 10203, 0x00000B66 }, /* GL_FOG_COLOR */
+ { 10216, 0x00008451 }, /* GL_FOG_COORD */
+ { 10229, 0x00008451 }, /* GL_FOG_COORDINATE */
+ { 10247, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
+ { 10271, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
+ { 10310, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
+ { 10353, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
+ { 10385, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
+ { 10416, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
+ { 10445, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
+ { 10470, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
+ { 10489, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
+ { 10523, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
+ { 10550, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
+ { 10576, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
+ { 10600, 0x00008450 }, /* GL_FOG_COORD_SRC */
+ { 10617, 0x00000B62 }, /* GL_FOG_DENSITY */
+ { 10632, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
+ { 10656, 0x00000B64 }, /* GL_FOG_END */
+ { 10667, 0x00000C54 }, /* GL_FOG_HINT */
+ { 10679, 0x00000B61 }, /* GL_FOG_INDEX */
+ { 10692, 0x00000B65 }, /* GL_FOG_MODE */
+ { 10704, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
+ { 10723, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
+ { 10748, 0x00000B63 }, /* GL_FOG_START */
+ { 10761, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
+ { 10779, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
+ { 10803, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
+ { 10822, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
+ { 10845, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
+ { 10880, 0x00008D40 }, /* GL_FRAMEBUFFER */
+ { 10895, 0x00008215 }, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
+ { 10932, 0x00008214 }, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
+ { 10968, 0x00008210 }, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
+ { 11009, 0x00008211 }, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
+ { 11050, 0x00008216 }, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
+ { 11087, 0x00008213 }, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
+ { 11124, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
+ { 11162, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
+ { 11204, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
+ { 11242, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
+ { 11284, 0x00008212 }, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
+ { 11319, 0x00008217 }, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
+ { 11358, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
+ { 11407, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
+ { 11455, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
+ { 11507, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
+ { 11547, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
+ { 11591, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
+ { 11631, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
+ { 11675, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING */
+ { 11698, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
+ { 11725, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE */
+ { 11749, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
+ { 11777, 0x00008218 }, /* GL_FRAMEBUFFER_DEFAULT */
+ { 11800, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
+ { 11819, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
+ { 11856, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
+ { 11897, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
+ { 11938, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
+ { 11976, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
+ { 12018, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
+ { 12069, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
+ { 12107, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
+ { 12152, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
+ { 12201, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
+ { 12239, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT */
+ { 12281, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
+ { 12319, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
+ { 12361, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
+ { 12393, 0x00008219 }, /* GL_FRAMEBUFFER_UNDEFINED */
+ { 12418, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED */
+ { 12445, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
+ { 12476, 0x00000404 }, /* GL_FRONT */
+ { 12485, 0x00000408 }, /* GL_FRONT_AND_BACK */
+ { 12503, 0x00000B46 }, /* GL_FRONT_FACE */
+ { 12517, 0x00000400 }, /* GL_FRONT_LEFT */
+ { 12531, 0x00000401 }, /* GL_FRONT_RIGHT */
+ { 12546, 0x00008006 }, /* GL_FUNC_ADD */
+ { 12558, 0x00008006 }, /* GL_FUNC_ADD_EXT */
+ { 12574, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
+ { 12599, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
+ { 12628, 0x0000800A }, /* GL_FUNC_SUBTRACT */
+ { 12645, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
+ { 12666, 0x00008191 }, /* GL_GENERATE_MIPMAP */
+ { 12685, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
+ { 12709, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
+ { 12738, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
+ { 12762, 0x00000206 }, /* GL_GEQUAL */
+ { 12772, 0x00000204 }, /* GL_GREATER */
+ { 12783, 0x00001904 }, /* GL_GREEN */
+ { 12792, 0x00000D19 }, /* GL_GREEN_BIAS */
+ { 12806, 0x00000D53 }, /* GL_GREEN_BITS */
+ { 12820, 0x00000D18 }, /* GL_GREEN_SCALE */
+ { 12835, 0x0000140B }, /* GL_HALF_FLOAT */
+ { 12849, 0x00008000 }, /* GL_HINT_BIT */
+ { 12861, 0x00008024 }, /* GL_HISTOGRAM */
+ { 12874, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
+ { 12898, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
+ { 12926, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
+ { 12949, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
+ { 12976, 0x00008024 }, /* GL_HISTOGRAM_EXT */
+ { 12993, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
+ { 13013, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
+ { 13037, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
+ { 13061, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
+ { 13089, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
+ { 13117, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
+ { 13149, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
+ { 13171, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
+ { 13197, 0x0000802D }, /* GL_HISTOGRAM_SINK */
+ { 13215, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
+ { 13237, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
+ { 13256, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
+ { 13279, 0x0000862A }, /* GL_IDENTITY_NV */
+ { 13294, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
+ { 13314, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
+ { 13354, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
+ { 13392, 0x00001E02 }, /* GL_INCR */
+ { 13400, 0x00008507 }, /* GL_INCR_WRAP */
+ { 13413, 0x00008507 }, /* GL_INCR_WRAP_EXT */
+ { 13430, 0x00008222 }, /* GL_INDEX */
+ { 13439, 0x00008077 }, /* GL_INDEX_ARRAY */
+ { 13454, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
+ { 13484, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
+ { 13518, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
+ { 13541, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
+ { 13563, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
+ { 13583, 0x00000D51 }, /* GL_INDEX_BITS */
+ { 13597, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
+ { 13618, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
+ { 13636, 0x00000C30 }, /* GL_INDEX_MODE */
+ { 13650, 0x00000D13 }, /* GL_INDEX_OFFSET */
+ { 13666, 0x00000D12 }, /* GL_INDEX_SHIFT */
+ { 13681, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
+ { 13700, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
+ { 13719, 0x00001404 }, /* GL_INT */
+ { 13726, 0x00008049 }, /* GL_INTENSITY */
+ { 13739, 0x0000804C }, /* GL_INTENSITY12 */
+ { 13754, 0x0000804C }, /* GL_INTENSITY12_EXT */
+ { 13773, 0x0000804D }, /* GL_INTENSITY16 */
+ { 13788, 0x0000804D }, /* GL_INTENSITY16_EXT */
+ { 13807, 0x0000804A }, /* GL_INTENSITY4 */
+ { 13821, 0x0000804A }, /* GL_INTENSITY4_EXT */
+ { 13839, 0x0000804B }, /* GL_INTENSITY8 */
+ { 13853, 0x0000804B }, /* GL_INTENSITY8_EXT */
+ { 13871, 0x00008049 }, /* GL_INTENSITY_EXT */
+ { 13888, 0x00008575 }, /* GL_INTERPOLATE */
+ { 13903, 0x00008575 }, /* GL_INTERPOLATE_ARB */
+ { 13922, 0x00008575 }, /* GL_INTERPOLATE_EXT */
+ { 13941, 0x00008B53 }, /* GL_INT_VEC2 */
+ { 13953, 0x00008B53 }, /* GL_INT_VEC2_ARB */
+ { 13969, 0x00008B54 }, /* GL_INT_VEC3 */
+ { 13981, 0x00008B54 }, /* GL_INT_VEC3_ARB */
+ { 13997, 0x00008B55 }, /* GL_INT_VEC4 */
+ { 14009, 0x00008B55 }, /* GL_INT_VEC4_ARB */
+ { 14025, 0x00000500 }, /* GL_INVALID_ENUM */
+ { 14041, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION */
+ { 14074, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
+ { 14111, 0x00000502 }, /* GL_INVALID_OPERATION */
+ { 14132, 0x00000501 }, /* GL_INVALID_VALUE */
+ { 14149, 0x0000862B }, /* GL_INVERSE_NV */
+ { 14163, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
+ { 14187, 0x0000150A }, /* GL_INVERT */
+ { 14197, 0x00001E00 }, /* GL_KEEP */
+ { 14205, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION */
+ { 14231, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION_EXT */
+ { 14261, 0x00000406 }, /* GL_LEFT */
+ { 14269, 0x00000203 }, /* GL_LEQUAL */
+ { 14279, 0x00000201 }, /* GL_LESS */
+ { 14287, 0x00004000 }, /* GL_LIGHT0 */
+ { 14297, 0x00004001 }, /* GL_LIGHT1 */
+ { 14307, 0x00004002 }, /* GL_LIGHT2 */
+ { 14317, 0x00004003 }, /* GL_LIGHT3 */
+ { 14327, 0x00004004 }, /* GL_LIGHT4 */
+ { 14337, 0x00004005 }, /* GL_LIGHT5 */
+ { 14347, 0x00004006 }, /* GL_LIGHT6 */
+ { 14357, 0x00004007 }, /* GL_LIGHT7 */
+ { 14367, 0x00000B50 }, /* GL_LIGHTING */
+ { 14379, 0x00000040 }, /* GL_LIGHTING_BIT */
+ { 14395, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
+ { 14418, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
+ { 14447, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
+ { 14480, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
+ { 14508, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
+ { 14532, 0x00001B01 }, /* GL_LINE */
+ { 14540, 0x00002601 }, /* GL_LINEAR */
+ { 14550, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
+ { 14572, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
+ { 14602, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
+ { 14633, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
+ { 14657, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
+ { 14682, 0x00000001 }, /* GL_LINES */
+ { 14691, 0x00000004 }, /* GL_LINE_BIT */
+ { 14703, 0x00000002 }, /* GL_LINE_LOOP */
+ { 14716, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
+ { 14736, 0x00000B20 }, /* GL_LINE_SMOOTH */
+ { 14751, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
+ { 14771, 0x00000B24 }, /* GL_LINE_STIPPLE */
+ { 14787, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
+ { 14811, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
+ { 14834, 0x00000003 }, /* GL_LINE_STRIP */
+ { 14848, 0x00000702 }, /* GL_LINE_TOKEN */
+ { 14862, 0x00000B21 }, /* GL_LINE_WIDTH */
+ { 14876, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
+ { 14902, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
+ { 14922, 0x00008B82 }, /* GL_LINK_STATUS */
+ { 14937, 0x00000B32 }, /* GL_LIST_BASE */
+ { 14950, 0x00020000 }, /* GL_LIST_BIT */
+ { 14962, 0x00000B33 }, /* GL_LIST_INDEX */
+ { 14976, 0x00000B30 }, /* GL_LIST_MODE */
+ { 14989, 0x00000101 }, /* GL_LOAD */
+ { 14997, 0x00000BF1 }, /* GL_LOGIC_OP */
+ { 15009, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
+ { 15026, 0x00008CA1 }, /* GL_LOWER_LEFT */
+ { 15040, 0x00001909 }, /* GL_LUMINANCE */
+ { 15053, 0x00008041 }, /* GL_LUMINANCE12 */
+ { 15068, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
+ { 15091, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
+ { 15118, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
+ { 15140, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
+ { 15166, 0x00008041 }, /* GL_LUMINANCE12_EXT */
+ { 15185, 0x00008042 }, /* GL_LUMINANCE16 */
+ { 15200, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
+ { 15223, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
+ { 15250, 0x00008042 }, /* GL_LUMINANCE16_EXT */
+ { 15269, 0x0000803F }, /* GL_LUMINANCE4 */
+ { 15283, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
+ { 15304, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
+ { 15329, 0x0000803F }, /* GL_LUMINANCE4_EXT */
+ { 15347, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
+ { 15368, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
+ { 15393, 0x00008040 }, /* GL_LUMINANCE8 */
+ { 15407, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
+ { 15428, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
+ { 15453, 0x00008040 }, /* GL_LUMINANCE8_EXT */
+ { 15471, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
+ { 15490, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
+ { 15506, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
+ { 15526, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
+ { 15548, 0x00000D91 }, /* GL_MAP1_INDEX */
+ { 15562, 0x00000D92 }, /* GL_MAP1_NORMAL */
+ { 15577, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
+ { 15601, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
+ { 15625, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
+ { 15649, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
+ { 15673, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
+ { 15690, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
+ { 15707, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
+ { 15735, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
+ { 15764, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
+ { 15793, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
+ { 15822, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
+ { 15851, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
+ { 15880, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
+ { 15909, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
+ { 15937, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
+ { 15965, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
+ { 15993, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
+ { 16021, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
+ { 16049, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
+ { 16077, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
+ { 16105, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
+ { 16133, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
+ { 16161, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
+ { 16177, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
+ { 16197, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
+ { 16219, 0x00000DB1 }, /* GL_MAP2_INDEX */
+ { 16233, 0x00000DB2 }, /* GL_MAP2_NORMAL */
+ { 16248, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
+ { 16272, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
+ { 16296, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
+ { 16320, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
+ { 16344, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
+ { 16361, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
+ { 16378, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
+ { 16406, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
+ { 16435, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
+ { 16464, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
+ { 16493, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
+ { 16522, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
+ { 16551, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
+ { 16580, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
+ { 16608, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
+ { 16636, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
+ { 16664, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
+ { 16692, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
+ { 16720, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
+ { 16748, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
+ { 16776, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
+ { 16804, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
+ { 16832, 0x00000D10 }, /* GL_MAP_COLOR */
+ { 16845, 0x00000010 }, /* GL_MAP_FLUSH_EXPLICIT_BIT */
+ { 16871, 0x00000008 }, /* GL_MAP_INVALIDATE_BUFFER_BIT */
+ { 16900, 0x00000004 }, /* GL_MAP_INVALIDATE_RANGE_BIT */
+ { 16928, 0x00000001 }, /* GL_MAP_READ_BIT */
+ { 16944, 0x00000D11 }, /* GL_MAP_STENCIL */
+ { 16959, 0x00000020 }, /* GL_MAP_UNSYNCHRONIZED_BIT */
+ { 16985, 0x00000002 }, /* GL_MAP_WRITE_BIT */
+ { 17002, 0x000088C0 }, /* GL_MATRIX0_ARB */
+ { 17017, 0x00008630 }, /* GL_MATRIX0_NV */
+ { 17031, 0x000088CA }, /* GL_MATRIX10_ARB */
+ { 17047, 0x000088CB }, /* GL_MATRIX11_ARB */
+ { 17063, 0x000088CC }, /* GL_MATRIX12_ARB */
+ { 17079, 0x000088CD }, /* GL_MATRIX13_ARB */
+ { 17095, 0x000088CE }, /* GL_MATRIX14_ARB */
+ { 17111, 0x000088CF }, /* GL_MATRIX15_ARB */
+ { 17127, 0x000088D0 }, /* GL_MATRIX16_ARB */
+ { 17143, 0x000088D1 }, /* GL_MATRIX17_ARB */
+ { 17159, 0x000088D2 }, /* GL_MATRIX18_ARB */
+ { 17175, 0x000088D3 }, /* GL_MATRIX19_ARB */
+ { 17191, 0x000088C1 }, /* GL_MATRIX1_ARB */
+ { 17206, 0x00008631 }, /* GL_MATRIX1_NV */
+ { 17220, 0x000088D4 }, /* GL_MATRIX20_ARB */
+ { 17236, 0x000088D5 }, /* GL_MATRIX21_ARB */
+ { 17252, 0x000088D6 }, /* GL_MATRIX22_ARB */
+ { 17268, 0x000088D7 }, /* GL_MATRIX23_ARB */
+ { 17284, 0x000088D8 }, /* GL_MATRIX24_ARB */
+ { 17300, 0x000088D9 }, /* GL_MATRIX25_ARB */
+ { 17316, 0x000088DA }, /* GL_MATRIX26_ARB */
+ { 17332, 0x000088DB }, /* GL_MATRIX27_ARB */
+ { 17348, 0x000088DC }, /* GL_MATRIX28_ARB */
+ { 17364, 0x000088DD }, /* GL_MATRIX29_ARB */
+ { 17380, 0x000088C2 }, /* GL_MATRIX2_ARB */
+ { 17395, 0x00008632 }, /* GL_MATRIX2_NV */
+ { 17409, 0x000088DE }, /* GL_MATRIX30_ARB */
+ { 17425, 0x000088DF }, /* GL_MATRIX31_ARB */
+ { 17441, 0x000088C3 }, /* GL_MATRIX3_ARB */
+ { 17456, 0x00008633 }, /* GL_MATRIX3_NV */
+ { 17470, 0x000088C4 }, /* GL_MATRIX4_ARB */
+ { 17485, 0x00008634 }, /* GL_MATRIX4_NV */
+ { 17499, 0x000088C5 }, /* GL_MATRIX5_ARB */
+ { 17514, 0x00008635 }, /* GL_MATRIX5_NV */
+ { 17528, 0x000088C6 }, /* GL_MATRIX6_ARB */
+ { 17543, 0x00008636 }, /* GL_MATRIX6_NV */
+ { 17557, 0x000088C7 }, /* GL_MATRIX7_ARB */
+ { 17572, 0x00008637 }, /* GL_MATRIX7_NV */
+ { 17586, 0x000088C8 }, /* GL_MATRIX8_ARB */
+ { 17601, 0x000088C9 }, /* GL_MATRIX9_ARB */
+ { 17616, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
+ { 17642, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
+ { 17676, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
+ { 17707, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
+ { 17740, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
+ { 17771, 0x00000BA0 }, /* GL_MATRIX_MODE */
+ { 17786, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
+ { 17808, 0x00008008 }, /* GL_MAX */
+ { 17815, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
+ { 17838, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
+ { 17870, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
+ { 17896, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
+ { 17929, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
+ { 17955, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ { 17989, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
+ { 18008, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS */
+ { 18033, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
+ { 18062, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
+ { 18094, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
+ { 18130, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
+ { 18166, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
+ { 18206, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
+ { 18232, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
+ { 18262, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
+ { 18287, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
+ { 18316, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
+ { 18345, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
+ { 18378, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
+ { 18398, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
+ { 18422, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
+ { 18446, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
+ { 18470, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
+ { 18495, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
+ { 18513, 0x00008008 }, /* GL_MAX_EXT */
+ { 18524, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
+ { 18559, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
+ { 18598, 0x00000D31 }, /* GL_MAX_LIGHTS */
+ { 18612, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
+ { 18632, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
+ { 18670, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
+ { 18699, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
+ { 18723, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
+ { 18751, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
+ { 18774, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
+ { 18811, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ { 18847, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
+ { 18874, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
+ { 18903, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
+ { 18937, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
+ { 18973, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
+ { 19000, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
+ { 19032, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
+ { 19068, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
+ { 19097, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
+ { 19126, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
+ { 19154, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
+ { 19192, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ { 19236, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ { 19279, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
+ { 19313, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ { 19352, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
+ { 19389, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ { 19427, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ { 19470, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ { 19513, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
+ { 19543, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
+ { 19574, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
+ { 19610, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ { 19646, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
+ { 19676, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
+ { 19710, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
+ { 19743, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE */
+ { 19768, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
+ { 19797, 0x00008D57 }, /* GL_MAX_SAMPLES */
+ { 19812, 0x00008D57 }, /* GL_MAX_SAMPLES_EXT */
+ { 19831, 0x00009111 }, /* GL_MAX_SERVER_WAIT_TIMEOUT */
+ { 19858, 0x00008504 }, /* GL_MAX_SHININESS_NV */
+ { 19878, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
+ { 19902, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
+ { 19924, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
+ { 19950, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
+ { 19977, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
+ { 20008, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
+ { 20032, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
+ { 20066, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
+ { 20086, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
+ { 20113, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
+ { 20134, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
+ { 20159, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
+ { 20184, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
+ { 20219, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
+ { 20241, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
+ { 20267, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
+ { 20289, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
+ { 20315, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
+ { 20349, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
+ { 20387, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
+ { 20420, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
+ { 20457, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
+ { 20481, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
+ { 20502, 0x00008007 }, /* GL_MIN */
+ { 20509, 0x0000802E }, /* GL_MINMAX */
+ { 20519, 0x0000802E }, /* GL_MINMAX_EXT */
+ { 20533, 0x0000802F }, /* GL_MINMAX_FORMAT */
+ { 20550, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
+ { 20571, 0x00008030 }, /* GL_MINMAX_SINK */
+ { 20586, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
+ { 20605, 0x00008007 }, /* GL_MIN_EXT */
+ { 20616, 0x00008370 }, /* GL_MIRRORED_REPEAT */
+ { 20635, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
+ { 20658, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
+ { 20681, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
+ { 20701, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
+ { 20721, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
+ { 20751, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
+ { 20779, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
+ { 20807, 0x00001700 }, /* GL_MODELVIEW */
+ { 20820, 0x00001700 }, /* GL_MODELVIEW0_ARB */
+ { 20838, 0x0000872A }, /* GL_MODELVIEW10_ARB */
+ { 20857, 0x0000872B }, /* GL_MODELVIEW11_ARB */
+ { 20876, 0x0000872C }, /* GL_MODELVIEW12_ARB */
+ { 20895, 0x0000872D }, /* GL_MODELVIEW13_ARB */
+ { 20914, 0x0000872E }, /* GL_MODELVIEW14_ARB */
+ { 20933, 0x0000872F }, /* GL_MODELVIEW15_ARB */
+ { 20952, 0x00008730 }, /* GL_MODELVIEW16_ARB */
+ { 20971, 0x00008731 }, /* GL_MODELVIEW17_ARB */
+ { 20990, 0x00008732 }, /* GL_MODELVIEW18_ARB */
+ { 21009, 0x00008733 }, /* GL_MODELVIEW19_ARB */
+ { 21028, 0x0000850A }, /* GL_MODELVIEW1_ARB */
+ { 21046, 0x00008734 }, /* GL_MODELVIEW20_ARB */
+ { 21065, 0x00008735 }, /* GL_MODELVIEW21_ARB */
+ { 21084, 0x00008736 }, /* GL_MODELVIEW22_ARB */
+ { 21103, 0x00008737 }, /* GL_MODELVIEW23_ARB */
+ { 21122, 0x00008738 }, /* GL_MODELVIEW24_ARB */
+ { 21141, 0x00008739 }, /* GL_MODELVIEW25_ARB */
+ { 21160, 0x0000873A }, /* GL_MODELVIEW26_ARB */
+ { 21179, 0x0000873B }, /* GL_MODELVIEW27_ARB */
+ { 21198, 0x0000873C }, /* GL_MODELVIEW28_ARB */
+ { 21217, 0x0000873D }, /* GL_MODELVIEW29_ARB */
+ { 21236, 0x00008722 }, /* GL_MODELVIEW2_ARB */
+ { 21254, 0x0000873E }, /* GL_MODELVIEW30_ARB */
+ { 21273, 0x0000873F }, /* GL_MODELVIEW31_ARB */
+ { 21292, 0x00008723 }, /* GL_MODELVIEW3_ARB */
+ { 21310, 0x00008724 }, /* GL_MODELVIEW4_ARB */
+ { 21328, 0x00008725 }, /* GL_MODELVIEW5_ARB */
+ { 21346, 0x00008726 }, /* GL_MODELVIEW6_ARB */
+ { 21364, 0x00008727 }, /* GL_MODELVIEW7_ARB */
+ { 21382, 0x00008728 }, /* GL_MODELVIEW8_ARB */
+ { 21400, 0x00008729 }, /* GL_MODELVIEW9_ARB */
+ { 21418, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
+ { 21438, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
+ { 21465, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
+ { 21490, 0x00002100 }, /* GL_MODULATE */
+ { 21502, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
+ { 21522, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
+ { 21549, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
+ { 21574, 0x00000103 }, /* GL_MULT */
+ { 21582, 0x0000809D }, /* GL_MULTISAMPLE */
+ { 21597, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
+ { 21617, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
+ { 21636, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
+ { 21655, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
+ { 21679, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
+ { 21702, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
+ { 21732, 0x00002A25 }, /* GL_N3F_V3F */
+ { 21743, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
+ { 21763, 0x0000150E }, /* GL_NAND */
+ { 21771, 0x00002600 }, /* GL_NEAREST */
+ { 21782, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
+ { 21813, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
+ { 21845, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
+ { 21870, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
+ { 21896, 0x00000200 }, /* GL_NEVER */
+ { 21905, 0x00001102 }, /* GL_NICEST */
+ { 21915, 0x00000000 }, /* GL_NONE */
+ { 21923, 0x00001505 }, /* GL_NOOP */
+ { 21931, 0x00001508 }, /* GL_NOR */
+ { 21938, 0x00000BA1 }, /* GL_NORMALIZE */
+ { 21951, 0x00008075 }, /* GL_NORMAL_ARRAY */
+ { 21967, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
+ { 21998, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
+ { 22033, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
+ { 22057, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
+ { 22080, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
+ { 22101, 0x00008511 }, /* GL_NORMAL_MAP */
+ { 22115, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
+ { 22133, 0x00008511 }, /* GL_NORMAL_MAP_NV */
+ { 22150, 0x00000205 }, /* GL_NOTEQUAL */
+ { 22162, 0x00000000 }, /* GL_NO_ERROR */
+ { 22174, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
+ { 22208, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
+ { 22246, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
+ { 22278, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
+ { 22320, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
+ { 22350, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
+ { 22390, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
+ { 22421, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
+ { 22450, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
+ { 22478, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
+ { 22508, 0x00002401 }, /* GL_OBJECT_LINEAR */
+ { 22525, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
+ { 22551, 0x00002501 }, /* GL_OBJECT_PLANE */
+ { 22567, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
+ { 22602, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
+ { 22624, 0x00009112 }, /* GL_OBJECT_TYPE */
+ { 22639, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
+ { 22658, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
+ { 22688, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
+ { 22709, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
+ { 22737, 0x00000001 }, /* GL_ONE */
+ { 22744, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
+ { 22772, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
+ { 22804, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
+ { 22832, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
+ { 22864, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
+ { 22887, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
+ { 22910, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
+ { 22933, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
+ { 22956, 0x00008598 }, /* GL_OPERAND0_ALPHA */
+ { 22974, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
+ { 22996, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
+ { 23018, 0x00008590 }, /* GL_OPERAND0_RGB */
+ { 23034, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
+ { 23054, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
+ { 23074, 0x00008599 }, /* GL_OPERAND1_ALPHA */
+ { 23092, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
+ { 23114, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
+ { 23136, 0x00008591 }, /* GL_OPERAND1_RGB */
+ { 23152, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
+ { 23172, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
+ { 23192, 0x0000859A }, /* GL_OPERAND2_ALPHA */
+ { 23210, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
+ { 23232, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
+ { 23254, 0x00008592 }, /* GL_OPERAND2_RGB */
+ { 23270, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
+ { 23290, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
+ { 23310, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
+ { 23331, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
+ { 23350, 0x00001507 }, /* GL_OR */
+ { 23356, 0x00000A01 }, /* GL_ORDER */
+ { 23365, 0x0000150D }, /* GL_OR_INVERTED */
+ { 23380, 0x0000150B }, /* GL_OR_REVERSE */
+ { 23394, 0x00000505 }, /* GL_OUT_OF_MEMORY */
+ { 23411, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
+ { 23429, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
+ { 23450, 0x00008758 }, /* GL_PACK_INVERT_MESA */
+ { 23470, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
+ { 23488, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
+ { 23507, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
+ { 23527, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
+ { 23547, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
+ { 23565, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
+ { 23584, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
+ { 23609, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
+ { 23633, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
+ { 23654, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
+ { 23676, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
+ { 23698, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
+ { 23723, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
+ { 23747, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
+ { 23768, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
+ { 23790, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
+ { 23812, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
+ { 23834, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
+ { 23865, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
+ { 23885, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
+ { 23910, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
+ { 23930, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
+ { 23955, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
+ { 23975, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
+ { 24000, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
+ { 24020, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
+ { 24045, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
+ { 24065, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
+ { 24090, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
+ { 24110, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
+ { 24135, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
+ { 24155, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
+ { 24180, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
+ { 24200, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
+ { 24225, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
+ { 24245, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
+ { 24270, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
+ { 24290, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
+ { 24315, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
+ { 24333, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER */
+ { 24354, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING */
+ { 24383, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
+ { 24416, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
+ { 24441, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER */
+ { 24464, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
+ { 24495, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
+ { 24530, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
+ { 24557, 0x00001B00 }, /* GL_POINT */
+ { 24566, 0x00000000 }, /* GL_POINTS */
+ { 24576, 0x00000002 }, /* GL_POINT_BIT */
+ { 24589, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
+ { 24619, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
+ { 24653, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
+ { 24687, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
+ { 24722, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
+ { 24751, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
+ { 24784, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
+ { 24817, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
+ { 24851, 0x00000B11 }, /* GL_POINT_SIZE */
+ { 24865, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
+ { 24891, 0x00008127 }, /* GL_POINT_SIZE_MAX */
+ { 24909, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
+ { 24931, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
+ { 24953, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
+ { 24976, 0x00008126 }, /* GL_POINT_SIZE_MIN */
+ { 24994, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
+ { 25016, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
+ { 25038, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
+ { 25061, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
+ { 25081, 0x00000B10 }, /* GL_POINT_SMOOTH */
+ { 25097, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
+ { 25118, 0x00008861 }, /* GL_POINT_SPRITE */
+ { 25134, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
+ { 25154, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
+ { 25183, 0x00008861 }, /* GL_POINT_SPRITE_NV */
+ { 25202, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
+ { 25228, 0x00000701 }, /* GL_POINT_TOKEN */
+ { 25243, 0x00000009 }, /* GL_POLYGON */
+ { 25254, 0x00000008 }, /* GL_POLYGON_BIT */
+ { 25269, 0x00000B40 }, /* GL_POLYGON_MODE */
+ { 25285, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
+ { 25308, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
+ { 25333, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
+ { 25356, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
+ { 25379, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
+ { 25403, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
+ { 25427, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
+ { 25445, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
+ { 25468, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
+ { 25487, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
+ { 25510, 0x00000703 }, /* GL_POLYGON_TOKEN */
+ { 25527, 0x00001203 }, /* GL_POSITION */
+ { 25539, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
+ { 25571, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
+ { 25607, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
+ { 25640, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
+ { 25677, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
+ { 25708, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
+ { 25743, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
+ { 25775, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
+ { 25811, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
+ { 25844, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
+ { 25876, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
+ { 25912, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
+ { 25945, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
+ { 25982, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
+ { 26012, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
+ { 26046, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
+ { 26077, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
+ { 26112, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
+ { 26143, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
+ { 26178, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
+ { 26210, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
+ { 26246, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
+ { 26276, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
+ { 26310, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
+ { 26341, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
+ { 26376, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
+ { 26408, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
+ { 26439, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
+ { 26474, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
+ { 26506, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
+ { 26542, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
+ { 26571, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
+ { 26604, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
+ { 26634, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
+ { 26668, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
+ { 26707, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
+ { 26740, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
+ { 26780, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
+ { 26814, 0x00008578 }, /* GL_PREVIOUS */
+ { 26826, 0x00008578 }, /* GL_PREVIOUS_ARB */
+ { 26842, 0x00008578 }, /* GL_PREVIOUS_EXT */
+ { 26858, 0x00008577 }, /* GL_PRIMARY_COLOR */
+ { 26875, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
+ { 26896, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
+ { 26917, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
+ { 26950, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ { 26982, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
+ { 27005, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
+ { 27028, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
+ { 27058, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
+ { 27087, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
+ { 27115, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
+ { 27137, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
+ { 27165, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
+ { 27193, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
+ { 27215, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
+ { 27236, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ { 27276, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ { 27315, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
+ { 27345, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ { 27380, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
+ { 27413, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ { 27447, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ { 27486, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ { 27525, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
+ { 27547, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
+ { 27573, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
+ { 27597, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
+ { 27620, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
+ { 27642, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
+ { 27663, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
+ { 27684, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
+ { 27711, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
+ { 27743, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ { 27775, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
+ { 27810, 0x00001701 }, /* GL_PROJECTION */
+ { 27824, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
+ { 27845, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
+ { 27871, 0x00008E4F }, /* GL_PROVOKING_VERTEX */
+ { 27891, 0x00008E4F }, /* GL_PROVOKING_VERTEX_EXT */
+ { 27915, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
+ { 27936, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
+ { 27955, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
+ { 27978, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
+ { 28017, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
+ { 28055, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
+ { 28075, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
+ { 28105, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
+ { 28129, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
+ { 28149, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
+ { 28179, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
+ { 28203, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
+ { 28223, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
+ { 28256, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
+ { 28282, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
+ { 28312, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
+ { 28343, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
+ { 28373, 0x00008A1D }, /* GL_PURGEABLE_APPLE */
+ { 28392, 0x00002003 }, /* GL_Q */
+ { 28397, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
+ { 28422, 0x00000007 }, /* GL_QUADS */
+ { 28431, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
+ { 28475, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT */
+ { 28523, 0x00008614 }, /* GL_QUAD_MESH_SUN */
+ { 28540, 0x00000008 }, /* GL_QUAD_STRIP */
+ { 28554, 0x00008E16 }, /* GL_QUERY_BY_REGION_NO_WAIT_NV */
+ { 28584, 0x00008E15 }, /* GL_QUERY_BY_REGION_WAIT_NV */
+ { 28611, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
+ { 28633, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
+ { 28659, 0x00008E14 }, /* GL_QUERY_NO_WAIT_NV */
+ { 28679, 0x00008866 }, /* GL_QUERY_RESULT */
+ { 28695, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
+ { 28715, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
+ { 28741, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
+ { 28771, 0x00008E13 }, /* GL_QUERY_WAIT_NV */
+ { 28788, 0x00002002 }, /* GL_R */
+ { 28793, 0x00002A10 }, /* GL_R3_G3_B2 */
+ { 28805, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
+ { 28838, 0x00000C02 }, /* GL_READ_BUFFER */
+ { 28853, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER */
+ { 28873, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING */
+ { 28901, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
+ { 28933, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
+ { 28957, 0x000088B8 }, /* GL_READ_ONLY */
+ { 28970, 0x000088B8 }, /* GL_READ_ONLY_ARB */
+ { 28987, 0x000088BA }, /* GL_READ_WRITE */
+ { 29001, 0x000088BA }, /* GL_READ_WRITE_ARB */
+ { 29019, 0x00001903 }, /* GL_RED */
+ { 29026, 0x00008016 }, /* GL_REDUCE */
+ { 29036, 0x00008016 }, /* GL_REDUCE_EXT */
+ { 29050, 0x00000D15 }, /* GL_RED_BIAS */
+ { 29062, 0x00000D52 }, /* GL_RED_BITS */
+ { 29074, 0x00000D14 }, /* GL_RED_SCALE */
+ { 29087, 0x00008512 }, /* GL_REFLECTION_MAP */
+ { 29105, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
+ { 29127, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
+ { 29148, 0x00008A19 }, /* GL_RELEASED_APPLE */
+ { 29166, 0x00001C00 }, /* GL_RENDER */
+ { 29176, 0x00008D41 }, /* GL_RENDERBUFFER */
+ { 29192, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE */
+ { 29219, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING */
+ { 29243, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
+ { 29271, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE */
+ { 29297, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE */
+ { 29324, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
+ { 29344, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE */
+ { 29371, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT */
+ { 29394, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
+ { 29421, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
+ { 29453, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
+ { 29489, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE */
+ { 29514, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES */
+ { 29538, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES_EXT */
+ { 29566, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE */
+ { 29595, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH */
+ { 29617, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
+ { 29643, 0x00001F01 }, /* GL_RENDERER */
+ { 29655, 0x00000C40 }, /* GL_RENDER_MODE */
+ { 29670, 0x00002901 }, /* GL_REPEAT */
+ { 29680, 0x00001E01 }, /* GL_REPLACE */
+ { 29691, 0x00008062 }, /* GL_REPLACE_EXT */
+ { 29706, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
+ { 29729, 0x0000803A }, /* GL_RESCALE_NORMAL */
+ { 29747, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
+ { 29769, 0x00008A1B }, /* GL_RETAINED_APPLE */
+ { 29787, 0x00000102 }, /* GL_RETURN */
+ { 29797, 0x00001907 }, /* GL_RGB */
+ { 29804, 0x00008052 }, /* GL_RGB10 */
+ { 29813, 0x00008059 }, /* GL_RGB10_A2 */
+ { 29825, 0x00008059 }, /* GL_RGB10_A2_EXT */
+ { 29841, 0x00008052 }, /* GL_RGB10_EXT */
+ { 29854, 0x00008053 }, /* GL_RGB12 */
+ { 29863, 0x00008053 }, /* GL_RGB12_EXT */
+ { 29876, 0x00008054 }, /* GL_RGB16 */
+ { 29885, 0x00008054 }, /* GL_RGB16_EXT */
+ { 29898, 0x0000804E }, /* GL_RGB2_EXT */
+ { 29910, 0x0000804F }, /* GL_RGB4 */
+ { 29918, 0x0000804F }, /* GL_RGB4_EXT */
+ { 29930, 0x000083A1 }, /* GL_RGB4_S3TC */
+ { 29943, 0x00008050 }, /* GL_RGB5 */
+ { 29951, 0x00008057 }, /* GL_RGB5_A1 */
+ { 29962, 0x00008057 }, /* GL_RGB5_A1_EXT */
+ { 29977, 0x00008050 }, /* GL_RGB5_EXT */
+ { 29989, 0x00008051 }, /* GL_RGB8 */
+ { 29997, 0x00008051 }, /* GL_RGB8_EXT */
+ { 30009, 0x00001908 }, /* GL_RGBA */
+ { 30017, 0x0000805A }, /* GL_RGBA12 */
+ { 30027, 0x0000805A }, /* GL_RGBA12_EXT */
+ { 30041, 0x0000805B }, /* GL_RGBA16 */
+ { 30051, 0x0000805B }, /* GL_RGBA16_EXT */
+ { 30065, 0x00008055 }, /* GL_RGBA2 */
+ { 30074, 0x00008055 }, /* GL_RGBA2_EXT */
+ { 30087, 0x00008056 }, /* GL_RGBA4 */
+ { 30096, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
+ { 30115, 0x00008056 }, /* GL_RGBA4_EXT */
+ { 30128, 0x000083A3 }, /* GL_RGBA4_S3TC */
+ { 30142, 0x00008058 }, /* GL_RGBA8 */
+ { 30151, 0x00008058 }, /* GL_RGBA8_EXT */
+ { 30164, 0x00008F97 }, /* GL_RGBA8_SNORM */
+ { 30179, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
+ { 30197, 0x00000C31 }, /* GL_RGBA_MODE */
+ { 30210, 0x000083A2 }, /* GL_RGBA_S3TC */
+ { 30223, 0x00008F93 }, /* GL_RGBA_SNORM */
+ { 30237, 0x000083A0 }, /* GL_RGB_S3TC */
+ { 30249, 0x00008573 }, /* GL_RGB_SCALE */
+ { 30262, 0x00008573 }, /* GL_RGB_SCALE_ARB */
+ { 30279, 0x00008573 }, /* GL_RGB_SCALE_EXT */
+ { 30296, 0x00000407 }, /* GL_RIGHT */
+ { 30305, 0x00002000 }, /* GL_S */
+ { 30310, 0x00008B5D }, /* GL_SAMPLER_1D */
+ { 30324, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
+ { 30345, 0x00008B5E }, /* GL_SAMPLER_2D */
+ { 30359, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
+ { 30380, 0x00008B5F }, /* GL_SAMPLER_3D */
+ { 30394, 0x00008B60 }, /* GL_SAMPLER_CUBE */
+ { 30410, 0x000080A9 }, /* GL_SAMPLES */
+ { 30421, 0x000086B4 }, /* GL_SAMPLES_3DFX */
+ { 30437, 0x000080A9 }, /* GL_SAMPLES_ARB */
+ { 30452, 0x00008914 }, /* GL_SAMPLES_PASSED */
+ { 30470, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
+ { 30492, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
+ { 30520, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
+ { 30552, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
+ { 30575, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
+ { 30602, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
+ { 30620, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
+ { 30643, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
+ { 30665, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
+ { 30684, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
+ { 30707, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
+ { 30733, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
+ { 30763, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
+ { 30788, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
+ { 30817, 0x00080000 }, /* GL_SCISSOR_BIT */
+ { 30832, 0x00000C10 }, /* GL_SCISSOR_BOX */
+ { 30847, 0x00000C11 }, /* GL_SCISSOR_TEST */
+ { 30863, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
+ { 30888, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
+ { 30928, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
+ { 30972, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
+ { 31005, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
+ { 31035, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
+ { 31067, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
+ { 31097, 0x00001C02 }, /* GL_SELECT */
+ { 31107, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
+ { 31135, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
+ { 31160, 0x00008012 }, /* GL_SEPARABLE_2D */
+ { 31176, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
+ { 31203, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
+ { 31234, 0x0000150F }, /* GL_SET */
+ { 31241, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
+ { 31262, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
+ { 31286, 0x00008B4F }, /* GL_SHADER_TYPE */
+ { 31301, 0x00000B54 }, /* GL_SHADE_MODEL */
+ { 31316, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
+ { 31344, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
+ { 31367, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
+ { 31397, 0x00001601 }, /* GL_SHININESS */
+ { 31410, 0x00001402 }, /* GL_SHORT */
+ { 31419, 0x00009119 }, /* GL_SIGNALED */
+ { 31431, 0x00008F9C }, /* GL_SIGNED_NORMALIZED */
+ { 31452, 0x000081F9 }, /* GL_SINGLE_COLOR */
+ { 31468, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
+ { 31488, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
+ { 31507, 0x00008C46 }, /* GL_SLUMINANCE */
+ { 31521, 0x00008C47 }, /* GL_SLUMINANCE8 */
+ { 31536, 0x00008C45 }, /* GL_SLUMINANCE8_ALPHA8 */
+ { 31558, 0x00008C44 }, /* GL_SLUMINANCE_ALPHA */
+ { 31578, 0x00001D01 }, /* GL_SMOOTH */
+ { 31588, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
+ { 31621, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
+ { 31648, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
+ { 31681, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
+ { 31708, 0x00008588 }, /* GL_SOURCE0_ALPHA */
+ { 31725, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
+ { 31746, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
+ { 31767, 0x00008580 }, /* GL_SOURCE0_RGB */
+ { 31782, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
+ { 31801, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
+ { 31820, 0x00008589 }, /* GL_SOURCE1_ALPHA */
+ { 31837, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
+ { 31858, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
+ { 31879, 0x00008581 }, /* GL_SOURCE1_RGB */
+ { 31894, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
+ { 31913, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
+ { 31932, 0x0000858A }, /* GL_SOURCE2_ALPHA */
+ { 31949, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
+ { 31970, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
+ { 31991, 0x00008582 }, /* GL_SOURCE2_RGB */
+ { 32006, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
+ { 32025, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
+ { 32044, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
+ { 32064, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
+ { 32082, 0x00001202 }, /* GL_SPECULAR */
+ { 32094, 0x00002402 }, /* GL_SPHERE_MAP */
+ { 32108, 0x00001206 }, /* GL_SPOT_CUTOFF */
+ { 32123, 0x00001204 }, /* GL_SPOT_DIRECTION */
+ { 32141, 0x00001205 }, /* GL_SPOT_EXPONENT */
+ { 32158, 0x00008588 }, /* GL_SRC0_ALPHA */
+ { 32172, 0x00008580 }, /* GL_SRC0_RGB */
+ { 32184, 0x00008589 }, /* GL_SRC1_ALPHA */
+ { 32198, 0x00008581 }, /* GL_SRC1_RGB */
+ { 32210, 0x0000858A }, /* GL_SRC2_ALPHA */
+ { 32224, 0x00008582 }, /* GL_SRC2_RGB */
+ { 32236, 0x00000302 }, /* GL_SRC_ALPHA */
+ { 32249, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
+ { 32271, 0x00000300 }, /* GL_SRC_COLOR */
+ { 32284, 0x00008C40 }, /* GL_SRGB */
+ { 32292, 0x00008C41 }, /* GL_SRGB8 */
+ { 32301, 0x00008C43 }, /* GL_SRGB8_ALPHA8 */
+ { 32317, 0x00008C42 }, /* GL_SRGB_ALPHA */
+ { 32331, 0x00000503 }, /* GL_STACK_OVERFLOW */
+ { 32349, 0x00000504 }, /* GL_STACK_UNDERFLOW */
+ { 32368, 0x000088E6 }, /* GL_STATIC_COPY */
+ { 32383, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
+ { 32402, 0x000088E4 }, /* GL_STATIC_DRAW */
+ { 32417, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
+ { 32436, 0x000088E5 }, /* GL_STATIC_READ */
+ { 32451, 0x000088E5 }, /* GL_STATIC_READ_ARB */
+ { 32470, 0x00001802 }, /* GL_STENCIL */
+ { 32481, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT */
+ { 32503, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
+ { 32529, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
+ { 32550, 0x00008801 }, /* GL_STENCIL_BACK_FAIL_ATI */
+ { 32575, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
+ { 32596, 0x00008800 }, /* GL_STENCIL_BACK_FUNC_ATI */
+ { 32621, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
+ { 32653, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI */
+ { 32689, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
+ { 32721, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI */
+ { 32757, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
+ { 32777, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
+ { 32804, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
+ { 32830, 0x00000D57 }, /* GL_STENCIL_BITS */
+ { 32846, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
+ { 32868, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
+ { 32891, 0x00000B94 }, /* GL_STENCIL_FAIL */
+ { 32907, 0x00000B92 }, /* GL_STENCIL_FUNC */
+ { 32923, 0x00001901 }, /* GL_STENCIL_INDEX */
+ { 32940, 0x00008D46 }, /* GL_STENCIL_INDEX1 */
+ { 32958, 0x00008D49 }, /* GL_STENCIL_INDEX16 */
+ { 32977, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
+ { 33000, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
+ { 33022, 0x00008D47 }, /* GL_STENCIL_INDEX4 */
+ { 33040, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
+ { 33062, 0x00008D48 }, /* GL_STENCIL_INDEX8 */
+ { 33080, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
+ { 33102, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
+ { 33123, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
+ { 33150, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
+ { 33177, 0x00000B97 }, /* GL_STENCIL_REF */
+ { 33192, 0x00000B90 }, /* GL_STENCIL_TEST */
+ { 33208, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
+ { 33237, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
+ { 33259, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
+ { 33280, 0x00000C33 }, /* GL_STEREO */
+ { 33290, 0x000085BE }, /* GL_STORAGE_CACHED_APPLE */
+ { 33314, 0x000085BD }, /* GL_STORAGE_PRIVATE_APPLE */
+ { 33339, 0x000085BF }, /* GL_STORAGE_SHARED_APPLE */
+ { 33363, 0x000088E2 }, /* GL_STREAM_COPY */
+ { 33378, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
+ { 33397, 0x000088E0 }, /* GL_STREAM_DRAW */
+ { 33412, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
+ { 33431, 0x000088E1 }, /* GL_STREAM_READ */
+ { 33446, 0x000088E1 }, /* GL_STREAM_READ_ARB */
+ { 33465, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
+ { 33482, 0x000084E7 }, /* GL_SUBTRACT */
+ { 33494, 0x000084E7 }, /* GL_SUBTRACT_ARB */
+ { 33510, 0x00009113 }, /* GL_SYNC_CONDITION */
+ { 33528, 0x00009116 }, /* GL_SYNC_FENCE */
+ { 33542, 0x00009115 }, /* GL_SYNC_FLAGS */
+ { 33556, 0x00000001 }, /* GL_SYNC_FLUSH_COMMANDS_BIT */
+ { 33583, 0x00009117 }, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
+ { 33613, 0x00009114 }, /* GL_SYNC_STATUS */
+ { 33628, 0x00002001 }, /* GL_T */
+ { 33633, 0x00002A2A }, /* GL_T2F_C3F_V3F */
+ { 33648, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
+ { 33667, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
+ { 33683, 0x00002A2B }, /* GL_T2F_N3F_V3F */
+ { 33698, 0x00002A27 }, /* GL_T2F_V3F */
+ { 33709, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
+ { 33728, 0x00002A28 }, /* GL_T4F_V4F */
+ { 33739, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
+ { 33762, 0x00001702 }, /* GL_TEXTURE */
+ { 33773, 0x000084C0 }, /* GL_TEXTURE0 */
+ { 33785, 0x000084C0 }, /* GL_TEXTURE0_ARB */
+ { 33801, 0x000084C1 }, /* GL_TEXTURE1 */
+ { 33813, 0x000084CA }, /* GL_TEXTURE10 */
+ { 33826, 0x000084CA }, /* GL_TEXTURE10_ARB */
+ { 33843, 0x000084CB }, /* GL_TEXTURE11 */
+ { 33856, 0x000084CB }, /* GL_TEXTURE11_ARB */
+ { 33873, 0x000084CC }, /* GL_TEXTURE12 */
+ { 33886, 0x000084CC }, /* GL_TEXTURE12_ARB */
+ { 33903, 0x000084CD }, /* GL_TEXTURE13 */
+ { 33916, 0x000084CD }, /* GL_TEXTURE13_ARB */
+ { 33933, 0x000084CE }, /* GL_TEXTURE14 */
+ { 33946, 0x000084CE }, /* GL_TEXTURE14_ARB */
+ { 33963, 0x000084CF }, /* GL_TEXTURE15 */
+ { 33976, 0x000084CF }, /* GL_TEXTURE15_ARB */
+ { 33993, 0x000084D0 }, /* GL_TEXTURE16 */
+ { 34006, 0x000084D0 }, /* GL_TEXTURE16_ARB */
+ { 34023, 0x000084D1 }, /* GL_TEXTURE17 */
+ { 34036, 0x000084D1 }, /* GL_TEXTURE17_ARB */
+ { 34053, 0x000084D2 }, /* GL_TEXTURE18 */
+ { 34066, 0x000084D2 }, /* GL_TEXTURE18_ARB */
+ { 34083, 0x000084D3 }, /* GL_TEXTURE19 */
+ { 34096, 0x000084D3 }, /* GL_TEXTURE19_ARB */
+ { 34113, 0x000084C1 }, /* GL_TEXTURE1_ARB */
+ { 34129, 0x000084C2 }, /* GL_TEXTURE2 */
+ { 34141, 0x000084D4 }, /* GL_TEXTURE20 */
+ { 34154, 0x000084D4 }, /* GL_TEXTURE20_ARB */
+ { 34171, 0x000084D5 }, /* GL_TEXTURE21 */
+ { 34184, 0x000084D5 }, /* GL_TEXTURE21_ARB */
+ { 34201, 0x000084D6 }, /* GL_TEXTURE22 */
+ { 34214, 0x000084D6 }, /* GL_TEXTURE22_ARB */
+ { 34231, 0x000084D7 }, /* GL_TEXTURE23 */
+ { 34244, 0x000084D7 }, /* GL_TEXTURE23_ARB */
+ { 34261, 0x000084D8 }, /* GL_TEXTURE24 */
+ { 34274, 0x000084D8 }, /* GL_TEXTURE24_ARB */
+ { 34291, 0x000084D9 }, /* GL_TEXTURE25 */
+ { 34304, 0x000084D9 }, /* GL_TEXTURE25_ARB */
+ { 34321, 0x000084DA }, /* GL_TEXTURE26 */
+ { 34334, 0x000084DA }, /* GL_TEXTURE26_ARB */
+ { 34351, 0x000084DB }, /* GL_TEXTURE27 */
+ { 34364, 0x000084DB }, /* GL_TEXTURE27_ARB */
+ { 34381, 0x000084DC }, /* GL_TEXTURE28 */
+ { 34394, 0x000084DC }, /* GL_TEXTURE28_ARB */
+ { 34411, 0x000084DD }, /* GL_TEXTURE29 */
+ { 34424, 0x000084DD }, /* GL_TEXTURE29_ARB */
+ { 34441, 0x000084C2 }, /* GL_TEXTURE2_ARB */
+ { 34457, 0x000084C3 }, /* GL_TEXTURE3 */
+ { 34469, 0x000084DE }, /* GL_TEXTURE30 */
+ { 34482, 0x000084DE }, /* GL_TEXTURE30_ARB */
+ { 34499, 0x000084DF }, /* GL_TEXTURE31 */
+ { 34512, 0x000084DF }, /* GL_TEXTURE31_ARB */
+ { 34529, 0x000084C3 }, /* GL_TEXTURE3_ARB */
+ { 34545, 0x000084C4 }, /* GL_TEXTURE4 */
+ { 34557, 0x000084C4 }, /* GL_TEXTURE4_ARB */
+ { 34573, 0x000084C5 }, /* GL_TEXTURE5 */
+ { 34585, 0x000084C5 }, /* GL_TEXTURE5_ARB */
+ { 34601, 0x000084C6 }, /* GL_TEXTURE6 */
+ { 34613, 0x000084C6 }, /* GL_TEXTURE6_ARB */
+ { 34629, 0x000084C7 }, /* GL_TEXTURE7 */
+ { 34641, 0x000084C7 }, /* GL_TEXTURE7_ARB */
+ { 34657, 0x000084C8 }, /* GL_TEXTURE8 */
+ { 34669, 0x000084C8 }, /* GL_TEXTURE8_ARB */
+ { 34685, 0x000084C9 }, /* GL_TEXTURE9 */
+ { 34697, 0x000084C9 }, /* GL_TEXTURE9_ARB */
+ { 34713, 0x00000DE0 }, /* GL_TEXTURE_1D */
+ { 34727, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
+ { 34751, 0x00000DE1 }, /* GL_TEXTURE_2D */
+ { 34765, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
+ { 34789, 0x0000806F }, /* GL_TEXTURE_3D */
+ { 34803, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
+ { 34825, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
+ { 34851, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
+ { 34873, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
+ { 34895, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
+ { 34927, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
+ { 34949, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
+ { 34981, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
+ { 35003, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
+ { 35031, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
+ { 35063, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
+ { 35096, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
+ { 35128, 0x00040000 }, /* GL_TEXTURE_BIT */
+ { 35143, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
+ { 35164, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
+ { 35189, 0x00001005 }, /* GL_TEXTURE_BORDER */
+ { 35207, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
+ { 35231, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
+ { 35262, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
+ { 35292, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
+ { 35322, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
+ { 35357, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
+ { 35388, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ { 35426, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
+ { 35453, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
+ { 35485, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
+ { 35519, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
+ { 35543, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
+ { 35571, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
+ { 35595, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
+ { 35623, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
+ { 35656, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
+ { 35680, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
+ { 35702, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
+ { 35724, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
+ { 35750, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
+ { 35784, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
+ { 35817, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
+ { 35854, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
+ { 35882, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
+ { 35914, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
+ { 35937, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
+ { 35975, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
+ { 36017, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
+ { 36048, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
+ { 36076, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
+ { 36106, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
+ { 36134, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
+ { 36154, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
+ { 36178, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
+ { 36209, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
+ { 36244, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
+ { 36275, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
+ { 36310, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
+ { 36341, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
+ { 36376, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
+ { 36407, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
+ { 36442, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
+ { 36473, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
+ { 36508, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
+ { 36539, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
+ { 36574, 0x000088F4 }, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
+ { 36603, 0x00008071 }, /* GL_TEXTURE_DEPTH */
+ { 36620, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
+ { 36642, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
+ { 36668, 0x00002300 }, /* GL_TEXTURE_ENV */
+ { 36683, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
+ { 36704, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
+ { 36724, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
+ { 36750, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
+ { 36770, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
+ { 36787, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
+ { 36804, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
+ { 36821, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
+ { 36838, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
+ { 36863, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
+ { 36885, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
+ { 36911, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
+ { 36929, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
+ { 36955, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
+ { 36981, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
+ { 37011, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
+ { 37038, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
+ { 37063, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
+ { 37083, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
+ { 37107, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
+ { 37134, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
+ { 37161, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
+ { 37188, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
+ { 37214, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
+ { 37244, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
+ { 37266, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
+ { 37284, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
+ { 37314, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
+ { 37342, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
+ { 37370, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
+ { 37398, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
+ { 37419, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
+ { 37438, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
+ { 37460, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
+ { 37479, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
+ { 37499, 0x000085B7 }, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
+ { 37529, 0x000085B8 }, /* GL_TEXTURE_RANGE_POINTER_APPLE */
+ { 37560, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
+ { 37585, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
+ { 37609, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
+ { 37629, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
+ { 37653, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
+ { 37673, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
+ { 37696, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE */
+ { 37720, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE_EXT */
+ { 37748, 0x000085BC }, /* GL_TEXTURE_STORAGE_HINT_APPLE */
+ { 37778, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
+ { 37803, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
+ { 37837, 0x00001000 }, /* GL_TEXTURE_WIDTH */
+ { 37854, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
+ { 37872, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
+ { 37890, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
+ { 37908, 0x0000911B }, /* GL_TIMEOUT_EXPIRED */
+ { 37927, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
+ { 37947, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
+ { 37966, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
+ { 37995, 0x00001000 }, /* GL_TRANSFORM_BIT */
+ { 38012, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
+ { 38038, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
+ { 38068, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
+ { 38100, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
+ { 38130, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
+ { 38164, 0x0000862C }, /* GL_TRANSPOSE_NV */
+ { 38180, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
+ { 38211, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
+ { 38246, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
+ { 38274, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
+ { 38306, 0x00000004 }, /* GL_TRIANGLES */
+ { 38319, 0x00000006 }, /* GL_TRIANGLE_FAN */
+ { 38335, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
+ { 38356, 0x00000005 }, /* GL_TRIANGLE_STRIP */
+ { 38374, 0x00000001 }, /* GL_TRUE */
+ { 38382, 0x00008A1C }, /* GL_UNDEFINED_APPLE */
+ { 38401, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
+ { 38421, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
+ { 38444, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
+ { 38464, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
+ { 38485, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
+ { 38507, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
+ { 38529, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
+ { 38549, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
+ { 38570, 0x00009118 }, /* GL_UNSIGNALED */
+ { 38584, 0x00001401 }, /* GL_UNSIGNED_BYTE */
+ { 38601, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
+ { 38628, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
+ { 38651, 0x00001405 }, /* GL_UNSIGNED_INT */
+ { 38667, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
+ { 38694, 0x000084FA }, /* GL_UNSIGNED_INT_24_8 */
+ { 38715, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_EXT */
+ { 38740, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
+ { 38764, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
+ { 38795, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
+ { 38819, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
+ { 38847, 0x00008C17 }, /* GL_UNSIGNED_NORMALIZED */
+ { 38870, 0x00001403 }, /* GL_UNSIGNED_SHORT */
+ { 38888, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
+ { 38918, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
+ { 38944, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
+ { 38974, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
+ { 39000, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
+ { 39024, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
+ { 39052, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
+ { 39080, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
+ { 39107, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
+ { 39139, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
+ { 39170, 0x00008CA2 }, /* GL_UPPER_LEFT */
+ { 39184, 0x00002A20 }, /* GL_V2F */
+ { 39191, 0x00002A21 }, /* GL_V3F */
+ { 39198, 0x00008B83 }, /* GL_VALIDATE_STATUS */
+ { 39217, 0x00001F00 }, /* GL_VENDOR */
+ { 39227, 0x00001F02 }, /* GL_VERSION */
+ { 39238, 0x00008074 }, /* GL_VERTEX_ARRAY */
+ { 39254, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING */
+ { 39278, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
+ { 39308, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+ { 39339, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
+ { 39374, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
+ { 39398, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
+ { 39419, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
+ { 39442, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
+ { 39463, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
+ { 39490, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
+ { 39518, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
+ { 39546, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
+ { 39574, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
+ { 39602, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
+ { 39630, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
+ { 39658, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
+ { 39685, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
+ { 39712, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
+ { 39739, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
+ { 39766, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
+ { 39793, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
+ { 39820, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
+ { 39847, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
+ { 39874, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
+ { 39901, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
+ { 39939, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
+ { 39981, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
+ { 40012, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
+ { 40047, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
+ { 40081, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
+ { 40119, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
+ { 40150, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
+ { 40185, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
+ { 40213, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
+ { 40245, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
+ { 40275, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
+ { 40309, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+ { 40337, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
+ { 40369, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
+ { 40389, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
+ { 40411, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
+ { 40440, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
+ { 40461, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
+ { 40490, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
+ { 40523, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
+ { 40555, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
+ { 40582, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
+ { 40613, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
+ { 40643, 0x00008B31 }, /* GL_VERTEX_SHADER */
+ { 40660, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
+ { 40681, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
+ { 40708, 0x00000BA2 }, /* GL_VIEWPORT */
+ { 40720, 0x00000800 }, /* GL_VIEWPORT_BIT */
+ { 40736, 0x00008A1A }, /* GL_VOLATILE_APPLE */
+ { 40754, 0x0000911D }, /* GL_WAIT_FAILED */
+ { 40769, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
+ { 40789, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+ { 40820, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
+ { 40855, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+ { 40883, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+ { 40908, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+ { 40935, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+ { 40960, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
+ { 40984, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
+ { 41003, 0x000088B9 }, /* GL_WRITE_ONLY */
+ { 41017, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
+ { 41035, 0x00001506 }, /* GL_XOR */
+ { 41042, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
+ { 41061, 0x00008757 }, /* GL_YCBCR_MESA */
+ { 41075, 0x00000000 }, /* GL_ZERO */
+ { 41083, 0x00000D16 }, /* GL_ZOOM_X */
+ { 41093, 0x00000D17 }, /* GL_ZOOM_Y */
};
-static const unsigned reduced_enums[1351] =
+static const unsigned reduced_enums[1357] =
{
- 479, /* GL_FALSE */
- 702, /* GL_LINES */
- 704, /* GL_LINE_LOOP */
- 711, /* GL_LINE_STRIP */
- 1770, /* GL_TRIANGLES */
- 1773, /* GL_TRIANGLE_STRIP */
- 1771, /* GL_TRIANGLE_FAN */
- 1286, /* GL_QUADS */
- 1290, /* GL_QUAD_STRIP */
- 1172, /* GL_POLYGON */
- 1184, /* GL_POLYGON_STIPPLE_BIT */
- 1133, /* GL_PIXEL_MODE_BIT */
- 689, /* GL_LIGHTING_BIT */
- 509, /* GL_FOG_BIT */
+ 480, /* GL_FALSE */
+ 703, /* GL_LINES */
+ 705, /* GL_LINE_LOOP */
+ 712, /* GL_LINE_STRIP */
+ 1774, /* GL_TRIANGLES */
+ 1777, /* GL_TRIANGLE_STRIP */
+ 1775, /* GL_TRIANGLE_FAN */
+ 1288, /* GL_QUADS */
+ 1292, /* GL_QUAD_STRIP */
+ 1173, /* GL_POLYGON */
+ 1185, /* GL_POLYGON_STIPPLE_BIT */
+ 1134, /* GL_PIXEL_MODE_BIT */
+ 690, /* GL_LIGHTING_BIT */
+ 510, /* GL_FOG_BIT */
8, /* GL_ACCUM */
- 721, /* GL_LOAD */
- 1349, /* GL_RETURN */
- 1005, /* GL_MULT */
+ 722, /* GL_LOAD */
+ 1353, /* GL_RETURN */
+ 1006, /* GL_MULT */
23, /* GL_ADD */
- 1021, /* GL_NEVER */
- 679, /* GL_LESS */
- 469, /* GL_EQUAL */
- 678, /* GL_LEQUAL */
- 599, /* GL_GREATER */
- 1036, /* GL_NOTEQUAL */
- 598, /* GL_GEQUAL */
+ 1022, /* GL_NEVER */
+ 680, /* GL_LESS */
+ 470, /* GL_EQUAL */
+ 679, /* GL_LEQUAL */
+ 600, /* GL_GREATER */
+ 1037, /* GL_NOTEQUAL */
+ 599, /* GL_GEQUAL */
47, /* GL_ALWAYS */
- 1490, /* GL_SRC_COLOR */
- 1066, /* GL_ONE_MINUS_SRC_COLOR */
- 1488, /* GL_SRC_ALPHA */
- 1065, /* GL_ONE_MINUS_SRC_ALPHA */
- 448, /* GL_DST_ALPHA */
- 1063, /* GL_ONE_MINUS_DST_ALPHA */
- 449, /* GL_DST_COLOR */
- 1064, /* GL_ONE_MINUS_DST_COLOR */
- 1489, /* GL_SRC_ALPHA_SATURATE */
- 586, /* GL_FRONT_LEFT */
- 587, /* GL_FRONT_RIGHT */
+ 1494, /* GL_SRC_COLOR */
+ 1067, /* GL_ONE_MINUS_SRC_COLOR */
+ 1492, /* GL_SRC_ALPHA */
+ 1066, /* GL_ONE_MINUS_SRC_ALPHA */
+ 449, /* GL_DST_ALPHA */
+ 1064, /* GL_ONE_MINUS_DST_ALPHA */
+ 450, /* GL_DST_COLOR */
+ 1065, /* GL_ONE_MINUS_DST_COLOR */
+ 1493, /* GL_SRC_ALPHA_SATURATE */
+ 587, /* GL_FRONT_LEFT */
+ 588, /* GL_FRONT_RIGHT */
69, /* GL_BACK_LEFT */
70, /* GL_BACK_RIGHT */
- 583, /* GL_FRONT */
+ 584, /* GL_FRONT */
68, /* GL_BACK */
- 677, /* GL_LEFT */
- 1391, /* GL_RIGHT */
- 584, /* GL_FRONT_AND_BACK */
+ 678, /* GL_LEFT */
+ 1395, /* GL_RIGHT */
+ 585, /* GL_FRONT_AND_BACK */
63, /* GL_AUX0 */
64, /* GL_AUX1 */
65, /* GL_AUX2 */
66, /* GL_AUX3 */
- 666, /* GL_INVALID_ENUM */
- 670, /* GL_INVALID_VALUE */
- 669, /* GL_INVALID_OPERATION */
- 1495, /* GL_STACK_OVERFLOW */
- 1496, /* GL_STACK_UNDERFLOW */
- 1091, /* GL_OUT_OF_MEMORY */
- 667, /* GL_INVALID_FRAMEBUFFER_OPERATION */
+ 667, /* GL_INVALID_ENUM */
+ 671, /* GL_INVALID_VALUE */
+ 670, /* GL_INVALID_OPERATION */
+ 1499, /* GL_STACK_OVERFLOW */
+ 1500, /* GL_STACK_UNDERFLOW */
+ 1092, /* GL_OUT_OF_MEMORY */
+ 668, /* GL_INVALID_FRAMEBUFFER_OPERATION */
0, /* GL_2D */
2, /* GL_3D */
3, /* GL_3D_COLOR */
4, /* GL_3D_COLOR_TEXTURE */
6, /* GL_4D_COLOR_TEXTURE */
- 1111, /* GL_PASS_THROUGH_TOKEN */
- 1171, /* GL_POINT_TOKEN */
- 712, /* GL_LINE_TOKEN */
- 1185, /* GL_POLYGON_TOKEN */
+ 1112, /* GL_PASS_THROUGH_TOKEN */
+ 1172, /* GL_POINT_TOKEN */
+ 713, /* GL_LINE_TOKEN */
+ 1186, /* GL_POLYGON_TOKEN */
74, /* GL_BITMAP_TOKEN */
- 447, /* GL_DRAW_PIXEL_TOKEN */
- 301, /* GL_COPY_PIXEL_TOKEN */
- 705, /* GL_LINE_RESET_TOKEN */
- 472, /* GL_EXP */
- 473, /* GL_EXP2 */
- 337, /* GL_CW */
- 125, /* GL_CCW */
- 146, /* GL_COEFF */
- 1088, /* GL_ORDER */
- 384, /* GL_DOMAIN */
- 311, /* GL_CURRENT_COLOR */
- 314, /* GL_CURRENT_INDEX */
- 320, /* GL_CURRENT_NORMAL */
- 333, /* GL_CURRENT_TEXTURE_COORDS */
- 325, /* GL_CURRENT_RASTER_COLOR */
- 327, /* GL_CURRENT_RASTER_INDEX */
- 331, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
- 328, /* GL_CURRENT_RASTER_POSITION */
- 329, /* GL_CURRENT_RASTER_POSITION_VALID */
- 326, /* GL_CURRENT_RASTER_DISTANCE */
- 1164, /* GL_POINT_SMOOTH */
- 1153, /* GL_POINT_SIZE */
- 1163, /* GL_POINT_SIZE_RANGE */
- 1154, /* GL_POINT_SIZE_GRANULARITY */
- 706, /* GL_LINE_SMOOTH */
- 713, /* GL_LINE_WIDTH */
- 715, /* GL_LINE_WIDTH_RANGE */
- 714, /* GL_LINE_WIDTH_GRANULARITY */
- 708, /* GL_LINE_STIPPLE */
- 709, /* GL_LINE_STIPPLE_PATTERN */
- 710, /* GL_LINE_STIPPLE_REPEAT */
- 720, /* GL_LIST_MODE */
- 886, /* GL_MAX_LIST_NESTING */
- 717, /* GL_LIST_BASE */
- 719, /* GL_LIST_INDEX */
- 1174, /* GL_POLYGON_MODE */
- 1181, /* GL_POLYGON_SMOOTH */
- 1183, /* GL_POLYGON_STIPPLE */
- 458, /* GL_EDGE_FLAG */
- 304, /* GL_CULL_FACE */
- 305, /* GL_CULL_FACE_MODE */
- 585, /* GL_FRONT_FACE */
- 688, /* GL_LIGHTING */
- 693, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
- 694, /* GL_LIGHT_MODEL_TWO_SIDE */
- 690, /* GL_LIGHT_MODEL_AMBIENT */
- 1437, /* GL_SHADE_MODEL */
- 193, /* GL_COLOR_MATERIAL_FACE */
- 194, /* GL_COLOR_MATERIAL_PARAMETER */
- 192, /* GL_COLOR_MATERIAL */
- 508, /* GL_FOG */
- 530, /* GL_FOG_INDEX */
- 526, /* GL_FOG_DENSITY */
- 534, /* GL_FOG_START */
- 528, /* GL_FOG_END */
- 531, /* GL_FOG_MODE */
- 510, /* GL_FOG_COLOR */
- 370, /* GL_DEPTH_RANGE */
- 378, /* GL_DEPTH_TEST */
- 381, /* GL_DEPTH_WRITEMASK */
- 358, /* GL_DEPTH_CLEAR_VALUE */
- 369, /* GL_DEPTH_FUNC */
+ 448, /* GL_DRAW_PIXEL_TOKEN */
+ 302, /* GL_COPY_PIXEL_TOKEN */
+ 706, /* GL_LINE_RESET_TOKEN */
+ 473, /* GL_EXP */
+ 474, /* GL_EXP2 */
+ 338, /* GL_CW */
+ 126, /* GL_CCW */
+ 147, /* GL_COEFF */
+ 1089, /* GL_ORDER */
+ 385, /* GL_DOMAIN */
+ 312, /* GL_CURRENT_COLOR */
+ 315, /* GL_CURRENT_INDEX */
+ 321, /* GL_CURRENT_NORMAL */
+ 334, /* GL_CURRENT_TEXTURE_COORDS */
+ 326, /* GL_CURRENT_RASTER_COLOR */
+ 328, /* GL_CURRENT_RASTER_INDEX */
+ 332, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
+ 329, /* GL_CURRENT_RASTER_POSITION */
+ 330, /* GL_CURRENT_RASTER_POSITION_VALID */
+ 327, /* GL_CURRENT_RASTER_DISTANCE */
+ 1165, /* GL_POINT_SMOOTH */
+ 1154, /* GL_POINT_SIZE */
+ 1164, /* GL_POINT_SIZE_RANGE */
+ 1155, /* GL_POINT_SIZE_GRANULARITY */
+ 707, /* GL_LINE_SMOOTH */
+ 714, /* GL_LINE_WIDTH */
+ 716, /* GL_LINE_WIDTH_RANGE */
+ 715, /* GL_LINE_WIDTH_GRANULARITY */
+ 709, /* GL_LINE_STIPPLE */
+ 710, /* GL_LINE_STIPPLE_PATTERN */
+ 711, /* GL_LINE_STIPPLE_REPEAT */
+ 721, /* GL_LIST_MODE */
+ 887, /* GL_MAX_LIST_NESTING */
+ 718, /* GL_LIST_BASE */
+ 720, /* GL_LIST_INDEX */
+ 1175, /* GL_POLYGON_MODE */
+ 1182, /* GL_POLYGON_SMOOTH */
+ 1184, /* GL_POLYGON_STIPPLE */
+ 459, /* GL_EDGE_FLAG */
+ 305, /* GL_CULL_FACE */
+ 306, /* GL_CULL_FACE_MODE */
+ 586, /* GL_FRONT_FACE */
+ 689, /* GL_LIGHTING */
+ 694, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
+ 695, /* GL_LIGHT_MODEL_TWO_SIDE */
+ 691, /* GL_LIGHT_MODEL_AMBIENT */
+ 1441, /* GL_SHADE_MODEL */
+ 194, /* GL_COLOR_MATERIAL_FACE */
+ 195, /* GL_COLOR_MATERIAL_PARAMETER */
+ 193, /* GL_COLOR_MATERIAL */
+ 509, /* GL_FOG */
+ 531, /* GL_FOG_INDEX */
+ 527, /* GL_FOG_DENSITY */
+ 535, /* GL_FOG_START */
+ 529, /* GL_FOG_END */
+ 532, /* GL_FOG_MODE */
+ 511, /* GL_FOG_COLOR */
+ 371, /* GL_DEPTH_RANGE */
+ 379, /* GL_DEPTH_TEST */
+ 382, /* GL_DEPTH_WRITEMASK */
+ 359, /* GL_DEPTH_CLEAR_VALUE */
+ 370, /* GL_DEPTH_FUNC */
12, /* GL_ACCUM_CLEAR_VALUE */
- 1535, /* GL_STENCIL_TEST */
- 1519, /* GL_STENCIL_CLEAR_VALUE */
- 1521, /* GL_STENCIL_FUNC */
- 1537, /* GL_STENCIL_VALUE_MASK */
- 1520, /* GL_STENCIL_FAIL */
- 1532, /* GL_STENCIL_PASS_DEPTH_FAIL */
- 1533, /* GL_STENCIL_PASS_DEPTH_PASS */
- 1534, /* GL_STENCIL_REF */
- 1538, /* GL_STENCIL_WRITEMASK */
- 854, /* GL_MATRIX_MODE */
- 1026, /* GL_NORMALIZE */
- 1865, /* GL_VIEWPORT */
- 1000, /* GL_MODELVIEW_STACK_DEPTH */
- 1264, /* GL_PROJECTION_STACK_DEPTH */
- 1745, /* GL_TEXTURE_STACK_DEPTH */
- 998, /* GL_MODELVIEW_MATRIX */
- 1263, /* GL_PROJECTION_MATRIX */
- 1728, /* GL_TEXTURE_MATRIX */
+ 1539, /* GL_STENCIL_TEST */
+ 1523, /* GL_STENCIL_CLEAR_VALUE */
+ 1525, /* GL_STENCIL_FUNC */
+ 1541, /* GL_STENCIL_VALUE_MASK */
+ 1524, /* GL_STENCIL_FAIL */
+ 1536, /* GL_STENCIL_PASS_DEPTH_FAIL */
+ 1537, /* GL_STENCIL_PASS_DEPTH_PASS */
+ 1538, /* GL_STENCIL_REF */
+ 1542, /* GL_STENCIL_WRITEMASK */
+ 855, /* GL_MATRIX_MODE */
+ 1027, /* GL_NORMALIZE */
+ 1870, /* GL_VIEWPORT */
+ 1001, /* GL_MODELVIEW_STACK_DEPTH */
+ 1265, /* GL_PROJECTION_STACK_DEPTH */
+ 1749, /* GL_TEXTURE_STACK_DEPTH */
+ 999, /* GL_MODELVIEW_MATRIX */
+ 1264, /* GL_PROJECTION_MATRIX */
+ 1732, /* GL_TEXTURE_MATRIX */
61, /* GL_ATTRIB_STACK_DEPTH */
- 136, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
+ 137, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
43, /* GL_ALPHA_TEST */
44, /* GL_ALPHA_TEST_FUNC */
45, /* GL_ALPHA_TEST_REF */
- 383, /* GL_DITHER */
+ 384, /* GL_DITHER */
78, /* GL_BLEND_DST */
87, /* GL_BLEND_SRC */
75, /* GL_BLEND */
- 723, /* GL_LOGIC_OP_MODE */
- 640, /* GL_INDEX_LOGIC_OP */
- 191, /* GL_COLOR_LOGIC_OP */
+ 724, /* GL_LOGIC_OP_MODE */
+ 641, /* GL_INDEX_LOGIC_OP */
+ 192, /* GL_COLOR_LOGIC_OP */
67, /* GL_AUX_BUFFERS */
- 394, /* GL_DRAW_BUFFER */
- 1304, /* GL_READ_BUFFER */
- 1418, /* GL_SCISSOR_BOX */
- 1419, /* GL_SCISSOR_TEST */
- 639, /* GL_INDEX_CLEAR_VALUE */
- 644, /* GL_INDEX_WRITEMASK */
- 188, /* GL_COLOR_CLEAR_VALUE */
- 230, /* GL_COLOR_WRITEMASK */
- 641, /* GL_INDEX_MODE */
- 1384, /* GL_RGBA_MODE */
- 393, /* GL_DOUBLEBUFFER */
- 1539, /* GL_STEREO */
- 1342, /* GL_RENDER_MODE */
- 1112, /* GL_PERSPECTIVE_CORRECTION_HINT */
- 1165, /* GL_POINT_SMOOTH_HINT */
- 707, /* GL_LINE_SMOOTH_HINT */
- 1182, /* GL_POLYGON_SMOOTH_HINT */
- 529, /* GL_FOG_HINT */
- 1709, /* GL_TEXTURE_GEN_S */
- 1710, /* GL_TEXTURE_GEN_T */
- 1708, /* GL_TEXTURE_GEN_R */
- 1707, /* GL_TEXTURE_GEN_Q */
- 1125, /* GL_PIXEL_MAP_I_TO_I */
- 1131, /* GL_PIXEL_MAP_S_TO_S */
- 1127, /* GL_PIXEL_MAP_I_TO_R */
- 1123, /* GL_PIXEL_MAP_I_TO_G */
- 1121, /* GL_PIXEL_MAP_I_TO_B */
- 1119, /* GL_PIXEL_MAP_I_TO_A */
- 1129, /* GL_PIXEL_MAP_R_TO_R */
- 1117, /* GL_PIXEL_MAP_G_TO_G */
- 1115, /* GL_PIXEL_MAP_B_TO_B */
- 1113, /* GL_PIXEL_MAP_A_TO_A */
- 1126, /* GL_PIXEL_MAP_I_TO_I_SIZE */
- 1132, /* GL_PIXEL_MAP_S_TO_S_SIZE */
- 1128, /* GL_PIXEL_MAP_I_TO_R_SIZE */
- 1124, /* GL_PIXEL_MAP_I_TO_G_SIZE */
- 1122, /* GL_PIXEL_MAP_I_TO_B_SIZE */
- 1120, /* GL_PIXEL_MAP_I_TO_A_SIZE */
- 1130, /* GL_PIXEL_MAP_R_TO_R_SIZE */
- 1118, /* GL_PIXEL_MAP_G_TO_G_SIZE */
- 1116, /* GL_PIXEL_MAP_B_TO_B_SIZE */
- 1114, /* GL_PIXEL_MAP_A_TO_A_SIZE */
- 1782, /* GL_UNPACK_SWAP_BYTES */
- 1777, /* GL_UNPACK_LSB_FIRST */
- 1778, /* GL_UNPACK_ROW_LENGTH */
- 1781, /* GL_UNPACK_SKIP_ROWS */
- 1780, /* GL_UNPACK_SKIP_PIXELS */
- 1775, /* GL_UNPACK_ALIGNMENT */
- 1100, /* GL_PACK_SWAP_BYTES */
- 1095, /* GL_PACK_LSB_FIRST */
- 1096, /* GL_PACK_ROW_LENGTH */
- 1099, /* GL_PACK_SKIP_ROWS */
- 1098, /* GL_PACK_SKIP_PIXELS */
- 1092, /* GL_PACK_ALIGNMENT */
- 801, /* GL_MAP_COLOR */
- 806, /* GL_MAP_STENCIL */
- 643, /* GL_INDEX_SHIFT */
- 642, /* GL_INDEX_OFFSET */
- 1318, /* GL_RED_SCALE */
- 1316, /* GL_RED_BIAS */
- 1883, /* GL_ZOOM_X */
- 1884, /* GL_ZOOM_Y */
- 603, /* GL_GREEN_SCALE */
- 601, /* GL_GREEN_BIAS */
+ 395, /* GL_DRAW_BUFFER */
+ 1306, /* GL_READ_BUFFER */
+ 1422, /* GL_SCISSOR_BOX */
+ 1423, /* GL_SCISSOR_TEST */
+ 640, /* GL_INDEX_CLEAR_VALUE */
+ 645, /* GL_INDEX_WRITEMASK */
+ 189, /* GL_COLOR_CLEAR_VALUE */
+ 231, /* GL_COLOR_WRITEMASK */
+ 642, /* GL_INDEX_MODE */
+ 1388, /* GL_RGBA_MODE */
+ 394, /* GL_DOUBLEBUFFER */
+ 1543, /* GL_STEREO */
+ 1345, /* GL_RENDER_MODE */
+ 1113, /* GL_PERSPECTIVE_CORRECTION_HINT */
+ 1166, /* GL_POINT_SMOOTH_HINT */
+ 708, /* GL_LINE_SMOOTH_HINT */
+ 1183, /* GL_POLYGON_SMOOTH_HINT */
+ 530, /* GL_FOG_HINT */
+ 1713, /* GL_TEXTURE_GEN_S */
+ 1714, /* GL_TEXTURE_GEN_T */
+ 1712, /* GL_TEXTURE_GEN_R */
+ 1711, /* GL_TEXTURE_GEN_Q */
+ 1126, /* GL_PIXEL_MAP_I_TO_I */
+ 1132, /* GL_PIXEL_MAP_S_TO_S */
+ 1128, /* GL_PIXEL_MAP_I_TO_R */
+ 1124, /* GL_PIXEL_MAP_I_TO_G */
+ 1122, /* GL_PIXEL_MAP_I_TO_B */
+ 1120, /* GL_PIXEL_MAP_I_TO_A */
+ 1130, /* GL_PIXEL_MAP_R_TO_R */
+ 1118, /* GL_PIXEL_MAP_G_TO_G */
+ 1116, /* GL_PIXEL_MAP_B_TO_B */
+ 1114, /* GL_PIXEL_MAP_A_TO_A */
+ 1127, /* GL_PIXEL_MAP_I_TO_I_SIZE */
+ 1133, /* GL_PIXEL_MAP_S_TO_S_SIZE */
+ 1129, /* GL_PIXEL_MAP_I_TO_R_SIZE */
+ 1125, /* GL_PIXEL_MAP_I_TO_G_SIZE */
+ 1123, /* GL_PIXEL_MAP_I_TO_B_SIZE */
+ 1121, /* GL_PIXEL_MAP_I_TO_A_SIZE */
+ 1131, /* GL_PIXEL_MAP_R_TO_R_SIZE */
+ 1119, /* GL_PIXEL_MAP_G_TO_G_SIZE */
+ 1117, /* GL_PIXEL_MAP_B_TO_B_SIZE */
+ 1115, /* GL_PIXEL_MAP_A_TO_A_SIZE */
+ 1787, /* GL_UNPACK_SWAP_BYTES */
+ 1782, /* GL_UNPACK_LSB_FIRST */
+ 1783, /* GL_UNPACK_ROW_LENGTH */
+ 1786, /* GL_UNPACK_SKIP_ROWS */
+ 1785, /* GL_UNPACK_SKIP_PIXELS */
+ 1780, /* GL_UNPACK_ALIGNMENT */
+ 1101, /* GL_PACK_SWAP_BYTES */
+ 1096, /* GL_PACK_LSB_FIRST */
+ 1097, /* GL_PACK_ROW_LENGTH */
+ 1100, /* GL_PACK_SKIP_ROWS */
+ 1099, /* GL_PACK_SKIP_PIXELS */
+ 1093, /* GL_PACK_ALIGNMENT */
+ 802, /* GL_MAP_COLOR */
+ 807, /* GL_MAP_STENCIL */
+ 644, /* GL_INDEX_SHIFT */
+ 643, /* GL_INDEX_OFFSET */
+ 1320, /* GL_RED_SCALE */
+ 1318, /* GL_RED_BIAS */
+ 1889, /* GL_ZOOM_X */
+ 1890, /* GL_ZOOM_Y */
+ 604, /* GL_GREEN_SCALE */
+ 602, /* GL_GREEN_BIAS */
93, /* GL_BLUE_SCALE */
91, /* GL_BLUE_BIAS */
42, /* GL_ALPHA_SCALE */
40, /* GL_ALPHA_BIAS */
- 371, /* GL_DEPTH_SCALE */
- 351, /* GL_DEPTH_BIAS */
- 881, /* GL_MAX_EVAL_ORDER */
- 885, /* GL_MAX_LIGHTS */
- 863, /* GL_MAX_CLIP_PLANES */
- 933, /* GL_MAX_TEXTURE_SIZE */
- 891, /* GL_MAX_PIXEL_MAP_TABLE */
- 859, /* GL_MAX_ATTRIB_STACK_DEPTH */
- 888, /* GL_MAX_MODELVIEW_STACK_DEPTH */
- 889, /* GL_MAX_NAME_STACK_DEPTH */
- 917, /* GL_MAX_PROJECTION_STACK_DEPTH */
- 934, /* GL_MAX_TEXTURE_STACK_DEPTH */
- 948, /* GL_MAX_VIEWPORT_DIMS */
- 860, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
- 1549, /* GL_SUBPIXEL_BITS */
- 638, /* GL_INDEX_BITS */
- 1317, /* GL_RED_BITS */
- 602, /* GL_GREEN_BITS */
+ 372, /* GL_DEPTH_SCALE */
+ 352, /* GL_DEPTH_BIAS */
+ 882, /* GL_MAX_EVAL_ORDER */
+ 886, /* GL_MAX_LIGHTS */
+ 864, /* GL_MAX_CLIP_PLANES */
+ 934, /* GL_MAX_TEXTURE_SIZE */
+ 892, /* GL_MAX_PIXEL_MAP_TABLE */
+ 860, /* GL_MAX_ATTRIB_STACK_DEPTH */
+ 889, /* GL_MAX_MODELVIEW_STACK_DEPTH */
+ 890, /* GL_MAX_NAME_STACK_DEPTH */
+ 918, /* GL_MAX_PROJECTION_STACK_DEPTH */
+ 935, /* GL_MAX_TEXTURE_STACK_DEPTH */
+ 949, /* GL_MAX_VIEWPORT_DIMS */
+ 861, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
+ 1553, /* GL_SUBPIXEL_BITS */
+ 639, /* GL_INDEX_BITS */
+ 1319, /* GL_RED_BITS */
+ 603, /* GL_GREEN_BITS */
92, /* GL_BLUE_BITS */
41, /* GL_ALPHA_BITS */
- 352, /* GL_DEPTH_BITS */
- 1517, /* GL_STENCIL_BITS */
+ 353, /* GL_DEPTH_BITS */
+ 1521, /* GL_STENCIL_BITS */
14, /* GL_ACCUM_RED_BITS */
13, /* GL_ACCUM_GREEN_BITS */
10, /* GL_ACCUM_BLUE_BITS */
9, /* GL_ACCUM_ALPHA_BITS */
- 1014, /* GL_NAME_STACK_DEPTH */
+ 1015, /* GL_NAME_STACK_DEPTH */
62, /* GL_AUTO_NORMAL */
- 747, /* GL_MAP1_COLOR_4 */
- 750, /* GL_MAP1_INDEX */
- 751, /* GL_MAP1_NORMAL */
- 752, /* GL_MAP1_TEXTURE_COORD_1 */
- 753, /* GL_MAP1_TEXTURE_COORD_2 */
- 754, /* GL_MAP1_TEXTURE_COORD_3 */
- 755, /* GL_MAP1_TEXTURE_COORD_4 */
- 756, /* GL_MAP1_VERTEX_3 */
- 757, /* GL_MAP1_VERTEX_4 */
- 774, /* GL_MAP2_COLOR_4 */
- 777, /* GL_MAP2_INDEX */
- 778, /* GL_MAP2_NORMAL */
- 779, /* GL_MAP2_TEXTURE_COORD_1 */
- 780, /* GL_MAP2_TEXTURE_COORD_2 */
- 781, /* GL_MAP2_TEXTURE_COORD_3 */
- 782, /* GL_MAP2_TEXTURE_COORD_4 */
- 783, /* GL_MAP2_VERTEX_3 */
- 784, /* GL_MAP2_VERTEX_4 */
- 748, /* GL_MAP1_GRID_DOMAIN */
- 749, /* GL_MAP1_GRID_SEGMENTS */
- 775, /* GL_MAP2_GRID_DOMAIN */
- 776, /* GL_MAP2_GRID_SEGMENTS */
- 1632, /* GL_TEXTURE_1D */
- 1634, /* GL_TEXTURE_2D */
- 482, /* GL_FEEDBACK_BUFFER_POINTER */
- 483, /* GL_FEEDBACK_BUFFER_SIZE */
- 484, /* GL_FEEDBACK_BUFFER_TYPE */
- 1428, /* GL_SELECTION_BUFFER_POINTER */
- 1429, /* GL_SELECTION_BUFFER_SIZE */
- 1751, /* GL_TEXTURE_WIDTH */
- 1714, /* GL_TEXTURE_HEIGHT */
- 1669, /* GL_TEXTURE_COMPONENTS */
- 1653, /* GL_TEXTURE_BORDER_COLOR */
- 1652, /* GL_TEXTURE_BORDER */
- 385, /* GL_DONT_CARE */
- 480, /* GL_FASTEST */
- 1022, /* GL_NICEST */
+ 748, /* GL_MAP1_COLOR_4 */
+ 751, /* GL_MAP1_INDEX */
+ 752, /* GL_MAP1_NORMAL */
+ 753, /* GL_MAP1_TEXTURE_COORD_1 */
+ 754, /* GL_MAP1_TEXTURE_COORD_2 */
+ 755, /* GL_MAP1_TEXTURE_COORD_3 */
+ 756, /* GL_MAP1_TEXTURE_COORD_4 */
+ 757, /* GL_MAP1_VERTEX_3 */
+ 758, /* GL_MAP1_VERTEX_4 */
+ 775, /* GL_MAP2_COLOR_4 */
+ 778, /* GL_MAP2_INDEX */
+ 779, /* GL_MAP2_NORMAL */
+ 780, /* GL_MAP2_TEXTURE_COORD_1 */
+ 781, /* GL_MAP2_TEXTURE_COORD_2 */
+ 782, /* GL_MAP2_TEXTURE_COORD_3 */
+ 783, /* GL_MAP2_TEXTURE_COORD_4 */
+ 784, /* GL_MAP2_VERTEX_3 */
+ 785, /* GL_MAP2_VERTEX_4 */
+ 749, /* GL_MAP1_GRID_DOMAIN */
+ 750, /* GL_MAP1_GRID_SEGMENTS */
+ 776, /* GL_MAP2_GRID_DOMAIN */
+ 777, /* GL_MAP2_GRID_SEGMENTS */
+ 1636, /* GL_TEXTURE_1D */
+ 1638, /* GL_TEXTURE_2D */
+ 483, /* GL_FEEDBACK_BUFFER_POINTER */
+ 484, /* GL_FEEDBACK_BUFFER_SIZE */
+ 485, /* GL_FEEDBACK_BUFFER_TYPE */
+ 1432, /* GL_SELECTION_BUFFER_POINTER */
+ 1433, /* GL_SELECTION_BUFFER_SIZE */
+ 1755, /* GL_TEXTURE_WIDTH */
+ 1718, /* GL_TEXTURE_HEIGHT */
+ 1673, /* GL_TEXTURE_COMPONENTS */
+ 1657, /* GL_TEXTURE_BORDER_COLOR */
+ 1656, /* GL_TEXTURE_BORDER */
+ 386, /* GL_DONT_CARE */
+ 481, /* GL_FASTEST */
+ 1023, /* GL_NICEST */
48, /* GL_AMBIENT */
- 382, /* GL_DIFFUSE */
- 1477, /* GL_SPECULAR */
- 1186, /* GL_POSITION */
- 1480, /* GL_SPOT_DIRECTION */
- 1481, /* GL_SPOT_EXPONENT */
- 1479, /* GL_SPOT_CUTOFF */
- 275, /* GL_CONSTANT_ATTENUATION */
- 697, /* GL_LINEAR_ATTENUATION */
- 1285, /* GL_QUADRATIC_ATTENUATION */
- 244, /* GL_COMPILE */
- 245, /* GL_COMPILE_AND_EXECUTE */
- 120, /* GL_BYTE */
- 1784, /* GL_UNSIGNED_BYTE */
- 1442, /* GL_SHORT */
- 1796, /* GL_UNSIGNED_SHORT */
- 646, /* GL_INT */
- 1787, /* GL_UNSIGNED_INT */
- 489, /* GL_FLOAT */
+ 383, /* GL_DIFFUSE */
+ 1481, /* GL_SPECULAR */
+ 1187, /* GL_POSITION */
+ 1484, /* GL_SPOT_DIRECTION */
+ 1485, /* GL_SPOT_EXPONENT */
+ 1483, /* GL_SPOT_CUTOFF */
+ 276, /* GL_CONSTANT_ATTENUATION */
+ 698, /* GL_LINEAR_ATTENUATION */
+ 1287, /* GL_QUADRATIC_ATTENUATION */
+ 245, /* GL_COMPILE */
+ 246, /* GL_COMPILE_AND_EXECUTE */
+ 121, /* GL_BYTE */
+ 1789, /* GL_UNSIGNED_BYTE */
+ 1446, /* GL_SHORT */
+ 1801, /* GL_UNSIGNED_SHORT */
+ 647, /* GL_INT */
+ 1792, /* GL_UNSIGNED_INT */
+ 490, /* GL_FLOAT */
1, /* GL_2_BYTES */
5, /* GL_3_BYTES */
7, /* GL_4_BYTES */
- 392, /* GL_DOUBLE */
- 604, /* GL_HALF_FLOAT */
- 132, /* GL_CLEAR */
+ 393, /* GL_DOUBLE */
+ 605, /* GL_HALF_FLOAT */
+ 133, /* GL_CLEAR */
50, /* GL_AND */
52, /* GL_AND_REVERSE */
- 299, /* GL_COPY */
+ 300, /* GL_COPY */
51, /* GL_AND_INVERTED */
- 1024, /* GL_NOOP */
- 1879, /* GL_XOR */
- 1087, /* GL_OR */
- 1025, /* GL_NOR */
- 470, /* GL_EQUIV */
- 673, /* GL_INVERT */
- 1090, /* GL_OR_REVERSE */
- 300, /* GL_COPY_INVERTED */
- 1089, /* GL_OR_INVERTED */
- 1015, /* GL_NAND */
- 1433, /* GL_SET */
- 467, /* GL_EMISSION */
- 1441, /* GL_SHININESS */
+ 1025, /* GL_NOOP */
+ 1885, /* GL_XOR */
+ 1088, /* GL_OR */
+ 1026, /* GL_NOR */
+ 471, /* GL_EQUIV */
+ 674, /* GL_INVERT */
+ 1091, /* GL_OR_REVERSE */
+ 301, /* GL_COPY_INVERTED */
+ 1090, /* GL_OR_INVERTED */
+ 1016, /* GL_NAND */
+ 1437, /* GL_SET */
+ 468, /* GL_EMISSION */
+ 1445, /* GL_SHININESS */
49, /* GL_AMBIENT_AND_DIFFUSE */
- 190, /* GL_COLOR_INDEXES */
- 965, /* GL_MODELVIEW */
- 1262, /* GL_PROJECTION */
- 1567, /* GL_TEXTURE */
- 147, /* GL_COLOR */
- 346, /* GL_DEPTH */
- 1503, /* GL_STENCIL */
- 189, /* GL_COLOR_INDEX */
- 1522, /* GL_STENCIL_INDEX */
- 359, /* GL_DEPTH_COMPONENT */
- 1313, /* GL_RED */
- 600, /* GL_GREEN */
+ 191, /* GL_COLOR_INDEXES */
+ 966, /* GL_MODELVIEW */
+ 1263, /* GL_PROJECTION */
+ 1571, /* GL_TEXTURE */
+ 148, /* GL_COLOR */
+ 347, /* GL_DEPTH */
+ 1507, /* GL_STENCIL */
+ 190, /* GL_COLOR_INDEX */
+ 1526, /* GL_STENCIL_INDEX */
+ 360, /* GL_DEPTH_COMPONENT */
+ 1315, /* GL_RED */
+ 601, /* GL_GREEN */
90, /* GL_BLUE */
31, /* GL_ALPHA */
- 1350, /* GL_RGB */
- 1369, /* GL_RGBA */
- 725, /* GL_LUMINANCE */
- 746, /* GL_LUMINANCE_ALPHA */
+ 1354, /* GL_RGB */
+ 1373, /* GL_RGBA */
+ 726, /* GL_LUMINANCE */
+ 747, /* GL_LUMINANCE_ALPHA */
73, /* GL_BITMAP */
- 1142, /* GL_POINT */
- 695, /* GL_LINE */
- 485, /* GL_FILL */
- 1322, /* GL_RENDER */
- 481, /* GL_FEEDBACK */
- 1427, /* GL_SELECT */
- 488, /* GL_FLAT */
- 1452, /* GL_SMOOTH */
- 674, /* GL_KEEP */
- 1344, /* GL_REPLACE */
- 628, /* GL_INCR */
- 342, /* GL_DECR */
- 1811, /* GL_VENDOR */
- 1341, /* GL_RENDERER */
- 1812, /* GL_VERSION */
- 474, /* GL_EXTENSIONS */
- 1392, /* GL_S */
- 1558, /* GL_T */
- 1301, /* GL_R */
- 1284, /* GL_Q */
- 1001, /* GL_MODULATE */
- 341, /* GL_DECAL */
- 1704, /* GL_TEXTURE_ENV_MODE */
- 1703, /* GL_TEXTURE_ENV_COLOR */
- 1702, /* GL_TEXTURE_ENV */
- 475, /* GL_EYE_LINEAR */
- 1048, /* GL_OBJECT_LINEAR */
- 1478, /* GL_SPHERE_MAP */
- 1706, /* GL_TEXTURE_GEN_MODE */
- 1050, /* GL_OBJECT_PLANE */
- 476, /* GL_EYE_PLANE */
- 1016, /* GL_NEAREST */
- 696, /* GL_LINEAR */
- 1020, /* GL_NEAREST_MIPMAP_NEAREST */
- 701, /* GL_LINEAR_MIPMAP_NEAREST */
- 1019, /* GL_NEAREST_MIPMAP_LINEAR */
- 700, /* GL_LINEAR_MIPMAP_LINEAR */
- 1727, /* GL_TEXTURE_MAG_FILTER */
- 1735, /* GL_TEXTURE_MIN_FILTER */
- 1753, /* GL_TEXTURE_WRAP_S */
- 1754, /* GL_TEXTURE_WRAP_T */
- 126, /* GL_CLAMP */
- 1343, /* GL_REPEAT */
- 1180, /* GL_POLYGON_OFFSET_UNITS */
- 1179, /* GL_POLYGON_OFFSET_POINT */
- 1178, /* GL_POLYGON_OFFSET_LINE */
- 1302, /* GL_R3_G3_B2 */
- 1808, /* GL_V2F */
- 1809, /* GL_V3F */
- 123, /* GL_C4UB_V2F */
- 124, /* GL_C4UB_V3F */
- 121, /* GL_C3F_V3F */
- 1013, /* GL_N3F_V3F */
- 122, /* GL_C4F_N3F_V3F */
- 1563, /* GL_T2F_V3F */
- 1565, /* GL_T4F_V4F */
- 1561, /* GL_T2F_C4UB_V3F */
- 1559, /* GL_T2F_C3F_V3F */
- 1562, /* GL_T2F_N3F_V3F */
- 1560, /* GL_T2F_C4F_N3F_V3F */
- 1564, /* GL_T4F_C4F_N3F_V4F */
- 139, /* GL_CLIP_PLANE0 */
- 140, /* GL_CLIP_PLANE1 */
- 141, /* GL_CLIP_PLANE2 */
- 142, /* GL_CLIP_PLANE3 */
- 143, /* GL_CLIP_PLANE4 */
- 144, /* GL_CLIP_PLANE5 */
- 680, /* GL_LIGHT0 */
- 681, /* GL_LIGHT1 */
- 682, /* GL_LIGHT2 */
- 683, /* GL_LIGHT3 */
- 684, /* GL_LIGHT4 */
- 685, /* GL_LIGHT5 */
- 686, /* GL_LIGHT6 */
- 687, /* GL_LIGHT7 */
- 605, /* GL_HINT_BIT */
- 277, /* GL_CONSTANT_COLOR */
- 1061, /* GL_ONE_MINUS_CONSTANT_COLOR */
- 272, /* GL_CONSTANT_ALPHA */
- 1059, /* GL_ONE_MINUS_CONSTANT_ALPHA */
+ 1143, /* GL_POINT */
+ 696, /* GL_LINE */
+ 486, /* GL_FILL */
+ 1325, /* GL_RENDER */
+ 482, /* GL_FEEDBACK */
+ 1431, /* GL_SELECT */
+ 489, /* GL_FLAT */
+ 1456, /* GL_SMOOTH */
+ 675, /* GL_KEEP */
+ 1347, /* GL_REPLACE */
+ 629, /* GL_INCR */
+ 343, /* GL_DECR */
+ 1816, /* GL_VENDOR */
+ 1344, /* GL_RENDERER */
+ 1817, /* GL_VERSION */
+ 475, /* GL_EXTENSIONS */
+ 1396, /* GL_S */
+ 1562, /* GL_T */
+ 1303, /* GL_R */
+ 1286, /* GL_Q */
+ 1002, /* GL_MODULATE */
+ 342, /* GL_DECAL */
+ 1708, /* GL_TEXTURE_ENV_MODE */
+ 1707, /* GL_TEXTURE_ENV_COLOR */
+ 1706, /* GL_TEXTURE_ENV */
+ 476, /* GL_EYE_LINEAR */
+ 1049, /* GL_OBJECT_LINEAR */
+ 1482, /* GL_SPHERE_MAP */
+ 1710, /* GL_TEXTURE_GEN_MODE */
+ 1051, /* GL_OBJECT_PLANE */
+ 477, /* GL_EYE_PLANE */
+ 1017, /* GL_NEAREST */
+ 697, /* GL_LINEAR */
+ 1021, /* GL_NEAREST_MIPMAP_NEAREST */
+ 702, /* GL_LINEAR_MIPMAP_NEAREST */
+ 1020, /* GL_NEAREST_MIPMAP_LINEAR */
+ 701, /* GL_LINEAR_MIPMAP_LINEAR */
+ 1731, /* GL_TEXTURE_MAG_FILTER */
+ 1739, /* GL_TEXTURE_MIN_FILTER */
+ 1757, /* GL_TEXTURE_WRAP_S */
+ 1758, /* GL_TEXTURE_WRAP_T */
+ 127, /* GL_CLAMP */
+ 1346, /* GL_REPEAT */
+ 1181, /* GL_POLYGON_OFFSET_UNITS */
+ 1180, /* GL_POLYGON_OFFSET_POINT */
+ 1179, /* GL_POLYGON_OFFSET_LINE */
+ 1304, /* GL_R3_G3_B2 */
+ 1813, /* GL_V2F */
+ 1814, /* GL_V3F */
+ 124, /* GL_C4UB_V2F */
+ 125, /* GL_C4UB_V3F */
+ 122, /* GL_C3F_V3F */
+ 1014, /* GL_N3F_V3F */
+ 123, /* GL_C4F_N3F_V3F */
+ 1567, /* GL_T2F_V3F */
+ 1569, /* GL_T4F_V4F */
+ 1565, /* GL_T2F_C4UB_V3F */
+ 1563, /* GL_T2F_C3F_V3F */
+ 1566, /* GL_T2F_N3F_V3F */
+ 1564, /* GL_T2F_C4F_N3F_V3F */
+ 1568, /* GL_T4F_C4F_N3F_V4F */
+ 140, /* GL_CLIP_PLANE0 */
+ 141, /* GL_CLIP_PLANE1 */
+ 142, /* GL_CLIP_PLANE2 */
+ 143, /* GL_CLIP_PLANE3 */
+ 144, /* GL_CLIP_PLANE4 */
+ 145, /* GL_CLIP_PLANE5 */
+ 681, /* GL_LIGHT0 */
+ 682, /* GL_LIGHT1 */
+ 683, /* GL_LIGHT2 */
+ 684, /* GL_LIGHT3 */
+ 685, /* GL_LIGHT4 */
+ 686, /* GL_LIGHT5 */
+ 687, /* GL_LIGHT6 */
+ 688, /* GL_LIGHT7 */
+ 606, /* GL_HINT_BIT */
+ 278, /* GL_CONSTANT_COLOR */
+ 1062, /* GL_ONE_MINUS_CONSTANT_COLOR */
+ 273, /* GL_CONSTANT_ALPHA */
+ 1060, /* GL_ONE_MINUS_CONSTANT_ALPHA */
76, /* GL_BLEND_COLOR */
- 588, /* GL_FUNC_ADD */
- 949, /* GL_MIN */
- 856, /* GL_MAX */
+ 589, /* GL_FUNC_ADD */
+ 950, /* GL_MIN */
+ 857, /* GL_MAX */
81, /* GL_BLEND_EQUATION */
- 592, /* GL_FUNC_SUBTRACT */
- 590, /* GL_FUNC_REVERSE_SUBTRACT */
- 280, /* GL_CONVOLUTION_1D */
- 281, /* GL_CONVOLUTION_2D */
- 1430, /* GL_SEPARABLE_2D */
- 284, /* GL_CONVOLUTION_BORDER_MODE */
- 288, /* GL_CONVOLUTION_FILTER_SCALE */
- 286, /* GL_CONVOLUTION_FILTER_BIAS */
- 1314, /* GL_REDUCE */
- 290, /* GL_CONVOLUTION_FORMAT */
- 294, /* GL_CONVOLUTION_WIDTH */
- 292, /* GL_CONVOLUTION_HEIGHT */
- 872, /* GL_MAX_CONVOLUTION_WIDTH */
- 870, /* GL_MAX_CONVOLUTION_HEIGHT */
- 1219, /* GL_POST_CONVOLUTION_RED_SCALE */
- 1215, /* GL_POST_CONVOLUTION_GREEN_SCALE */
- 1210, /* GL_POST_CONVOLUTION_BLUE_SCALE */
- 1206, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
- 1217, /* GL_POST_CONVOLUTION_RED_BIAS */
- 1213, /* GL_POST_CONVOLUTION_GREEN_BIAS */
- 1208, /* GL_POST_CONVOLUTION_BLUE_BIAS */
- 1204, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
- 606, /* GL_HISTOGRAM */
- 1268, /* GL_PROXY_HISTOGRAM */
- 622, /* GL_HISTOGRAM_WIDTH */
- 612, /* GL_HISTOGRAM_FORMAT */
- 618, /* GL_HISTOGRAM_RED_SIZE */
- 614, /* GL_HISTOGRAM_GREEN_SIZE */
- 609, /* GL_HISTOGRAM_BLUE_SIZE */
- 607, /* GL_HISTOGRAM_ALPHA_SIZE */
- 616, /* GL_HISTOGRAM_LUMINANCE_SIZE */
- 620, /* GL_HISTOGRAM_SINK */
- 950, /* GL_MINMAX */
- 952, /* GL_MINMAX_FORMAT */
- 954, /* GL_MINMAX_SINK */
- 1566, /* GL_TABLE_TOO_LARGE_EXT */
- 1786, /* GL_UNSIGNED_BYTE_3_3_2 */
- 1798, /* GL_UNSIGNED_SHORT_4_4_4_4 */
- 1800, /* GL_UNSIGNED_SHORT_5_5_5_1 */
- 1793, /* GL_UNSIGNED_INT_8_8_8_8 */
- 1788, /* GL_UNSIGNED_INT_10_10_10_2 */
- 1177, /* GL_POLYGON_OFFSET_FILL */
- 1176, /* GL_POLYGON_OFFSET_FACTOR */
- 1175, /* GL_POLYGON_OFFSET_BIAS */
- 1347, /* GL_RESCALE_NORMAL */
+ 593, /* GL_FUNC_SUBTRACT */
+ 591, /* GL_FUNC_REVERSE_SUBTRACT */
+ 281, /* GL_CONVOLUTION_1D */
+ 282, /* GL_CONVOLUTION_2D */
+ 1434, /* GL_SEPARABLE_2D */
+ 285, /* GL_CONVOLUTION_BORDER_MODE */
+ 289, /* GL_CONVOLUTION_FILTER_SCALE */
+ 287, /* GL_CONVOLUTION_FILTER_BIAS */
+ 1316, /* GL_REDUCE */
+ 291, /* GL_CONVOLUTION_FORMAT */
+ 295, /* GL_CONVOLUTION_WIDTH */
+ 293, /* GL_CONVOLUTION_HEIGHT */
+ 873, /* GL_MAX_CONVOLUTION_WIDTH */
+ 871, /* GL_MAX_CONVOLUTION_HEIGHT */
+ 1220, /* GL_POST_CONVOLUTION_RED_SCALE */
+ 1216, /* GL_POST_CONVOLUTION_GREEN_SCALE */
+ 1211, /* GL_POST_CONVOLUTION_BLUE_SCALE */
+ 1207, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
+ 1218, /* GL_POST_CONVOLUTION_RED_BIAS */
+ 1214, /* GL_POST_CONVOLUTION_GREEN_BIAS */
+ 1209, /* GL_POST_CONVOLUTION_BLUE_BIAS */
+ 1205, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
+ 607, /* GL_HISTOGRAM */
+ 1269, /* GL_PROXY_HISTOGRAM */
+ 623, /* GL_HISTOGRAM_WIDTH */
+ 613, /* GL_HISTOGRAM_FORMAT */
+ 619, /* GL_HISTOGRAM_RED_SIZE */
+ 615, /* GL_HISTOGRAM_GREEN_SIZE */
+ 610, /* GL_HISTOGRAM_BLUE_SIZE */
+ 608, /* GL_HISTOGRAM_ALPHA_SIZE */
+ 617, /* GL_HISTOGRAM_LUMINANCE_SIZE */
+ 621, /* GL_HISTOGRAM_SINK */
+ 951, /* GL_MINMAX */
+ 953, /* GL_MINMAX_FORMAT */
+ 955, /* GL_MINMAX_SINK */
+ 1570, /* GL_TABLE_TOO_LARGE_EXT */
+ 1791, /* GL_UNSIGNED_BYTE_3_3_2 */
+ 1803, /* GL_UNSIGNED_SHORT_4_4_4_4 */
+ 1805, /* GL_UNSIGNED_SHORT_5_5_5_1 */
+ 1798, /* GL_UNSIGNED_INT_8_8_8_8 */
+ 1793, /* GL_UNSIGNED_INT_10_10_10_2 */
+ 1178, /* GL_POLYGON_OFFSET_FILL */
+ 1177, /* GL_POLYGON_OFFSET_FACTOR */
+ 1176, /* GL_POLYGON_OFFSET_BIAS */
+ 1350, /* GL_RESCALE_NORMAL */
36, /* GL_ALPHA4 */
38, /* GL_ALPHA8 */
32, /* GL_ALPHA12 */
34, /* GL_ALPHA16 */
- 736, /* GL_LUMINANCE4 */
- 742, /* GL_LUMINANCE8 */
- 726, /* GL_LUMINANCE12 */
- 732, /* GL_LUMINANCE16 */
- 737, /* GL_LUMINANCE4_ALPHA4 */
- 740, /* GL_LUMINANCE6_ALPHA2 */
- 743, /* GL_LUMINANCE8_ALPHA8 */
- 729, /* GL_LUMINANCE12_ALPHA4 */
- 727, /* GL_LUMINANCE12_ALPHA12 */
- 733, /* GL_LUMINANCE16_ALPHA16 */
- 647, /* GL_INTENSITY */
- 652, /* GL_INTENSITY4 */
- 654, /* GL_INTENSITY8 */
- 648, /* GL_INTENSITY12 */
- 650, /* GL_INTENSITY16 */
- 1359, /* GL_RGB2_EXT */
- 1360, /* GL_RGB4 */
- 1363, /* GL_RGB5 */
- 1367, /* GL_RGB8 */
- 1351, /* GL_RGB10 */
- 1355, /* GL_RGB12 */
- 1357, /* GL_RGB16 */
- 1374, /* GL_RGBA2 */
- 1376, /* GL_RGBA4 */
- 1364, /* GL_RGB5_A1 */
- 1380, /* GL_RGBA8 */
- 1352, /* GL_RGB10_A2 */
- 1370, /* GL_RGBA12 */
- 1372, /* GL_RGBA16 */
- 1742, /* GL_TEXTURE_RED_SIZE */
- 1712, /* GL_TEXTURE_GREEN_SIZE */
- 1650, /* GL_TEXTURE_BLUE_SIZE */
- 1637, /* GL_TEXTURE_ALPHA_SIZE */
- 1725, /* GL_TEXTURE_LUMINANCE_SIZE */
- 1716, /* GL_TEXTURE_INTENSITY_SIZE */
- 1345, /* GL_REPLACE_EXT */
- 1272, /* GL_PROXY_TEXTURE_1D */
- 1275, /* GL_PROXY_TEXTURE_2D */
- 1749, /* GL_TEXTURE_TOO_LARGE_EXT */
- 1737, /* GL_TEXTURE_PRIORITY */
- 1744, /* GL_TEXTURE_RESIDENT */
- 1640, /* GL_TEXTURE_BINDING_1D */
- 1642, /* GL_TEXTURE_BINDING_2D */
- 1644, /* GL_TEXTURE_BINDING_3D */
- 1097, /* GL_PACK_SKIP_IMAGES */
- 1093, /* GL_PACK_IMAGE_HEIGHT */
- 1779, /* GL_UNPACK_SKIP_IMAGES */
- 1776, /* GL_UNPACK_IMAGE_HEIGHT */
- 1636, /* GL_TEXTURE_3D */
- 1278, /* GL_PROXY_TEXTURE_3D */
- 1699, /* GL_TEXTURE_DEPTH */
- 1752, /* GL_TEXTURE_WRAP_R */
- 857, /* GL_MAX_3D_TEXTURE_SIZE */
- 1813, /* GL_VERTEX_ARRAY */
- 1027, /* GL_NORMAL_ARRAY */
- 148, /* GL_COLOR_ARRAY */
- 632, /* GL_INDEX_ARRAY */
- 1677, /* GL_TEXTURE_COORD_ARRAY */
- 459, /* GL_EDGE_FLAG_ARRAY */
- 1819, /* GL_VERTEX_ARRAY_SIZE */
- 1821, /* GL_VERTEX_ARRAY_TYPE */
- 1820, /* GL_VERTEX_ARRAY_STRIDE */
- 1032, /* GL_NORMAL_ARRAY_TYPE */
- 1031, /* GL_NORMAL_ARRAY_STRIDE */
- 152, /* GL_COLOR_ARRAY_SIZE */
- 154, /* GL_COLOR_ARRAY_TYPE */
- 153, /* GL_COLOR_ARRAY_STRIDE */
- 637, /* GL_INDEX_ARRAY_TYPE */
- 636, /* GL_INDEX_ARRAY_STRIDE */
- 1681, /* GL_TEXTURE_COORD_ARRAY_SIZE */
- 1683, /* GL_TEXTURE_COORD_ARRAY_TYPE */
- 1682, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
- 463, /* GL_EDGE_FLAG_ARRAY_STRIDE */
- 1818, /* GL_VERTEX_ARRAY_POINTER */
- 1030, /* GL_NORMAL_ARRAY_POINTER */
- 151, /* GL_COLOR_ARRAY_POINTER */
- 635, /* GL_INDEX_ARRAY_POINTER */
- 1680, /* GL_TEXTURE_COORD_ARRAY_POINTER */
- 462, /* GL_EDGE_FLAG_ARRAY_POINTER */
- 1006, /* GL_MULTISAMPLE */
- 1404, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
- 1406, /* GL_SAMPLE_ALPHA_TO_ONE */
- 1411, /* GL_SAMPLE_COVERAGE */
- 1408, /* GL_SAMPLE_BUFFERS */
- 1399, /* GL_SAMPLES */
- 1415, /* GL_SAMPLE_COVERAGE_VALUE */
- 1413, /* GL_SAMPLE_COVERAGE_INVERT */
- 195, /* GL_COLOR_MATRIX */
- 197, /* GL_COLOR_MATRIX_STACK_DEPTH */
- 866, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
- 1202, /* GL_POST_COLOR_MATRIX_RED_SCALE */
- 1198, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
- 1193, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
- 1189, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
- 1200, /* GL_POST_COLOR_MATRIX_RED_BIAS */
- 1196, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
- 1191, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
- 1187, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
- 1660, /* GL_TEXTURE_COLOR_TABLE_SGI */
- 1279, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
- 1662, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
+ 737, /* GL_LUMINANCE4 */
+ 743, /* GL_LUMINANCE8 */
+ 727, /* GL_LUMINANCE12 */
+ 733, /* GL_LUMINANCE16 */
+ 738, /* GL_LUMINANCE4_ALPHA4 */
+ 741, /* GL_LUMINANCE6_ALPHA2 */
+ 744, /* GL_LUMINANCE8_ALPHA8 */
+ 730, /* GL_LUMINANCE12_ALPHA4 */
+ 728, /* GL_LUMINANCE12_ALPHA12 */
+ 734, /* GL_LUMINANCE16_ALPHA16 */
+ 648, /* GL_INTENSITY */
+ 653, /* GL_INTENSITY4 */
+ 655, /* GL_INTENSITY8 */
+ 649, /* GL_INTENSITY12 */
+ 651, /* GL_INTENSITY16 */
+ 1363, /* GL_RGB2_EXT */
+ 1364, /* GL_RGB4 */
+ 1367, /* GL_RGB5 */
+ 1371, /* GL_RGB8 */
+ 1355, /* GL_RGB10 */
+ 1359, /* GL_RGB12 */
+ 1361, /* GL_RGB16 */
+ 1378, /* GL_RGBA2 */
+ 1380, /* GL_RGBA4 */
+ 1368, /* GL_RGB5_A1 */
+ 1384, /* GL_RGBA8 */
+ 1356, /* GL_RGB10_A2 */
+ 1374, /* GL_RGBA12 */
+ 1376, /* GL_RGBA16 */
+ 1746, /* GL_TEXTURE_RED_SIZE */
+ 1716, /* GL_TEXTURE_GREEN_SIZE */
+ 1654, /* GL_TEXTURE_BLUE_SIZE */
+ 1641, /* GL_TEXTURE_ALPHA_SIZE */
+ 1729, /* GL_TEXTURE_LUMINANCE_SIZE */
+ 1720, /* GL_TEXTURE_INTENSITY_SIZE */
+ 1348, /* GL_REPLACE_EXT */
+ 1273, /* GL_PROXY_TEXTURE_1D */
+ 1276, /* GL_PROXY_TEXTURE_2D */
+ 1753, /* GL_TEXTURE_TOO_LARGE_EXT */
+ 1741, /* GL_TEXTURE_PRIORITY */
+ 1748, /* GL_TEXTURE_RESIDENT */
+ 1644, /* GL_TEXTURE_BINDING_1D */
+ 1646, /* GL_TEXTURE_BINDING_2D */
+ 1648, /* GL_TEXTURE_BINDING_3D */
+ 1098, /* GL_PACK_SKIP_IMAGES */
+ 1094, /* GL_PACK_IMAGE_HEIGHT */
+ 1784, /* GL_UNPACK_SKIP_IMAGES */
+ 1781, /* GL_UNPACK_IMAGE_HEIGHT */
+ 1640, /* GL_TEXTURE_3D */
+ 1279, /* GL_PROXY_TEXTURE_3D */
+ 1703, /* GL_TEXTURE_DEPTH */
+ 1756, /* GL_TEXTURE_WRAP_R */
+ 858, /* GL_MAX_3D_TEXTURE_SIZE */
+ 1818, /* GL_VERTEX_ARRAY */
+ 1028, /* GL_NORMAL_ARRAY */
+ 149, /* GL_COLOR_ARRAY */
+ 633, /* GL_INDEX_ARRAY */
+ 1681, /* GL_TEXTURE_COORD_ARRAY */
+ 460, /* GL_EDGE_FLAG_ARRAY */
+ 1824, /* GL_VERTEX_ARRAY_SIZE */
+ 1826, /* GL_VERTEX_ARRAY_TYPE */
+ 1825, /* GL_VERTEX_ARRAY_STRIDE */
+ 1033, /* GL_NORMAL_ARRAY_TYPE */
+ 1032, /* GL_NORMAL_ARRAY_STRIDE */
+ 153, /* GL_COLOR_ARRAY_SIZE */
+ 155, /* GL_COLOR_ARRAY_TYPE */
+ 154, /* GL_COLOR_ARRAY_STRIDE */
+ 638, /* GL_INDEX_ARRAY_TYPE */
+ 637, /* GL_INDEX_ARRAY_STRIDE */
+ 1685, /* GL_TEXTURE_COORD_ARRAY_SIZE */
+ 1687, /* GL_TEXTURE_COORD_ARRAY_TYPE */
+ 1686, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
+ 464, /* GL_EDGE_FLAG_ARRAY_STRIDE */
+ 1823, /* GL_VERTEX_ARRAY_POINTER */
+ 1031, /* GL_NORMAL_ARRAY_POINTER */
+ 152, /* GL_COLOR_ARRAY_POINTER */
+ 636, /* GL_INDEX_ARRAY_POINTER */
+ 1684, /* GL_TEXTURE_COORD_ARRAY_POINTER */
+ 463, /* GL_EDGE_FLAG_ARRAY_POINTER */
+ 1007, /* GL_MULTISAMPLE */
+ 1408, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
+ 1410, /* GL_SAMPLE_ALPHA_TO_ONE */
+ 1415, /* GL_SAMPLE_COVERAGE */
+ 1412, /* GL_SAMPLE_BUFFERS */
+ 1403, /* GL_SAMPLES */
+ 1419, /* GL_SAMPLE_COVERAGE_VALUE */
+ 1417, /* GL_SAMPLE_COVERAGE_INVERT */
+ 196, /* GL_COLOR_MATRIX */
+ 198, /* GL_COLOR_MATRIX_STACK_DEPTH */
+ 867, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
+ 1203, /* GL_POST_COLOR_MATRIX_RED_SCALE */
+ 1199, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
+ 1194, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
+ 1190, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
+ 1201, /* GL_POST_COLOR_MATRIX_RED_BIAS */
+ 1197, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
+ 1192, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
+ 1188, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
+ 1664, /* GL_TEXTURE_COLOR_TABLE_SGI */
+ 1280, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
+ 1666, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
80, /* GL_BLEND_DST_RGB */
89, /* GL_BLEND_SRC_RGB */
79, /* GL_BLEND_DST_ALPHA */
88, /* GL_BLEND_SRC_ALPHA */
- 201, /* GL_COLOR_TABLE */
- 1212, /* GL_POST_CONVOLUTION_COLOR_TABLE */
- 1195, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
- 1267, /* GL_PROXY_COLOR_TABLE */
- 1271, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
- 1270, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
- 225, /* GL_COLOR_TABLE_SCALE */
- 205, /* GL_COLOR_TABLE_BIAS */
- 210, /* GL_COLOR_TABLE_FORMAT */
- 227, /* GL_COLOR_TABLE_WIDTH */
- 222, /* GL_COLOR_TABLE_RED_SIZE */
- 213, /* GL_COLOR_TABLE_GREEN_SIZE */
- 207, /* GL_COLOR_TABLE_BLUE_SIZE */
- 202, /* GL_COLOR_TABLE_ALPHA_SIZE */
- 219, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
- 216, /* GL_COLOR_TABLE_INTENSITY_SIZE */
+ 202, /* GL_COLOR_TABLE */
+ 1213, /* GL_POST_CONVOLUTION_COLOR_TABLE */
+ 1196, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
+ 1268, /* GL_PROXY_COLOR_TABLE */
+ 1272, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
+ 1271, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
+ 226, /* GL_COLOR_TABLE_SCALE */
+ 206, /* GL_COLOR_TABLE_BIAS */
+ 211, /* GL_COLOR_TABLE_FORMAT */
+ 228, /* GL_COLOR_TABLE_WIDTH */
+ 223, /* GL_COLOR_TABLE_RED_SIZE */
+ 214, /* GL_COLOR_TABLE_GREEN_SIZE */
+ 208, /* GL_COLOR_TABLE_BLUE_SIZE */
+ 203, /* GL_COLOR_TABLE_ALPHA_SIZE */
+ 220, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
+ 217, /* GL_COLOR_TABLE_INTENSITY_SIZE */
71, /* GL_BGR */
72, /* GL_BGRA */
- 880, /* GL_MAX_ELEMENTS_VERTICES */
- 879, /* GL_MAX_ELEMENTS_INDICES */
- 1715, /* GL_TEXTURE_INDEX_SIZE_EXT */
- 145, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
- 1159, /* GL_POINT_SIZE_MIN */
- 1155, /* GL_POINT_SIZE_MAX */
- 1149, /* GL_POINT_FADE_THRESHOLD_SIZE */
- 1145, /* GL_POINT_DISTANCE_ATTENUATION */
- 127, /* GL_CLAMP_TO_BORDER */
- 130, /* GL_CLAMP_TO_EDGE */
- 1736, /* GL_TEXTURE_MIN_LOD */
- 1734, /* GL_TEXTURE_MAX_LOD */
- 1639, /* GL_TEXTURE_BASE_LEVEL */
- 1733, /* GL_TEXTURE_MAX_LEVEL */
- 625, /* GL_IGNORE_BORDER_HP */
- 276, /* GL_CONSTANT_BORDER_HP */
- 1346, /* GL_REPLICATE_BORDER_HP */
- 282, /* GL_CONVOLUTION_BORDER_COLOR */
- 1056, /* GL_OCCLUSION_TEST_HP */
- 1057, /* GL_OCCLUSION_TEST_RESULT_HP */
- 698, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
- 1654, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
- 1656, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
- 1658, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
- 1659, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- 1657, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
- 1655, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
- 861, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
- 862, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- 1222, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
- 1224, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
- 1221, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
- 1223, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
- 1723, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
- 1724, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
- 1722, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
- 594, /* GL_GENERATE_MIPMAP */
- 595, /* GL_GENERATE_MIPMAP_HINT */
- 532, /* GL_FOG_OFFSET_SGIX */
- 533, /* GL_FOG_OFFSET_VALUE_SGIX */
- 1668, /* GL_TEXTURE_COMPARE_SGIX */
- 1667, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
- 1719, /* GL_TEXTURE_LEQUAL_R_SGIX */
- 1711, /* GL_TEXTURE_GEQUAL_R_SGIX */
- 360, /* GL_DEPTH_COMPONENT16 */
- 363, /* GL_DEPTH_COMPONENT24 */
- 366, /* GL_DEPTH_COMPONENT32 */
- 306, /* GL_CULL_VERTEX_EXT */
- 308, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
- 307, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
- 1876, /* GL_WRAP_BORDER_SUN */
- 1661, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
- 691, /* GL_LIGHT_MODEL_COLOR_CONTROL */
- 1445, /* GL_SINGLE_COLOR */
- 1431, /* GL_SEPARATE_SPECULAR_COLOR */
- 1440, /* GL_SHARED_TEXTURE_PALETTE_EXT */
- 543, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
- 544, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
- 551, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
- 546, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
- 542, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
- 541, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
- 545, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
- 552, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
- 564, /* GL_FRAMEBUFFER_DEFAULT */
- 580, /* GL_FRAMEBUFFER_UNDEFINED */
- 373, /* GL_DEPTH_STENCIL_ATTACHMENT */
- 631, /* GL_INDEX */
- 1785, /* GL_UNSIGNED_BYTE_2_3_3_REV */
- 1801, /* GL_UNSIGNED_SHORT_5_6_5 */
- 1802, /* GL_UNSIGNED_SHORT_5_6_5_REV */
- 1799, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
- 1797, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
- 1794, /* GL_UNSIGNED_INT_8_8_8_8_REV */
- 1792, /* GL_UNSIGNED_INT_2_10_10_10_REV */
- 1731, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
- 1732, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
- 1730, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
- 957, /* GL_MIRRORED_REPEAT */
- 1387, /* GL_RGB_S3TC */
- 1362, /* GL_RGB4_S3TC */
- 1385, /* GL_RGBA_S3TC */
- 1379, /* GL_RGBA4_S3TC */
- 1383, /* GL_RGBA_DXT5_S3TC */
- 1377, /* GL_RGBA4_DXT5_S3TC */
- 264, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
- 259, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
- 260, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
- 261, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
- 1018, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
- 1017, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
- 699, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
- 519, /* GL_FOG_COORDINATE_SOURCE */
- 511, /* GL_FOG_COORD */
- 535, /* GL_FRAGMENT_DEPTH */
- 312, /* GL_CURRENT_FOG_COORD */
- 518, /* GL_FOG_COORDINATE_ARRAY_TYPE */
- 517, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
- 516, /* GL_FOG_COORDINATE_ARRAY_POINTER */
- 513, /* GL_FOG_COORDINATE_ARRAY */
- 199, /* GL_COLOR_SUM */
- 332, /* GL_CURRENT_SECONDARY_COLOR */
- 1424, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
- 1426, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
- 1425, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
- 1423, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
- 1420, /* GL_SECONDARY_COLOR_ARRAY */
- 330, /* GL_CURRENT_RASTER_SECONDARY_COLOR */
+ 881, /* GL_MAX_ELEMENTS_VERTICES */
+ 880, /* GL_MAX_ELEMENTS_INDICES */
+ 1719, /* GL_TEXTURE_INDEX_SIZE_EXT */
+ 146, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
+ 1160, /* GL_POINT_SIZE_MIN */
+ 1156, /* GL_POINT_SIZE_MAX */
+ 1150, /* GL_POINT_FADE_THRESHOLD_SIZE */
+ 1146, /* GL_POINT_DISTANCE_ATTENUATION */
+ 128, /* GL_CLAMP_TO_BORDER */
+ 131, /* GL_CLAMP_TO_EDGE */
+ 1740, /* GL_TEXTURE_MIN_LOD */
+ 1738, /* GL_TEXTURE_MAX_LOD */
+ 1643, /* GL_TEXTURE_BASE_LEVEL */
+ 1737, /* GL_TEXTURE_MAX_LEVEL */
+ 626, /* GL_IGNORE_BORDER_HP */
+ 277, /* GL_CONSTANT_BORDER_HP */
+ 1349, /* GL_REPLICATE_BORDER_HP */
+ 283, /* GL_CONVOLUTION_BORDER_COLOR */
+ 1057, /* GL_OCCLUSION_TEST_HP */
+ 1058, /* GL_OCCLUSION_TEST_RESULT_HP */
+ 699, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
+ 1658, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
+ 1660, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
+ 1662, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
+ 1663, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ 1661, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
+ 1659, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
+ 862, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
+ 863, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ 1223, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
+ 1225, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
+ 1222, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
+ 1224, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
+ 1727, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
+ 1728, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
+ 1726, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
+ 595, /* GL_GENERATE_MIPMAP */
+ 596, /* GL_GENERATE_MIPMAP_HINT */
+ 533, /* GL_FOG_OFFSET_SGIX */
+ 534, /* GL_FOG_OFFSET_VALUE_SGIX */
+ 1672, /* GL_TEXTURE_COMPARE_SGIX */
+ 1671, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
+ 1723, /* GL_TEXTURE_LEQUAL_R_SGIX */
+ 1715, /* GL_TEXTURE_GEQUAL_R_SGIX */
+ 361, /* GL_DEPTH_COMPONENT16 */
+ 364, /* GL_DEPTH_COMPONENT24 */
+ 367, /* GL_DEPTH_COMPONENT32 */
+ 307, /* GL_CULL_VERTEX_EXT */
+ 309, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
+ 308, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
+ 1882, /* GL_WRAP_BORDER_SUN */
+ 1665, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
+ 692, /* GL_LIGHT_MODEL_COLOR_CONTROL */
+ 1449, /* GL_SINGLE_COLOR */
+ 1435, /* GL_SEPARATE_SPECULAR_COLOR */
+ 1444, /* GL_SHARED_TEXTURE_PALETTE_EXT */
+ 544, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
+ 545, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
+ 552, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
+ 547, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
+ 543, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
+ 542, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
+ 546, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
+ 553, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
+ 565, /* GL_FRAMEBUFFER_DEFAULT */
+ 581, /* GL_FRAMEBUFFER_UNDEFINED */
+ 374, /* GL_DEPTH_STENCIL_ATTACHMENT */
+ 632, /* GL_INDEX */
+ 1790, /* GL_UNSIGNED_BYTE_2_3_3_REV */
+ 1806, /* GL_UNSIGNED_SHORT_5_6_5 */
+ 1807, /* GL_UNSIGNED_SHORT_5_6_5_REV */
+ 1804, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
+ 1802, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
+ 1799, /* GL_UNSIGNED_INT_8_8_8_8_REV */
+ 1797, /* GL_UNSIGNED_INT_2_10_10_10_REV */
+ 1735, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
+ 1736, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
+ 1734, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
+ 958, /* GL_MIRRORED_REPEAT */
+ 1391, /* GL_RGB_S3TC */
+ 1366, /* GL_RGB4_S3TC */
+ 1389, /* GL_RGBA_S3TC */
+ 1383, /* GL_RGBA4_S3TC */
+ 1387, /* GL_RGBA_DXT5_S3TC */
+ 1381, /* GL_RGBA4_DXT5_S3TC */
+ 265, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
+ 260, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
+ 261, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
+ 262, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
+ 1019, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
+ 1018, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
+ 700, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
+ 520, /* GL_FOG_COORDINATE_SOURCE */
+ 512, /* GL_FOG_COORD */
+ 536, /* GL_FRAGMENT_DEPTH */
+ 313, /* GL_CURRENT_FOG_COORD */
+ 519, /* GL_FOG_COORDINATE_ARRAY_TYPE */
+ 518, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
+ 517, /* GL_FOG_COORDINATE_ARRAY_POINTER */
+ 514, /* GL_FOG_COORDINATE_ARRAY */
+ 200, /* GL_COLOR_SUM */
+ 333, /* GL_CURRENT_SECONDARY_COLOR */
+ 1428, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
+ 1430, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
+ 1429, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
+ 1427, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
+ 1424, /* GL_SECONDARY_COLOR_ARRAY */
+ 331, /* GL_CURRENT_RASTER_SECONDARY_COLOR */
28, /* GL_ALIASED_POINT_SIZE_RANGE */
27, /* GL_ALIASED_LINE_WIDTH_RANGE */
- 1568, /* GL_TEXTURE0 */
- 1570, /* GL_TEXTURE1 */
- 1592, /* GL_TEXTURE2 */
- 1614, /* GL_TEXTURE3 */
- 1620, /* GL_TEXTURE4 */
- 1622, /* GL_TEXTURE5 */
- 1624, /* GL_TEXTURE6 */
- 1626, /* GL_TEXTURE7 */
- 1628, /* GL_TEXTURE8 */
- 1630, /* GL_TEXTURE9 */
- 1571, /* GL_TEXTURE10 */
- 1573, /* GL_TEXTURE11 */
- 1575, /* GL_TEXTURE12 */
- 1577, /* GL_TEXTURE13 */
- 1579, /* GL_TEXTURE14 */
- 1581, /* GL_TEXTURE15 */
- 1583, /* GL_TEXTURE16 */
- 1585, /* GL_TEXTURE17 */
- 1587, /* GL_TEXTURE18 */
- 1589, /* GL_TEXTURE19 */
- 1593, /* GL_TEXTURE20 */
- 1595, /* GL_TEXTURE21 */
- 1597, /* GL_TEXTURE22 */
- 1599, /* GL_TEXTURE23 */
- 1601, /* GL_TEXTURE24 */
- 1603, /* GL_TEXTURE25 */
- 1605, /* GL_TEXTURE26 */
- 1607, /* GL_TEXTURE27 */
- 1609, /* GL_TEXTURE28 */
- 1611, /* GL_TEXTURE29 */
- 1615, /* GL_TEXTURE30 */
- 1617, /* GL_TEXTURE31 */
+ 1572, /* GL_TEXTURE0 */
+ 1574, /* GL_TEXTURE1 */
+ 1596, /* GL_TEXTURE2 */
+ 1618, /* GL_TEXTURE3 */
+ 1624, /* GL_TEXTURE4 */
+ 1626, /* GL_TEXTURE5 */
+ 1628, /* GL_TEXTURE6 */
+ 1630, /* GL_TEXTURE7 */
+ 1632, /* GL_TEXTURE8 */
+ 1634, /* GL_TEXTURE9 */
+ 1575, /* GL_TEXTURE10 */
+ 1577, /* GL_TEXTURE11 */
+ 1579, /* GL_TEXTURE12 */
+ 1581, /* GL_TEXTURE13 */
+ 1583, /* GL_TEXTURE14 */
+ 1585, /* GL_TEXTURE15 */
+ 1587, /* GL_TEXTURE16 */
+ 1589, /* GL_TEXTURE17 */
+ 1591, /* GL_TEXTURE18 */
+ 1593, /* GL_TEXTURE19 */
+ 1597, /* GL_TEXTURE20 */
+ 1599, /* GL_TEXTURE21 */
+ 1601, /* GL_TEXTURE22 */
+ 1603, /* GL_TEXTURE23 */
+ 1605, /* GL_TEXTURE24 */
+ 1607, /* GL_TEXTURE25 */
+ 1609, /* GL_TEXTURE26 */
+ 1611, /* GL_TEXTURE27 */
+ 1613, /* GL_TEXTURE28 */
+ 1615, /* GL_TEXTURE29 */
+ 1619, /* GL_TEXTURE30 */
+ 1621, /* GL_TEXTURE31 */
18, /* GL_ACTIVE_TEXTURE */
- 133, /* GL_CLIENT_ACTIVE_TEXTURE */
- 935, /* GL_MAX_TEXTURE_UNITS */
- 1763, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
- 1766, /* GL_TRANSPOSE_PROJECTION_MATRIX */
- 1768, /* GL_TRANSPOSE_TEXTURE_MATRIX */
- 1760, /* GL_TRANSPOSE_COLOR_MATRIX */
- 1550, /* GL_SUBTRACT */
- 920, /* GL_MAX_RENDERBUFFER_SIZE */
- 247, /* GL_COMPRESSED_ALPHA */
- 251, /* GL_COMPRESSED_LUMINANCE */
- 252, /* GL_COMPRESSED_LUMINANCE_ALPHA */
- 249, /* GL_COMPRESSED_INTENSITY */
- 255, /* GL_COMPRESSED_RGB */
- 256, /* GL_COMPRESSED_RGBA */
- 1675, /* GL_TEXTURE_COMPRESSION_HINT */
- 1740, /* GL_TEXTURE_RECTANGLE_ARB */
- 1647, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
- 1282, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
- 918, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
- 372, /* GL_DEPTH_STENCIL */
- 1789, /* GL_UNSIGNED_INT_24_8 */
- 931, /* GL_MAX_TEXTURE_LOD_BIAS */
- 1729, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
- 932, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
- 1705, /* GL_TEXTURE_FILTER_CONTROL */
- 1720, /* GL_TEXTURE_LOD_BIAS */
- 232, /* GL_COMBINE4 */
- 925, /* GL_MAX_SHININESS_NV */
- 926, /* GL_MAX_SPOT_EXPONENT_NV */
- 629, /* GL_INCR_WRAP */
- 343, /* GL_DECR_WRAP */
- 977, /* GL_MODELVIEW1_ARB */
- 1033, /* GL_NORMAL_MAP */
- 1319, /* GL_REFLECTION_MAP */
- 1684, /* GL_TEXTURE_CUBE_MAP */
- 1645, /* GL_TEXTURE_BINDING_CUBE_MAP */
- 1692, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
- 1686, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
- 1694, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
- 1688, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
- 1696, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
- 1690, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
- 1280, /* GL_PROXY_TEXTURE_CUBE_MAP */
- 874, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
- 1012, /* GL_MULTISAMPLE_FILTER_HINT_NV */
- 527, /* GL_FOG_DISTANCE_MODE_NV */
- 478, /* GL_EYE_RADIAL_NV */
- 477, /* GL_EYE_PLANE_ABSOLUTE_NV */
- 231, /* GL_COMBINE */
- 238, /* GL_COMBINE_RGB */
- 233, /* GL_COMBINE_ALPHA */
- 1388, /* GL_RGB_SCALE */
+ 134, /* GL_CLIENT_ACTIVE_TEXTURE */
+ 936, /* GL_MAX_TEXTURE_UNITS */
+ 1767, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
+ 1770, /* GL_TRANSPOSE_PROJECTION_MATRIX */
+ 1772, /* GL_TRANSPOSE_TEXTURE_MATRIX */
+ 1764, /* GL_TRANSPOSE_COLOR_MATRIX */
+ 1554, /* GL_SUBTRACT */
+ 921, /* GL_MAX_RENDERBUFFER_SIZE */
+ 248, /* GL_COMPRESSED_ALPHA */
+ 252, /* GL_COMPRESSED_LUMINANCE */
+ 253, /* GL_COMPRESSED_LUMINANCE_ALPHA */
+ 250, /* GL_COMPRESSED_INTENSITY */
+ 256, /* GL_COMPRESSED_RGB */
+ 257, /* GL_COMPRESSED_RGBA */
+ 1679, /* GL_TEXTURE_COMPRESSION_HINT */
+ 1744, /* GL_TEXTURE_RECTANGLE_ARB */
+ 1651, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
+ 1283, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
+ 919, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
+ 373, /* GL_DEPTH_STENCIL */
+ 1794, /* GL_UNSIGNED_INT_24_8 */
+ 932, /* GL_MAX_TEXTURE_LOD_BIAS */
+ 1733, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
+ 933, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
+ 1709, /* GL_TEXTURE_FILTER_CONTROL */
+ 1724, /* GL_TEXTURE_LOD_BIAS */
+ 233, /* GL_COMBINE4 */
+ 926, /* GL_MAX_SHININESS_NV */
+ 927, /* GL_MAX_SPOT_EXPONENT_NV */
+ 630, /* GL_INCR_WRAP */
+ 344, /* GL_DECR_WRAP */
+ 978, /* GL_MODELVIEW1_ARB */
+ 1034, /* GL_NORMAL_MAP */
+ 1321, /* GL_REFLECTION_MAP */
+ 1688, /* GL_TEXTURE_CUBE_MAP */
+ 1649, /* GL_TEXTURE_BINDING_CUBE_MAP */
+ 1696, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
+ 1690, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
+ 1698, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
+ 1692, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
+ 1700, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
+ 1694, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
+ 1281, /* GL_PROXY_TEXTURE_CUBE_MAP */
+ 875, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
+ 1013, /* GL_MULTISAMPLE_FILTER_HINT_NV */
+ 528, /* GL_FOG_DISTANCE_MODE_NV */
+ 479, /* GL_EYE_RADIAL_NV */
+ 478, /* GL_EYE_PLANE_ABSOLUTE_NV */
+ 232, /* GL_COMBINE */
+ 239, /* GL_COMBINE_RGB */
+ 234, /* GL_COMBINE_ALPHA */
+ 1392, /* GL_RGB_SCALE */
24, /* GL_ADD_SIGNED */
- 657, /* GL_INTERPOLATE */
- 271, /* GL_CONSTANT */
- 1228, /* GL_PRIMARY_COLOR */
- 1225, /* GL_PREVIOUS */
- 1460, /* GL_SOURCE0_RGB */
- 1466, /* GL_SOURCE1_RGB */
- 1472, /* GL_SOURCE2_RGB */
- 1476, /* GL_SOURCE3_RGB_NV */
- 1457, /* GL_SOURCE0_ALPHA */
- 1463, /* GL_SOURCE1_ALPHA */
- 1469, /* GL_SOURCE2_ALPHA */
- 1475, /* GL_SOURCE3_ALPHA_NV */
- 1070, /* GL_OPERAND0_RGB */
- 1076, /* GL_OPERAND1_RGB */
- 1082, /* GL_OPERAND2_RGB */
- 1086, /* GL_OPERAND3_RGB_NV */
- 1067, /* GL_OPERAND0_ALPHA */
- 1073, /* GL_OPERAND1_ALPHA */
- 1079, /* GL_OPERAND2_ALPHA */
- 1085, /* GL_OPERAND3_ALPHA_NV */
- 1814, /* GL_VERTEX_ARRAY_BINDING */
- 1738, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
- 1739, /* GL_TEXTURE_RANGE_POINTER_APPLE */
- 1880, /* GL_YCBCR_422_APPLE */
- 1803, /* GL_UNSIGNED_SHORT_8_8_APPLE */
- 1805, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
- 1748, /* GL_TEXTURE_STORAGE_HINT_APPLE */
- 1541, /* GL_STORAGE_PRIVATE_APPLE */
- 1540, /* GL_STORAGE_CACHED_APPLE */
- 1542, /* GL_STORAGE_SHARED_APPLE */
- 1447, /* GL_SLICE_ACCUM_SUN */
- 1289, /* GL_QUAD_MESH_SUN */
- 1772, /* GL_TRIANGLE_MESH_SUN */
- 1853, /* GL_VERTEX_PROGRAM_ARB */
- 1864, /* GL_VERTEX_STATE_PROGRAM_NV */
- 1840, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
- 1846, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
- 1848, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
- 1850, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
- 334, /* GL_CURRENT_VERTEX_ATTRIB */
- 1241, /* GL_PROGRAM_LENGTH_ARB */
- 1255, /* GL_PROGRAM_STRING_ARB */
- 999, /* GL_MODELVIEW_PROJECTION_NV */
- 624, /* GL_IDENTITY_NV */
- 671, /* GL_INVERSE_NV */
- 1765, /* GL_TRANSPOSE_NV */
- 672, /* GL_INVERSE_TRANSPOSE_NV */
- 904, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
- 903, /* GL_MAX_PROGRAM_MATRICES_ARB */
- 810, /* GL_MATRIX0_NV */
- 822, /* GL_MATRIX1_NV */
- 834, /* GL_MATRIX2_NV */
- 838, /* GL_MATRIX3_NV */
- 840, /* GL_MATRIX4_NV */
- 842, /* GL_MATRIX5_NV */
- 844, /* GL_MATRIX6_NV */
- 846, /* GL_MATRIX7_NV */
- 318, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
- 315, /* GL_CURRENT_MATRIX_ARB */
- 1856, /* GL_VERTEX_PROGRAM_POINT_SIZE */
- 1859, /* GL_VERTEX_PROGRAM_TWO_SIDE */
- 1253, /* GL_PROGRAM_PARAMETER_NV */
- 1844, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
- 1257, /* GL_PROGRAM_TARGET_NV */
- 1254, /* GL_PROGRAM_RESIDENT_NV */
- 1757, /* GL_TRACK_MATRIX_NV */
- 1758, /* GL_TRACK_MATRIX_TRANSFORM_NV */
- 1854, /* GL_VERTEX_PROGRAM_BINDING_NV */
- 1235, /* GL_PROGRAM_ERROR_POSITION_ARB */
- 356, /* GL_DEPTH_CLAMP */
- 1822, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
- 1829, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
- 1830, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
- 1831, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
- 1832, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
- 1833, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
- 1834, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
- 1835, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
- 1836, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
- 1837, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
- 1823, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
- 1824, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
- 1825, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
- 1826, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
- 1827, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
- 1828, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
- 758, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
- 765, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
- 766, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
- 767, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
- 768, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
- 769, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
- 770, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
- 771, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
- 772, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
- 773, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
- 759, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
- 760, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
- 761, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
- 762, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
- 763, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
- 764, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
- 785, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
- 792, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
- 793, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
- 794, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
- 795, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
- 796, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
- 797, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
- 1234, /* GL_PROGRAM_BINDING_ARB */
- 799, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
- 800, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
- 786, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
- 787, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
- 788, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
- 789, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
- 790, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
- 791, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
- 1673, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
- 1670, /* GL_TEXTURE_COMPRESSED */
- 1038, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
- 269, /* GL_COMPRESSED_TEXTURE_FORMATS */
- 947, /* GL_MAX_VERTEX_UNITS_ARB */
+ 658, /* GL_INTERPOLATE */
+ 272, /* GL_CONSTANT */
+ 1229, /* GL_PRIMARY_COLOR */
+ 1226, /* GL_PREVIOUS */
+ 1464, /* GL_SOURCE0_RGB */
+ 1470, /* GL_SOURCE1_RGB */
+ 1476, /* GL_SOURCE2_RGB */
+ 1480, /* GL_SOURCE3_RGB_NV */
+ 1461, /* GL_SOURCE0_ALPHA */
+ 1467, /* GL_SOURCE1_ALPHA */
+ 1473, /* GL_SOURCE2_ALPHA */
+ 1479, /* GL_SOURCE3_ALPHA_NV */
+ 1071, /* GL_OPERAND0_RGB */
+ 1077, /* GL_OPERAND1_RGB */
+ 1083, /* GL_OPERAND2_RGB */
+ 1087, /* GL_OPERAND3_RGB_NV */
+ 1068, /* GL_OPERAND0_ALPHA */
+ 1074, /* GL_OPERAND1_ALPHA */
+ 1080, /* GL_OPERAND2_ALPHA */
+ 1086, /* GL_OPERAND3_ALPHA_NV */
+ 109, /* GL_BUFFER_OBJECT_APPLE */
+ 1819, /* GL_VERTEX_ARRAY_BINDING */
+ 1742, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
+ 1743, /* GL_TEXTURE_RANGE_POINTER_APPLE */
+ 1886, /* GL_YCBCR_422_APPLE */
+ 1808, /* GL_UNSIGNED_SHORT_8_8_APPLE */
+ 1810, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
+ 1752, /* GL_TEXTURE_STORAGE_HINT_APPLE */
+ 1545, /* GL_STORAGE_PRIVATE_APPLE */
+ 1544, /* GL_STORAGE_CACHED_APPLE */
+ 1546, /* GL_STORAGE_SHARED_APPLE */
+ 1451, /* GL_SLICE_ACCUM_SUN */
+ 1291, /* GL_QUAD_MESH_SUN */
+ 1776, /* GL_TRIANGLE_MESH_SUN */
+ 1858, /* GL_VERTEX_PROGRAM_ARB */
+ 1869, /* GL_VERTEX_STATE_PROGRAM_NV */
+ 1845, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
+ 1851, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
+ 1853, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
+ 1855, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+ 335, /* GL_CURRENT_VERTEX_ATTRIB */
+ 1242, /* GL_PROGRAM_LENGTH_ARB */
+ 1256, /* GL_PROGRAM_STRING_ARB */
+ 1000, /* GL_MODELVIEW_PROJECTION_NV */
+ 625, /* GL_IDENTITY_NV */
+ 672, /* GL_INVERSE_NV */
+ 1769, /* GL_TRANSPOSE_NV */
+ 673, /* GL_INVERSE_TRANSPOSE_NV */
+ 905, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
+ 904, /* GL_MAX_PROGRAM_MATRICES_ARB */
+ 811, /* GL_MATRIX0_NV */
+ 823, /* GL_MATRIX1_NV */
+ 835, /* GL_MATRIX2_NV */
+ 839, /* GL_MATRIX3_NV */
+ 841, /* GL_MATRIX4_NV */
+ 843, /* GL_MATRIX5_NV */
+ 845, /* GL_MATRIX6_NV */
+ 847, /* GL_MATRIX7_NV */
+ 319, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
+ 316, /* GL_CURRENT_MATRIX_ARB */
+ 1861, /* GL_VERTEX_PROGRAM_POINT_SIZE */
+ 1864, /* GL_VERTEX_PROGRAM_TWO_SIDE */
+ 1254, /* GL_PROGRAM_PARAMETER_NV */
+ 1849, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
+ 1258, /* GL_PROGRAM_TARGET_NV */
+ 1255, /* GL_PROGRAM_RESIDENT_NV */
+ 1761, /* GL_TRACK_MATRIX_NV */
+ 1762, /* GL_TRACK_MATRIX_TRANSFORM_NV */
+ 1859, /* GL_VERTEX_PROGRAM_BINDING_NV */
+ 1236, /* GL_PROGRAM_ERROR_POSITION_ARB */
+ 357, /* GL_DEPTH_CLAMP */
+ 1827, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
+ 1834, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
+ 1835, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
+ 1836, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
+ 1837, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
+ 1838, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
+ 1839, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
+ 1840, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
+ 1841, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
+ 1842, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
+ 1828, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
+ 1829, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
+ 1830, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
+ 1831, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
+ 1832, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
+ 1833, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
+ 759, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
+ 766, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
+ 767, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
+ 768, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
+ 769, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
+ 770, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
+ 771, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
+ 772, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
+ 773, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
+ 774, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
+ 760, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
+ 761, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
+ 762, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
+ 763, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
+ 764, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
+ 765, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
+ 786, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
+ 793, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
+ 794, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
+ 795, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
+ 796, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
+ 797, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
+ 798, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
+ 1235, /* GL_PROGRAM_BINDING_ARB */
+ 800, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
+ 801, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
+ 787, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
+ 788, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
+ 789, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
+ 790, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
+ 791, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
+ 792, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
+ 1677, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
+ 1674, /* GL_TEXTURE_COMPRESSED */
+ 1039, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
+ 270, /* GL_COMPRESSED_TEXTURE_FORMATS */
+ 948, /* GL_MAX_VERTEX_UNITS_ARB */
22, /* GL_ACTIVE_VERTEX_UNITS_ARB */
- 1875, /* GL_WEIGHT_SUM_UNITY_ARB */
- 1852, /* GL_VERTEX_BLEND_ARB */
- 336, /* GL_CURRENT_WEIGHT_ARB */
- 1874, /* GL_WEIGHT_ARRAY_TYPE_ARB */
- 1873, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
- 1872, /* GL_WEIGHT_ARRAY_SIZE_ARB */
- 1871, /* GL_WEIGHT_ARRAY_POINTER_ARB */
- 1868, /* GL_WEIGHT_ARRAY_ARB */
- 386, /* GL_DOT3_RGB */
- 387, /* GL_DOT3_RGBA */
- 263, /* GL_COMPRESSED_RGB_FXT1_3DFX */
- 258, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
- 1007, /* GL_MULTISAMPLE_3DFX */
- 1409, /* GL_SAMPLE_BUFFERS_3DFX */
- 1400, /* GL_SAMPLES_3DFX */
- 988, /* GL_MODELVIEW2_ARB */
- 991, /* GL_MODELVIEW3_ARB */
- 992, /* GL_MODELVIEW4_ARB */
- 993, /* GL_MODELVIEW5_ARB */
- 994, /* GL_MODELVIEW6_ARB */
- 995, /* GL_MODELVIEW7_ARB */
- 996, /* GL_MODELVIEW8_ARB */
- 997, /* GL_MODELVIEW9_ARB */
- 967, /* GL_MODELVIEW10_ARB */
- 968, /* GL_MODELVIEW11_ARB */
- 969, /* GL_MODELVIEW12_ARB */
- 970, /* GL_MODELVIEW13_ARB */
- 971, /* GL_MODELVIEW14_ARB */
- 972, /* GL_MODELVIEW15_ARB */
- 973, /* GL_MODELVIEW16_ARB */
- 974, /* GL_MODELVIEW17_ARB */
- 975, /* GL_MODELVIEW18_ARB */
- 976, /* GL_MODELVIEW19_ARB */
- 978, /* GL_MODELVIEW20_ARB */
- 979, /* GL_MODELVIEW21_ARB */
- 980, /* GL_MODELVIEW22_ARB */
- 981, /* GL_MODELVIEW23_ARB */
- 982, /* GL_MODELVIEW24_ARB */
- 983, /* GL_MODELVIEW25_ARB */
- 984, /* GL_MODELVIEW26_ARB */
- 985, /* GL_MODELVIEW27_ARB */
- 986, /* GL_MODELVIEW28_ARB */
- 987, /* GL_MODELVIEW29_ARB */
- 989, /* GL_MODELVIEW30_ARB */
- 990, /* GL_MODELVIEW31_ARB */
- 391, /* GL_DOT3_RGB_EXT */
- 389, /* GL_DOT3_RGBA_EXT */
- 961, /* GL_MIRROR_CLAMP_EXT */
- 964, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
- 1002, /* GL_MODULATE_ADD_ATI */
- 1003, /* GL_MODULATE_SIGNED_ADD_ATI */
- 1004, /* GL_MODULATE_SUBTRACT_ATI */
- 1881, /* GL_YCBCR_MESA */
- 1094, /* GL_PACK_INVERT_MESA */
- 339, /* GL_DEBUG_OBJECT_MESA */
- 340, /* GL_DEBUG_PRINT_MESA */
- 338, /* GL_DEBUG_ASSERT_MESA */
- 110, /* GL_BUFFER_SIZE */
- 112, /* GL_BUFFER_USAGE */
- 116, /* GL_BUMP_ROT_MATRIX_ATI */
- 117, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */
- 115, /* GL_BUMP_NUM_TEX_UNITS_ATI */
- 119, /* GL_BUMP_TEX_UNITS_ATI */
- 451, /* GL_DUDV_ATI */
- 450, /* GL_DU8DV8_ATI */
- 114, /* GL_BUMP_ENVMAP_ATI */
- 118, /* GL_BUMP_TARGET_ATI */
- 1508, /* GL_STENCIL_BACK_FUNC */
- 1506, /* GL_STENCIL_BACK_FAIL */
- 1510, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
- 1512, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
- 536, /* GL_FRAGMENT_PROGRAM_ARB */
- 1232, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
- 1260, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
- 1259, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
- 1244, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- 1250, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- 1249, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- 893, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
- 916, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
- 915, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
- 906, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- 912, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- 911, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- 876, /* GL_MAX_DRAW_BUFFERS */
- 395, /* GL_DRAW_BUFFER0 */
- 398, /* GL_DRAW_BUFFER1 */
- 419, /* GL_DRAW_BUFFER2 */
- 422, /* GL_DRAW_BUFFER3 */
- 425, /* GL_DRAW_BUFFER4 */
- 428, /* GL_DRAW_BUFFER5 */
- 431, /* GL_DRAW_BUFFER6 */
- 434, /* GL_DRAW_BUFFER7 */
- 437, /* GL_DRAW_BUFFER8 */
- 440, /* GL_DRAW_BUFFER9 */
- 399, /* GL_DRAW_BUFFER10 */
- 402, /* GL_DRAW_BUFFER11 */
- 405, /* GL_DRAW_BUFFER12 */
- 408, /* GL_DRAW_BUFFER13 */
- 411, /* GL_DRAW_BUFFER14 */
- 414, /* GL_DRAW_BUFFER15 */
+ 1881, /* GL_WEIGHT_SUM_UNITY_ARB */
+ 1857, /* GL_VERTEX_BLEND_ARB */
+ 337, /* GL_CURRENT_WEIGHT_ARB */
+ 1880, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+ 1879, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+ 1878, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+ 1877, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+ 1874, /* GL_WEIGHT_ARRAY_ARB */
+ 387, /* GL_DOT3_RGB */
+ 388, /* GL_DOT3_RGBA */
+ 264, /* GL_COMPRESSED_RGB_FXT1_3DFX */
+ 259, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
+ 1008, /* GL_MULTISAMPLE_3DFX */
+ 1413, /* GL_SAMPLE_BUFFERS_3DFX */
+ 1404, /* GL_SAMPLES_3DFX */
+ 989, /* GL_MODELVIEW2_ARB */
+ 992, /* GL_MODELVIEW3_ARB */
+ 993, /* GL_MODELVIEW4_ARB */
+ 994, /* GL_MODELVIEW5_ARB */
+ 995, /* GL_MODELVIEW6_ARB */
+ 996, /* GL_MODELVIEW7_ARB */
+ 997, /* GL_MODELVIEW8_ARB */
+ 998, /* GL_MODELVIEW9_ARB */
+ 968, /* GL_MODELVIEW10_ARB */
+ 969, /* GL_MODELVIEW11_ARB */
+ 970, /* GL_MODELVIEW12_ARB */
+ 971, /* GL_MODELVIEW13_ARB */
+ 972, /* GL_MODELVIEW14_ARB */
+ 973, /* GL_MODELVIEW15_ARB */
+ 974, /* GL_MODELVIEW16_ARB */
+ 975, /* GL_MODELVIEW17_ARB */
+ 976, /* GL_MODELVIEW18_ARB */
+ 977, /* GL_MODELVIEW19_ARB */
+ 979, /* GL_MODELVIEW20_ARB */
+ 980, /* GL_MODELVIEW21_ARB */
+ 981, /* GL_MODELVIEW22_ARB */
+ 982, /* GL_MODELVIEW23_ARB */
+ 983, /* GL_MODELVIEW24_ARB */
+ 984, /* GL_MODELVIEW25_ARB */
+ 985, /* GL_MODELVIEW26_ARB */
+ 986, /* GL_MODELVIEW27_ARB */
+ 987, /* GL_MODELVIEW28_ARB */
+ 988, /* GL_MODELVIEW29_ARB */
+ 990, /* GL_MODELVIEW30_ARB */
+ 991, /* GL_MODELVIEW31_ARB */
+ 392, /* GL_DOT3_RGB_EXT */
+ 390, /* GL_DOT3_RGBA_EXT */
+ 962, /* GL_MIRROR_CLAMP_EXT */
+ 965, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
+ 1003, /* GL_MODULATE_ADD_ATI */
+ 1004, /* GL_MODULATE_SIGNED_ADD_ATI */
+ 1005, /* GL_MODULATE_SUBTRACT_ATI */
+ 1887, /* GL_YCBCR_MESA */
+ 1095, /* GL_PACK_INVERT_MESA */
+ 340, /* GL_DEBUG_OBJECT_MESA */
+ 341, /* GL_DEBUG_PRINT_MESA */
+ 339, /* GL_DEBUG_ASSERT_MESA */
+ 111, /* GL_BUFFER_SIZE */
+ 113, /* GL_BUFFER_USAGE */
+ 117, /* GL_BUMP_ROT_MATRIX_ATI */
+ 118, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */
+ 116, /* GL_BUMP_NUM_TEX_UNITS_ATI */
+ 120, /* GL_BUMP_TEX_UNITS_ATI */
+ 452, /* GL_DUDV_ATI */
+ 451, /* GL_DU8DV8_ATI */
+ 115, /* GL_BUMP_ENVMAP_ATI */
+ 119, /* GL_BUMP_TARGET_ATI */
+ 1512, /* GL_STENCIL_BACK_FUNC */
+ 1510, /* GL_STENCIL_BACK_FAIL */
+ 1514, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
+ 1516, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
+ 537, /* GL_FRAGMENT_PROGRAM_ARB */
+ 1233, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ 1261, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ 1260, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
+ 1245, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ 1251, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ 1250, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ 894, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ 917, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ 916, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
+ 907, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ 913, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ 912, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ 877, /* GL_MAX_DRAW_BUFFERS */
+ 396, /* GL_DRAW_BUFFER0 */
+ 399, /* GL_DRAW_BUFFER1 */
+ 420, /* GL_DRAW_BUFFER2 */
+ 423, /* GL_DRAW_BUFFER3 */
+ 426, /* GL_DRAW_BUFFER4 */
+ 429, /* GL_DRAW_BUFFER5 */
+ 432, /* GL_DRAW_BUFFER6 */
+ 435, /* GL_DRAW_BUFFER7 */
+ 438, /* GL_DRAW_BUFFER8 */
+ 441, /* GL_DRAW_BUFFER9 */
+ 400, /* GL_DRAW_BUFFER10 */
+ 403, /* GL_DRAW_BUFFER11 */
+ 406, /* GL_DRAW_BUFFER12 */
+ 409, /* GL_DRAW_BUFFER13 */
+ 412, /* GL_DRAW_BUFFER14 */
+ 415, /* GL_DRAW_BUFFER15 */
82, /* GL_BLEND_EQUATION_ALPHA */
- 855, /* GL_MATRIX_PALETTE_ARB */
- 887, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
- 890, /* GL_MAX_PALETTE_MATRICES_ARB */
- 321, /* GL_CURRENT_PALETTE_MATRIX_ARB */
- 849, /* GL_MATRIX_INDEX_ARRAY_ARB */
- 316, /* GL_CURRENT_MATRIX_INDEX_ARB */
- 851, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
- 853, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
- 852, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
- 850, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
- 1700, /* GL_TEXTURE_DEPTH_SIZE */
- 379, /* GL_DEPTH_TEXTURE_MODE */
- 1665, /* GL_TEXTURE_COMPARE_MODE */
- 1663, /* GL_TEXTURE_COMPARE_FUNC */
- 242, /* GL_COMPARE_R_TO_TEXTURE */
- 1166, /* GL_POINT_SPRITE */
- 296, /* GL_COORD_REPLACE */
- 1170, /* GL_POINT_SPRITE_R_MODE_NV */
- 1293, /* GL_QUERY_COUNTER_BITS */
- 323, /* GL_CURRENT_QUERY */
- 1296, /* GL_QUERY_RESULT */
- 1298, /* GL_QUERY_RESULT_AVAILABLE */
- 941, /* GL_MAX_VERTEX_ATTRIBS */
- 1842, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
- 377, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
- 376, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
- 927, /* GL_MAX_TEXTURE_COORDS */
- 929, /* GL_MAX_TEXTURE_IMAGE_UNITS */
- 1237, /* GL_PROGRAM_ERROR_STRING_ARB */
- 1239, /* GL_PROGRAM_FORMAT_ASCII_ARB */
- 1238, /* GL_PROGRAM_FORMAT_ARB */
- 1750, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
- 354, /* GL_DEPTH_BOUNDS_TEST_EXT */
- 353, /* GL_DEPTH_BOUNDS_EXT */
+ 856, /* GL_MATRIX_PALETTE_ARB */
+ 888, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
+ 891, /* GL_MAX_PALETTE_MATRICES_ARB */
+ 322, /* GL_CURRENT_PALETTE_MATRIX_ARB */
+ 850, /* GL_MATRIX_INDEX_ARRAY_ARB */
+ 317, /* GL_CURRENT_MATRIX_INDEX_ARB */
+ 852, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
+ 854, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
+ 853, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
+ 851, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
+ 1704, /* GL_TEXTURE_DEPTH_SIZE */
+ 380, /* GL_DEPTH_TEXTURE_MODE */
+ 1669, /* GL_TEXTURE_COMPARE_MODE */
+ 1667, /* GL_TEXTURE_COMPARE_FUNC */
+ 243, /* GL_COMPARE_R_TO_TEXTURE */
+ 1167, /* GL_POINT_SPRITE */
+ 297, /* GL_COORD_REPLACE */
+ 1171, /* GL_POINT_SPRITE_R_MODE_NV */
+ 1295, /* GL_QUERY_COUNTER_BITS */
+ 324, /* GL_CURRENT_QUERY */
+ 1298, /* GL_QUERY_RESULT */
+ 1300, /* GL_QUERY_RESULT_AVAILABLE */
+ 942, /* GL_MAX_VERTEX_ATTRIBS */
+ 1847, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
+ 378, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
+ 377, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
+ 928, /* GL_MAX_TEXTURE_COORDS */
+ 930, /* GL_MAX_TEXTURE_IMAGE_UNITS */
+ 1238, /* GL_PROGRAM_ERROR_STRING_ARB */
+ 1240, /* GL_PROGRAM_FORMAT_ASCII_ARB */
+ 1239, /* GL_PROGRAM_FORMAT_ARB */
+ 1754, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
+ 355, /* GL_DEPTH_BOUNDS_TEST_EXT */
+ 354, /* GL_DEPTH_BOUNDS_EXT */
53, /* GL_ARRAY_BUFFER */
- 464, /* GL_ELEMENT_ARRAY_BUFFER */
+ 465, /* GL_ELEMENT_ARRAY_BUFFER */
54, /* GL_ARRAY_BUFFER_BINDING */
- 465, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
- 1816, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
- 1028, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
- 149, /* GL_COLOR_ARRAY_BUFFER_BINDING */
- 633, /* GL_INDEX_ARRAY_BUFFER_BINDING */
- 1678, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
- 460, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
- 1421, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
- 514, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
- 1869, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
- 1838, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
- 1240, /* GL_PROGRAM_INSTRUCTIONS_ARB */
- 899, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
- 1246, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- 908, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- 1258, /* GL_PROGRAM_TEMPORARIES_ARB */
- 914, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
- 1248, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
- 910, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
- 1252, /* GL_PROGRAM_PARAMETERS_ARB */
- 913, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
- 1247, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
- 909, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
- 1233, /* GL_PROGRAM_ATTRIBS_ARB */
- 894, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
- 1245, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
- 907, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
- 1231, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
- 892, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
- 1243, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- 905, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- 900, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
- 896, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
- 1261, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
- 1762, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
- 1309, /* GL_READ_ONLY */
- 1877, /* GL_WRITE_ONLY */
- 1311, /* GL_READ_WRITE */
+ 466, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
+ 1821, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+ 1029, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
+ 150, /* GL_COLOR_ARRAY_BUFFER_BINDING */
+ 634, /* GL_INDEX_ARRAY_BUFFER_BINDING */
+ 1682, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
+ 461, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
+ 1425, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
+ 515, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
+ 1875, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+ 1843, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
+ 1241, /* GL_PROGRAM_INSTRUCTIONS_ARB */
+ 900, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
+ 1247, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ 909, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ 1259, /* GL_PROGRAM_TEMPORARIES_ARB */
+ 915, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
+ 1249, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ 911, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ 1253, /* GL_PROGRAM_PARAMETERS_ARB */
+ 914, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
+ 1248, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
+ 910, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
+ 1234, /* GL_PROGRAM_ATTRIBS_ARB */
+ 895, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
+ 1246, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
+ 908, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
+ 1232, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
+ 893, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
+ 1244, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ 906, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ 901, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
+ 897, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
+ 1262, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
+ 1766, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
+ 1311, /* GL_READ_ONLY */
+ 1883, /* GL_WRITE_ONLY */
+ 1313, /* GL_READ_WRITE */
102, /* GL_BUFFER_ACCESS */
105, /* GL_BUFFER_MAPPED */
107, /* GL_BUFFER_MAP_POINTER */
- 1756, /* GL_TIME_ELAPSED_EXT */
- 809, /* GL_MATRIX0_ARB */
- 821, /* GL_MATRIX1_ARB */
- 833, /* GL_MATRIX2_ARB */
- 837, /* GL_MATRIX3_ARB */
- 839, /* GL_MATRIX4_ARB */
- 841, /* GL_MATRIX5_ARB */
- 843, /* GL_MATRIX6_ARB */
- 845, /* GL_MATRIX7_ARB */
- 847, /* GL_MATRIX8_ARB */
- 848, /* GL_MATRIX9_ARB */
- 811, /* GL_MATRIX10_ARB */
- 812, /* GL_MATRIX11_ARB */
- 813, /* GL_MATRIX12_ARB */
- 814, /* GL_MATRIX13_ARB */
- 815, /* GL_MATRIX14_ARB */
- 816, /* GL_MATRIX15_ARB */
- 817, /* GL_MATRIX16_ARB */
- 818, /* GL_MATRIX17_ARB */
- 819, /* GL_MATRIX18_ARB */
- 820, /* GL_MATRIX19_ARB */
- 823, /* GL_MATRIX20_ARB */
- 824, /* GL_MATRIX21_ARB */
- 825, /* GL_MATRIX22_ARB */
- 826, /* GL_MATRIX23_ARB */
- 827, /* GL_MATRIX24_ARB */
- 828, /* GL_MATRIX25_ARB */
- 829, /* GL_MATRIX26_ARB */
- 830, /* GL_MATRIX27_ARB */
- 831, /* GL_MATRIX28_ARB */
- 832, /* GL_MATRIX29_ARB */
- 835, /* GL_MATRIX30_ARB */
- 836, /* GL_MATRIX31_ARB */
- 1545, /* GL_STREAM_DRAW */
- 1547, /* GL_STREAM_READ */
- 1543, /* GL_STREAM_COPY */
- 1499, /* GL_STATIC_DRAW */
- 1501, /* GL_STATIC_READ */
- 1497, /* GL_STATIC_COPY */
- 454, /* GL_DYNAMIC_DRAW */
- 456, /* GL_DYNAMIC_READ */
- 452, /* GL_DYNAMIC_COPY */
- 1134, /* GL_PIXEL_PACK_BUFFER */
- 1138, /* GL_PIXEL_UNPACK_BUFFER */
- 1135, /* GL_PIXEL_PACK_BUFFER_BINDING */
- 1139, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
- 347, /* GL_DEPTH24_STENCIL8 */
- 1746, /* GL_TEXTURE_STENCIL_SIZE */
- 1698, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
- 895, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
- 898, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
- 902, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
- 901, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
- 858, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
- 1536, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
+ 1760, /* GL_TIME_ELAPSED_EXT */
+ 810, /* GL_MATRIX0_ARB */
+ 822, /* GL_MATRIX1_ARB */
+ 834, /* GL_MATRIX2_ARB */
+ 838, /* GL_MATRIX3_ARB */
+ 840, /* GL_MATRIX4_ARB */
+ 842, /* GL_MATRIX5_ARB */
+ 844, /* GL_MATRIX6_ARB */
+ 846, /* GL_MATRIX7_ARB */
+ 848, /* GL_MATRIX8_ARB */
+ 849, /* GL_MATRIX9_ARB */
+ 812, /* GL_MATRIX10_ARB */
+ 813, /* GL_MATRIX11_ARB */
+ 814, /* GL_MATRIX12_ARB */
+ 815, /* GL_MATRIX13_ARB */
+ 816, /* GL_MATRIX14_ARB */
+ 817, /* GL_MATRIX15_ARB */
+ 818, /* GL_MATRIX16_ARB */
+ 819, /* GL_MATRIX17_ARB */
+ 820, /* GL_MATRIX18_ARB */
+ 821, /* GL_MATRIX19_ARB */
+ 824, /* GL_MATRIX20_ARB */
+ 825, /* GL_MATRIX21_ARB */
+ 826, /* GL_MATRIX22_ARB */
+ 827, /* GL_MATRIX23_ARB */
+ 828, /* GL_MATRIX24_ARB */
+ 829, /* GL_MATRIX25_ARB */
+ 830, /* GL_MATRIX26_ARB */
+ 831, /* GL_MATRIX27_ARB */
+ 832, /* GL_MATRIX28_ARB */
+ 833, /* GL_MATRIX29_ARB */
+ 836, /* GL_MATRIX30_ARB */
+ 837, /* GL_MATRIX31_ARB */
+ 1549, /* GL_STREAM_DRAW */
+ 1551, /* GL_STREAM_READ */
+ 1547, /* GL_STREAM_COPY */
+ 1503, /* GL_STATIC_DRAW */
+ 1505, /* GL_STATIC_READ */
+ 1501, /* GL_STATIC_COPY */
+ 455, /* GL_DYNAMIC_DRAW */
+ 457, /* GL_DYNAMIC_READ */
+ 453, /* GL_DYNAMIC_COPY */
+ 1135, /* GL_PIXEL_PACK_BUFFER */
+ 1139, /* GL_PIXEL_UNPACK_BUFFER */
+ 1136, /* GL_PIXEL_PACK_BUFFER_BINDING */
+ 1140, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
+ 348, /* GL_DEPTH24_STENCIL8 */
+ 1750, /* GL_TEXTURE_STENCIL_SIZE */
+ 1702, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
+ 896, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
+ 899, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
+ 903, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
+ 902, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
+ 859, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
+ 1540, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
17, /* GL_ACTIVE_STENCIL_FACE_EXT */
- 962, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
- 1402, /* GL_SAMPLES_PASSED */
- 109, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */
+ 963, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
+ 1406, /* GL_SAMPLES_PASSED */
+ 110, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */
104, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */
- 537, /* GL_FRAGMENT_SHADER */
- 1862, /* GL_VERTEX_SHADER */
- 1251, /* GL_PROGRAM_OBJECT_ARB */
- 1434, /* GL_SHADER_OBJECT_ARB */
- 883, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
- 945, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
- 939, /* GL_MAX_VARYING_FLOATS */
- 943, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
- 868, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
- 1054, /* GL_OBJECT_TYPE_ARB */
- 1436, /* GL_SHADER_TYPE */
- 502, /* GL_FLOAT_VEC2 */
- 504, /* GL_FLOAT_VEC3 */
- 506, /* GL_FLOAT_VEC4 */
- 660, /* GL_INT_VEC2 */
- 662, /* GL_INT_VEC3 */
- 664, /* GL_INT_VEC4 */
+ 1324, /* GL_RELEASED_APPLE */
+ 1872, /* GL_VOLATILE_APPLE */
+ 1352, /* GL_RETAINED_APPLE */
+ 1779, /* GL_UNDEFINED_APPLE */
+ 1285, /* GL_PURGEABLE_APPLE */
+ 538, /* GL_FRAGMENT_SHADER */
+ 1867, /* GL_VERTEX_SHADER */
+ 1252, /* GL_PROGRAM_OBJECT_ARB */
+ 1438, /* GL_SHADER_OBJECT_ARB */
+ 884, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
+ 946, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
+ 940, /* GL_MAX_VARYING_FLOATS */
+ 944, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
+ 869, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
+ 1055, /* GL_OBJECT_TYPE_ARB */
+ 1440, /* GL_SHADER_TYPE */
+ 503, /* GL_FLOAT_VEC2 */
+ 505, /* GL_FLOAT_VEC3 */
+ 507, /* GL_FLOAT_VEC4 */
+ 661, /* GL_INT_VEC2 */
+ 663, /* GL_INT_VEC3 */
+ 665, /* GL_INT_VEC4 */
94, /* GL_BOOL */
96, /* GL_BOOL_VEC2 */
98, /* GL_BOOL_VEC3 */
100, /* GL_BOOL_VEC4 */
- 490, /* GL_FLOAT_MAT2 */
- 494, /* GL_FLOAT_MAT3 */
- 498, /* GL_FLOAT_MAT4 */
- 1393, /* GL_SAMPLER_1D */
- 1395, /* GL_SAMPLER_2D */
- 1397, /* GL_SAMPLER_3D */
- 1398, /* GL_SAMPLER_CUBE */
- 1394, /* GL_SAMPLER_1D_SHADOW */
- 1396, /* GL_SAMPLER_2D_SHADOW */
- 492, /* GL_FLOAT_MAT2x3 */
- 493, /* GL_FLOAT_MAT2x4 */
- 496, /* GL_FLOAT_MAT3x2 */
- 497, /* GL_FLOAT_MAT3x4 */
- 500, /* GL_FLOAT_MAT4x2 */
- 501, /* GL_FLOAT_MAT4x3 */
- 345, /* GL_DELETE_STATUS */
- 246, /* GL_COMPILE_STATUS */
- 716, /* GL_LINK_STATUS */
- 1810, /* GL_VALIDATE_STATUS */
- 645, /* GL_INFO_LOG_LENGTH */
+ 491, /* GL_FLOAT_MAT2 */
+ 495, /* GL_FLOAT_MAT3 */
+ 499, /* GL_FLOAT_MAT4 */
+ 1397, /* GL_SAMPLER_1D */
+ 1399, /* GL_SAMPLER_2D */
+ 1401, /* GL_SAMPLER_3D */
+ 1402, /* GL_SAMPLER_CUBE */
+ 1398, /* GL_SAMPLER_1D_SHADOW */
+ 1400, /* GL_SAMPLER_2D_SHADOW */
+ 493, /* GL_FLOAT_MAT2x3 */
+ 494, /* GL_FLOAT_MAT2x4 */
+ 497, /* GL_FLOAT_MAT3x2 */
+ 498, /* GL_FLOAT_MAT3x4 */
+ 501, /* GL_FLOAT_MAT4x2 */
+ 502, /* GL_FLOAT_MAT4x3 */
+ 346, /* GL_DELETE_STATUS */
+ 247, /* GL_COMPILE_STATUS */
+ 717, /* GL_LINK_STATUS */
+ 1815, /* GL_VALIDATE_STATUS */
+ 646, /* GL_INFO_LOG_LENGTH */
56, /* GL_ATTACHED_SHADERS */
20, /* GL_ACTIVE_UNIFORMS */
21, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
- 1435, /* GL_SHADER_SOURCE_LENGTH */
+ 1439, /* GL_SHADER_SOURCE_LENGTH */
15, /* GL_ACTIVE_ATTRIBUTES */
16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
- 539, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
- 1438, /* GL_SHADING_LANGUAGE_VERSION */
- 322, /* GL_CURRENT_PROGRAM */
- 1103, /* GL_PALETTE4_RGB8_OES */
- 1105, /* GL_PALETTE4_RGBA8_OES */
- 1101, /* GL_PALETTE4_R5_G6_B5_OES */
- 1104, /* GL_PALETTE4_RGBA4_OES */
- 1102, /* GL_PALETTE4_RGB5_A1_OES */
- 1108, /* GL_PALETTE8_RGB8_OES */
- 1110, /* GL_PALETTE8_RGBA8_OES */
- 1106, /* GL_PALETTE8_R5_G6_B5_OES */
- 1109, /* GL_PALETTE8_RGBA4_OES */
- 1107, /* GL_PALETTE8_RGB5_A1_OES */
- 627, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
- 626, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
- 1795, /* GL_UNSIGNED_NORMALIZED */
- 1633, /* GL_TEXTURE_1D_ARRAY_EXT */
- 1273, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
- 1635, /* GL_TEXTURE_2D_ARRAY_EXT */
- 1276, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
- 1641, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
- 1643, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
- 1491, /* GL_SRGB */
- 1492, /* GL_SRGB8 */
- 1494, /* GL_SRGB_ALPHA */
- 1493, /* GL_SRGB8_ALPHA8 */
- 1451, /* GL_SLUMINANCE_ALPHA */
- 1450, /* GL_SLUMINANCE8_ALPHA8 */
- 1448, /* GL_SLUMINANCE */
- 1449, /* GL_SLUMINANCE8 */
- 267, /* GL_COMPRESSED_SRGB */
- 268, /* GL_COMPRESSED_SRGB_ALPHA */
- 265, /* GL_COMPRESSED_SLUMINANCE */
- 266, /* GL_COMPRESSED_SLUMINANCE_ALPHA */
- 1168, /* GL_POINT_SPRITE_COORD_ORIGIN */
- 724, /* GL_LOWER_LEFT */
- 1807, /* GL_UPPER_LEFT */
- 1514, /* GL_STENCIL_BACK_REF */
- 1515, /* GL_STENCIL_BACK_VALUE_MASK */
- 1516, /* GL_STENCIL_BACK_WRITEMASK */
- 444, /* GL_DRAW_FRAMEBUFFER_BINDING */
- 1325, /* GL_RENDERBUFFER_BINDING */
- 1305, /* GL_READ_FRAMEBUFFER */
- 443, /* GL_DRAW_FRAMEBUFFER */
- 1306, /* GL_READ_FRAMEBUFFER_BINDING */
- 1336, /* GL_RENDERBUFFER_SAMPLES */
- 549, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
- 547, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
- 558, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
- 554, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
- 556, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
- 562, /* GL_FRAMEBUFFER_COMPLETE */
- 566, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
- 573, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
- 571, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
- 568, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
- 572, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
- 569, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
- 577, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
- 581, /* GL_FRAMEBUFFER_UNSUPPORTED */
- 579, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
- 864, /* GL_MAX_COLOR_ATTACHMENTS */
- 155, /* GL_COLOR_ATTACHMENT0 */
- 157, /* GL_COLOR_ATTACHMENT1 */
- 171, /* GL_COLOR_ATTACHMENT2 */
- 173, /* GL_COLOR_ATTACHMENT3 */
- 175, /* GL_COLOR_ATTACHMENT4 */
- 177, /* GL_COLOR_ATTACHMENT5 */
- 179, /* GL_COLOR_ATTACHMENT6 */
- 181, /* GL_COLOR_ATTACHMENT7 */
- 183, /* GL_COLOR_ATTACHMENT8 */
- 185, /* GL_COLOR_ATTACHMENT9 */
- 158, /* GL_COLOR_ATTACHMENT10 */
- 160, /* GL_COLOR_ATTACHMENT11 */
- 162, /* GL_COLOR_ATTACHMENT12 */
- 164, /* GL_COLOR_ATTACHMENT13 */
- 166, /* GL_COLOR_ATTACHMENT14 */
- 168, /* GL_COLOR_ATTACHMENT15 */
- 349, /* GL_DEPTH_ATTACHMENT */
- 1504, /* GL_STENCIL_ATTACHMENT */
- 540, /* GL_FRAMEBUFFER */
- 1323, /* GL_RENDERBUFFER */
- 1339, /* GL_RENDERBUFFER_WIDTH */
- 1331, /* GL_RENDERBUFFER_HEIGHT */
- 1333, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
- 1531, /* GL_STENCIL_INDEX_EXT */
- 1523, /* GL_STENCIL_INDEX1 */
- 1527, /* GL_STENCIL_INDEX4 */
- 1529, /* GL_STENCIL_INDEX8 */
- 1524, /* GL_STENCIL_INDEX16 */
- 1335, /* GL_RENDERBUFFER_RED_SIZE */
- 1330, /* GL_RENDERBUFFER_GREEN_SIZE */
- 1327, /* GL_RENDERBUFFER_BLUE_SIZE */
- 1324, /* GL_RENDERBUFFER_ALPHA_SIZE */
- 1328, /* GL_RENDERBUFFER_DEPTH_SIZE */
- 1338, /* GL_RENDERBUFFER_STENCIL_SIZE */
- 575, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
- 922, /* GL_MAX_SAMPLES */
- 1300, /* GL_QUERY_WAIT_NV */
- 1295, /* GL_QUERY_NO_WAIT_NV */
- 1292, /* GL_QUERY_BY_REGION_WAIT_NV */
- 1291, /* GL_QUERY_BY_REGION_NO_WAIT_NV */
- 1287, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
- 486, /* GL_FIRST_VERTEX_CONVENTION */
- 675, /* GL_LAST_VERTEX_CONVENTION */
- 1265, /* GL_PROVOKING_VERTEX */
- 302, /* GL_COPY_READ_BUFFER */
- 303, /* GL_COPY_WRITE_BUFFER */
- 1386, /* GL_RGBA_SNORM */
- 1382, /* GL_RGBA8_SNORM */
- 1444, /* GL_SIGNED_NORMALIZED */
- 924, /* GL_MAX_SERVER_WAIT_TIMEOUT */
- 1053, /* GL_OBJECT_TYPE */
- 1552, /* GL_SYNC_CONDITION */
- 1557, /* GL_SYNC_STATUS */
- 1554, /* GL_SYNC_FLAGS */
- 1553, /* GL_SYNC_FENCE */
- 1556, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
- 1783, /* GL_UNSIGNALED */
- 1443, /* GL_SIGNALED */
+ 540, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
+ 1442, /* GL_SHADING_LANGUAGE_VERSION */
+ 323, /* GL_CURRENT_PROGRAM */
+ 1104, /* GL_PALETTE4_RGB8_OES */
+ 1106, /* GL_PALETTE4_RGBA8_OES */
+ 1102, /* GL_PALETTE4_R5_G6_B5_OES */
+ 1105, /* GL_PALETTE4_RGBA4_OES */
+ 1103, /* GL_PALETTE4_RGB5_A1_OES */
+ 1109, /* GL_PALETTE8_RGB8_OES */
+ 1111, /* GL_PALETTE8_RGBA8_OES */
+ 1107, /* GL_PALETTE8_R5_G6_B5_OES */
+ 1110, /* GL_PALETTE8_RGBA4_OES */
+ 1108, /* GL_PALETTE8_RGB5_A1_OES */
+ 628, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
+ 627, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
+ 1800, /* GL_UNSIGNED_NORMALIZED */
+ 1637, /* GL_TEXTURE_1D_ARRAY_EXT */
+ 1274, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
+ 1639, /* GL_TEXTURE_2D_ARRAY_EXT */
+ 1277, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
+ 1645, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
+ 1647, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
+ 1495, /* GL_SRGB */
+ 1496, /* GL_SRGB8 */
+ 1498, /* GL_SRGB_ALPHA */
+ 1497, /* GL_SRGB8_ALPHA8 */
+ 1455, /* GL_SLUMINANCE_ALPHA */
+ 1454, /* GL_SLUMINANCE8_ALPHA8 */
+ 1452, /* GL_SLUMINANCE */
+ 1453, /* GL_SLUMINANCE8 */
+ 268, /* GL_COMPRESSED_SRGB */
+ 269, /* GL_COMPRESSED_SRGB_ALPHA */
+ 266, /* GL_COMPRESSED_SLUMINANCE */
+ 267, /* GL_COMPRESSED_SLUMINANCE_ALPHA */
+ 1169, /* GL_POINT_SPRITE_COORD_ORIGIN */
+ 725, /* GL_LOWER_LEFT */
+ 1812, /* GL_UPPER_LEFT */
+ 1518, /* GL_STENCIL_BACK_REF */
+ 1519, /* GL_STENCIL_BACK_VALUE_MASK */
+ 1520, /* GL_STENCIL_BACK_WRITEMASK */
+ 445, /* GL_DRAW_FRAMEBUFFER_BINDING */
+ 1328, /* GL_RENDERBUFFER_BINDING */
+ 1307, /* GL_READ_FRAMEBUFFER */
+ 444, /* GL_DRAW_FRAMEBUFFER */
+ 1308, /* GL_READ_FRAMEBUFFER_BINDING */
+ 1339, /* GL_RENDERBUFFER_SAMPLES */
+ 550, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
+ 548, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
+ 559, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
+ 555, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
+ 557, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
+ 563, /* GL_FRAMEBUFFER_COMPLETE */
+ 567, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
+ 574, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
+ 572, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
+ 569, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
+ 573, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
+ 570, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
+ 578, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
+ 582, /* GL_FRAMEBUFFER_UNSUPPORTED */
+ 580, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
+ 865, /* GL_MAX_COLOR_ATTACHMENTS */
+ 156, /* GL_COLOR_ATTACHMENT0 */
+ 158, /* GL_COLOR_ATTACHMENT1 */
+ 172, /* GL_COLOR_ATTACHMENT2 */
+ 174, /* GL_COLOR_ATTACHMENT3 */
+ 176, /* GL_COLOR_ATTACHMENT4 */
+ 178, /* GL_COLOR_ATTACHMENT5 */
+ 180, /* GL_COLOR_ATTACHMENT6 */
+ 182, /* GL_COLOR_ATTACHMENT7 */
+ 184, /* GL_COLOR_ATTACHMENT8 */
+ 186, /* GL_COLOR_ATTACHMENT9 */
+ 159, /* GL_COLOR_ATTACHMENT10 */
+ 161, /* GL_COLOR_ATTACHMENT11 */
+ 163, /* GL_COLOR_ATTACHMENT12 */
+ 165, /* GL_COLOR_ATTACHMENT13 */
+ 167, /* GL_COLOR_ATTACHMENT14 */
+ 169, /* GL_COLOR_ATTACHMENT15 */
+ 350, /* GL_DEPTH_ATTACHMENT */
+ 1508, /* GL_STENCIL_ATTACHMENT */
+ 541, /* GL_FRAMEBUFFER */
+ 1326, /* GL_RENDERBUFFER */
+ 1342, /* GL_RENDERBUFFER_WIDTH */
+ 1334, /* GL_RENDERBUFFER_HEIGHT */
+ 1336, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
+ 1535, /* GL_STENCIL_INDEX_EXT */
+ 1527, /* GL_STENCIL_INDEX1 */
+ 1531, /* GL_STENCIL_INDEX4 */
+ 1533, /* GL_STENCIL_INDEX8 */
+ 1528, /* GL_STENCIL_INDEX16 */
+ 1338, /* GL_RENDERBUFFER_RED_SIZE */
+ 1333, /* GL_RENDERBUFFER_GREEN_SIZE */
+ 1330, /* GL_RENDERBUFFER_BLUE_SIZE */
+ 1327, /* GL_RENDERBUFFER_ALPHA_SIZE */
+ 1331, /* GL_RENDERBUFFER_DEPTH_SIZE */
+ 1341, /* GL_RENDERBUFFER_STENCIL_SIZE */
+ 576, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
+ 923, /* GL_MAX_SAMPLES */
+ 1302, /* GL_QUERY_WAIT_NV */
+ 1297, /* GL_QUERY_NO_WAIT_NV */
+ 1294, /* GL_QUERY_BY_REGION_WAIT_NV */
+ 1293, /* GL_QUERY_BY_REGION_NO_WAIT_NV */
+ 1289, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
+ 487, /* GL_FIRST_VERTEX_CONVENTION */
+ 676, /* GL_LAST_VERTEX_CONVENTION */
+ 1266, /* GL_PROVOKING_VERTEX */
+ 303, /* GL_COPY_READ_BUFFER */
+ 304, /* GL_COPY_WRITE_BUFFER */
+ 1390, /* GL_RGBA_SNORM */
+ 1386, /* GL_RGBA8_SNORM */
+ 1448, /* GL_SIGNED_NORMALIZED */
+ 925, /* GL_MAX_SERVER_WAIT_TIMEOUT */
+ 1054, /* GL_OBJECT_TYPE */
+ 1556, /* GL_SYNC_CONDITION */
+ 1561, /* GL_SYNC_STATUS */
+ 1558, /* GL_SYNC_FLAGS */
+ 1557, /* GL_SYNC_FENCE */
+ 1560, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
+ 1788, /* GL_UNSIGNALED */
+ 1447, /* GL_SIGNALED */
46, /* GL_ALREADY_SIGNALED */
- 1755, /* GL_TIMEOUT_EXPIRED */
- 270, /* GL_CONDITION_SATISFIED */
- 1867, /* GL_WAIT_FAILED */
- 471, /* GL_EVAL_BIT */
- 1303, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
- 718, /* GL_LIST_BIT */
- 1649, /* GL_TEXTURE_BIT */
- 1417, /* GL_SCISSOR_BIT */
+ 1759, /* GL_TIMEOUT_EXPIRED */
+ 271, /* GL_CONDITION_SATISFIED */
+ 1873, /* GL_WAIT_FAILED */
+ 472, /* GL_EVAL_BIT */
+ 1305, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
+ 719, /* GL_LIST_BIT */
+ 1653, /* GL_TEXTURE_BIT */
+ 1421, /* GL_SCISSOR_BIT */
29, /* GL_ALL_ATTRIB_BITS */
- 1009, /* GL_MULTISAMPLE_BIT */
+ 1010, /* GL_MULTISAMPLE_BIT */
30, /* GL_ALL_CLIENT_ATTRIB_BITS */
};
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 0e7e52a54a..30245d6aaf 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -153,6 +153,7 @@ static const struct {
{ OFF, "GL_APPLE_client_storage", F(APPLE_client_storage) },
{ ON, "GL_APPLE_packed_pixels", F(APPLE_packed_pixels) },
{ OFF, "GL_APPLE_vertex_array_object", F(APPLE_vertex_array_object) },
+ { OFF, "GL_APPLE_object_purgeable", F(APPLE_object_purgeable) },
{ OFF, "GL_ATI_blend_equation_separate", F(EXT_blend_equation_separate) },
{ OFF, "GL_ATI_envmap_bumpmap", F(ATI_envmap_bumpmap) },
{ OFF, "GL_ATI_texture_env_combine3", F(ATI_texture_env_combine3)},
@@ -265,6 +266,9 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
ctx->Extensions.ARB_sync = GL_TRUE;
#endif
ctx->Extensions.APPLE_vertex_array_object = GL_TRUE;
+#if FEATURE_APPLE_object_purgeable
+ ctx->Extensions.APPLE_object_purgeable = GL_TRUE;
+#endif
ctx->Extensions.ATI_envmap_bumpmap = GL_TRUE;
#if FEATURE_ATI_fragment_shader
ctx->Extensions.ATI_fragment_shader = GL_TRUE;
diff --git a/src/mesa/main/feedback.c b/src/mesa/main/feedback.c
index e20456fa75..c72b91280e 100644
--- a/src/mesa/main/feedback.c
+++ b/src/mesa/main/feedback.c
@@ -44,9 +44,8 @@
#define FB_3D 0x01
#define FB_4D 0x02
-#define FB_INDEX 0x04
-#define FB_COLOR 0x08
-#define FB_TEXTURE 0X10
+#define FB_COLOR 0x04
+#define FB_TEXTURE 0X08
@@ -78,18 +77,13 @@ _mesa_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer )
ctx->Feedback._Mask = FB_3D;
break;
case GL_3D_COLOR:
- ctx->Feedback._Mask = (FB_3D |
- (ctx->Visual.rgbMode ? FB_COLOR : FB_INDEX));
+ ctx->Feedback._Mask = (FB_3D | FB_COLOR);
break;
case GL_3D_COLOR_TEXTURE:
- ctx->Feedback._Mask = (FB_3D |
- (ctx->Visual.rgbMode ? FB_COLOR : FB_INDEX) |
- FB_TEXTURE);
+ ctx->Feedback._Mask = (FB_3D | FB_COLOR | FB_TEXTURE);
break;
case GL_4D_COLOR_TEXTURE:
- ctx->Feedback._Mask = (FB_3D | FB_4D |
- (ctx->Visual.rgbMode ? FB_COLOR : FB_INDEX) |
- FB_TEXTURE);
+ ctx->Feedback._Mask = (FB_3D | FB_4D | FB_COLOR | FB_TEXTURE);
break;
default:
_mesa_error( ctx, GL_INVALID_ENUM, "glFeedbackBuffer" );
@@ -125,7 +119,6 @@ void
_mesa_feedback_vertex(GLcontext *ctx,
const GLfloat win[4],
const GLfloat color[4],
- GLfloat index,
const GLfloat texcoord[4])
{
_mesa_feedback_token( ctx, win[0] );
@@ -136,9 +129,6 @@ _mesa_feedback_vertex(GLcontext *ctx,
if (ctx->Feedback._Mask & FB_4D) {
_mesa_feedback_token( ctx, win[3] );
}
- if (ctx->Feedback._Mask & FB_INDEX) {
- _mesa_feedback_token( ctx, (GLfloat) index );
- }
if (ctx->Feedback._Mask & FB_COLOR) {
_mesa_feedback_token( ctx, color[0] );
_mesa_feedback_token( ctx, color[1] );
diff --git a/src/mesa/main/feedback.h b/src/mesa/main/feedback.h
index 7a648f444f..3e8283ed23 100644
--- a/src/mesa/main/feedback.h
+++ b/src/mesa/main/feedback.h
@@ -41,7 +41,6 @@ extern void
_mesa_feedback_vertex( GLcontext *ctx,
const GLfloat win[4],
const GLfloat color[4],
- GLfloat index,
const GLfloat texcoord[4] );
@@ -70,7 +69,6 @@ static INLINE void
_mesa_feedback_vertex( GLcontext *ctx,
const GLfloat win[4],
const GLfloat color[4],
- GLfloat index,
const GLfloat texcoord[4] )
{
/* render mode is always GL_RENDER */
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index 269bc9ac6c..6a85162d5d 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -536,7 +536,7 @@ _mesa_update_framebuffer_visual(struct gl_framebuffer *fb)
}
#endif
- /* find first RGB or CI renderbuffer */
+ /* find first RGB renderbuffer */
for (i = 0; i < BUFFER_COUNT; i++) {
if (fb->Attachment[i].Renderbuffer) {
const struct gl_renderbuffer *rb = fb->Attachment[i].Renderbuffer;
@@ -554,11 +554,6 @@ _mesa_update_framebuffer_visual(struct gl_framebuffer *fb)
fb->Visual.samples = rb->NumSamples;
break;
}
- else if (baseFormat == GL_COLOR_INDEX) {
- fb->Visual.indexBits = _mesa_get_format_bits(fmt, GL_INDEX_BITS);
- fb->Visual.rgbMode = GL_FALSE;
- break;
- }
}
}
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 60fef552c4..edc4400912 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -253,7 +253,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterDistance);
break;
case GL_CURRENT_RASTER_INDEX:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterIndex);
+ params[0] = FLOAT_TO_BOOLEAN(1.0);
break;
case GL_CURRENT_RASTER_POSITION:
params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[0]);
@@ -391,7 +391,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
params[0] = INT_TO_BOOLEAN(ctx->Color.ClearIndex);
break;
case GL_INDEX_MODE:
- params[0] = !ctx->DrawBuffer->Visual.rgbMode;
+ params[0] = GL_FALSE;
break;
case GL_INDEX_OFFSET:
params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexOffset);
@@ -827,7 +827,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
params[0] = ctx->Transform.RescaleNormals;
break;
case GL_RGBA_MODE:
- params[0] = ctx->DrawBuffer->Visual.rgbMode;
+ params[0] = GL_TRUE;
break;
case GL_SCISSOR_BOX:
params[0] = INT_TO_BOOLEAN(ctx->Scissor.X);
@@ -2122,7 +2122,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
params[0] = ctx->Current.RasterDistance;
break;
case GL_CURRENT_RASTER_INDEX:
- params[0] = ctx->Current.RasterIndex;
+ params[0] = 1.0;
break;
case GL_CURRENT_RASTER_POSITION:
params[0] = ctx->Current.RasterPos[0];
@@ -2260,7 +2260,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
params[0] = (GLfloat)(ctx->Color.ClearIndex);
break;
case GL_INDEX_MODE:
- params[0] = BOOLEAN_TO_FLOAT(!ctx->DrawBuffer->Visual.rgbMode);
+ params[0] = BOOLEAN_TO_FLOAT(GL_FALSE);
break;
case GL_INDEX_OFFSET:
params[0] = (GLfloat)(ctx->Pixel.IndexOffset);
@@ -2696,7 +2696,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RescaleNormals);
break;
case GL_RGBA_MODE:
- params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.rgbMode);
+ params[0] = BOOLEAN_TO_FLOAT(GL_TRUE);
break;
case GL_SCISSOR_BOX:
params[0] = (GLfloat)(ctx->Scissor.X);
@@ -3991,7 +3991,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
params[0] = IROUND(ctx->Current.RasterDistance);
break;
case GL_CURRENT_RASTER_INDEX:
- params[0] = IROUND(ctx->Current.RasterIndex);
+ params[0] = IROUND(1.0);
break;
case GL_CURRENT_RASTER_POSITION:
params[0] = IROUND(ctx->Current.RasterPos[0]);
@@ -4129,7 +4129,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
params[0] = ctx->Color.ClearIndex;
break;
case GL_INDEX_MODE:
- params[0] = BOOLEAN_TO_INT(!ctx->DrawBuffer->Visual.rgbMode);
+ params[0] = BOOLEAN_TO_INT(GL_FALSE);
break;
case GL_INDEX_OFFSET:
params[0] = ctx->Pixel.IndexOffset;
@@ -4565,7 +4565,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
params[0] = BOOLEAN_TO_INT(ctx->Transform.RescaleNormals);
break;
case GL_RGBA_MODE:
- params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.rgbMode);
+ params[0] = BOOLEAN_TO_INT(GL_TRUE);
break;
case GL_SCISSOR_BOX:
params[0] = ctx->Scissor.X;
@@ -5861,7 +5861,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = IROUND64(ctx->Current.RasterDistance);
break;
case GL_CURRENT_RASTER_INDEX:
- params[0] = IROUND64(ctx->Current.RasterIndex);
+ params[0] = IROUND64(1.0);
break;
case GL_CURRENT_RASTER_POSITION:
params[0] = IROUND64(ctx->Current.RasterPos[0]);
@@ -5999,7 +5999,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = (GLint64)(ctx->Color.ClearIndex);
break;
case GL_INDEX_MODE:
- params[0] = BOOLEAN_TO_INT64(!ctx->DrawBuffer->Visual.rgbMode);
+ params[0] = BOOLEAN_TO_INT64(GL_FALSE);
break;
case GL_INDEX_OFFSET:
params[0] = (GLint64)(ctx->Pixel.IndexOffset);
@@ -6435,7 +6435,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = BOOLEAN_TO_INT64(ctx->Transform.RescaleNormals);
break;
case GL_RGBA_MODE:
- params[0] = BOOLEAN_TO_INT64(ctx->DrawBuffer->Visual.rgbMode);
+ params[0] = BOOLEAN_TO_INT64(GL_TRUE);
break;
case GL_SCISSOR_BOX:
params[0] = (GLint64)(ctx->Scissor.X);
diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py
index 64aa2aca26..9d5a51d58c 100644
--- a/src/mesa/main/get_gen.py
+++ b/src/mesa/main/get_gen.py
@@ -155,7 +155,7 @@ StateVars = [
( "GL_CURRENT_RASTER_DISTANCE", GLfloat,
["ctx->Current.RasterDistance"], "", None ),
( "GL_CURRENT_RASTER_INDEX", GLfloat,
- ["ctx->Current.RasterIndex"], "", None ),
+ ["1.0"], "", None ),
( "GL_CURRENT_RASTER_POSITION", GLfloat,
["ctx->Current.RasterPos[0]",
"ctx->Current.RasterPos[1]",
@@ -231,7 +231,7 @@ StateVars = [
( "GL_INDEX_BITS", GLint, ["ctx->DrawBuffer->Visual.indexBits"],
"", None ),
( "GL_INDEX_CLEAR_VALUE", GLint, ["ctx->Color.ClearIndex"], "", None ),
- ( "GL_INDEX_MODE", GLboolean, ["!ctx->DrawBuffer->Visual.rgbMode"],
+ ( "GL_INDEX_MODE", GLboolean, ["GL_FALSE"],
"", None ),
( "GL_INDEX_OFFSET", GLint, ["ctx->Pixel.IndexOffset"], "", None ),
( "GL_INDEX_SHIFT", GLint, ["ctx->Pixel.IndexShift"], "", None ),
@@ -410,7 +410,7 @@ StateVars = [
( "GL_RENDER_MODE", GLenum, ["ctx->RenderMode"], "", None ),
( "GL_RESCALE_NORMAL", GLboolean,
["ctx->Transform.RescaleNormals"], "", None ),
- ( "GL_RGBA_MODE", GLboolean, ["ctx->DrawBuffer->Visual.rgbMode"],
+ ( "GL_RGBA_MODE", GLboolean, ["GL_TRUE"],
"", None ),
( "GL_SCISSOR_BOX", GLint,
["ctx->Scissor.X",
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index ac3a7b5d61..fb4a00eca7 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -240,9 +240,7 @@ static INLINE int GET_FLOAT_BITS( float x )
/***
*** IROUND: return (as an integer) float rounded to nearest integer
***/
-#if defined(USE_X86_ASM) && defined(__GNUC__) && defined(__i386__) && \
- (!(defined(__BEOS__) || defined(__HAIKU__)) || \
- (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)))
+#if defined(USE_X86_ASM) && defined(__GNUC__) && defined(__i386__)
static INLINE int iround(float f)
{
int r;
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c
index 6899ed0ddf..19dc96892d 100644
--- a/src/mesa/main/light.c
+++ b/src/mesa/main/light.c
@@ -1093,31 +1093,22 @@ _mesa_update_lighting( GLcontext *ctx )
* FLUSH_UPDATE_CURRENT, as when any outstanding material changes
* are flushed, they will update the derived state at that time.
*/
- if (ctx->Visual.rgbMode) {
- if (ctx->Light.Model.TwoSide)
- _mesa_update_material( ctx,
- MAT_BIT_FRONT_EMISSION |
- MAT_BIT_FRONT_AMBIENT |
- MAT_BIT_FRONT_DIFFUSE |
- MAT_BIT_FRONT_SPECULAR |
- MAT_BIT_BACK_EMISSION |
- MAT_BIT_BACK_AMBIENT |
- MAT_BIT_BACK_DIFFUSE |
- MAT_BIT_BACK_SPECULAR);
- else
- _mesa_update_material( ctx,
- MAT_BIT_FRONT_EMISSION |
- MAT_BIT_FRONT_AMBIENT |
- MAT_BIT_FRONT_DIFFUSE |
- MAT_BIT_FRONT_SPECULAR);
- }
- else {
- static const GLfloat ci[3] = { .30F, .59F, .11F };
- foreach(light, &ctx->Light.EnabledList) {
- light->_dli = DOT3(ci, light->Diffuse);
- light->_sli = DOT3(ci, light->Specular);
- }
- }
+ if (ctx->Light.Model.TwoSide)
+ _mesa_update_material(ctx,
+ MAT_BIT_FRONT_EMISSION |
+ MAT_BIT_FRONT_AMBIENT |
+ MAT_BIT_FRONT_DIFFUSE |
+ MAT_BIT_FRONT_SPECULAR |
+ MAT_BIT_BACK_EMISSION |
+ MAT_BIT_BACK_AMBIENT |
+ MAT_BIT_BACK_DIFFUSE |
+ MAT_BIT_BACK_SPECULAR);
+ else
+ _mesa_update_material(ctx,
+ MAT_BIT_FRONT_EMISSION |
+ MAT_BIT_FRONT_AMBIENT |
+ MAT_BIT_FRONT_DIFFUSE |
+ MAT_BIT_FRONT_SPECULAR);
}
diff --git a/src/mesa/main/mfeatures.h b/src/mesa/main/mfeatures.h
index f0896ee626..cb96c4d1d0 100644
--- a/src/mesa/main/mfeatures.h
+++ b/src/mesa/main/mfeatures.h
@@ -116,6 +116,7 @@
#define FEATURE_EXT_framebuffer_blit _HAVE_FULL_GL
#define FEATURE_EXT_framebuffer_object _HAVE_FULL_GL
#define FEATURE_EXT_pixel_buffer_object _HAVE_FULL_GL
+#define FEATURE_APPLE_object_purgeable _HAVE_FULL_GL
#define FEATURE_EXT_texture_sRGB _HAVE_FULL_GL
#define FEATURE_ATI_fragment_shader _HAVE_FULL_GL
#define FEATURE_NV_fence _HAVE_FULL_GL
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index 21ee317a31..51f7edfab1 100644
--- a/src/mesa/main/mipmap.c
+++ b/src/mesa/main/mipmap.c
@@ -1269,6 +1269,8 @@ make_1d_stack_mipmap(GLenum datatype, GLuint comps, GLint border,
if (border) {
/* copy left-most pixel from source */
+ assert(dstPtr);
+ assert(srcPtr);
memcpy(dstPtr, srcPtr, bpt);
/* copy right-most pixel from source */
memcpy(dstPtr + (dstWidth - 1) * bpt,
@@ -1323,6 +1325,8 @@ make_2d_stack_mipmap(GLenum datatype, GLuint comps, GLint border,
if (border > 0) {
/* fill in dest border */
/* lower-left border pixel */
+ assert(dstPtr);
+ assert(srcPtr);
memcpy(dstPtr, srcPtr, bpt);
/* lower-right border pixel */
memcpy(dstPtr + (dstWidth - 1) * bpt,
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index e0ee3c9f5d..9d9b475dd1 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -630,7 +630,6 @@ struct gl_current_attrib
GLfloat RasterDistance;
GLfloat RasterColor[4];
GLfloat RasterSecondaryColor[4];
- GLfloat RasterIndex;
GLfloat RasterTexCoords[MAX_TEXTURE_COORD_UNITS][4];
GLboolean RasterPosValid;
/*@}*/
@@ -1245,6 +1244,7 @@ struct gl_texture_object
GLboolean GenerateMipmap; /**< GL_SGIS_generate_mipmap */
GLboolean _Complete; /**< Is texture object complete? */
GLboolean _RenderToTexture; /**< Any rendering to this texture? */
+ GLboolean Purgeable; /**< Is the buffer purgeable under memory pressure? */
/** Actual texture images, indexed by [cube face] and [mipmap level] */
struct gl_texture_image *Image[MAX_FACES][MAX_TEXTURE_LEVELS];
@@ -1440,6 +1440,7 @@ struct gl_buffer_object
GLsizeiptr Length; /**< Mapped length */
/*@}*/
GLboolean Written; /**< Ever written to? (for debugging) */
+ GLboolean Purgeable; /**< Is the buffer purgeable under memory pressure? */
};
@@ -2105,6 +2106,7 @@ struct gl_renderbuffer
GLuint Name;
GLint RefCount;
GLuint Width, Height;
+ GLboolean Purgeable; /**< Is the buffer purgeable under memory pressure? */
GLenum InternalFormat; /**< The user-specified format */
GLenum _BaseFormat; /**< Either GL_RGB, GL_RGBA, GL_DEPTH_COMPONENT or
@@ -2492,6 +2494,7 @@ struct gl_extensions
GLboolean APPLE_client_storage;
GLboolean APPLE_packed_pixels;
GLboolean APPLE_vertex_array_object;
+ GLboolean APPLE_object_purgeable;
GLboolean ATI_envmap_bumpmap;
GLboolean ATI_texture_mirror_once;
GLboolean ATI_texture_env_combine3;
diff --git a/src/mesa/main/rastpos.c b/src/mesa/main/rastpos.c
index d72b846c36..75c67f2693 100644
--- a/src/mesa/main/rastpos.c
+++ b/src/mesa/main/rastpos.c
@@ -246,28 +246,22 @@ window_pos3f(GLfloat x, GLfloat y, GLfloat z)
ctx->Current.RasterDistance = 0.0;
/* raster color = current color or index */
- if (ctx->Visual.rgbMode) {
- ctx->Current.RasterColor[0]
- = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0], 0.0F, 1.0F);
- ctx->Current.RasterColor[1]
- = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1], 0.0F, 1.0F);
- ctx->Current.RasterColor[2]
- = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2], 0.0F, 1.0F);
- ctx->Current.RasterColor[3]
- = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3], 0.0F, 1.0F);
- ctx->Current.RasterSecondaryColor[0]
- = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0], 0.0F, 1.0F);
- ctx->Current.RasterSecondaryColor[1]
- = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1], 0.0F, 1.0F);
- ctx->Current.RasterSecondaryColor[2]
- = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2], 0.0F, 1.0F);
- ctx->Current.RasterSecondaryColor[3]
- = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3], 0.0F, 1.0F);
- }
- else {
- ctx->Current.RasterIndex
- = ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0];
- }
+ ctx->Current.RasterColor[0]
+ = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0], 0.0F, 1.0F);
+ ctx->Current.RasterColor[1]
+ = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1], 0.0F, 1.0F);
+ ctx->Current.RasterColor[2]
+ = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2], 0.0F, 1.0F);
+ ctx->Current.RasterColor[3]
+ = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3], 0.0F, 1.0F);
+ ctx->Current.RasterSecondaryColor[0]
+ = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0], 0.0F, 1.0F);
+ ctx->Current.RasterSecondaryColor[1]
+ = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1], 0.0F, 1.0F);
+ ctx->Current.RasterSecondaryColor[2]
+ = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2], 0.0F, 1.0F);
+ ctx->Current.RasterSecondaryColor[3]
+ = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3], 0.0F, 1.0F);
/* raster texcoord = current texcoord */
{
@@ -562,7 +556,6 @@ void _mesa_init_rastpos( GLcontext * ctx )
ctx->Current.RasterDistance = 0.0;
ASSIGN_4V( ctx->Current.RasterColor, 1.0, 1.0, 1.0, 1.0 );
ASSIGN_4V( ctx->Current.RasterSecondaryColor, 0.0, 0.0, 0.0, 1.0 );
- ctx->Current.RasterIndex = 1.0;
for (i = 0; i < Elements(ctx->Current.RasterTexCoords); i++)
ASSIGN_4V( ctx->Current.RasterTexCoords[i], 0.0, 0.0, 0.0, 1.0 );
ctx->Current.RasterPosValid = GL_TRUE;
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index feea1d375f..f4d74e8be6 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -77,14 +77,7 @@ _mesa_error_check_format_type(GLcontext *ctx, GLenum format, GLenum type,
case GL_RGBA:
case GL_BGRA:
case GL_ABGR_EXT:
- if (drawing) {
- if (!ctx->DrawBuffer->Visual.rgbMode) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glDrawPixels(drawing RGB pixels into color index buffer)");
- return GL_TRUE;
- }
- }
- else {
+ if (!drawing) {
/* reading */
if (!_mesa_source_buffer_exists(ctx, GL_COLOR)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
@@ -95,10 +88,9 @@ _mesa_error_check_format_type(GLcontext *ctx, GLenum format, GLenum type,
break;
case GL_COLOR_INDEX:
if (drawing) {
- if (ctx->DrawBuffer->Visual.rgbMode &&
- (ctx->PixelMaps.ItoR.Size == 0 ||
- ctx->PixelMaps.ItoG.Size == 0 ||
- ctx->PixelMaps.ItoB.Size == 0)) {
+ if (ctx->PixelMaps.ItoR.Size == 0 ||
+ ctx->PixelMaps.ItoG.Size == 0 ||
+ ctx->PixelMaps.ItoB.Size == 0) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glDrawPixels(drawing color index pixels into RGB buffer)");
return GL_TRUE;
diff --git a/src/mesa/main/remap_helper.h b/src/mesa/main/remap_helper.h
index 0a5b629688..ee898efa5f 100644
--- a/src/mesa/main/remap_helper.h
+++ b/src/mesa/main/remap_helper.h
@@ -733,3634 +733,3646 @@ static const char _mesa_function_pool[] =
"glMultTransposeMatrixd\0"
"glMultTransposeMatrixdARB\0"
"\0"
- /* _mesa_function_pool[4900]: AlphaFunc (offset 240) */
+ /* _mesa_function_pool[4900]: ObjectUnpurgeableAPPLE (will be remapped) */
+ "iii\0"
+ "glObjectUnpurgeableAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[4930]: AlphaFunc (offset 240) */
"if\0"
"glAlphaFunc\0"
"\0"
- /* _mesa_function_pool[4916]: WindowPos2svMESA (will be remapped) */
+ /* _mesa_function_pool[4946]: WindowPos2svMESA (will be remapped) */
"p\0"
"glWindowPos2sv\0"
"glWindowPos2svARB\0"
"glWindowPos2svMESA\0"
"\0"
- /* _mesa_function_pool[4971]: EdgeFlag (offset 41) */
+ /* _mesa_function_pool[5001]: EdgeFlag (offset 41) */
"i\0"
"glEdgeFlag\0"
"\0"
- /* _mesa_function_pool[4985]: TexCoord2iv (offset 107) */
+ /* _mesa_function_pool[5015]: TexCoord2iv (offset 107) */
"p\0"
"glTexCoord2iv\0"
"\0"
- /* _mesa_function_pool[5002]: CompressedTexImage1DARB (will be remapped) */
+ /* _mesa_function_pool[5032]: CompressedTexImage1DARB (will be remapped) */
"iiiiiip\0"
"glCompressedTexImage1D\0"
"glCompressedTexImage1DARB\0"
"\0"
- /* _mesa_function_pool[5060]: Rotated (offset 299) */
+ /* _mesa_function_pool[5090]: Rotated (offset 299) */
"dddd\0"
"glRotated\0"
"\0"
- /* _mesa_function_pool[5076]: VertexAttrib2sNV (will be remapped) */
+ /* _mesa_function_pool[5106]: VertexAttrib2sNV (will be remapped) */
"iii\0"
"glVertexAttrib2sNV\0"
"\0"
- /* _mesa_function_pool[5100]: ReadPixels (offset 256) */
+ /* _mesa_function_pool[5130]: ReadPixels (offset 256) */
"iiiiiip\0"
"glReadPixels\0"
"\0"
- /* _mesa_function_pool[5122]: EdgeFlagv (offset 42) */
+ /* _mesa_function_pool[5152]: EdgeFlagv (offset 42) */
"p\0"
"glEdgeFlagv\0"
"\0"
- /* _mesa_function_pool[5137]: NormalPointerListIBM (dynamic) */
+ /* _mesa_function_pool[5167]: NormalPointerListIBM (dynamic) */
"iipi\0"
"glNormalPointerListIBM\0"
"\0"
- /* _mesa_function_pool[5166]: IndexPointerEXT (will be remapped) */
+ /* _mesa_function_pool[5196]: IndexPointerEXT (will be remapped) */
"iiip\0"
"glIndexPointerEXT\0"
"\0"
- /* _mesa_function_pool[5190]: Color4iv (offset 32) */
+ /* _mesa_function_pool[5220]: Color4iv (offset 32) */
"p\0"
"glColor4iv\0"
"\0"
- /* _mesa_function_pool[5204]: TexParameterf (offset 178) */
+ /* _mesa_function_pool[5234]: TexParameterf (offset 178) */
"iif\0"
"glTexParameterf\0"
"\0"
- /* _mesa_function_pool[5225]: TexParameteri (offset 180) */
+ /* _mesa_function_pool[5255]: TexParameteri (offset 180) */
"iii\0"
"glTexParameteri\0"
"\0"
- /* _mesa_function_pool[5246]: NormalPointerEXT (will be remapped) */
+ /* _mesa_function_pool[5276]: NormalPointerEXT (will be remapped) */
"iiip\0"
"glNormalPointerEXT\0"
"\0"
- /* _mesa_function_pool[5271]: MultiTexCoord3dARB (offset 392) */
+ /* _mesa_function_pool[5301]: MultiTexCoord3dARB (offset 392) */
"iddd\0"
"glMultiTexCoord3d\0"
"glMultiTexCoord3dARB\0"
"\0"
- /* _mesa_function_pool[5316]: MultiTexCoord2iARB (offset 388) */
+ /* _mesa_function_pool[5346]: MultiTexCoord2iARB (offset 388) */
"iii\0"
"glMultiTexCoord2i\0"
"glMultiTexCoord2iARB\0"
"\0"
- /* _mesa_function_pool[5360]: DrawPixels (offset 257) */
+ /* _mesa_function_pool[5390]: DrawPixels (offset 257) */
"iiiip\0"
"glDrawPixels\0"
"\0"
- /* _mesa_function_pool[5380]: ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[5410]: ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (dynamic) */
"iffffffff\0"
"glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[5440]: MultiTexCoord2svARB (offset 391) */
+ /* _mesa_function_pool[5470]: MultiTexCoord2svARB (offset 391) */
"ip\0"
"glMultiTexCoord2sv\0"
"glMultiTexCoord2svARB\0"
"\0"
- /* _mesa_function_pool[5485]: ReplacementCodeubvSUN (dynamic) */
+ /* _mesa_function_pool[5515]: ReplacementCodeubvSUN (dynamic) */
"p\0"
"glReplacementCodeubvSUN\0"
"\0"
- /* _mesa_function_pool[5512]: Uniform3iARB (will be remapped) */
+ /* _mesa_function_pool[5542]: Uniform3iARB (will be remapped) */
"iiii\0"
"glUniform3i\0"
"glUniform3iARB\0"
"\0"
- /* _mesa_function_pool[5545]: GetFragmentMaterialfvSGIX (dynamic) */
+ /* _mesa_function_pool[5575]: GetFragmentMaterialfvSGIX (dynamic) */
"iip\0"
"glGetFragmentMaterialfvSGIX\0"
"\0"
- /* _mesa_function_pool[5578]: GetShaderInfoLog (will be remapped) */
+ /* _mesa_function_pool[5608]: GetShaderInfoLog (will be remapped) */
"iipp\0"
"glGetShaderInfoLog\0"
"\0"
- /* _mesa_function_pool[5603]: WeightivARB (dynamic) */
+ /* _mesa_function_pool[5633]: WeightivARB (dynamic) */
"ip\0"
"glWeightivARB\0"
"\0"
- /* _mesa_function_pool[5621]: PollInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[5651]: PollInstrumentsSGIX (dynamic) */
"p\0"
"glPollInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[5646]: GlobalAlphaFactordSUN (dynamic) */
+ /* _mesa_function_pool[5676]: GlobalAlphaFactordSUN (dynamic) */
"d\0"
"glGlobalAlphaFactordSUN\0"
"\0"
- /* _mesa_function_pool[5673]: GetFinalCombinerInputParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[5703]: GetFinalCombinerInputParameterfvNV (will be remapped) */
"iip\0"
"glGetFinalCombinerInputParameterfvNV\0"
"\0"
- /* _mesa_function_pool[5715]: GenerateMipmapEXT (will be remapped) */
+ /* _mesa_function_pool[5745]: GenerateMipmapEXT (will be remapped) */
"i\0"
"glGenerateMipmap\0"
"glGenerateMipmapEXT\0"
"\0"
- /* _mesa_function_pool[5755]: GenLists (offset 5) */
+ /* _mesa_function_pool[5785]: GenLists (offset 5) */
"i\0"
"glGenLists\0"
"\0"
- /* _mesa_function_pool[5769]: SetFragmentShaderConstantATI (will be remapped) */
+ /* _mesa_function_pool[5799]: SetFragmentShaderConstantATI (will be remapped) */
"ip\0"
"glSetFragmentShaderConstantATI\0"
"\0"
- /* _mesa_function_pool[5804]: GetMapAttribParameterivNV (dynamic) */
+ /* _mesa_function_pool[5834]: GetMapAttribParameterivNV (dynamic) */
"iiip\0"
"glGetMapAttribParameterivNV\0"
"\0"
- /* _mesa_function_pool[5838]: CreateShaderObjectARB (will be remapped) */
+ /* _mesa_function_pool[5868]: CreateShaderObjectARB (will be remapped) */
"i\0"
"glCreateShaderObjectARB\0"
"\0"
- /* _mesa_function_pool[5865]: GetSharpenTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[5895]: GetSharpenTexFuncSGIS (dynamic) */
"ip\0"
"glGetSharpenTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[5893]: BufferDataARB (will be remapped) */
+ /* _mesa_function_pool[5923]: BufferDataARB (will be remapped) */
"iipi\0"
"glBufferData\0"
"glBufferDataARB\0"
"\0"
- /* _mesa_function_pool[5928]: FlushVertexArrayRangeNV (will be remapped) */
+ /* _mesa_function_pool[5958]: FlushVertexArrayRangeNV (will be remapped) */
"\0"
"glFlushVertexArrayRangeNV\0"
"\0"
- /* _mesa_function_pool[5956]: MapGrid2d (offset 226) */
+ /* _mesa_function_pool[5986]: MapGrid2d (offset 226) */
"iddidd\0"
"glMapGrid2d\0"
"\0"
- /* _mesa_function_pool[5976]: MapGrid2f (offset 227) */
+ /* _mesa_function_pool[6006]: MapGrid2f (offset 227) */
"iffiff\0"
"glMapGrid2f\0"
"\0"
- /* _mesa_function_pool[5996]: SampleMapATI (will be remapped) */
+ /* _mesa_function_pool[6026]: SampleMapATI (will be remapped) */
"iii\0"
"glSampleMapATI\0"
"\0"
- /* _mesa_function_pool[6016]: VertexPointerEXT (will be remapped) */
+ /* _mesa_function_pool[6046]: VertexPointerEXT (will be remapped) */
"iiiip\0"
"glVertexPointerEXT\0"
"\0"
- /* _mesa_function_pool[6042]: GetTexFilterFuncSGIS (dynamic) */
+ /* _mesa_function_pool[6072]: GetTexFilterFuncSGIS (dynamic) */
"iip\0"
"glGetTexFilterFuncSGIS\0"
"\0"
- /* _mesa_function_pool[6070]: Scissor (offset 176) */
+ /* _mesa_function_pool[6100]: Scissor (offset 176) */
"iiii\0"
"glScissor\0"
"\0"
- /* _mesa_function_pool[6086]: Fogf (offset 153) */
+ /* _mesa_function_pool[6116]: Fogf (offset 153) */
"if\0"
"glFogf\0"
"\0"
- /* _mesa_function_pool[6097]: GetCombinerOutputParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[6127]: GetCombinerOutputParameterfvNV (will be remapped) */
"iiip\0"
"glGetCombinerOutputParameterfvNV\0"
"\0"
- /* _mesa_function_pool[6136]: TexSubImage1D (offset 332) */
+ /* _mesa_function_pool[6166]: TexSubImage1D (offset 332) */
"iiiiiip\0"
"glTexSubImage1D\0"
"glTexSubImage1DEXT\0"
"\0"
- /* _mesa_function_pool[6180]: VertexAttrib1sARB (will be remapped) */
+ /* _mesa_function_pool[6210]: VertexAttrib1sARB (will be remapped) */
"ii\0"
"glVertexAttrib1s\0"
"glVertexAttrib1sARB\0"
"\0"
- /* _mesa_function_pool[6221]: FenceSync (will be remapped) */
+ /* _mesa_function_pool[6251]: FenceSync (will be remapped) */
"ii\0"
"glFenceSync\0"
"\0"
- /* _mesa_function_pool[6237]: Color4usv (offset 40) */
+ /* _mesa_function_pool[6267]: Color4usv (offset 40) */
"p\0"
"glColor4usv\0"
"\0"
- /* _mesa_function_pool[6252]: Fogi (offset 155) */
+ /* _mesa_function_pool[6282]: Fogi (offset 155) */
"ii\0"
"glFogi\0"
"\0"
- /* _mesa_function_pool[6263]: DepthRange (offset 288) */
+ /* _mesa_function_pool[6293]: DepthRange (offset 288) */
"dd\0"
"glDepthRange\0"
"\0"
- /* _mesa_function_pool[6280]: RasterPos3iv (offset 75) */
+ /* _mesa_function_pool[6310]: RasterPos3iv (offset 75) */
"p\0"
"glRasterPos3iv\0"
"\0"
- /* _mesa_function_pool[6298]: FinalCombinerInputNV (will be remapped) */
+ /* _mesa_function_pool[6328]: FinalCombinerInputNV (will be remapped) */
"iiii\0"
"glFinalCombinerInputNV\0"
"\0"
- /* _mesa_function_pool[6327]: TexCoord2i (offset 106) */
+ /* _mesa_function_pool[6357]: TexCoord2i (offset 106) */
"ii\0"
"glTexCoord2i\0"
"\0"
- /* _mesa_function_pool[6344]: PixelMapfv (offset 251) */
+ /* _mesa_function_pool[6374]: PixelMapfv (offset 251) */
"iip\0"
"glPixelMapfv\0"
"\0"
- /* _mesa_function_pool[6362]: Color4ui (offset 37) */
+ /* _mesa_function_pool[6392]: Color4ui (offset 37) */
"iiii\0"
"glColor4ui\0"
"\0"
- /* _mesa_function_pool[6379]: RasterPos3s (offset 76) */
+ /* _mesa_function_pool[6409]: RasterPos3s (offset 76) */
"iii\0"
"glRasterPos3s\0"
"\0"
- /* _mesa_function_pool[6398]: Color3usv (offset 24) */
+ /* _mesa_function_pool[6428]: Color3usv (offset 24) */
"p\0"
"glColor3usv\0"
"\0"
- /* _mesa_function_pool[6413]: FlushRasterSGIX (dynamic) */
+ /* _mesa_function_pool[6443]: FlushRasterSGIX (dynamic) */
"\0"
"glFlushRasterSGIX\0"
"\0"
- /* _mesa_function_pool[6433]: TexCoord2f (offset 104) */
+ /* _mesa_function_pool[6463]: TexCoord2f (offset 104) */
"ff\0"
"glTexCoord2f\0"
"\0"
- /* _mesa_function_pool[6450]: ReplacementCodeuiTexCoord2fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[6480]: ReplacementCodeuiTexCoord2fVertex3fSUN (dynamic) */
"ifffff\0"
"glReplacementCodeuiTexCoord2fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[6499]: TexCoord2d (offset 102) */
+ /* _mesa_function_pool[6529]: TexCoord2d (offset 102) */
"dd\0"
"glTexCoord2d\0"
"\0"
- /* _mesa_function_pool[6516]: RasterPos3d (offset 70) */
+ /* _mesa_function_pool[6546]: RasterPos3d (offset 70) */
"ddd\0"
"glRasterPos3d\0"
"\0"
- /* _mesa_function_pool[6535]: RasterPos3f (offset 72) */
+ /* _mesa_function_pool[6565]: RasterPos3f (offset 72) */
"fff\0"
"glRasterPos3f\0"
"\0"
- /* _mesa_function_pool[6554]: Uniform1fARB (will be remapped) */
+ /* _mesa_function_pool[6584]: Uniform1fARB (will be remapped) */
"if\0"
"glUniform1f\0"
"glUniform1fARB\0"
"\0"
- /* _mesa_function_pool[6585]: AreTexturesResident (offset 322) */
+ /* _mesa_function_pool[6615]: AreTexturesResident (offset 322) */
"ipp\0"
"glAreTexturesResident\0"
"glAreTexturesResidentEXT\0"
"\0"
- /* _mesa_function_pool[6637]: TexCoord2s (offset 108) */
+ /* _mesa_function_pool[6667]: TexCoord2s (offset 108) */
"ii\0"
"glTexCoord2s\0"
"\0"
- /* _mesa_function_pool[6654]: StencilOpSeparate (will be remapped) */
+ /* _mesa_function_pool[6684]: StencilOpSeparate (will be remapped) */
"iiii\0"
"glStencilOpSeparate\0"
"glStencilOpSeparateATI\0"
"\0"
- /* _mesa_function_pool[6703]: ColorTableParameteriv (offset 341) */
+ /* _mesa_function_pool[6733]: ColorTableParameteriv (offset 341) */
"iip\0"
"glColorTableParameteriv\0"
"glColorTableParameterivSGI\0"
"\0"
- /* _mesa_function_pool[6759]: FogCoordPointerListIBM (dynamic) */
+ /* _mesa_function_pool[6789]: FogCoordPointerListIBM (dynamic) */
"iipi\0"
"glFogCoordPointerListIBM\0"
"\0"
- /* _mesa_function_pool[6790]: WindowPos3dMESA (will be remapped) */
+ /* _mesa_function_pool[6820]: WindowPos3dMESA (will be remapped) */
"ddd\0"
"glWindowPos3d\0"
"glWindowPos3dARB\0"
"glWindowPos3dMESA\0"
"\0"
- /* _mesa_function_pool[6844]: Color4us (offset 39) */
+ /* _mesa_function_pool[6874]: Color4us (offset 39) */
"iiii\0"
"glColor4us\0"
"\0"
- /* _mesa_function_pool[6861]: PointParameterfvEXT (will be remapped) */
+ /* _mesa_function_pool[6891]: PointParameterfvEXT (will be remapped) */
"ip\0"
"glPointParameterfv\0"
"glPointParameterfvARB\0"
"glPointParameterfvEXT\0"
"glPointParameterfvSGIS\0"
"\0"
- /* _mesa_function_pool[6951]: Color3bv (offset 10) */
+ /* _mesa_function_pool[6981]: Color3bv (offset 10) */
"p\0"
"glColor3bv\0"
"\0"
- /* _mesa_function_pool[6965]: WindowPos2fvMESA (will be remapped) */
+ /* _mesa_function_pool[6995]: WindowPos2fvMESA (will be remapped) */
"p\0"
"glWindowPos2fv\0"
"glWindowPos2fvARB\0"
"glWindowPos2fvMESA\0"
"\0"
- /* _mesa_function_pool[7020]: SecondaryColor3bvEXT (will be remapped) */
+ /* _mesa_function_pool[7050]: SecondaryColor3bvEXT (will be remapped) */
"p\0"
"glSecondaryColor3bv\0"
"glSecondaryColor3bvEXT\0"
"\0"
- /* _mesa_function_pool[7066]: VertexPointerListIBM (dynamic) */
+ /* _mesa_function_pool[7096]: VertexPointerListIBM (dynamic) */
"iiipi\0"
"glVertexPointerListIBM\0"
"\0"
- /* _mesa_function_pool[7096]: GetProgramLocalParameterfvARB (will be remapped) */
+ /* _mesa_function_pool[7126]: GetProgramLocalParameterfvARB (will be remapped) */
"iip\0"
"glGetProgramLocalParameterfvARB\0"
"\0"
- /* _mesa_function_pool[7133]: FragmentMaterialfSGIX (dynamic) */
+ /* _mesa_function_pool[7163]: FragmentMaterialfSGIX (dynamic) */
"iif\0"
"glFragmentMaterialfSGIX\0"
"\0"
- /* _mesa_function_pool[7162]: TexCoord2fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[7192]: TexCoord2fNormal3fVertex3fSUN (dynamic) */
"ffffffff\0"
"glTexCoord2fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[7204]: RenderbufferStorageEXT (will be remapped) */
+ /* _mesa_function_pool[7234]: RenderbufferStorageEXT (will be remapped) */
"iiii\0"
"glRenderbufferStorage\0"
"glRenderbufferStorageEXT\0"
"\0"
- /* _mesa_function_pool[7257]: IsFenceNV (will be remapped) */
+ /* _mesa_function_pool[7287]: IsFenceNV (will be remapped) */
"i\0"
"glIsFenceNV\0"
"\0"
- /* _mesa_function_pool[7272]: AttachObjectARB (will be remapped) */
+ /* _mesa_function_pool[7302]: AttachObjectARB (will be remapped) */
"ii\0"
"glAttachObjectARB\0"
"\0"
- /* _mesa_function_pool[7294]: GetFragmentLightivSGIX (dynamic) */
+ /* _mesa_function_pool[7324]: GetFragmentLightivSGIX (dynamic) */
"iip\0"
"glGetFragmentLightivSGIX\0"
"\0"
- /* _mesa_function_pool[7324]: UniformMatrix2fvARB (will be remapped) */
+ /* _mesa_function_pool[7354]: UniformMatrix2fvARB (will be remapped) */
"iiip\0"
"glUniformMatrix2fv\0"
"glUniformMatrix2fvARB\0"
"\0"
- /* _mesa_function_pool[7371]: MultiTexCoord2fARB (offset 386) */
+ /* _mesa_function_pool[7401]: MultiTexCoord2fARB (offset 386) */
"iff\0"
"glMultiTexCoord2f\0"
"glMultiTexCoord2fARB\0"
"\0"
- /* _mesa_function_pool[7415]: ColorTable (offset 339) */
+ /* _mesa_function_pool[7445]: ColorTable (offset 339) */
"iiiiip\0"
"glColorTable\0"
"glColorTableSGI\0"
"glColorTableEXT\0"
"\0"
- /* _mesa_function_pool[7468]: IndexPointer (offset 314) */
+ /* _mesa_function_pool[7498]: IndexPointer (offset 314) */
"iip\0"
"glIndexPointer\0"
"\0"
- /* _mesa_function_pool[7488]: Accum (offset 213) */
+ /* _mesa_function_pool[7518]: Accum (offset 213) */
"if\0"
"glAccum\0"
"\0"
- /* _mesa_function_pool[7500]: GetTexImage (offset 281) */
+ /* _mesa_function_pool[7530]: GetTexImage (offset 281) */
"iiiip\0"
"glGetTexImage\0"
"\0"
- /* _mesa_function_pool[7521]: MapControlPointsNV (dynamic) */
+ /* _mesa_function_pool[7551]: MapControlPointsNV (dynamic) */
"iiiiiiiip\0"
"glMapControlPointsNV\0"
"\0"
- /* _mesa_function_pool[7553]: ConvolutionFilter2D (offset 349) */
+ /* _mesa_function_pool[7583]: ConvolutionFilter2D (offset 349) */
"iiiiiip\0"
"glConvolutionFilter2D\0"
"glConvolutionFilter2DEXT\0"
"\0"
- /* _mesa_function_pool[7609]: Finish (offset 216) */
+ /* _mesa_function_pool[7639]: Finish (offset 216) */
"\0"
"glFinish\0"
"\0"
- /* _mesa_function_pool[7620]: MapParameterfvNV (dynamic) */
+ /* _mesa_function_pool[7650]: MapParameterfvNV (dynamic) */
"iip\0"
"glMapParameterfvNV\0"
"\0"
- /* _mesa_function_pool[7644]: ClearStencil (offset 207) */
+ /* _mesa_function_pool[7674]: ClearStencil (offset 207) */
"i\0"
"glClearStencil\0"
"\0"
- /* _mesa_function_pool[7662]: VertexAttrib3dvARB (will be remapped) */
+ /* _mesa_function_pool[7692]: VertexAttrib3dvARB (will be remapped) */
"ip\0"
"glVertexAttrib3dv\0"
"glVertexAttrib3dvARB\0"
"\0"
- /* _mesa_function_pool[7705]: HintPGI (dynamic) */
+ /* _mesa_function_pool[7735]: HintPGI (dynamic) */
"ii\0"
"glHintPGI\0"
"\0"
- /* _mesa_function_pool[7719]: ConvolutionParameteriv (offset 353) */
+ /* _mesa_function_pool[7749]: ConvolutionParameteriv (offset 353) */
"iip\0"
"glConvolutionParameteriv\0"
"glConvolutionParameterivEXT\0"
"\0"
- /* _mesa_function_pool[7777]: Color4s (offset 33) */
+ /* _mesa_function_pool[7807]: Color4s (offset 33) */
"iiii\0"
"glColor4s\0"
"\0"
- /* _mesa_function_pool[7793]: InterleavedArrays (offset 317) */
+ /* _mesa_function_pool[7823]: InterleavedArrays (offset 317) */
"iip\0"
"glInterleavedArrays\0"
"\0"
- /* _mesa_function_pool[7818]: RasterPos2fv (offset 65) */
+ /* _mesa_function_pool[7848]: RasterPos2fv (offset 65) */
"p\0"
"glRasterPos2fv\0"
"\0"
- /* _mesa_function_pool[7836]: TexCoord1fv (offset 97) */
+ /* _mesa_function_pool[7866]: TexCoord1fv (offset 97) */
"p\0"
"glTexCoord1fv\0"
"\0"
- /* _mesa_function_pool[7853]: Vertex2d (offset 126) */
+ /* _mesa_function_pool[7883]: Vertex2d (offset 126) */
"dd\0"
"glVertex2d\0"
"\0"
- /* _mesa_function_pool[7868]: CullParameterdvEXT (will be remapped) */
+ /* _mesa_function_pool[7898]: CullParameterdvEXT (will be remapped) */
"ip\0"
"glCullParameterdvEXT\0"
"\0"
- /* _mesa_function_pool[7893]: ProgramNamedParameter4fNV (will be remapped) */
+ /* _mesa_function_pool[7923]: ProgramNamedParameter4fNV (will be remapped) */
"iipffff\0"
"glProgramNamedParameter4fNV\0"
"\0"
- /* _mesa_function_pool[7930]: Color3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[7960]: Color3fVertex3fSUN (dynamic) */
"ffffff\0"
"glColor3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[7959]: ProgramEnvParameter4fvARB (will be remapped) */
+ /* _mesa_function_pool[7989]: ProgramEnvParameter4fvARB (will be remapped) */
"iip\0"
"glProgramEnvParameter4fvARB\0"
"glProgramParameter4fvNV\0"
"\0"
- /* _mesa_function_pool[8016]: Color4i (offset 31) */
+ /* _mesa_function_pool[8046]: Color4i (offset 31) */
"iiii\0"
"glColor4i\0"
"\0"
- /* _mesa_function_pool[8032]: Color4f (offset 29) */
+ /* _mesa_function_pool[8062]: Color4f (offset 29) */
"ffff\0"
"glColor4f\0"
"\0"
- /* _mesa_function_pool[8048]: RasterPos4fv (offset 81) */
+ /* _mesa_function_pool[8078]: RasterPos4fv (offset 81) */
"p\0"
"glRasterPos4fv\0"
"\0"
- /* _mesa_function_pool[8066]: Color4d (offset 27) */
+ /* _mesa_function_pool[8096]: Color4d (offset 27) */
"dddd\0"
"glColor4d\0"
"\0"
- /* _mesa_function_pool[8082]: ClearIndex (offset 205) */
+ /* _mesa_function_pool[8112]: ClearIndex (offset 205) */
"f\0"
"glClearIndex\0"
"\0"
- /* _mesa_function_pool[8098]: Color4b (offset 25) */
+ /* _mesa_function_pool[8128]: Color4b (offset 25) */
"iiii\0"
"glColor4b\0"
"\0"
- /* _mesa_function_pool[8114]: LoadMatrixd (offset 292) */
+ /* _mesa_function_pool[8144]: LoadMatrixd (offset 292) */
"p\0"
"glLoadMatrixd\0"
"\0"
- /* _mesa_function_pool[8131]: FragmentLightModeliSGIX (dynamic) */
+ /* _mesa_function_pool[8161]: FragmentLightModeliSGIX (dynamic) */
"ii\0"
"glFragmentLightModeliSGIX\0"
"\0"
- /* _mesa_function_pool[8161]: RasterPos2dv (offset 63) */
+ /* _mesa_function_pool[8191]: RasterPos2dv (offset 63) */
"p\0"
"glRasterPos2dv\0"
"\0"
- /* _mesa_function_pool[8179]: ConvolutionParameterfv (offset 351) */
+ /* _mesa_function_pool[8209]: ConvolutionParameterfv (offset 351) */
"iip\0"
"glConvolutionParameterfv\0"
"glConvolutionParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[8237]: TbufferMask3DFX (dynamic) */
+ /* _mesa_function_pool[8267]: TbufferMask3DFX (dynamic) */
"i\0"
"glTbufferMask3DFX\0"
"\0"
- /* _mesa_function_pool[8258]: GetTexGendv (offset 278) */
+ /* _mesa_function_pool[8288]: GetTexGendv (offset 278) */
"iip\0"
"glGetTexGendv\0"
"\0"
- /* _mesa_function_pool[8277]: ColorMaskIndexedEXT (will be remapped) */
+ /* _mesa_function_pool[8307]: ColorMaskIndexedEXT (will be remapped) */
"iiiii\0"
"glColorMaskIndexedEXT\0"
"\0"
- /* _mesa_function_pool[8306]: LoadProgramNV (will be remapped) */
+ /* _mesa_function_pool[8336]: LoadProgramNV (will be remapped) */
"iiip\0"
"glLoadProgramNV\0"
"\0"
- /* _mesa_function_pool[8328]: WaitSync (will be remapped) */
+ /* _mesa_function_pool[8358]: WaitSync (will be remapped) */
"iii\0"
"glWaitSync\0"
"\0"
- /* _mesa_function_pool[8344]: EndList (offset 1) */
+ /* _mesa_function_pool[8374]: EndList (offset 1) */
"\0"
"glEndList\0"
"\0"
- /* _mesa_function_pool[8356]: VertexAttrib4fvNV (will be remapped) */
+ /* _mesa_function_pool[8386]: VertexAttrib4fvNV (will be remapped) */
"ip\0"
"glVertexAttrib4fvNV\0"
"\0"
- /* _mesa_function_pool[8380]: GetAttachedObjectsARB (will be remapped) */
+ /* _mesa_function_pool[8410]: GetAttachedObjectsARB (will be remapped) */
"iipp\0"
"glGetAttachedObjectsARB\0"
"\0"
- /* _mesa_function_pool[8410]: Uniform3fvARB (will be remapped) */
+ /* _mesa_function_pool[8440]: Uniform3fvARB (will be remapped) */
"iip\0"
"glUniform3fv\0"
"glUniform3fvARB\0"
"\0"
- /* _mesa_function_pool[8444]: EvalCoord1fv (offset 231) */
+ /* _mesa_function_pool[8474]: EvalCoord1fv (offset 231) */
"p\0"
"glEvalCoord1fv\0"
"\0"
- /* _mesa_function_pool[8462]: DrawRangeElements (offset 338) */
+ /* _mesa_function_pool[8492]: DrawRangeElements (offset 338) */
"iiiiip\0"
"glDrawRangeElements\0"
"glDrawRangeElementsEXT\0"
"\0"
- /* _mesa_function_pool[8513]: EvalMesh2 (offset 238) */
+ /* _mesa_function_pool[8543]: EvalMesh2 (offset 238) */
"iiiii\0"
"glEvalMesh2\0"
"\0"
- /* _mesa_function_pool[8532]: Vertex4fv (offset 145) */
+ /* _mesa_function_pool[8562]: Vertex4fv (offset 145) */
"p\0"
"glVertex4fv\0"
"\0"
- /* _mesa_function_pool[8547]: SpriteParameterfvSGIX (dynamic) */
+ /* _mesa_function_pool[8577]: SpriteParameterfvSGIX (dynamic) */
"ip\0"
"glSpriteParameterfvSGIX\0"
"\0"
- /* _mesa_function_pool[8575]: CheckFramebufferStatusEXT (will be remapped) */
+ /* _mesa_function_pool[8605]: CheckFramebufferStatusEXT (will be remapped) */
"i\0"
"glCheckFramebufferStatus\0"
"glCheckFramebufferStatusEXT\0"
"\0"
- /* _mesa_function_pool[8631]: GlobalAlphaFactoruiSUN (dynamic) */
+ /* _mesa_function_pool[8661]: GlobalAlphaFactoruiSUN (dynamic) */
"i\0"
"glGlobalAlphaFactoruiSUN\0"
"\0"
- /* _mesa_function_pool[8659]: GetHandleARB (will be remapped) */
+ /* _mesa_function_pool[8689]: GetHandleARB (will be remapped) */
"i\0"
"glGetHandleARB\0"
"\0"
- /* _mesa_function_pool[8677]: GetVertexAttribivARB (will be remapped) */
+ /* _mesa_function_pool[8707]: GetVertexAttribivARB (will be remapped) */
"iip\0"
"glGetVertexAttribiv\0"
"glGetVertexAttribivARB\0"
"\0"
- /* _mesa_function_pool[8725]: GetCombinerInputParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[8755]: GetCombinerInputParameterfvNV (will be remapped) */
"iiiip\0"
"glGetCombinerInputParameterfvNV\0"
"\0"
- /* _mesa_function_pool[8764]: CreateProgram (will be remapped) */
+ /* _mesa_function_pool[8794]: CreateProgram (will be remapped) */
"\0"
"glCreateProgram\0"
"\0"
- /* _mesa_function_pool[8782]: LoadTransposeMatrixdARB (will be remapped) */
+ /* _mesa_function_pool[8812]: LoadTransposeMatrixdARB (will be remapped) */
"p\0"
"glLoadTransposeMatrixd\0"
"glLoadTransposeMatrixdARB\0"
"\0"
- /* _mesa_function_pool[8834]: GetMinmax (offset 364) */
+ /* _mesa_function_pool[8864]: GetMinmax (offset 364) */
"iiiip\0"
"glGetMinmax\0"
"glGetMinmaxEXT\0"
"\0"
- /* _mesa_function_pool[8868]: StencilFuncSeparate (will be remapped) */
+ /* _mesa_function_pool[8898]: StencilFuncSeparate (will be remapped) */
"iiii\0"
"glStencilFuncSeparate\0"
"\0"
- /* _mesa_function_pool[8896]: SecondaryColor3sEXT (will be remapped) */
+ /* _mesa_function_pool[8926]: SecondaryColor3sEXT (will be remapped) */
"iii\0"
"glSecondaryColor3s\0"
"glSecondaryColor3sEXT\0"
"\0"
- /* _mesa_function_pool[8942]: Color3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[8972]: Color3fVertex3fvSUN (dynamic) */
"pp\0"
"glColor3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[8968]: Normal3fv (offset 57) */
+ /* _mesa_function_pool[8998]: Normal3fv (offset 57) */
"p\0"
"glNormal3fv\0"
"\0"
- /* _mesa_function_pool[8983]: GlobalAlphaFactorbSUN (dynamic) */
+ /* _mesa_function_pool[9013]: GlobalAlphaFactorbSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorbSUN\0"
"\0"
- /* _mesa_function_pool[9010]: Color3us (offset 23) */
+ /* _mesa_function_pool[9040]: Color3us (offset 23) */
"iii\0"
"glColor3us\0"
"\0"
- /* _mesa_function_pool[9026]: ImageTransformParameterfvHP (dynamic) */
+ /* _mesa_function_pool[9056]: ImageTransformParameterfvHP (dynamic) */
"iip\0"
"glImageTransformParameterfvHP\0"
"\0"
- /* _mesa_function_pool[9061]: VertexAttrib4ivARB (will be remapped) */
+ /* _mesa_function_pool[9091]: VertexAttrib4ivARB (will be remapped) */
"ip\0"
"glVertexAttrib4iv\0"
"glVertexAttrib4ivARB\0"
"\0"
- /* _mesa_function_pool[9104]: End (offset 43) */
+ /* _mesa_function_pool[9134]: End (offset 43) */
"\0"
"glEnd\0"
"\0"
- /* _mesa_function_pool[9112]: VertexAttrib3fNV (will be remapped) */
+ /* _mesa_function_pool[9142]: VertexAttrib3fNV (will be remapped) */
"ifff\0"
"glVertexAttrib3fNV\0"
"\0"
- /* _mesa_function_pool[9137]: VertexAttribs2dvNV (will be remapped) */
+ /* _mesa_function_pool[9167]: VertexAttribs2dvNV (will be remapped) */
"iip\0"
"glVertexAttribs2dvNV\0"
"\0"
- /* _mesa_function_pool[9163]: GetQueryObjectui64vEXT (will be remapped) */
+ /* _mesa_function_pool[9193]: GetQueryObjectui64vEXT (will be remapped) */
"iip\0"
"glGetQueryObjectui64vEXT\0"
"\0"
- /* _mesa_function_pool[9193]: MultiTexCoord3fvARB (offset 395) */
+ /* _mesa_function_pool[9223]: MultiTexCoord3fvARB (offset 395) */
"ip\0"
"glMultiTexCoord3fv\0"
"glMultiTexCoord3fvARB\0"
"\0"
- /* _mesa_function_pool[9238]: SecondaryColor3dEXT (will be remapped) */
+ /* _mesa_function_pool[9268]: SecondaryColor3dEXT (will be remapped) */
"ddd\0"
"glSecondaryColor3d\0"
"glSecondaryColor3dEXT\0"
"\0"
- /* _mesa_function_pool[9284]: Color3ub (offset 19) */
+ /* _mesa_function_pool[9314]: Color3ub (offset 19) */
"iii\0"
"glColor3ub\0"
"\0"
- /* _mesa_function_pool[9300]: GetProgramParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[9330]: GetProgramParameterfvNV (will be remapped) */
"iiip\0"
"glGetProgramParameterfvNV\0"
"\0"
- /* _mesa_function_pool[9332]: TangentPointerEXT (dynamic) */
+ /* _mesa_function_pool[9362]: TangentPointerEXT (dynamic) */
"iip\0"
"glTangentPointerEXT\0"
"\0"
- /* _mesa_function_pool[9357]: Color4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[9387]: Color4fNormal3fVertex3fvSUN (dynamic) */
"ppp\0"
"glColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[9392]: GetInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[9422]: GetInstrumentsSGIX (dynamic) */
"\0"
"glGetInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[9415]: Color3ui (offset 21) */
+ /* _mesa_function_pool[9445]: Color3ui (offset 21) */
"iii\0"
"glColor3ui\0"
"\0"
- /* _mesa_function_pool[9431]: EvalMapsNV (dynamic) */
+ /* _mesa_function_pool[9461]: EvalMapsNV (dynamic) */
"ii\0"
"glEvalMapsNV\0"
"\0"
- /* _mesa_function_pool[9448]: TexSubImage2D (offset 333) */
+ /* _mesa_function_pool[9478]: TexSubImage2D (offset 333) */
"iiiiiiiip\0"
"glTexSubImage2D\0"
"glTexSubImage2DEXT\0"
"\0"
- /* _mesa_function_pool[9494]: FragmentLightivSGIX (dynamic) */
+ /* _mesa_function_pool[9524]: FragmentLightivSGIX (dynamic) */
"iip\0"
"glFragmentLightivSGIX\0"
"\0"
- /* _mesa_function_pool[9521]: GetTexParameterPointervAPPLE (will be remapped) */
+ /* _mesa_function_pool[9551]: GetTexParameterPointervAPPLE (will be remapped) */
"iip\0"
"glGetTexParameterPointervAPPLE\0"
"\0"
- /* _mesa_function_pool[9557]: TexGenfv (offset 191) */
+ /* _mesa_function_pool[9587]: TexGenfv (offset 191) */
"iip\0"
"glTexGenfv\0"
"\0"
- /* _mesa_function_pool[9573]: PixelTransformParameterfvEXT (dynamic) */
+ /* _mesa_function_pool[9603]: PixelTransformParameterfvEXT (dynamic) */
"iip\0"
"glPixelTransformParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[9609]: VertexAttrib4bvARB (will be remapped) */
+ /* _mesa_function_pool[9639]: VertexAttrib4bvARB (will be remapped) */
"ip\0"
"glVertexAttrib4bv\0"
"glVertexAttrib4bvARB\0"
"\0"
- /* _mesa_function_pool[9652]: AlphaFragmentOp2ATI (will be remapped) */
+ /* _mesa_function_pool[9682]: AlphaFragmentOp2ATI (will be remapped) */
"iiiiiiiii\0"
"glAlphaFragmentOp2ATI\0"
"\0"
- /* _mesa_function_pool[9685]: GetIntegerIndexedvEXT (will be remapped) */
+ /* _mesa_function_pool[9715]: GetIntegerIndexedvEXT (will be remapped) */
"iip\0"
"glGetIntegerIndexedvEXT\0"
"\0"
- /* _mesa_function_pool[9714]: MultiTexCoord4sARB (offset 406) */
+ /* _mesa_function_pool[9744]: MultiTexCoord4sARB (offset 406) */
"iiiii\0"
"glMultiTexCoord4s\0"
"glMultiTexCoord4sARB\0"
"\0"
- /* _mesa_function_pool[9760]: GetFragmentMaterialivSGIX (dynamic) */
+ /* _mesa_function_pool[9790]: GetFragmentMaterialivSGIX (dynamic) */
"iip\0"
"glGetFragmentMaterialivSGIX\0"
"\0"
- /* _mesa_function_pool[9793]: WindowPos4dMESA (will be remapped) */
+ /* _mesa_function_pool[9823]: WindowPos4dMESA (will be remapped) */
"dddd\0"
"glWindowPos4dMESA\0"
"\0"
- /* _mesa_function_pool[9817]: WeightPointerARB (dynamic) */
+ /* _mesa_function_pool[9847]: WeightPointerARB (dynamic) */
"iiip\0"
"glWeightPointerARB\0"
"\0"
- /* _mesa_function_pool[9842]: WindowPos2dMESA (will be remapped) */
+ /* _mesa_function_pool[9872]: WindowPos2dMESA (will be remapped) */
"dd\0"
"glWindowPos2d\0"
"glWindowPos2dARB\0"
"glWindowPos2dMESA\0"
"\0"
- /* _mesa_function_pool[9895]: FramebufferTexture3DEXT (will be remapped) */
+ /* _mesa_function_pool[9925]: FramebufferTexture3DEXT (will be remapped) */
"iiiiii\0"
"glFramebufferTexture3D\0"
"glFramebufferTexture3DEXT\0"
"\0"
- /* _mesa_function_pool[9952]: BlendEquation (offset 337) */
+ /* _mesa_function_pool[9982]: BlendEquation (offset 337) */
"i\0"
"glBlendEquation\0"
"glBlendEquationEXT\0"
"\0"
- /* _mesa_function_pool[9990]: VertexAttrib3dNV (will be remapped) */
+ /* _mesa_function_pool[10020]: VertexAttrib3dNV (will be remapped) */
"iddd\0"
"glVertexAttrib3dNV\0"
"\0"
- /* _mesa_function_pool[10015]: VertexAttrib3dARB (will be remapped) */
+ /* _mesa_function_pool[10045]: VertexAttrib3dARB (will be remapped) */
"iddd\0"
"glVertexAttrib3d\0"
"glVertexAttrib3dARB\0"
"\0"
- /* _mesa_function_pool[10058]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[10088]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
"ppppp\0"
"glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[10122]: VertexAttrib4fARB (will be remapped) */
+ /* _mesa_function_pool[10152]: VertexAttrib4fARB (will be remapped) */
"iffff\0"
"glVertexAttrib4f\0"
"glVertexAttrib4fARB\0"
"\0"
- /* _mesa_function_pool[10166]: GetError (offset 261) */
+ /* _mesa_function_pool[10196]: GetError (offset 261) */
"\0"
"glGetError\0"
"\0"
- /* _mesa_function_pool[10179]: IndexFuncEXT (dynamic) */
+ /* _mesa_function_pool[10209]: IndexFuncEXT (dynamic) */
"if\0"
"glIndexFuncEXT\0"
"\0"
- /* _mesa_function_pool[10198]: TexCoord3dv (offset 111) */
+ /* _mesa_function_pool[10228]: TexCoord3dv (offset 111) */
"p\0"
"glTexCoord3dv\0"
"\0"
- /* _mesa_function_pool[10215]: Indexdv (offset 45) */
+ /* _mesa_function_pool[10245]: Indexdv (offset 45) */
"p\0"
"glIndexdv\0"
"\0"
- /* _mesa_function_pool[10228]: FramebufferTexture2DEXT (will be remapped) */
+ /* _mesa_function_pool[10258]: FramebufferTexture2DEXT (will be remapped) */
"iiiii\0"
"glFramebufferTexture2D\0"
"glFramebufferTexture2DEXT\0"
"\0"
- /* _mesa_function_pool[10284]: Normal3s (offset 60) */
+ /* _mesa_function_pool[10314]: Normal3s (offset 60) */
"iii\0"
"glNormal3s\0"
"\0"
- /* _mesa_function_pool[10300]: PushName (offset 201) */
+ /* _mesa_function_pool[10330]: GetObjectParameterivAPPLE (will be remapped) */
+ "iiip\0"
+ "glGetObjectParameterivAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[10364]: PushName (offset 201) */
"i\0"
"glPushName\0"
"\0"
- /* _mesa_function_pool[10314]: MultiTexCoord2dvARB (offset 385) */
+ /* _mesa_function_pool[10378]: MultiTexCoord2dvARB (offset 385) */
"ip\0"
"glMultiTexCoord2dv\0"
"glMultiTexCoord2dvARB\0"
"\0"
- /* _mesa_function_pool[10359]: CullParameterfvEXT (will be remapped) */
+ /* _mesa_function_pool[10423]: CullParameterfvEXT (will be remapped) */
"ip\0"
"glCullParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[10384]: Normal3i (offset 58) */
+ /* _mesa_function_pool[10448]: Normal3i (offset 58) */
"iii\0"
"glNormal3i\0"
"\0"
- /* _mesa_function_pool[10400]: ProgramNamedParameter4fvNV (will be remapped) */
+ /* _mesa_function_pool[10464]: ProgramNamedParameter4fvNV (will be remapped) */
"iipp\0"
"glProgramNamedParameter4fvNV\0"
"\0"
- /* _mesa_function_pool[10435]: SecondaryColorPointerEXT (will be remapped) */
+ /* _mesa_function_pool[10499]: SecondaryColorPointerEXT (will be remapped) */
"iiip\0"
"glSecondaryColorPointer\0"
"glSecondaryColorPointerEXT\0"
"\0"
- /* _mesa_function_pool[10492]: VertexAttrib4fvARB (will be remapped) */
+ /* _mesa_function_pool[10556]: VertexAttrib4fvARB (will be remapped) */
"ip\0"
"glVertexAttrib4fv\0"
"glVertexAttrib4fvARB\0"
"\0"
- /* _mesa_function_pool[10535]: ColorPointerListIBM (dynamic) */
+ /* _mesa_function_pool[10599]: ColorPointerListIBM (dynamic) */
"iiipi\0"
"glColorPointerListIBM\0"
"\0"
- /* _mesa_function_pool[10564]: GetActiveUniformARB (will be remapped) */
+ /* _mesa_function_pool[10628]: GetActiveUniformARB (will be remapped) */
"iiipppp\0"
"glGetActiveUniform\0"
"glGetActiveUniformARB\0"
"\0"
- /* _mesa_function_pool[10614]: ImageTransformParameteriHP (dynamic) */
+ /* _mesa_function_pool[10678]: ImageTransformParameteriHP (dynamic) */
"iii\0"
"glImageTransformParameteriHP\0"
"\0"
- /* _mesa_function_pool[10648]: Normal3b (offset 52) */
+ /* _mesa_function_pool[10712]: Normal3b (offset 52) */
"iii\0"
"glNormal3b\0"
"\0"
- /* _mesa_function_pool[10664]: Normal3d (offset 54) */
+ /* _mesa_function_pool[10728]: Normal3d (offset 54) */
"ddd\0"
"glNormal3d\0"
"\0"
- /* _mesa_function_pool[10680]: Normal3f (offset 56) */
+ /* _mesa_function_pool[10744]: Normal3f (offset 56) */
"fff\0"
"glNormal3f\0"
"\0"
- /* _mesa_function_pool[10696]: MultiTexCoord1svARB (offset 383) */
+ /* _mesa_function_pool[10760]: MultiTexCoord1svARB (offset 383) */
"ip\0"
"glMultiTexCoord1sv\0"
"glMultiTexCoord1svARB\0"
"\0"
- /* _mesa_function_pool[10741]: Indexi (offset 48) */
+ /* _mesa_function_pool[10805]: Indexi (offset 48) */
"i\0"
"glIndexi\0"
"\0"
- /* _mesa_function_pool[10753]: EGLImageTargetTexture2DOES (will be remapped) */
+ /* _mesa_function_pool[10817]: EGLImageTargetTexture2DOES (will be remapped) */
"ip\0"
"glEGLImageTargetTexture2DOES\0"
"\0"
- /* _mesa_function_pool[10786]: EndQueryARB (will be remapped) */
+ /* _mesa_function_pool[10850]: EndQueryARB (will be remapped) */
"i\0"
"glEndQuery\0"
"glEndQueryARB\0"
"\0"
- /* _mesa_function_pool[10814]: DeleteFencesNV (will be remapped) */
+ /* _mesa_function_pool[10878]: DeleteFencesNV (will be remapped) */
"ip\0"
"glDeleteFencesNV\0"
"\0"
- /* _mesa_function_pool[10835]: DeformationMap3dSGIX (dynamic) */
- "iddiiddiiddiip\0"
- "glDeformationMap3dSGIX\0"
- "\0"
- /* _mesa_function_pool[10874]: DepthMask (offset 211) */
+ /* _mesa_function_pool[10899]: DepthMask (offset 211) */
"i\0"
"glDepthMask\0"
"\0"
- /* _mesa_function_pool[10889]: IsShader (will be remapped) */
+ /* _mesa_function_pool[10914]: IsShader (will be remapped) */
"i\0"
"glIsShader\0"
"\0"
- /* _mesa_function_pool[10903]: Indexf (offset 46) */
+ /* _mesa_function_pool[10928]: Indexf (offset 46) */
"f\0"
"glIndexf\0"
"\0"
- /* _mesa_function_pool[10915]: GetImageTransformParameterivHP (dynamic) */
+ /* _mesa_function_pool[10940]: GetImageTransformParameterivHP (dynamic) */
"iip\0"
"glGetImageTransformParameterivHP\0"
"\0"
- /* _mesa_function_pool[10953]: Indexd (offset 44) */
+ /* _mesa_function_pool[10978]: Indexd (offset 44) */
"d\0"
"glIndexd\0"
"\0"
- /* _mesa_function_pool[10965]: GetMaterialiv (offset 270) */
+ /* _mesa_function_pool[10990]: GetMaterialiv (offset 270) */
"iip\0"
"glGetMaterialiv\0"
"\0"
- /* _mesa_function_pool[10986]: StencilOp (offset 244) */
+ /* _mesa_function_pool[11011]: StencilOp (offset 244) */
"iii\0"
"glStencilOp\0"
"\0"
- /* _mesa_function_pool[11003]: WindowPos4ivMESA (will be remapped) */
+ /* _mesa_function_pool[11028]: WindowPos4ivMESA (will be remapped) */
"p\0"
"glWindowPos4ivMESA\0"
"\0"
- /* _mesa_function_pool[11025]: MultiTexCoord3svARB (offset 399) */
+ /* _mesa_function_pool[11050]: MultiTexCoord3svARB (offset 399) */
"ip\0"
"glMultiTexCoord3sv\0"
"glMultiTexCoord3svARB\0"
"\0"
- /* _mesa_function_pool[11070]: TexEnvfv (offset 185) */
+ /* _mesa_function_pool[11095]: TexEnvfv (offset 185) */
"iip\0"
"glTexEnvfv\0"
"\0"
- /* _mesa_function_pool[11086]: MultiTexCoord4iARB (offset 404) */
+ /* _mesa_function_pool[11111]: MultiTexCoord4iARB (offset 404) */
"iiiii\0"
"glMultiTexCoord4i\0"
"glMultiTexCoord4iARB\0"
"\0"
- /* _mesa_function_pool[11132]: Indexs (offset 50) */
+ /* _mesa_function_pool[11157]: Indexs (offset 50) */
"i\0"
"glIndexs\0"
"\0"
- /* _mesa_function_pool[11144]: Binormal3ivEXT (dynamic) */
+ /* _mesa_function_pool[11169]: Binormal3ivEXT (dynamic) */
"p\0"
"glBinormal3ivEXT\0"
"\0"
- /* _mesa_function_pool[11164]: ResizeBuffersMESA (will be remapped) */
+ /* _mesa_function_pool[11189]: ResizeBuffersMESA (will be remapped) */
"\0"
"glResizeBuffersMESA\0"
"\0"
- /* _mesa_function_pool[11186]: GetUniformivARB (will be remapped) */
+ /* _mesa_function_pool[11211]: GetUniformivARB (will be remapped) */
"iip\0"
"glGetUniformiv\0"
"glGetUniformivARB\0"
"\0"
- /* _mesa_function_pool[11224]: PixelTexGenParameteriSGIS (will be remapped) */
+ /* _mesa_function_pool[11249]: PixelTexGenParameteriSGIS (will be remapped) */
"ii\0"
"glPixelTexGenParameteriSGIS\0"
"\0"
- /* _mesa_function_pool[11256]: VertexPointervINTEL (dynamic) */
+ /* _mesa_function_pool[11281]: VertexPointervINTEL (dynamic) */
"iip\0"
"glVertexPointervINTEL\0"
"\0"
- /* _mesa_function_pool[11283]: Vertex2i (offset 130) */
+ /* _mesa_function_pool[11308]: Vertex2i (offset 130) */
"ii\0"
"glVertex2i\0"
"\0"
- /* _mesa_function_pool[11298]: LoadMatrixf (offset 291) */
+ /* _mesa_function_pool[11323]: LoadMatrixf (offset 291) */
"p\0"
"glLoadMatrixf\0"
"\0"
- /* _mesa_function_pool[11315]: Vertex2f (offset 128) */
+ /* _mesa_function_pool[11340]: Vertex2f (offset 128) */
"ff\0"
"glVertex2f\0"
"\0"
- /* _mesa_function_pool[11330]: ReplacementCodeuiColor4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[11355]: ReplacementCodeuiColor4fNormal3fVertex3fvSUN (dynamic) */
"pppp\0"
"glReplacementCodeuiColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[11383]: Color4bv (offset 26) */
+ /* _mesa_function_pool[11408]: Color4bv (offset 26) */
"p\0"
"glColor4bv\0"
"\0"
- /* _mesa_function_pool[11397]: VertexPointer (offset 321) */
+ /* _mesa_function_pool[11422]: VertexPointer (offset 321) */
"iiip\0"
"glVertexPointer\0"
"\0"
- /* _mesa_function_pool[11419]: SecondaryColor3uiEXT (will be remapped) */
+ /* _mesa_function_pool[11444]: SecondaryColor3uiEXT (will be remapped) */
"iii\0"
"glSecondaryColor3ui\0"
"glSecondaryColor3uiEXT\0"
"\0"
- /* _mesa_function_pool[11467]: StartInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[11492]: StartInstrumentsSGIX (dynamic) */
"\0"
"glStartInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[11492]: SecondaryColor3usvEXT (will be remapped) */
+ /* _mesa_function_pool[11517]: SecondaryColor3usvEXT (will be remapped) */
"p\0"
"glSecondaryColor3usv\0"
"glSecondaryColor3usvEXT\0"
"\0"
- /* _mesa_function_pool[11540]: VertexAttrib2fvNV (will be remapped) */
+ /* _mesa_function_pool[11565]: VertexAttrib2fvNV (will be remapped) */
"ip\0"
"glVertexAttrib2fvNV\0"
"\0"
- /* _mesa_function_pool[11564]: ProgramLocalParameter4dvARB (will be remapped) */
+ /* _mesa_function_pool[11589]: ProgramLocalParameter4dvARB (will be remapped) */
"iip\0"
"glProgramLocalParameter4dvARB\0"
"\0"
- /* _mesa_function_pool[11599]: DeleteLists (offset 4) */
+ /* _mesa_function_pool[11624]: DeleteLists (offset 4) */
"ii\0"
"glDeleteLists\0"
"\0"
- /* _mesa_function_pool[11617]: LogicOp (offset 242) */
+ /* _mesa_function_pool[11642]: LogicOp (offset 242) */
"i\0"
"glLogicOp\0"
"\0"
- /* _mesa_function_pool[11630]: MatrixIndexuivARB (dynamic) */
+ /* _mesa_function_pool[11655]: MatrixIndexuivARB (dynamic) */
"ip\0"
"glMatrixIndexuivARB\0"
"\0"
- /* _mesa_function_pool[11654]: Vertex2s (offset 132) */
+ /* _mesa_function_pool[11679]: Vertex2s (offset 132) */
"ii\0"
"glVertex2s\0"
"\0"
- /* _mesa_function_pool[11669]: RenderbufferStorageMultisample (will be remapped) */
+ /* _mesa_function_pool[11694]: RenderbufferStorageMultisample (will be remapped) */
"iiiii\0"
"glRenderbufferStorageMultisample\0"
"glRenderbufferStorageMultisampleEXT\0"
"\0"
- /* _mesa_function_pool[11745]: TexCoord4fv (offset 121) */
+ /* _mesa_function_pool[11770]: TexCoord4fv (offset 121) */
"p\0"
"glTexCoord4fv\0"
"\0"
- /* _mesa_function_pool[11762]: Tangent3sEXT (dynamic) */
+ /* _mesa_function_pool[11787]: Tangent3sEXT (dynamic) */
"iii\0"
"glTangent3sEXT\0"
"\0"
- /* _mesa_function_pool[11782]: GlobalAlphaFactorfSUN (dynamic) */
+ /* _mesa_function_pool[11807]: GlobalAlphaFactorfSUN (dynamic) */
"f\0"
"glGlobalAlphaFactorfSUN\0"
"\0"
- /* _mesa_function_pool[11809]: MultiTexCoord3iARB (offset 396) */
+ /* _mesa_function_pool[11834]: MultiTexCoord3iARB (offset 396) */
"iiii\0"
"glMultiTexCoord3i\0"
"glMultiTexCoord3iARB\0"
"\0"
- /* _mesa_function_pool[11854]: IsProgram (will be remapped) */
+ /* _mesa_function_pool[11879]: IsProgram (will be remapped) */
"i\0"
"glIsProgram\0"
"\0"
- /* _mesa_function_pool[11869]: TexCoordPointerListIBM (dynamic) */
+ /* _mesa_function_pool[11894]: TexCoordPointerListIBM (dynamic) */
"iiipi\0"
"glTexCoordPointerListIBM\0"
"\0"
- /* _mesa_function_pool[11901]: GlobalAlphaFactorusSUN (dynamic) */
+ /* _mesa_function_pool[11926]: GlobalAlphaFactorusSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorusSUN\0"
"\0"
- /* _mesa_function_pool[11929]: VertexAttrib2dvNV (will be remapped) */
+ /* _mesa_function_pool[11954]: VertexAttrib2dvNV (will be remapped) */
"ip\0"
"glVertexAttrib2dvNV\0"
"\0"
- /* _mesa_function_pool[11953]: FramebufferRenderbufferEXT (will be remapped) */
+ /* _mesa_function_pool[11978]: FramebufferRenderbufferEXT (will be remapped) */
"iiii\0"
"glFramebufferRenderbuffer\0"
"glFramebufferRenderbufferEXT\0"
"\0"
- /* _mesa_function_pool[12014]: VertexAttrib1dvNV (will be remapped) */
+ /* _mesa_function_pool[12039]: VertexAttrib1dvNV (will be remapped) */
"ip\0"
"glVertexAttrib1dvNV\0"
"\0"
- /* _mesa_function_pool[12038]: GenTextures (offset 328) */
+ /* _mesa_function_pool[12063]: GenTextures (offset 328) */
"ip\0"
"glGenTextures\0"
"glGenTexturesEXT\0"
"\0"
- /* _mesa_function_pool[12073]: SetFenceNV (will be remapped) */
+ /* _mesa_function_pool[12098]: SetFenceNV (will be remapped) */
"ii\0"
"glSetFenceNV\0"
"\0"
- /* _mesa_function_pool[12090]: FramebufferTexture1DEXT (will be remapped) */
+ /* _mesa_function_pool[12115]: FramebufferTexture1DEXT (will be remapped) */
"iiiii\0"
"glFramebufferTexture1D\0"
"glFramebufferTexture1DEXT\0"
"\0"
- /* _mesa_function_pool[12146]: GetCombinerOutputParameterivNV (will be remapped) */
+ /* _mesa_function_pool[12171]: GetCombinerOutputParameterivNV (will be remapped) */
"iiip\0"
"glGetCombinerOutputParameterivNV\0"
"\0"
- /* _mesa_function_pool[12185]: PixelTexGenParameterivSGIS (will be remapped) */
+ /* _mesa_function_pool[12210]: MultiModeDrawArraysIBM (will be remapped) */
+ "pppii\0"
+ "glMultiModeDrawArraysIBM\0"
+ "\0"
+ /* _mesa_function_pool[12242]: PixelTexGenParameterivSGIS (will be remapped) */
"ip\0"
"glPixelTexGenParameterivSGIS\0"
"\0"
- /* _mesa_function_pool[12218]: TextureNormalEXT (dynamic) */
+ /* _mesa_function_pool[12275]: TextureNormalEXT (dynamic) */
"i\0"
"glTextureNormalEXT\0"
"\0"
- /* _mesa_function_pool[12240]: IndexPointerListIBM (dynamic) */
+ /* _mesa_function_pool[12297]: IndexPointerListIBM (dynamic) */
"iipi\0"
"glIndexPointerListIBM\0"
"\0"
- /* _mesa_function_pool[12268]: WeightfvARB (dynamic) */
+ /* _mesa_function_pool[12325]: WeightfvARB (dynamic) */
"ip\0"
"glWeightfvARB\0"
"\0"
- /* _mesa_function_pool[12286]: RasterPos2sv (offset 69) */
+ /* _mesa_function_pool[12343]: RasterPos2sv (offset 69) */
"p\0"
"glRasterPos2sv\0"
"\0"
- /* _mesa_function_pool[12304]: Color4ubv (offset 36) */
+ /* _mesa_function_pool[12361]: Color4ubv (offset 36) */
"p\0"
"glColor4ubv\0"
"\0"
- /* _mesa_function_pool[12319]: DrawBuffer (offset 202) */
+ /* _mesa_function_pool[12376]: DrawBuffer (offset 202) */
"i\0"
"glDrawBuffer\0"
"\0"
- /* _mesa_function_pool[12335]: TexCoord2fv (offset 105) */
+ /* _mesa_function_pool[12392]: TexCoord2fv (offset 105) */
"p\0"
"glTexCoord2fv\0"
"\0"
- /* _mesa_function_pool[12352]: WindowPos4fMESA (will be remapped) */
+ /* _mesa_function_pool[12409]: WindowPos4fMESA (will be remapped) */
"ffff\0"
"glWindowPos4fMESA\0"
"\0"
- /* _mesa_function_pool[12376]: TexCoord1sv (offset 101) */
+ /* _mesa_function_pool[12433]: TexCoord1sv (offset 101) */
"p\0"
"glTexCoord1sv\0"
"\0"
- /* _mesa_function_pool[12393]: WindowPos3dvMESA (will be remapped) */
+ /* _mesa_function_pool[12450]: WindowPos3dvMESA (will be remapped) */
"p\0"
"glWindowPos3dv\0"
"glWindowPos3dvARB\0"
"glWindowPos3dvMESA\0"
"\0"
- /* _mesa_function_pool[12448]: DepthFunc (offset 245) */
+ /* _mesa_function_pool[12505]: DepthFunc (offset 245) */
"i\0"
"glDepthFunc\0"
"\0"
- /* _mesa_function_pool[12463]: PixelMapusv (offset 253) */
+ /* _mesa_function_pool[12520]: PixelMapusv (offset 253) */
"iip\0"
"glPixelMapusv\0"
"\0"
- /* _mesa_function_pool[12482]: GetQueryObjecti64vEXT (will be remapped) */
+ /* _mesa_function_pool[12539]: GetQueryObjecti64vEXT (will be remapped) */
"iip\0"
"glGetQueryObjecti64vEXT\0"
"\0"
- /* _mesa_function_pool[12511]: MultiTexCoord1dARB (offset 376) */
+ /* _mesa_function_pool[12568]: MultiTexCoord1dARB (offset 376) */
"id\0"
"glMultiTexCoord1d\0"
"glMultiTexCoord1dARB\0"
"\0"
- /* _mesa_function_pool[12554]: PointParameterivNV (will be remapped) */
+ /* _mesa_function_pool[12611]: PointParameterivNV (will be remapped) */
"ip\0"
"glPointParameteriv\0"
"glPointParameterivNV\0"
"\0"
- /* _mesa_function_pool[12598]: BlendFunc (offset 241) */
+ /* _mesa_function_pool[12655]: BlendFunc (offset 241) */
"ii\0"
"glBlendFunc\0"
"\0"
- /* _mesa_function_pool[12614]: Uniform2fvARB (will be remapped) */
+ /* _mesa_function_pool[12671]: Uniform2fvARB (will be remapped) */
"iip\0"
"glUniform2fv\0"
"glUniform2fvARB\0"
"\0"
- /* _mesa_function_pool[12648]: BufferParameteriAPPLE (will be remapped) */
+ /* _mesa_function_pool[12705]: BufferParameteriAPPLE (will be remapped) */
"iii\0"
"glBufferParameteriAPPLE\0"
"\0"
- /* _mesa_function_pool[12677]: MultiTexCoord3dvARB (offset 393) */
+ /* _mesa_function_pool[12734]: MultiTexCoord3dvARB (offset 393) */
"ip\0"
"glMultiTexCoord3dv\0"
"glMultiTexCoord3dvARB\0"
"\0"
- /* _mesa_function_pool[12722]: ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[12779]: ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (dynamic) */
"pppp\0"
"glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[12778]: DeleteObjectARB (will be remapped) */
+ /* _mesa_function_pool[12835]: DeleteObjectARB (will be remapped) */
"i\0"
"glDeleteObjectARB\0"
"\0"
- /* _mesa_function_pool[12799]: MatrixIndexPointerARB (dynamic) */
+ /* _mesa_function_pool[12856]: MatrixIndexPointerARB (dynamic) */
"iiip\0"
"glMatrixIndexPointerARB\0"
"\0"
- /* _mesa_function_pool[12829]: ProgramNamedParameter4dvNV (will be remapped) */
+ /* _mesa_function_pool[12886]: ProgramNamedParameter4dvNV (will be remapped) */
"iipp\0"
"glProgramNamedParameter4dvNV\0"
"\0"
- /* _mesa_function_pool[12864]: Tangent3fvEXT (dynamic) */
+ /* _mesa_function_pool[12921]: Tangent3fvEXT (dynamic) */
"p\0"
"glTangent3fvEXT\0"
"\0"
- /* _mesa_function_pool[12883]: Flush (offset 217) */
+ /* _mesa_function_pool[12940]: Flush (offset 217) */
"\0"
"glFlush\0"
"\0"
- /* _mesa_function_pool[12893]: Color4uiv (offset 38) */
+ /* _mesa_function_pool[12950]: Color4uiv (offset 38) */
"p\0"
"glColor4uiv\0"
"\0"
- /* _mesa_function_pool[12908]: GenVertexArrays (will be remapped) */
+ /* _mesa_function_pool[12965]: GenVertexArrays (will be remapped) */
"ip\0"
"glGenVertexArrays\0"
"\0"
- /* _mesa_function_pool[12930]: RasterPos3sv (offset 77) */
+ /* _mesa_function_pool[12987]: RasterPos3sv (offset 77) */
"p\0"
"glRasterPos3sv\0"
"\0"
- /* _mesa_function_pool[12948]: BindFramebufferEXT (will be remapped) */
+ /* _mesa_function_pool[13005]: BindFramebufferEXT (will be remapped) */
"ii\0"
"glBindFramebuffer\0"
"glBindFramebufferEXT\0"
"\0"
- /* _mesa_function_pool[12991]: ReferencePlaneSGIX (dynamic) */
+ /* _mesa_function_pool[13048]: ReferencePlaneSGIX (dynamic) */
"p\0"
"glReferencePlaneSGIX\0"
"\0"
- /* _mesa_function_pool[13015]: PushAttrib (offset 219) */
+ /* _mesa_function_pool[13072]: PushAttrib (offset 219) */
"i\0"
"glPushAttrib\0"
"\0"
- /* _mesa_function_pool[13031]: RasterPos2i (offset 66) */
+ /* _mesa_function_pool[13088]: RasterPos2i (offset 66) */
"ii\0"
"glRasterPos2i\0"
"\0"
- /* _mesa_function_pool[13049]: ValidateProgramARB (will be remapped) */
+ /* _mesa_function_pool[13106]: ValidateProgramARB (will be remapped) */
"i\0"
"glValidateProgram\0"
"glValidateProgramARB\0"
"\0"
- /* _mesa_function_pool[13091]: TexParameteriv (offset 181) */
+ /* _mesa_function_pool[13148]: TexParameteriv (offset 181) */
"iip\0"
"glTexParameteriv\0"
"\0"
- /* _mesa_function_pool[13113]: UnlockArraysEXT (will be remapped) */
+ /* _mesa_function_pool[13170]: UnlockArraysEXT (will be remapped) */
"\0"
"glUnlockArraysEXT\0"
"\0"
- /* _mesa_function_pool[13133]: TexCoord2fColor3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[13190]: TexCoord2fColor3fVertex3fSUN (dynamic) */
"ffffffff\0"
"glTexCoord2fColor3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[13174]: WindowPos3fvMESA (will be remapped) */
+ /* _mesa_function_pool[13231]: WindowPos3fvMESA (will be remapped) */
"p\0"
"glWindowPos3fv\0"
"glWindowPos3fvARB\0"
"glWindowPos3fvMESA\0"
"\0"
- /* _mesa_function_pool[13229]: RasterPos2f (offset 64) */
+ /* _mesa_function_pool[13286]: RasterPos2f (offset 64) */
"ff\0"
"glRasterPos2f\0"
"\0"
- /* _mesa_function_pool[13247]: VertexAttrib1svNV (will be remapped) */
+ /* _mesa_function_pool[13304]: VertexAttrib1svNV (will be remapped) */
"ip\0"
"glVertexAttrib1svNV\0"
"\0"
- /* _mesa_function_pool[13271]: RasterPos2d (offset 62) */
+ /* _mesa_function_pool[13328]: RasterPos2d (offset 62) */
"dd\0"
"glRasterPos2d\0"
"\0"
- /* _mesa_function_pool[13289]: RasterPos3fv (offset 73) */
+ /* _mesa_function_pool[13346]: RasterPos3fv (offset 73) */
"p\0"
"glRasterPos3fv\0"
"\0"
- /* _mesa_function_pool[13307]: CopyTexSubImage3D (offset 373) */
+ /* _mesa_function_pool[13364]: CopyTexSubImage3D (offset 373) */
"iiiiiiiii\0"
"glCopyTexSubImage3D\0"
"glCopyTexSubImage3DEXT\0"
"\0"
- /* _mesa_function_pool[13361]: VertexAttrib2dARB (will be remapped) */
+ /* _mesa_function_pool[13418]: VertexAttrib2dARB (will be remapped) */
"idd\0"
"glVertexAttrib2d\0"
"glVertexAttrib2dARB\0"
"\0"
- /* _mesa_function_pool[13403]: Color4ub (offset 35) */
+ /* _mesa_function_pool[13460]: Color4ub (offset 35) */
"iiii\0"
"glColor4ub\0"
"\0"
- /* _mesa_function_pool[13420]: GetInteger64v (will be remapped) */
+ /* _mesa_function_pool[13477]: GetInteger64v (will be remapped) */
"ip\0"
"glGetInteger64v\0"
"\0"
- /* _mesa_function_pool[13440]: TextureColorMaskSGIS (dynamic) */
+ /* _mesa_function_pool[13497]: TextureColorMaskSGIS (dynamic) */
"iiii\0"
"glTextureColorMaskSGIS\0"
"\0"
- /* _mesa_function_pool[13469]: RasterPos2s (offset 68) */
+ /* _mesa_function_pool[13526]: RasterPos2s (offset 68) */
"ii\0"
"glRasterPos2s\0"
"\0"
- /* _mesa_function_pool[13487]: GetColorTable (offset 343) */
+ /* _mesa_function_pool[13544]: GetColorTable (offset 343) */
"iiip\0"
"glGetColorTable\0"
"glGetColorTableSGI\0"
"glGetColorTableEXT\0"
"\0"
- /* _mesa_function_pool[13547]: SelectBuffer (offset 195) */
+ /* _mesa_function_pool[13604]: SelectBuffer (offset 195) */
"ip\0"
"glSelectBuffer\0"
"\0"
- /* _mesa_function_pool[13566]: Indexiv (offset 49) */
+ /* _mesa_function_pool[13623]: Indexiv (offset 49) */
"p\0"
"glIndexiv\0"
"\0"
- /* _mesa_function_pool[13579]: TexCoord3i (offset 114) */
+ /* _mesa_function_pool[13636]: TexCoord3i (offset 114) */
"iii\0"
"glTexCoord3i\0"
"\0"
- /* _mesa_function_pool[13597]: CopyColorTable (offset 342) */
+ /* _mesa_function_pool[13654]: CopyColorTable (offset 342) */
"iiiii\0"
"glCopyColorTable\0"
"glCopyColorTableSGI\0"
"\0"
- /* _mesa_function_pool[13641]: GetHistogramParameterfv (offset 362) */
+ /* _mesa_function_pool[13698]: GetHistogramParameterfv (offset 362) */
"iip\0"
"glGetHistogramParameterfv\0"
"glGetHistogramParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[13701]: Frustum (offset 289) */
+ /* _mesa_function_pool[13758]: Frustum (offset 289) */
"dddddd\0"
"glFrustum\0"
"\0"
- /* _mesa_function_pool[13719]: GetString (offset 275) */
+ /* _mesa_function_pool[13776]: GetString (offset 275) */
"i\0"
"glGetString\0"
"\0"
- /* _mesa_function_pool[13734]: ColorPointervINTEL (dynamic) */
+ /* _mesa_function_pool[13791]: ColorPointervINTEL (dynamic) */
"iip\0"
"glColorPointervINTEL\0"
"\0"
- /* _mesa_function_pool[13760]: TexEnvf (offset 184) */
+ /* _mesa_function_pool[13817]: TexEnvf (offset 184) */
"iif\0"
"glTexEnvf\0"
"\0"
- /* _mesa_function_pool[13775]: TexCoord3d (offset 110) */
+ /* _mesa_function_pool[13832]: TexCoord3d (offset 110) */
"ddd\0"
"glTexCoord3d\0"
"\0"
- /* _mesa_function_pool[13793]: AlphaFragmentOp1ATI (will be remapped) */
+ /* _mesa_function_pool[13850]: AlphaFragmentOp1ATI (will be remapped) */
"iiiiii\0"
"glAlphaFragmentOp1ATI\0"
"\0"
- /* _mesa_function_pool[13823]: TexCoord3f (offset 112) */
+ /* _mesa_function_pool[13880]: TexCoord3f (offset 112) */
"fff\0"
"glTexCoord3f\0"
"\0"
- /* _mesa_function_pool[13841]: MultiTexCoord3ivARB (offset 397) */
+ /* _mesa_function_pool[13898]: MultiTexCoord3ivARB (offset 397) */
"ip\0"
"glMultiTexCoord3iv\0"
"glMultiTexCoord3ivARB\0"
"\0"
- /* _mesa_function_pool[13886]: MultiTexCoord2sARB (offset 390) */
+ /* _mesa_function_pool[13943]: MultiTexCoord2sARB (offset 390) */
"iii\0"
"glMultiTexCoord2s\0"
"glMultiTexCoord2sARB\0"
"\0"
- /* _mesa_function_pool[13930]: VertexAttrib1dvARB (will be remapped) */
+ /* _mesa_function_pool[13987]: VertexAttrib1dvARB (will be remapped) */
"ip\0"
"glVertexAttrib1dv\0"
"glVertexAttrib1dvARB\0"
"\0"
- /* _mesa_function_pool[13973]: DeleteTextures (offset 327) */
+ /* _mesa_function_pool[14030]: DeleteTextures (offset 327) */
"ip\0"
"glDeleteTextures\0"
"glDeleteTexturesEXT\0"
"\0"
- /* _mesa_function_pool[14014]: TexCoordPointerEXT (will be remapped) */
+ /* _mesa_function_pool[14071]: TexCoordPointerEXT (will be remapped) */
"iiiip\0"
"glTexCoordPointerEXT\0"
"\0"
- /* _mesa_function_pool[14042]: TexSubImage4DSGIS (dynamic) */
+ /* _mesa_function_pool[14099]: TexSubImage4DSGIS (dynamic) */
"iiiiiiiiiiiip\0"
"glTexSubImage4DSGIS\0"
"\0"
- /* _mesa_function_pool[14077]: TexCoord3s (offset 116) */
+ /* _mesa_function_pool[14134]: TexCoord3s (offset 116) */
"iii\0"
"glTexCoord3s\0"
"\0"
- /* _mesa_function_pool[14095]: GetTexLevelParameteriv (offset 285) */
+ /* _mesa_function_pool[14152]: GetTexLevelParameteriv (offset 285) */
"iiip\0"
"glGetTexLevelParameteriv\0"
"\0"
- /* _mesa_function_pool[14126]: CombinerStageParameterfvNV (dynamic) */
+ /* _mesa_function_pool[14183]: CombinerStageParameterfvNV (dynamic) */
"iip\0"
"glCombinerStageParameterfvNV\0"
"\0"
- /* _mesa_function_pool[14160]: StopInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[14217]: StopInstrumentsSGIX (dynamic) */
"i\0"
"glStopInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[14185]: TexCoord4fColor4fNormal3fVertex4fSUN (dynamic) */
+ /* _mesa_function_pool[14242]: TexCoord4fColor4fNormal3fVertex4fSUN (dynamic) */
"fffffffffffffff\0"
"glTexCoord4fColor4fNormal3fVertex4fSUN\0"
"\0"
- /* _mesa_function_pool[14241]: ClearAccum (offset 204) */
+ /* _mesa_function_pool[14298]: ClearAccum (offset 204) */
"ffff\0"
"glClearAccum\0"
"\0"
- /* _mesa_function_pool[14260]: DeformSGIX (dynamic) */
+ /* _mesa_function_pool[14317]: DeformSGIX (dynamic) */
"i\0"
"glDeformSGIX\0"
"\0"
- /* _mesa_function_pool[14276]: GetVertexAttribfvARB (will be remapped) */
+ /* _mesa_function_pool[14333]: GetVertexAttribfvARB (will be remapped) */
"iip\0"
"glGetVertexAttribfv\0"
"glGetVertexAttribfvARB\0"
"\0"
- /* _mesa_function_pool[14324]: SecondaryColor3ivEXT (will be remapped) */
+ /* _mesa_function_pool[14381]: SecondaryColor3ivEXT (will be remapped) */
"p\0"
"glSecondaryColor3iv\0"
"glSecondaryColor3ivEXT\0"
"\0"
- /* _mesa_function_pool[14370]: TexCoord4iv (offset 123) */
+ /* _mesa_function_pool[14427]: TexCoord4iv (offset 123) */
"p\0"
"glTexCoord4iv\0"
"\0"
- /* _mesa_function_pool[14387]: UniformMatrix4x2fv (will be remapped) */
+ /* _mesa_function_pool[14444]: UniformMatrix4x2fv (will be remapped) */
"iiip\0"
"glUniformMatrix4x2fv\0"
"\0"
- /* _mesa_function_pool[14414]: GetDetailTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[14471]: GetDetailTexFuncSGIS (dynamic) */
"ip\0"
"glGetDetailTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[14441]: GetCombinerStageParameterfvNV (dynamic) */
+ /* _mesa_function_pool[14498]: GetCombinerStageParameterfvNV (dynamic) */
"iip\0"
"glGetCombinerStageParameterfvNV\0"
"\0"
- /* _mesa_function_pool[14478]: PolygonOffset (offset 319) */
+ /* _mesa_function_pool[14535]: PolygonOffset (offset 319) */
"ff\0"
"glPolygonOffset\0"
"\0"
- /* _mesa_function_pool[14498]: BindVertexArray (will be remapped) */
+ /* _mesa_function_pool[14555]: BindVertexArray (will be remapped) */
"i\0"
"glBindVertexArray\0"
"\0"
- /* _mesa_function_pool[14519]: Color4ubVertex2fvSUN (dynamic) */
+ /* _mesa_function_pool[14576]: Color4ubVertex2fvSUN (dynamic) */
"pp\0"
"glColor4ubVertex2fvSUN\0"
"\0"
- /* _mesa_function_pool[14546]: Rectd (offset 86) */
+ /* _mesa_function_pool[14603]: Rectd (offset 86) */
"dddd\0"
"glRectd\0"
"\0"
- /* _mesa_function_pool[14560]: TexFilterFuncSGIS (dynamic) */
+ /* _mesa_function_pool[14617]: TexFilterFuncSGIS (dynamic) */
"iiip\0"
"glTexFilterFuncSGIS\0"
"\0"
- /* _mesa_function_pool[14586]: SampleMaskSGIS (will be remapped) */
+ /* _mesa_function_pool[14643]: SampleMaskSGIS (will be remapped) */
"fi\0"
"glSampleMaskSGIS\0"
"glSampleMaskEXT\0"
"\0"
- /* _mesa_function_pool[14623]: GetAttribLocationARB (will be remapped) */
+ /* _mesa_function_pool[14680]: GetAttribLocationARB (will be remapped) */
"ip\0"
"glGetAttribLocation\0"
"glGetAttribLocationARB\0"
"\0"
- /* _mesa_function_pool[14670]: RasterPos3i (offset 74) */
+ /* _mesa_function_pool[14727]: RasterPos3i (offset 74) */
"iii\0"
"glRasterPos3i\0"
"\0"
- /* _mesa_function_pool[14689]: VertexAttrib4ubvARB (will be remapped) */
+ /* _mesa_function_pool[14746]: VertexAttrib4ubvARB (will be remapped) */
"ip\0"
"glVertexAttrib4ubv\0"
"glVertexAttrib4ubvARB\0"
"\0"
- /* _mesa_function_pool[14734]: DetailTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[14791]: DetailTexFuncSGIS (dynamic) */
"iip\0"
"glDetailTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[14759]: Normal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[14816]: Normal3fVertex3fSUN (dynamic) */
"ffffff\0"
"glNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[14789]: CopyTexImage2D (offset 324) */
+ /* _mesa_function_pool[14846]: CopyTexImage2D (offset 324) */
"iiiiiiii\0"
"glCopyTexImage2D\0"
"glCopyTexImage2DEXT\0"
"\0"
- /* _mesa_function_pool[14836]: GetBufferPointervARB (will be remapped) */
+ /* _mesa_function_pool[14893]: GetBufferPointervARB (will be remapped) */
"iip\0"
"glGetBufferPointerv\0"
"glGetBufferPointervARB\0"
"\0"
- /* _mesa_function_pool[14884]: ProgramEnvParameter4fARB (will be remapped) */
+ /* _mesa_function_pool[14941]: ProgramEnvParameter4fARB (will be remapped) */
"iiffff\0"
"glProgramEnvParameter4fARB\0"
"glProgramParameter4fNV\0"
"\0"
- /* _mesa_function_pool[14942]: Uniform3ivARB (will be remapped) */
+ /* _mesa_function_pool[14999]: Uniform3ivARB (will be remapped) */
"iip\0"
"glUniform3iv\0"
"glUniform3ivARB\0"
"\0"
- /* _mesa_function_pool[14976]: Lightfv (offset 160) */
+ /* _mesa_function_pool[15033]: Lightfv (offset 160) */
"iip\0"
"glLightfv\0"
"\0"
- /* _mesa_function_pool[14991]: ClearDepth (offset 208) */
+ /* _mesa_function_pool[15048]: ClearDepth (offset 208) */
"d\0"
"glClearDepth\0"
"\0"
- /* _mesa_function_pool[15007]: GetFenceivNV (will be remapped) */
+ /* _mesa_function_pool[15064]: GetFenceivNV (will be remapped) */
"iip\0"
"glGetFenceivNV\0"
"\0"
- /* _mesa_function_pool[15027]: WindowPos4dvMESA (will be remapped) */
+ /* _mesa_function_pool[15084]: WindowPos4dvMESA (will be remapped) */
"p\0"
"glWindowPos4dvMESA\0"
"\0"
- /* _mesa_function_pool[15049]: ColorSubTable (offset 346) */
+ /* _mesa_function_pool[15106]: ColorSubTable (offset 346) */
"iiiiip\0"
"glColorSubTable\0"
"glColorSubTableEXT\0"
"\0"
- /* _mesa_function_pool[15092]: Color4fv (offset 30) */
+ /* _mesa_function_pool[15149]: Color4fv (offset 30) */
"p\0"
"glColor4fv\0"
"\0"
- /* _mesa_function_pool[15106]: MultiTexCoord4ivARB (offset 405) */
+ /* _mesa_function_pool[15163]: MultiTexCoord4ivARB (offset 405) */
"ip\0"
"glMultiTexCoord4iv\0"
"glMultiTexCoord4ivARB\0"
"\0"
- /* _mesa_function_pool[15151]: ProgramLocalParameters4fvEXT (will be remapped) */
+ /* _mesa_function_pool[15208]: ProgramLocalParameters4fvEXT (will be remapped) */
"iiip\0"
"glProgramLocalParameters4fvEXT\0"
"\0"
- /* _mesa_function_pool[15188]: ColorPointer (offset 308) */
+ /* _mesa_function_pool[15245]: ColorPointer (offset 308) */
"iiip\0"
"glColorPointer\0"
"\0"
- /* _mesa_function_pool[15209]: Rects (offset 92) */
+ /* _mesa_function_pool[15266]: Rects (offset 92) */
"iiii\0"
"glRects\0"
"\0"
- /* _mesa_function_pool[15223]: GetMapAttribParameterfvNV (dynamic) */
+ /* _mesa_function_pool[15280]: GetMapAttribParameterfvNV (dynamic) */
"iiip\0"
"glGetMapAttribParameterfvNV\0"
"\0"
- /* _mesa_function_pool[15257]: Lightiv (offset 162) */
+ /* _mesa_function_pool[15314]: Lightiv (offset 162) */
"iip\0"
"glLightiv\0"
"\0"
- /* _mesa_function_pool[15272]: VertexAttrib4sARB (will be remapped) */
+ /* _mesa_function_pool[15329]: VertexAttrib4sARB (will be remapped) */
"iiiii\0"
"glVertexAttrib4s\0"
"glVertexAttrib4sARB\0"
"\0"
- /* _mesa_function_pool[15316]: GetQueryObjectuivARB (will be remapped) */
+ /* _mesa_function_pool[15373]: GetQueryObjectuivARB (will be remapped) */
"iip\0"
"glGetQueryObjectuiv\0"
"glGetQueryObjectuivARB\0"
"\0"
- /* _mesa_function_pool[15364]: GetTexParameteriv (offset 283) */
+ /* _mesa_function_pool[15421]: GetTexParameteriv (offset 283) */
"iip\0"
"glGetTexParameteriv\0"
"\0"
- /* _mesa_function_pool[15389]: MapParameterivNV (dynamic) */
+ /* _mesa_function_pool[15446]: MapParameterivNV (dynamic) */
"iip\0"
"glMapParameterivNV\0"
"\0"
- /* _mesa_function_pool[15413]: GenRenderbuffersEXT (will be remapped) */
+ /* _mesa_function_pool[15470]: GenRenderbuffersEXT (will be remapped) */
"ip\0"
"glGenRenderbuffers\0"
"glGenRenderbuffersEXT\0"
"\0"
- /* _mesa_function_pool[15458]: VertexAttrib2dvARB (will be remapped) */
+ /* _mesa_function_pool[15515]: VertexAttrib2dvARB (will be remapped) */
"ip\0"
"glVertexAttrib2dv\0"
"glVertexAttrib2dvARB\0"
"\0"
- /* _mesa_function_pool[15501]: EdgeFlagPointerEXT (will be remapped) */
+ /* _mesa_function_pool[15558]: EdgeFlagPointerEXT (will be remapped) */
"iip\0"
"glEdgeFlagPointerEXT\0"
"\0"
- /* _mesa_function_pool[15527]: VertexAttribs2svNV (will be remapped) */
+ /* _mesa_function_pool[15584]: VertexAttribs2svNV (will be remapped) */
"iip\0"
"glVertexAttribs2svNV\0"
"\0"
- /* _mesa_function_pool[15553]: WeightbvARB (dynamic) */
+ /* _mesa_function_pool[15610]: WeightbvARB (dynamic) */
"ip\0"
"glWeightbvARB\0"
"\0"
- /* _mesa_function_pool[15571]: VertexAttrib2fvARB (will be remapped) */
+ /* _mesa_function_pool[15628]: VertexAttrib2fvARB (will be remapped) */
"ip\0"
"glVertexAttrib2fv\0"
"glVertexAttrib2fvARB\0"
"\0"
- /* _mesa_function_pool[15614]: GetBufferParameterivARB (will be remapped) */
+ /* _mesa_function_pool[15671]: GetBufferParameterivARB (will be remapped) */
"iip\0"
"glGetBufferParameteriv\0"
"glGetBufferParameterivARB\0"
"\0"
- /* _mesa_function_pool[15668]: Rectdv (offset 87) */
+ /* _mesa_function_pool[15725]: Rectdv (offset 87) */
"pp\0"
"glRectdv\0"
"\0"
- /* _mesa_function_pool[15681]: ListParameteriSGIX (dynamic) */
+ /* _mesa_function_pool[15738]: ListParameteriSGIX (dynamic) */
"iii\0"
"glListParameteriSGIX\0"
"\0"
- /* _mesa_function_pool[15707]: ReplacementCodeuiColor4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[15764]: ReplacementCodeuiColor4fNormal3fVertex3fSUN (dynamic) */
"iffffffffff\0"
"glReplacementCodeuiColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[15766]: InstrumentsBufferSGIX (dynamic) */
+ /* _mesa_function_pool[15823]: InstrumentsBufferSGIX (dynamic) */
"ip\0"
"glInstrumentsBufferSGIX\0"
"\0"
- /* _mesa_function_pool[15794]: VertexAttrib4NivARB (will be remapped) */
+ /* _mesa_function_pool[15851]: VertexAttrib4NivARB (will be remapped) */
"ip\0"
"glVertexAttrib4Niv\0"
"glVertexAttrib4NivARB\0"
"\0"
- /* _mesa_function_pool[15839]: GetAttachedShaders (will be remapped) */
+ /* _mesa_function_pool[15896]: GetAttachedShaders (will be remapped) */
"iipp\0"
"glGetAttachedShaders\0"
"\0"
- /* _mesa_function_pool[15866]: GenVertexArraysAPPLE (will be remapped) */
+ /* _mesa_function_pool[15923]: GenVertexArraysAPPLE (will be remapped) */
"ip\0"
"glGenVertexArraysAPPLE\0"
"\0"
- /* _mesa_function_pool[15893]: Materialiv (offset 172) */
+ /* _mesa_function_pool[15950]: Materialiv (offset 172) */
"iip\0"
"glMaterialiv\0"
"\0"
- /* _mesa_function_pool[15911]: PushClientAttrib (offset 335) */
+ /* _mesa_function_pool[15968]: PushClientAttrib (offset 335) */
"i\0"
"glPushClientAttrib\0"
"\0"
- /* _mesa_function_pool[15933]: ProgramEnvParameters4fvEXT (will be remapped) */
+ /* _mesa_function_pool[15990]: ProgramEnvParameters4fvEXT (will be remapped) */
"iiip\0"
"glProgramEnvParameters4fvEXT\0"
"\0"
- /* _mesa_function_pool[15968]: TexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[16025]: TexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
"pppp\0"
"glTexCoord2fColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[16014]: WindowPos2iMESA (will be remapped) */
+ /* _mesa_function_pool[16071]: WindowPos2iMESA (will be remapped) */
"ii\0"
"glWindowPos2i\0"
"glWindowPos2iARB\0"
"glWindowPos2iMESA\0"
"\0"
- /* _mesa_function_pool[16067]: SecondaryColor3fvEXT (will be remapped) */
+ /* _mesa_function_pool[16124]: SecondaryColor3fvEXT (will be remapped) */
"p\0"
"glSecondaryColor3fv\0"
"glSecondaryColor3fvEXT\0"
"\0"
- /* _mesa_function_pool[16113]: PolygonMode (offset 174) */
+ /* _mesa_function_pool[16170]: PolygonMode (offset 174) */
"ii\0"
"glPolygonMode\0"
"\0"
- /* _mesa_function_pool[16131]: CompressedTexSubImage1DARB (will be remapped) */
+ /* _mesa_function_pool[16188]: CompressedTexSubImage1DARB (will be remapped) */
"iiiiiip\0"
"glCompressedTexSubImage1D\0"
"glCompressedTexSubImage1DARB\0"
"\0"
- /* _mesa_function_pool[16195]: GetVertexAttribivNV (will be remapped) */
+ /* _mesa_function_pool[16252]: GetVertexAttribivNV (will be remapped) */
"iip\0"
"glGetVertexAttribivNV\0"
"\0"
- /* _mesa_function_pool[16222]: GetProgramStringARB (will be remapped) */
+ /* _mesa_function_pool[16279]: GetProgramStringARB (will be remapped) */
"iip\0"
"glGetProgramStringARB\0"
"\0"
- /* _mesa_function_pool[16249]: TexBumpParameterfvATI (will be remapped) */
+ /* _mesa_function_pool[16306]: TexBumpParameterfvATI (will be remapped) */
"ip\0"
"glTexBumpParameterfvATI\0"
"\0"
- /* _mesa_function_pool[16277]: CompileShaderARB (will be remapped) */
+ /* _mesa_function_pool[16334]: CompileShaderARB (will be remapped) */
"i\0"
"glCompileShader\0"
"glCompileShaderARB\0"
"\0"
- /* _mesa_function_pool[16315]: DeleteShader (will be remapped) */
+ /* _mesa_function_pool[16372]: DeleteShader (will be remapped) */
"i\0"
"glDeleteShader\0"
"\0"
- /* _mesa_function_pool[16333]: DisableClientState (offset 309) */
+ /* _mesa_function_pool[16390]: DisableClientState (offset 309) */
"i\0"
"glDisableClientState\0"
"\0"
- /* _mesa_function_pool[16357]: TexGeni (offset 192) */
+ /* _mesa_function_pool[16414]: TexGeni (offset 192) */
"iii\0"
"glTexGeni\0"
"\0"
- /* _mesa_function_pool[16372]: TexGenf (offset 190) */
+ /* _mesa_function_pool[16429]: TexGenf (offset 190) */
"iif\0"
"glTexGenf\0"
"\0"
- /* _mesa_function_pool[16387]: Uniform3fARB (will be remapped) */
+ /* _mesa_function_pool[16444]: Uniform3fARB (will be remapped) */
"ifff\0"
"glUniform3f\0"
"glUniform3fARB\0"
"\0"
- /* _mesa_function_pool[16420]: TexGend (offset 188) */
+ /* _mesa_function_pool[16477]: TexGend (offset 188) */
"iid\0"
"glTexGend\0"
"\0"
- /* _mesa_function_pool[16435]: ListParameterfvSGIX (dynamic) */
+ /* _mesa_function_pool[16492]: ListParameterfvSGIX (dynamic) */
"iip\0"
"glListParameterfvSGIX\0"
"\0"
- /* _mesa_function_pool[16462]: GetPolygonStipple (offset 274) */
+ /* _mesa_function_pool[16519]: GetPolygonStipple (offset 274) */
"p\0"
"glGetPolygonStipple\0"
"\0"
- /* _mesa_function_pool[16485]: Tangent3dvEXT (dynamic) */
+ /* _mesa_function_pool[16542]: Tangent3dvEXT (dynamic) */
"p\0"
"glTangent3dvEXT\0"
"\0"
- /* _mesa_function_pool[16504]: GetVertexAttribfvNV (will be remapped) */
+ /* _mesa_function_pool[16561]: GetVertexAttribfvNV (will be remapped) */
"iip\0"
"glGetVertexAttribfvNV\0"
"\0"
- /* _mesa_function_pool[16531]: WindowPos3sMESA (will be remapped) */
+ /* _mesa_function_pool[16588]: WindowPos3sMESA (will be remapped) */
"iii\0"
"glWindowPos3s\0"
"glWindowPos3sARB\0"
"glWindowPos3sMESA\0"
"\0"
- /* _mesa_function_pool[16585]: VertexAttrib2svNV (will be remapped) */
+ /* _mesa_function_pool[16642]: VertexAttrib2svNV (will be remapped) */
"ip\0"
"glVertexAttrib2svNV\0"
"\0"
- /* _mesa_function_pool[16609]: VertexAttribs1fvNV (will be remapped) */
+ /* _mesa_function_pool[16666]: VertexAttribs1fvNV (will be remapped) */
"iip\0"
"glVertexAttribs1fvNV\0"
"\0"
- /* _mesa_function_pool[16635]: TexCoord2fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[16692]: TexCoord2fVertex3fvSUN (dynamic) */
"pp\0"
"glTexCoord2fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[16664]: WindowPos4sMESA (will be remapped) */
+ /* _mesa_function_pool[16721]: WindowPos4sMESA (will be remapped) */
"iiii\0"
"glWindowPos4sMESA\0"
"\0"
- /* _mesa_function_pool[16688]: VertexAttrib4NuivARB (will be remapped) */
+ /* _mesa_function_pool[16745]: VertexAttrib4NuivARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nuiv\0"
"glVertexAttrib4NuivARB\0"
"\0"
- /* _mesa_function_pool[16735]: ClientActiveTextureARB (offset 375) */
+ /* _mesa_function_pool[16792]: ClientActiveTextureARB (offset 375) */
"i\0"
"glClientActiveTexture\0"
"glClientActiveTextureARB\0"
"\0"
- /* _mesa_function_pool[16785]: PixelTexGenSGIX (will be remapped) */
+ /* _mesa_function_pool[16842]: PixelTexGenSGIX (will be remapped) */
"i\0"
"glPixelTexGenSGIX\0"
"\0"
- /* _mesa_function_pool[16806]: ReplacementCodeusvSUN (dynamic) */
+ /* _mesa_function_pool[16863]: ReplacementCodeusvSUN (dynamic) */
"p\0"
"glReplacementCodeusvSUN\0"
"\0"
- /* _mesa_function_pool[16833]: Uniform4fARB (will be remapped) */
+ /* _mesa_function_pool[16890]: Uniform4fARB (will be remapped) */
"iffff\0"
"glUniform4f\0"
"glUniform4fARB\0"
"\0"
- /* _mesa_function_pool[16867]: Color4sv (offset 34) */
+ /* _mesa_function_pool[16924]: Color4sv (offset 34) */
"p\0"
"glColor4sv\0"
"\0"
- /* _mesa_function_pool[16881]: FlushMappedBufferRange (will be remapped) */
+ /* _mesa_function_pool[16938]: FlushMappedBufferRange (will be remapped) */
"iii\0"
"glFlushMappedBufferRange\0"
"\0"
- /* _mesa_function_pool[16911]: IsProgramNV (will be remapped) */
+ /* _mesa_function_pool[16968]: IsProgramNV (will be remapped) */
"i\0"
"glIsProgramARB\0"
"glIsProgramNV\0"
"\0"
- /* _mesa_function_pool[16943]: FlushMappedBufferRangeAPPLE (will be remapped) */
+ /* _mesa_function_pool[17000]: FlushMappedBufferRangeAPPLE (will be remapped) */
"iii\0"
"glFlushMappedBufferRangeAPPLE\0"
"\0"
- /* _mesa_function_pool[16978]: PixelZoom (offset 246) */
+ /* _mesa_function_pool[17035]: PixelZoom (offset 246) */
"ff\0"
"glPixelZoom\0"
"\0"
- /* _mesa_function_pool[16994]: ReplacementCodePointerSUN (dynamic) */
+ /* _mesa_function_pool[17051]: ReplacementCodePointerSUN (dynamic) */
"iip\0"
"glReplacementCodePointerSUN\0"
"\0"
- /* _mesa_function_pool[17027]: ProgramEnvParameter4dARB (will be remapped) */
+ /* _mesa_function_pool[17084]: ProgramEnvParameter4dARB (will be remapped) */
"iidddd\0"
"glProgramEnvParameter4dARB\0"
"glProgramParameter4dNV\0"
"\0"
- /* _mesa_function_pool[17085]: ColorTableParameterfv (offset 340) */
+ /* _mesa_function_pool[17142]: ColorTableParameterfv (offset 340) */
"iip\0"
"glColorTableParameterfv\0"
"glColorTableParameterfvSGI\0"
"\0"
- /* _mesa_function_pool[17141]: FragmentLightModelfSGIX (dynamic) */
+ /* _mesa_function_pool[17198]: FragmentLightModelfSGIX (dynamic) */
"if\0"
"glFragmentLightModelfSGIX\0"
"\0"
- /* _mesa_function_pool[17171]: Binormal3bvEXT (dynamic) */
+ /* _mesa_function_pool[17228]: Binormal3bvEXT (dynamic) */
"p\0"
"glBinormal3bvEXT\0"
"\0"
- /* _mesa_function_pool[17191]: PixelMapuiv (offset 252) */
+ /* _mesa_function_pool[17248]: PixelMapuiv (offset 252) */
"iip\0"
"glPixelMapuiv\0"
"\0"
- /* _mesa_function_pool[17210]: Color3dv (offset 12) */
+ /* _mesa_function_pool[17267]: Color3dv (offset 12) */
"p\0"
"glColor3dv\0"
"\0"
- /* _mesa_function_pool[17224]: IsTexture (offset 330) */
+ /* _mesa_function_pool[17281]: IsTexture (offset 330) */
"i\0"
"glIsTexture\0"
"glIsTextureEXT\0"
"\0"
- /* _mesa_function_pool[17254]: VertexWeightfvEXT (dynamic) */
+ /* _mesa_function_pool[17311]: VertexWeightfvEXT (dynamic) */
"p\0"
"glVertexWeightfvEXT\0"
"\0"
- /* _mesa_function_pool[17277]: VertexAttrib1dARB (will be remapped) */
+ /* _mesa_function_pool[17334]: VertexAttrib1dARB (will be remapped) */
"id\0"
"glVertexAttrib1d\0"
"glVertexAttrib1dARB\0"
"\0"
- /* _mesa_function_pool[17318]: ImageTransformParameterivHP (dynamic) */
+ /* _mesa_function_pool[17375]: ImageTransformParameterivHP (dynamic) */
"iip\0"
"glImageTransformParameterivHP\0"
"\0"
- /* _mesa_function_pool[17353]: TexCoord4i (offset 122) */
+ /* _mesa_function_pool[17410]: TexCoord4i (offset 122) */
"iiii\0"
"glTexCoord4i\0"
"\0"
- /* _mesa_function_pool[17372]: DeleteQueriesARB (will be remapped) */
+ /* _mesa_function_pool[17429]: DeleteQueriesARB (will be remapped) */
"ip\0"
"glDeleteQueries\0"
"glDeleteQueriesARB\0"
"\0"
- /* _mesa_function_pool[17411]: Color4ubVertex2fSUN (dynamic) */
+ /* _mesa_function_pool[17468]: Color4ubVertex2fSUN (dynamic) */
"iiiiff\0"
"glColor4ubVertex2fSUN\0"
"\0"
- /* _mesa_function_pool[17441]: FragmentColorMaterialSGIX (dynamic) */
+ /* _mesa_function_pool[17498]: FragmentColorMaterialSGIX (dynamic) */
"ii\0"
"glFragmentColorMaterialSGIX\0"
"\0"
- /* _mesa_function_pool[17473]: CurrentPaletteMatrixARB (dynamic) */
+ /* _mesa_function_pool[17530]: CurrentPaletteMatrixARB (dynamic) */
"i\0"
"glCurrentPaletteMatrixARB\0"
"\0"
- /* _mesa_function_pool[17502]: GetMapdv (offset 266) */
+ /* _mesa_function_pool[17559]: GetMapdv (offset 266) */
"iip\0"
"glGetMapdv\0"
"\0"
- /* _mesa_function_pool[17518]: SamplePatternSGIS (will be remapped) */
+ /* _mesa_function_pool[17575]: ObjectPurgeableAPPLE (will be remapped) */
+ "iii\0"
+ "glObjectPurgeableAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[17603]: SamplePatternSGIS (will be remapped) */
"i\0"
"glSamplePatternSGIS\0"
"glSamplePatternEXT\0"
"\0"
- /* _mesa_function_pool[17560]: PixelStoref (offset 249) */
+ /* _mesa_function_pool[17645]: PixelStoref (offset 249) */
"if\0"
"glPixelStoref\0"
"\0"
- /* _mesa_function_pool[17578]: IsQueryARB (will be remapped) */
+ /* _mesa_function_pool[17663]: IsQueryARB (will be remapped) */
"i\0"
"glIsQuery\0"
"glIsQueryARB\0"
"\0"
- /* _mesa_function_pool[17604]: ReplacementCodeuiColor4ubVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[17689]: ReplacementCodeuiColor4ubVertex3fSUN (dynamic) */
"iiiiifff\0"
"glReplacementCodeuiColor4ubVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[17653]: PixelStorei (offset 250) */
+ /* _mesa_function_pool[17738]: PixelStorei (offset 250) */
"ii\0"
"glPixelStorei\0"
"\0"
- /* _mesa_function_pool[17671]: VertexAttrib4usvARB (will be remapped) */
+ /* _mesa_function_pool[17756]: VertexAttrib4usvARB (will be remapped) */
"ip\0"
"glVertexAttrib4usv\0"
"glVertexAttrib4usvARB\0"
"\0"
- /* _mesa_function_pool[17716]: LinkProgramARB (will be remapped) */
+ /* _mesa_function_pool[17801]: LinkProgramARB (will be remapped) */
"i\0"
"glLinkProgram\0"
"glLinkProgramARB\0"
"\0"
- /* _mesa_function_pool[17750]: VertexAttrib2fNV (will be remapped) */
+ /* _mesa_function_pool[17835]: VertexAttrib2fNV (will be remapped) */
"iff\0"
"glVertexAttrib2fNV\0"
"\0"
- /* _mesa_function_pool[17774]: ShaderSourceARB (will be remapped) */
+ /* _mesa_function_pool[17859]: ShaderSourceARB (will be remapped) */
"iipp\0"
"glShaderSource\0"
"glShaderSourceARB\0"
"\0"
- /* _mesa_function_pool[17813]: FragmentMaterialiSGIX (dynamic) */
+ /* _mesa_function_pool[17898]: FragmentMaterialiSGIX (dynamic) */
"iii\0"
"glFragmentMaterialiSGIX\0"
"\0"
- /* _mesa_function_pool[17842]: EvalCoord2dv (offset 233) */
+ /* _mesa_function_pool[17927]: EvalCoord2dv (offset 233) */
"p\0"
"glEvalCoord2dv\0"
"\0"
- /* _mesa_function_pool[17860]: VertexAttrib3svARB (will be remapped) */
+ /* _mesa_function_pool[17945]: VertexAttrib3svARB (will be remapped) */
"ip\0"
"glVertexAttrib3sv\0"
"glVertexAttrib3svARB\0"
"\0"
- /* _mesa_function_pool[17903]: ColorMaterial (offset 151) */
+ /* _mesa_function_pool[17988]: ColorMaterial (offset 151) */
"ii\0"
"glColorMaterial\0"
"\0"
- /* _mesa_function_pool[17923]: CompressedTexSubImage3DARB (will be remapped) */
+ /* _mesa_function_pool[18008]: CompressedTexSubImage3DARB (will be remapped) */
"iiiiiiiiiip\0"
"glCompressedTexSubImage3D\0"
"glCompressedTexSubImage3DARB\0"
"\0"
- /* _mesa_function_pool[17991]: WindowPos2ivMESA (will be remapped) */
+ /* _mesa_function_pool[18076]: WindowPos2ivMESA (will be remapped) */
"p\0"
"glWindowPos2iv\0"
"glWindowPos2ivARB\0"
"glWindowPos2ivMESA\0"
"\0"
- /* _mesa_function_pool[18046]: IsFramebufferEXT (will be remapped) */
+ /* _mesa_function_pool[18131]: IsFramebufferEXT (will be remapped) */
"i\0"
"glIsFramebuffer\0"
"glIsFramebufferEXT\0"
"\0"
- /* _mesa_function_pool[18084]: Uniform4ivARB (will be remapped) */
+ /* _mesa_function_pool[18169]: Uniform4ivARB (will be remapped) */
"iip\0"
"glUniform4iv\0"
"glUniform4ivARB\0"
"\0"
- /* _mesa_function_pool[18118]: GetVertexAttribdvARB (will be remapped) */
+ /* _mesa_function_pool[18203]: GetVertexAttribdvARB (will be remapped) */
"iip\0"
"glGetVertexAttribdv\0"
"glGetVertexAttribdvARB\0"
"\0"
- /* _mesa_function_pool[18166]: TexBumpParameterivATI (will be remapped) */
+ /* _mesa_function_pool[18251]: TexBumpParameterivATI (will be remapped) */
"ip\0"
"glTexBumpParameterivATI\0"
"\0"
- /* _mesa_function_pool[18194]: GetSeparableFilter (offset 359) */
+ /* _mesa_function_pool[18279]: GetSeparableFilter (offset 359) */
"iiippp\0"
"glGetSeparableFilter\0"
"glGetSeparableFilterEXT\0"
"\0"
- /* _mesa_function_pool[18247]: Binormal3dEXT (dynamic) */
+ /* _mesa_function_pool[18332]: Binormal3dEXT (dynamic) */
"ddd\0"
"glBinormal3dEXT\0"
"\0"
- /* _mesa_function_pool[18268]: SpriteParameteriSGIX (dynamic) */
+ /* _mesa_function_pool[18353]: SpriteParameteriSGIX (dynamic) */
"ii\0"
"glSpriteParameteriSGIX\0"
"\0"
- /* _mesa_function_pool[18295]: RequestResidentProgramsNV (will be remapped) */
+ /* _mesa_function_pool[18380]: RequestResidentProgramsNV (will be remapped) */
"ip\0"
"glRequestResidentProgramsNV\0"
"\0"
- /* _mesa_function_pool[18327]: TagSampleBufferSGIX (dynamic) */
+ /* _mesa_function_pool[18412]: TagSampleBufferSGIX (dynamic) */
"\0"
"glTagSampleBufferSGIX\0"
"\0"
- /* _mesa_function_pool[18351]: ReplacementCodeusSUN (dynamic) */
+ /* _mesa_function_pool[18436]: ReplacementCodeusSUN (dynamic) */
"i\0"
"glReplacementCodeusSUN\0"
"\0"
- /* _mesa_function_pool[18377]: FeedbackBuffer (offset 194) */
+ /* _mesa_function_pool[18462]: FeedbackBuffer (offset 194) */
"iip\0"
"glFeedbackBuffer\0"
"\0"
- /* _mesa_function_pool[18399]: RasterPos2iv (offset 67) */
+ /* _mesa_function_pool[18484]: RasterPos2iv (offset 67) */
"p\0"
"glRasterPos2iv\0"
"\0"
- /* _mesa_function_pool[18417]: TexImage1D (offset 182) */
+ /* _mesa_function_pool[18502]: TexImage1D (offset 182) */
"iiiiiiip\0"
"glTexImage1D\0"
"\0"
- /* _mesa_function_pool[18440]: ListParameterivSGIX (dynamic) */
+ /* _mesa_function_pool[18525]: ListParameterivSGIX (dynamic) */
"iip\0"
"glListParameterivSGIX\0"
"\0"
- /* _mesa_function_pool[18467]: MultiDrawElementsEXT (will be remapped) */
+ /* _mesa_function_pool[18552]: MultiDrawElementsEXT (will be remapped) */
"ipipi\0"
"glMultiDrawElements\0"
"glMultiDrawElementsEXT\0"
"\0"
- /* _mesa_function_pool[18517]: Color3s (offset 17) */
+ /* _mesa_function_pool[18602]: Color3s (offset 17) */
"iii\0"
"glColor3s\0"
"\0"
- /* _mesa_function_pool[18532]: Uniform1ivARB (will be remapped) */
+ /* _mesa_function_pool[18617]: Uniform1ivARB (will be remapped) */
"iip\0"
"glUniform1iv\0"
"glUniform1ivARB\0"
"\0"
- /* _mesa_function_pool[18566]: WindowPos2sMESA (will be remapped) */
+ /* _mesa_function_pool[18651]: WindowPos2sMESA (will be remapped) */
"ii\0"
"glWindowPos2s\0"
"glWindowPos2sARB\0"
"glWindowPos2sMESA\0"
"\0"
- /* _mesa_function_pool[18619]: WeightusvARB (dynamic) */
+ /* _mesa_function_pool[18704]: WeightusvARB (dynamic) */
"ip\0"
"glWeightusvARB\0"
"\0"
- /* _mesa_function_pool[18638]: TexCoordPointer (offset 320) */
+ /* _mesa_function_pool[18723]: TexCoordPointer (offset 320) */
"iiip\0"
"glTexCoordPointer\0"
"\0"
- /* _mesa_function_pool[18662]: FogCoordPointerEXT (will be remapped) */
+ /* _mesa_function_pool[18747]: FogCoordPointerEXT (will be remapped) */
"iip\0"
"glFogCoordPointer\0"
"glFogCoordPointerEXT\0"
"\0"
- /* _mesa_function_pool[18706]: IndexMaterialEXT (dynamic) */
+ /* _mesa_function_pool[18791]: IndexMaterialEXT (dynamic) */
"ii\0"
"glIndexMaterialEXT\0"
"\0"
- /* _mesa_function_pool[18729]: Color3i (offset 15) */
+ /* _mesa_function_pool[18814]: Color3i (offset 15) */
"iii\0"
"glColor3i\0"
"\0"
- /* _mesa_function_pool[18744]: FrontFace (offset 157) */
+ /* _mesa_function_pool[18829]: FrontFace (offset 157) */
"i\0"
"glFrontFace\0"
"\0"
- /* _mesa_function_pool[18759]: EvalCoord2d (offset 232) */
+ /* _mesa_function_pool[18844]: EvalCoord2d (offset 232) */
"dd\0"
"glEvalCoord2d\0"
"\0"
- /* _mesa_function_pool[18777]: SecondaryColor3ubvEXT (will be remapped) */
+ /* _mesa_function_pool[18862]: SecondaryColor3ubvEXT (will be remapped) */
"p\0"
"glSecondaryColor3ubv\0"
"glSecondaryColor3ubvEXT\0"
"\0"
- /* _mesa_function_pool[18825]: EvalCoord2f (offset 234) */
+ /* _mesa_function_pool[18910]: EvalCoord2f (offset 234) */
"ff\0"
"glEvalCoord2f\0"
"\0"
- /* _mesa_function_pool[18843]: VertexAttrib4dvARB (will be remapped) */
+ /* _mesa_function_pool[18928]: VertexAttrib4dvARB (will be remapped) */
"ip\0"
"glVertexAttrib4dv\0"
"glVertexAttrib4dvARB\0"
"\0"
- /* _mesa_function_pool[18886]: BindAttribLocationARB (will be remapped) */
+ /* _mesa_function_pool[18971]: BindAttribLocationARB (will be remapped) */
"iip\0"
"glBindAttribLocation\0"
"glBindAttribLocationARB\0"
"\0"
- /* _mesa_function_pool[18936]: Color3b (offset 9) */
+ /* _mesa_function_pool[19021]: Color3b (offset 9) */
"iii\0"
"glColor3b\0"
"\0"
- /* _mesa_function_pool[18951]: MultiTexCoord2dARB (offset 384) */
+ /* _mesa_function_pool[19036]: MultiTexCoord2dARB (offset 384) */
"idd\0"
"glMultiTexCoord2d\0"
"glMultiTexCoord2dARB\0"
"\0"
- /* _mesa_function_pool[18995]: ExecuteProgramNV (will be remapped) */
+ /* _mesa_function_pool[19080]: ExecuteProgramNV (will be remapped) */
"iip\0"
"glExecuteProgramNV\0"
"\0"
- /* _mesa_function_pool[19019]: Color3f (offset 13) */
+ /* _mesa_function_pool[19104]: Color3f (offset 13) */
"fff\0"
"glColor3f\0"
"\0"
- /* _mesa_function_pool[19034]: LightEnviSGIX (dynamic) */
+ /* _mesa_function_pool[19119]: LightEnviSGIX (dynamic) */
"ii\0"
"glLightEnviSGIX\0"
"\0"
- /* _mesa_function_pool[19054]: Color3d (offset 11) */
+ /* _mesa_function_pool[19139]: Color3d (offset 11) */
"ddd\0"
"glColor3d\0"
"\0"
- /* _mesa_function_pool[19069]: Normal3dv (offset 55) */
+ /* _mesa_function_pool[19154]: Normal3dv (offset 55) */
"p\0"
"glNormal3dv\0"
"\0"
- /* _mesa_function_pool[19084]: Lightf (offset 159) */
+ /* _mesa_function_pool[19169]: Lightf (offset 159) */
"iif\0"
"glLightf\0"
"\0"
- /* _mesa_function_pool[19098]: ReplacementCodeuiSUN (dynamic) */
+ /* _mesa_function_pool[19183]: ReplacementCodeuiSUN (dynamic) */
"i\0"
"glReplacementCodeuiSUN\0"
"\0"
- /* _mesa_function_pool[19124]: MatrixMode (offset 293) */
+ /* _mesa_function_pool[19209]: MatrixMode (offset 293) */
"i\0"
"glMatrixMode\0"
"\0"
- /* _mesa_function_pool[19140]: GetPixelMapusv (offset 273) */
+ /* _mesa_function_pool[19225]: GetPixelMapusv (offset 273) */
"ip\0"
"glGetPixelMapusv\0"
"\0"
- /* _mesa_function_pool[19161]: Lighti (offset 161) */
+ /* _mesa_function_pool[19246]: Lighti (offset 161) */
"iii\0"
"glLighti\0"
"\0"
- /* _mesa_function_pool[19175]: VertexAttribPointerNV (will be remapped) */
+ /* _mesa_function_pool[19260]: VertexAttribPointerNV (will be remapped) */
"iiiip\0"
"glVertexAttribPointerNV\0"
"\0"
- /* _mesa_function_pool[19206]: GetBooleanIndexedvEXT (will be remapped) */
+ /* _mesa_function_pool[19291]: GetBooleanIndexedvEXT (will be remapped) */
"iip\0"
"glGetBooleanIndexedvEXT\0"
"\0"
- /* _mesa_function_pool[19235]: GetFramebufferAttachmentParameterivEXT (will be remapped) */
+ /* _mesa_function_pool[19320]: GetFramebufferAttachmentParameterivEXT (will be remapped) */
"iiip\0"
"glGetFramebufferAttachmentParameteriv\0"
"glGetFramebufferAttachmentParameterivEXT\0"
"\0"
- /* _mesa_function_pool[19320]: PixelTransformParameterfEXT (dynamic) */
+ /* _mesa_function_pool[19405]: PixelTransformParameterfEXT (dynamic) */
"iif\0"
"glPixelTransformParameterfEXT\0"
"\0"
- /* _mesa_function_pool[19355]: MultiTexCoord4dvARB (offset 401) */
+ /* _mesa_function_pool[19440]: MultiTexCoord4dvARB (offset 401) */
"ip\0"
"glMultiTexCoord4dv\0"
"glMultiTexCoord4dvARB\0"
"\0"
- /* _mesa_function_pool[19400]: PixelTransformParameteriEXT (dynamic) */
+ /* _mesa_function_pool[19485]: PixelTransformParameteriEXT (dynamic) */
"iii\0"
"glPixelTransformParameteriEXT\0"
"\0"
- /* _mesa_function_pool[19435]: GetDoublev (offset 260) */
+ /* _mesa_function_pool[19520]: GetDoublev (offset 260) */
"ip\0"
"glGetDoublev\0"
"\0"
- /* _mesa_function_pool[19452]: MultMatrixd (offset 295) */
+ /* _mesa_function_pool[19537]: MultMatrixd (offset 295) */
"p\0"
"glMultMatrixd\0"
"\0"
- /* _mesa_function_pool[19469]: MultMatrixf (offset 294) */
+ /* _mesa_function_pool[19554]: MultMatrixf (offset 294) */
"p\0"
"glMultMatrixf\0"
"\0"
- /* _mesa_function_pool[19486]: TexCoord2fColor4ubVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[19571]: TexCoord2fColor4ubVertex3fSUN (dynamic) */
"ffiiiifff\0"
"glTexCoord2fColor4ubVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[19529]: Uniform1iARB (will be remapped) */
+ /* _mesa_function_pool[19614]: Uniform1iARB (will be remapped) */
"ii\0"
"glUniform1i\0"
"glUniform1iARB\0"
"\0"
- /* _mesa_function_pool[19560]: VertexAttribPointerARB (will be remapped) */
+ /* _mesa_function_pool[19645]: VertexAttribPointerARB (will be remapped) */
"iiiiip\0"
"glVertexAttribPointer\0"
"glVertexAttribPointerARB\0"
"\0"
- /* _mesa_function_pool[19615]: SharpenTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[19700]: SharpenTexFuncSGIS (dynamic) */
"iip\0"
"glSharpenTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[19641]: MultiTexCoord4fvARB (offset 403) */
+ /* _mesa_function_pool[19726]: MultiTexCoord4fvARB (offset 403) */
"ip\0"
"glMultiTexCoord4fv\0"
"glMultiTexCoord4fvARB\0"
"\0"
- /* _mesa_function_pool[19686]: UniformMatrix2x3fv (will be remapped) */
+ /* _mesa_function_pool[19771]: UniformMatrix2x3fv (will be remapped) */
"iiip\0"
"glUniformMatrix2x3fv\0"
"\0"
- /* _mesa_function_pool[19713]: TrackMatrixNV (will be remapped) */
+ /* _mesa_function_pool[19798]: TrackMatrixNV (will be remapped) */
"iiii\0"
"glTrackMatrixNV\0"
"\0"
- /* _mesa_function_pool[19735]: CombinerParameteriNV (will be remapped) */
+ /* _mesa_function_pool[19820]: CombinerParameteriNV (will be remapped) */
"ii\0"
"glCombinerParameteriNV\0"
"\0"
- /* _mesa_function_pool[19762]: DeleteAsyncMarkersSGIX (dynamic) */
+ /* _mesa_function_pool[19847]: DeleteAsyncMarkersSGIX (dynamic) */
"ii\0"
"glDeleteAsyncMarkersSGIX\0"
"\0"
- /* _mesa_function_pool[19791]: IsAsyncMarkerSGIX (dynamic) */
+ /* _mesa_function_pool[19876]: IsAsyncMarkerSGIX (dynamic) */
"i\0"
"glIsAsyncMarkerSGIX\0"
"\0"
- /* _mesa_function_pool[19814]: FrameZoomSGIX (dynamic) */
+ /* _mesa_function_pool[19899]: FrameZoomSGIX (dynamic) */
"i\0"
"glFrameZoomSGIX\0"
"\0"
- /* _mesa_function_pool[19833]: Normal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[19918]: Normal3fVertex3fvSUN (dynamic) */
"pp\0"
"glNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[19860]: RasterPos4sv (offset 85) */
+ /* _mesa_function_pool[19945]: RasterPos4sv (offset 85) */
"p\0"
"glRasterPos4sv\0"
"\0"
- /* _mesa_function_pool[19878]: VertexAttrib4NsvARB (will be remapped) */
+ /* _mesa_function_pool[19963]: VertexAttrib4NsvARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nsv\0"
"glVertexAttrib4NsvARB\0"
"\0"
- /* _mesa_function_pool[19923]: VertexAttrib3fvARB (will be remapped) */
+ /* _mesa_function_pool[20008]: VertexAttrib3fvARB (will be remapped) */
"ip\0"
"glVertexAttrib3fv\0"
"glVertexAttrib3fvARB\0"
"\0"
- /* _mesa_function_pool[19966]: ClearColor (offset 206) */
+ /* _mesa_function_pool[20051]: ClearColor (offset 206) */
"ffff\0"
"glClearColor\0"
"\0"
- /* _mesa_function_pool[19985]: GetSynciv (will be remapped) */
+ /* _mesa_function_pool[20070]: GetSynciv (will be remapped) */
"iiipp\0"
"glGetSynciv\0"
"\0"
- /* _mesa_function_pool[20004]: DeleteFramebuffersEXT (will be remapped) */
+ /* _mesa_function_pool[20089]: DeleteFramebuffersEXT (will be remapped) */
"ip\0"
"glDeleteFramebuffers\0"
"glDeleteFramebuffersEXT\0"
"\0"
- /* _mesa_function_pool[20053]: GlobalAlphaFactorsSUN (dynamic) */
+ /* _mesa_function_pool[20138]: GlobalAlphaFactorsSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorsSUN\0"
"\0"
- /* _mesa_function_pool[20080]: IsEnabledIndexedEXT (will be remapped) */
+ /* _mesa_function_pool[20165]: IsEnabledIndexedEXT (will be remapped) */
"ii\0"
"glIsEnabledIndexedEXT\0"
"\0"
- /* _mesa_function_pool[20106]: TexEnviv (offset 187) */
+ /* _mesa_function_pool[20191]: TexEnviv (offset 187) */
"iip\0"
"glTexEnviv\0"
"\0"
- /* _mesa_function_pool[20122]: TexSubImage3D (offset 372) */
+ /* _mesa_function_pool[20207]: TexSubImage3D (offset 372) */
"iiiiiiiiiip\0"
"glTexSubImage3D\0"
"glTexSubImage3DEXT\0"
"\0"
- /* _mesa_function_pool[20170]: Tangent3fEXT (dynamic) */
+ /* _mesa_function_pool[20255]: Tangent3fEXT (dynamic) */
"fff\0"
"glTangent3fEXT\0"
"\0"
- /* _mesa_function_pool[20190]: SecondaryColor3uivEXT (will be remapped) */
+ /* _mesa_function_pool[20275]: SecondaryColor3uivEXT (will be remapped) */
"p\0"
"glSecondaryColor3uiv\0"
"glSecondaryColor3uivEXT\0"
"\0"
- /* _mesa_function_pool[20238]: MatrixIndexubvARB (dynamic) */
+ /* _mesa_function_pool[20323]: MatrixIndexubvARB (dynamic) */
"ip\0"
"glMatrixIndexubvARB\0"
"\0"
- /* _mesa_function_pool[20262]: Color4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[20347]: Color4fNormal3fVertex3fSUN (dynamic) */
"ffffffffff\0"
"glColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[20303]: PixelTexGenParameterfSGIS (will be remapped) */
+ /* _mesa_function_pool[20388]: PixelTexGenParameterfSGIS (will be remapped) */
"if\0"
"glPixelTexGenParameterfSGIS\0"
"\0"
- /* _mesa_function_pool[20335]: CreateShader (will be remapped) */
+ /* _mesa_function_pool[20420]: CreateShader (will be remapped) */
"i\0"
"glCreateShader\0"
"\0"
- /* _mesa_function_pool[20353]: GetColorTableParameterfv (offset 344) */
+ /* _mesa_function_pool[20438]: GetColorTableParameterfv (offset 344) */
"iip\0"
"glGetColorTableParameterfv\0"
"glGetColorTableParameterfvSGI\0"
"glGetColorTableParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[20445]: FragmentLightModelfvSGIX (dynamic) */
+ /* _mesa_function_pool[20530]: FragmentLightModelfvSGIX (dynamic) */
"ip\0"
"glFragmentLightModelfvSGIX\0"
"\0"
- /* _mesa_function_pool[20476]: Bitmap (offset 8) */
+ /* _mesa_function_pool[20561]: Bitmap (offset 8) */
"iiffffp\0"
"glBitmap\0"
"\0"
- /* _mesa_function_pool[20494]: MultiTexCoord3fARB (offset 394) */
+ /* _mesa_function_pool[20579]: MultiTexCoord3fARB (offset 394) */
"ifff\0"
"glMultiTexCoord3f\0"
"glMultiTexCoord3fARB\0"
"\0"
- /* _mesa_function_pool[20539]: GetTexLevelParameterfv (offset 284) */
+ /* _mesa_function_pool[20624]: GetTexLevelParameterfv (offset 284) */
"iiip\0"
"glGetTexLevelParameterfv\0"
"\0"
- /* _mesa_function_pool[20570]: GetPixelTexGenParameterfvSGIS (will be remapped) */
+ /* _mesa_function_pool[20655]: GetPixelTexGenParameterfvSGIS (will be remapped) */
"ip\0"
"glGetPixelTexGenParameterfvSGIS\0"
"\0"
- /* _mesa_function_pool[20606]: GenFramebuffersEXT (will be remapped) */
+ /* _mesa_function_pool[20691]: GenFramebuffersEXT (will be remapped) */
"ip\0"
"glGenFramebuffers\0"
"glGenFramebuffersEXT\0"
"\0"
- /* _mesa_function_pool[20649]: GetProgramParameterdvNV (will be remapped) */
+ /* _mesa_function_pool[20734]: GetProgramParameterdvNV (will be remapped) */
"iiip\0"
"glGetProgramParameterdvNV\0"
"\0"
- /* _mesa_function_pool[20681]: Vertex2sv (offset 133) */
+ /* _mesa_function_pool[20766]: Vertex2sv (offset 133) */
"p\0"
"glVertex2sv\0"
"\0"
- /* _mesa_function_pool[20696]: GetIntegerv (offset 263) */
+ /* _mesa_function_pool[20781]: GetIntegerv (offset 263) */
"ip\0"
"glGetIntegerv\0"
"\0"
- /* _mesa_function_pool[20714]: IsVertexArrayAPPLE (will be remapped) */
+ /* _mesa_function_pool[20799]: IsVertexArrayAPPLE (will be remapped) */
"i\0"
"glIsVertexArray\0"
"glIsVertexArrayAPPLE\0"
"\0"
- /* _mesa_function_pool[20754]: FragmentLightfvSGIX (dynamic) */
+ /* _mesa_function_pool[20839]: FragmentLightfvSGIX (dynamic) */
"iip\0"
"glFragmentLightfvSGIX\0"
"\0"
- /* _mesa_function_pool[20781]: DetachShader (will be remapped) */
+ /* _mesa_function_pool[20866]: DetachShader (will be remapped) */
"ii\0"
"glDetachShader\0"
"\0"
- /* _mesa_function_pool[20800]: VertexAttrib4NubARB (will be remapped) */
+ /* _mesa_function_pool[20885]: VertexAttrib4NubARB (will be remapped) */
"iiiii\0"
"glVertexAttrib4Nub\0"
"glVertexAttrib4NubARB\0"
"\0"
- /* _mesa_function_pool[20848]: GetProgramEnvParameterfvARB (will be remapped) */
+ /* _mesa_function_pool[20933]: GetProgramEnvParameterfvARB (will be remapped) */
"iip\0"
"glGetProgramEnvParameterfvARB\0"
"\0"
- /* _mesa_function_pool[20883]: GetTrackMatrixivNV (will be remapped) */
+ /* _mesa_function_pool[20968]: GetTrackMatrixivNV (will be remapped) */
"iiip\0"
"glGetTrackMatrixivNV\0"
"\0"
- /* _mesa_function_pool[20910]: VertexAttrib3svNV (will be remapped) */
+ /* _mesa_function_pool[20995]: VertexAttrib3svNV (will be remapped) */
"ip\0"
"glVertexAttrib3svNV\0"
"\0"
- /* _mesa_function_pool[20934]: Uniform4fvARB (will be remapped) */
+ /* _mesa_function_pool[21019]: Uniform4fvARB (will be remapped) */
"iip\0"
"glUniform4fv\0"
"glUniform4fvARB\0"
"\0"
- /* _mesa_function_pool[20968]: MultTransposeMatrixfARB (will be remapped) */
+ /* _mesa_function_pool[21053]: MultTransposeMatrixfARB (will be remapped) */
"p\0"
"glMultTransposeMatrixf\0"
"glMultTransposeMatrixfARB\0"
"\0"
- /* _mesa_function_pool[21020]: GetTexEnviv (offset 277) */
+ /* _mesa_function_pool[21105]: GetTexEnviv (offset 277) */
"iip\0"
"glGetTexEnviv\0"
"\0"
- /* _mesa_function_pool[21039]: ColorFragmentOp1ATI (will be remapped) */
+ /* _mesa_function_pool[21124]: ColorFragmentOp1ATI (will be remapped) */
"iiiiiii\0"
"glColorFragmentOp1ATI\0"
"\0"
- /* _mesa_function_pool[21070]: GetUniformfvARB (will be remapped) */
+ /* _mesa_function_pool[21155]: GetUniformfvARB (will be remapped) */
"iip\0"
"glGetUniformfv\0"
"glGetUniformfvARB\0"
"\0"
- /* _mesa_function_pool[21108]: EGLImageTargetRenderbufferStorageOES (will be remapped) */
+ /* _mesa_function_pool[21193]: EGLImageTargetRenderbufferStorageOES (will be remapped) */
"ip\0"
"glEGLImageTargetRenderbufferStorageOES\0"
"\0"
- /* _mesa_function_pool[21151]: PopClientAttrib (offset 334) */
+ /* _mesa_function_pool[21236]: PopClientAttrib (offset 334) */
"\0"
"glPopClientAttrib\0"
"\0"
- /* _mesa_function_pool[21171]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[21256]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
"iffffffffffff\0"
"glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[21242]: DetachObjectARB (will be remapped) */
+ /* _mesa_function_pool[21327]: DetachObjectARB (will be remapped) */
"ii\0"
"glDetachObjectARB\0"
"\0"
- /* _mesa_function_pool[21264]: VertexBlendARB (dynamic) */
+ /* _mesa_function_pool[21349]: VertexBlendARB (dynamic) */
"i\0"
"glVertexBlendARB\0"
"\0"
- /* _mesa_function_pool[21284]: WindowPos3iMESA (will be remapped) */
+ /* _mesa_function_pool[21369]: WindowPos3iMESA (will be remapped) */
"iii\0"
"glWindowPos3i\0"
"glWindowPos3iARB\0"
"glWindowPos3iMESA\0"
"\0"
- /* _mesa_function_pool[21338]: SeparableFilter2D (offset 360) */
+ /* _mesa_function_pool[21423]: SeparableFilter2D (offset 360) */
"iiiiiipp\0"
"glSeparableFilter2D\0"
"glSeparableFilter2DEXT\0"
"\0"
- /* _mesa_function_pool[21391]: ReplacementCodeuiColor4ubVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[21476]: ReplacementCodeuiColor4ubVertex3fvSUN (dynamic) */
"ppp\0"
"glReplacementCodeuiColor4ubVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[21436]: Map1d (offset 220) */
+ /* _mesa_function_pool[21521]: Map1d (offset 220) */
"iddiip\0"
"glMap1d\0"
"\0"
- /* _mesa_function_pool[21452]: Map1f (offset 221) */
+ /* _mesa_function_pool[21537]: Map1f (offset 221) */
"iffiip\0"
"glMap1f\0"
"\0"
- /* _mesa_function_pool[21468]: CompressedTexImage2DARB (will be remapped) */
+ /* _mesa_function_pool[21553]: CompressedTexImage2DARB (will be remapped) */
"iiiiiiip\0"
"glCompressedTexImage2D\0"
"glCompressedTexImage2DARB\0"
"\0"
- /* _mesa_function_pool[21527]: ArrayElement (offset 306) */
+ /* _mesa_function_pool[21612]: ArrayElement (offset 306) */
"i\0"
"glArrayElement\0"
"glArrayElementEXT\0"
"\0"
- /* _mesa_function_pool[21563]: TexImage2D (offset 183) */
+ /* _mesa_function_pool[21648]: TexImage2D (offset 183) */
"iiiiiiiip\0"
"glTexImage2D\0"
"\0"
- /* _mesa_function_pool[21587]: DepthBoundsEXT (will be remapped) */
+ /* _mesa_function_pool[21672]: DepthBoundsEXT (will be remapped) */
"dd\0"
"glDepthBoundsEXT\0"
"\0"
- /* _mesa_function_pool[21608]: ProgramParameters4fvNV (will be remapped) */
+ /* _mesa_function_pool[21693]: ProgramParameters4fvNV (will be remapped) */
"iiip\0"
"glProgramParameters4fvNV\0"
"\0"
- /* _mesa_function_pool[21639]: DeformationMap3fSGIX (dynamic) */
+ /* _mesa_function_pool[21724]: DeformationMap3fSGIX (dynamic) */
"iffiiffiiffiip\0"
"glDeformationMap3fSGIX\0"
"\0"
- /* _mesa_function_pool[21678]: GetProgramivNV (will be remapped) */
+ /* _mesa_function_pool[21763]: GetProgramivNV (will be remapped) */
"iip\0"
"glGetProgramivNV\0"
"\0"
- /* _mesa_function_pool[21700]: GetMinmaxParameteriv (offset 366) */
+ /* _mesa_function_pool[21785]: GetMinmaxParameteriv (offset 366) */
"iip\0"
"glGetMinmaxParameteriv\0"
"glGetMinmaxParameterivEXT\0"
"\0"
- /* _mesa_function_pool[21754]: PixelTransferf (offset 247) */
+ /* _mesa_function_pool[21839]: PixelTransferf (offset 247) */
"if\0"
"glPixelTransferf\0"
"\0"
- /* _mesa_function_pool[21775]: CopyTexImage1D (offset 323) */
+ /* _mesa_function_pool[21860]: CopyTexImage1D (offset 323) */
"iiiiiii\0"
"glCopyTexImage1D\0"
"glCopyTexImage1DEXT\0"
"\0"
- /* _mesa_function_pool[21821]: PushMatrix (offset 298) */
+ /* _mesa_function_pool[21906]: PushMatrix (offset 298) */
"\0"
"glPushMatrix\0"
"\0"
- /* _mesa_function_pool[21836]: Fogiv (offset 156) */
+ /* _mesa_function_pool[21921]: Fogiv (offset 156) */
"ip\0"
"glFogiv\0"
"\0"
- /* _mesa_function_pool[21848]: TexCoord1dv (offset 95) */
+ /* _mesa_function_pool[21933]: TexCoord1dv (offset 95) */
"p\0"
"glTexCoord1dv\0"
"\0"
- /* _mesa_function_pool[21865]: AlphaFragmentOp3ATI (will be remapped) */
+ /* _mesa_function_pool[21950]: AlphaFragmentOp3ATI (will be remapped) */
"iiiiiiiiiiii\0"
"glAlphaFragmentOp3ATI\0"
"\0"
- /* _mesa_function_pool[21901]: PixelTransferi (offset 248) */
+ /* _mesa_function_pool[21986]: PixelTransferi (offset 248) */
"ii\0"
"glPixelTransferi\0"
"\0"
- /* _mesa_function_pool[21922]: GetVertexAttribdvNV (will be remapped) */
+ /* _mesa_function_pool[22007]: GetVertexAttribdvNV (will be remapped) */
"iip\0"
"glGetVertexAttribdvNV\0"
"\0"
- /* _mesa_function_pool[21949]: VertexAttrib3fvNV (will be remapped) */
+ /* _mesa_function_pool[22034]: VertexAttrib3fvNV (will be remapped) */
"ip\0"
"glVertexAttrib3fvNV\0"
"\0"
- /* _mesa_function_pool[21973]: Rotatef (offset 300) */
+ /* _mesa_function_pool[22058]: Rotatef (offset 300) */
"ffff\0"
"glRotatef\0"
"\0"
- /* _mesa_function_pool[21989]: GetFinalCombinerInputParameterivNV (will be remapped) */
+ /* _mesa_function_pool[22074]: GetFinalCombinerInputParameterivNV (will be remapped) */
"iip\0"
"glGetFinalCombinerInputParameterivNV\0"
"\0"
- /* _mesa_function_pool[22031]: Vertex3i (offset 138) */
+ /* _mesa_function_pool[22116]: Vertex3i (offset 138) */
"iii\0"
"glVertex3i\0"
"\0"
- /* _mesa_function_pool[22047]: Vertex3f (offset 136) */
+ /* _mesa_function_pool[22132]: Vertex3f (offset 136) */
"fff\0"
"glVertex3f\0"
"\0"
- /* _mesa_function_pool[22063]: Clear (offset 203) */
+ /* _mesa_function_pool[22148]: Clear (offset 203) */
"i\0"
"glClear\0"
"\0"
- /* _mesa_function_pool[22074]: Vertex3d (offset 134) */
+ /* _mesa_function_pool[22159]: Vertex3d (offset 134) */
"ddd\0"
"glVertex3d\0"
"\0"
- /* _mesa_function_pool[22090]: GetMapParameterivNV (dynamic) */
+ /* _mesa_function_pool[22175]: GetMapParameterivNV (dynamic) */
"iip\0"
"glGetMapParameterivNV\0"
"\0"
- /* _mesa_function_pool[22117]: Uniform4iARB (will be remapped) */
+ /* _mesa_function_pool[22202]: Uniform4iARB (will be remapped) */
"iiiii\0"
"glUniform4i\0"
"glUniform4iARB\0"
"\0"
- /* _mesa_function_pool[22151]: ReadBuffer (offset 254) */
+ /* _mesa_function_pool[22236]: ReadBuffer (offset 254) */
"i\0"
"glReadBuffer\0"
"\0"
- /* _mesa_function_pool[22167]: ConvolutionParameteri (offset 352) */
+ /* _mesa_function_pool[22252]: ConvolutionParameteri (offset 352) */
"iii\0"
"glConvolutionParameteri\0"
"glConvolutionParameteriEXT\0"
"\0"
- /* _mesa_function_pool[22223]: Ortho (offset 296) */
+ /* _mesa_function_pool[22308]: Ortho (offset 296) */
"dddddd\0"
"glOrtho\0"
"\0"
- /* _mesa_function_pool[22239]: Binormal3sEXT (dynamic) */
+ /* _mesa_function_pool[22324]: Binormal3sEXT (dynamic) */
"iii\0"
"glBinormal3sEXT\0"
"\0"
- /* _mesa_function_pool[22260]: ListBase (offset 6) */
+ /* _mesa_function_pool[22345]: ListBase (offset 6) */
"i\0"
"glListBase\0"
"\0"
- /* _mesa_function_pool[22274]: Vertex3s (offset 140) */
+ /* _mesa_function_pool[22359]: Vertex3s (offset 140) */
"iii\0"
"glVertex3s\0"
"\0"
- /* _mesa_function_pool[22290]: ConvolutionParameterf (offset 350) */
+ /* _mesa_function_pool[22375]: ConvolutionParameterf (offset 350) */
"iif\0"
"glConvolutionParameterf\0"
"glConvolutionParameterfEXT\0"
"\0"
- /* _mesa_function_pool[22346]: GetColorTableParameteriv (offset 345) */
+ /* _mesa_function_pool[22431]: GetColorTableParameteriv (offset 345) */
"iip\0"
"glGetColorTableParameteriv\0"
"glGetColorTableParameterivSGI\0"
"glGetColorTableParameterivEXT\0"
"\0"
- /* _mesa_function_pool[22438]: ProgramEnvParameter4dvARB (will be remapped) */
+ /* _mesa_function_pool[22523]: ProgramEnvParameter4dvARB (will be remapped) */
"iip\0"
"glProgramEnvParameter4dvARB\0"
"glProgramParameter4dvNV\0"
"\0"
- /* _mesa_function_pool[22495]: ShadeModel (offset 177) */
+ /* _mesa_function_pool[22580]: ShadeModel (offset 177) */
"i\0"
"glShadeModel\0"
"\0"
- /* _mesa_function_pool[22511]: VertexAttribs2fvNV (will be remapped) */
+ /* _mesa_function_pool[22596]: VertexAttribs2fvNV (will be remapped) */
"iip\0"
"glVertexAttribs2fvNV\0"
"\0"
- /* _mesa_function_pool[22537]: Rectiv (offset 91) */
+ /* _mesa_function_pool[22622]: Rectiv (offset 91) */
"pp\0"
"glRectiv\0"
"\0"
- /* _mesa_function_pool[22550]: UseProgramObjectARB (will be remapped) */
+ /* _mesa_function_pool[22635]: UseProgramObjectARB (will be remapped) */
"i\0"
"glUseProgram\0"
"glUseProgramObjectARB\0"
"\0"
- /* _mesa_function_pool[22588]: GetMapParameterfvNV (dynamic) */
+ /* _mesa_function_pool[22673]: GetMapParameterfvNV (dynamic) */
"iip\0"
"glGetMapParameterfvNV\0"
"\0"
- /* _mesa_function_pool[22615]: EndConditionalRenderNV (will be remapped) */
+ /* _mesa_function_pool[22700]: EndConditionalRenderNV (will be remapped) */
"\0"
"glEndConditionalRenderNV\0"
"\0"
- /* _mesa_function_pool[22642]: PassTexCoordATI (will be remapped) */
+ /* _mesa_function_pool[22727]: PassTexCoordATI (will be remapped) */
"iii\0"
"glPassTexCoordATI\0"
"\0"
- /* _mesa_function_pool[22665]: DeleteProgram (will be remapped) */
+ /* _mesa_function_pool[22750]: DeleteProgram (will be remapped) */
"i\0"
"glDeleteProgram\0"
"\0"
- /* _mesa_function_pool[22684]: Tangent3ivEXT (dynamic) */
+ /* _mesa_function_pool[22769]: Tangent3ivEXT (dynamic) */
"p\0"
"glTangent3ivEXT\0"
"\0"
- /* _mesa_function_pool[22703]: Tangent3dEXT (dynamic) */
+ /* _mesa_function_pool[22788]: Tangent3dEXT (dynamic) */
"ddd\0"
"glTangent3dEXT\0"
"\0"
- /* _mesa_function_pool[22723]: SecondaryColor3dvEXT (will be remapped) */
+ /* _mesa_function_pool[22808]: SecondaryColor3dvEXT (will be remapped) */
"p\0"
"glSecondaryColor3dv\0"
"glSecondaryColor3dvEXT\0"
"\0"
- /* _mesa_function_pool[22769]: Vertex2fv (offset 129) */
+ /* _mesa_function_pool[22854]: Vertex2fv (offset 129) */
"p\0"
"glVertex2fv\0"
"\0"
- /* _mesa_function_pool[22784]: MultiDrawArraysEXT (will be remapped) */
+ /* _mesa_function_pool[22869]: MultiDrawArraysEXT (will be remapped) */
"ippi\0"
"glMultiDrawArrays\0"
"glMultiDrawArraysEXT\0"
"\0"
- /* _mesa_function_pool[22829]: BindRenderbufferEXT (will be remapped) */
+ /* _mesa_function_pool[22914]: BindRenderbufferEXT (will be remapped) */
"ii\0"
"glBindRenderbuffer\0"
"glBindRenderbufferEXT\0"
"\0"
- /* _mesa_function_pool[22874]: MultiTexCoord4dARB (offset 400) */
+ /* _mesa_function_pool[22959]: MultiTexCoord4dARB (offset 400) */
"idddd\0"
"glMultiTexCoord4d\0"
"glMultiTexCoord4dARB\0"
"\0"
- /* _mesa_function_pool[22920]: Vertex3sv (offset 141) */
+ /* _mesa_function_pool[23005]: Vertex3sv (offset 141) */
"p\0"
"glVertex3sv\0"
"\0"
- /* _mesa_function_pool[22935]: SecondaryColor3usEXT (will be remapped) */
+ /* _mesa_function_pool[23020]: SecondaryColor3usEXT (will be remapped) */
"iii\0"
"glSecondaryColor3us\0"
"glSecondaryColor3usEXT\0"
"\0"
- /* _mesa_function_pool[22983]: ProgramLocalParameter4fvARB (will be remapped) */
+ /* _mesa_function_pool[23068]: ProgramLocalParameter4fvARB (will be remapped) */
"iip\0"
"glProgramLocalParameter4fvARB\0"
"\0"
- /* _mesa_function_pool[23018]: DeleteProgramsNV (will be remapped) */
+ /* _mesa_function_pool[23103]: DeleteProgramsNV (will be remapped) */
"ip\0"
"glDeleteProgramsARB\0"
"glDeleteProgramsNV\0"
"\0"
- /* _mesa_function_pool[23061]: EvalMesh1 (offset 236) */
+ /* _mesa_function_pool[23146]: EvalMesh1 (offset 236) */
"iii\0"
"glEvalMesh1\0"
"\0"
- /* _mesa_function_pool[23078]: MultiTexCoord1sARB (offset 382) */
+ /* _mesa_function_pool[23163]: MultiTexCoord1sARB (offset 382) */
"ii\0"
"glMultiTexCoord1s\0"
"glMultiTexCoord1sARB\0"
"\0"
- /* _mesa_function_pool[23121]: ReplacementCodeuiColor3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[23206]: ReplacementCodeuiColor3fVertex3fSUN (dynamic) */
"iffffff\0"
"glReplacementCodeuiColor3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[23168]: GetVertexAttribPointervNV (will be remapped) */
+ /* _mesa_function_pool[23253]: GetVertexAttribPointervNV (will be remapped) */
"iip\0"
"glGetVertexAttribPointerv\0"
"glGetVertexAttribPointervARB\0"
"glGetVertexAttribPointervNV\0"
"\0"
- /* _mesa_function_pool[23256]: DisableIndexedEXT (will be remapped) */
+ /* _mesa_function_pool[23341]: DisableIndexedEXT (will be remapped) */
"ii\0"
"glDisableIndexedEXT\0"
"\0"
- /* _mesa_function_pool[23280]: MultiTexCoord1dvARB (offset 377) */
+ /* _mesa_function_pool[23365]: MultiTexCoord1dvARB (offset 377) */
"ip\0"
"glMultiTexCoord1dv\0"
"glMultiTexCoord1dvARB\0"
"\0"
- /* _mesa_function_pool[23325]: Uniform2iARB (will be remapped) */
+ /* _mesa_function_pool[23410]: Uniform2iARB (will be remapped) */
"iii\0"
"glUniform2i\0"
"glUniform2iARB\0"
"\0"
- /* _mesa_function_pool[23357]: Vertex2iv (offset 131) */
+ /* _mesa_function_pool[23442]: Vertex2iv (offset 131) */
"p\0"
"glVertex2iv\0"
"\0"
- /* _mesa_function_pool[23372]: GetProgramStringNV (will be remapped) */
+ /* _mesa_function_pool[23457]: GetProgramStringNV (will be remapped) */
"iip\0"
"glGetProgramStringNV\0"
"\0"
- /* _mesa_function_pool[23398]: ColorPointerEXT (will be remapped) */
+ /* _mesa_function_pool[23483]: ColorPointerEXT (will be remapped) */
"iiiip\0"
"glColorPointerEXT\0"
"\0"
- /* _mesa_function_pool[23423]: LineWidth (offset 168) */
+ /* _mesa_function_pool[23508]: LineWidth (offset 168) */
"f\0"
"glLineWidth\0"
"\0"
- /* _mesa_function_pool[23438]: MapBufferARB (will be remapped) */
+ /* _mesa_function_pool[23523]: MapBufferARB (will be remapped) */
"ii\0"
"glMapBuffer\0"
"glMapBufferARB\0"
"\0"
- /* _mesa_function_pool[23469]: MultiDrawElementsBaseVertex (will be remapped) */
+ /* _mesa_function_pool[23554]: MultiDrawElementsBaseVertex (will be remapped) */
"ipipip\0"
"glMultiDrawElementsBaseVertex\0"
"\0"
- /* _mesa_function_pool[23507]: Binormal3svEXT (dynamic) */
+ /* _mesa_function_pool[23592]: Binormal3svEXT (dynamic) */
"p\0"
"glBinormal3svEXT\0"
"\0"
- /* _mesa_function_pool[23527]: ApplyTextureEXT (dynamic) */
+ /* _mesa_function_pool[23612]: ApplyTextureEXT (dynamic) */
"i\0"
"glApplyTextureEXT\0"
"\0"
- /* _mesa_function_pool[23548]: TexGendv (offset 189) */
+ /* _mesa_function_pool[23633]: TexGendv (offset 189) */
"iip\0"
"glTexGendv\0"
"\0"
- /* _mesa_function_pool[23564]: EnableIndexedEXT (will be remapped) */
+ /* _mesa_function_pool[23649]: EnableIndexedEXT (will be remapped) */
"ii\0"
"glEnableIndexedEXT\0"
"\0"
- /* _mesa_function_pool[23587]: TextureMaterialEXT (dynamic) */
+ /* _mesa_function_pool[23672]: TextureMaterialEXT (dynamic) */
"ii\0"
"glTextureMaterialEXT\0"
"\0"
- /* _mesa_function_pool[23612]: TextureLightEXT (dynamic) */
+ /* _mesa_function_pool[23697]: TextureLightEXT (dynamic) */
"i\0"
"glTextureLightEXT\0"
"\0"
- /* _mesa_function_pool[23633]: ResetMinmax (offset 370) */
+ /* _mesa_function_pool[23718]: ResetMinmax (offset 370) */
"i\0"
"glResetMinmax\0"
"glResetMinmaxEXT\0"
"\0"
- /* _mesa_function_pool[23667]: SpriteParameterfSGIX (dynamic) */
+ /* _mesa_function_pool[23752]: SpriteParameterfSGIX (dynamic) */
"if\0"
"glSpriteParameterfSGIX\0"
"\0"
- /* _mesa_function_pool[23694]: EnableClientState (offset 313) */
+ /* _mesa_function_pool[23779]: EnableClientState (offset 313) */
"i\0"
"glEnableClientState\0"
"\0"
- /* _mesa_function_pool[23717]: VertexAttrib4sNV (will be remapped) */
+ /* _mesa_function_pool[23802]: VertexAttrib4sNV (will be remapped) */
"iiiii\0"
"glVertexAttrib4sNV\0"
"\0"
- /* _mesa_function_pool[23743]: GetConvolutionParameterfv (offset 357) */
+ /* _mesa_function_pool[23828]: GetConvolutionParameterfv (offset 357) */
"iip\0"
"glGetConvolutionParameterfv\0"
"glGetConvolutionParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[23807]: VertexAttribs4dvNV (will be remapped) */
+ /* _mesa_function_pool[23892]: VertexAttribs4dvNV (will be remapped) */
"iip\0"
"glVertexAttribs4dvNV\0"
"\0"
- /* _mesa_function_pool[23833]: MultiModeDrawArraysIBM (will be remapped) */
- "pppii\0"
- "glMultiModeDrawArraysIBM\0"
- "\0"
- /* _mesa_function_pool[23865]: VertexAttrib4dARB (will be remapped) */
+ /* _mesa_function_pool[23918]: VertexAttrib4dARB (will be remapped) */
"idddd\0"
"glVertexAttrib4d\0"
"glVertexAttrib4dARB\0"
"\0"
- /* _mesa_function_pool[23909]: GetTexBumpParameterfvATI (will be remapped) */
+ /* _mesa_function_pool[23962]: GetTexBumpParameterfvATI (will be remapped) */
"ip\0"
"glGetTexBumpParameterfvATI\0"
"\0"
- /* _mesa_function_pool[23940]: ProgramNamedParameter4dNV (will be remapped) */
+ /* _mesa_function_pool[23993]: ProgramNamedParameter4dNV (will be remapped) */
"iipdddd\0"
"glProgramNamedParameter4dNV\0"
"\0"
- /* _mesa_function_pool[23977]: GetMaterialfv (offset 269) */
+ /* _mesa_function_pool[24030]: GetMaterialfv (offset 269) */
"iip\0"
"glGetMaterialfv\0"
"\0"
- /* _mesa_function_pool[23998]: VertexWeightfEXT (dynamic) */
+ /* _mesa_function_pool[24051]: VertexWeightfEXT (dynamic) */
"f\0"
"glVertexWeightfEXT\0"
"\0"
- /* _mesa_function_pool[24020]: Binormal3fEXT (dynamic) */
+ /* _mesa_function_pool[24073]: Binormal3fEXT (dynamic) */
"fff\0"
"glBinormal3fEXT\0"
"\0"
- /* _mesa_function_pool[24041]: CallList (offset 2) */
+ /* _mesa_function_pool[24094]: CallList (offset 2) */
"i\0"
"glCallList\0"
"\0"
- /* _mesa_function_pool[24055]: Materialfv (offset 170) */
+ /* _mesa_function_pool[24108]: Materialfv (offset 170) */
"iip\0"
"glMaterialfv\0"
"\0"
- /* _mesa_function_pool[24073]: TexCoord3fv (offset 113) */
+ /* _mesa_function_pool[24126]: TexCoord3fv (offset 113) */
"p\0"
"glTexCoord3fv\0"
"\0"
- /* _mesa_function_pool[24090]: FogCoordfvEXT (will be remapped) */
+ /* _mesa_function_pool[24143]: FogCoordfvEXT (will be remapped) */
"p\0"
"glFogCoordfv\0"
"glFogCoordfvEXT\0"
"\0"
- /* _mesa_function_pool[24122]: MultiTexCoord1ivARB (offset 381) */
+ /* _mesa_function_pool[24175]: MultiTexCoord1ivARB (offset 381) */
"ip\0"
"glMultiTexCoord1iv\0"
"glMultiTexCoord1ivARB\0"
"\0"
- /* _mesa_function_pool[24167]: SecondaryColor3ubEXT (will be remapped) */
+ /* _mesa_function_pool[24220]: SecondaryColor3ubEXT (will be remapped) */
"iii\0"
"glSecondaryColor3ub\0"
"glSecondaryColor3ubEXT\0"
"\0"
- /* _mesa_function_pool[24215]: MultiTexCoord2ivARB (offset 389) */
+ /* _mesa_function_pool[24268]: MultiTexCoord2ivARB (offset 389) */
"ip\0"
"glMultiTexCoord2iv\0"
"glMultiTexCoord2ivARB\0"
"\0"
- /* _mesa_function_pool[24260]: FogFuncSGIS (dynamic) */
+ /* _mesa_function_pool[24313]: FogFuncSGIS (dynamic) */
"ip\0"
"glFogFuncSGIS\0"
"\0"
- /* _mesa_function_pool[24278]: CopyTexSubImage2D (offset 326) */
+ /* _mesa_function_pool[24331]: CopyTexSubImage2D (offset 326) */
"iiiiiiii\0"
"glCopyTexSubImage2D\0"
"glCopyTexSubImage2DEXT\0"
"\0"
- /* _mesa_function_pool[24331]: GetObjectParameterivARB (will be remapped) */
+ /* _mesa_function_pool[24384]: GetObjectParameterivARB (will be remapped) */
"iip\0"
"glGetObjectParameterivARB\0"
"\0"
- /* _mesa_function_pool[24362]: Color3iv (offset 16) */
+ /* _mesa_function_pool[24415]: Color3iv (offset 16) */
"p\0"
"glColor3iv\0"
"\0"
- /* _mesa_function_pool[24376]: TexCoord4fVertex4fSUN (dynamic) */
+ /* _mesa_function_pool[24429]: TexCoord4fVertex4fSUN (dynamic) */
"ffffffff\0"
"glTexCoord4fVertex4fSUN\0"
"\0"
- /* _mesa_function_pool[24410]: DrawElements (offset 311) */
+ /* _mesa_function_pool[24463]: DrawElements (offset 311) */
"iiip\0"
"glDrawElements\0"
"\0"
- /* _mesa_function_pool[24431]: BindVertexArrayAPPLE (will be remapped) */
+ /* _mesa_function_pool[24484]: BindVertexArrayAPPLE (will be remapped) */
"i\0"
"glBindVertexArrayAPPLE\0"
"\0"
- /* _mesa_function_pool[24457]: GetProgramLocalParameterdvARB (will be remapped) */
+ /* _mesa_function_pool[24510]: GetProgramLocalParameterdvARB (will be remapped) */
"iip\0"
"glGetProgramLocalParameterdvARB\0"
"\0"
- /* _mesa_function_pool[24494]: GetHistogramParameteriv (offset 363) */
+ /* _mesa_function_pool[24547]: GetHistogramParameteriv (offset 363) */
"iip\0"
"glGetHistogramParameteriv\0"
"glGetHistogramParameterivEXT\0"
"\0"
- /* _mesa_function_pool[24554]: MultiTexCoord1iARB (offset 380) */
+ /* _mesa_function_pool[24607]: MultiTexCoord1iARB (offset 380) */
"ii\0"
"glMultiTexCoord1i\0"
"glMultiTexCoord1iARB\0"
"\0"
- /* _mesa_function_pool[24597]: GetConvolutionFilter (offset 356) */
+ /* _mesa_function_pool[24650]: GetConvolutionFilter (offset 356) */
"iiip\0"
"glGetConvolutionFilter\0"
"glGetConvolutionFilterEXT\0"
"\0"
- /* _mesa_function_pool[24652]: GetProgramivARB (will be remapped) */
+ /* _mesa_function_pool[24705]: GetProgramivARB (will be remapped) */
"iip\0"
"glGetProgramivARB\0"
"\0"
- /* _mesa_function_pool[24675]: BlendFuncSeparateEXT (will be remapped) */
+ /* _mesa_function_pool[24728]: BlendFuncSeparateEXT (will be remapped) */
"iiii\0"
"glBlendFuncSeparate\0"
"glBlendFuncSeparateEXT\0"
"glBlendFuncSeparateINGR\0"
"\0"
- /* _mesa_function_pool[24748]: MapBufferRange (will be remapped) */
+ /* _mesa_function_pool[24801]: MapBufferRange (will be remapped) */
"iiii\0"
"glMapBufferRange\0"
"\0"
- /* _mesa_function_pool[24771]: ProgramParameters4dvNV (will be remapped) */
+ /* _mesa_function_pool[24824]: ProgramParameters4dvNV (will be remapped) */
"iiip\0"
"glProgramParameters4dvNV\0"
"\0"
- /* _mesa_function_pool[24802]: TexCoord2fColor3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[24855]: TexCoord2fColor3fVertex3fvSUN (dynamic) */
"ppp\0"
"glTexCoord2fColor3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[24839]: EvalPoint2 (offset 239) */
+ /* _mesa_function_pool[24892]: EvalPoint2 (offset 239) */
"ii\0"
"glEvalPoint2\0"
"\0"
- /* _mesa_function_pool[24856]: EvalPoint1 (offset 237) */
+ /* _mesa_function_pool[24909]: EvalPoint1 (offset 237) */
"i\0"
"glEvalPoint1\0"
"\0"
- /* _mesa_function_pool[24872]: Binormal3dvEXT (dynamic) */
+ /* _mesa_function_pool[24925]: Binormal3dvEXT (dynamic) */
"p\0"
"glBinormal3dvEXT\0"
"\0"
- /* _mesa_function_pool[24892]: PopMatrix (offset 297) */
+ /* _mesa_function_pool[24945]: PopMatrix (offset 297) */
"\0"
"glPopMatrix\0"
"\0"
- /* _mesa_function_pool[24906]: FinishFenceNV (will be remapped) */
+ /* _mesa_function_pool[24959]: FinishFenceNV (will be remapped) */
"i\0"
"glFinishFenceNV\0"
"\0"
- /* _mesa_function_pool[24925]: GetFogFuncSGIS (dynamic) */
+ /* _mesa_function_pool[24978]: GetFogFuncSGIS (dynamic) */
"p\0"
"glGetFogFuncSGIS\0"
"\0"
- /* _mesa_function_pool[24945]: GetUniformLocationARB (will be remapped) */
+ /* _mesa_function_pool[24998]: GetUniformLocationARB (will be remapped) */
"ip\0"
"glGetUniformLocation\0"
"glGetUniformLocationARB\0"
"\0"
- /* _mesa_function_pool[24994]: SecondaryColor3fEXT (will be remapped) */
+ /* _mesa_function_pool[25047]: SecondaryColor3fEXT (will be remapped) */
"fff\0"
"glSecondaryColor3f\0"
"glSecondaryColor3fEXT\0"
"\0"
- /* _mesa_function_pool[25040]: GetTexGeniv (offset 280) */
+ /* _mesa_function_pool[25093]: GetTexGeniv (offset 280) */
"iip\0"
"glGetTexGeniv\0"
"\0"
- /* _mesa_function_pool[25059]: CombinerInputNV (will be remapped) */
+ /* _mesa_function_pool[25112]: CombinerInputNV (will be remapped) */
"iiiiii\0"
"glCombinerInputNV\0"
"\0"
- /* _mesa_function_pool[25085]: VertexAttrib3sARB (will be remapped) */
+ /* _mesa_function_pool[25138]: VertexAttrib3sARB (will be remapped) */
"iiii\0"
"glVertexAttrib3s\0"
"glVertexAttrib3sARB\0"
"\0"
- /* _mesa_function_pool[25128]: ReplacementCodeuiNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[25181]: ReplacementCodeuiNormal3fVertex3fvSUN (dynamic) */
"ppp\0"
"glReplacementCodeuiNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[25173]: Map2d (offset 222) */
+ /* _mesa_function_pool[25226]: Map2d (offset 222) */
"iddiiddiip\0"
"glMap2d\0"
"\0"
- /* _mesa_function_pool[25193]: Map2f (offset 223) */
+ /* _mesa_function_pool[25246]: Map2f (offset 223) */
"iffiiffiip\0"
"glMap2f\0"
"\0"
- /* _mesa_function_pool[25213]: ProgramStringARB (will be remapped) */
+ /* _mesa_function_pool[25266]: ProgramStringARB (will be remapped) */
"iiip\0"
"glProgramStringARB\0"
"\0"
- /* _mesa_function_pool[25238]: Vertex4s (offset 148) */
+ /* _mesa_function_pool[25291]: Vertex4s (offset 148) */
"iiii\0"
"glVertex4s\0"
"\0"
- /* _mesa_function_pool[25255]: TexCoord4fVertex4fvSUN (dynamic) */
+ /* _mesa_function_pool[25308]: TexCoord4fVertex4fvSUN (dynamic) */
"pp\0"
"glTexCoord4fVertex4fvSUN\0"
"\0"
- /* _mesa_function_pool[25284]: VertexAttrib3sNV (will be remapped) */
+ /* _mesa_function_pool[25337]: VertexAttrib3sNV (will be remapped) */
"iiii\0"
"glVertexAttrib3sNV\0"
"\0"
- /* _mesa_function_pool[25309]: VertexAttrib1fNV (will be remapped) */
+ /* _mesa_function_pool[25362]: VertexAttrib1fNV (will be remapped) */
"if\0"
"glVertexAttrib1fNV\0"
"\0"
- /* _mesa_function_pool[25332]: Vertex4f (offset 144) */
+ /* _mesa_function_pool[25385]: Vertex4f (offset 144) */
"ffff\0"
"glVertex4f\0"
"\0"
- /* _mesa_function_pool[25349]: EvalCoord1d (offset 228) */
+ /* _mesa_function_pool[25402]: EvalCoord1d (offset 228) */
"d\0"
"glEvalCoord1d\0"
"\0"
- /* _mesa_function_pool[25366]: Vertex4d (offset 142) */
+ /* _mesa_function_pool[25419]: Vertex4d (offset 142) */
"dddd\0"
"glVertex4d\0"
"\0"
- /* _mesa_function_pool[25383]: RasterPos4dv (offset 79) */
+ /* _mesa_function_pool[25436]: RasterPos4dv (offset 79) */
"p\0"
"glRasterPos4dv\0"
"\0"
- /* _mesa_function_pool[25401]: FragmentLightfSGIX (dynamic) */
+ /* _mesa_function_pool[25454]: FragmentLightfSGIX (dynamic) */
"iif\0"
"glFragmentLightfSGIX\0"
"\0"
- /* _mesa_function_pool[25427]: GetCompressedTexImageARB (will be remapped) */
+ /* _mesa_function_pool[25480]: GetCompressedTexImageARB (will be remapped) */
"iip\0"
"glGetCompressedTexImage\0"
"glGetCompressedTexImageARB\0"
"\0"
- /* _mesa_function_pool[25483]: GetTexGenfv (offset 279) */
+ /* _mesa_function_pool[25536]: GetTexGenfv (offset 279) */
"iip\0"
"glGetTexGenfv\0"
"\0"
- /* _mesa_function_pool[25502]: Vertex4i (offset 146) */
+ /* _mesa_function_pool[25555]: Vertex4i (offset 146) */
"iiii\0"
"glVertex4i\0"
"\0"
- /* _mesa_function_pool[25519]: VertexWeightPointerEXT (dynamic) */
+ /* _mesa_function_pool[25572]: VertexWeightPointerEXT (dynamic) */
"iiip\0"
"glVertexWeightPointerEXT\0"
"\0"
- /* _mesa_function_pool[25550]: GetHistogram (offset 361) */
+ /* _mesa_function_pool[25603]: GetHistogram (offset 361) */
"iiiip\0"
"glGetHistogram\0"
"glGetHistogramEXT\0"
"\0"
- /* _mesa_function_pool[25590]: ActiveStencilFaceEXT (will be remapped) */
+ /* _mesa_function_pool[25643]: ActiveStencilFaceEXT (will be remapped) */
"i\0"
"glActiveStencilFaceEXT\0"
"\0"
- /* _mesa_function_pool[25616]: StencilFuncSeparateATI (will be remapped) */
+ /* _mesa_function_pool[25669]: StencilFuncSeparateATI (will be remapped) */
"iiii\0"
"glStencilFuncSeparateATI\0"
"\0"
- /* _mesa_function_pool[25647]: Materialf (offset 169) */
+ /* _mesa_function_pool[25700]: Materialf (offset 169) */
"iif\0"
"glMaterialf\0"
"\0"
- /* _mesa_function_pool[25664]: GetShaderSourceARB (will be remapped) */
+ /* _mesa_function_pool[25717]: GetShaderSourceARB (will be remapped) */
"iipp\0"
"glGetShaderSource\0"
"glGetShaderSourceARB\0"
"\0"
- /* _mesa_function_pool[25709]: IglooInterfaceSGIX (dynamic) */
+ /* _mesa_function_pool[25762]: IglooInterfaceSGIX (dynamic) */
"ip\0"
"glIglooInterfaceSGIX\0"
"\0"
- /* _mesa_function_pool[25734]: Materiali (offset 171) */
+ /* _mesa_function_pool[25787]: Materiali (offset 171) */
"iii\0"
"glMateriali\0"
"\0"
- /* _mesa_function_pool[25751]: VertexAttrib4dNV (will be remapped) */
+ /* _mesa_function_pool[25804]: VertexAttrib4dNV (will be remapped) */
"idddd\0"
"glVertexAttrib4dNV\0"
"\0"
- /* _mesa_function_pool[25777]: MultiModeDrawElementsIBM (will be remapped) */
+ /* _mesa_function_pool[25830]: MultiModeDrawElementsIBM (will be remapped) */
"ppipii\0"
"glMultiModeDrawElementsIBM\0"
"\0"
- /* _mesa_function_pool[25812]: Indexsv (offset 51) */
+ /* _mesa_function_pool[25865]: Indexsv (offset 51) */
"p\0"
"glIndexsv\0"
"\0"
- /* _mesa_function_pool[25825]: MultiTexCoord4svARB (offset 407) */
+ /* _mesa_function_pool[25878]: MultiTexCoord4svARB (offset 407) */
"ip\0"
"glMultiTexCoord4sv\0"
"glMultiTexCoord4svARB\0"
"\0"
- /* _mesa_function_pool[25870]: LightModelfv (offset 164) */
+ /* _mesa_function_pool[25923]: LightModelfv (offset 164) */
"ip\0"
"glLightModelfv\0"
"\0"
- /* _mesa_function_pool[25889]: TexCoord2dv (offset 103) */
+ /* _mesa_function_pool[25942]: TexCoord2dv (offset 103) */
"p\0"
"glTexCoord2dv\0"
"\0"
- /* _mesa_function_pool[25906]: GenQueriesARB (will be remapped) */
+ /* _mesa_function_pool[25959]: GenQueriesARB (will be remapped) */
"ip\0"
"glGenQueries\0"
"glGenQueriesARB\0"
"\0"
- /* _mesa_function_pool[25939]: EvalCoord1dv (offset 229) */
+ /* _mesa_function_pool[25992]: EvalCoord1dv (offset 229) */
"p\0"
"glEvalCoord1dv\0"
"\0"
- /* _mesa_function_pool[25957]: ReplacementCodeuiVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[26010]: ReplacementCodeuiVertex3fSUN (dynamic) */
"ifff\0"
"glReplacementCodeuiVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[25994]: Translated (offset 303) */
+ /* _mesa_function_pool[26047]: Translated (offset 303) */
"ddd\0"
"glTranslated\0"
"\0"
- /* _mesa_function_pool[26012]: Translatef (offset 304) */
+ /* _mesa_function_pool[26065]: Translatef (offset 304) */
"fff\0"
"glTranslatef\0"
"\0"
- /* _mesa_function_pool[26030]: StencilMask (offset 209) */
+ /* _mesa_function_pool[26083]: StencilMask (offset 209) */
"i\0"
"glStencilMask\0"
"\0"
- /* _mesa_function_pool[26047]: Tangent3iEXT (dynamic) */
+ /* _mesa_function_pool[26100]: Tangent3iEXT (dynamic) */
"iii\0"
"glTangent3iEXT\0"
"\0"
- /* _mesa_function_pool[26067]: GetLightiv (offset 265) */
+ /* _mesa_function_pool[26120]: GetLightiv (offset 265) */
"iip\0"
"glGetLightiv\0"
"\0"
- /* _mesa_function_pool[26085]: DrawMeshArraysSUN (dynamic) */
+ /* _mesa_function_pool[26138]: DrawMeshArraysSUN (dynamic) */
"iiii\0"
"glDrawMeshArraysSUN\0"
"\0"
- /* _mesa_function_pool[26111]: IsList (offset 287) */
+ /* _mesa_function_pool[26164]: IsList (offset 287) */
"i\0"
"glIsList\0"
"\0"
- /* _mesa_function_pool[26123]: IsSync (will be remapped) */
+ /* _mesa_function_pool[26176]: IsSync (will be remapped) */
"i\0"
"glIsSync\0"
"\0"
- /* _mesa_function_pool[26135]: RenderMode (offset 196) */
+ /* _mesa_function_pool[26188]: RenderMode (offset 196) */
"i\0"
"glRenderMode\0"
"\0"
- /* _mesa_function_pool[26151]: GetMapControlPointsNV (dynamic) */
+ /* _mesa_function_pool[26204]: GetMapControlPointsNV (dynamic) */
"iiiiiip\0"
"glGetMapControlPointsNV\0"
"\0"
- /* _mesa_function_pool[26184]: DrawBuffersARB (will be remapped) */
+ /* _mesa_function_pool[26237]: DrawBuffersARB (will be remapped) */
"ip\0"
"glDrawBuffers\0"
"glDrawBuffersARB\0"
"glDrawBuffersATI\0"
"\0"
- /* _mesa_function_pool[26236]: ProgramLocalParameter4fARB (will be remapped) */
+ /* _mesa_function_pool[26289]: ProgramLocalParameter4fARB (will be remapped) */
"iiffff\0"
"glProgramLocalParameter4fARB\0"
"\0"
- /* _mesa_function_pool[26273]: SpriteParameterivSGIX (dynamic) */
+ /* _mesa_function_pool[26326]: SpriteParameterivSGIX (dynamic) */
"ip\0"
"glSpriteParameterivSGIX\0"
"\0"
- /* _mesa_function_pool[26301]: ProvokingVertexEXT (will be remapped) */
+ /* _mesa_function_pool[26354]: ProvokingVertexEXT (will be remapped) */
"i\0"
"glProvokingVertexEXT\0"
"glProvokingVertex\0"
"\0"
- /* _mesa_function_pool[26343]: MultiTexCoord1fARB (offset 378) */
+ /* _mesa_function_pool[26396]: MultiTexCoord1fARB (offset 378) */
"if\0"
"glMultiTexCoord1f\0"
"glMultiTexCoord1fARB\0"
"\0"
- /* _mesa_function_pool[26386]: LoadName (offset 198) */
+ /* _mesa_function_pool[26439]: LoadName (offset 198) */
"i\0"
"glLoadName\0"
"\0"
- /* _mesa_function_pool[26400]: VertexAttribs4ubvNV (will be remapped) */
+ /* _mesa_function_pool[26453]: VertexAttribs4ubvNV (will be remapped) */
"iip\0"
"glVertexAttribs4ubvNV\0"
"\0"
- /* _mesa_function_pool[26427]: WeightsvARB (dynamic) */
+ /* _mesa_function_pool[26480]: WeightsvARB (dynamic) */
"ip\0"
"glWeightsvARB\0"
"\0"
- /* _mesa_function_pool[26445]: Uniform1fvARB (will be remapped) */
+ /* _mesa_function_pool[26498]: Uniform1fvARB (will be remapped) */
"iip\0"
"glUniform1fv\0"
"glUniform1fvARB\0"
"\0"
- /* _mesa_function_pool[26479]: CopyTexSubImage1D (offset 325) */
+ /* _mesa_function_pool[26532]: CopyTexSubImage1D (offset 325) */
"iiiiii\0"
"glCopyTexSubImage1D\0"
"glCopyTexSubImage1DEXT\0"
"\0"
- /* _mesa_function_pool[26530]: CullFace (offset 152) */
+ /* _mesa_function_pool[26583]: CullFace (offset 152) */
"i\0"
"glCullFace\0"
"\0"
- /* _mesa_function_pool[26544]: BindTexture (offset 307) */
+ /* _mesa_function_pool[26597]: BindTexture (offset 307) */
"ii\0"
"glBindTexture\0"
"glBindTextureEXT\0"
"\0"
- /* _mesa_function_pool[26579]: BeginFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[26632]: BeginFragmentShaderATI (will be remapped) */
"\0"
"glBeginFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[26606]: MultiTexCoord4fARB (offset 402) */
+ /* _mesa_function_pool[26659]: MultiTexCoord4fARB (offset 402) */
"iffff\0"
"glMultiTexCoord4f\0"
"glMultiTexCoord4fARB\0"
"\0"
- /* _mesa_function_pool[26652]: VertexAttribs3svNV (will be remapped) */
+ /* _mesa_function_pool[26705]: VertexAttribs3svNV (will be remapped) */
"iip\0"
"glVertexAttribs3svNV\0"
"\0"
- /* _mesa_function_pool[26678]: StencilFunc (offset 243) */
+ /* _mesa_function_pool[26731]: StencilFunc (offset 243) */
"iii\0"
"glStencilFunc\0"
"\0"
- /* _mesa_function_pool[26697]: CopyPixels (offset 255) */
+ /* _mesa_function_pool[26750]: CopyPixels (offset 255) */
"iiiii\0"
"glCopyPixels\0"
"\0"
- /* _mesa_function_pool[26717]: Rectsv (offset 93) */
+ /* _mesa_function_pool[26770]: Rectsv (offset 93) */
"pp\0"
"glRectsv\0"
"\0"
- /* _mesa_function_pool[26730]: ReplacementCodeuivSUN (dynamic) */
+ /* _mesa_function_pool[26783]: ReplacementCodeuivSUN (dynamic) */
"p\0"
"glReplacementCodeuivSUN\0"
"\0"
- /* _mesa_function_pool[26757]: EnableVertexAttribArrayARB (will be remapped) */
+ /* _mesa_function_pool[26810]: EnableVertexAttribArrayARB (will be remapped) */
"i\0"
"glEnableVertexAttribArray\0"
"glEnableVertexAttribArrayARB\0"
"\0"
- /* _mesa_function_pool[26815]: NormalPointervINTEL (dynamic) */
+ /* _mesa_function_pool[26868]: NormalPointervINTEL (dynamic) */
"ip\0"
"glNormalPointervINTEL\0"
"\0"
- /* _mesa_function_pool[26841]: CopyConvolutionFilter2D (offset 355) */
+ /* _mesa_function_pool[26894]: CopyConvolutionFilter2D (offset 355) */
"iiiiii\0"
"glCopyConvolutionFilter2D\0"
"glCopyConvolutionFilter2DEXT\0"
"\0"
- /* _mesa_function_pool[26904]: WindowPos3ivMESA (will be remapped) */
+ /* _mesa_function_pool[26957]: WindowPos3ivMESA (will be remapped) */
"p\0"
"glWindowPos3iv\0"
"glWindowPos3ivARB\0"
"glWindowPos3ivMESA\0"
"\0"
- /* _mesa_function_pool[26959]: CopyBufferSubData (will be remapped) */
+ /* _mesa_function_pool[27012]: CopyBufferSubData (will be remapped) */
"iiiii\0"
"glCopyBufferSubData\0"
"\0"
- /* _mesa_function_pool[26986]: NormalPointer (offset 318) */
+ /* _mesa_function_pool[27039]: NormalPointer (offset 318) */
"iip\0"
"glNormalPointer\0"
"\0"
- /* _mesa_function_pool[27007]: TexParameterfv (offset 179) */
+ /* _mesa_function_pool[27060]: TexParameterfv (offset 179) */
"iip\0"
"glTexParameterfv\0"
"\0"
- /* _mesa_function_pool[27029]: IsBufferARB (will be remapped) */
+ /* _mesa_function_pool[27082]: IsBufferARB (will be remapped) */
"i\0"
"glIsBuffer\0"
"glIsBufferARB\0"
"\0"
- /* _mesa_function_pool[27057]: WindowPos4iMESA (will be remapped) */
+ /* _mesa_function_pool[27110]: WindowPos4iMESA (will be remapped) */
"iiii\0"
"glWindowPos4iMESA\0"
"\0"
- /* _mesa_function_pool[27081]: VertexAttrib4uivARB (will be remapped) */
+ /* _mesa_function_pool[27134]: VertexAttrib4uivARB (will be remapped) */
"ip\0"
"glVertexAttrib4uiv\0"
"glVertexAttrib4uivARB\0"
"\0"
- /* _mesa_function_pool[27126]: Tangent3bvEXT (dynamic) */
+ /* _mesa_function_pool[27179]: Tangent3bvEXT (dynamic) */
"p\0"
"glTangent3bvEXT\0"
"\0"
- /* _mesa_function_pool[27145]: UniformMatrix3x4fv (will be remapped) */
+ /* _mesa_function_pool[27198]: UniformMatrix3x4fv (will be remapped) */
"iiip\0"
"glUniformMatrix3x4fv\0"
"\0"
- /* _mesa_function_pool[27172]: ClipPlane (offset 150) */
+ /* _mesa_function_pool[27225]: ClipPlane (offset 150) */
"ip\0"
"glClipPlane\0"
"\0"
- /* _mesa_function_pool[27188]: Recti (offset 90) */
+ /* _mesa_function_pool[27241]: Recti (offset 90) */
"iiii\0"
"glRecti\0"
"\0"
- /* _mesa_function_pool[27202]: DrawRangeElementsBaseVertex (will be remapped) */
+ /* _mesa_function_pool[27255]: DrawRangeElementsBaseVertex (will be remapped) */
"iiiiipi\0"
"glDrawRangeElementsBaseVertex\0"
"\0"
- /* _mesa_function_pool[27241]: TexCoordPointervINTEL (dynamic) */
+ /* _mesa_function_pool[27294]: TexCoordPointervINTEL (dynamic) */
"iip\0"
"glTexCoordPointervINTEL\0"
"\0"
- /* _mesa_function_pool[27270]: DeleteBuffersARB (will be remapped) */
+ /* _mesa_function_pool[27323]: DeleteBuffersARB (will be remapped) */
"ip\0"
"glDeleteBuffers\0"
"glDeleteBuffersARB\0"
"\0"
- /* _mesa_function_pool[27309]: WindowPos4fvMESA (will be remapped) */
+ /* _mesa_function_pool[27362]: WindowPos4fvMESA (will be remapped) */
"p\0"
"glWindowPos4fvMESA\0"
"\0"
- /* _mesa_function_pool[27331]: GetPixelMapuiv (offset 272) */
+ /* _mesa_function_pool[27384]: GetPixelMapuiv (offset 272) */
"ip\0"
"glGetPixelMapuiv\0"
"\0"
- /* _mesa_function_pool[27352]: Rectf (offset 88) */
+ /* _mesa_function_pool[27405]: Rectf (offset 88) */
"ffff\0"
"glRectf\0"
"\0"
- /* _mesa_function_pool[27366]: VertexAttrib1sNV (will be remapped) */
+ /* _mesa_function_pool[27419]: VertexAttrib1sNV (will be remapped) */
"ii\0"
"glVertexAttrib1sNV\0"
"\0"
- /* _mesa_function_pool[27389]: Indexfv (offset 47) */
+ /* _mesa_function_pool[27442]: Indexfv (offset 47) */
"p\0"
"glIndexfv\0"
"\0"
- /* _mesa_function_pool[27402]: SecondaryColor3svEXT (will be remapped) */
+ /* _mesa_function_pool[27455]: SecondaryColor3svEXT (will be remapped) */
"p\0"
"glSecondaryColor3sv\0"
"glSecondaryColor3svEXT\0"
"\0"
- /* _mesa_function_pool[27448]: LoadTransposeMatrixfARB (will be remapped) */
+ /* _mesa_function_pool[27501]: LoadTransposeMatrixfARB (will be remapped) */
"p\0"
"glLoadTransposeMatrixf\0"
"glLoadTransposeMatrixfARB\0"
"\0"
- /* _mesa_function_pool[27500]: GetPointerv (offset 329) */
+ /* _mesa_function_pool[27553]: GetPointerv (offset 329) */
"ip\0"
"glGetPointerv\0"
"glGetPointervEXT\0"
"\0"
- /* _mesa_function_pool[27535]: Tangent3bEXT (dynamic) */
+ /* _mesa_function_pool[27588]: Tangent3bEXT (dynamic) */
"iii\0"
"glTangent3bEXT\0"
"\0"
- /* _mesa_function_pool[27555]: CombinerParameterfNV (will be remapped) */
+ /* _mesa_function_pool[27608]: CombinerParameterfNV (will be remapped) */
"if\0"
"glCombinerParameterfNV\0"
"\0"
- /* _mesa_function_pool[27582]: IndexMask (offset 212) */
+ /* _mesa_function_pool[27635]: IndexMask (offset 212) */
"i\0"
"glIndexMask\0"
"\0"
- /* _mesa_function_pool[27597]: BindProgramNV (will be remapped) */
+ /* _mesa_function_pool[27650]: BindProgramNV (will be remapped) */
"ii\0"
"glBindProgramARB\0"
"glBindProgramNV\0"
"\0"
- /* _mesa_function_pool[27634]: VertexAttrib4svARB (will be remapped) */
+ /* _mesa_function_pool[27687]: VertexAttrib4svARB (will be remapped) */
"ip\0"
"glVertexAttrib4sv\0"
"glVertexAttrib4svARB\0"
"\0"
- /* _mesa_function_pool[27677]: GetFloatv (offset 262) */
+ /* _mesa_function_pool[27730]: GetFloatv (offset 262) */
"ip\0"
"glGetFloatv\0"
"\0"
- /* _mesa_function_pool[27693]: CreateDebugObjectMESA (dynamic) */
+ /* _mesa_function_pool[27746]: CreateDebugObjectMESA (dynamic) */
"\0"
"glCreateDebugObjectMESA\0"
"\0"
- /* _mesa_function_pool[27719]: GetShaderiv (will be remapped) */
+ /* _mesa_function_pool[27772]: GetShaderiv (will be remapped) */
"iip\0"
"glGetShaderiv\0"
"\0"
- /* _mesa_function_pool[27738]: ClientWaitSync (will be remapped) */
+ /* _mesa_function_pool[27791]: ClientWaitSync (will be remapped) */
"iii\0"
"glClientWaitSync\0"
"\0"
- /* _mesa_function_pool[27760]: TexCoord4s (offset 124) */
+ /* _mesa_function_pool[27813]: TexCoord4s (offset 124) */
"iiii\0"
"glTexCoord4s\0"
"\0"
- /* _mesa_function_pool[27779]: TexCoord3sv (offset 117) */
+ /* _mesa_function_pool[27832]: TexCoord3sv (offset 117) */
"p\0"
"glTexCoord3sv\0"
"\0"
- /* _mesa_function_pool[27796]: BindFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[27849]: BindFragmentShaderATI (will be remapped) */
"i\0"
"glBindFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[27823]: PopAttrib (offset 218) */
+ /* _mesa_function_pool[27876]: PopAttrib (offset 218) */
"\0"
"glPopAttrib\0"
"\0"
- /* _mesa_function_pool[27837]: Fogfv (offset 154) */
+ /* _mesa_function_pool[27890]: Fogfv (offset 154) */
"ip\0"
"glFogfv\0"
"\0"
- /* _mesa_function_pool[27849]: UnmapBufferARB (will be remapped) */
+ /* _mesa_function_pool[27902]: UnmapBufferARB (will be remapped) */
"i\0"
"glUnmapBuffer\0"
"glUnmapBufferARB\0"
"\0"
- /* _mesa_function_pool[27883]: InitNames (offset 197) */
+ /* _mesa_function_pool[27936]: InitNames (offset 197) */
"\0"
"glInitNames\0"
"\0"
- /* _mesa_function_pool[27897]: Normal3sv (offset 61) */
+ /* _mesa_function_pool[27950]: Normal3sv (offset 61) */
"p\0"
"glNormal3sv\0"
"\0"
- /* _mesa_function_pool[27912]: Minmax (offset 368) */
+ /* _mesa_function_pool[27965]: Minmax (offset 368) */
"iii\0"
"glMinmax\0"
"glMinmaxEXT\0"
"\0"
- /* _mesa_function_pool[27938]: TexCoord4d (offset 118) */
+ /* _mesa_function_pool[27991]: TexCoord4d (offset 118) */
"dddd\0"
"glTexCoord4d\0"
"\0"
- /* _mesa_function_pool[27957]: TexCoord4f (offset 120) */
+ /* _mesa_function_pool[28010]: DeformationMap3dSGIX (dynamic) */
+ "iddiiddiiddiip\0"
+ "glDeformationMap3dSGIX\0"
+ "\0"
+ /* _mesa_function_pool[28049]: TexCoord4f (offset 120) */
"ffff\0"
"glTexCoord4f\0"
"\0"
- /* _mesa_function_pool[27976]: FogCoorddvEXT (will be remapped) */
+ /* _mesa_function_pool[28068]: FogCoorddvEXT (will be remapped) */
"p\0"
"glFogCoorddv\0"
"glFogCoorddvEXT\0"
"\0"
- /* _mesa_function_pool[28008]: FinishTextureSUNX (dynamic) */
+ /* _mesa_function_pool[28100]: FinishTextureSUNX (dynamic) */
"\0"
"glFinishTextureSUNX\0"
"\0"
- /* _mesa_function_pool[28030]: GetFragmentLightfvSGIX (dynamic) */
+ /* _mesa_function_pool[28122]: GetFragmentLightfvSGIX (dynamic) */
"iip\0"
"glGetFragmentLightfvSGIX\0"
"\0"
- /* _mesa_function_pool[28060]: Binormal3fvEXT (dynamic) */
+ /* _mesa_function_pool[28152]: Binormal3fvEXT (dynamic) */
"p\0"
"glBinormal3fvEXT\0"
"\0"
- /* _mesa_function_pool[28080]: GetBooleanv (offset 258) */
+ /* _mesa_function_pool[28172]: GetBooleanv (offset 258) */
"ip\0"
"glGetBooleanv\0"
"\0"
- /* _mesa_function_pool[28098]: ColorFragmentOp3ATI (will be remapped) */
+ /* _mesa_function_pool[28190]: ColorFragmentOp3ATI (will be remapped) */
"iiiiiiiiiiiii\0"
"glColorFragmentOp3ATI\0"
"\0"
- /* _mesa_function_pool[28135]: Hint (offset 158) */
+ /* _mesa_function_pool[28227]: Hint (offset 158) */
"ii\0"
"glHint\0"
"\0"
- /* _mesa_function_pool[28146]: Color4dv (offset 28) */
+ /* _mesa_function_pool[28238]: Color4dv (offset 28) */
"p\0"
"glColor4dv\0"
"\0"
- /* _mesa_function_pool[28160]: VertexAttrib2svARB (will be remapped) */
+ /* _mesa_function_pool[28252]: VertexAttrib2svARB (will be remapped) */
"ip\0"
"glVertexAttrib2sv\0"
"glVertexAttrib2svARB\0"
"\0"
- /* _mesa_function_pool[28203]: AreProgramsResidentNV (will be remapped) */
+ /* _mesa_function_pool[28295]: AreProgramsResidentNV (will be remapped) */
"ipp\0"
"glAreProgramsResidentNV\0"
"\0"
- /* _mesa_function_pool[28232]: WindowPos3svMESA (will be remapped) */
+ /* _mesa_function_pool[28324]: WindowPos3svMESA (will be remapped) */
"p\0"
"glWindowPos3sv\0"
"glWindowPos3svARB\0"
"glWindowPos3svMESA\0"
"\0"
- /* _mesa_function_pool[28287]: CopyColorSubTable (offset 347) */
+ /* _mesa_function_pool[28379]: CopyColorSubTable (offset 347) */
"iiiii\0"
"glCopyColorSubTable\0"
"glCopyColorSubTableEXT\0"
"\0"
- /* _mesa_function_pool[28337]: WeightdvARB (dynamic) */
+ /* _mesa_function_pool[28429]: WeightdvARB (dynamic) */
"ip\0"
"glWeightdvARB\0"
"\0"
- /* _mesa_function_pool[28355]: DeleteRenderbuffersEXT (will be remapped) */
+ /* _mesa_function_pool[28447]: DeleteRenderbuffersEXT (will be remapped) */
"ip\0"
"glDeleteRenderbuffers\0"
"glDeleteRenderbuffersEXT\0"
"\0"
- /* _mesa_function_pool[28406]: VertexAttrib4NubvARB (will be remapped) */
+ /* _mesa_function_pool[28498]: VertexAttrib4NubvARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nubv\0"
"glVertexAttrib4NubvARB\0"
"\0"
- /* _mesa_function_pool[28453]: VertexAttrib3dvNV (will be remapped) */
+ /* _mesa_function_pool[28545]: VertexAttrib3dvNV (will be remapped) */
"ip\0"
"glVertexAttrib3dvNV\0"
"\0"
- /* _mesa_function_pool[28477]: GetObjectParameterfvARB (will be remapped) */
+ /* _mesa_function_pool[28569]: GetObjectParameterfvARB (will be remapped) */
"iip\0"
"glGetObjectParameterfvARB\0"
"\0"
- /* _mesa_function_pool[28508]: Vertex4iv (offset 147) */
+ /* _mesa_function_pool[28600]: Vertex4iv (offset 147) */
"p\0"
"glVertex4iv\0"
"\0"
- /* _mesa_function_pool[28523]: GetProgramEnvParameterdvARB (will be remapped) */
+ /* _mesa_function_pool[28615]: GetProgramEnvParameterdvARB (will be remapped) */
"iip\0"
"glGetProgramEnvParameterdvARB\0"
"\0"
- /* _mesa_function_pool[28558]: TexCoord4dv (offset 119) */
+ /* _mesa_function_pool[28650]: TexCoord4dv (offset 119) */
"p\0"
"glTexCoord4dv\0"
"\0"
- /* _mesa_function_pool[28575]: LockArraysEXT (will be remapped) */
+ /* _mesa_function_pool[28667]: LockArraysEXT (will be remapped) */
"ii\0"
"glLockArraysEXT\0"
"\0"
- /* _mesa_function_pool[28595]: Begin (offset 7) */
+ /* _mesa_function_pool[28687]: Begin (offset 7) */
"i\0"
"glBegin\0"
"\0"
- /* _mesa_function_pool[28606]: LightModeli (offset 165) */
+ /* _mesa_function_pool[28698]: LightModeli (offset 165) */
"ii\0"
"glLightModeli\0"
"\0"
- /* _mesa_function_pool[28624]: Rectfv (offset 89) */
+ /* _mesa_function_pool[28716]: Rectfv (offset 89) */
"pp\0"
"glRectfv\0"
"\0"
- /* _mesa_function_pool[28637]: LightModelf (offset 163) */
+ /* _mesa_function_pool[28729]: LightModelf (offset 163) */
"if\0"
"glLightModelf\0"
"\0"
- /* _mesa_function_pool[28655]: GetTexParameterfv (offset 282) */
+ /* _mesa_function_pool[28747]: GetTexParameterfv (offset 282) */
"iip\0"
"glGetTexParameterfv\0"
"\0"
- /* _mesa_function_pool[28680]: GetLightfv (offset 264) */
+ /* _mesa_function_pool[28772]: GetLightfv (offset 264) */
"iip\0"
"glGetLightfv\0"
"\0"
- /* _mesa_function_pool[28698]: PixelTransformParameterivEXT (dynamic) */
+ /* _mesa_function_pool[28790]: PixelTransformParameterivEXT (dynamic) */
"iip\0"
"glPixelTransformParameterivEXT\0"
"\0"
- /* _mesa_function_pool[28734]: BinormalPointerEXT (dynamic) */
+ /* _mesa_function_pool[28826]: BinormalPointerEXT (dynamic) */
"iip\0"
"glBinormalPointerEXT\0"
"\0"
- /* _mesa_function_pool[28760]: VertexAttrib1dNV (will be remapped) */
+ /* _mesa_function_pool[28852]: VertexAttrib1dNV (will be remapped) */
"id\0"
"glVertexAttrib1dNV\0"
"\0"
- /* _mesa_function_pool[28783]: GetCombinerInputParameterivNV (will be remapped) */
+ /* _mesa_function_pool[28875]: GetCombinerInputParameterivNV (will be remapped) */
"iiiip\0"
"glGetCombinerInputParameterivNV\0"
"\0"
- /* _mesa_function_pool[28822]: Disable (offset 214) */
+ /* _mesa_function_pool[28914]: Disable (offset 214) */
"i\0"
"glDisable\0"
"\0"
- /* _mesa_function_pool[28835]: MultiTexCoord2fvARB (offset 387) */
+ /* _mesa_function_pool[28927]: MultiTexCoord2fvARB (offset 387) */
"ip\0"
"glMultiTexCoord2fv\0"
"glMultiTexCoord2fvARB\0"
"\0"
- /* _mesa_function_pool[28880]: GetRenderbufferParameterivEXT (will be remapped) */
+ /* _mesa_function_pool[28972]: GetRenderbufferParameterivEXT (will be remapped) */
"iip\0"
"glGetRenderbufferParameteriv\0"
"glGetRenderbufferParameterivEXT\0"
"\0"
- /* _mesa_function_pool[28946]: CombinerParameterivNV (will be remapped) */
+ /* _mesa_function_pool[29038]: CombinerParameterivNV (will be remapped) */
"ip\0"
"glCombinerParameterivNV\0"
"\0"
- /* _mesa_function_pool[28974]: GenFragmentShadersATI (will be remapped) */
+ /* _mesa_function_pool[29066]: GenFragmentShadersATI (will be remapped) */
"i\0"
"glGenFragmentShadersATI\0"
"\0"
- /* _mesa_function_pool[29001]: DrawArrays (offset 310) */
+ /* _mesa_function_pool[29093]: DrawArrays (offset 310) */
"iii\0"
"glDrawArrays\0"
"glDrawArraysEXT\0"
"\0"
- /* _mesa_function_pool[29035]: WeightuivARB (dynamic) */
+ /* _mesa_function_pool[29127]: WeightuivARB (dynamic) */
"ip\0"
"glWeightuivARB\0"
"\0"
- /* _mesa_function_pool[29054]: VertexAttrib2sARB (will be remapped) */
+ /* _mesa_function_pool[29146]: VertexAttrib2sARB (will be remapped) */
"iii\0"
"glVertexAttrib2s\0"
"glVertexAttrib2sARB\0"
"\0"
- /* _mesa_function_pool[29096]: ColorMask (offset 210) */
+ /* _mesa_function_pool[29188]: ColorMask (offset 210) */
"iiii\0"
"glColorMask\0"
"\0"
- /* _mesa_function_pool[29114]: GenAsyncMarkersSGIX (dynamic) */
+ /* _mesa_function_pool[29206]: GenAsyncMarkersSGIX (dynamic) */
"i\0"
"glGenAsyncMarkersSGIX\0"
"\0"
- /* _mesa_function_pool[29139]: Tangent3svEXT (dynamic) */
+ /* _mesa_function_pool[29231]: Tangent3svEXT (dynamic) */
"p\0"
"glTangent3svEXT\0"
"\0"
- /* _mesa_function_pool[29158]: GetListParameterivSGIX (dynamic) */
+ /* _mesa_function_pool[29250]: GetListParameterivSGIX (dynamic) */
"iip\0"
"glGetListParameterivSGIX\0"
"\0"
- /* _mesa_function_pool[29188]: BindBufferARB (will be remapped) */
+ /* _mesa_function_pool[29280]: BindBufferARB (will be remapped) */
"ii\0"
"glBindBuffer\0"
"glBindBufferARB\0"
"\0"
- /* _mesa_function_pool[29221]: GetInfoLogARB (will be remapped) */
+ /* _mesa_function_pool[29313]: GetInfoLogARB (will be remapped) */
"iipp\0"
"glGetInfoLogARB\0"
"\0"
- /* _mesa_function_pool[29243]: RasterPos4iv (offset 83) */
+ /* _mesa_function_pool[29335]: RasterPos4iv (offset 83) */
"p\0"
"glRasterPos4iv\0"
"\0"
- /* _mesa_function_pool[29261]: Enable (offset 215) */
+ /* _mesa_function_pool[29353]: Enable (offset 215) */
"i\0"
"glEnable\0"
"\0"
- /* _mesa_function_pool[29273]: LineStipple (offset 167) */
+ /* _mesa_function_pool[29365]: LineStipple (offset 167) */
"ii\0"
"glLineStipple\0"
"\0"
- /* _mesa_function_pool[29291]: VertexAttribs4svNV (will be remapped) */
+ /* _mesa_function_pool[29383]: VertexAttribs4svNV (will be remapped) */
"iip\0"
"glVertexAttribs4svNV\0"
"\0"
- /* _mesa_function_pool[29317]: EdgeFlagPointerListIBM (dynamic) */
+ /* _mesa_function_pool[29409]: EdgeFlagPointerListIBM (dynamic) */
"ipi\0"
"glEdgeFlagPointerListIBM\0"
"\0"
- /* _mesa_function_pool[29347]: UniformMatrix3x2fv (will be remapped) */
+ /* _mesa_function_pool[29439]: UniformMatrix3x2fv (will be remapped) */
"iiip\0"
"glUniformMatrix3x2fv\0"
"\0"
- /* _mesa_function_pool[29374]: GetMinmaxParameterfv (offset 365) */
+ /* _mesa_function_pool[29466]: GetMinmaxParameterfv (offset 365) */
"iip\0"
"glGetMinmaxParameterfv\0"
"glGetMinmaxParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[29428]: VertexAttrib1fvARB (will be remapped) */
+ /* _mesa_function_pool[29520]: VertexAttrib1fvARB (will be remapped) */
"ip\0"
"glVertexAttrib1fv\0"
"glVertexAttrib1fvARB\0"
"\0"
- /* _mesa_function_pool[29471]: GenBuffersARB (will be remapped) */
+ /* _mesa_function_pool[29563]: GenBuffersARB (will be remapped) */
"ip\0"
"glGenBuffers\0"
"glGenBuffersARB\0"
"\0"
- /* _mesa_function_pool[29504]: VertexAttribs1svNV (will be remapped) */
+ /* _mesa_function_pool[29596]: VertexAttribs1svNV (will be remapped) */
"iip\0"
"glVertexAttribs1svNV\0"
"\0"
- /* _mesa_function_pool[29530]: Vertex3fv (offset 137) */
+ /* _mesa_function_pool[29622]: Vertex3fv (offset 137) */
"p\0"
"glVertex3fv\0"
"\0"
- /* _mesa_function_pool[29545]: GetTexBumpParameterivATI (will be remapped) */
+ /* _mesa_function_pool[29637]: GetTexBumpParameterivATI (will be remapped) */
"ip\0"
"glGetTexBumpParameterivATI\0"
"\0"
- /* _mesa_function_pool[29576]: Binormal3bEXT (dynamic) */
+ /* _mesa_function_pool[29668]: Binormal3bEXT (dynamic) */
"iii\0"
"glBinormal3bEXT\0"
"\0"
- /* _mesa_function_pool[29597]: FragmentMaterialivSGIX (dynamic) */
+ /* _mesa_function_pool[29689]: FragmentMaterialivSGIX (dynamic) */
"iip\0"
"glFragmentMaterialivSGIX\0"
"\0"
- /* _mesa_function_pool[29627]: IsRenderbufferEXT (will be remapped) */
+ /* _mesa_function_pool[29719]: IsRenderbufferEXT (will be remapped) */
"i\0"
"glIsRenderbuffer\0"
"glIsRenderbufferEXT\0"
"\0"
- /* _mesa_function_pool[29667]: GenProgramsNV (will be remapped) */
+ /* _mesa_function_pool[29759]: GenProgramsNV (will be remapped) */
"ip\0"
"glGenProgramsARB\0"
"glGenProgramsNV\0"
"\0"
- /* _mesa_function_pool[29704]: VertexAttrib4dvNV (will be remapped) */
+ /* _mesa_function_pool[29796]: VertexAttrib4dvNV (will be remapped) */
"ip\0"
"glVertexAttrib4dvNV\0"
"\0"
- /* _mesa_function_pool[29728]: EndFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[29820]: EndFragmentShaderATI (will be remapped) */
"\0"
"glEndFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[29753]: Binormal3iEXT (dynamic) */
+ /* _mesa_function_pool[29845]: Binormal3iEXT (dynamic) */
"iii\0"
"glBinormal3iEXT\0"
"\0"
- /* _mesa_function_pool[29774]: WindowPos2fMESA (will be remapped) */
+ /* _mesa_function_pool[29866]: WindowPos2fMESA (will be remapped) */
"ff\0"
"glWindowPos2f\0"
"glWindowPos2fARB\0"
@@ -4374,402 +4386,405 @@ static const struct {
GLint remap_index;
} MESA_remap_table_functions[] = {
{ 1461, AttachShader_remap_index },
- { 8764, CreateProgram_remap_index },
- { 20335, CreateShader_remap_index },
- { 22665, DeleteProgram_remap_index },
- { 16315, DeleteShader_remap_index },
- { 20781, DetachShader_remap_index },
- { 15839, GetAttachedShaders_remap_index },
+ { 8794, CreateProgram_remap_index },
+ { 20420, CreateShader_remap_index },
+ { 22750, DeleteProgram_remap_index },
+ { 16372, DeleteShader_remap_index },
+ { 20866, DetachShader_remap_index },
+ { 15896, GetAttachedShaders_remap_index },
{ 4275, GetProgramInfoLog_remap_index },
{ 361, GetProgramiv_remap_index },
- { 5578, GetShaderInfoLog_remap_index },
- { 27719, GetShaderiv_remap_index },
- { 11854, IsProgram_remap_index },
- { 10889, IsShader_remap_index },
- { 8868, StencilFuncSeparate_remap_index },
+ { 5608, GetShaderInfoLog_remap_index },
+ { 27772, GetShaderiv_remap_index },
+ { 11879, IsProgram_remap_index },
+ { 10914, IsShader_remap_index },
+ { 8898, StencilFuncSeparate_remap_index },
{ 3487, StencilMaskSeparate_remap_index },
- { 6654, StencilOpSeparate_remap_index },
- { 19686, UniformMatrix2x3fv_remap_index },
+ { 6684, StencilOpSeparate_remap_index },
+ { 19771, UniformMatrix2x3fv_remap_index },
{ 2615, UniformMatrix2x4fv_remap_index },
- { 29347, UniformMatrix3x2fv_remap_index },
- { 27145, UniformMatrix3x4fv_remap_index },
- { 14387, UniformMatrix4x2fv_remap_index },
+ { 29439, UniformMatrix3x2fv_remap_index },
+ { 27198, UniformMatrix3x4fv_remap_index },
+ { 14444, UniformMatrix4x2fv_remap_index },
{ 2937, UniformMatrix4x3fv_remap_index },
- { 8782, LoadTransposeMatrixdARB_remap_index },
- { 27448, LoadTransposeMatrixfARB_remap_index },
+ { 8812, LoadTransposeMatrixdARB_remap_index },
+ { 27501, LoadTransposeMatrixfARB_remap_index },
{ 4848, MultTransposeMatrixdARB_remap_index },
- { 20968, MultTransposeMatrixfARB_remap_index },
+ { 21053, MultTransposeMatrixfARB_remap_index },
{ 172, SampleCoverageARB_remap_index },
- { 5002, CompressedTexImage1DARB_remap_index },
- { 21468, CompressedTexImage2DARB_remap_index },
+ { 5032, CompressedTexImage1DARB_remap_index },
+ { 21553, CompressedTexImage2DARB_remap_index },
{ 3550, CompressedTexImage3DARB_remap_index },
- { 16131, CompressedTexSubImage1DARB_remap_index },
+ { 16188, CompressedTexSubImage1DARB_remap_index },
{ 1880, CompressedTexSubImage2DARB_remap_index },
- { 17923, CompressedTexSubImage3DARB_remap_index },
- { 25427, GetCompressedTexImageARB_remap_index },
+ { 18008, CompressedTexSubImage3DARB_remap_index },
+ { 25480, GetCompressedTexImageARB_remap_index },
{ 3395, DisableVertexAttribArrayARB_remap_index },
- { 26757, EnableVertexAttribArrayARB_remap_index },
- { 28523, GetProgramEnvParameterdvARB_remap_index },
- { 20848, GetProgramEnvParameterfvARB_remap_index },
- { 24457, GetProgramLocalParameterdvARB_remap_index },
- { 7096, GetProgramLocalParameterfvARB_remap_index },
- { 16222, GetProgramStringARB_remap_index },
- { 24652, GetProgramivARB_remap_index },
- { 18118, GetVertexAttribdvARB_remap_index },
- { 14276, GetVertexAttribfvARB_remap_index },
- { 8677, GetVertexAttribivARB_remap_index },
- { 17027, ProgramEnvParameter4dARB_remap_index },
- { 22438, ProgramEnvParameter4dvARB_remap_index },
- { 14884, ProgramEnvParameter4fARB_remap_index },
- { 7959, ProgramEnvParameter4fvARB_remap_index },
+ { 26810, EnableVertexAttribArrayARB_remap_index },
+ { 28615, GetProgramEnvParameterdvARB_remap_index },
+ { 20933, GetProgramEnvParameterfvARB_remap_index },
+ { 24510, GetProgramLocalParameterdvARB_remap_index },
+ { 7126, GetProgramLocalParameterfvARB_remap_index },
+ { 16279, GetProgramStringARB_remap_index },
+ { 24705, GetProgramivARB_remap_index },
+ { 18203, GetVertexAttribdvARB_remap_index },
+ { 14333, GetVertexAttribfvARB_remap_index },
+ { 8707, GetVertexAttribivARB_remap_index },
+ { 17084, ProgramEnvParameter4dARB_remap_index },
+ { 22523, ProgramEnvParameter4dvARB_remap_index },
+ { 14941, ProgramEnvParameter4fARB_remap_index },
+ { 7989, ProgramEnvParameter4fvARB_remap_index },
{ 3513, ProgramLocalParameter4dARB_remap_index },
- { 11564, ProgramLocalParameter4dvARB_remap_index },
- { 26236, ProgramLocalParameter4fARB_remap_index },
- { 22983, ProgramLocalParameter4fvARB_remap_index },
- { 25213, ProgramStringARB_remap_index },
- { 17277, VertexAttrib1dARB_remap_index },
- { 13930, VertexAttrib1dvARB_remap_index },
+ { 11589, ProgramLocalParameter4dvARB_remap_index },
+ { 26289, ProgramLocalParameter4fARB_remap_index },
+ { 23068, ProgramLocalParameter4fvARB_remap_index },
+ { 25266, ProgramStringARB_remap_index },
+ { 17334, VertexAttrib1dARB_remap_index },
+ { 13987, VertexAttrib1dvARB_remap_index },
{ 3688, VertexAttrib1fARB_remap_index },
- { 29428, VertexAttrib1fvARB_remap_index },
- { 6180, VertexAttrib1sARB_remap_index },
+ { 29520, VertexAttrib1fvARB_remap_index },
+ { 6210, VertexAttrib1sARB_remap_index },
{ 2054, VertexAttrib1svARB_remap_index },
- { 13361, VertexAttrib2dARB_remap_index },
- { 15458, VertexAttrib2dvARB_remap_index },
+ { 13418, VertexAttrib2dARB_remap_index },
+ { 15515, VertexAttrib2dvARB_remap_index },
{ 1480, VertexAttrib2fARB_remap_index },
- { 15571, VertexAttrib2fvARB_remap_index },
- { 29054, VertexAttrib2sARB_remap_index },
- { 28160, VertexAttrib2svARB_remap_index },
- { 10015, VertexAttrib3dARB_remap_index },
- { 7662, VertexAttrib3dvARB_remap_index },
+ { 15628, VertexAttrib2fvARB_remap_index },
+ { 29146, VertexAttrib2sARB_remap_index },
+ { 28252, VertexAttrib2svARB_remap_index },
+ { 10045, VertexAttrib3dARB_remap_index },
+ { 7692, VertexAttrib3dvARB_remap_index },
{ 1567, VertexAttrib3fARB_remap_index },
- { 19923, VertexAttrib3fvARB_remap_index },
- { 25085, VertexAttrib3sARB_remap_index },
- { 17860, VertexAttrib3svARB_remap_index },
+ { 20008, VertexAttrib3fvARB_remap_index },
+ { 25138, VertexAttrib3sARB_remap_index },
+ { 17945, VertexAttrib3svARB_remap_index },
{ 4301, VertexAttrib4NbvARB_remap_index },
- { 15794, VertexAttrib4NivARB_remap_index },
- { 19878, VertexAttrib4NsvARB_remap_index },
- { 20800, VertexAttrib4NubARB_remap_index },
- { 28406, VertexAttrib4NubvARB_remap_index },
- { 16688, VertexAttrib4NuivARB_remap_index },
+ { 15851, VertexAttrib4NivARB_remap_index },
+ { 19963, VertexAttrib4NsvARB_remap_index },
+ { 20885, VertexAttrib4NubARB_remap_index },
+ { 28498, VertexAttrib4NubvARB_remap_index },
+ { 16745, VertexAttrib4NuivARB_remap_index },
{ 2810, VertexAttrib4NusvARB_remap_index },
- { 9609, VertexAttrib4bvARB_remap_index },
- { 23865, VertexAttrib4dARB_remap_index },
- { 18843, VertexAttrib4dvARB_remap_index },
- { 10122, VertexAttrib4fARB_remap_index },
- { 10492, VertexAttrib4fvARB_remap_index },
- { 9061, VertexAttrib4ivARB_remap_index },
- { 15272, VertexAttrib4sARB_remap_index },
- { 27634, VertexAttrib4svARB_remap_index },
- { 14689, VertexAttrib4ubvARB_remap_index },
- { 27081, VertexAttrib4uivARB_remap_index },
- { 17671, VertexAttrib4usvARB_remap_index },
- { 19560, VertexAttribPointerARB_remap_index },
- { 29188, BindBufferARB_remap_index },
- { 5893, BufferDataARB_remap_index },
+ { 9639, VertexAttrib4bvARB_remap_index },
+ { 23918, VertexAttrib4dARB_remap_index },
+ { 18928, VertexAttrib4dvARB_remap_index },
+ { 10152, VertexAttrib4fARB_remap_index },
+ { 10556, VertexAttrib4fvARB_remap_index },
+ { 9091, VertexAttrib4ivARB_remap_index },
+ { 15329, VertexAttrib4sARB_remap_index },
+ { 27687, VertexAttrib4svARB_remap_index },
+ { 14746, VertexAttrib4ubvARB_remap_index },
+ { 27134, VertexAttrib4uivARB_remap_index },
+ { 17756, VertexAttrib4usvARB_remap_index },
+ { 19645, VertexAttribPointerARB_remap_index },
+ { 29280, BindBufferARB_remap_index },
+ { 5923, BufferDataARB_remap_index },
{ 1382, BufferSubDataARB_remap_index },
- { 27270, DeleteBuffersARB_remap_index },
- { 29471, GenBuffersARB_remap_index },
- { 15614, GetBufferParameterivARB_remap_index },
- { 14836, GetBufferPointervARB_remap_index },
+ { 27323, DeleteBuffersARB_remap_index },
+ { 29563, GenBuffersARB_remap_index },
+ { 15671, GetBufferParameterivARB_remap_index },
+ { 14893, GetBufferPointervARB_remap_index },
{ 1335, GetBufferSubDataARB_remap_index },
- { 27029, IsBufferARB_remap_index },
- { 23438, MapBufferARB_remap_index },
- { 27849, UnmapBufferARB_remap_index },
+ { 27082, IsBufferARB_remap_index },
+ { 23523, MapBufferARB_remap_index },
+ { 27902, UnmapBufferARB_remap_index },
{ 268, BeginQueryARB_remap_index },
- { 17372, DeleteQueriesARB_remap_index },
- { 10786, EndQueryARB_remap_index },
- { 25906, GenQueriesARB_remap_index },
+ { 17429, DeleteQueriesARB_remap_index },
+ { 10850, EndQueryARB_remap_index },
+ { 25959, GenQueriesARB_remap_index },
{ 1772, GetQueryObjectivARB_remap_index },
- { 15316, GetQueryObjectuivARB_remap_index },
+ { 15373, GetQueryObjectuivARB_remap_index },
{ 1624, GetQueryivARB_remap_index },
- { 17578, IsQueryARB_remap_index },
- { 7272, AttachObjectARB_remap_index },
- { 16277, CompileShaderARB_remap_index },
+ { 17663, IsQueryARB_remap_index },
+ { 7302, AttachObjectARB_remap_index },
+ { 16334, CompileShaderARB_remap_index },
{ 2879, CreateProgramObjectARB_remap_index },
- { 5838, CreateShaderObjectARB_remap_index },
- { 12778, DeleteObjectARB_remap_index },
- { 21242, DetachObjectARB_remap_index },
- { 10564, GetActiveUniformARB_remap_index },
- { 8380, GetAttachedObjectsARB_remap_index },
- { 8659, GetHandleARB_remap_index },
- { 29221, GetInfoLogARB_remap_index },
- { 28477, GetObjectParameterfvARB_remap_index },
- { 24331, GetObjectParameterivARB_remap_index },
- { 25664, GetShaderSourceARB_remap_index },
- { 24945, GetUniformLocationARB_remap_index },
- { 21070, GetUniformfvARB_remap_index },
- { 11186, GetUniformivARB_remap_index },
- { 17716, LinkProgramARB_remap_index },
- { 17774, ShaderSourceARB_remap_index },
- { 6554, Uniform1fARB_remap_index },
- { 26445, Uniform1fvARB_remap_index },
- { 19529, Uniform1iARB_remap_index },
- { 18532, Uniform1ivARB_remap_index },
+ { 5868, CreateShaderObjectARB_remap_index },
+ { 12835, DeleteObjectARB_remap_index },
+ { 21327, DetachObjectARB_remap_index },
+ { 10628, GetActiveUniformARB_remap_index },
+ { 8410, GetAttachedObjectsARB_remap_index },
+ { 8689, GetHandleARB_remap_index },
+ { 29313, GetInfoLogARB_remap_index },
+ { 28569, GetObjectParameterfvARB_remap_index },
+ { 24384, GetObjectParameterivARB_remap_index },
+ { 25717, GetShaderSourceARB_remap_index },
+ { 24998, GetUniformLocationARB_remap_index },
+ { 21155, GetUniformfvARB_remap_index },
+ { 11211, GetUniformivARB_remap_index },
+ { 17801, LinkProgramARB_remap_index },
+ { 17859, ShaderSourceARB_remap_index },
+ { 6584, Uniform1fARB_remap_index },
+ { 26498, Uniform1fvARB_remap_index },
+ { 19614, Uniform1iARB_remap_index },
+ { 18617, Uniform1ivARB_remap_index },
{ 2003, Uniform2fARB_remap_index },
- { 12614, Uniform2fvARB_remap_index },
- { 23325, Uniform2iARB_remap_index },
+ { 12671, Uniform2fvARB_remap_index },
+ { 23410, Uniform2iARB_remap_index },
{ 2123, Uniform2ivARB_remap_index },
- { 16387, Uniform3fARB_remap_index },
- { 8410, Uniform3fvARB_remap_index },
- { 5512, Uniform3iARB_remap_index },
- { 14942, Uniform3ivARB_remap_index },
- { 16833, Uniform4fARB_remap_index },
- { 20934, Uniform4fvARB_remap_index },
- { 22117, Uniform4iARB_remap_index },
- { 18084, Uniform4ivARB_remap_index },
- { 7324, UniformMatrix2fvARB_remap_index },
+ { 16444, Uniform3fARB_remap_index },
+ { 8440, Uniform3fvARB_remap_index },
+ { 5542, Uniform3iARB_remap_index },
+ { 14999, Uniform3ivARB_remap_index },
+ { 16890, Uniform4fARB_remap_index },
+ { 21019, Uniform4fvARB_remap_index },
+ { 22202, Uniform4iARB_remap_index },
+ { 18169, Uniform4ivARB_remap_index },
+ { 7354, UniformMatrix2fvARB_remap_index },
{ 17, UniformMatrix3fvARB_remap_index },
{ 2475, UniformMatrix4fvARB_remap_index },
- { 22550, UseProgramObjectARB_remap_index },
- { 13049, ValidateProgramARB_remap_index },
- { 18886, BindAttribLocationARB_remap_index },
+ { 22635, UseProgramObjectARB_remap_index },
+ { 13106, ValidateProgramARB_remap_index },
+ { 18971, BindAttribLocationARB_remap_index },
{ 4346, GetActiveAttribARB_remap_index },
- { 14623, GetAttribLocationARB_remap_index },
- { 26184, DrawBuffersARB_remap_index },
- { 11669, RenderbufferStorageMultisample_remap_index },
- { 16881, FlushMappedBufferRange_remap_index },
- { 24748, MapBufferRange_remap_index },
- { 14498, BindVertexArray_remap_index },
- { 12908, GenVertexArrays_remap_index },
- { 26959, CopyBufferSubData_remap_index },
- { 27738, ClientWaitSync_remap_index },
+ { 14680, GetAttribLocationARB_remap_index },
+ { 26237, DrawBuffersARB_remap_index },
+ { 11694, RenderbufferStorageMultisample_remap_index },
+ { 16938, FlushMappedBufferRange_remap_index },
+ { 24801, MapBufferRange_remap_index },
+ { 14555, BindVertexArray_remap_index },
+ { 12965, GenVertexArrays_remap_index },
+ { 27012, CopyBufferSubData_remap_index },
+ { 27791, ClientWaitSync_remap_index },
{ 2394, DeleteSync_remap_index },
- { 6221, FenceSync_remap_index },
- { 13420, GetInteger64v_remap_index },
- { 19985, GetSynciv_remap_index },
- { 26123, IsSync_remap_index },
- { 8328, WaitSync_remap_index },
+ { 6251, FenceSync_remap_index },
+ { 13477, GetInteger64v_remap_index },
+ { 20070, GetSynciv_remap_index },
+ { 26176, IsSync_remap_index },
+ { 8358, WaitSync_remap_index },
{ 3363, DrawElementsBaseVertex_remap_index },
- { 27202, DrawRangeElementsBaseVertex_remap_index },
- { 23469, MultiDrawElementsBaseVertex_remap_index },
+ { 27255, DrawRangeElementsBaseVertex_remap_index },
+ { 23554, MultiDrawElementsBaseVertex_remap_index },
{ 4711, PolygonOffsetEXT_remap_index },
- { 20570, GetPixelTexGenParameterfvSGIS_remap_index },
+ { 20655, GetPixelTexGenParameterfvSGIS_remap_index },
{ 3895, GetPixelTexGenParameterivSGIS_remap_index },
- { 20303, PixelTexGenParameterfSGIS_remap_index },
+ { 20388, PixelTexGenParameterfSGIS_remap_index },
{ 580, PixelTexGenParameterfvSGIS_remap_index },
- { 11224, PixelTexGenParameteriSGIS_remap_index },
- { 12185, PixelTexGenParameterivSGIS_remap_index },
- { 14586, SampleMaskSGIS_remap_index },
- { 17518, SamplePatternSGIS_remap_index },
- { 23398, ColorPointerEXT_remap_index },
- { 15501, EdgeFlagPointerEXT_remap_index },
- { 5166, IndexPointerEXT_remap_index },
- { 5246, NormalPointerEXT_remap_index },
- { 14014, TexCoordPointerEXT_remap_index },
- { 6016, VertexPointerEXT_remap_index },
+ { 11249, PixelTexGenParameteriSGIS_remap_index },
+ { 12242, PixelTexGenParameterivSGIS_remap_index },
+ { 14643, SampleMaskSGIS_remap_index },
+ { 17603, SamplePatternSGIS_remap_index },
+ { 23483, ColorPointerEXT_remap_index },
+ { 15558, EdgeFlagPointerEXT_remap_index },
+ { 5196, IndexPointerEXT_remap_index },
+ { 5276, NormalPointerEXT_remap_index },
+ { 14071, TexCoordPointerEXT_remap_index },
+ { 6046, VertexPointerEXT_remap_index },
{ 3165, PointParameterfEXT_remap_index },
- { 6861, PointParameterfvEXT_remap_index },
- { 28575, LockArraysEXT_remap_index },
- { 13113, UnlockArraysEXT_remap_index },
- { 7868, CullParameterdvEXT_remap_index },
- { 10359, CullParameterfvEXT_remap_index },
+ { 6891, PointParameterfvEXT_remap_index },
+ { 28667, LockArraysEXT_remap_index },
+ { 13170, UnlockArraysEXT_remap_index },
+ { 7898, CullParameterdvEXT_remap_index },
+ { 10423, CullParameterfvEXT_remap_index },
{ 1151, SecondaryColor3bEXT_remap_index },
- { 7020, SecondaryColor3bvEXT_remap_index },
- { 9238, SecondaryColor3dEXT_remap_index },
- { 22723, SecondaryColor3dvEXT_remap_index },
- { 24994, SecondaryColor3fEXT_remap_index },
- { 16067, SecondaryColor3fvEXT_remap_index },
+ { 7050, SecondaryColor3bvEXT_remap_index },
+ { 9268, SecondaryColor3dEXT_remap_index },
+ { 22808, SecondaryColor3dvEXT_remap_index },
+ { 25047, SecondaryColor3fEXT_remap_index },
+ { 16124, SecondaryColor3fvEXT_remap_index },
{ 426, SecondaryColor3iEXT_remap_index },
- { 14324, SecondaryColor3ivEXT_remap_index },
- { 8896, SecondaryColor3sEXT_remap_index },
- { 27402, SecondaryColor3svEXT_remap_index },
- { 24167, SecondaryColor3ubEXT_remap_index },
- { 18777, SecondaryColor3ubvEXT_remap_index },
- { 11419, SecondaryColor3uiEXT_remap_index },
- { 20190, SecondaryColor3uivEXT_remap_index },
- { 22935, SecondaryColor3usEXT_remap_index },
- { 11492, SecondaryColor3usvEXT_remap_index },
- { 10435, SecondaryColorPointerEXT_remap_index },
- { 22784, MultiDrawArraysEXT_remap_index },
- { 18467, MultiDrawElementsEXT_remap_index },
- { 18662, FogCoordPointerEXT_remap_index },
+ { 14381, SecondaryColor3ivEXT_remap_index },
+ { 8926, SecondaryColor3sEXT_remap_index },
+ { 27455, SecondaryColor3svEXT_remap_index },
+ { 24220, SecondaryColor3ubEXT_remap_index },
+ { 18862, SecondaryColor3ubvEXT_remap_index },
+ { 11444, SecondaryColor3uiEXT_remap_index },
+ { 20275, SecondaryColor3uivEXT_remap_index },
+ { 23020, SecondaryColor3usEXT_remap_index },
+ { 11517, SecondaryColor3usvEXT_remap_index },
+ { 10499, SecondaryColorPointerEXT_remap_index },
+ { 22869, MultiDrawArraysEXT_remap_index },
+ { 18552, MultiDrawElementsEXT_remap_index },
+ { 18747, FogCoordPointerEXT_remap_index },
{ 4044, FogCoorddEXT_remap_index },
- { 27976, FogCoorddvEXT_remap_index },
+ { 28068, FogCoorddvEXT_remap_index },
{ 4136, FogCoordfEXT_remap_index },
- { 24090, FogCoordfvEXT_remap_index },
- { 16785, PixelTexGenSGIX_remap_index },
- { 24675, BlendFuncSeparateEXT_remap_index },
- { 5928, FlushVertexArrayRangeNV_remap_index },
+ { 24143, FogCoordfvEXT_remap_index },
+ { 16842, PixelTexGenSGIX_remap_index },
+ { 24728, BlendFuncSeparateEXT_remap_index },
+ { 5958, FlushVertexArrayRangeNV_remap_index },
{ 4660, VertexArrayRangeNV_remap_index },
- { 25059, CombinerInputNV_remap_index },
+ { 25112, CombinerInputNV_remap_index },
{ 1946, CombinerOutputNV_remap_index },
- { 27555, CombinerParameterfNV_remap_index },
+ { 27608, CombinerParameterfNV_remap_index },
{ 4580, CombinerParameterfvNV_remap_index },
- { 19735, CombinerParameteriNV_remap_index },
- { 28946, CombinerParameterivNV_remap_index },
- { 6298, FinalCombinerInputNV_remap_index },
- { 8725, GetCombinerInputParameterfvNV_remap_index },
- { 28783, GetCombinerInputParameterivNV_remap_index },
- { 6097, GetCombinerOutputParameterfvNV_remap_index },
- { 12146, GetCombinerOutputParameterivNV_remap_index },
- { 5673, GetFinalCombinerInputParameterfvNV_remap_index },
- { 21989, GetFinalCombinerInputParameterivNV_remap_index },
- { 11164, ResizeBuffersMESA_remap_index },
- { 9842, WindowPos2dMESA_remap_index },
+ { 19820, CombinerParameteriNV_remap_index },
+ { 29038, CombinerParameterivNV_remap_index },
+ { 6328, FinalCombinerInputNV_remap_index },
+ { 8755, GetCombinerInputParameterfvNV_remap_index },
+ { 28875, GetCombinerInputParameterivNV_remap_index },
+ { 6127, GetCombinerOutputParameterfvNV_remap_index },
+ { 12171, GetCombinerOutputParameterivNV_remap_index },
+ { 5703, GetFinalCombinerInputParameterfvNV_remap_index },
+ { 22074, GetFinalCombinerInputParameterivNV_remap_index },
+ { 11189, ResizeBuffersMESA_remap_index },
+ { 9872, WindowPos2dMESA_remap_index },
{ 944, WindowPos2dvMESA_remap_index },
- { 29774, WindowPos2fMESA_remap_index },
- { 6965, WindowPos2fvMESA_remap_index },
- { 16014, WindowPos2iMESA_remap_index },
- { 17991, WindowPos2ivMESA_remap_index },
- { 18566, WindowPos2sMESA_remap_index },
- { 4916, WindowPos2svMESA_remap_index },
- { 6790, WindowPos3dMESA_remap_index },
- { 12393, WindowPos3dvMESA_remap_index },
+ { 29866, WindowPos2fMESA_remap_index },
+ { 6995, WindowPos2fvMESA_remap_index },
+ { 16071, WindowPos2iMESA_remap_index },
+ { 18076, WindowPos2ivMESA_remap_index },
+ { 18651, WindowPos2sMESA_remap_index },
+ { 4946, WindowPos2svMESA_remap_index },
+ { 6820, WindowPos3dMESA_remap_index },
+ { 12450, WindowPos3dvMESA_remap_index },
{ 472, WindowPos3fMESA_remap_index },
- { 13174, WindowPos3fvMESA_remap_index },
- { 21284, WindowPos3iMESA_remap_index },
- { 26904, WindowPos3ivMESA_remap_index },
- { 16531, WindowPos3sMESA_remap_index },
- { 28232, WindowPos3svMESA_remap_index },
- { 9793, WindowPos4dMESA_remap_index },
- { 15027, WindowPos4dvMESA_remap_index },
- { 12352, WindowPos4fMESA_remap_index },
- { 27309, WindowPos4fvMESA_remap_index },
- { 27057, WindowPos4iMESA_remap_index },
- { 11003, WindowPos4ivMESA_remap_index },
- { 16664, WindowPos4sMESA_remap_index },
+ { 13231, WindowPos3fvMESA_remap_index },
+ { 21369, WindowPos3iMESA_remap_index },
+ { 26957, WindowPos3ivMESA_remap_index },
+ { 16588, WindowPos3sMESA_remap_index },
+ { 28324, WindowPos3svMESA_remap_index },
+ { 9823, WindowPos4dMESA_remap_index },
+ { 15084, WindowPos4dvMESA_remap_index },
+ { 12409, WindowPos4fMESA_remap_index },
+ { 27362, WindowPos4fvMESA_remap_index },
+ { 27110, WindowPos4iMESA_remap_index },
+ { 11028, WindowPos4ivMESA_remap_index },
+ { 16721, WindowPos4sMESA_remap_index },
{ 2857, WindowPos4svMESA_remap_index },
- { 23833, MultiModeDrawArraysIBM_remap_index },
- { 25777, MultiModeDrawElementsIBM_remap_index },
- { 10814, DeleteFencesNV_remap_index },
- { 24906, FinishFenceNV_remap_index },
+ { 12210, MultiModeDrawArraysIBM_remap_index },
+ { 25830, MultiModeDrawElementsIBM_remap_index },
+ { 10878, DeleteFencesNV_remap_index },
+ { 24959, FinishFenceNV_remap_index },
{ 3287, GenFencesNV_remap_index },
- { 15007, GetFenceivNV_remap_index },
- { 7257, IsFenceNV_remap_index },
- { 12073, SetFenceNV_remap_index },
+ { 15064, GetFenceivNV_remap_index },
+ { 7287, IsFenceNV_remap_index },
+ { 12098, SetFenceNV_remap_index },
{ 3744, TestFenceNV_remap_index },
- { 28203, AreProgramsResidentNV_remap_index },
- { 27597, BindProgramNV_remap_index },
- { 23018, DeleteProgramsNV_remap_index },
- { 18995, ExecuteProgramNV_remap_index },
- { 29667, GenProgramsNV_remap_index },
- { 20649, GetProgramParameterdvNV_remap_index },
- { 9300, GetProgramParameterfvNV_remap_index },
- { 23372, GetProgramStringNV_remap_index },
- { 21678, GetProgramivNV_remap_index },
- { 20883, GetTrackMatrixivNV_remap_index },
- { 23168, GetVertexAttribPointervNV_remap_index },
- { 21922, GetVertexAttribdvNV_remap_index },
- { 16504, GetVertexAttribfvNV_remap_index },
- { 16195, GetVertexAttribivNV_remap_index },
- { 16911, IsProgramNV_remap_index },
- { 8306, LoadProgramNV_remap_index },
- { 24771, ProgramParameters4dvNV_remap_index },
- { 21608, ProgramParameters4fvNV_remap_index },
- { 18295, RequestResidentProgramsNV_remap_index },
- { 19713, TrackMatrixNV_remap_index },
- { 28760, VertexAttrib1dNV_remap_index },
- { 12014, VertexAttrib1dvNV_remap_index },
- { 25309, VertexAttrib1fNV_remap_index },
+ { 28295, AreProgramsResidentNV_remap_index },
+ { 27650, BindProgramNV_remap_index },
+ { 23103, DeleteProgramsNV_remap_index },
+ { 19080, ExecuteProgramNV_remap_index },
+ { 29759, GenProgramsNV_remap_index },
+ { 20734, GetProgramParameterdvNV_remap_index },
+ { 9330, GetProgramParameterfvNV_remap_index },
+ { 23457, GetProgramStringNV_remap_index },
+ { 21763, GetProgramivNV_remap_index },
+ { 20968, GetTrackMatrixivNV_remap_index },
+ { 23253, GetVertexAttribPointervNV_remap_index },
+ { 22007, GetVertexAttribdvNV_remap_index },
+ { 16561, GetVertexAttribfvNV_remap_index },
+ { 16252, GetVertexAttribivNV_remap_index },
+ { 16968, IsProgramNV_remap_index },
+ { 8336, LoadProgramNV_remap_index },
+ { 24824, ProgramParameters4dvNV_remap_index },
+ { 21693, ProgramParameters4fvNV_remap_index },
+ { 18380, RequestResidentProgramsNV_remap_index },
+ { 19798, TrackMatrixNV_remap_index },
+ { 28852, VertexAttrib1dNV_remap_index },
+ { 12039, VertexAttrib1dvNV_remap_index },
+ { 25362, VertexAttrib1fNV_remap_index },
{ 2245, VertexAttrib1fvNV_remap_index },
- { 27366, VertexAttrib1sNV_remap_index },
- { 13247, VertexAttrib1svNV_remap_index },
+ { 27419, VertexAttrib1sNV_remap_index },
+ { 13304, VertexAttrib1svNV_remap_index },
{ 4251, VertexAttrib2dNV_remap_index },
- { 11929, VertexAttrib2dvNV_remap_index },
- { 17750, VertexAttrib2fNV_remap_index },
- { 11540, VertexAttrib2fvNV_remap_index },
- { 5076, VertexAttrib2sNV_remap_index },
- { 16585, VertexAttrib2svNV_remap_index },
- { 9990, VertexAttrib3dNV_remap_index },
- { 28453, VertexAttrib3dvNV_remap_index },
- { 9112, VertexAttrib3fNV_remap_index },
- { 21949, VertexAttrib3fvNV_remap_index },
- { 25284, VertexAttrib3sNV_remap_index },
- { 20910, VertexAttrib3svNV_remap_index },
- { 25751, VertexAttrib4dNV_remap_index },
- { 29704, VertexAttrib4dvNV_remap_index },
+ { 11954, VertexAttrib2dvNV_remap_index },
+ { 17835, VertexAttrib2fNV_remap_index },
+ { 11565, VertexAttrib2fvNV_remap_index },
+ { 5106, VertexAttrib2sNV_remap_index },
+ { 16642, VertexAttrib2svNV_remap_index },
+ { 10020, VertexAttrib3dNV_remap_index },
+ { 28545, VertexAttrib3dvNV_remap_index },
+ { 9142, VertexAttrib3fNV_remap_index },
+ { 22034, VertexAttrib3fvNV_remap_index },
+ { 25337, VertexAttrib3sNV_remap_index },
+ { 20995, VertexAttrib3svNV_remap_index },
+ { 25804, VertexAttrib4dNV_remap_index },
+ { 29796, VertexAttrib4dvNV_remap_index },
{ 3945, VertexAttrib4fNV_remap_index },
- { 8356, VertexAttrib4fvNV_remap_index },
- { 23717, VertexAttrib4sNV_remap_index },
+ { 8386, VertexAttrib4fvNV_remap_index },
+ { 23802, VertexAttrib4sNV_remap_index },
{ 1293, VertexAttrib4svNV_remap_index },
{ 4409, VertexAttrib4ubNV_remap_index },
{ 734, VertexAttrib4ubvNV_remap_index },
- { 19175, VertexAttribPointerNV_remap_index },
+ { 19260, VertexAttribPointerNV_remap_index },
{ 2097, VertexAttribs1dvNV_remap_index },
- { 16609, VertexAttribs1fvNV_remap_index },
- { 29504, VertexAttribs1svNV_remap_index },
- { 9137, VertexAttribs2dvNV_remap_index },
- { 22511, VertexAttribs2fvNV_remap_index },
- { 15527, VertexAttribs2svNV_remap_index },
+ { 16666, VertexAttribs1fvNV_remap_index },
+ { 29596, VertexAttribs1svNV_remap_index },
+ { 9167, VertexAttribs2dvNV_remap_index },
+ { 22596, VertexAttribs2fvNV_remap_index },
+ { 15584, VertexAttribs2svNV_remap_index },
{ 4608, VertexAttribs3dvNV_remap_index },
{ 1977, VertexAttribs3fvNV_remap_index },
- { 26652, VertexAttribs3svNV_remap_index },
- { 23807, VertexAttribs4dvNV_remap_index },
+ { 26705, VertexAttribs3svNV_remap_index },
+ { 23892, VertexAttribs4dvNV_remap_index },
{ 4634, VertexAttribs4fvNV_remap_index },
- { 29291, VertexAttribs4svNV_remap_index },
- { 26400, VertexAttribs4ubvNV_remap_index },
- { 23909, GetTexBumpParameterfvATI_remap_index },
- { 29545, GetTexBumpParameterivATI_remap_index },
- { 16249, TexBumpParameterfvATI_remap_index },
- { 18166, TexBumpParameterivATI_remap_index },
- { 13793, AlphaFragmentOp1ATI_remap_index },
- { 9652, AlphaFragmentOp2ATI_remap_index },
- { 21865, AlphaFragmentOp3ATI_remap_index },
- { 26579, BeginFragmentShaderATI_remap_index },
- { 27796, BindFragmentShaderATI_remap_index },
- { 21039, ColorFragmentOp1ATI_remap_index },
+ { 29383, VertexAttribs4svNV_remap_index },
+ { 26453, VertexAttribs4ubvNV_remap_index },
+ { 23962, GetTexBumpParameterfvATI_remap_index },
+ { 29637, GetTexBumpParameterivATI_remap_index },
+ { 16306, TexBumpParameterfvATI_remap_index },
+ { 18251, TexBumpParameterivATI_remap_index },
+ { 13850, AlphaFragmentOp1ATI_remap_index },
+ { 9682, AlphaFragmentOp2ATI_remap_index },
+ { 21950, AlphaFragmentOp3ATI_remap_index },
+ { 26632, BeginFragmentShaderATI_remap_index },
+ { 27849, BindFragmentShaderATI_remap_index },
+ { 21124, ColorFragmentOp1ATI_remap_index },
{ 3823, ColorFragmentOp2ATI_remap_index },
- { 28098, ColorFragmentOp3ATI_remap_index },
+ { 28190, ColorFragmentOp3ATI_remap_index },
{ 4753, DeleteFragmentShaderATI_remap_index },
- { 29728, EndFragmentShaderATI_remap_index },
- { 28974, GenFragmentShadersATI_remap_index },
- { 22642, PassTexCoordATI_remap_index },
- { 5996, SampleMapATI_remap_index },
- { 5769, SetFragmentShaderConstantATI_remap_index },
+ { 29820, EndFragmentShaderATI_remap_index },
+ { 29066, GenFragmentShadersATI_remap_index },
+ { 22727, PassTexCoordATI_remap_index },
+ { 6026, SampleMapATI_remap_index },
+ { 5799, SetFragmentShaderConstantATI_remap_index },
{ 319, PointParameteriNV_remap_index },
- { 12554, PointParameterivNV_remap_index },
- { 25590, ActiveStencilFaceEXT_remap_index },
- { 24431, BindVertexArrayAPPLE_remap_index },
+ { 12611, PointParameterivNV_remap_index },
+ { 25643, ActiveStencilFaceEXT_remap_index },
+ { 24484, BindVertexArrayAPPLE_remap_index },
{ 2522, DeleteVertexArraysAPPLE_remap_index },
- { 15866, GenVertexArraysAPPLE_remap_index },
- { 20714, IsVertexArrayAPPLE_remap_index },
+ { 15923, GenVertexArraysAPPLE_remap_index },
+ { 20799, IsVertexArrayAPPLE_remap_index },
{ 775, GetProgramNamedParameterdvNV_remap_index },
{ 3128, GetProgramNamedParameterfvNV_remap_index },
- { 23940, ProgramNamedParameter4dNV_remap_index },
- { 12829, ProgramNamedParameter4dvNV_remap_index },
- { 7893, ProgramNamedParameter4fNV_remap_index },
- { 10400, ProgramNamedParameter4fvNV_remap_index },
- { 21587, DepthBoundsEXT_remap_index },
+ { 23993, ProgramNamedParameter4dNV_remap_index },
+ { 12886, ProgramNamedParameter4dvNV_remap_index },
+ { 7923, ProgramNamedParameter4fNV_remap_index },
+ { 10464, ProgramNamedParameter4fvNV_remap_index },
+ { 21672, DepthBoundsEXT_remap_index },
{ 1043, BlendEquationSeparateEXT_remap_index },
- { 12948, BindFramebufferEXT_remap_index },
- { 22829, BindRenderbufferEXT_remap_index },
- { 8575, CheckFramebufferStatusEXT_remap_index },
- { 20004, DeleteFramebuffersEXT_remap_index },
- { 28355, DeleteRenderbuffersEXT_remap_index },
- { 11953, FramebufferRenderbufferEXT_remap_index },
- { 12090, FramebufferTexture1DEXT_remap_index },
- { 10228, FramebufferTexture2DEXT_remap_index },
- { 9895, FramebufferTexture3DEXT_remap_index },
- { 20606, GenFramebuffersEXT_remap_index },
- { 15413, GenRenderbuffersEXT_remap_index },
- { 5715, GenerateMipmapEXT_remap_index },
- { 19235, GetFramebufferAttachmentParameterivEXT_remap_index },
- { 28880, GetRenderbufferParameterivEXT_remap_index },
- { 18046, IsFramebufferEXT_remap_index },
- { 29627, IsRenderbufferEXT_remap_index },
- { 7204, RenderbufferStorageEXT_remap_index },
+ { 13005, BindFramebufferEXT_remap_index },
+ { 22914, BindRenderbufferEXT_remap_index },
+ { 8605, CheckFramebufferStatusEXT_remap_index },
+ { 20089, DeleteFramebuffersEXT_remap_index },
+ { 28447, DeleteRenderbuffersEXT_remap_index },
+ { 11978, FramebufferRenderbufferEXT_remap_index },
+ { 12115, FramebufferTexture1DEXT_remap_index },
+ { 10258, FramebufferTexture2DEXT_remap_index },
+ { 9925, FramebufferTexture3DEXT_remap_index },
+ { 20691, GenFramebuffersEXT_remap_index },
+ { 15470, GenRenderbuffersEXT_remap_index },
+ { 5745, GenerateMipmapEXT_remap_index },
+ { 19320, GetFramebufferAttachmentParameterivEXT_remap_index },
+ { 28972, GetRenderbufferParameterivEXT_remap_index },
+ { 18131, IsFramebufferEXT_remap_index },
+ { 29719, IsRenderbufferEXT_remap_index },
+ { 7234, RenderbufferStorageEXT_remap_index },
{ 651, BlitFramebufferEXT_remap_index },
- { 12648, BufferParameteriAPPLE_remap_index },
- { 16943, FlushMappedBufferRangeAPPLE_remap_index },
+ { 12705, BufferParameteriAPPLE_remap_index },
+ { 17000, FlushMappedBufferRangeAPPLE_remap_index },
{ 2701, FramebufferTextureLayerEXT_remap_index },
- { 8277, ColorMaskIndexedEXT_remap_index },
- { 23256, DisableIndexedEXT_remap_index },
- { 23564, EnableIndexedEXT_remap_index },
- { 19206, GetBooleanIndexedvEXT_remap_index },
- { 9685, GetIntegerIndexedvEXT_remap_index },
- { 20080, IsEnabledIndexedEXT_remap_index },
+ { 8307, ColorMaskIndexedEXT_remap_index },
+ { 23341, DisableIndexedEXT_remap_index },
+ { 23649, EnableIndexedEXT_remap_index },
+ { 19291, GetBooleanIndexedvEXT_remap_index },
+ { 9715, GetIntegerIndexedvEXT_remap_index },
+ { 20165, IsEnabledIndexedEXT_remap_index },
{ 4074, BeginConditionalRenderNV_remap_index },
- { 22615, EndConditionalRenderNV_remap_index },
- { 26301, ProvokingVertexEXT_remap_index },
- { 9521, GetTexParameterPointervAPPLE_remap_index },
+ { 22700, EndConditionalRenderNV_remap_index },
+ { 26354, ProvokingVertexEXT_remap_index },
+ { 9551, GetTexParameterPointervAPPLE_remap_index },
{ 4436, TextureRangeAPPLE_remap_index },
- { 25616, StencilFuncSeparateATI_remap_index },
- { 15933, ProgramEnvParameters4fvEXT_remap_index },
- { 15151, ProgramLocalParameters4fvEXT_remap_index },
- { 12482, GetQueryObjecti64vEXT_remap_index },
- { 9163, GetQueryObjectui64vEXT_remap_index },
- { 21108, EGLImageTargetRenderbufferStorageOES_remap_index },
- { 10753, EGLImageTargetTexture2DOES_remap_index },
+ { 10330, GetObjectParameterivAPPLE_remap_index },
+ { 17575, ObjectPurgeableAPPLE_remap_index },
+ { 4900, ObjectUnpurgeableAPPLE_remap_index },
+ { 25669, StencilFuncSeparateATI_remap_index },
+ { 15990, ProgramEnvParameters4fvEXT_remap_index },
+ { 15208, ProgramLocalParameters4fvEXT_remap_index },
+ { 12539, GetQueryObjecti64vEXT_remap_index },
+ { 9193, GetQueryObjectui64vEXT_remap_index },
+ { 21193, EGLImageTargetRenderbufferStorageOES_remap_index },
+ { 10817, EGLImageTargetTexture2DOES_remap_index },
{ -1, -1 }
};
@@ -4778,108 +4793,108 @@ static const struct gl_function_remap MESA_alt_functions[] = {
/* from GL_EXT_blend_color */
{ 2440, _gloffset_BlendColor },
/* from GL_EXT_blend_minmax */
- { 9952, _gloffset_BlendEquation },
+ { 9982, _gloffset_BlendEquation },
/* from GL_EXT_color_subtable */
- { 15049, _gloffset_ColorSubTable },
- { 28287, _gloffset_CopyColorSubTable },
+ { 15106, _gloffset_ColorSubTable },
+ { 28379, _gloffset_CopyColorSubTable },
/* from GL_EXT_convolution */
{ 213, _gloffset_ConvolutionFilter1D },
{ 2284, _gloffset_CopyConvolutionFilter1D },
{ 3624, _gloffset_GetConvolutionParameteriv },
- { 7553, _gloffset_ConvolutionFilter2D },
- { 7719, _gloffset_ConvolutionParameteriv },
- { 8179, _gloffset_ConvolutionParameterfv },
- { 18194, _gloffset_GetSeparableFilter },
- { 21338, _gloffset_SeparableFilter2D },
- { 22167, _gloffset_ConvolutionParameteri },
- { 22290, _gloffset_ConvolutionParameterf },
- { 23743, _gloffset_GetConvolutionParameterfv },
- { 24597, _gloffset_GetConvolutionFilter },
- { 26841, _gloffset_CopyConvolutionFilter2D },
+ { 7583, _gloffset_ConvolutionFilter2D },
+ { 7749, _gloffset_ConvolutionParameteriv },
+ { 8209, _gloffset_ConvolutionParameterfv },
+ { 18279, _gloffset_GetSeparableFilter },
+ { 21423, _gloffset_SeparableFilter2D },
+ { 22252, _gloffset_ConvolutionParameteri },
+ { 22375, _gloffset_ConvolutionParameterf },
+ { 23828, _gloffset_GetConvolutionParameterfv },
+ { 24650, _gloffset_GetConvolutionFilter },
+ { 26894, _gloffset_CopyConvolutionFilter2D },
/* from GL_EXT_copy_texture */
- { 13307, _gloffset_CopyTexSubImage3D },
- { 14789, _gloffset_CopyTexImage2D },
- { 21775, _gloffset_CopyTexImage1D },
- { 24278, _gloffset_CopyTexSubImage2D },
- { 26479, _gloffset_CopyTexSubImage1D },
+ { 13364, _gloffset_CopyTexSubImage3D },
+ { 14846, _gloffset_CopyTexImage2D },
+ { 21860, _gloffset_CopyTexImage1D },
+ { 24331, _gloffset_CopyTexSubImage2D },
+ { 26532, _gloffset_CopyTexSubImage1D },
/* from GL_EXT_draw_range_elements */
- { 8462, _gloffset_DrawRangeElements },
+ { 8492, _gloffset_DrawRangeElements },
/* from GL_EXT_histogram */
{ 812, _gloffset_Histogram },
{ 3088, _gloffset_ResetHistogram },
- { 8834, _gloffset_GetMinmax },
- { 13641, _gloffset_GetHistogramParameterfv },
- { 21700, _gloffset_GetMinmaxParameteriv },
- { 23633, _gloffset_ResetMinmax },
- { 24494, _gloffset_GetHistogramParameteriv },
- { 25550, _gloffset_GetHistogram },
- { 27912, _gloffset_Minmax },
- { 29374, _gloffset_GetMinmaxParameterfv },
+ { 8864, _gloffset_GetMinmax },
+ { 13698, _gloffset_GetHistogramParameterfv },
+ { 21785, _gloffset_GetMinmaxParameteriv },
+ { 23718, _gloffset_ResetMinmax },
+ { 24547, _gloffset_GetHistogramParameteriv },
+ { 25603, _gloffset_GetHistogram },
+ { 27965, _gloffset_Minmax },
+ { 29466, _gloffset_GetMinmaxParameterfv },
/* from GL_EXT_paletted_texture */
- { 7415, _gloffset_ColorTable },
- { 13487, _gloffset_GetColorTable },
- { 20353, _gloffset_GetColorTableParameterfv },
- { 22346, _gloffset_GetColorTableParameteriv },
+ { 7445, _gloffset_ColorTable },
+ { 13544, _gloffset_GetColorTable },
+ { 20438, _gloffset_GetColorTableParameterfv },
+ { 22431, _gloffset_GetColorTableParameteriv },
/* from GL_EXT_subtexture */
- { 6136, _gloffset_TexSubImage1D },
- { 9448, _gloffset_TexSubImage2D },
+ { 6166, _gloffset_TexSubImage1D },
+ { 9478, _gloffset_TexSubImage2D },
/* from GL_EXT_texture3D */
{ 1658, _gloffset_TexImage3D },
- { 20122, _gloffset_TexSubImage3D },
+ { 20207, _gloffset_TexSubImage3D },
/* from GL_EXT_texture_object */
{ 2964, _gloffset_PrioritizeTextures },
- { 6585, _gloffset_AreTexturesResident },
- { 12038, _gloffset_GenTextures },
- { 13973, _gloffset_DeleteTextures },
- { 17224, _gloffset_IsTexture },
- { 26544, _gloffset_BindTexture },
+ { 6615, _gloffset_AreTexturesResident },
+ { 12063, _gloffset_GenTextures },
+ { 14030, _gloffset_DeleteTextures },
+ { 17281, _gloffset_IsTexture },
+ { 26597, _gloffset_BindTexture },
/* from GL_EXT_vertex_array */
- { 21527, _gloffset_ArrayElement },
- { 27500, _gloffset_GetPointerv },
- { 29001, _gloffset_DrawArrays },
+ { 21612, _gloffset_ArrayElement },
+ { 27553, _gloffset_GetPointerv },
+ { 29093, _gloffset_DrawArrays },
/* from GL_SGI_color_table */
- { 6703, _gloffset_ColorTableParameteriv },
- { 7415, _gloffset_ColorTable },
- { 13487, _gloffset_GetColorTable },
- { 13597, _gloffset_CopyColorTable },
- { 17085, _gloffset_ColorTableParameterfv },
- { 20353, _gloffset_GetColorTableParameterfv },
- { 22346, _gloffset_GetColorTableParameteriv },
+ { 6733, _gloffset_ColorTableParameteriv },
+ { 7445, _gloffset_ColorTable },
+ { 13544, _gloffset_GetColorTable },
+ { 13654, _gloffset_CopyColorTable },
+ { 17142, _gloffset_ColorTableParameterfv },
+ { 20438, _gloffset_GetColorTableParameterfv },
+ { 22431, _gloffset_GetColorTableParameteriv },
/* from GL_VERSION_1_3 */
{ 381, _gloffset_MultiTexCoord3sARB },
{ 613, _gloffset_ActiveTextureARB },
{ 3761, _gloffset_MultiTexCoord1fvARB },
- { 5271, _gloffset_MultiTexCoord3dARB },
- { 5316, _gloffset_MultiTexCoord2iARB },
- { 5440, _gloffset_MultiTexCoord2svARB },
- { 7371, _gloffset_MultiTexCoord2fARB },
- { 9193, _gloffset_MultiTexCoord3fvARB },
- { 9714, _gloffset_MultiTexCoord4sARB },
- { 10314, _gloffset_MultiTexCoord2dvARB },
- { 10696, _gloffset_MultiTexCoord1svARB },
- { 11025, _gloffset_MultiTexCoord3svARB },
- { 11086, _gloffset_MultiTexCoord4iARB },
- { 11809, _gloffset_MultiTexCoord3iARB },
- { 12511, _gloffset_MultiTexCoord1dARB },
- { 12677, _gloffset_MultiTexCoord3dvARB },
- { 13841, _gloffset_MultiTexCoord3ivARB },
- { 13886, _gloffset_MultiTexCoord2sARB },
- { 15106, _gloffset_MultiTexCoord4ivARB },
- { 16735, _gloffset_ClientActiveTextureARB },
- { 18951, _gloffset_MultiTexCoord2dARB },
- { 19355, _gloffset_MultiTexCoord4dvARB },
- { 19641, _gloffset_MultiTexCoord4fvARB },
- { 20494, _gloffset_MultiTexCoord3fARB },
- { 22874, _gloffset_MultiTexCoord4dARB },
- { 23078, _gloffset_MultiTexCoord1sARB },
- { 23280, _gloffset_MultiTexCoord1dvARB },
- { 24122, _gloffset_MultiTexCoord1ivARB },
- { 24215, _gloffset_MultiTexCoord2ivARB },
- { 24554, _gloffset_MultiTexCoord1iARB },
- { 25825, _gloffset_MultiTexCoord4svARB },
- { 26343, _gloffset_MultiTexCoord1fARB },
- { 26606, _gloffset_MultiTexCoord4fARB },
- { 28835, _gloffset_MultiTexCoord2fvARB },
+ { 5301, _gloffset_MultiTexCoord3dARB },
+ { 5346, _gloffset_MultiTexCoord2iARB },
+ { 5470, _gloffset_MultiTexCoord2svARB },
+ { 7401, _gloffset_MultiTexCoord2fARB },
+ { 9223, _gloffset_MultiTexCoord3fvARB },
+ { 9744, _gloffset_MultiTexCoord4sARB },
+ { 10378, _gloffset_MultiTexCoord2dvARB },
+ { 10760, _gloffset_MultiTexCoord1svARB },
+ { 11050, _gloffset_MultiTexCoord3svARB },
+ { 11111, _gloffset_MultiTexCoord4iARB },
+ { 11834, _gloffset_MultiTexCoord3iARB },
+ { 12568, _gloffset_MultiTexCoord1dARB },
+ { 12734, _gloffset_MultiTexCoord3dvARB },
+ { 13898, _gloffset_MultiTexCoord3ivARB },
+ { 13943, _gloffset_MultiTexCoord2sARB },
+ { 15163, _gloffset_MultiTexCoord4ivARB },
+ { 16792, _gloffset_ClientActiveTextureARB },
+ { 19036, _gloffset_MultiTexCoord2dARB },
+ { 19440, _gloffset_MultiTexCoord4dvARB },
+ { 19726, _gloffset_MultiTexCoord4fvARB },
+ { 20579, _gloffset_MultiTexCoord3fARB },
+ { 22959, _gloffset_MultiTexCoord4dARB },
+ { 23163, _gloffset_MultiTexCoord1sARB },
+ { 23365, _gloffset_MultiTexCoord1dvARB },
+ { 24175, _gloffset_MultiTexCoord1ivARB },
+ { 24268, _gloffset_MultiTexCoord2ivARB },
+ { 24607, _gloffset_MultiTexCoord1iARB },
+ { 25878, _gloffset_MultiTexCoord4svARB },
+ { 26396, _gloffset_MultiTexCoord1fARB },
+ { 26659, _gloffset_MultiTexCoord4fARB },
+ { 28927, _gloffset_MultiTexCoord2fvARB },
{ -1, -1 }
};
@@ -4887,7 +4902,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[] = {
- { 8237, -1 }, /* TbufferMask3DFX */
+ { 8267, -1 }, /* TbufferMask3DFX */
{ -1, -1 }
};
#endif
@@ -4899,6 +4914,13 @@ static const struct gl_function_remap GL_APPLE_flush_buffer_range_functions[] =
};
#endif
+#if defined(need_GL_APPLE_object_purgeable)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_APPLE_object_purgeable_functions[] = {
+ { -1, -1 }
+};
+#endif
+
#if defined(need_GL_APPLE_texture_range)
/* functions defined in MESA_remap_table_functions are excluded */
static const struct gl_function_remap GL_APPLE_texture_range_functions[] = {
@@ -4951,10 +4973,10 @@ 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[] = {
{ 3339, -1 }, /* MatrixIndexusvARB */
- { 11630, -1 }, /* MatrixIndexuivARB */
- { 12799, -1 }, /* MatrixIndexPointerARB */
- { 17473, -1 }, /* CurrentPaletteMatrixARB */
- { 20238, -1 }, /* MatrixIndexubvARB */
+ { 11655, -1 }, /* MatrixIndexuivARB */
+ { 12856, -1 }, /* MatrixIndexPointerARB */
+ { 17530, -1 }, /* CurrentPaletteMatrixARB */
+ { 20323, -1 }, /* MatrixIndexubvARB */
{ -1, -1 }
};
#endif
@@ -5025,15 +5047,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[] = {
{ 2226, -1 }, /* WeightubvARB */
- { 5603, -1 }, /* WeightivARB */
- { 9817, -1 }, /* WeightPointerARB */
- { 12268, -1 }, /* WeightfvARB */
- { 15553, -1 }, /* WeightbvARB */
- { 18619, -1 }, /* WeightusvARB */
- { 21264, -1 }, /* VertexBlendARB */
- { 26427, -1 }, /* WeightsvARB */
- { 28337, -1 }, /* WeightdvARB */
- { 29035, -1 }, /* WeightuivARB */
+ { 5633, -1 }, /* WeightivARB */
+ { 9847, -1 }, /* WeightPointerARB */
+ { 12325, -1 }, /* WeightfvARB */
+ { 15610, -1 }, /* WeightbvARB */
+ { 18704, -1 }, /* WeightusvARB */
+ { 21349, -1 }, /* VertexBlendARB */
+ { 26480, -1 }, /* WeightsvARB */
+ { 28429, -1 }, /* WeightdvARB */
+ { 29127, -1 }, /* WeightuivARB */
{ -1, -1 }
};
#endif
@@ -5124,15 +5146,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[] = {
- { 9952, _gloffset_BlendEquation },
+ { 9982, _gloffset_BlendEquation },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_color_subtable)
static const struct gl_function_remap GL_EXT_color_subtable_functions[] = {
- { 15049, _gloffset_ColorSubTable },
- { 28287, _gloffset_CopyColorSubTable },
+ { 15106, _gloffset_ColorSubTable },
+ { 28379, _gloffset_CopyColorSubTable },
{ -1, -1 }
};
#endif
@@ -5149,55 +5171,55 @@ static const struct gl_function_remap GL_EXT_convolution_functions[] = {
{ 213, _gloffset_ConvolutionFilter1D },
{ 2284, _gloffset_CopyConvolutionFilter1D },
{ 3624, _gloffset_GetConvolutionParameteriv },
- { 7553, _gloffset_ConvolutionFilter2D },
- { 7719, _gloffset_ConvolutionParameteriv },
- { 8179, _gloffset_ConvolutionParameterfv },
- { 18194, _gloffset_GetSeparableFilter },
- { 21338, _gloffset_SeparableFilter2D },
- { 22167, _gloffset_ConvolutionParameteri },
- { 22290, _gloffset_ConvolutionParameterf },
- { 23743, _gloffset_GetConvolutionParameterfv },
- { 24597, _gloffset_GetConvolutionFilter },
- { 26841, _gloffset_CopyConvolutionFilter2D },
+ { 7583, _gloffset_ConvolutionFilter2D },
+ { 7749, _gloffset_ConvolutionParameteriv },
+ { 8209, _gloffset_ConvolutionParameterfv },
+ { 18279, _gloffset_GetSeparableFilter },
+ { 21423, _gloffset_SeparableFilter2D },
+ { 22252, _gloffset_ConvolutionParameteri },
+ { 22375, _gloffset_ConvolutionParameterf },
+ { 23828, _gloffset_GetConvolutionParameterfv },
+ { 24650, _gloffset_GetConvolutionFilter },
+ { 26894, _gloffset_CopyConvolutionFilter2D },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_coordinate_frame)
static const struct gl_function_remap GL_EXT_coordinate_frame_functions[] = {
- { 9332, -1 }, /* TangentPointerEXT */
- { 11144, -1 }, /* Binormal3ivEXT */
- { 11762, -1 }, /* Tangent3sEXT */
- { 12864, -1 }, /* Tangent3fvEXT */
- { 16485, -1 }, /* Tangent3dvEXT */
- { 17171, -1 }, /* Binormal3bvEXT */
- { 18247, -1 }, /* Binormal3dEXT */
- { 20170, -1 }, /* Tangent3fEXT */
- { 22239, -1 }, /* Binormal3sEXT */
- { 22684, -1 }, /* Tangent3ivEXT */
- { 22703, -1 }, /* Tangent3dEXT */
- { 23507, -1 }, /* Binormal3svEXT */
- { 24020, -1 }, /* Binormal3fEXT */
- { 24872, -1 }, /* Binormal3dvEXT */
- { 26047, -1 }, /* Tangent3iEXT */
- { 27126, -1 }, /* Tangent3bvEXT */
- { 27535, -1 }, /* Tangent3bEXT */
- { 28060, -1 }, /* Binormal3fvEXT */
- { 28734, -1 }, /* BinormalPointerEXT */
- { 29139, -1 }, /* Tangent3svEXT */
- { 29576, -1 }, /* Binormal3bEXT */
- { 29753, -1 }, /* Binormal3iEXT */
+ { 9362, -1 }, /* TangentPointerEXT */
+ { 11169, -1 }, /* Binormal3ivEXT */
+ { 11787, -1 }, /* Tangent3sEXT */
+ { 12921, -1 }, /* Tangent3fvEXT */
+ { 16542, -1 }, /* Tangent3dvEXT */
+ { 17228, -1 }, /* Binormal3bvEXT */
+ { 18332, -1 }, /* Binormal3dEXT */
+ { 20255, -1 }, /* Tangent3fEXT */
+ { 22324, -1 }, /* Binormal3sEXT */
+ { 22769, -1 }, /* Tangent3ivEXT */
+ { 22788, -1 }, /* Tangent3dEXT */
+ { 23592, -1 }, /* Binormal3svEXT */
+ { 24073, -1 }, /* Binormal3fEXT */
+ { 24925, -1 }, /* Binormal3dvEXT */
+ { 26100, -1 }, /* Tangent3iEXT */
+ { 27179, -1 }, /* Tangent3bvEXT */
+ { 27588, -1 }, /* Tangent3bEXT */
+ { 28152, -1 }, /* Binormal3fvEXT */
+ { 28826, -1 }, /* BinormalPointerEXT */
+ { 29231, -1 }, /* Tangent3svEXT */
+ { 29668, -1 }, /* Binormal3bEXT */
+ { 29845, -1 }, /* Binormal3iEXT */
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_copy_texture)
static const struct gl_function_remap GL_EXT_copy_texture_functions[] = {
- { 13307, _gloffset_CopyTexSubImage3D },
- { 14789, _gloffset_CopyTexImage2D },
- { 21775, _gloffset_CopyTexImage1D },
- { 24278, _gloffset_CopyTexSubImage2D },
- { 26479, _gloffset_CopyTexSubImage1D },
+ { 13364, _gloffset_CopyTexSubImage3D },
+ { 14846, _gloffset_CopyTexImage2D },
+ { 21860, _gloffset_CopyTexImage1D },
+ { 24331, _gloffset_CopyTexSubImage2D },
+ { 26532, _gloffset_CopyTexSubImage1D },
{ -1, -1 }
};
#endif
@@ -5225,7 +5247,7 @@ static const struct gl_function_remap GL_EXT_draw_buffers2_functions[] = {
#if defined(need_GL_EXT_draw_range_elements)
static const struct gl_function_remap GL_EXT_draw_range_elements_functions[] = {
- { 8462, _gloffset_DrawRangeElements },
+ { 8492, _gloffset_DrawRangeElements },
{ -1, -1 }
};
#endif
@@ -5269,37 +5291,37 @@ static const struct gl_function_remap GL_EXT_gpu_program_parameters_functions[]
static const struct gl_function_remap GL_EXT_histogram_functions[] = {
{ 812, _gloffset_Histogram },
{ 3088, _gloffset_ResetHistogram },
- { 8834, _gloffset_GetMinmax },
- { 13641, _gloffset_GetHistogramParameterfv },
- { 21700, _gloffset_GetMinmaxParameteriv },
- { 23633, _gloffset_ResetMinmax },
- { 24494, _gloffset_GetHistogramParameteriv },
- { 25550, _gloffset_GetHistogram },
- { 27912, _gloffset_Minmax },
- { 29374, _gloffset_GetMinmaxParameterfv },
+ { 8864, _gloffset_GetMinmax },
+ { 13698, _gloffset_GetHistogramParameterfv },
+ { 21785, _gloffset_GetMinmaxParameteriv },
+ { 23718, _gloffset_ResetMinmax },
+ { 24547, _gloffset_GetHistogramParameteriv },
+ { 25603, _gloffset_GetHistogram },
+ { 27965, _gloffset_Minmax },
+ { 29466, _gloffset_GetMinmaxParameterfv },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_index_func)
static const struct gl_function_remap GL_EXT_index_func_functions[] = {
- { 10179, -1 }, /* IndexFuncEXT */
+ { 10209, -1 }, /* IndexFuncEXT */
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_index_material)
static const struct gl_function_remap GL_EXT_index_material_functions[] = {
- { 18706, -1 }, /* IndexMaterialEXT */
+ { 18791, -1 }, /* IndexMaterialEXT */
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_light_texture)
static const struct gl_function_remap GL_EXT_light_texture_functions[] = {
- { 23527, -1 }, /* ApplyTextureEXT */
- { 23587, -1 }, /* TextureMaterialEXT */
- { 23612, -1 }, /* TextureLightEXT */
+ { 23612, -1 }, /* ApplyTextureEXT */
+ { 23672, -1 }, /* TextureMaterialEXT */
+ { 23697, -1 }, /* TextureLightEXT */
{ -1, -1 }
};
#endif
@@ -5320,20 +5342,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[] = {
- { 7415, _gloffset_ColorTable },
- { 13487, _gloffset_GetColorTable },
- { 20353, _gloffset_GetColorTableParameterfv },
- { 22346, _gloffset_GetColorTableParameteriv },
+ { 7445, _gloffset_ColorTable },
+ { 13544, _gloffset_GetColorTable },
+ { 20438, _gloffset_GetColorTableParameterfv },
+ { 22431, _gloffset_GetColorTableParameteriv },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_pixel_transform)
static const struct gl_function_remap GL_EXT_pixel_transform_functions[] = {
- { 9573, -1 }, /* PixelTransformParameterfvEXT */
- { 19320, -1 }, /* PixelTransformParameterfEXT */
- { 19400, -1 }, /* PixelTransformParameteriEXT */
- { 28698, -1 }, /* PixelTransformParameterivEXT */
+ { 9603, -1 }, /* PixelTransformParameterfvEXT */
+ { 19405, -1 }, /* PixelTransformParameterfEXT */
+ { 19485, -1 }, /* PixelTransformParameteriEXT */
+ { 28790, -1 }, /* PixelTransformParameterivEXT */
{ -1, -1 }
};
#endif
@@ -5375,8 +5397,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[] = {
- { 6136, _gloffset_TexSubImage1D },
- { 9448, _gloffset_TexSubImage2D },
+ { 6166, _gloffset_TexSubImage1D },
+ { 9478, _gloffset_TexSubImage2D },
{ -1, -1 }
};
#endif
@@ -5384,7 +5406,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[] = {
{ 1658, _gloffset_TexImage3D },
- { 20122, _gloffset_TexSubImage3D },
+ { 20207, _gloffset_TexSubImage3D },
{ -1, -1 }
};
#endif
@@ -5399,18 +5421,18 @@ static const struct gl_function_remap GL_EXT_texture_array_functions[] = {
#if defined(need_GL_EXT_texture_object)
static const struct gl_function_remap GL_EXT_texture_object_functions[] = {
{ 2964, _gloffset_PrioritizeTextures },
- { 6585, _gloffset_AreTexturesResident },
- { 12038, _gloffset_GenTextures },
- { 13973, _gloffset_DeleteTextures },
- { 17224, _gloffset_IsTexture },
- { 26544, _gloffset_BindTexture },
+ { 6615, _gloffset_AreTexturesResident },
+ { 12063, _gloffset_GenTextures },
+ { 14030, _gloffset_DeleteTextures },
+ { 17281, _gloffset_IsTexture },
+ { 26597, _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[] = {
- { 12218, -1 }, /* TextureNormalEXT */
+ { 12275, -1 }, /* TextureNormalEXT */
{ -1, -1 }
};
#endif
@@ -5425,18 +5447,18 @@ static const struct gl_function_remap GL_EXT_timer_query_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[] = {
- { 21527, _gloffset_ArrayElement },
- { 27500, _gloffset_GetPointerv },
- { 29001, _gloffset_DrawArrays },
+ { 21612, _gloffset_ArrayElement },
+ { 27553, _gloffset_GetPointerv },
+ { 29093, _gloffset_DrawArrays },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_vertex_weighting)
static const struct gl_function_remap GL_EXT_vertex_weighting_functions[] = {
- { 17254, -1 }, /* VertexWeightfvEXT */
- { 23998, -1 }, /* VertexWeightfEXT */
- { 25519, -1 }, /* VertexWeightPointerEXT */
+ { 17311, -1 }, /* VertexWeightfvEXT */
+ { 24051, -1 }, /* VertexWeightfEXT */
+ { 25572, -1 }, /* VertexWeightPointerEXT */
{ -1, -1 }
};
#endif
@@ -5445,10 +5467,10 @@ static const struct gl_function_remap GL_EXT_vertex_weighting_functions[] = {
static const struct gl_function_remap GL_HP_image_transform_functions[] = {
{ 2157, -1 }, /* GetImageTransformParameterfvHP */
{ 3305, -1 }, /* ImageTransformParameterfHP */
- { 9026, -1 }, /* ImageTransformParameterfvHP */
- { 10614, -1 }, /* ImageTransformParameteriHP */
- { 10915, -1 }, /* GetImageTransformParameterivHP */
- { 17318, -1 }, /* ImageTransformParameterivHP */
+ { 9056, -1 }, /* ImageTransformParameterfvHP */
+ { 10678, -1 }, /* ImageTransformParameteriHP */
+ { 10940, -1 }, /* GetImageTransformParameterivHP */
+ { 17375, -1 }, /* ImageTransformParameterivHP */
{ -1, -1 }
};
#endif
@@ -5463,13 +5485,13 @@ 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[] = {
{ 3857, -1 }, /* SecondaryColorPointerListIBM */
- { 5137, -1 }, /* NormalPointerListIBM */
- { 6759, -1 }, /* FogCoordPointerListIBM */
- { 7066, -1 }, /* VertexPointerListIBM */
- { 10535, -1 }, /* ColorPointerListIBM */
- { 11869, -1 }, /* TexCoordPointerListIBM */
- { 12240, -1 }, /* IndexPointerListIBM */
- { 29317, -1 }, /* EdgeFlagPointerListIBM */
+ { 5167, -1 }, /* NormalPointerListIBM */
+ { 6789, -1 }, /* FogCoordPointerListIBM */
+ { 7096, -1 }, /* VertexPointerListIBM */
+ { 10599, -1 }, /* ColorPointerListIBM */
+ { 11894, -1 }, /* TexCoordPointerListIBM */
+ { 12297, -1 }, /* IndexPointerListIBM */
+ { 29409, -1 }, /* EdgeFlagPointerListIBM */
{ -1, -1 }
};
#endif
@@ -5483,10 +5505,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[] = {
- { 11256, -1 }, /* VertexPointervINTEL */
- { 13734, -1 }, /* ColorPointervINTEL */
- { 26815, -1 }, /* NormalPointervINTEL */
- { 27241, -1 }, /* TexCoordPointervINTEL */
+ { 11281, -1 }, /* VertexPointervINTEL */
+ { 13791, -1 }, /* ColorPointervINTEL */
+ { 26868, -1 }, /* NormalPointervINTEL */
+ { 27294, -1 }, /* TexCoordPointervINTEL */
{ -1, -1 }
};
#endif
@@ -5503,7 +5525,7 @@ static const struct gl_function_remap GL_MESA_shader_debug_functions[] = {
{ 1522, -1 }, /* GetDebugLogLengthMESA */
{ 3063, -1 }, /* ClearDebugLogMESA */
{ 4018, -1 }, /* GetDebugLogMESA */
- { 27693, -1 }, /* CreateDebugObjectMESA */
+ { 27746, -1 }, /* CreateDebugObjectMESA */
{ -1, -1 }
};
#endif
@@ -5524,15 +5546,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[] = {
- { 5804, -1 }, /* GetMapAttribParameterivNV */
- { 7521, -1 }, /* MapControlPointsNV */
- { 7620, -1 }, /* MapParameterfvNV */
- { 9431, -1 }, /* EvalMapsNV */
- { 15223, -1 }, /* GetMapAttribParameterfvNV */
- { 15389, -1 }, /* MapParameterivNV */
- { 22090, -1 }, /* GetMapParameterivNV */
- { 22588, -1 }, /* GetMapParameterfvNV */
- { 26151, -1 }, /* GetMapControlPointsNV */
+ { 5834, -1 }, /* GetMapAttribParameterivNV */
+ { 7551, -1 }, /* MapControlPointsNV */
+ { 7650, -1 }, /* MapParameterfvNV */
+ { 9461, -1 }, /* EvalMapsNV */
+ { 15280, -1 }, /* GetMapAttribParameterfvNV */
+ { 15446, -1 }, /* MapParameterivNV */
+ { 22175, -1 }, /* GetMapParameterivNV */
+ { 22673, -1 }, /* GetMapParameterfvNV */
+ { 26204, -1 }, /* GetMapControlPointsNV */
{ -1, -1 }
};
#endif
@@ -5567,8 +5589,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[] = {
- { 14126, -1 }, /* CombinerStageParameterfvNV */
- { 14441, -1 }, /* GetCombinerStageParameterfvNV */
+ { 14183, -1 }, /* CombinerStageParameterfvNV */
+ { 14498, -1 }, /* GetCombinerStageParameterfvNV */
{ -1, -1 }
};
#endif
@@ -5596,23 +5618,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[] = {
- { 7705, -1 }, /* HintPGI */
+ { 7735, -1 }, /* HintPGI */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIS_detail_texture)
static const struct gl_function_remap GL_SGIS_detail_texture_functions[] = {
- { 14414, -1 }, /* GetDetailTexFuncSGIS */
- { 14734, -1 }, /* DetailTexFuncSGIS */
+ { 14471, -1 }, /* GetDetailTexFuncSGIS */
+ { 14791, -1 }, /* DetailTexFuncSGIS */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIS_fog_function)
static const struct gl_function_remap GL_SGIS_fog_function_functions[] = {
- { 24260, -1 }, /* FogFuncSGIS */
- { 24925, -1 }, /* GetFogFuncSGIS */
+ { 24313, -1 }, /* FogFuncSGIS */
+ { 24978, -1 }, /* GetFogFuncSGIS */
{ -1, -1 }
};
#endif
@@ -5640,8 +5662,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[] = {
- { 5865, -1 }, /* GetSharpenTexFuncSGIS */
- { 19615, -1 }, /* SharpenTexFuncSGIS */
+ { 5895, -1 }, /* GetSharpenTexFuncSGIS */
+ { 19700, -1 }, /* SharpenTexFuncSGIS */
{ -1, -1 }
};
#endif
@@ -5649,22 +5671,22 @@ 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[] = {
{ 894, -1 }, /* TexImage4DSGIS */
- { 14042, -1 }, /* TexSubImage4DSGIS */
+ { 14099, -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[] = {
- { 13440, -1 }, /* TextureColorMaskSGIS */
+ { 13497, -1 }, /* TextureColorMaskSGIS */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIS_texture_filter4)
static const struct gl_function_remap GL_SGIS_texture_filter4_functions[] = {
- { 6042, -1 }, /* GetTexFilterFuncSGIS */
- { 14560, -1 }, /* TexFilterFuncSGIS */
+ { 6072, -1 }, /* GetTexFilterFuncSGIS */
+ { 14617, -1 }, /* TexFilterFuncSGIS */
{ -1, -1 }
};
#endif
@@ -5674,16 +5696,16 @@ static const struct gl_function_remap GL_SGIX_async_functions[] = {
{ 3014, -1 }, /* AsyncMarkerSGIX */
{ 3997, -1 }, /* FinishAsyncSGIX */
{ 4734, -1 }, /* PollAsyncSGIX */
- { 19762, -1 }, /* DeleteAsyncMarkersSGIX */
- { 19791, -1 }, /* IsAsyncMarkerSGIX */
- { 29114, -1 }, /* GenAsyncMarkersSGIX */
+ { 19847, -1 }, /* DeleteAsyncMarkersSGIX */
+ { 19876, -1 }, /* IsAsyncMarkerSGIX */
+ { 29206, -1 }, /* GenAsyncMarkersSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_flush_raster)
static const struct gl_function_remap GL_SGIX_flush_raster_functions[] = {
- { 6413, -1 }, /* FlushRasterSGIX */
+ { 6443, -1 }, /* FlushRasterSGIX */
{ -1, -1 }
};
#endif
@@ -5693,35 +5715,35 @@ static const struct gl_function_remap GL_SGIX_fragment_lighting_functions[] = {
{ 2410, -1 }, /* FragmentMaterialfvSGIX */
{ 2906, -1 }, /* FragmentLightModelivSGIX */
{ 4685, -1 }, /* FragmentLightiSGIX */
- { 5545, -1 }, /* GetFragmentMaterialfvSGIX */
- { 7133, -1 }, /* FragmentMaterialfSGIX */
- { 7294, -1 }, /* GetFragmentLightivSGIX */
- { 8131, -1 }, /* FragmentLightModeliSGIX */
- { 9494, -1 }, /* FragmentLightivSGIX */
- { 9760, -1 }, /* GetFragmentMaterialivSGIX */
- { 17141, -1 }, /* FragmentLightModelfSGIX */
- { 17441, -1 }, /* FragmentColorMaterialSGIX */
- { 17813, -1 }, /* FragmentMaterialiSGIX */
- { 19034, -1 }, /* LightEnviSGIX */
- { 20445, -1 }, /* FragmentLightModelfvSGIX */
- { 20754, -1 }, /* FragmentLightfvSGIX */
- { 25401, -1 }, /* FragmentLightfSGIX */
- { 28030, -1 }, /* GetFragmentLightfvSGIX */
- { 29597, -1 }, /* FragmentMaterialivSGIX */
+ { 5575, -1 }, /* GetFragmentMaterialfvSGIX */
+ { 7163, -1 }, /* FragmentMaterialfSGIX */
+ { 7324, -1 }, /* GetFragmentLightivSGIX */
+ { 8161, -1 }, /* FragmentLightModeliSGIX */
+ { 9524, -1 }, /* FragmentLightivSGIX */
+ { 9790, -1 }, /* GetFragmentMaterialivSGIX */
+ { 17198, -1 }, /* FragmentLightModelfSGIX */
+ { 17498, -1 }, /* FragmentColorMaterialSGIX */
+ { 17898, -1 }, /* FragmentMaterialiSGIX */
+ { 19119, -1 }, /* LightEnviSGIX */
+ { 20530, -1 }, /* FragmentLightModelfvSGIX */
+ { 20839, -1 }, /* FragmentLightfvSGIX */
+ { 25454, -1 }, /* FragmentLightfSGIX */
+ { 28122, -1 }, /* GetFragmentLightfvSGIX */
+ { 29689, -1 }, /* FragmentMaterialivSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_framezoom)
static const struct gl_function_remap GL_SGIX_framezoom_functions[] = {
- { 19814, -1 }, /* FrameZoomSGIX */
+ { 19899, -1 }, /* FrameZoomSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_igloo_interface)
static const struct gl_function_remap GL_SGIX_igloo_interface_functions[] = {
- { 25709, -1 }, /* IglooInterfaceSGIX */
+ { 25762, -1 }, /* IglooInterfaceSGIX */
{ -1, -1 }
};
#endif
@@ -5729,11 +5751,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[] = {
{ 2573, -1 }, /* ReadInstrumentsSGIX */
- { 5621, -1 }, /* PollInstrumentsSGIX */
- { 9392, -1 }, /* GetInstrumentsSGIX */
- { 11467, -1 }, /* StartInstrumentsSGIX */
- { 14160, -1 }, /* StopInstrumentsSGIX */
- { 15766, -1 }, /* InstrumentsBufferSGIX */
+ { 5651, -1 }, /* PollInstrumentsSGIX */
+ { 9422, -1 }, /* GetInstrumentsSGIX */
+ { 11492, -1 }, /* StartInstrumentsSGIX */
+ { 14217, -1 }, /* StopInstrumentsSGIX */
+ { 15823, -1 }, /* InstrumentsBufferSGIX */
{ -1, -1 }
};
#endif
@@ -5742,10 +5764,10 @@ static const struct gl_function_remap GL_SGIX_instruments_functions[] = {
static const struct gl_function_remap GL_SGIX_list_priority_functions[] = {
{ 1125, -1 }, /* ListParameterfSGIX */
{ 2763, -1 }, /* GetListParameterfvSGIX */
- { 15681, -1 }, /* ListParameteriSGIX */
- { 16435, -1 }, /* ListParameterfvSGIX */
- { 18440, -1 }, /* ListParameterivSGIX */
- { 29158, -1 }, /* GetListParameterivSGIX */
+ { 15738, -1 }, /* ListParameteriSGIX */
+ { 16492, -1 }, /* ListParameterfvSGIX */
+ { 18525, -1 }, /* ListParameterivSGIX */
+ { 29250, -1 }, /* GetListParameterivSGIX */
{ -1, -1 }
};
#endif
@@ -5760,53 +5782,53 @@ 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[] = {
{ 3251, -1 }, /* LoadIdentityDeformationMapSGIX */
- { 10835, -1 }, /* DeformationMap3dSGIX */
- { 14260, -1 }, /* DeformSGIX */
- { 21639, -1 }, /* DeformationMap3fSGIX */
+ { 14317, -1 }, /* DeformSGIX */
+ { 21724, -1 }, /* DeformationMap3fSGIX */
+ { 28010, -1 }, /* DeformationMap3dSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_reference_plane)
static const struct gl_function_remap GL_SGIX_reference_plane_functions[] = {
- { 12991, -1 }, /* ReferencePlaneSGIX */
+ { 13048, -1 }, /* ReferencePlaneSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_sprite)
static const struct gl_function_remap GL_SGIX_sprite_functions[] = {
- { 8547, -1 }, /* SpriteParameterfvSGIX */
- { 18268, -1 }, /* SpriteParameteriSGIX */
- { 23667, -1 }, /* SpriteParameterfSGIX */
- { 26273, -1 }, /* SpriteParameterivSGIX */
+ { 8577, -1 }, /* SpriteParameterfvSGIX */
+ { 18353, -1 }, /* SpriteParameteriSGIX */
+ { 23752, -1 }, /* SpriteParameterfSGIX */
+ { 26326, -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[] = {
- { 18327, -1 }, /* TagSampleBufferSGIX */
+ { 18412, -1 }, /* TagSampleBufferSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGI_color_table)
static const struct gl_function_remap GL_SGI_color_table_functions[] = {
- { 6703, _gloffset_ColorTableParameteriv },
- { 7415, _gloffset_ColorTable },
- { 13487, _gloffset_GetColorTable },
- { 13597, _gloffset_CopyColorTable },
- { 17085, _gloffset_ColorTableParameterfv },
- { 20353, _gloffset_GetColorTableParameterfv },
- { 22346, _gloffset_GetColorTableParameteriv },
+ { 6733, _gloffset_ColorTableParameteriv },
+ { 7445, _gloffset_ColorTable },
+ { 13544, _gloffset_GetColorTable },
+ { 13654, _gloffset_CopyColorTable },
+ { 17142, _gloffset_ColorTableParameterfv },
+ { 20438, _gloffset_GetColorTableParameterfv },
+ { 22431, _gloffset_GetColorTableParameteriv },
{ -1, -1 }
};
#endif
#if defined(need_GL_SUNX_constant_data)
static const struct gl_function_remap GL_SUNX_constant_data_functions[] = {
- { 28008, -1 }, /* FinishTextureSUNX */
+ { 28100, -1 }, /* FinishTextureSUNX */
{ -1, -1 }
};
#endif
@@ -5815,19 +5837,19 @@ static const struct gl_function_remap GL_SUNX_constant_data_functions[] = {
static const struct gl_function_remap GL_SUN_global_alpha_functions[] = {
{ 3035, -1 }, /* GlobalAlphaFactorubSUN */
{ 4224, -1 }, /* GlobalAlphaFactoriSUN */
- { 5646, -1 }, /* GlobalAlphaFactordSUN */
- { 8631, -1 }, /* GlobalAlphaFactoruiSUN */
- { 8983, -1 }, /* GlobalAlphaFactorbSUN */
- { 11782, -1 }, /* GlobalAlphaFactorfSUN */
- { 11901, -1 }, /* GlobalAlphaFactorusSUN */
- { 20053, -1 }, /* GlobalAlphaFactorsSUN */
+ { 5676, -1 }, /* GlobalAlphaFactordSUN */
+ { 8661, -1 }, /* GlobalAlphaFactoruiSUN */
+ { 9013, -1 }, /* GlobalAlphaFactorbSUN */
+ { 11807, -1 }, /* GlobalAlphaFactorfSUN */
+ { 11926, -1 }, /* GlobalAlphaFactorusSUN */
+ { 20138, -1 }, /* GlobalAlphaFactorsSUN */
{ -1, -1 }
};
#endif
#if defined(need_GL_SUN_mesh_array)
static const struct gl_function_remap GL_SUN_mesh_array_functions[] = {
- { 26085, -1 }, /* DrawMeshArraysSUN */
+ { 26138, -1 }, /* DrawMeshArraysSUN */
{ -1, -1 }
};
#endif
@@ -5835,12 +5857,12 @@ static const struct gl_function_remap GL_SUN_mesh_array_functions[] = {
#if defined(need_GL_SUN_triangle_list)
static const struct gl_function_remap GL_SUN_triangle_list_functions[] = {
{ 3971, -1 }, /* ReplacementCodeubSUN */
- { 5485, -1 }, /* ReplacementCodeubvSUN */
- { 16806, -1 }, /* ReplacementCodeusvSUN */
- { 16994, -1 }, /* ReplacementCodePointerSUN */
- { 18351, -1 }, /* ReplacementCodeusSUN */
- { 19098, -1 }, /* ReplacementCodeuiSUN */
- { 26730, -1 }, /* ReplacementCodeuivSUN */
+ { 5515, -1 }, /* ReplacementCodeubvSUN */
+ { 16863, -1 }, /* ReplacementCodeusvSUN */
+ { 17051, -1 }, /* ReplacementCodePointerSUN */
+ { 18436, -1 }, /* ReplacementCodeusSUN */
+ { 19183, -1 }, /* ReplacementCodeuiSUN */
+ { 26783, -1 }, /* ReplacementCodeuivSUN */
{ -1, -1 }
};
#endif
@@ -5858,35 +5880,35 @@ static const struct gl_function_remap GL_SUN_vertex_functions[] = {
{ 4181, -1 }, /* TexCoord2fVertex3fSUN */
{ 4480, -1 }, /* TexCoord2fColor4fNormal3fVertex3fSUN */
{ 4810, -1 }, /* TexCoord2fNormal3fVertex3fvSUN */
- { 5380, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN */
- { 6450, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fSUN */
- { 7162, -1 }, /* TexCoord2fNormal3fVertex3fSUN */
- { 7930, -1 }, /* Color3fVertex3fSUN */
- { 8942, -1 }, /* Color3fVertex3fvSUN */
- { 9357, -1 }, /* Color4fNormal3fVertex3fvSUN */
- { 10058, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN */
- { 11330, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fvSUN */
- { 12722, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN */
- { 13133, -1 }, /* TexCoord2fColor3fVertex3fSUN */
- { 14185, -1 }, /* TexCoord4fColor4fNormal3fVertex4fSUN */
- { 14519, -1 }, /* Color4ubVertex2fvSUN */
- { 14759, -1 }, /* Normal3fVertex3fSUN */
- { 15707, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fSUN */
- { 15968, -1 }, /* TexCoord2fColor4fNormal3fVertex3fvSUN */
- { 16635, -1 }, /* TexCoord2fVertex3fvSUN */
- { 17411, -1 }, /* Color4ubVertex2fSUN */
- { 17604, -1 }, /* ReplacementCodeuiColor4ubVertex3fSUN */
- { 19486, -1 }, /* TexCoord2fColor4ubVertex3fSUN */
- { 19833, -1 }, /* Normal3fVertex3fvSUN */
- { 20262, -1 }, /* Color4fNormal3fVertex3fSUN */
- { 21171, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN */
- { 21391, -1 }, /* ReplacementCodeuiColor4ubVertex3fvSUN */
- { 23121, -1 }, /* ReplacementCodeuiColor3fVertex3fSUN */
- { 24376, -1 }, /* TexCoord4fVertex4fSUN */
- { 24802, -1 }, /* TexCoord2fColor3fVertex3fvSUN */
- { 25128, -1 }, /* ReplacementCodeuiNormal3fVertex3fvSUN */
- { 25255, -1 }, /* TexCoord4fVertex4fvSUN */
- { 25957, -1 }, /* ReplacementCodeuiVertex3fSUN */
+ { 5410, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN */
+ { 6480, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fSUN */
+ { 7192, -1 }, /* TexCoord2fNormal3fVertex3fSUN */
+ { 7960, -1 }, /* Color3fVertex3fSUN */
+ { 8972, -1 }, /* Color3fVertex3fvSUN */
+ { 9387, -1 }, /* Color4fNormal3fVertex3fvSUN */
+ { 10088, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN */
+ { 11355, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fvSUN */
+ { 12779, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN */
+ { 13190, -1 }, /* TexCoord2fColor3fVertex3fSUN */
+ { 14242, -1 }, /* TexCoord4fColor4fNormal3fVertex4fSUN */
+ { 14576, -1 }, /* Color4ubVertex2fvSUN */
+ { 14816, -1 }, /* Normal3fVertex3fSUN */
+ { 15764, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fSUN */
+ { 16025, -1 }, /* TexCoord2fColor4fNormal3fVertex3fvSUN */
+ { 16692, -1 }, /* TexCoord2fVertex3fvSUN */
+ { 17468, -1 }, /* Color4ubVertex2fSUN */
+ { 17689, -1 }, /* ReplacementCodeuiColor4ubVertex3fSUN */
+ { 19571, -1 }, /* TexCoord2fColor4ubVertex3fSUN */
+ { 19918, -1 }, /* Normal3fVertex3fvSUN */
+ { 20347, -1 }, /* Color4fNormal3fVertex3fSUN */
+ { 21256, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN */
+ { 21476, -1 }, /* ReplacementCodeuiColor4ubVertex3fvSUN */
+ { 23206, -1 }, /* ReplacementCodeuiColor3fVertex3fSUN */
+ { 24429, -1 }, /* TexCoord4fVertex4fSUN */
+ { 24855, -1 }, /* TexCoord2fColor3fVertex3fvSUN */
+ { 25181, -1 }, /* ReplacementCodeuiNormal3fVertex3fvSUN */
+ { 25308, -1 }, /* TexCoord4fVertex4fvSUN */
+ { 26010, -1 }, /* ReplacementCodeuiVertex3fSUN */
{ -1, -1 }
};
#endif
@@ -5897,37 +5919,37 @@ static const struct gl_function_remap GL_VERSION_1_3_functions[] = {
{ 381, _gloffset_MultiTexCoord3sARB },
{ 613, _gloffset_ActiveTextureARB },
{ 3761, _gloffset_MultiTexCoord1fvARB },
- { 5271, _gloffset_MultiTexCoord3dARB },
- { 5316, _gloffset_MultiTexCoord2iARB },
- { 5440, _gloffset_MultiTexCoord2svARB },
- { 7371, _gloffset_MultiTexCoord2fARB },
- { 9193, _gloffset_MultiTexCoord3fvARB },
- { 9714, _gloffset_MultiTexCoord4sARB },
- { 10314, _gloffset_MultiTexCoord2dvARB },
- { 10696, _gloffset_MultiTexCoord1svARB },
- { 11025, _gloffset_MultiTexCoord3svARB },
- { 11086, _gloffset_MultiTexCoord4iARB },
- { 11809, _gloffset_MultiTexCoord3iARB },
- { 12511, _gloffset_MultiTexCoord1dARB },
- { 12677, _gloffset_MultiTexCoord3dvARB },
- { 13841, _gloffset_MultiTexCoord3ivARB },
- { 13886, _gloffset_MultiTexCoord2sARB },
- { 15106, _gloffset_MultiTexCoord4ivARB },
- { 16735, _gloffset_ClientActiveTextureARB },
- { 18951, _gloffset_MultiTexCoord2dARB },
- { 19355, _gloffset_MultiTexCoord4dvARB },
- { 19641, _gloffset_MultiTexCoord4fvARB },
- { 20494, _gloffset_MultiTexCoord3fARB },
- { 22874, _gloffset_MultiTexCoord4dARB },
- { 23078, _gloffset_MultiTexCoord1sARB },
- { 23280, _gloffset_MultiTexCoord1dvARB },
- { 24122, _gloffset_MultiTexCoord1ivARB },
- { 24215, _gloffset_MultiTexCoord2ivARB },
- { 24554, _gloffset_MultiTexCoord1iARB },
- { 25825, _gloffset_MultiTexCoord4svARB },
- { 26343, _gloffset_MultiTexCoord1fARB },
- { 26606, _gloffset_MultiTexCoord4fARB },
- { 28835, _gloffset_MultiTexCoord2fvARB },
+ { 5301, _gloffset_MultiTexCoord3dARB },
+ { 5346, _gloffset_MultiTexCoord2iARB },
+ { 5470, _gloffset_MultiTexCoord2svARB },
+ { 7401, _gloffset_MultiTexCoord2fARB },
+ { 9223, _gloffset_MultiTexCoord3fvARB },
+ { 9744, _gloffset_MultiTexCoord4sARB },
+ { 10378, _gloffset_MultiTexCoord2dvARB },
+ { 10760, _gloffset_MultiTexCoord1svARB },
+ { 11050, _gloffset_MultiTexCoord3svARB },
+ { 11111, _gloffset_MultiTexCoord4iARB },
+ { 11834, _gloffset_MultiTexCoord3iARB },
+ { 12568, _gloffset_MultiTexCoord1dARB },
+ { 12734, _gloffset_MultiTexCoord3dvARB },
+ { 13898, _gloffset_MultiTexCoord3ivARB },
+ { 13943, _gloffset_MultiTexCoord2sARB },
+ { 15163, _gloffset_MultiTexCoord4ivARB },
+ { 16792, _gloffset_ClientActiveTextureARB },
+ { 19036, _gloffset_MultiTexCoord2dARB },
+ { 19440, _gloffset_MultiTexCoord4dvARB },
+ { 19726, _gloffset_MultiTexCoord4fvARB },
+ { 20579, _gloffset_MultiTexCoord3fARB },
+ { 22959, _gloffset_MultiTexCoord4dARB },
+ { 23163, _gloffset_MultiTexCoord1sARB },
+ { 23365, _gloffset_MultiTexCoord1dvARB },
+ { 24175, _gloffset_MultiTexCoord1ivARB },
+ { 24268, _gloffset_MultiTexCoord2ivARB },
+ { 24607, _gloffset_MultiTexCoord1iARB },
+ { 25878, _gloffset_MultiTexCoord4svARB },
+ { 26396, _gloffset_MultiTexCoord1fARB },
+ { 26659, _gloffset_MultiTexCoord4fARB },
+ { 28927, _gloffset_MultiTexCoord2fvARB },
{ -1, -1 }
};
#endif
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c
index 2f42924046..4d7b0aff04 100644
--- a/src/mesa/main/renderbuffer.c
+++ b/src/mesa/main/renderbuffer.c
@@ -1553,62 +1553,6 @@ _mesa_add_color_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb,
/**
- * Add software-based color index renderbuffers to the given framebuffer.
- * This is a helper routine for device drivers when creating a
- * window system framebuffer (not a user-created render/framebuffer).
- * Once this function is called, you can basically forget about this
- * renderbuffer; core Mesa will handle all the buffer management and
- * rendering!
- */
-GLboolean
-_mesa_add_color_index_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb,
- GLuint indexBits,
- GLboolean frontLeft, GLboolean backLeft,
- GLboolean frontRight, GLboolean backRight)
-{
- GLuint b;
-
- if (indexBits > 8) {
- _mesa_problem(ctx,
- "Unsupported bit depth in _mesa_add_color_index_renderbuffers");
- return GL_FALSE;
- }
-
- assert(MAX_COLOR_ATTACHMENTS >= 4);
-
- for (b = BUFFER_FRONT_LEFT; b <= BUFFER_BACK_RIGHT; b++) {
- struct gl_renderbuffer *rb;
-
- if (b == BUFFER_FRONT_LEFT && !frontLeft)
- continue;
- else if (b == BUFFER_BACK_LEFT && !backLeft)
- continue;
- else if (b == BUFFER_FRONT_RIGHT && !frontRight)
- continue;
- else if (b == BUFFER_BACK_RIGHT && !backRight)
- continue;
-
- assert(fb->Attachment[b].Renderbuffer == NULL);
-
- rb = _mesa_new_renderbuffer(ctx, 0);
- if (!rb) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "Allocating color buffer");
- return GL_FALSE;
- }
-
- assert(indexBits <= 8);
- rb->Format = MESA_FORMAT_CI8;
- rb->InternalFormat = GL_COLOR_INDEX;
-
- rb->AllocStorage = _mesa_soft_renderbuffer_storage;
- _mesa_add_renderbuffer(fb, b, rb);
- }
-
- return GL_TRUE;
-}
-
-
-/**
* Add software-based alpha renderbuffers to the given framebuffer.
* This is a helper routine for device drivers when creating a
* window system framebuffer (not a user-created render/framebuffer).
@@ -1907,21 +1851,13 @@ _mesa_add_soft_renderbuffers(struct gl_framebuffer *fb,
GLboolean backRight = fb->Visual.stereoMode && fb->Visual.doubleBufferMode;
if (color) {
- if (fb->Visual.rgbMode) {
- assert(fb->Visual.redBits == fb->Visual.greenBits);
- assert(fb->Visual.redBits == fb->Visual.blueBits);
- _mesa_add_color_renderbuffers(NULL, fb,
- fb->Visual.redBits,
- fb->Visual.alphaBits,
- frontLeft, backLeft,
- frontRight, backRight);
- }
- else {
- _mesa_add_color_index_renderbuffers(NULL, fb,
- fb->Visual.indexBits,
- frontLeft, backLeft,
- frontRight, backRight);
- }
+ assert(fb->Visual.redBits == fb->Visual.greenBits);
+ assert(fb->Visual.redBits == fb->Visual.blueBits);
+ _mesa_add_color_renderbuffers(NULL, fb,
+ fb->Visual.redBits,
+ fb->Visual.alphaBits,
+ frontLeft, backLeft,
+ frontRight, backRight);
}
if (depth) {
@@ -1935,7 +1871,6 @@ _mesa_add_soft_renderbuffers(struct gl_framebuffer *fb,
}
if (accum) {
- assert(fb->Visual.rgbMode);
assert(fb->Visual.accumRedBits > 0);
assert(fb->Visual.accumGreenBits > 0);
assert(fb->Visual.accumBlueBits > 0);
@@ -1947,14 +1882,12 @@ _mesa_add_soft_renderbuffers(struct gl_framebuffer *fb,
}
if (aux) {
- assert(fb->Visual.rgbMode);
assert(fb->Visual.numAuxBuffers > 0);
_mesa_add_aux_renderbuffers(NULL, fb, fb->Visual.redBits,
fb->Visual.numAuxBuffers);
}
if (alpha) {
- assert(fb->Visual.rgbMode);
assert(fb->Visual.alphaBits > 0);
_mesa_add_alpha_renderbuffers(NULL, fb, fb->Visual.alphaBits,
frontLeft, backLeft,
diff --git a/src/mesa/main/renderbuffer.h b/src/mesa/main/renderbuffer.h
index c9bf888548..7c205e141c 100644
--- a/src/mesa/main/renderbuffer.h
+++ b/src/mesa/main/renderbuffer.h
@@ -53,12 +53,6 @@ _mesa_add_color_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb,
GLboolean frontRight, GLboolean backRight);
extern GLboolean
-_mesa_add_color_index_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb,
- GLuint indexBits,
- GLboolean frontLeft, GLboolean backLeft,
- GLboolean frontRight, GLboolean backRight);
-
-extern GLboolean
_mesa_add_alpha_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb,
GLuint alphaBits,
GLboolean frontLeft, GLboolean backLeft,
diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h
index d521569f8d..59f62ebd6c 100644
--- a/src/mesa/main/version.h
+++ b/src/mesa/main/version.h
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 7.8
+ * Version: 7.9
*
* Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
* Copyright (C) 2009 VMware, Inc. All Rights Reserved.
@@ -33,9 +33,9 @@
/* Mesa version */
#define MESA_MAJOR 7
-#define MESA_MINOR 8
+#define MESA_MINOR 9
#define MESA_PATCH 0
-#define MESA_VERSION_STRING "7.8-devel"
+#define MESA_VERSION_STRING "7.9-devel"
/* To make version comparison easy */
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c
index a1c20a325e..37750cc330 100644
--- a/src/mesa/shader/prog_execute.c
+++ b/src/mesa/shader/prog_execute.c
@@ -1767,10 +1767,15 @@ _mesa_execute_program(GLcontext * ctx,
break;
case OPCODE_PRINT:
{
- GLfloat a[4];
- fetch_vector4(&inst->SrcReg[0], machine, a);
- printf("%s%g, %g, %g, %g\n", (const char *) inst->Data,
- a[0], a[1], a[2], a[3]);
+ if (inst->SrcReg[0].File != -1) {
+ GLfloat a[4];
+ fetch_vector4(&inst->SrcReg[0], machine, a);
+ printf("%s%g, %g, %g, %g\n", (const char *) inst->Data,
+ a[0], a[1], a[2], a[3]);
+ }
+ else {
+ printf("%s\n", (const char *) inst->Data);
+ }
}
break;
case OPCODE_END:
diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c
index 5533cc5b65..791e751526 100644
--- a/src/mesa/shader/slang/slang_builtin.c
+++ b/src/mesa/shader/slang/slang_builtin.c
@@ -142,6 +142,7 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field,
tokens[1] = index1;
}
else if (strcmp(var, "gl_Point") == 0) {
+ assert(field);
if (strcmp(field, "size") == 0) {
tokens[0] = STATE_POINT_SIZE;
*swizzleOut = SWIZZLE_XXXX;
@@ -181,6 +182,7 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field,
tokens[1] = 0;
else
tokens[1] = 1;
+ assert(field);
if (strcmp(field, "emission") == 0) {
tokens[2] = STATE_EMISSION;
}
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index 6d1cea28a7..ecb2f6d5c1 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -1754,7 +1754,7 @@ swizzle_to_writemask(slang_assemble_ctx *A, GLuint swizzle,
/* end */
break;
}
- assert(swz >= 0 && swz <= 3);
+ assert(swz <= 3);
if (swizzle != SWIZZLE_XXXX &&
swizzle != SWIZZLE_YYYY &&
@@ -1894,6 +1894,7 @@ _slang_gen_asm(slang_assemble_ctx *A, slang_operation *oper,
_mesa_problem(NULL, "undefined __asm function %s\n",
(char *) oper->a_id);
assert(info);
+ return NULL;
}
assert(info->NumParams <= 3);
@@ -4207,7 +4208,7 @@ swizzle_size(GLuint swizzle)
GLuint size = 0, i;
for (i = 0; i < 4; i++) {
GLuint swz = GET_SWZ(swizzle, i);
- size += (swz >= 0 && swz <= 3);
+ size += (swz <= 3);
}
return size;
}
diff --git a/src/mesa/sparc/glapi_sparc.S b/src/mesa/sparc/glapi_sparc.S
index 3fbdb4abb3..478adc6520 100644
--- a/src/mesa/sparc/glapi_sparc.S
+++ b/src/mesa/sparc/glapi_sparc.S
@@ -1027,16 +1027,19 @@ gl_dispatch_functions_start:
HIDDEN(gl_dispatch_stub_796)
GL_STUB(gl_dispatch_stub_797, _gloffset_TextureRangeAPPLE)
HIDDEN(gl_dispatch_stub_797)
- GL_STUB(gl_dispatch_stub_798, _gloffset_StencilFuncSeparateATI)
- HIDDEN(gl_dispatch_stub_798)
- GL_STUB(gl_dispatch_stub_799, _gloffset_ProgramEnvParameters4fvEXT)
- HIDDEN(gl_dispatch_stub_799)
- GL_STUB(gl_dispatch_stub_800, _gloffset_ProgramLocalParameters4fvEXT)
- HIDDEN(gl_dispatch_stub_800)
- GL_STUB(gl_dispatch_stub_801, _gloffset_GetQueryObjecti64vEXT)
+ GL_STUB(glGetObjectParameterivAPPLE, _gloffset_GetObjectParameterivAPPLE)
+ GL_STUB(glObjectPurgeableAPPLE, _gloffset_ObjectPurgeableAPPLE)
+ GL_STUB(glObjectUnpurgeableAPPLE, _gloffset_ObjectUnpurgeableAPPLE)
+ GL_STUB(gl_dispatch_stub_801, _gloffset_StencilFuncSeparateATI)
HIDDEN(gl_dispatch_stub_801)
- GL_STUB(gl_dispatch_stub_802, _gloffset_GetQueryObjectui64vEXT)
+ GL_STUB(gl_dispatch_stub_802, _gloffset_ProgramEnvParameters4fvEXT)
HIDDEN(gl_dispatch_stub_802)
+ GL_STUB(gl_dispatch_stub_803, _gloffset_ProgramLocalParameters4fvEXT)
+ HIDDEN(gl_dispatch_stub_803)
+ GL_STUB(gl_dispatch_stub_804, _gloffset_GetQueryObjecti64vEXT)
+ HIDDEN(gl_dispatch_stub_804)
+ GL_STUB(gl_dispatch_stub_805, _gloffset_GetQueryObjectui64vEXT)
+ HIDDEN(gl_dispatch_stub_805)
GL_STUB(glEGLImageTargetRenderbufferStorageOES, _gloffset_EGLImageTargetRenderbufferStorageOES)
GL_STUB(glEGLImageTargetTexture2DOES, _gloffset_EGLImageTargetTexture2DOES)
GL_STUB_ALIAS(glArrayElementEXT, glArrayElement)
diff --git a/src/mesa/state_tracker/st_atom_clip.c b/src/mesa/state_tracker/st_atom_clip.c
index 23d709b814..80c0e92139 100644
--- a/src/mesa/state_tracker/st_atom_clip.c
+++ b/src/mesa/state_tracker/st_atom_clip.c
@@ -35,6 +35,8 @@
#include "pipe/p_context.h"
#include "st_atom.h"
+#include "cso_cache/cso_context.h"
+
/* Second state atom for user clip planes:
*/
@@ -56,7 +58,7 @@ static void update_clip( struct st_context *st )
if (memcmp(&clip, &st->state.clip, sizeof(clip)) != 0) {
st->state.clip = clip;
- st->pipe->set_clip_state(st->pipe, &clip);
+ cso_set_clip(st->cso_context, &clip);
}
}
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index 898c32293d..9e66eed363 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -62,11 +62,9 @@ st_init_clear(struct st_context *st)
{
struct pipe_context *pipe = st->pipe;
- memset(&st->clear.raster, 0, sizeof(st->clear.raster));
- st->clear.raster.gl_rasterization_rules = 1;
+ memset(&st->clear, 0, sizeof(st->clear));
- /* rasterizer state: bypass vertex shader, clipping and viewport */
- st->clear.raster.bypass_vs_clip_and_viewport = 1;
+ st->clear.raster.gl_rasterization_rules = 1;
/* fragment shader state: color pass-through program */
st->clear.fs =
@@ -104,9 +102,7 @@ st_destroy_clear(struct st_context *st)
/**
* Draw a screen-aligned quadrilateral.
- * Coords are window coords with y=0=bottom. These will be passed
- * through unmodified to the rasterizer as we have set
- * rasterizer->bypass_vs_clip_and_viewport.
+ * Coords are clip coords with y=0=bottom.
*/
static void
draw_quad(GLcontext *ctx,
@@ -192,18 +188,13 @@ clear_with_quad(GLcontext *ctx,
GLboolean color, GLboolean depth, GLboolean stencil)
{
struct st_context *st = ctx->st;
- const GLfloat x0 = (GLfloat) ctx->DrawBuffer->_Xmin;
- const GLfloat x1 = (GLfloat) ctx->DrawBuffer->_Xmax;
- GLfloat y0, y1;
-
- if (st_fb_orientation(ctx->DrawBuffer) == Y_0_TOP) {
- y0 = (GLfloat) (ctx->DrawBuffer->Height - ctx->DrawBuffer->_Ymax);
- y1 = (GLfloat) (ctx->DrawBuffer->Height - ctx->DrawBuffer->_Ymin);
- }
- else {
- y0 = (GLfloat) ctx->DrawBuffer->_Ymin;
- y1 = (GLfloat) ctx->DrawBuffer->_Ymax;
- }
+ const struct gl_framebuffer *fb = ctx->DrawBuffer;
+ const GLfloat fb_width = (GLfloat) fb->Width;
+ const GLfloat fb_height = (GLfloat) fb->Height;
+ const GLfloat x0 = (GLfloat) ctx->DrawBuffer->_Xmin / fb_width * 2.0f - 1.0f;
+ const GLfloat x1 = (GLfloat) ctx->DrawBuffer->_Xmax / fb_width * 2.0f - 1.0f;
+ const GLfloat y0 = (GLfloat) ctx->DrawBuffer->_Ymin / fb_height * 2.0f - 1.0f;
+ const GLfloat y1 = (GLfloat) ctx->DrawBuffer->_Ymax / fb_height * 2.0f - 1.0f;
/*
printf("%s %s%s%s %f,%f %f,%f\n", __FUNCTION__,
@@ -218,6 +209,8 @@ clear_with_quad(GLcontext *ctx,
cso_save_stencil_ref(st->cso_context);
cso_save_depth_stencil_alpha(st->cso_context);
cso_save_rasterizer(st->cso_context);
+ cso_save_viewport(st->cso_context);
+ cso_save_clip(st->cso_context);
cso_save_fragment_shader(st->cso_context);
cso_save_vertex_shader(st->cso_context);
@@ -273,6 +266,22 @@ clear_with_quad(GLcontext *ctx,
cso_set_rasterizer(st->cso_context, &st->clear.raster);
+ /* viewport state: viewport matching window dims */
+ {
+ const GLboolean invert = (st_fb_orientation(fb) == Y_0_TOP);
+ struct pipe_viewport_state vp;
+ vp.scale[0] = 0.5f * fb_width;
+ vp.scale[1] = fb_height * (invert ? -0.5f : 0.5f);
+ vp.scale[2] = 1.0f;
+ vp.scale[3] = 1.0f;
+ vp.translate[0] = 0.5f * fb_width;
+ vp.translate[1] = 0.5f * fb_height;
+ vp.translate[2] = 0.0f;
+ vp.translate[3] = 0.0f;
+ cso_set_viewport(st->cso_context, &vp);
+ }
+
+ cso_set_clip(st->cso_context, &st->clear.clip);
cso_set_fragment_shader_handle(st->cso_context, st->clear.fs);
cso_set_vertex_shader_handle(st->cso_context, st->clear.vs);
@@ -284,9 +293,10 @@ clear_with_quad(GLcontext *ctx,
cso_restore_stencil_ref(st->cso_context);
cso_restore_depth_stencil_alpha(st->cso_context);
cso_restore_rasterizer(st->cso_context);
+ cso_restore_viewport(st->cso_context);
+ cso_restore_clip(st->cso_context);
cso_restore_fragment_shader(st->cso_context);
cso_restore_vertex_shader(st->cso_context);
-
}
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index ba28a224e8..98453321f8 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -713,7 +713,7 @@ draw_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
memcpy(dest, sValues, spanWidth);
}
break;
- case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
if (format == GL_DEPTH_STENCIL) {
uint *dest = (uint *) (stmap + spanY * pt->stride + spanX*4);
GLint k;
@@ -731,7 +731,7 @@ draw_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
}
}
break;
- case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
if (format == GL_DEPTH_STENCIL) {
uint *dest = (uint *) (stmap + spanY * pt->stride + spanX*4);
GLint k;
@@ -879,7 +879,7 @@ copy_stencil_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
src = buffer + i * width;
switch (ptDraw->texture->format) {
- case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
{
uint *dst4 = (uint *) dst;
int j;
@@ -890,7 +890,7 @@ copy_stencil_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
}
}
break;
- case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
{
uint *dst4 = (uint *) dst;
int j;
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index ea040bdc4f..8fded0c69f 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -238,13 +238,13 @@ st_new_renderbuffer_fb(enum pipe_format format, int samples, boolean sw)
strb->software = sw;
switch (format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
case PIPE_FORMAT_B8G8R8A8_UNORM:
- case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
case PIPE_FORMAT_B8G8R8X8_UNORM:
- case PIPE_FORMAT_A1R5G5B5_UNORM:
- case PIPE_FORMAT_A4R4G4B4_UNORM:
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
strb->Base.InternalFormat = GL_RGBA;
break;
case PIPE_FORMAT_Z16_UNORM:
@@ -253,10 +253,10 @@ st_new_renderbuffer_fb(enum pipe_format format, int samples, boolean sw)
case PIPE_FORMAT_Z32_UNORM:
strb->Base.InternalFormat = GL_DEPTH_COMPONENT32;
break;
- case PIPE_FORMAT_S8Z24_UNORM:
case PIPE_FORMAT_Z24S8_UNORM:
- case PIPE_FORMAT_X8Z24_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
strb->Base.InternalFormat = GL_DEPTH24_STENCIL8_EXT;
break;
case PIPE_FORMAT_S8_UNORM:
diff --git a/src/mesa/state_tracker/st_cb_feedback.c b/src/mesa/state_tracker/st_cb_feedback.c
index edf26473d4..37b1fb55f4 100644
--- a/src/mesa/state_tracker/st_cb_feedback.c
+++ b/src/mesa/state_tracker/st_cb_feedback.c
@@ -83,7 +83,6 @@ feedback_vertex(GLcontext *ctx, const struct draw_context *draw,
const struct st_context *st = ctx->st;
GLfloat win[4];
const GLfloat *color, *texcoord;
- const GLfloat ci = 0;
GLuint slot;
/* Recall that Y=0=Top of window for Gallium wincoords */
@@ -109,7 +108,7 @@ feedback_vertex(GLcontext *ctx, const struct draw_context *draw,
else
texcoord = ctx->Current.Attrib[VERT_ATTRIB_TEX0];
- _mesa_feedback_vertex(ctx, win, color, ci, texcoord);
+ _mesa_feedback_vertex(ctx, win, color, texcoord);
}
diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c
index 6b1fdf3ecd..952d9ce915 100644
--- a/src/mesa/state_tracker/st_cb_readpixels.c
+++ b/src/mesa/state_tracker/st_cb_readpixels.c
@@ -108,7 +108,7 @@ st_read_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
memcpy(sValues, src, width);
}
break;
- case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
if (format == GL_DEPTH_STENCIL) {
const uint *src = (uint *) (stmap + srcY * pt->stride);
const GLfloat scale = 1.0f / (0xffffff);
@@ -126,7 +126,7 @@ st_read_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
}
}
break;
- case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
if (format == GL_DEPTH_STENCIL) {
const uint *src = (uint *) (stmap + srcY * pt->stride);
const GLfloat scale = 1.0f / (0xffffff);
@@ -214,15 +214,15 @@ st_fast_readpixels(GLcontext *ctx, struct st_renderbuffer *strb,
if (ctx->_ImageTransferState)
return GL_FALSE;
- if (strb->format == PIPE_FORMAT_A8R8G8B8_UNORM &&
+ if (strb->format == PIPE_FORMAT_B8G8R8A8_UNORM &&
format == GL_RGBA && type == GL_UNSIGNED_BYTE) {
combo = A8R8G8B8_UNORM_TO_RGBA_UBYTE;
}
- else if (strb->format == PIPE_FORMAT_A8R8G8B8_UNORM &&
+ else if (strb->format == PIPE_FORMAT_B8G8R8A8_UNORM &&
format == GL_RGB && type == GL_UNSIGNED_BYTE) {
combo = A8R8G8B8_UNORM_TO_RGB_UBYTE;
}
- else if (strb->format == PIPE_FORMAT_A8R8G8B8_UNORM &&
+ else if (strb->format == PIPE_FORMAT_B8G8R8A8_UNORM &&
format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8_REV) {
combo = A8R8G8B8_UNORM_TO_BGRA_UINT;
}
@@ -429,8 +429,8 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
const GLint dstStride = _mesa_image_row_stride(&clippedPacking, width,
format, type);
- if (trans->texture->format == PIPE_FORMAT_S8Z24_UNORM ||
- trans->texture->format == PIPE_FORMAT_X8Z24_UNORM) {
+ if (trans->texture->format == PIPE_FORMAT_Z24S8_UNORM ||
+ trans->texture->format == PIPE_FORMAT_Z24X8_UNORM) {
if (format == GL_DEPTH_COMPONENT) {
for (i = 0; i < height; i++) {
GLuint ztemp[MAX_WIDTH];
@@ -461,8 +461,8 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
}
}
}
- else if (trans->texture->format == PIPE_FORMAT_Z24S8_UNORM ||
- trans->texture->format == PIPE_FORMAT_Z24X8_UNORM) {
+ else if (trans->texture->format == PIPE_FORMAT_S8Z24_UNORM ||
+ trans->texture->format == PIPE_FORMAT_X8Z24_UNORM) {
if (format == GL_DEPTH_COMPONENT) {
for (i = 0; i < height; i++) {
GLuint ztemp[MAX_WIDTH];
diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h
index 13b7b0e22d..045c029c30 100644
--- a/src/mesa/state_tracker/st_context.h
+++ b/src/mesa/state_tracker/st_context.h
@@ -166,6 +166,7 @@ struct st_context
struct {
struct pipe_rasterizer_state raster;
struct pipe_viewport_state viewport;
+ struct pipe_clip_state clip;
void *vs;
void *fs;
float vertices[4][2][4]; /**< vertex pos + color */
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index 4b48c168e9..32b9a473cf 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -183,7 +183,7 @@ st_pipe_vertex_format(GLenum type, GLuint size, GLenum format,
/* this is an odd-ball case */
assert(type == GL_UNSIGNED_BYTE);
assert(normalized);
- return PIPE_FORMAT_B8G8R8A8_UNORM;
+ return PIPE_FORMAT_A8R8G8B8_UNORM;
}
if (normalized) {
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index e9ee65576d..79be833768 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -270,28 +270,28 @@ void st_init_extensions(struct st_context *st)
/* GL_EXT_packed_depth_stencil requires both the ability to render to
* a depth/stencil buffer and texture from depth/stencil source.
*/
- if (screen->is_format_supported(screen, PIPE_FORMAT_Z24S8_UNORM,
+ if (screen->is_format_supported(screen, PIPE_FORMAT_S8Z24_UNORM,
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_DEPTH_STENCIL, 0) &&
- screen->is_format_supported(screen, PIPE_FORMAT_Z24S8_UNORM,
+ screen->is_format_supported(screen, PIPE_FORMAT_S8Z24_UNORM,
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_SAMPLER, 0)) {
ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE;
}
- else if (screen->is_format_supported(screen, PIPE_FORMAT_S8Z24_UNORM,
+ else if (screen->is_format_supported(screen, PIPE_FORMAT_Z24S8_UNORM,
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_DEPTH_STENCIL, 0) &&
- screen->is_format_supported(screen, PIPE_FORMAT_S8Z24_UNORM,
+ screen->is_format_supported(screen, PIPE_FORMAT_Z24S8_UNORM,
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_SAMPLER, 0)) {
ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE;
}
/* sRGB support */
- if (screen->is_format_supported(screen, PIPE_FORMAT_R8G8B8A8_SRGB,
+ if (screen->is_format_supported(screen, PIPE_FORMAT_A8B8G8R8_SRGB,
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_SAMPLER, 0) ||
- screen->is_format_supported(screen, PIPE_FORMAT_A8R8G8B8_SRGB,
+ screen->is_format_supported(screen, PIPE_FORMAT_B8G8R8A8_SRGB,
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_SAMPLER, 0)) {
ctx->Extensions.EXT_texture_sRGB = GL_TRUE;
@@ -310,10 +310,10 @@ void st_init_extensions(struct st_context *st)
}
/* ycbcr support */
- if (screen->is_format_supported(screen, PIPE_FORMAT_YCBCR,
+ if (screen->is_format_supported(screen, PIPE_FORMAT_UYVY,
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_SAMPLER, 0) ||
- screen->is_format_supported(screen, PIPE_FORMAT_YCBCR_REV,
+ screen->is_format_supported(screen, PIPE_FORMAT_YUYV,
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_SAMPLER, 0)) {
ctx->Extensions.MESA_ycbcr_texture = GL_TRUE;
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index c8f9ac3038..9ae0c9f9ba 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -72,12 +72,12 @@ st_format_datatype(enum pipe_format format)
assert(desc);
if (desc->layout == UTIL_FORMAT_LAYOUT_PLAIN) {
- if (format == PIPE_FORMAT_A1R5G5B5_UNORM ||
- format == PIPE_FORMAT_R5G6B5_UNORM) {
+ if (format == PIPE_FORMAT_B5G5R5A1_UNORM ||
+ format == PIPE_FORMAT_B5G6R5_UNORM) {
return GL_UNSIGNED_SHORT;
}
- else if (format == PIPE_FORMAT_S8Z24_UNORM ||
- format == PIPE_FORMAT_Z24S8_UNORM) {
+ else if (format == PIPE_FORMAT_Z24S8_UNORM ||
+ format == PIPE_FORMAT_S8Z24_UNORM) {
return GL_UNSIGNED_INT_24_8;
}
else {
@@ -103,10 +103,10 @@ st_format_datatype(enum pipe_format format)
}
}
}
- else if (format == PIPE_FORMAT_YCBCR) {
+ else if (format == PIPE_FORMAT_UYVY) {
return GL_UNSIGNED_SHORT;
}
- else if (format == PIPE_FORMAT_YCBCR_REV) {
+ else if (format == PIPE_FORMAT_YUYV) {
return GL_UNSIGNED_SHORT;
}
else {
@@ -129,17 +129,17 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
/* fix this */
case MESA_FORMAT_ARGB8888_REV:
case MESA_FORMAT_ARGB8888:
- return PIPE_FORMAT_A8R8G8B8_UNORM;
+ return PIPE_FORMAT_B8G8R8A8_UNORM;
case MESA_FORMAT_XRGB8888:
- return PIPE_FORMAT_X8R8G8B8_UNORM;
+ return PIPE_FORMAT_B8G8R8X8_UNORM;
case MESA_FORMAT_ARGB1555:
- return PIPE_FORMAT_A1R5G5B5_UNORM;
+ return PIPE_FORMAT_B5G5R5A1_UNORM;
case MESA_FORMAT_ARGB4444:
- return PIPE_FORMAT_A4R4G4B4_UNORM;
+ return PIPE_FORMAT_B4G4R4A4_UNORM;
case MESA_FORMAT_RGB565:
- return PIPE_FORMAT_R5G6B5_UNORM;
+ return PIPE_FORMAT_B5G6R5_UNORM;
case MESA_FORMAT_AL88:
- return PIPE_FORMAT_A8L8_UNORM;
+ return PIPE_FORMAT_L8A8_UNORM;
case MESA_FORMAT_A8:
return PIPE_FORMAT_A8_UNORM;
case MESA_FORMAT_L8:
@@ -151,11 +151,11 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
case MESA_FORMAT_Z32:
return PIPE_FORMAT_Z32_UNORM;
case MESA_FORMAT_Z24_S8:
- return PIPE_FORMAT_Z24S8_UNORM;
- case MESA_FORMAT_S8_Z24:
return PIPE_FORMAT_S8Z24_UNORM;
+ case MESA_FORMAT_S8_Z24:
+ return PIPE_FORMAT_Z24S8_UNORM;
case MESA_FORMAT_YCBCR:
- return PIPE_FORMAT_YCBCR;
+ return PIPE_FORMAT_UYVY;
#if FEATURE_texture_s3tc
case MESA_FORMAT_RGB_DXT1:
return PIPE_FORMAT_DXT1_RGB;
@@ -178,15 +178,15 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
#endif
#if FEATURE_EXT_texture_sRGB
case MESA_FORMAT_SLA8:
- return PIPE_FORMAT_A8L8_SRGB;
+ return PIPE_FORMAT_L8A8_SRGB;
case MESA_FORMAT_SL8:
return PIPE_FORMAT_L8_SRGB;
case MESA_FORMAT_SRGB8:
return PIPE_FORMAT_R8G8B8_SRGB;
case MESA_FORMAT_SRGBA8:
- return PIPE_FORMAT_R8G8B8A8_SRGB;
+ return PIPE_FORMAT_A8B8G8R8_SRGB;
case MESA_FORMAT_SARGB8:
- return PIPE_FORMAT_A8R8G8B8_SRGB;
+ return PIPE_FORMAT_B8G8R8A8_SRGB;
#endif
default:
assert(0);
@@ -202,21 +202,21 @@ gl_format
st_pipe_format_to_mesa_format(enum pipe_format format)
{
switch (format) {
- case PIPE_FORMAT_A8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8A8_UNORM:
return MESA_FORMAT_ARGB8888;
- case PIPE_FORMAT_X8R8G8B8_UNORM:
+ case PIPE_FORMAT_B8G8R8X8_UNORM:
return MESA_FORMAT_XRGB8888;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
return MESA_FORMAT_ARGB8888_REV;
- case PIPE_FORMAT_B8G8R8X8_UNORM:
+ case PIPE_FORMAT_X8R8G8B8_UNORM:
return MESA_FORMAT_XRGB8888_REV;
- case PIPE_FORMAT_A1R5G5B5_UNORM:
+ case PIPE_FORMAT_B5G5R5A1_UNORM:
return MESA_FORMAT_ARGB1555;
- case PIPE_FORMAT_A4R4G4B4_UNORM:
+ case PIPE_FORMAT_B4G4R4A4_UNORM:
return MESA_FORMAT_ARGB4444;
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
return MESA_FORMAT_RGB565;
- case PIPE_FORMAT_A8L8_UNORM:
+ case PIPE_FORMAT_L8A8_UNORM:
return MESA_FORMAT_AL88;
case PIPE_FORMAT_A8_UNORM:
return MESA_FORMAT_A8;
@@ -234,18 +234,18 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
return MESA_FORMAT_Z16;
case PIPE_FORMAT_Z32_UNORM:
return MESA_FORMAT_Z32;
- case PIPE_FORMAT_Z24S8_UNORM:
+ case PIPE_FORMAT_S8Z24_UNORM:
return MESA_FORMAT_Z24_S8;
- case PIPE_FORMAT_Z24X8_UNORM:
- return MESA_FORMAT_Z24_X8;
case PIPE_FORMAT_X8Z24_UNORM:
+ return MESA_FORMAT_Z24_X8;
+ case PIPE_FORMAT_Z24X8_UNORM:
return MESA_FORMAT_X8_Z24;
- case PIPE_FORMAT_S8Z24_UNORM:
+ case PIPE_FORMAT_Z24S8_UNORM:
return MESA_FORMAT_S8_Z24;
- case PIPE_FORMAT_YCBCR:
+ case PIPE_FORMAT_UYVY:
return MESA_FORMAT_YCBCR;
- case PIPE_FORMAT_YCBCR_REV:
+ case PIPE_FORMAT_YUYV:
return MESA_FORMAT_YCBCR_REV;
#if FEATURE_texture_s3tc
@@ -270,15 +270,15 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
#endif
#if FEATURE_EXT_texture_sRGB
- case PIPE_FORMAT_A8L8_SRGB:
+ case PIPE_FORMAT_L8A8_SRGB:
return MESA_FORMAT_SLA8;
case PIPE_FORMAT_L8_SRGB:
return MESA_FORMAT_SL8;
case PIPE_FORMAT_R8G8B8_SRGB:
return MESA_FORMAT_SRGB8;
- case PIPE_FORMAT_R8G8B8A8_SRGB:
+ case PIPE_FORMAT_A8B8G8R8_SRGB:
return MESA_FORMAT_SRGBA8;
- case PIPE_FORMAT_A8R8G8B8_SRGB:
+ case PIPE_FORMAT_B8G8R8A8_SRGB:
return MESA_FORMAT_SARGB8;
#endif
default:
@@ -298,10 +298,10 @@ default_rgba_format(struct pipe_screen *screen,
unsigned geom_flags)
{
static const enum pipe_format colorFormats[] = {
- PIPE_FORMAT_A8R8G8B8_UNORM,
PIPE_FORMAT_B8G8R8A8_UNORM,
- PIPE_FORMAT_R8G8B8A8_UNORM,
- PIPE_FORMAT_R5G6B5_UNORM
+ PIPE_FORMAT_A8R8G8B8_UNORM,
+ PIPE_FORMAT_A8B8G8R8_UNORM,
+ PIPE_FORMAT_B5G6R5_UNORM
};
uint i;
for (i = 0; i < Elements(colorFormats); i++) {
@@ -322,13 +322,13 @@ default_rgb_format(struct pipe_screen *screen,
unsigned geom_flags)
{
static const enum pipe_format colorFormats[] = {
- PIPE_FORMAT_X8R8G8B8_UNORM,
PIPE_FORMAT_B8G8R8X8_UNORM,
- PIPE_FORMAT_R8G8B8X8_UNORM,
- PIPE_FORMAT_A8R8G8B8_UNORM,
+ PIPE_FORMAT_X8R8G8B8_UNORM,
+ PIPE_FORMAT_X8B8G8R8_UNORM,
PIPE_FORMAT_B8G8R8A8_UNORM,
- PIPE_FORMAT_R8G8B8A8_UNORM,
- PIPE_FORMAT_R5G6B5_UNORM
+ PIPE_FORMAT_A8R8G8B8_UNORM,
+ PIPE_FORMAT_A8B8G8R8_UNORM,
+ PIPE_FORMAT_B5G6R5_UNORM
};
uint i;
for (i = 0; i < Elements(colorFormats); i++) {
@@ -349,9 +349,9 @@ default_srgba_format(struct pipe_screen *screen,
unsigned geom_flags)
{
static const enum pipe_format colorFormats[] = {
- PIPE_FORMAT_A8R8G8B8_SRGB,
PIPE_FORMAT_B8G8R8A8_SRGB,
- PIPE_FORMAT_R8G8B8A8_SRGB,
+ PIPE_FORMAT_A8R8G8B8_SRGB,
+ PIPE_FORMAT_A8B8G8R8_SRGB,
};
uint i;
for (i = 0; i < Elements(colorFormats); i++) {
@@ -393,8 +393,8 @@ default_depth_format(struct pipe_screen *screen,
static const enum pipe_format zFormats[] = {
PIPE_FORMAT_Z16_UNORM,
PIPE_FORMAT_Z32_UNORM,
- PIPE_FORMAT_S8Z24_UNORM,
- PIPE_FORMAT_Z24S8_UNORM
+ PIPE_FORMAT_Z24S8_UNORM,
+ PIPE_FORMAT_S8Z24_UNORM
};
uint i;
for (i = 0; i < Elements(zFormats); i++) {
@@ -439,13 +439,13 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_RGBA4:
case GL_RGBA2:
- if (screen->is_format_supported( screen, PIPE_FORMAT_A4R4G4B4_UNORM, target, tex_usage, geom_flags ))
- return PIPE_FORMAT_A4R4G4B4_UNORM;
+ if (screen->is_format_supported( screen, PIPE_FORMAT_B4G4R4A4_UNORM, target, tex_usage, geom_flags ))
+ return PIPE_FORMAT_B4G4R4A4_UNORM;
return default_rgba_format( screen, target, tex_usage, geom_flags );
case GL_RGB5_A1:
- if (screen->is_format_supported( screen, PIPE_FORMAT_A1R5G5B5_UNORM, target, tex_usage, geom_flags ))
- return PIPE_FORMAT_A1R5G5B5_UNORM;
+ if (screen->is_format_supported( screen, PIPE_FORMAT_B5G5R5A1_UNORM, target, tex_usage, geom_flags ))
+ return PIPE_FORMAT_B5G5R5A1_UNORM;
return default_rgba_format( screen, target, tex_usage, geom_flags );
case GL_RGB8:
@@ -457,10 +457,10 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_RGB5:
case GL_RGB4:
case GL_R3_G3_B2:
- if (screen->is_format_supported( screen, PIPE_FORMAT_R5G6B5_UNORM, target, tex_usage, geom_flags ))
- return PIPE_FORMAT_R5G6B5_UNORM;
- if (screen->is_format_supported( screen, PIPE_FORMAT_A1R5G5B5_UNORM, target, tex_usage, geom_flags ))
- return PIPE_FORMAT_A1R5G5B5_UNORM;
+ if (screen->is_format_supported( screen, PIPE_FORMAT_B5G6R5_UNORM, target, tex_usage, geom_flags ))
+ return PIPE_FORMAT_B5G6R5_UNORM;
+ if (screen->is_format_supported( screen, PIPE_FORMAT_B5G5R5A1_UNORM, target, tex_usage, geom_flags ))
+ return PIPE_FORMAT_B5G5R5A1_UNORM;
return default_rgba_format( screen, target, tex_usage, geom_flags );
case GL_ALPHA:
@@ -493,8 +493,8 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_LUMINANCE12_ALPHA12:
case GL_LUMINANCE16_ALPHA16:
case GL_COMPRESSED_LUMINANCE_ALPHA:
- if (screen->is_format_supported( screen, PIPE_FORMAT_A8L8_UNORM, target, tex_usage, geom_flags ))
- return PIPE_FORMAT_A8L8_UNORM;
+ if (screen->is_format_supported( screen, PIPE_FORMAT_L8A8_UNORM, target, tex_usage, geom_flags ))
+ return PIPE_FORMAT_L8A8_UNORM;
return default_rgba_format( screen, target, tex_usage, geom_flags );
case GL_INTENSITY:
@@ -508,13 +508,13 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
return default_rgba_format( screen, target, tex_usage, geom_flags );
case GL_YCBCR_MESA:
- if (screen->is_format_supported(screen, PIPE_FORMAT_YCBCR,
+ if (screen->is_format_supported(screen, PIPE_FORMAT_UYVY,
target, tex_usage, geom_flags)) {
- return PIPE_FORMAT_YCBCR;
+ return PIPE_FORMAT_UYVY;
}
- if (screen->is_format_supported(screen, PIPE_FORMAT_YCBCR_REV,
+ if (screen->is_format_supported(screen, PIPE_FORMAT_YUYV,
target, tex_usage, geom_flags)) {
- return PIPE_FORMAT_YCBCR_REV;
+ return PIPE_FORMAT_YUYV;
}
return PIPE_FORMAT_NONE;
@@ -546,10 +546,10 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
return PIPE_FORMAT_Z16_UNORM;
/* fall-through */
case GL_DEPTH_COMPONENT24:
- if (screen->is_format_supported( screen, PIPE_FORMAT_S8Z24_UNORM, target, tex_usage, geom_flags ))
- return PIPE_FORMAT_S8Z24_UNORM;
if (screen->is_format_supported( screen, PIPE_FORMAT_Z24S8_UNORM, target, tex_usage, geom_flags ))
return PIPE_FORMAT_Z24S8_UNORM;
+ if (screen->is_format_supported( screen, PIPE_FORMAT_S8Z24_UNORM, target, tex_usage, geom_flags ))
+ return PIPE_FORMAT_S8Z24_UNORM;
/* fall-through */
case GL_DEPTH_COMPONENT32:
if (screen->is_format_supported( screen, PIPE_FORMAT_Z32_UNORM, target, tex_usage, geom_flags ))
@@ -565,18 +565,18 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_STENCIL_INDEX16_EXT:
if (screen->is_format_supported( screen, PIPE_FORMAT_S8_UNORM, target, tex_usage, geom_flags ))
return PIPE_FORMAT_S8_UNORM;
- if (screen->is_format_supported( screen, PIPE_FORMAT_S8Z24_UNORM, target, tex_usage, geom_flags ))
- return PIPE_FORMAT_S8Z24_UNORM;
if (screen->is_format_supported( screen, PIPE_FORMAT_Z24S8_UNORM, target, tex_usage, geom_flags ))
return PIPE_FORMAT_Z24S8_UNORM;
+ if (screen->is_format_supported( screen, PIPE_FORMAT_S8Z24_UNORM, target, tex_usage, geom_flags ))
+ return PIPE_FORMAT_S8Z24_UNORM;
return PIPE_FORMAT_NONE;
case GL_DEPTH_STENCIL_EXT:
case GL_DEPTH24_STENCIL8_EXT:
- if (screen->is_format_supported( screen, PIPE_FORMAT_S8Z24_UNORM, target, tex_usage, geom_flags ))
- return PIPE_FORMAT_S8Z24_UNORM;
if (screen->is_format_supported( screen, PIPE_FORMAT_Z24S8_UNORM, target, tex_usage, geom_flags ))
return PIPE_FORMAT_Z24S8_UNORM;
+ if (screen->is_format_supported( screen, PIPE_FORMAT_S8Z24_UNORM, target, tex_usage, geom_flags ))
+ return PIPE_FORMAT_S8Z24_UNORM;
return PIPE_FORMAT_NONE;
case GL_SRGB_EXT:
@@ -599,8 +599,8 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_SLUMINANCE8_ALPHA8_EXT:
case GL_COMPRESSED_SLUMINANCE_EXT:
case GL_COMPRESSED_SLUMINANCE_ALPHA_EXT:
- if (screen->is_format_supported( screen, PIPE_FORMAT_A8L8_SRGB, target, tex_usage, geom_flags ))
- return PIPE_FORMAT_A8L8_SRGB;
+ if (screen->is_format_supported( screen, PIPE_FORMAT_L8A8_SRGB, target, tex_usage, geom_flags ))
+ return PIPE_FORMAT_L8A8_SRGB;
return default_srgba_format( screen, target, tex_usage, geom_flags );
case GL_SLUMINANCE_EXT:
@@ -680,11 +680,11 @@ GLboolean
st_equal_formats(enum pipe_format pFormat, GLenum format, GLenum type)
{
switch (pFormat) {
- case PIPE_FORMAT_R8G8B8A8_UNORM:
+ case PIPE_FORMAT_A8B8G8R8_UNORM:
return format == GL_RGBA && type == GL_UNSIGNED_BYTE;
- case PIPE_FORMAT_B8G8R8A8_UNORM:
+ case PIPE_FORMAT_A8R8G8B8_UNORM:
return format == GL_BGRA && type == GL_UNSIGNED_BYTE;
- case PIPE_FORMAT_R5G6B5_UNORM:
+ case PIPE_FORMAT_B5G6R5_UNORM:
return format == GL_RGB && type == GL_UNSIGNED_SHORT_5_6_5;
/* XXX more combos... */
default:
diff --git a/src/mesa/swrast/s_aaline.c b/src/mesa/swrast/s_aaline.c
index 9bfa8f2e61..6ba4604e69 100644
--- a/src/mesa/swrast/s_aaline.c
+++ b/src/mesa/swrast/s_aaline.c
@@ -59,10 +59,8 @@ struct LineInfo
/* DO_Z */
GLfloat zPlane[4];
- /* DO_RGBA */
+ /* DO_RGBA - always enabled */
GLfloat rPlane[4], gPlane[4], bPlane[4], aPlane[4];
- /* DO_INDEX */
- GLfloat iPlane[4];
/* DO_ATTRIBS */
GLfloat wPlane[4];
GLfloat attrPlane[FRAG_ATTRIB_MAX][4][4];
@@ -325,20 +323,6 @@ compute_coveragef(const struct LineInfo *info,
}
-/**
- * Compute coverage value for color index mode.
- * XXX this may not be quite correct.
- * \return coverage in [0,15].
- */
-static GLfloat
-compute_coveragei(const struct LineInfo *info,
- GLint winx, GLint winy)
-{
- return compute_coveragef(info, winx, winy) * 15.0F;
-}
-
-
-
typedef void (*plot_func)(GLcontext *ctx, struct LineInfo *line,
int ix, int iy);
@@ -475,22 +459,13 @@ segment(GLcontext *ctx,
}
-#define NAME(x) aa_ci_##x
-#define DO_Z
-#define DO_ATTRIBS /* for fog */
-#define DO_INDEX
-#include "s_aalinetemp.h"
-
-
#define NAME(x) aa_rgba_##x
#define DO_Z
-#define DO_RGBA
#include "s_aalinetemp.h"
#define NAME(x) aa_general_rgba_##x
#define DO_Z
-#define DO_RGBA
#define DO_ATTRIBS
#include "s_aalinetemp.h"
@@ -503,22 +478,15 @@ _swrast_choose_aa_line_function(GLcontext *ctx)
ASSERT(ctx->Line.SmoothFlag);
- if (ctx->Visual.rgbMode) {
- /* RGBA */
- if (ctx->Texture._EnabledCoordUnits != 0
- || ctx->FragmentProgram._Current
- || (ctx->Light.Enabled &&
- ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)
- || ctx->Fog.ColorSumEnabled
- || swrast->_FogEnabled) {
- swrast->Line = aa_general_rgba_line;
- }
- else {
- swrast->Line = aa_rgba_line;
- }
+ if (ctx->Texture._EnabledCoordUnits != 0
+ || ctx->FragmentProgram._Current
+ || (ctx->Light.Enabled &&
+ ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)
+ || ctx->Fog.ColorSumEnabled
+ || swrast->_FogEnabled) {
+ swrast->Line = aa_general_rgba_line;
}
else {
- /* Color Index */
- swrast->Line = aa_ci_line;
+ swrast->Line = aa_rgba_line;
}
}
diff --git a/src/mesa/swrast/s_aalinetemp.h b/src/mesa/swrast/s_aalinetemp.h
index 42ffe9f20c..c28d47a671 100644
--- a/src/mesa/swrast/s_aalinetemp.h
+++ b/src/mesa/swrast/s_aalinetemp.h
@@ -39,11 +39,7 @@ NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy)
const SWcontext *swrast = SWRAST_CONTEXT(ctx);
const GLfloat fx = (GLfloat) ix;
const GLfloat fy = (GLfloat) iy;
-#ifdef DO_INDEX
- const GLfloat coverage = compute_coveragei(line, ix, iy);
-#else
const GLfloat coverage = compute_coveragef(line, ix, iy);
-#endif
const GLuint i = line->span.end;
(void) swrast;
@@ -63,15 +59,10 @@ NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy)
#ifdef DO_Z
line->span.array->z[i] = (GLuint) solve_plane(fx, fy, line->zPlane);
#endif
-#ifdef DO_RGBA
line->span.array->rgba[i][RCOMP] = solve_plane_chan(fx, fy, line->rPlane);
line->span.array->rgba[i][GCOMP] = solve_plane_chan(fx, fy, line->gPlane);
line->span.array->rgba[i][BCOMP] = solve_plane_chan(fx, fy, line->bPlane);
line->span.array->rgba[i][ACOMP] = solve_plane_chan(fx, fy, line->aPlane);
-#endif
-#ifdef DO_INDEX
- line->span.array->index[i] = (GLint) solve_plane(fx, fy, line->iPlane);
-#endif
#if defined(DO_ATTRIBS)
ATTRIB_LOOP_BEGIN
GLfloat (*attribArray)[4] = line->span.array->attribs[attr];
@@ -101,11 +92,7 @@ NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy)
#endif
if (line->span.end == MAX_WIDTH) {
-#if defined(DO_RGBA)
_swrast_write_rgba_span(ctx, &(line->span));
-#else
- _swrast_write_index_span(ctx, &(line->span));
-#endif
line->span.end = 0; /* reset counter */
}
}
@@ -150,7 +137,6 @@ NAME(line)(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1)
compute_plane(line.x0, line.y0, line.x1, line.y1,
v0->attrib[FRAG_ATTRIB_WPOS][2], v1->attrib[FRAG_ATTRIB_WPOS][2], line.zPlane);
#endif
-#ifdef DO_RGBA
line.span.arrayMask |= SPAN_RGBA;
if (ctx->Light.ShadeModel == GL_SMOOTH) {
compute_plane(line.x0, line.y0, line.x1, line.y1,
@@ -168,18 +154,6 @@ NAME(line)(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1)
constant_plane(v1->color[BCOMP], line.bPlane);
constant_plane(v1->color[ACOMP], line.aPlane);
}
-#endif
-#ifdef DO_INDEX
- line.span.arrayMask |= SPAN_INDEX;
- if (ctx->Light.ShadeModel == GL_SMOOTH) {
- compute_plane(line.x0, line.y0, line.x1, line.y1,
- v0->attrib[FRAG_ATTRIB_CI][0],
- v1->attrib[FRAG_ATTRIB_CI][0], line.iPlane);
- }
- else {
- constant_plane(v1->attrib[FRAG_ATTRIB_CI][0], line.iPlane);
- }
-#endif
#if defined(DO_ATTRIBS)
{
const GLfloat invW0 = v0->attrib[FRAG_ATTRIB_WPOS][3];
@@ -257,18 +231,12 @@ NAME(line)(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1)
segment(ctx, &line, NAME(plot), 0.0, 1.0);
}
-#if defined(DO_RGBA)
_swrast_write_rgba_span(ctx, &(line.span));
-#else
- _swrast_write_index_span(ctx, &(line.span));
-#endif
}
#undef DO_Z
-#undef DO_RGBA
-#undef DO_INDEX
#undef DO_ATTRIBS
#undef NAME
diff --git a/src/mesa/swrast/s_aatriangle.c b/src/mesa/swrast/s_aatriangle.c
index 078f16aea0..fe3338ecef 100644
--- a/src/mesa/swrast/s_aatriangle.c
+++ b/src/mesa/swrast/s_aatriangle.c
@@ -357,20 +357,6 @@ rgba_aa_tri(GLcontext *ctx,
const SWvertex *v2)
{
#define DO_Z
-#define DO_RGBA
-#include "s_aatritemp.h"
-}
-
-
-static void
-index_aa_tri(GLcontext *ctx,
- const SWvertex *v0,
- const SWvertex *v1,
- const SWvertex *v2)
-{
-#define DO_Z
-#define DO_ATTRIBS
-#define DO_INDEX
#include "s_aatritemp.h"
}
@@ -382,7 +368,6 @@ general_aa_tri(GLcontext *ctx,
const SWvertex *v2)
{
#define DO_Z
-#define DO_RGBA
#define DO_ATTRIBS
#include "s_aatritemp.h"
}
@@ -406,11 +391,8 @@ _swrast_set_aa_triangle_function(GLcontext *ctx)
|| NEED_SECONDARY_COLOR(ctx)) {
SWRAST_CONTEXT(ctx)->Triangle = general_aa_tri;
}
- else if (ctx->Visual.rgbMode) {
- SWRAST_CONTEXT(ctx)->Triangle = rgba_aa_tri;
- }
else {
- SWRAST_CONTEXT(ctx)->Triangle = index_aa_tri;
+ SWRAST_CONTEXT(ctx)->Triangle = rgba_aa_tri;
}
ASSERT(SWRAST_CONTEXT(ctx)->Triangle);
diff --git a/src/mesa/swrast/s_aatritemp.h b/src/mesa/swrast/s_aatritemp.h
index 76d4005b8c..5c1c6d9044 100644
--- a/src/mesa/swrast/s_aatritemp.h
+++ b/src/mesa/swrast/s_aatritemp.h
@@ -33,8 +33,6 @@
* The following macros may be defined to indicate what auxillary information
* must be copmuted across the triangle:
* DO_Z - if defined, compute Z values
- * DO_RGBA - if defined, compute RGBA values
- * DO_INDEX - if defined, compute color index values
* DO_ATTRIBS - if defined, compute texcoords, varying, etc.
*/
@@ -55,12 +53,7 @@
#ifdef DO_Z
GLfloat zPlane[4];
#endif
-#ifdef DO_RGBA
GLfloat rPlane[4], gPlane[4], bPlane[4], aPlane[4];
-#endif
-#ifdef DO_INDEX
- GLfloat iPlane[4];
-#endif
#if defined(DO_ATTRIBS)
GLfloat attrPlane[FRAG_ATTRIB_MAX][4][4];
GLfloat wPlane[4]; /* win[3] */
@@ -126,7 +119,6 @@
compute_plane(p0, p1, p2, p0[2], p1[2], p2[2], zPlane);
span.arrayMask |= SPAN_Z;
#endif
-#ifdef DO_RGBA
if (ctx->Light.ShadeModel == GL_SMOOTH) {
compute_plane(p0, p1, p2, v0->color[RCOMP], v1->color[RCOMP], v2->color[RCOMP], rPlane);
compute_plane(p0, p1, p2, v0->color[GCOMP], v1->color[GCOMP], v2->color[GCOMP], gPlane);
@@ -140,17 +132,6 @@
constant_plane(v2->color[ACOMP], aPlane);
}
span.arrayMask |= SPAN_RGBA;
-#endif
-#ifdef DO_INDEX
- if (ctx->Light.ShadeModel == GL_SMOOTH) {
- compute_plane(p0, p1, p2, (GLfloat) v0->attrib[FRAG_ATTRIB_CI][0],
- v1->attrib[FRAG_ATTRIB_CI][0], v2->attrib[FRAG_ATTRIB_CI][0], iPlane);
- }
- else {
- constant_plane(v2->attrib[FRAG_ATTRIB_CI][0], iPlane);
- }
- span.arrayMask |= SPAN_INDEX;
-#endif
#if defined(DO_ATTRIBS)
{
const GLfloat invW0 = v0->attrib[FRAG_ATTRIB_WPOS][3];
@@ -234,23 +215,14 @@
/* (cx,cy) = center of fragment */
const GLfloat cx = ix + 0.5F, cy = iy + 0.5F;
SWspanarrays *array = span.array;
-#ifdef DO_INDEX
- array->coverage[count] = (GLfloat) compute_coveragei(pMin, pMid, pMax, ix, iy);
-#else
array->coverage[count] = coverage;
-#endif
#ifdef DO_Z
array->z[count] = (GLuint) solve_plane(cx, cy, zPlane);
#endif
-#ifdef DO_RGBA
array->rgba[count][RCOMP] = solve_plane_chan(cx, cy, rPlane);
array->rgba[count][GCOMP] = solve_plane_chan(cx, cy, gPlane);
array->rgba[count][BCOMP] = solve_plane_chan(cx, cy, bPlane);
array->rgba[count][ACOMP] = solve_plane_chan(cx, cy, aPlane);
-#endif
-#ifdef DO_INDEX
- array->index[count] = (GLint) solve_plane(cx, cy, iPlane);
-#endif
ix++;
count++;
coverage = compute_coveragef(pMin, pMid, pMax, ix, iy);
@@ -262,11 +234,7 @@
span.x = startX;
span.y = iy;
span.end = (GLuint) ix - (GLuint) startX;
-#if defined(DO_RGBA)
_swrast_write_rgba_span(ctx, &span);
-#else
- _swrast_write_index_span(ctx, &span);
-#endif
}
}
else {
@@ -304,23 +272,14 @@
const GLfloat cx = ix + 0.5F, cy = iy + 0.5F;
SWspanarrays *array = span.array;
ASSERT(ix >= 0);
-#ifdef DO_INDEX
- array->coverage[ix] = (GLfloat) compute_coveragei(pMin, pMax, pMid, ix, iy);
-#else
array->coverage[ix] = coverage;
-#endif
#ifdef DO_Z
array->z[ix] = (GLuint) solve_plane(cx, cy, zPlane);
#endif
-#ifdef DO_RGBA
array->rgba[ix][RCOMP] = solve_plane_chan(cx, cy, rPlane);
array->rgba[ix][GCOMP] = solve_plane_chan(cx, cy, gPlane);
array->rgba[ix][BCOMP] = solve_plane_chan(cx, cy, bPlane);
array->rgba[ix][ACOMP] = solve_plane_chan(cx, cy, aPlane);
-#endif
-#ifdef DO_INDEX
- array->index[ix] = (GLint) solve_plane(cx, cy, iPlane);
-#endif
ix--;
count++;
coverage = compute_coveragef(pMin, pMax, pMid, ix, iy);
@@ -351,12 +310,7 @@
GLint j;
for (j = 0; j < (GLint) n; j++) {
array->coverage[j] = array->coverage[j + left];
-#ifdef DO_RGBA
COPY_CHAN4(array->rgba[j], array->rgba[j + left]);
-#endif
-#ifdef DO_INDEX
- array->index[j] = array->index[j + left];
-#endif
#ifdef DO_Z
array->z[j] = array->z[j + left];
#endif
@@ -366,18 +320,12 @@
span.x = left;
span.y = iy;
span.end = n;
-#if defined(DO_RGBA)
_swrast_write_rgba_span(ctx, &span);
-#else
- _swrast_write_index_span(ctx, &span);
-#endif
}
}
}
#undef DO_Z
-#undef DO_RGBA
-#undef DO_INDEX
#undef DO_ATTRIBS
#undef DO_OCCLUSION_TEST
diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c
index 2dd9ca6348..854e106b7f 100644
--- a/src/mesa/swrast/s_accum.c
+++ b/src/mesa/swrast/s_accum.c
@@ -130,11 +130,7 @@ _swrast_clear_accum_buffer( GLcontext *ctx, struct gl_renderbuffer *rb )
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLuint x, y, width, height;
- if (ctx->Visual.accumRedBits == 0) {
- /* No accumulation buffer! Not an error. */
- return;
- }
-
+ /* No accumulation buffer! Not an error. */
if (!rb || !rb->Data)
return;
diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c
index 59e26e9ea3..da730213ac 100644
--- a/src/mesa/swrast/s_bitmap.c
+++ b/src/mesa/swrast/s_bitmap.c
@@ -125,10 +125,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
if (count + width >= MAX_WIDTH || row + 1 == height) {
/* flush the span */
span.end = count;
- if (ctx->Visual.rgbMode)
- _swrast_write_rgba_span(ctx, &span);
- else
- _swrast_write_index_span(ctx, &span);
+ _swrast_write_rgba_span(ctx, &span);
span.end = 0;
count = 0;
}
@@ -192,10 +189,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
}
}
- if (ctx->Visual.rgbMode)
- _swrast_write_rgba_span(ctx, &span);
- else
- _swrast_write_index_span(ctx, &span);
+ _swrast_write_rgba_span(ctx, &span);
/* get ready for next row */
if (mask != 1)
@@ -215,10 +209,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
}
}
- if (ctx->Visual.rgbMode)
- _swrast_write_rgba_span(ctx, &span);
- else
- _swrast_write_index_span(ctx, &span);
+ _swrast_write_rgba_span(ctx, &span);
/* get ready for next row */
if (mask != 128)
diff --git a/src/mesa/swrast/s_clear.c b/src/mesa/swrast/s_clear.c
index 820297f3ee..7b0a63391f 100644
--- a/src/mesa/swrast/s_clear.c
+++ b/src/mesa/swrast/s_clear.c
@@ -51,7 +51,6 @@ clear_rgba_buffer_with_masking(GLcontext *ctx, struct gl_renderbuffer *rb,
SWspan span;
GLint i;
- ASSERT(ctx->Visual.rgbMode);
ASSERT(rb->PutRow);
/* Initialize color span with clear color */
@@ -105,45 +104,6 @@ clear_rgba_buffer_with_masking(GLcontext *ctx, struct gl_renderbuffer *rb,
/**
- * Clear color index buffer with masking.
- */
-static void
-clear_ci_buffer_with_masking(GLcontext *ctx, struct gl_renderbuffer *rb)
-{
- const GLint x = ctx->DrawBuffer->_Xmin;
- const GLint y = ctx->DrawBuffer->_Ymin;
- const GLint height = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin;
- const GLint width = ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin;
- SWspan span;
- GLint i;
-
- ASSERT(!ctx->Visual.rgbMode);
- ASSERT(rb->PutRow);
- ASSERT(rb->DataType == GL_UNSIGNED_INT);
-
- /* Initialize index span with clear index */
- INIT_SPAN(span, GL_BITMAP);
- span.end = width;
- span.arrayMask = SPAN_INDEX;
- for (i = 0; i < width;i++) {
- span.array->index[i] = ctx->Color.ClearIndex;
- }
-
- /* Note that masking will change the color indexes, but only the
- * bits for which the write mask is GL_FALSE. The bits
- * which are write-enabled won't get modified.
- */
- for (i = 0; i < height;i++) {
- span.x = x;
- span.y = y + i;
- _swrast_mask_ci_span(ctx, rb, &span);
- /* write masked row */
- rb->PutRow(ctx, rb, width, x, y + i, span.array->index, NULL);
- }
-}
-
-
-/**
* Clear an rgba color buffer without channel masking.
*/
static void
@@ -158,8 +118,6 @@ clear_rgba_buffer(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint buf)
GLvoid *clearVal;
GLint i;
- ASSERT(ctx->Visual.rgbMode);
-
ASSERT(ctx->Color.ColorMask[buf][0] &&
ctx->Color.ColorMask[buf][1] &&
ctx->Color.ColorMask[buf][2] &&
@@ -197,50 +155,6 @@ clear_rgba_buffer(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint buf)
/**
- * Clear color index buffer without masking.
- */
-static void
-clear_ci_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
-{
- const GLint x = ctx->DrawBuffer->_Xmin;
- const GLint y = ctx->DrawBuffer->_Ymin;
- const GLint height = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin;
- const GLint width = ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin;
- GLubyte clear8;
- GLushort clear16;
- GLuint clear32;
- GLvoid *clearVal;
- GLint i;
-
- ASSERT(!ctx->Visual.rgbMode);
-
- ASSERT(rb->PutMonoRow);
-
- /* setup clear value */
- switch (rb->DataType) {
- case GL_UNSIGNED_BYTE:
- clear8 = (GLubyte) ctx->Color.ClearIndex;
- clearVal = &clear8;
- break;
- case GL_UNSIGNED_SHORT:
- clear16 = (GLushort) ctx->Color.ClearIndex;
- clearVal = &clear16;
- break;
- case GL_UNSIGNED_INT:
- clear32 = ctx->Color.ClearIndex;
- clearVal = &clear32;
- break;
- default:
- _mesa_problem(ctx, "Bad rb DataType in clear_color_buffer");
- return;
- }
-
- for (i = 0; i < height; i++)
- rb->PutMonoRow(ctx, rb, width, x, y + i, clearVal, NULL);
-}
-
-
-/**
* Clear the front/back/left/right/aux color buffers.
* This function is usually only called if the device driver can't
* clear its own color buffers for some reason (such as with masking).
@@ -252,25 +166,14 @@ clear_color_buffers(GLcontext *ctx)
for (buf = 0; buf < ctx->DrawBuffer->_NumColorDrawBuffers; buf++) {
struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[buf];
- if (ctx->Visual.rgbMode) {
- if (ctx->Color.ColorMask[buf][0] == 0 ||
- ctx->Color.ColorMask[buf][1] == 0 ||
- ctx->Color.ColorMask[buf][2] == 0 ||
- ctx->Color.ColorMask[buf][3] == 0) {
- clear_rgba_buffer_with_masking(ctx, rb, buf);
- }
- else {
- clear_rgba_buffer(ctx, rb, buf);
- }
+ if (ctx->Color.ColorMask[buf][0] == 0 ||
+ ctx->Color.ColorMask[buf][1] == 0 ||
+ ctx->Color.ColorMask[buf][2] == 0 ||
+ ctx->Color.ColorMask[buf][3] == 0) {
+ clear_rgba_buffer_with_masking(ctx, rb, buf);
}
else {
- const GLuint indexMask = (1 << _mesa_get_format_bits(rb->Format, GL_INDEX_BITS)) - 1;
- if ((ctx->Color.IndexMask & indexMask) != indexMask) {
- clear_ci_buffer_with_masking(ctx, rb);
- }
- else {
- clear_ci_buffer(ctx, rb);
- }
+ clear_rgba_buffer(ctx, rb, buf);
}
}
}
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index 0d4680db9f..751966348b 100644
--- a/src/mesa/swrast/s_context.c
+++ b/src/mesa/swrast/s_context.c
@@ -63,24 +63,17 @@ _swrast_update_rasterflags( GLcontext *ctx )
if (swrast->_FogEnabled) rasterMask |= FOG_BIT;
if (ctx->Scissor.Enabled) rasterMask |= CLIP_BIT;
if (ctx->Stencil._Enabled) rasterMask |= STENCIL_BIT;
- if (ctx->Visual.rgbMode) {
- for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) {
- if (!ctx->Color.ColorMask[i][0] ||
- !ctx->Color.ColorMask[i][1] ||
- !ctx->Color.ColorMask[i][2] ||
- !ctx->Color.ColorMask[i][3]) {
- rasterMask |= MASKING_BIT;
- break;
- }
+ for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) {
+ if (!ctx->Color.ColorMask[i][0] ||
+ !ctx->Color.ColorMask[i][1] ||
+ !ctx->Color.ColorMask[i][2] ||
+ !ctx->Color.ColorMask[i][3]) {
+ rasterMask |= MASKING_BIT;
+ break;
}
- if (ctx->Color._LogicOpEnabled) rasterMask |= LOGIC_OP_BIT;
- if (ctx->Texture._EnabledUnits) rasterMask |= TEXTURE_BIT;
- }
- else {
- if (ctx->Color.IndexMask != 0xffffffff) rasterMask |= MASKING_BIT;
- if (ctx->Color.IndexLogicOpEnabled) rasterMask |= LOGIC_OP_BIT;
}
-
+ if (ctx->Color._LogicOpEnabled) rasterMask |= LOGIC_OP_BIT;
+ if (ctx->Texture._EnabledUnits) rasterMask |= TEXTURE_BIT;
if ( ctx->Viewport.X < 0
|| ctx->Viewport.X + ctx->Viewport.Width > (GLint) ctx->DrawBuffer->Width
|| ctx->Viewport.Y < 0
@@ -100,19 +93,14 @@ _swrast_update_rasterflags( GLcontext *ctx )
/* more than one color buffer designated for writing (or zero buffers) */
rasterMask |= MULTI_DRAW_BIT;
}
- else if (!ctx->Visual.rgbMode && ctx->Color.IndexMask==0) {
- rasterMask |= MULTI_DRAW_BIT; /* all color index bits disabled */
- }
- if (ctx->Visual.rgbMode) {
- for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) {
- if (ctx->Color.ColorMask[i][0] +
- ctx->Color.ColorMask[i][1] +
- ctx->Color.ColorMask[i][2] +
- ctx->Color.ColorMask[i][3] == 0) {
- rasterMask |= MULTI_DRAW_BIT; /* all RGBA channels disabled */
- break;
- }
+ for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) {
+ if (ctx->Color.ColorMask[i][0] +
+ ctx->Color.ColorMask[i][1] +
+ ctx->Color.ColorMask[i][2] +
+ ctx->Color.ColorMask[i][3] == 0) {
+ rasterMask |= MULTI_DRAW_BIT; /* all RGBA channels disabled */
+ break;
}
}
@@ -892,12 +880,7 @@ _swrast_flush( GLcontext *ctx )
SWcontext *swrast = SWRAST_CONTEXT(ctx);
/* flush any pending fragments from rendering points */
if (swrast->PointSpan.end > 0) {
- if (ctx->Visual.rgbMode) {
- _swrast_write_rgba_span(ctx, &(swrast->PointSpan));
- }
- else {
- _swrast_write_index_span(ctx, &(swrast->PointSpan));
- }
+ _swrast_write_rgba_span(ctx, &(swrast->PointSpan));
swrast->PointSpan.end = 0;
}
}
diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c
index 3f37c027e4..f4f0c8a330 100644
--- a/src/mesa/swrast/s_copypix.c
+++ b/src/mesa/swrast/s_copypix.c
@@ -307,100 +307,6 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
}
-static void
-copy_ci_pixels( GLcontext *ctx, GLint srcx, GLint srcy,
- GLint width, GLint height,
- GLint destx, GLint desty )
-{
- GLuint *tmpImage,*p;
- GLint sy, dy, stepy;
- GLint j;
- const GLboolean zoom = ctx->Pixel.ZoomX != 1.0F || ctx->Pixel.ZoomY != 1.0F;
- GLint overlapping;
- SWspan span;
-
- if (!ctx->ReadBuffer->_ColorReadBuffer) {
- /* no readbuffer - OK */
- return;
- }
-
- INIT_SPAN(span, GL_BITMAP);
- _swrast_span_default_attribs(ctx, &span);
- span.arrayMask = SPAN_INDEX;
-
- if (ctx->DrawBuffer == ctx->ReadBuffer) {
- overlapping = regions_overlap(srcx, srcy, destx, desty, width, height,
- ctx->Pixel.ZoomX, ctx->Pixel.ZoomY);
- }
- else {
- overlapping = GL_FALSE;
- }
-
- /* Determine if copy should be bottom-to-top or top-to-bottom */
- if (!overlapping && srcy < desty) {
- /* top-down max-to-min */
- sy = srcy + height - 1;
- dy = desty + height - 1;
- stepy = -1;
- }
- else {
- /* bottom-up min-to-max */
- sy = srcy;
- dy = desty;
- stepy = 1;
- }
-
- if (overlapping) {
- GLint ssy = sy;
- tmpImage = (GLuint *) malloc(width * height * sizeof(GLuint));
- if (!tmpImage) {
- _mesa_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" );
- return;
- }
- /* read the image */
- p = tmpImage;
- for (j = 0; j < height; j++, ssy += stepy) {
- _swrast_read_index_span( ctx, ctx->ReadBuffer->_ColorReadBuffer,
- width, srcx, ssy, p );
- p += width;
- }
- p = tmpImage;
- }
- else {
- tmpImage = NULL; /* silence compiler warning */
- p = NULL;
- }
-
- for (j = 0; j < height; j++, sy += stepy, dy += stepy) {
- /* Get color indexes */
- if (overlapping) {
- memcpy(span.array->index, p, width * sizeof(GLuint));
- p += width;
- }
- else {
- _swrast_read_index_span( ctx, ctx->ReadBuffer->_ColorReadBuffer,
- width, srcx, sy, span.array->index );
- }
-
- if (ctx->_ImageTransferState)
- _mesa_apply_ci_transfer_ops(ctx, ctx->_ImageTransferState,
- width, span.array->index);
-
- /* write color indexes */
- span.x = destx;
- span.y = dy;
- span.end = width;
- if (zoom)
- _swrast_write_zoomed_index_span(ctx, destx, desty, &span);
- else
- _swrast_write_index_span(ctx, &span);
- }
-
- if (overlapping)
- free(tmpImage);
-}
-
-
/**
* Convert floating point Z values to integer Z values with pixel transfer's
* Z scale and bias.
@@ -522,18 +428,10 @@ copy_depth_pixels( GLcontext *ctx, GLint srcx, GLint srcy,
span.x = destx;
span.y = dy;
span.end = width;
- if (fb->Visual.rgbMode) {
- if (zoom)
- _swrast_write_zoomed_depth_span(ctx, destx, desty, &span);
- else
- _swrast_write_rgba_span(ctx, &span);
- }
- else {
- if (zoom)
- _swrast_write_zoomed_depth_span(ctx, destx, desty, &span);
- else
- _swrast_write_index_span(ctx, &span);
- }
+ if (zoom)
+ _swrast_write_zoomed_depth_span(ctx, destx, desty, &span);
+ else
+ _swrast_write_rgba_span(ctx, &span);
}
if (overlapping)
@@ -909,12 +807,7 @@ _swrast_CopyPixels( GLcontext *ctx,
if (!fast_copy_pixels(ctx, srcx, srcy, width, height, destx, desty, type)) {
switch (type) {
case GL_COLOR:
- if (ctx->Visual.rgbMode) {
- copy_rgba_pixels( ctx, srcx, srcy, width, height, destx, desty );
- }
- else {
- copy_ci_pixels( ctx, srcx, srcy, width, height, destx, desty );
- }
+ copy_rgba_pixels( ctx, srcx, srcy, width, height, destx, desty );
break;
case GL_DEPTH:
copy_depth_pixels( ctx, srcx, srcy, width, height, destx, desty );
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index 7571d5b8c0..3cec3a7a2b 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -267,7 +267,7 @@ fast_draw_rgba_pixels(GLcontext *ctx, GLint x, GLint y,
if (format == GL_COLOR_INDEX && type == GL_UNSIGNED_BYTE) {
const GLubyte *src = (const GLubyte *) pixels
+ unpack.SkipRows * unpack.RowLength + unpack.SkipPixels;
- if (ctx->Visual.rgbMode && rbType == GL_UNSIGNED_BYTE) {
+ if (rbType == GL_UNSIGNED_BYTE) {
/* convert ubyte/CI data to ubyte/RGBA */
if (simpleZoom) {
GLint row;
@@ -299,22 +299,6 @@ fast_draw_rgba_pixels(GLcontext *ctx, GLint x, GLint y,
}
return GL_TRUE;
}
- else if (!ctx->Visual.rgbMode && rbType == GL_UNSIGNED_INT) {
- /* write CI data to CI frame buffer */
- GLint row;
- if (simpleZoom) {
- for (row = 0; row < drawHeight; row++) {
- GLuint index32[MAX_WIDTH];
- GLint col;
- for (col = 0; col < drawWidth; col++)
- index32[col] = src[col];
- rb->PutRow(ctx, rb, drawWidth, destX, destY, index32, NULL);
- src += unpack.RowLength;
- destY += yStep;
- }
- return GL_TRUE;
- }
- }
}
/* can't handle this pixel format and/or data type */
@@ -324,57 +308,6 @@ fast_draw_rgba_pixels(GLcontext *ctx, GLint x, GLint y,
/*
- * Draw color index image.
- */
-static void
-draw_index_pixels( GLcontext *ctx, GLint x, GLint y,
- GLsizei width, GLsizei height,
- GLenum type,
- const struct gl_pixelstore_attrib *unpack,
- const GLvoid *pixels )
-{
- const GLint imgX = x, imgY = y;
- const GLboolean zoom = ctx->Pixel.ZoomX!=1.0 || ctx->Pixel.ZoomY!=1.0;
- GLint row, skipPixels;
- SWspan span;
-
- INIT_SPAN(span, GL_BITMAP);
- span.arrayMask = SPAN_INDEX;
- _swrast_span_default_attribs(ctx, &span);
-
- /*
- * General solution
- */
- skipPixels = 0;
- while (skipPixels < width) {
- const GLint spanWidth = MIN2(width - skipPixels, MAX_WIDTH);
- ASSERT(spanWidth <= MAX_WIDTH);
- for (row = 0; row < height; row++) {
- const GLvoid *source = _mesa_image_address2d(unpack, pixels,
- width, height,
- GL_COLOR_INDEX, type,
- row, skipPixels);
- _mesa_unpack_index_span(ctx, spanWidth, GL_UNSIGNED_INT,
- span.array->index, type, source, unpack,
- ctx->_ImageTransferState);
-
- /* These may get changed during writing/clipping */
- span.x = x + skipPixels;
- span.y = y + row;
- span.end = spanWidth;
-
- if (zoom)
- _swrast_write_zoomed_index_span(ctx, imgX, imgY, &span);
- else
- _swrast_write_index_span(ctx, &span);
- }
- skipPixels += spanWidth;
- }
-}
-
-
-
-/*
* Draw stencil image.
*/
static void
@@ -441,7 +374,6 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
&& ctx->DrawBuffer->Visual.depthBits == 16
&& !scaleOrBias
&& !zoom
- && ctx->Visual.rgbMode
&& width <= MAX_WIDTH
&& !unpack->SwapBytes) {
/* Special case: directly write 16-bit depth values */
@@ -462,7 +394,6 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
else if (type == GL_UNSIGNED_INT
&& !scaleOrBias
&& !zoom
- && ctx->Visual.rgbMode
&& width <= MAX_WIDTH
&& !unpack->SwapBytes) {
/* Special case: shift 32-bit values down to Visual.depthBits */
@@ -515,11 +446,8 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
if (zoom) {
_swrast_write_zoomed_depth_span(ctx, x, y, &span);
}
- else if (ctx->Visual.rgbMode) {
- _swrast_write_rgba_span(ctx, &span);
- }
else {
- _swrast_write_index_span(ctx, &span);
+ _swrast_write_rgba_span(ctx, &span);
}
}
skipPixels += spanWidth;
@@ -867,11 +795,6 @@ _swrast_DrawPixels( GLcontext *ctx,
draw_depth_pixels( ctx, x, y, width, height, type, unpack, pixels );
break;
case GL_COLOR_INDEX:
- if (ctx->Visual.rgbMode)
- draw_rgba_pixels(ctx, x,y, width, height, format, type, unpack, pixels);
- else
- draw_index_pixels(ctx, x, y, width, height, type, unpack, pixels);
- break;
case GL_RED:
case GL_GREEN:
case GL_BLUE:
diff --git a/src/mesa/swrast/s_feedback.c b/src/mesa/swrast/s_feedback.c
index 2e6066983d..373b1416e2 100644
--- a/src/mesa/swrast/s_feedback.c
+++ b/src/mesa/swrast/s_feedback.c
@@ -46,7 +46,7 @@ feedback_vertex(GLcontext * ctx, const SWvertex * v, const SWvertex * pv)
win[2] = v->attrib[FRAG_ATTRIB_WPOS][2] / ctx->DrawBuffer->_DepthMaxF;
win[3] = 1.0F / v->attrib[FRAG_ATTRIB_WPOS][3];
- _mesa_feedback_vertex(ctx, win, color, v->attrib[FRAG_ATTRIB_CI][0], vtc);
+ _mesa_feedback_vertex(ctx, win, color, vtc);
}
diff --git a/src/mesa/swrast/s_fog.c b/src/mesa/swrast/s_fog.c
index 0472bbf553..3fc8439213 100644
--- a/src/mesa/swrast/s_fog.c
+++ b/src/mesa/swrast/s_fog.c
@@ -122,38 +122,6 @@ else { \
} \
}
-/* As above, but CI mode (XXX try to merge someday) */
-#define FOG_LOOP_CI(FOG_FUNC) \
-if (span->arrayAttribs & FRAG_BIT_FOGC) { \
- GLuint i; \
- for (i = 0; i < span->end; i++) { \
- const GLfloat fogCoord = span->array->attribs[FRAG_ATTRIB_FOGC][i][0]; \
- const GLfloat c = FABSF(fogCoord); \
- GLfloat f; \
- FOG_FUNC(f, c); \
- f = CLAMP(f, 0.0F, 1.0F); \
- index[i] = (GLuint) ((GLfloat) index[i] + (1.0F - f) * fogIndex); \
- } \
-} \
-else { \
- const GLfloat fogStep = span->attrStepX[FRAG_ATTRIB_FOGC][0]; \
- GLfloat fogCoord = span->attrStart[FRAG_ATTRIB_FOGC][0]; \
- const GLfloat wStep = span->attrStepX[FRAG_ATTRIB_WPOS][3]; \
- GLfloat w = span->attrStart[FRAG_ATTRIB_WPOS][3]; \
- GLuint i; \
- for (i = 0; i < span->end; i++) { \
- const GLfloat c = FABSF(fogCoord) / w; \
- GLfloat f; \
- FOG_FUNC(f, c); \
- f = CLAMP(f, 0.0F, 1.0F); \
- index[i] = (GLuint) ((GLfloat) index[i] + (1.0F - f) * fogIndex); \
- fogCoord += fogStep; \
- w += wStep; \
- } \
-}
-
-
-
/**
* Apply fog to a span of RGBA pixels.
* The fog value are either in the span->array->fog array or interpolated from
@@ -275,56 +243,3 @@ _swrast_fog_rgba_span( const GLcontext *ctx, SWspan *span )
}
}
}
-
-
-/**
- * As above, but color index mode.
- */
-void
-_swrast_fog_ci_span( const GLcontext *ctx, SWspan *span )
-{
- const SWcontext *swrast = CONST_SWRAST_CONTEXT(ctx);
- const GLuint fogIndex = (GLuint) ctx->Fog.Index;
- GLuint *index = span->array->index;
-
- ASSERT(swrast->_FogEnabled);
- ASSERT(span->arrayMask & SPAN_INDEX);
-
- /* we need to compute fog blend factors */
- if (swrast->_PreferPixelFog) {
- /* The span's fog values are fog coordinates, now compute blend factors
- * and blend the fragment colors with the fog color.
- */
- switch (ctx->Fog.Mode) {
- case GL_LINEAR:
- {
- const GLfloat fogEnd = ctx->Fog.End;
- const GLfloat fogScale = (ctx->Fog.Start == ctx->Fog.End)
- ? 1.0F : 1.0F / (ctx->Fog.End - ctx->Fog.Start);
- FOG_LOOP_CI(LINEAR_FOG);
- }
- break;
- case GL_EXP:
- {
- const GLfloat density = -ctx->Fog.Density;
- FOG_LOOP_CI(EXP_FOG);
- }
- break;
- case GL_EXP2:
- {
- const GLfloat negDensitySquared = -ctx->Fog.Density * ctx->Fog.Density;
- FOG_LOOP_CI(EXP2_FOG);
- }
- break;
- default:
- _mesa_problem(ctx, "Bad fog mode in _swrast_fog_ci_span");
- return;
- }
- }
- else {
- /* The span's fog start/step/array values are blend factors in [0,1].
- * They were previously computed per-vertex.
- */
- FOG_LOOP_CI(BLEND_FOG);
- }
-}
diff --git a/src/mesa/swrast/s_fog.h b/src/mesa/swrast/s_fog.h
index 50760d88af..06107de3f9 100644
--- a/src/mesa/swrast/s_fog.h
+++ b/src/mesa/swrast/s_fog.h
@@ -37,8 +37,4 @@ _swrast_z_to_fogfactor(GLcontext *ctx, GLfloat z);
extern void
_swrast_fog_rgba_span( const GLcontext *ctx, SWspan *span );
-extern void
-_swrast_fog_ci_span( const GLcontext *ctx, SWspan *span );
-
-
#endif
diff --git a/src/mesa/swrast/s_lines.c b/src/mesa/swrast/s_lines.c
index cff36042cb..7db5af4ae1 100644
--- a/src/mesa/swrast/s_lines.c
+++ b/src/mesa/swrast/s_lines.c
@@ -87,10 +87,7 @@ draw_wide_line( GLcontext *ctx, SWspan *span, GLboolean xMajor )
for (i = 0; i < span->end; i++)
y[i]++;
}
- if (ctx->Visual.rgbMode)
- _swrast_write_rgba_span(ctx, span);
- else
- _swrast_write_index_span(ctx, span);
+ _swrast_write_rgba_span(ctx, span);
}
}
else {
@@ -106,10 +103,7 @@ draw_wide_line( GLcontext *ctx, SWspan *span, GLboolean xMajor )
for (i = 0; i < span->end; i++)
x[i]++;
}
- if (ctx->Visual.rgbMode)
- _swrast_write_rgba_span(ctx, span);
- else
- _swrast_write_index_span(ctx, span);
+ _swrast_write_rgba_span(ctx, span);
}
}
}
@@ -120,12 +114,6 @@ draw_wide_line( GLcontext *ctx, SWspan *span, GLboolean xMajor )
/***** Rasterization *****/
/**********************************************************************/
-/* Simple color index line (no stipple, width=1, no Z, no fog, no tex)*/
-#define NAME simple_no_z_ci_line
-#define INTERP_INDEX
-#define RENDER_SPAN(span) _swrast_write_index_span(ctx, &span)
-#include "s_linetemp.h"
-
/* Simple RGBA index line (no stipple, width=1, no Z, no fog, no tex)*/
#define NAME simple_no_z_rgba_line
#define INTERP_RGBA
@@ -133,25 +121,6 @@ draw_wide_line( GLcontext *ctx, SWspan *span, GLboolean xMajor )
#include "s_linetemp.h"
-/* Z, fog, wide, stipple color index line */
-#define NAME ci_line
-#define INTERP_INDEX
-#define INTERP_Z
-#define INTERP_ATTRIBS /* for fog */
-#define RENDER_SPAN(span) \
- if (ctx->Line.StippleFlag) { \
- span.arrayMask |= SPAN_MASK; \
- compute_stipple_mask(ctx, span.end, span.array->mask); \
- } \
- if (ctx->Line.Width > 1.0) { \
- draw_wide_line(ctx, &span, (GLboolean)(dx > dy)); \
- } \
- else { \
- _swrast_write_index_span(ctx, &span); \
- }
-#include "s_linetemp.h"
-
-
/* Z, fog, wide, stipple RGBA line */
#define NAME rgba_line
#define INTERP_RGBA
@@ -256,7 +225,6 @@ void
_swrast_choose_line( GLcontext *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
- const GLboolean rgbmode = ctx->Visual.rgbMode;
GLboolean specular = (ctx->Fog.ColorSumEnabled ||
(ctx->Light.Enabled &&
ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR));
@@ -277,23 +245,17 @@ _swrast_choose_line( GLcontext *ctx )
|| ctx->Line.Width != 1.0
|| ctx->Line.StippleFlag) {
/* no texture, but Z, fog, width>1, stipple, etc. */
- if (rgbmode)
#if CHAN_BITS == 32
- USE(general_line);
+ USE(general_line);
#else
- USE(rgba_line);
+ USE(rgba_line);
#endif
- else
- USE(ci_line);
}
else {
ASSERT(!ctx->Depth.Test);
ASSERT(ctx->Line.Width == 1.0);
/* simple lines */
- if (rgbmode)
- USE(simple_no_z_rgba_line);
- else
- USE(simple_no_z_ci_line);
+ USE(simple_no_z_rgba_line);
}
}
else if (ctx->RenderMode == GL_FEEDBACK) {
diff --git a/src/mesa/swrast/s_linetemp.h b/src/mesa/swrast/s_linetemp.h
index 1abf8d6c7f..033431df23 100644
--- a/src/mesa/swrast/s_linetemp.h
+++ b/src/mesa/swrast/s_linetemp.h
@@ -31,8 +31,6 @@
* The following macros may be defined to indicate what auxillary information
* must be interplated along the line:
* INTERP_Z - if defined, interpolate Z values
- * INTERP_RGBA - if defined, interpolate RGBA values
- * INTERP_INDEX - if defined, interpolate color index values
* INTERP_ATTRIBS - if defined, interpolate attribs (texcoords, varying, etc)
*
* When one can directly address pixels in the color buffer the following
@@ -86,7 +84,6 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 )
DEPTH_TYPE *zPtr;
#elif defined(INTERP_Z)
const GLint depthBits = ctx->DrawBuffer->Visual.depthBits;
-/*ctx->Visual.depthBits;*/
#endif
#ifdef PIXEL_ADDRESS
PIXEL_TYPE *pixelPtr;
@@ -223,7 +220,6 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 )
/*
* Span setup: compute start and step values for all interpolated values.
*/
-#ifdef INTERP_RGBA
interpFlags |= SPAN_RGBA;
if (ctx->Light.ShadeModel == GL_SMOOTH) {
span.red = ChanToFixed(vert0->color[0]);
@@ -245,19 +241,6 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 )
span.blueStep = 0;
span.alphaStep = 0;
}
-#endif
-#ifdef INTERP_INDEX
- interpFlags |= SPAN_INDEX;
- if (ctx->Light.ShadeModel == GL_SMOOTH) {
- span.index = FloatToFixed(vert0->attrib[FRAG_ATTRIB_CI][0]);
- span.indexStep = FloatToFixed( vert1->attrib[FRAG_ATTRIB_CI][0]
- - vert0->attrib[FRAG_ATTRIB_CI][0]) / numPixels;
- }
- else {
- span.index = FloatToFixed(vert1->attrib[FRAG_ATTRIB_CI][0]);
- span.indexStep = 0;
- }
-#endif
#if defined(INTERP_Z) || defined(DEPTH_TYPE)
interpFlags |= SPAN_Z;
{
@@ -407,9 +390,7 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 )
#undef NAME
#undef INTERP_Z
-#undef INTERP_RGBA
#undef INTERP_ATTRIBS
-#undef INTERP_INDEX
#undef PIXEL_ADDRESS
#undef PIXEL_TYPE
#undef DEPTH_TYPE
diff --git a/src/mesa/swrast/s_logic.c b/src/mesa/swrast/s_logic.c
index f0274b4c0b..c36a16e665 100644
--- a/src/mesa/swrast/s_logic.c
+++ b/src/mesa/swrast/s_logic.c
@@ -182,33 +182,6 @@ logicop_uint4(GLcontext *ctx, GLuint n, GLuint src[], const GLuint dest[],
-/*
- * Apply the current logic operator to a span of CI pixels. This is only
- * used if the device driver can't do logic ops.
- */
-void
-_swrast_logicop_ci_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- SWspan *span)
-{
- GLuint dest[MAX_WIDTH];
- GLuint *index = span->array->index;
-
- ASSERT(span->end < MAX_WIDTH);
- ASSERT(rb->DataType == GL_UNSIGNED_INT);
-
- /* Read dest values from frame buffer */
- if (span->arrayMask & SPAN_XY) {
- _swrast_get_values(ctx, rb, span->end, span->array->x, span->array->y,
- dest, sizeof(GLuint));
- }
- else {
- rb->GetRow(ctx, rb, span->end, span->x, span->y, dest);
- }
-
- logicop_uint1(ctx, span->end, index, dest, span->array->mask);
-}
-
-
/**
* Apply the current logic operator to a span of RGBA pixels.
* We can handle horizontal runs of pixels (spans) or arrays of x/y
diff --git a/src/mesa/swrast/s_logic.h b/src/mesa/swrast/s_logic.h
index ba20cd7b32..e8cfae33f2 100644
--- a/src/mesa/swrast/s_logic.h
+++ b/src/mesa/swrast/s_logic.h
@@ -29,12 +29,6 @@
#include "swrast.h"
-
-extern void
-_swrast_logicop_ci_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- SWspan *span);
-
-
extern void
_swrast_logicop_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
SWspan *span);
diff --git a/src/mesa/swrast/s_masking.c b/src/mesa/swrast/s_masking.c
index 69c2feb6da..e38d90f199 100644
--- a/src/mesa/swrast/s_masking.c
+++ b/src/mesa/swrast/s_masking.c
@@ -101,34 +101,3 @@ _swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
}
}
}
-
-
-/**
- * Apply the index mask to a span of color index values.
- */
-void
-_swrast_mask_ci_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- SWspan *span)
-{
- const GLuint srcMask = ctx->Color.IndexMask;
- const GLuint dstMask = ~srcMask;
- GLuint *index = span->array->index;
- GLuint dest[MAX_WIDTH];
- GLuint i;
-
- ASSERT(span->arrayMask & SPAN_INDEX);
- ASSERT(span->end <= MAX_WIDTH);
- ASSERT(rb->DataType == GL_UNSIGNED_INT);
-
- if (span->arrayMask & SPAN_XY) {
- _swrast_get_values(ctx, rb, span->end, span->array->x, span->array->y,
- dest, sizeof(GLuint));
- }
- else {
- _swrast_read_index_span(ctx, rb, span->end, span->x, span->y, dest);
- }
-
- for (i = 0; i < span->end; i++) {
- index[i] = (index[i] & srcMask) | (dest[i] & dstMask);
- }
-}
diff --git a/src/mesa/swrast/s_masking.h b/src/mesa/swrast/s_masking.h
index fed47f8cfb..3ba4f8356c 100644
--- a/src/mesa/swrast/s_masking.h
+++ b/src/mesa/swrast/s_masking.h
@@ -34,9 +34,4 @@ extern void
_swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
SWspan *span, GLuint buf);
-
-extern void
-_swrast_mask_ci_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- SWspan *span);
-
#endif
diff --git a/src/mesa/swrast/s_points.c b/src/mesa/swrast/s_points.c
index a9a704a16e..1663ece829 100644
--- a/src/mesa/swrast/s_points.c
+++ b/src/mesa/swrast/s_points.c
@@ -244,7 +244,6 @@ static void
smooth_point(GLcontext *ctx, const SWvertex *vert)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
- const GLboolean ciMode = !ctx->Visual.rgbMode;
SWspan span;
GLfloat size, alphaAtten;
@@ -335,10 +334,6 @@ smooth_point(GLcontext *ctx, const SWvertex *vert)
if (dist2 >= rmin2) {
/* compute partial coverage */
coverage = 1.0F - (dist2 - rmin2) * cscale;
- if (ciMode) {
- /* coverage in [0,15] */
- coverage *= 15.0;
- }
}
else {
/* full coverage */
@@ -369,7 +364,6 @@ static void
large_point(GLcontext *ctx, const SWvertex *vert)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
- const GLboolean ciMode = !ctx->Visual.rgbMode;
SWspan span;
GLfloat size;
@@ -389,22 +383,15 @@ large_point(GLcontext *ctx, const SWvertex *vert)
span.arrayMask = SPAN_XY;
span.facing = swrast->PointLineFacing;
- if (ciMode) {
- span.interpMask = SPAN_Z | SPAN_INDEX;
- span.index = FloatToFixed(vert->attrib[FRAG_ATTRIB_CI][0]);
- span.indexStep = 0;
- }
- else {
- span.interpMask = SPAN_Z | SPAN_RGBA;
- span.red = ChanToFixed(vert->color[0]);
- span.green = ChanToFixed(vert->color[1]);
- span.blue = ChanToFixed(vert->color[2]);
- span.alpha = ChanToFixed(vert->color[3]);
- span.redStep = 0;
- span.greenStep = 0;
- span.blueStep = 0;
- span.alphaStep = 0;
- }
+ span.interpMask = SPAN_Z | SPAN_RGBA;
+ span.red = ChanToFixed(vert->color[0]);
+ span.green = ChanToFixed(vert->color[1]);
+ span.blue = ChanToFixed(vert->color[2]);
+ span.alpha = ChanToFixed(vert->color[3]);
+ span.redStep = 0;
+ span.greenStep = 0;
+ span.blueStep = 0;
+ span.alphaStep = 0;
/* need these for fragment programs */
span.attrStart[FRAG_ATTRIB_WPOS][3] = 1.0F;
@@ -466,7 +453,6 @@ static void
pixel_point(GLcontext *ctx, const SWvertex *vert)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
- const GLboolean ciMode = !ctx->Visual.rgbMode;
/*
* Note that unlike the other functions, we put single-pixel points
* into a special span array in order to render as many points as
@@ -480,10 +466,7 @@ pixel_point(GLcontext *ctx, const SWvertex *vert)
/* Span init */
span->interpMask = 0;
span->arrayMask = SPAN_XY | SPAN_Z;
- if (ciMode)
- span->arrayMask |= SPAN_INDEX;
- else
- span->arrayMask |= SPAN_RGBA;
+ span->arrayMask |= SPAN_RGBA;
/*span->arrayMask |= SPAN_LAMBDA;*/
span->arrayAttribs = swrast->_ActiveAttribMask; /* we'll produce these vals */
@@ -497,10 +480,7 @@ pixel_point(GLcontext *ctx, const SWvertex *vert)
(swrast->_RasterMask & (BLEND_BIT | LOGIC_OP_BIT | MASKING_BIT)) ||
span->facing != swrast->PointLineFacing) {
if (span->end > 0) {
- if (ciMode)
- _swrast_write_index_span(ctx, span);
- else
- _swrast_write_rgba_span(ctx, span);
+ _swrast_write_rgba_span(ctx, span);
span->end = 0;
}
}
@@ -510,15 +490,11 @@ pixel_point(GLcontext *ctx, const SWvertex *vert)
span->facing = swrast->PointLineFacing;
/* fragment attributes */
- if (ciMode) {
- span->array->index[count] = (GLuint) vert->attrib[FRAG_ATTRIB_CI][0];
- }
- else {
- span->array->rgba[count][RCOMP] = vert->color[0];
- span->array->rgba[count][GCOMP] = vert->color[1];
- span->array->rgba[count][BCOMP] = vert->color[2];
- span->array->rgba[count][ACOMP] = vert->color[3];
- }
+ span->array->rgba[count][RCOMP] = vert->color[0];
+ span->array->rgba[count][GCOMP] = vert->color[1];
+ span->array->rgba[count][BCOMP] = vert->color[2];
+ span->array->rgba[count][ACOMP] = vert->color[3];
+
ATTRIB_LOOP_BEGIN
COPY_4V(span->array->attribs[attr][count], vert->attrib[attr]);
ATTRIB_LOOP_END
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
index 41911337b8..368311e14d 100644
--- a/src/mesa/swrast/s_readpix.c
+++ b/src/mesa/swrast/s_readpix.c
@@ -41,42 +41,6 @@
#include "s_stencil.h"
-/*
- * Read a block of color index pixels.
- */
-static void
-read_index_pixels( GLcontext *ctx,
- GLint x, GLint y,
- GLsizei width, GLsizei height,
- GLenum type, GLvoid *pixels,
- const struct gl_pixelstore_attrib *packing )
-{
- struct gl_renderbuffer *rb = ctx->ReadBuffer->_ColorReadBuffer;
- GLint i;
-
- if (!rb)
- return;
-
- /* width should never be > MAX_WIDTH since we did clipping earlier */
- ASSERT(width <= MAX_WIDTH);
-
- /* process image row by row */
- for (i = 0; i < height; i++) {
- GLuint index[MAX_WIDTH];
- GLvoid *dest;
- ASSERT(rb->DataType == GL_UNSIGNED_INT);
- rb->GetRow(ctx, rb, width, x, y + i, index);
-
- dest = _mesa_image_address2d(packing, pixels, width, height,
- GL_COLOR_INDEX, type, i, 0);
-
- _mesa_pack_index_span(ctx, width, type, dest, index,
- &ctx->Pack, ctx->_ImageTransferState);
- }
-}
-
-
-
/**
* Read pixels for format=GL_DEPTH_COMPONENT.
*/
@@ -289,21 +253,21 @@ fast_read_rgba_pixels( GLcontext *ctx,
/**
* When we're using a low-precision color buffer (like 16-bit 5/6/5)
* we have to adjust our color values a bit to pass conformance.
- * The problem is when a 5 or 6-bit color value is convert to an 8-bit
+ * The problem is when a 5 or 6-bit color value is converted to an 8-bit
* value and then a floating point value, the floating point values don't
* increment uniformly as the 5 or 6-bit value is incremented.
*
* This function adjusts floating point values to compensate.
*/
static void
-adjust_colors(GLcontext *ctx, GLuint n, GLfloat rgba[][4])
+adjust_colors(const struct gl_framebuffer *fb, GLuint n, GLfloat rgba[][4])
{
- const GLuint rShift = 8 - ctx->Visual.redBits;
- const GLuint gShift = 8 - ctx->Visual.greenBits;
- const GLuint bShift = 8 - ctx->Visual.blueBits;
- const GLfloat rScale = 1.0F / (GLfloat) ((1 << ctx->Visual.redBits ) - 1);
- const GLfloat gScale = 1.0F / (GLfloat) ((1 << ctx->Visual.greenBits) - 1);
- const GLfloat bScale = 1.0F / (GLfloat) ((1 << ctx->Visual.blueBits ) - 1);
+ const GLuint rShift = 8 - fb->Visual.redBits;
+ const GLuint gShift = 8 - fb->Visual.greenBits;
+ const GLuint bShift = 8 - fb->Visual.blueBits;
+ const GLfloat rScale = 1.0F / (GLfloat) ((1 << fb->Visual.redBits ) - 1);
+ const GLfloat gScale = 1.0F / (GLfloat) ((1 << fb->Visual.greenBits) - 1);
+ const GLfloat bScale = 1.0F / (GLfloat) ((1 << fb->Visual.blueBits ) - 1);
GLuint i;
for (i = 0; i < n; i++) {
GLint r, g, b;
@@ -373,18 +337,7 @@ read_rgba_pixels( GLcontext *ctx,
/* read full RGBA, FLOAT image */
dest = tmpImage;
for (row = 0; row < height; row++, y++) {
- if (fb->Visual.rgbMode) {
- _swrast_read_rgba_span(ctx, rb, width, x, y, GL_FLOAT, dest);
- }
- else {
- GLuint index[MAX_WIDTH];
- ASSERT(rb->DataType == GL_UNSIGNED_INT);
- rb->GetRow(ctx, rb, width, x, y, index);
- _mesa_apply_ci_transfer_ops(ctx,
- transferOps & IMAGE_SHIFT_OFFSET_BIT,
- width, index);
- _mesa_map_ci_to_rgba(ctx, width, index, (GLfloat (*)[4]) dest);
- }
+ _swrast_read_rgba_span(ctx, rb, width, x, y, GL_FLOAT, dest);
_mesa_apply_rgba_transfer_ops(ctx,
transferOps & IMAGE_PRE_CONVOLUTION_BITS,
width, (GLfloat (*)[4]) dest);
@@ -431,25 +384,13 @@ read_rgba_pixels( GLcontext *ctx,
for (row = 0; row < height; row++, y++) {
/* Get float rgba pixels */
- if (fb->Visual.rgbMode) {
- _swrast_read_rgba_span(ctx, rb, width, x, y, GL_FLOAT, rgba);
- }
- else {
- /* read CI and convert to RGBA */
- GLuint index[MAX_WIDTH];
- ASSERT(rb->DataType == GL_UNSIGNED_INT);
- rb->GetRow(ctx, rb, width, x, y, index);
- _mesa_apply_ci_transfer_ops(ctx,
- transferOps & IMAGE_SHIFT_OFFSET_BIT,
- width, index);
- _mesa_map_ci_to_rgba(ctx, width, index, rgba);
- }
+ _swrast_read_rgba_span(ctx, rb, width, x, y, GL_FLOAT, rgba);
/* apply fudge factor for shallow color buffers */
if (fb->Visual.redBits < 8 ||
fb->Visual.greenBits < 8 ||
fb->Visual.blueBits < 8) {
- adjust_colors(ctx, width, rgba);
+ adjust_colors(fb, width, rgba);
}
/* pack the row of RGBA pixels into user's buffer */
@@ -592,10 +533,6 @@ _swrast_ReadPixels( GLcontext *ctx,
return;
switch (format) {
- case GL_COLOR_INDEX:
- read_index_pixels(ctx, x, y, width, height, type, pixels,
- &clippedPacking);
- break;
case GL_STENCIL_INDEX:
read_stencil_pixels(ctx, x, y, width, height, type, pixels,
&clippedPacking);
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index dada364360..29f070686f 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -80,41 +80,34 @@ _swrast_span_default_attribs(GLcontext *ctx, SWspan *span)
span->attrStepY[FRAG_ATTRIB_WPOS][3] = 0.0;
/* primary color, or color index */
- if (ctx->Visual.rgbMode) {
- GLchan r, g, b, a;
- UNCLAMPED_FLOAT_TO_CHAN(r, ctx->Current.RasterColor[0]);
- UNCLAMPED_FLOAT_TO_CHAN(g, ctx->Current.RasterColor[1]);
- UNCLAMPED_FLOAT_TO_CHAN(b, ctx->Current.RasterColor[2]);
- UNCLAMPED_FLOAT_TO_CHAN(a, ctx->Current.RasterColor[3]);
+ GLchan r, g, b, a;
+ UNCLAMPED_FLOAT_TO_CHAN(r, ctx->Current.RasterColor[0]);
+ UNCLAMPED_FLOAT_TO_CHAN(g, ctx->Current.RasterColor[1]);
+ UNCLAMPED_FLOAT_TO_CHAN(b, ctx->Current.RasterColor[2]);
+ UNCLAMPED_FLOAT_TO_CHAN(a, ctx->Current.RasterColor[3]);
#if CHAN_TYPE == GL_FLOAT
- span->red = r;
- span->green = g;
- span->blue = b;
- span->alpha = a;
+ span->red = r;
+ span->green = g;
+ span->blue = b;
+ span->alpha = a;
#else
- span->red = IntToFixed(r);
- span->green = IntToFixed(g);
- span->blue = IntToFixed(b);
- span->alpha = IntToFixed(a);
+ span->red = IntToFixed(r);
+ span->green = IntToFixed(g);
+ span->blue = IntToFixed(b);
+ span->alpha = IntToFixed(a);
#endif
- span->redStep = 0;
- span->greenStep = 0;
- span->blueStep = 0;
- span->alphaStep = 0;
- span->interpMask |= SPAN_RGBA;
-
- COPY_4V(span->attrStart[FRAG_ATTRIB_COL0], ctx->Current.RasterColor);
- ASSIGN_4V(span->attrStepX[FRAG_ATTRIB_COL0], 0.0, 0.0, 0.0, 0.0);
- ASSIGN_4V(span->attrStepY[FRAG_ATTRIB_COL0], 0.0, 0.0, 0.0, 0.0);
- }
- else {
- span->index = FloatToFixed(ctx->Current.RasterIndex);
- span->indexStep = 0;
- span->interpMask |= SPAN_INDEX;
- }
+ span->redStep = 0;
+ span->greenStep = 0;
+ span->blueStep = 0;
+ span->alphaStep = 0;
+ span->interpMask |= SPAN_RGBA;
+
+ COPY_4V(span->attrStart[FRAG_ATTRIB_COL0], ctx->Current.RasterColor);
+ ASSIGN_4V(span->attrStepX[FRAG_ATTRIB_COL0], 0.0, 0.0, 0.0, 0.0);
+ ASSIGN_4V(span->attrStepY[FRAG_ATTRIB_COL0], 0.0, 0.0, 0.0, 0.0);
/* Secondary color */
- if (ctx->Visual.rgbMode && (ctx->Light.Enabled || ctx->Fog.ColorSumEnabled))
+ if (ctx->Light.Enabled || ctx->Fog.ColorSumEnabled)
{
COPY_4V(span->attrStart[FRAG_ATTRIB_COL1], ctx->Current.RasterSecondaryColor);
ASSIGN_4V(span->attrStepX[FRAG_ATTRIB_COL1], 0.0, 0.0, 0.0, 0.0);
@@ -374,38 +367,6 @@ interpolate_float_colors(SWspan *span)
-/* Fill in the span.color.index array from the interpolation values */
-static INLINE void
-interpolate_indexes(GLcontext *ctx, SWspan *span)
-{
- GLfixed index = span->index;
- const GLint indexStep = span->indexStep;
- const GLuint n = span->end;
- GLuint *indexes = span->array->index;
- GLuint i;
- (void) ctx;
-
- ASSERT(!(span->arrayMask & SPAN_INDEX));
-
- if ((span->interpMask & SPAN_FLAT) || (indexStep == 0)) {
- /* constant color */
- index = FixedToInt(index);
- for (i = 0; i < n; i++) {
- indexes[i] = index;
- }
- }
- else {
- /* interpolate */
- for (i = 0; i < n; i++) {
- indexes[i] = FixedToInt(index);
- index += indexStep;
- }
- }
- span->arrayMask |= SPAN_INDEX;
- span->interpMask &= ~SPAN_INDEX;
-}
-
-
/**
* Fill in the span.zArray array from the span->z, zStep values.
*/
@@ -842,249 +803,6 @@ clip_span( GLcontext *ctx, SWspan *span )
/**
- * Apply all the per-fragment opertions to a span of color index fragments
- * and write them to the enabled color drawbuffers.
- * The 'span' parameter can be considered to be const. Note that
- * span->interpMask and span->arrayMask may be changed but will be restored
- * to their original values before returning.
- */
-void
-_swrast_write_index_span( GLcontext *ctx, SWspan *span)
-{
- const SWcontext *swrast = SWRAST_CONTEXT(ctx);
- const GLbitfield origInterpMask = span->interpMask;
- const GLbitfield origArrayMask = span->arrayMask;
- struct gl_framebuffer *fb = ctx->DrawBuffer;
-
- ASSERT(span->end <= MAX_WIDTH);
- ASSERT(span->primitive == GL_POINT || span->primitive == GL_LINE ||
- span->primitive == GL_POLYGON || span->primitive == GL_BITMAP);
- ASSERT((span->interpMask | span->arrayMask) & SPAN_INDEX);
- /*
- ASSERT((span->interpMask & span->arrayMask) == 0);
- */
-
- if (span->arrayMask & SPAN_MASK) {
- /* mask was initialized by caller, probably glBitmap */
- span->writeAll = GL_FALSE;
- }
- else {
- memset(span->array->mask, 1, span->end);
- span->writeAll = GL_TRUE;
- }
-
- /* Clipping */
- if ((swrast->_RasterMask & CLIP_BIT) || (span->primitive != GL_POLYGON)) {
- if (!clip_span(ctx, span)) {
- return;
- }
- }
-
- if (!(span->arrayMask & SPAN_MASK)) {
- /* post-clip sanity check */
- assert(span->x >= 0);
- assert(span->y >= 0);
- }
-
- /* Depth bounds test */
- if (ctx->Depth.BoundsTest && fb->Visual.depthBits > 0) {
- if (!_swrast_depth_bounds_test(ctx, span)) {
- return;
- }
- }
-
-#ifdef DEBUG
- /* Make sure all fragments are within window bounds */
- if (span->arrayMask & SPAN_XY) {
- GLuint i;
- for (i = 0; i < span->end; i++) {
- if (span->array->mask[i]) {
- assert(span->array->x[i] >= fb->_Xmin);
- assert(span->array->x[i] < fb->_Xmax);
- assert(span->array->y[i] >= fb->_Ymin);
- assert(span->array->y[i] < fb->_Ymax);
- }
- }
- }
-#endif
-
- /* Polygon Stippling */
- if (ctx->Polygon.StippleFlag && span->primitive == GL_POLYGON) {
- stipple_polygon_span(ctx, span);
- }
-
- /* Stencil and Z testing */
- if (ctx->Stencil._Enabled || ctx->Depth.Test) {
- if (!(span->arrayMask & SPAN_Z))
- _swrast_span_interpolate_z(ctx, span);
-
- if (ctx->Transform.DepthClamp)
- _swrast_depth_clamp_span(ctx, span);
-
- if (ctx->Stencil._Enabled) {
- if (!_swrast_stencil_and_ztest_span(ctx, span)) {
- span->arrayMask = origArrayMask;
- return;
- }
- }
- else {
- ASSERT(ctx->Depth.Test);
- if (!_swrast_depth_test_span(ctx, span)) {
- span->interpMask = origInterpMask;
- span->arrayMask = origArrayMask;
- return;
- }
- }
- }
-
- if (ctx->Query.CurrentOcclusionObject) {
- /* update count of 'passed' fragments */
- struct gl_query_object *q = ctx->Query.CurrentOcclusionObject;
- GLuint i;
- for (i = 0; i < span->end; i++)
- q->Result += span->array->mask[i];
- }
-
- /* we have to wait until after occlusion to do this test */
- if (ctx->Color.IndexMask == 0) {
- /* write no pixels */
- span->arrayMask = origArrayMask;
- return;
- }
-
- /* Interpolate the color indexes if needed */
- if (swrast->_FogEnabled ||
- ctx->Color.IndexLogicOpEnabled ||
- ctx->Color.IndexMask != 0xffffffff ||
- (span->arrayMask & SPAN_COVERAGE)) {
- if (!(span->arrayMask & SPAN_INDEX) /*span->interpMask & SPAN_INDEX*/) {
- interpolate_indexes(ctx, span);
- }
- }
-
- /* Fog */
- if (swrast->_FogEnabled) {
- _swrast_fog_ci_span(ctx, span);
- }
-
- /* Antialias coverage application */
- if (span->arrayMask & SPAN_COVERAGE) {
- const GLfloat *coverage = span->array->coverage;
- GLuint *index = span->array->index;
- GLuint i;
- for (i = 0; i < span->end; i++) {
- ASSERT(coverage[i] < 16);
- index[i] = (index[i] & ~0xf) | ((GLuint) coverage[i]);
- }
- }
-
- /*
- * Write to renderbuffers
- */
- {
- const GLuint numBuffers = fb->_NumColorDrawBuffers;
- GLuint buf;
-
- for (buf = 0; buf < numBuffers; buf++) {
- struct gl_renderbuffer *rb = fb->_ColorDrawBuffers[buf];
- GLuint indexSave[MAX_WIDTH];
-
- ASSERT(rb->_BaseFormat == GL_COLOR_INDEX);
-
- if (numBuffers > 1) {
- /* save indexes for second, third renderbuffer writes */
- memcpy(indexSave, span->array->index,
- span->end * sizeof(indexSave[0]));
- }
-
- if (ctx->Color.IndexLogicOpEnabled) {
- _swrast_logicop_ci_span(ctx, rb, span);
- }
-
- if (ctx->Color.IndexMask != 0xffffffff) {
- _swrast_mask_ci_span(ctx, rb, span);
- }
-
- if (!(span->arrayMask & SPAN_INDEX) && span->indexStep == 0) {
- /* all fragments have same color index */
- GLubyte index8;
- GLushort index16;
- GLuint index32;
- void *value;
-
- if (rb->DataType == GL_UNSIGNED_BYTE) {
- index8 = FixedToInt(span->index);
- value = &index8;
- }
- else if (rb->DataType == GL_UNSIGNED_SHORT) {
- index16 = FixedToInt(span->index);
- value = &index16;
- }
- else {
- ASSERT(rb->DataType == GL_UNSIGNED_INT);
- index32 = FixedToInt(span->index);
- value = &index32;
- }
-
- if (span->arrayMask & SPAN_XY) {
- rb->PutMonoValues(ctx, rb, span->end, span->array->x,
- span->array->y, value, span->array->mask);
- }
- else {
- rb->PutMonoRow(ctx, rb, span->end, span->x, span->y,
- value, span->array->mask);
- }
- }
- else {
- /* each fragment is a different color */
- GLubyte index8[MAX_WIDTH];
- GLushort index16[MAX_WIDTH];
- void *values;
-
- if (rb->DataType == GL_UNSIGNED_BYTE) {
- GLuint k;
- for (k = 0; k < span->end; k++) {
- index8[k] = (GLubyte) span->array->index[k];
- }
- values = index8;
- }
- else if (rb->DataType == GL_UNSIGNED_SHORT) {
- GLuint k;
- for (k = 0; k < span->end; k++) {
- index16[k] = (GLushort) span->array->index[k];
- }
- values = index16;
- }
- else {
- ASSERT(rb->DataType == GL_UNSIGNED_INT);
- values = span->array->index;
- }
-
- if (span->arrayMask & SPAN_XY) {
- rb->PutValues(ctx, rb, span->end,
- span->array->x, span->array->y,
- values, span->array->mask);
- }
- else {
- rb->PutRow(ctx, rb, span->end, span->x, span->y,
- values, span->array->mask);
- }
- }
-
- if (buf + 1 < numBuffers) {
- /* restore original span values */
- memcpy(span->array->index, indexSave,
- span->end * sizeof(indexSave[0]));
- }
- } /* for buf */
- }
-
- span->interpMask = origInterpMask;
- span->arrayMask = origArrayMask;
-}
-
-
-/**
* Add specular colors to primary colors.
* Only called during fixed-function operation.
* Result is float color array (FRAG_ATTRIB_COL0).
@@ -1630,74 +1348,6 @@ _swrast_read_rgba_span( GLcontext *ctx, struct gl_renderbuffer *rb,
/**
- * Read CI pixels from a renderbuffer. Clipping will be done to prevent
- * reading ouside the buffer's boundaries.
- */
-void
-_swrast_read_index_span( GLcontext *ctx, struct gl_renderbuffer *rb,
- GLuint n, GLint x, GLint y, GLuint index[] )
-{
- const GLint bufWidth = (GLint) rb->Width;
- const GLint bufHeight = (GLint) rb->Height;
-
- if (y < 0 || y >= bufHeight || x + (GLint) n < 0 || x >= bufWidth) {
- /* completely above, below, or right */
- memset(index, 0, n * sizeof(GLuint));
- }
- else {
- GLint skip, length;
- if (x < 0) {
- /* left edge clipping */
- skip = -x;
- length = (GLint) n - skip;
- if (length < 0) {
- /* completely left of window */
- return;
- }
- if (length > bufWidth) {
- length = bufWidth;
- }
- }
- else if ((GLint) (x + n) > bufWidth) {
- /* right edge clipping */
- skip = 0;
- length = bufWidth - x;
- if (length < 0) {
- /* completely to right of window */
- return;
- }
- }
- else {
- /* no clipping */
- skip = 0;
- length = (GLint) n;
- }
-
- ASSERT(rb->GetRow);
- ASSERT(rb->_BaseFormat == GL_COLOR_INDEX);
-
- if (rb->DataType == GL_UNSIGNED_BYTE) {
- GLubyte index8[MAX_WIDTH];
- GLint i;
- rb->GetRow(ctx, rb, length, x + skip, y, index8);
- for (i = 0; i < length; i++)
- index[skip + i] = index8[i];
- }
- else if (rb->DataType == GL_UNSIGNED_SHORT) {
- GLushort index16[MAX_WIDTH];
- GLint i;
- rb->GetRow(ctx, rb, length, x + skip, y, index16);
- for (i = 0; i < length; i++)
- index[skip + i] = index16[i];
- }
- else if (rb->DataType == GL_UNSIGNED_INT) {
- rb->GetRow(ctx, rb, length, x + skip, y, index + skip);
- }
- }
-}
-
-
-/**
* Wrapper for gl_renderbuffer::GetValues() which does clipping to avoid
* reading values outside the buffer bounds.
* We can use this for reading any format/type of renderbuffer.
diff --git a/src/mesa/swrast/s_span.h b/src/mesa/swrast/s_span.h
index 0eabae20e0..aaf1fec2a8 100644
--- a/src/mesa/swrast/s_span.h
+++ b/src/mesa/swrast/s_span.h
@@ -41,13 +41,12 @@
*/
/*@{*/
#define SPAN_RGBA 0x01 /**< interpMask and arrayMask */
-#define SPAN_INDEX 0x02 /**< interpMask and arrayMask */
-#define SPAN_Z 0x04 /**< interpMask and arrayMask */
-#define SPAN_FLAT 0x08 /**< interpMask: flat shading? */
-#define SPAN_XY 0x10 /**< array.x[], y[] valid? */
-#define SPAN_MASK 0x20 /**< was array.mask[] filled in by caller? */
-#define SPAN_LAMBDA 0x40 /**< array.lambda[] valid? */
-#define SPAN_COVERAGE 0x80 /**< array.coverage[] valid? */
+#define SPAN_Z 0x02 /**< interpMask and arrayMask */
+#define SPAN_FLAT 0x04 /**< interpMask: flat shading? */
+#define SPAN_XY 0x08 /**< array.x[], y[] valid? */
+#define SPAN_MASK 0x10 /**< was array.mask[] filled in by caller? */
+#define SPAN_LAMBDA 0x20 /**< array.lambda[] valid? */
+#define SPAN_COVERAGE 0x40 /**< array.coverage[] valid? */
/*@}*/
@@ -187,9 +186,6 @@ _swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy,
GLfloat dqdx, GLfloat dqdy, GLfloat texW, GLfloat texH,
GLfloat s, GLfloat t, GLfloat q, GLfloat invQ);
-extern void
-_swrast_write_index_span( GLcontext *ctx, SWspan *span);
-
extern void
_swrast_write_rgba_span( GLcontext *ctx, SWspan *span);
@@ -200,10 +196,6 @@ _swrast_read_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y, GLenum type, GLvoid *rgba);
extern void
-_swrast_read_index_span( GLcontext *ctx, struct gl_renderbuffer *rb,
- GLuint n, GLint x, GLint y, GLuint indx[] );
-
-extern void
_swrast_get_values(GLcontext *ctx, struct gl_renderbuffer *rb,
GLuint count, const GLint x[], const GLint y[],
void *values, GLuint valueSize);
diff --git a/src/mesa/swrast/s_spantemp.h b/src/mesa/swrast/s_spantemp.h
index bab2ca7378..2948a90f6b 100644
--- a/src/mesa/swrast/s_spantemp.h
+++ b/src/mesa/swrast/s_spantemp.h
@@ -31,7 +31,6 @@
* Define the following macros before including this file:
* NAME(BASE) to generate the function name (i.e. add prefix or suffix)
* RB_TYPE the renderbuffer DataType
- * CI_MODE if set, color index mode, else RGBA
* SPAN_VARS to declare any local variables
* INIT_PIXEL_PTR(P, X, Y) to initialize a pointer to a pixel
* INC_PIXEL_PTR(P) to increment a pixel pointer by one pixel
@@ -46,9 +45,7 @@
#include "main/macros.h"
-#ifdef CI_MODE
-#define RB_COMPONENTS 1
-#elif !defined(RB_COMPONENTS)
+#if !defined(RB_COMPONENTS)
#define RB_COMPONENTS 4
#endif
@@ -60,11 +57,7 @@ NAME(get_row)( GLcontext *ctx, struct gl_renderbuffer *rb,
#ifdef SPAN_VARS
SPAN_VARS
#endif
-#ifdef CI_MODE
- RB_TYPE *dest = (RB_TYPE *) values;
-#else
RB_TYPE (*dest)[RB_COMPONENTS] = (RB_TYPE (*)[RB_COMPONENTS]) values;
-#endif
GLuint i;
INIT_PIXEL_PTR(pixel, x, y);
for (i = 0; i < count; i++) {
@@ -82,11 +75,7 @@ NAME(get_values)( GLcontext *ctx, struct gl_renderbuffer *rb,
#ifdef SPAN_VARS
SPAN_VARS
#endif
-#ifdef CI_MODE
- RB_TYPE *dest = (RB_TYPE *) values;
-#else
RB_TYPE (*dest)[RB_COMPONENTS] = (RB_TYPE (*)[RB_COMPONENTS]) values;
-#endif
GLuint i;
for (i = 0; i < count; i++) {
INIT_PIXEL_PTR(pixel, x[i], y[i]);
@@ -125,7 +114,6 @@ NAME(put_row)( GLcontext *ctx, struct gl_renderbuffer *rb,
}
-#if !defined(CI_MODE)
static void
NAME(put_row_rgb)( GLcontext *ctx, struct gl_renderbuffer *rb,
GLuint count, GLint x, GLint y,
@@ -149,7 +137,6 @@ NAME(put_row_rgb)( GLcontext *ctx, struct gl_renderbuffer *rb,
}
(void) rb;
}
-#endif
static void
@@ -226,7 +213,6 @@ NAME(put_mono_values)( GLcontext *ctx, struct gl_renderbuffer *rb,
#undef NAME
#undef RB_TYPE
#undef RB_COMPONENTS
-#undef CI_MODE
#undef SPAN_VARS
#undef INIT_PIXEL_PTR
#undef INC_PIXEL_PTR
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index 11184b72ce..812dddf15c 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -70,18 +70,6 @@ _swrast_culltriangle( GLcontext *ctx,
/*
- * Render a smooth or flat-shaded color index triangle.
- */
-#define NAME ci_triangle
-#define INTERP_Z 1
-#define INTERP_ATTRIBS 1 /* just for fog */
-#define INTERP_INDEX 1
-#define RENDER_SPAN( span ) _swrast_write_index_span(ctx, &span);
-#include "s_tritemp.h"
-
-
-
-/*
* Render a flat-shaded RGBA triangle.
*/
#define NAME flat_rgba_triangle
@@ -1007,7 +995,6 @@ void
_swrast_choose_triangle( GLcontext *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
- const GLboolean rgbmode = ctx->Visual.rgbMode;
if (ctx->Polygon.CullFlag &&
ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK) {
@@ -1029,23 +1016,15 @@ _swrast_choose_triangle( GLcontext *ctx )
ctx->Depth.Mask == GL_FALSE &&
ctx->Depth.Func == GL_LESS &&
!ctx->Stencil._Enabled) {
- if ((rgbmode &&
- ctx->Color.ColorMask[0][0] == 0 &&
- ctx->Color.ColorMask[0][1] == 0 &&
- ctx->Color.ColorMask[0][2] == 0 &&
- ctx->Color.ColorMask[0][3] == 0)
- ||
- (!rgbmode && ctx->Color.IndexMask == 0)) {
+ if (ctx->Color.ColorMask[0][0] == 0 &&
+ ctx->Color.ColorMask[0][1] == 0 &&
+ ctx->Color.ColorMask[0][2] == 0 &&
+ ctx->Color.ColorMask[0][3] == 0) {
USE(occlusion_zless_triangle);
return;
}
}
- if (!rgbmode) {
- USE(ci_triangle);
- return;
- }
-
/*
* XXX should examine swrast->_ActiveAttribMask to determine what
* needs to be interpolated.
diff --git a/src/mesa/swrast/s_tritemp.h b/src/mesa/swrast/s_tritemp.h
index 8e3c5b5eeb..0aa8739f4f 100644
--- a/src/mesa/swrast/s_tritemp.h
+++ b/src/mesa/swrast/s_tritemp.h
@@ -32,7 +32,6 @@
* INTERP_Z - if defined, interpolate integer Z values
* INTERP_RGB - if defined, interpolate integer RGB values
* INTERP_ALPHA - if defined, interpolate integer Alpha values
- * INTERP_INDEX - if defined, interpolate color index values
* INTERP_INT_TEX - if defined, interpolate integer ST texcoords
* (fast, simple 2-D texture mapping, without
* perspective correction)
@@ -319,9 +318,6 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
{
GLint scan_from_left_to_right; /* true if scanning left-to-right */
-#ifdef INTERP_INDEX
- GLfloat didx, didy;
-#endif
/*
* Execute user-supplied setup code
@@ -398,21 +394,6 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
# endif
}
#endif /* INTERP_RGB */
-#ifdef INTERP_INDEX
- span.interpMask |= SPAN_INDEX;
- if (ctx->Light.ShadeModel == GL_SMOOTH) {
- GLfloat eMaj_di = vMax->attrib[FRAG_ATTRIB_CI][0] - vMin->attrib[FRAG_ATTRIB_CI][0];
- GLfloat eBot_di = vMid->attrib[FRAG_ATTRIB_CI][0] - vMin->attrib[FRAG_ATTRIB_CI][0];
- didx = oneOverArea * (eMaj_di * eBot.dy - eMaj.dy * eBot_di);
- didy = oneOverArea * (eMaj.dx * eBot_di - eMaj_di * eBot.dx);
- span.indexStep = SignedFloatToFixed(didx);
- }
- else {
- span.interpMask |= SPAN_FLAT;
- didx = didy = 0.0F;
- span.indexStep = 0;
- }
-#endif
#ifdef INTERP_INT_TEX
{
GLfloat eMaj_ds = (vMax->attrib[FRAG_ATTRIB_TEX0][0] - vMin->attrib[FRAG_ATTRIB_TEX0][0]) * S_SCALE;
@@ -531,9 +512,6 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
#ifdef INTERP_ALPHA
GLint aLeft = 0, fdaOuter = 0, fdaInner;
#endif
-#ifdef INTERP_INDEX
- GLfixed iLeft=0, diOuter=0, diInner;
-#endif
#ifdef INTERP_INT_TEX
GLfixed sLeft=0, dsOuter=0, dsInner;
GLfixed tLeft=0, dtOuter=0, dtInner;
@@ -697,18 +675,6 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
#endif /* INTERP_RGB */
-#ifdef INTERP_INDEX
- if (ctx->Light.ShadeModel == GL_SMOOTH) {
- iLeft = (GLfixed)(vLower->attrib[FRAG_ATTRIB_CI][0] * FIXED_SCALE
- + didx * adjx + didy * adjy) + FIXED_HALF;
- diOuter = SignedFloatToFixed(didy + dxOuter * didx);
- }
- else {
- ASSERT(ctx->Light.ShadeModel == GL_FLAT);
- iLeft = FloatToFixed(v2->attrib[FRAG_ATTRIB_CI][0]);
- diOuter = 0;
- }
-#endif
#ifdef INTERP_INT_TEX
{
GLfloat s0, t0;
@@ -784,9 +750,6 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
#ifdef INTERP_ALPHA
fdaInner = fdaOuter + span.alphaStep;
#endif
-#ifdef INTERP_INDEX
- diInner = diOuter + span.indexStep;
-#endif
#ifdef INTERP_INT_TEX
dsInner = dsOuter + span.intTexStep[0];
dtInner = dtOuter + span.intTexStep[1];
@@ -822,9 +785,6 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
#ifdef INTERP_ALPHA
span.alpha = aLeft;
#endif
-#ifdef INTERP_INDEX
- span.index = iLeft;
-#endif
#ifdef INTERP_INT_TEX
span.intTex[0] = sLeft;
span.intTex[1] = tLeft;
@@ -855,9 +815,6 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
#ifdef INTERP_ALPHA
CLAMP_INTERPOLANT(alpha, alphaStep, len);
#endif
-#ifdef INTERP_INDEX
- CLAMP_INTERPOLANT(index, indexStep, len);
-#endif
{
RENDER_SPAN( span );
}
@@ -896,9 +853,6 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
#ifdef INTERP_ALPHA
aLeft += fdaOuter;
#endif
-#ifdef INTERP_INDEX
- iLeft += diOuter;
-#endif
#ifdef INTERP_INT_TEX
sLeft += dsOuter;
tLeft += dtOuter;
@@ -931,9 +885,6 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
#ifdef INTERP_ALPHA
aLeft += fdaInner;
#endif
-#ifdef INTERP_INDEX
- iLeft += diInner;
-#endif
#ifdef INTERP_INT_TEX
sLeft += dsInner;
tLeft += dtInner;
@@ -967,7 +918,6 @@ static void NAME(GLcontext *ctx, const SWvertex *v0,
#undef INTERP_Z
#undef INTERP_RGB
#undef INTERP_ALPHA
-#undef INTERP_INDEX
#undef INTERP_INT_TEX
#undef INTERP_ATTRIBS
diff --git a/src/mesa/swrast/s_zoom.c b/src/mesa/swrast/s_zoom.c
index bec16208e3..f224627d50 100644
--- a/src/mesa/swrast/s_zoom.c
+++ b/src/mesa/swrast/s_zoom.c
@@ -185,15 +185,6 @@ zoom_span( GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span,
zoomed.arrayAttribs |= FRAG_BIT_COL0; /* we'll produce these values */
ASSERT(span->arrayMask & SPAN_RGBA);
}
- else if (format == GL_COLOR_INDEX) {
- /* copy Z info */
- zoomed.z = span->z;
- zoomed.zStep = span->zStep;
- /* we'll generate an array of color indexes */
- zoomed.interpMask = span->interpMask & ~SPAN_INDEX;
- zoomed.arrayMask |= SPAN_INDEX;
- ASSERT(span->arrayMask & SPAN_INDEX);
- }
else if (format == GL_DEPTH_COMPONENT) {
/* Copy color info */
zoomed.red = span->red;
@@ -288,16 +279,6 @@ zoom_span( GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span,
}
}
}
- else if (format == GL_COLOR_INDEX) {
- const GLuint *indexes = (const GLuint *) src;
- GLint i;
- for (i = 0; i < zoomedWidth; i++) {
- GLint j = unzoom_x(ctx->Pixel.ZoomX, imgX, x0 + i) - span->x;
- ASSERT(j >= 0);
- ASSERT(j < (GLint) span->end);
- zoomed.array->index[i] = indexes[j];
- }
- }
else if (format == GL_DEPTH_COMPONENT) {
const GLuint *zValues = (const GLuint *) src;
GLint i;
@@ -307,8 +288,8 @@ zoom_span( GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span,
ASSERT(j < (GLint) span->end);
zoomed.array->z[i] = zValues[j];
}
- /* Now, fall into either the RGB or COLOR_INDEX path below */
- format = ctx->Visual.rgbMode ? GL_RGBA : GL_COLOR_INDEX;
+ /* Now, fall into the RGB path below */
+ format = GL_RGBA;
}
/* write the span in rows [r0, r1) */
@@ -335,22 +316,6 @@ zoom_span( GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span,
}
}
}
- else if (format == GL_COLOR_INDEX) {
- /* use specular color array for temp storage */
- GLuint *indexSave = (GLuint *) zoomed.array->attribs[FRAG_ATTRIB_FOGC];
- const GLint end = zoomed.end; /* save */
- if (y1 - y0 > 1) {
- memcpy(indexSave, zoomed.array->index, zoomed.end * sizeof(GLuint));
- }
- for (zoomed.y = y0; zoomed.y < y1; zoomed.y++) {
- _swrast_write_index_span(ctx, &zoomed);
- zoomed.end = end; /* restore */
- if (y1 - y0 > 1) {
- /* restore the colors */
- memcpy(zoomed.array->index, indexSave, zoomed.end * sizeof(GLuint));
- }
- }
- }
}
@@ -371,15 +336,6 @@ _swrast_write_zoomed_rgb_span(GLcontext *ctx, GLint imgX, GLint imgY,
void
-_swrast_write_zoomed_index_span(GLcontext *ctx, GLint imgX, GLint imgY,
- const SWspan *span)
-{
- zoom_span(ctx, imgX, imgY, span,
- (const GLvoid *) span->array->index, GL_COLOR_INDEX);
-}
-
-
-void
_swrast_write_zoomed_depth_span(GLcontext *ctx, GLint imgX, GLint imgY,
const SWspan *span)
{
diff --git a/src/mesa/swrast/s_zoom.h b/src/mesa/swrast/s_zoom.h
index d2815b41a0..43917be65f 100644
--- a/src/mesa/swrast/s_zoom.h
+++ b/src/mesa/swrast/s_zoom.h
@@ -37,10 +37,6 @@ _swrast_write_zoomed_rgb_span(GLcontext *ctx, GLint imgX, GLint imgY,
const SWspan *span, const GLvoid *rgb);
extern void
-_swrast_write_zoomed_index_span(GLcontext *ctx, GLint imgX, GLint imgY,
- const SWspan *span);
-
-extern void
_swrast_write_zoomed_depth_span(GLcontext *ctx, GLint imgX, GLint imgY,
const SWspan *span);
diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c
index 23d3cb3807..ebd1574c43 100644
--- a/src/mesa/swrast_setup/ss_context.c
+++ b/src/mesa/swrast_setup/ss_context.c
@@ -141,11 +141,6 @@ setup_vertex_format(GLcontext *ctx)
EMIT_ATTR( _TNL_ATTRIB_COLOR1, EMIT_4F, attrib[FRAG_ATTRIB_COL1]);
}
- if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_COLOR_INDEX )) {
- EMIT_ATTR( _TNL_ATTRIB_COLOR_INDEX, EMIT_1F,
- attrib[FRAG_ATTRIB_CI][0] );
- }
-
if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_FOG )) {
const GLint emit = ctx->FragmentProgram._Current ? EMIT_4F : EMIT_1F;
EMIT_ATTR( _TNL_ATTRIB_FOG, emit, attrib[FRAG_ATTRIB_FOGC]);
@@ -294,18 +289,12 @@ _swsetup_Translate( GLcontext *ctx, const void *vertex, SWvertex *dest )
_tnl_get_attr( ctx, vertex, _TNL_ATTRIB_GENERIC0 + i,
dest->attrib[FRAG_ATTRIB_VAR0 + i] );
- if (ctx->Visual.rgbMode) {
- _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_COLOR0,
- dest->attrib[FRAG_ATTRIB_COL0] );
- UNCLAMPED_FLOAT_TO_RGBA_CHAN( dest->color, tmp );
+ _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_COLOR0,
+ dest->attrib[FRAG_ATTRIB_COL0] );
+ UNCLAMPED_FLOAT_TO_RGBA_CHAN( dest->color, tmp );
- _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_COLOR1,
- dest->attrib[FRAG_ATTRIB_COL1]);
- }
- else {
- _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_COLOR_INDEX, tmp );
- dest->attrib[FRAG_ATTRIB_CI][0] = tmp[0];
- }
+ _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_COLOR1,
+ dest->attrib[FRAG_ATTRIB_COL1]);
_tnl_get_attr( ctx, vertex, _TNL_ATTRIB_FOG, tmp );
dest->attrib[FRAG_ATTRIB_FOGC][0] = tmp[0];
diff --git a/src/mesa/swrast_setup/ss_triangle.c b/src/mesa/swrast_setup/ss_triangle.c
index e15b1348d8..bad0d81946 100644
--- a/src/mesa/swrast_setup/ss_triangle.c
+++ b/src/mesa/swrast_setup/ss_triangle.c
@@ -35,11 +35,10 @@
#include "ss_triangle.h"
#include "ss_context.h"
-#define SS_RGBA_BIT 0x1
-#define SS_OFFSET_BIT 0x2
-#define SS_TWOSIDE_BIT 0x4
-#define SS_UNFILLED_BIT 0x8
-#define SS_MAX_TRIFUNC 0x10
+#define SS_OFFSET_BIT 0x1
+#define SS_TWOSIDE_BIT 0x2
+#define SS_UNFILLED_BIT 0x4
+#define SS_MAX_TRIFUNC 0x8
static tnl_triangle_func tri_tab[SS_MAX_TRIFUNC];
static tnl_quad_func quad_tab[SS_MAX_TRIFUNC];
@@ -134,23 +133,18 @@ static void _swsetup_render_tri(GLcontext *ctx,
if (ctx->Light.ShadeModel == GL_FLAT) {
GLchan c[2][4];
GLfloat s[2][4];
- GLfloat i[2];
/* save colors/indexes for v0, v1 vertices */
COPY_CHAN4(c[0], v0->color);
COPY_CHAN4(c[1], v1->color);
COPY_4V(s[0], v0->attrib[FRAG_ATTRIB_COL1]);
COPY_4V(s[1], v1->attrib[FRAG_ATTRIB_COL1]);
- i[0] = v0->attrib[FRAG_ATTRIB_CI][0];
- i[1] = v1->attrib[FRAG_ATTRIB_CI][0];
/* copy v2 color/indexes to v0, v1 indexes */
COPY_CHAN4(v0->color, v2->color);
COPY_CHAN4(v1->color, v2->color);
COPY_4V(v0->attrib[FRAG_ATTRIB_COL1], v2->attrib[FRAG_ATTRIB_COL1]);
COPY_4V(v1->attrib[FRAG_ATTRIB_COL1], v2->attrib[FRAG_ATTRIB_COL1]);
- v0->attrib[FRAG_ATTRIB_CI][0] = v2->attrib[FRAG_ATTRIB_CI][0];
- v1->attrib[FRAG_ATTRIB_CI][0] = v2->attrib[FRAG_ATTRIB_CI][0];
render(ctx, ef, e0, e1, e2, v0, v1, v2);
@@ -158,8 +152,6 @@ static void _swsetup_render_tri(GLcontext *ctx,
COPY_CHAN4(v1->color, c[1]);
COPY_4V(v0->attrib[FRAG_ATTRIB_COL1], s[0]);
COPY_4V(v1->attrib[FRAG_ATTRIB_COL1], s[1]);
- v0->attrib[FRAG_ATTRIB_CI][0] = i[0];
- v1->attrib[FRAG_ATTRIB_CI][0] = i[1];
}
else {
render(ctx, ef, e0, e1, e2, v0, v1, v2);
@@ -171,66 +163,34 @@ static void _swsetup_render_tri(GLcontext *ctx,
#define SS_IND(a,b) (a = b)
#define IND (0)
-#define TAG(x) x
-#include "ss_tritmp.h"
-
-#define IND (SS_OFFSET_BIT)
-#define TAG(x) x##_offset
-#include "ss_tritmp.h"
-
-#define IND (SS_TWOSIDE_BIT)
-#define TAG(x) x##_twoside
-#include "ss_tritmp.h"
-
-#define IND (SS_OFFSET_BIT|SS_TWOSIDE_BIT)
-#define TAG(x) x##_offset_twoside
-#include "ss_tritmp.h"
-
-#define IND (SS_UNFILLED_BIT)
-#define TAG(x) x##_unfilled
-#include "ss_tritmp.h"
-
-#define IND (SS_OFFSET_BIT|SS_UNFILLED_BIT)
-#define TAG(x) x##_offset_unfilled
-#include "ss_tritmp.h"
-
-#define IND (SS_TWOSIDE_BIT|SS_UNFILLED_BIT)
-#define TAG(x) x##_twoside_unfilled
-#include "ss_tritmp.h"
-
-#define IND (SS_OFFSET_BIT|SS_TWOSIDE_BIT|SS_UNFILLED_BIT)
-#define TAG(x) x##_offset_twoside_unfilled
-#include "ss_tritmp.h"
-
-#define IND (0|SS_RGBA_BIT)
#define TAG(x) x##_rgba
#include "ss_tritmp.h"
-#define IND (SS_OFFSET_BIT|SS_RGBA_BIT)
+#define IND (SS_OFFSET_BIT)
#define TAG(x) x##_offset_rgba
#include "ss_tritmp.h"
-#define IND (SS_TWOSIDE_BIT|SS_RGBA_BIT)
+#define IND (SS_TWOSIDE_BIT)
#define TAG(x) x##_twoside_rgba
#include "ss_tritmp.h"
-#define IND (SS_OFFSET_BIT|SS_TWOSIDE_BIT|SS_RGBA_BIT)
+#define IND (SS_OFFSET_BIT|SS_TWOSIDE_BIT)
#define TAG(x) x##_offset_twoside_rgba
#include "ss_tritmp.h"
-#define IND (SS_UNFILLED_BIT|SS_RGBA_BIT)
+#define IND (SS_UNFILLED_BIT)
#define TAG(x) x##_unfilled_rgba
#include "ss_tritmp.h"
-#define IND (SS_OFFSET_BIT|SS_UNFILLED_BIT|SS_RGBA_BIT)
+#define IND (SS_OFFSET_BIT|SS_UNFILLED_BIT)
#define TAG(x) x##_offset_unfilled_rgba
#include "ss_tritmp.h"
-#define IND (SS_TWOSIDE_BIT|SS_UNFILLED_BIT|SS_RGBA_BIT)
+#define IND (SS_TWOSIDE_BIT|SS_UNFILLED_BIT)
#define TAG(x) x##_twoside_unfilled_rgba
#include "ss_tritmp.h"
-#define IND (SS_OFFSET_BIT|SS_TWOSIDE_BIT|SS_UNFILLED_BIT|SS_RGBA_BIT)
+#define IND (SS_OFFSET_BIT|SS_TWOSIDE_BIT|SS_UNFILLED_BIT)
#define TAG(x) x##_offset_twoside_unfilled_rgba
#include "ss_tritmp.h"
@@ -239,15 +199,6 @@ void _swsetup_trifuncs_init( GLcontext *ctx )
{
(void) ctx;
- init();
- init_offset();
- init_twoside();
- init_offset_twoside();
- init_unfilled();
- init_offset_unfilled();
- init_twoside_unfilled();
- init_offset_twoside_unfilled();
-
init_rgba();
init_offset_rgba();
init_twoside_rgba();
@@ -307,9 +258,6 @@ void _swsetup_choose_trifuncs( GLcontext *ctx )
(ctx->Stencil.Enabled && ctx->Stencil._TestTwoSide))
ind |= SS_UNFILLED_BIT;
- if (ctx->Visual.rgbMode)
- ind |= SS_RGBA_BIT;
-
tnl->Driver.Render.Triangle = tri_tab[ind];
tnl->Driver.Render.Quad = quad_tab[ind];
tnl->Driver.Render.Line = swsetup_line;
diff --git a/src/mesa/swrast_setup/ss_tritmp.h b/src/mesa/swrast_setup/ss_tritmp.h
index b9b78e16b0..8e9fa1bd55 100644
--- a/src/mesa/swrast_setup/ss_tritmp.h
+++ b/src/mesa/swrast_setup/ss_tritmp.h
@@ -43,7 +43,6 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
GLchan saved_color[3][4] = { { 0 } };
GLfloat saved_col0[3][4] = { { 0 } };
GLfloat saved_spec[3][4] = { { 0 } };
- GLfloat saved_index[3] = { 0 };
v[0] = &verts[e0];
v[1] = &verts[e1];
@@ -66,75 +65,64 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
if (facing == 1) {
if (IND & SS_TWOSIDE_BIT) {
- if (IND & SS_RGBA_BIT) {
- if (VB->BackfaceColorPtr) {
- GLfloat (*vbcolor)[4] = VB->BackfaceColorPtr->data;
+ if (VB->BackfaceColorPtr) {
+ GLfloat (*vbcolor)[4] = VB->BackfaceColorPtr->data;
+ if (swsetup->intColors) {
+ COPY_CHAN4(saved_color[0], v[0]->color);
+ COPY_CHAN4(saved_color[1], v[1]->color);
+ COPY_CHAN4(saved_color[2], v[2]->color);
+ }
+ else {
+ COPY_4V(saved_col0[0], v[0]->attrib[FRAG_ATTRIB_COL0]);
+ COPY_4V(saved_col0[1], v[1]->attrib[FRAG_ATTRIB_COL0]);
+ COPY_4V(saved_col0[2], v[2]->attrib[FRAG_ATTRIB_COL0]);
+ }
+
+ if (VB->BackfaceColorPtr->stride) {
if (swsetup->intColors) {
- COPY_CHAN4(saved_color[0], v[0]->color);
- COPY_CHAN4(saved_color[1], v[1]->color);
- COPY_CHAN4(saved_color[2], v[2]->color);
+ SS_COLOR(v[0]->color, vbcolor[e0]);
+ SS_COLOR(v[1]->color, vbcolor[e1]);
+ SS_COLOR(v[2]->color, vbcolor[e2]);
}
else {
- COPY_4V(saved_col0[0], v[0]->attrib[FRAG_ATTRIB_COL0]);
- COPY_4V(saved_col0[1], v[1]->attrib[FRAG_ATTRIB_COL0]);
- COPY_4V(saved_col0[2], v[2]->attrib[FRAG_ATTRIB_COL0]);
+ COPY_4V(v[0]->attrib[FRAG_ATTRIB_COL0], vbcolor[e0]);
+ COPY_4V(v[1]->attrib[FRAG_ATTRIB_COL0], vbcolor[e1]);
+ COPY_4V(v[2]->attrib[FRAG_ATTRIB_COL0], vbcolor[e2]);
}
-
- if (VB->BackfaceColorPtr->stride) {
- if (swsetup->intColors) {
- SS_COLOR(v[0]->color, vbcolor[e0]);
- SS_COLOR(v[1]->color, vbcolor[e1]);
- SS_COLOR(v[2]->color, vbcolor[e2]);
- }
- else {
- COPY_4V(v[0]->attrib[FRAG_ATTRIB_COL0], vbcolor[e0]);
- COPY_4V(v[1]->attrib[FRAG_ATTRIB_COL0], vbcolor[e1]);
- COPY_4V(v[2]->attrib[FRAG_ATTRIB_COL0], vbcolor[e2]);
- }
+ }
+ else {
+ /* flat shade */
+ if (swsetup->intColors) {
+ SS_COLOR(v[0]->color, vbcolor[0]);
+ SS_COLOR(v[1]->color, vbcolor[0]);
+ SS_COLOR(v[2]->color, vbcolor[0]);
}
else {
- /* flat shade */
- if (swsetup->intColors) {
- SS_COLOR(v[0]->color, vbcolor[0]);
- SS_COLOR(v[1]->color, vbcolor[0]);
- SS_COLOR(v[2]->color, vbcolor[0]);
- }
- else {
- COPY_4V(v[0]->attrib[FRAG_ATTRIB_COL0], vbcolor[0]);
- COPY_4V(v[1]->attrib[FRAG_ATTRIB_COL0], vbcolor[0]);
- COPY_4V(v[2]->attrib[FRAG_ATTRIB_COL0], vbcolor[0]);
- }
+ COPY_4V(v[0]->attrib[FRAG_ATTRIB_COL0], vbcolor[0]);
+ COPY_4V(v[1]->attrib[FRAG_ATTRIB_COL0], vbcolor[0]);
+ COPY_4V(v[2]->attrib[FRAG_ATTRIB_COL0], vbcolor[0]);
}
}
+ }
- if (VB->BackfaceSecondaryColorPtr) {
- GLfloat (*vbspec)[4] = VB->BackfaceSecondaryColorPtr->data;
+ if (VB->BackfaceSecondaryColorPtr) {
+ GLfloat (*vbspec)[4] = VB->BackfaceSecondaryColorPtr->data;
- COPY_4V(saved_spec[0], v[0]->attrib[FRAG_ATTRIB_COL1]);
- COPY_4V(saved_spec[1], v[1]->attrib[FRAG_ATTRIB_COL1]);
- COPY_4V(saved_spec[2], v[2]->attrib[FRAG_ATTRIB_COL1]);
+ COPY_4V(saved_spec[0], v[0]->attrib[FRAG_ATTRIB_COL1]);
+ COPY_4V(saved_spec[1], v[1]->attrib[FRAG_ATTRIB_COL1]);
+ COPY_4V(saved_spec[2], v[2]->attrib[FRAG_ATTRIB_COL1]);
- if (VB->BackfaceSecondaryColorPtr->stride) {
- SS_SPEC(v[0]->attrib[FRAG_ATTRIB_COL1], vbspec[e0]);
- SS_SPEC(v[1]->attrib[FRAG_ATTRIB_COL1], vbspec[e1]);
- SS_SPEC(v[2]->attrib[FRAG_ATTRIB_COL1], vbspec[e2]);
- }
- else {
- SS_SPEC(v[0]->attrib[FRAG_ATTRIB_COL1], vbspec[0]);
- SS_SPEC(v[1]->attrib[FRAG_ATTRIB_COL1], vbspec[0]);
- SS_SPEC(v[2]->attrib[FRAG_ATTRIB_COL1], vbspec[0]);
- }
+ if (VB->BackfaceSecondaryColorPtr->stride) {
+ SS_SPEC(v[0]->attrib[FRAG_ATTRIB_COL1], vbspec[e0]);
+ SS_SPEC(v[1]->attrib[FRAG_ATTRIB_COL1], vbspec[e1]);
+ SS_SPEC(v[2]->attrib[FRAG_ATTRIB_COL1], vbspec[e2]);
+ }
+ else {
+ SS_SPEC(v[0]->attrib[FRAG_ATTRIB_COL1], vbspec[0]);
+ SS_SPEC(v[1]->attrib[FRAG_ATTRIB_COL1], vbspec[0]);
+ SS_SPEC(v[2]->attrib[FRAG_ATTRIB_COL1], vbspec[0]);
}
- } else {
- GLfloat *vbindex = (GLfloat *)VB->BackfaceIndexPtr->data;
- saved_index[0] = v[0]->attrib[FRAG_ATTRIB_CI][0];
- saved_index[1] = v[1]->attrib[FRAG_ATTRIB_CI][0];
- saved_index[2] = v[2]->attrib[FRAG_ATTRIB_CI][0];
-
- SS_IND(v[0]->attrib[FRAG_ATTRIB_CI][0], vbindex[e0]);
- SS_IND(v[1]->attrib[FRAG_ATTRIB_CI][0], vbindex[e1]);
- SS_IND(v[2]->attrib[FRAG_ATTRIB_CI][0], vbindex[e2]);
}
}
}
@@ -199,30 +187,24 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
if (IND & SS_TWOSIDE_BIT) {
if (facing == 1) {
- if (IND & SS_RGBA_BIT) {
- if (VB->BackfaceColorPtr) {
- if (swsetup->intColors) {
- COPY_CHAN4(v[0]->color, saved_color[0]);
- COPY_CHAN4(v[1]->color, saved_color[1]);
- COPY_CHAN4(v[2]->color, saved_color[2]);
- }
- else {
- COPY_4V(v[0]->attrib[FRAG_ATTRIB_COL0], saved_col0[0]);
- COPY_4V(v[1]->attrib[FRAG_ATTRIB_COL0], saved_col0[1]);
- COPY_4V(v[2]->attrib[FRAG_ATTRIB_COL0], saved_col0[2]);
- }
- }
-
- if (VB->BackfaceSecondaryColorPtr) {
- COPY_4V(v[0]->attrib[FRAG_ATTRIB_COL1], saved_spec[0]);
- COPY_4V(v[1]->attrib[FRAG_ATTRIB_COL1], saved_spec[1]);
- COPY_4V(v[2]->attrib[FRAG_ATTRIB_COL1], saved_spec[2]);
- }
- } else {
- v[0]->attrib[FRAG_ATTRIB_CI][0] = saved_index[0];
- v[1]->attrib[FRAG_ATTRIB_CI][0] = saved_index[1];
- v[2]->attrib[FRAG_ATTRIB_CI][0] = saved_index[2];
- }
+ if (VB->BackfaceColorPtr) {
+ if (swsetup->intColors) {
+ COPY_CHAN4(v[0]->color, saved_color[0]);
+ COPY_CHAN4(v[1]->color, saved_color[1]);
+ COPY_CHAN4(v[2]->color, saved_color[2]);
+ }
+ else {
+ COPY_4V(v[0]->attrib[FRAG_ATTRIB_COL0], saved_col0[0]);
+ COPY_4V(v[1]->attrib[FRAG_ATTRIB_COL0], saved_col0[1]);
+ COPY_4V(v[2]->attrib[FRAG_ATTRIB_COL0], saved_col0[2]);
+ }
+ }
+
+ if (VB->BackfaceSecondaryColorPtr) {
+ COPY_4V(v[0]->attrib[FRAG_ATTRIB_COL1], saved_spec[0]);
+ COPY_4V(v[1]->attrib[FRAG_ATTRIB_COL1], saved_spec[1]);
+ COPY_4V(v[2]->attrib[FRAG_ATTRIB_COL1], saved_spec[2]);
+ }
}
}
}
diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c
index 5a14e595a0..f27c8ad9d6 100644
--- a/src/mesa/tnl/t_context.c
+++ b/src/mesa/tnl/t_context.c
@@ -107,6 +107,7 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state )
TNLcontext *tnl = TNL_CONTEXT(ctx);
const struct gl_vertex_program *vp = ctx->VertexProgram._Current;
const struct gl_fragment_program *fp = ctx->FragmentProgram._Current;
+ GLuint i;
if (new_state & (_NEW_HINT | _NEW_PROGRAM)) {
ASSERT(tnl->AllowVertexFog || tnl->AllowPixelFog);
@@ -119,29 +120,21 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state )
/* Calculate tnl->render_inputs. This bitmask indicates which vertex
* attributes need to be emitted to the rasterizer.
*/
- if (ctx->Visual.rgbMode) {
- GLuint i;
-
- RENDERINPUTS_ZERO( tnl->render_inputs_bitset );
- RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_POS );
+ RENDERINPUTS_ZERO( tnl->render_inputs_bitset );
+ RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_POS );
- if (!fp || (fp->Base.InputsRead & FRAG_BIT_COL0)) {
- RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_COLOR0 );
- }
+ if (!fp || (fp->Base.InputsRead & FRAG_BIT_COL0)) {
+ RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_COLOR0 );
+ }
- if (NEED_SECONDARY_COLOR(ctx))
- RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_COLOR1 );
+ if (NEED_SECONDARY_COLOR(ctx))
+ RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_COLOR1 );
- for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
- if (ctx->Texture._EnabledCoordUnits & (1 << i) ||
- (fp && fp->Base.InputsRead & FRAG_BIT_TEX(i))) {
- RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_TEX(i) );
- }
- }
- }
- else {
- RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_POS );
- RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_COLOR_INDEX );
+ for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
+ if (ctx->Texture._EnabledCoordUnits & (1 << i) ||
+ (fp && fp->Base.InputsRead & FRAG_BIT_TEX(i))) {
+ RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_TEX(i) );
+ }
}
if (ctx->Fog.Enabled) {
diff --git a/src/mesa/tnl/t_rasterpos.c b/src/mesa/tnl/t_rasterpos.c
index 13b84a7d77..3596d162b2 100644
--- a/src/mesa/tnl/t_rasterpos.c
+++ b/src/mesa/tnl/t_rasterpos.c
@@ -119,8 +119,7 @@ shade_rastpos(GLcontext *ctx,
const GLfloat vertex[4],
const GLfloat normal[3],
GLfloat Rcolor[4],
- GLfloat Rspec[4],
- GLfloat *Rindex)
+ GLfloat Rspec[4])
{
/*const*/ GLfloat (*base)[3] = ctx->Light._BaseColor;
const struct gl_light *light;
@@ -244,28 +243,14 @@ shade_rastpos(GLcontext *ctx,
ACC_SCALE_SCALAR_3V( specularColor, attenuation, specularContrib );
}
- if (ctx->Visual.rgbMode) {
- Rcolor[0] = CLAMP(diffuseColor[0], 0.0F, 1.0F);
- Rcolor[1] = CLAMP(diffuseColor[1], 0.0F, 1.0F);
- Rcolor[2] = CLAMP(diffuseColor[2], 0.0F, 1.0F);
- Rcolor[3] = CLAMP(diffuseColor[3], 0.0F, 1.0F);
- Rspec[0] = CLAMP(specularColor[0], 0.0F, 1.0F);
- Rspec[1] = CLAMP(specularColor[1], 0.0F, 1.0F);
- Rspec[2] = CLAMP(specularColor[2], 0.0F, 1.0F);
- Rspec[3] = CLAMP(specularColor[3], 0.0F, 1.0F);
- }
- else {
- GLfloat *ind = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_INDEXES];
- GLfloat d_a = ind[MAT_INDEX_DIFFUSE] - ind[MAT_INDEX_AMBIENT];
- GLfloat s_a = ind[MAT_INDEX_SPECULAR] - ind[MAT_INDEX_AMBIENT];
- GLfloat i = (ind[MAT_INDEX_AMBIENT]
- + diffuseCI * (1.0F-specularCI) * d_a
- + specularCI * s_a);
- if (i > ind[MAT_INDEX_SPECULAR]) {
- i = ind[MAT_INDEX_SPECULAR];
- }
- *Rindex = i;
- }
+ Rcolor[0] = CLAMP(diffuseColor[0], 0.0F, 1.0F);
+ Rcolor[1] = CLAMP(diffuseColor[1], 0.0F, 1.0F);
+ Rcolor[2] = CLAMP(diffuseColor[2], 0.0F, 1.0F);
+ Rcolor[3] = CLAMP(diffuseColor[3], 0.0F, 1.0F);
+ Rspec[0] = CLAMP(specularColor[0], 0.0F, 1.0F);
+ Rspec[1] = CLAMP(specularColor[1], 0.0F, 1.0F);
+ Rspec[2] = CLAMP(specularColor[2], 0.0F, 1.0F);
+ Rspec[3] = CLAMP(specularColor[3], 0.0F, 1.0F);
}
@@ -469,21 +454,14 @@ _tnl_RasterPos(GLcontext *ctx, const GLfloat vObj[4])
/* lighting */
shade_rastpos( ctx, vObj, norm,
ctx->Current.RasterColor,
- ctx->Current.RasterSecondaryColor,
- &ctx->Current.RasterIndex );
+ ctx->Current.RasterSecondaryColor );
}
else {
- /* use current color or index */
- if (ctx->Visual.rgbMode) {
- COPY_4FV(ctx->Current.RasterColor,
- ctx->Current.Attrib[VERT_ATTRIB_COLOR0]);
- COPY_4FV(ctx->Current.RasterSecondaryColor,
- ctx->Current.Attrib[VERT_ATTRIB_COLOR1]);
- }
- else {
- ctx->Current.RasterIndex
- = ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0];
- }
+ /* use current color */
+ COPY_4FV(ctx->Current.RasterColor,
+ ctx->Current.Attrib[VERT_ATTRIB_COLOR0]);
+ COPY_4FV(ctx->Current.RasterSecondaryColor,
+ ctx->Current.Attrib[VERT_ATTRIB_COLOR1]);
}
/* texture coords */
diff --git a/src/mesa/tnl/t_vb_light.c b/src/mesa/tnl/t_vb_light.c
index 8a0fe63fd8..e7309aaac6 100644
--- a/src/mesa/tnl/t_vb_light.c
+++ b/src/mesa/tnl/t_vb_light.c
@@ -64,7 +64,6 @@ struct light_stage_data {
GLvector4f Input;
GLvector4f LitColor[2];
GLvector4f LitSecondary[2];
- GLvector4f LitIndex[2];
light_func *light_func_tab;
struct material_cursor mat[MAT_ATTRIB_MAX];
@@ -161,7 +160,6 @@ static light_func _tnl_light_tab[MAX_LIGHT_FUNC];
static light_func _tnl_light_fast_tab[MAX_LIGHT_FUNC];
static light_func _tnl_light_fast_single_tab[MAX_LIGHT_FUNC];
static light_func _tnl_light_spec_tab[MAX_LIGHT_FUNC];
-static light_func _tnl_light_ci_tab[MAX_LIGHT_FUNC];
#define TAG(x) x
#define IDX (0)
@@ -260,22 +258,18 @@ static void validate_lighting( GLcontext *ctx,
if (!ctx->Light.Enabled || ctx->VertexProgram._Current)
return;
- if (ctx->Visual.rgbMode) {
- if (ctx->Light._NeedVertices) {
- if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)
- tab = _tnl_light_spec_tab;
- else
- tab = _tnl_light_tab;
- }
- else {
- if (ctx->Light.EnabledList.next == ctx->Light.EnabledList.prev)
- tab = _tnl_light_fast_single_tab;
- else
- tab = _tnl_light_fast_tab;
- }
+ if (ctx->Light._NeedVertices) {
+ if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)
+ tab = _tnl_light_spec_tab;
+ else
+ tab = _tnl_light_tab;
+ }
+ else {
+ if (ctx->Light.EnabledList.next == ctx->Light.EnabledList.prev)
+ tab = _tnl_light_fast_single_tab;
+ else
+ tab = _tnl_light_fast_tab;
}
- else
- tab = _tnl_light_ci_tab;
LIGHT_STAGE_DATA(stage)->light_func_tab = tab;
@@ -311,19 +305,12 @@ static GLboolean init_lighting( GLcontext *ctx,
_mesa_vector4f_alloc( &store->LitColor[1], 0, size, 32 );
_mesa_vector4f_alloc( &store->LitSecondary[0], 0, size, 32 );
_mesa_vector4f_alloc( &store->LitSecondary[1], 0, size, 32 );
- _mesa_vector4f_alloc( &store->LitIndex[0], 0, size, 32 );
- _mesa_vector4f_alloc( &store->LitIndex[1], 0, size, 32 );
store->LitColor[0].size = 4;
store->LitColor[1].size = 4;
store->LitSecondary[0].size = 3;
store->LitSecondary[1].size = 3;
- store->LitIndex[0].size = 1;
- store->LitIndex[0].stride = sizeof(GLfloat);
- store->LitIndex[1].size = 1;
- store->LitIndex[1].stride = sizeof(GLfloat);
-
return GL_TRUE;
}
@@ -340,8 +327,6 @@ static void dtr( struct tnl_pipeline_stage *stage )
_mesa_vector4f_free( &store->LitColor[1] );
_mesa_vector4f_free( &store->LitSecondary[0] );
_mesa_vector4f_free( &store->LitSecondary[1] );
- _mesa_vector4f_free( &store->LitIndex[0] );
- _mesa_vector4f_free( &store->LitIndex[1] );
FREE( store );
stage->privatePtr = NULL;
}
diff --git a/src/mesa/tnl/t_vb_lighttmp.h b/src/mesa/tnl/t_vb_lighttmp.h
index 4ebef2356f..0a98c6b02a 100644
--- a/src/mesa/tnl/t_vb_lighttmp.h
+++ b/src/mesa/tnl/t_vb_lighttmp.h
@@ -637,185 +637,12 @@ static void TAG(light_fast_rgba)( GLcontext *ctx,
-
-/*
- * Use current lighting/material settings to compute the color indexes
- * for an array of vertices.
- * Input: n - number of vertices to light
- * side - 0=use front material, 1=use back material
- * vertex - array of [n] vertex position in eye coordinates
- * normal - array of [n] surface normal vector
- * Output: indexResult - resulting array of [n] color indexes
- */
-static void TAG(light_ci)( GLcontext *ctx,
- struct vertex_buffer *VB,
- struct tnl_pipeline_stage *stage,
- GLvector4f *input )
-{
- struct light_stage_data *store = LIGHT_STAGE_DATA(stage);
- GLuint j;
- const GLuint vstride = input->stride;
- const GLfloat *vertex = (GLfloat *) input->data;
- const GLuint nstride = VB->AttribPtr[_TNL_ATTRIB_NORMAL]->stride;
- const GLfloat *normal = (GLfloat *)VB->AttribPtr[_TNL_ATTRIB_NORMAL]->data;
- GLfloat *indexResult[2];
- const GLuint nr = VB->Count;
-
-#ifdef TRACE
- fprintf(stderr, "%s\n", __FUNCTION__ );
-#endif
-
- VB->AttribPtr[_TNL_ATTRIB_COLOR_INDEX] = &store->LitIndex[0];
-#if IDX & LIGHT_TWOSIDE
- VB->BackfaceIndexPtr = &store->LitIndex[1];
-#endif
-
- indexResult[0] = (GLfloat *)VB->AttribPtr[_TNL_ATTRIB_COLOR_INDEX]->data;
-#if IDX & LIGHT_TWOSIDE
- indexResult[1] = (GLfloat *)VB->BackfaceIndexPtr->data;
-#endif
-
- /* loop over vertices */
- for (j=0; j<nr; j++,STRIDE_F(vertex,vstride),STRIDE_F(normal, nstride)) {
- GLfloat diffuse[2], specular[2];
- GLuint side = 0;
- struct gl_light *light;
-
-#if IDX & LIGHT_MATERIAL
- update_materials( ctx, store );
-#endif
-
- diffuse[0] = specular[0] = 0.0F;
-
-#if IDX & LIGHT_TWOSIDE
- diffuse[1] = specular[1] = 0.0F;
-#endif
-
- /* Accumulate diffuse and specular from each light source */
- foreach (light, &ctx->Light.EnabledList) {
-
- GLfloat attenuation = 1.0F;
- GLfloat VP[3]; /* unit vector from vertex to light */
- GLfloat n_dot_VP; /* dot product of l and n */
- GLfloat *h, n_dot_h, correction = 1.0;
-
- /* compute l and attenuation */
- if (!(light->_Flags & LIGHT_POSITIONAL)) {
- /* directional light */
- COPY_3V(VP, light->_VP_inf_norm);
- }
- else {
- GLfloat d; /* distance from vertex to light */
-
- SUB_3V(VP, light->_Position, vertex);
-
- d = (GLfloat) LEN_3FV( VP );
- if ( d > 1e-6) {
- GLfloat invd = 1.0F / d;
- SELF_SCALE_SCALAR_3V(VP, invd);
- }
-
- attenuation = 1.0F / (light->ConstantAttenuation + d *
- (light->LinearAttenuation + d *
- light->QuadraticAttenuation));
-
- /* spotlight attenuation */
- if (light->_Flags & LIGHT_SPOT) {
- GLfloat PV_dot_dir = - DOT3(VP, light->_NormSpotDirection);
- if (PV_dot_dir < light->_CosCutoff) {
- continue; /* this light makes no contribution */
- }
- else {
- GLdouble x = PV_dot_dir * (EXP_TABLE_SIZE-1);
- GLint k = (GLint) x;
- GLfloat spot = (GLfloat) (light->_SpotExpTable[k][0]
- + (x-k)*light->_SpotExpTable[k][1]);
- attenuation *= spot;
- }
- }
- }
-
- if (attenuation < 1e-3)
- continue; /* this light makes no contribution */
-
- n_dot_VP = DOT3( normal, VP );
-
- /* which side are we lighting? */
- if (n_dot_VP < 0.0F) {
-#if IDX & LIGHT_TWOSIDE
- side = 1;
- correction = -1;
- n_dot_VP = -n_dot_VP;
-#else
- continue;
-#endif
- }
-
- /* accumulate diffuse term */
- diffuse[side] += n_dot_VP * light->_dli * attenuation;
-
- /* specular term */
- if (ctx->Light.Model.LocalViewer) {
- GLfloat v[3];
- COPY_3V(v, vertex);
- NORMALIZE_3FV(v);
- SUB_3V(VP, VP, v); /* h = VP + VPe */
- h = VP;
- NORMALIZE_3FV(h);
- }
- else if (light->_Flags & LIGHT_POSITIONAL) {
- h = VP;
- /* Strangely, disabling this addition fixes a conformance
- * problem. If this code is enabled, l_sed.c fails.
- */
- /*ACC_3V(h, ctx->_EyeZDir);*/
- NORMALIZE_3FV(h);
- }
- else {
- h = light->_h_inf_norm;
- }
-
- n_dot_h = correction * DOT3(normal, h);
- if (n_dot_h > 0.0F) {
- GLfloat spec_coef;
- struct gl_shine_tab *tab = ctx->_ShineTable[side];
- GET_SHINE_TAB_ENTRY( tab, n_dot_h, spec_coef);
- specular[side] += spec_coef * light->_sli * attenuation;
- }
- } /*loop over lights*/
-
- /* Now compute final color index */
- for (side = 0 ; side < NR_SIDES ; side++) {
- const GLfloat *ind = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_INDEXES + side];
- GLfloat index;
-
- if (specular[side] > 1.0F) {
- index = ind[MAT_INDEX_SPECULAR];
- }
- else {
- GLfloat d_a = ind[MAT_INDEX_DIFFUSE] - ind[MAT_INDEX_AMBIENT];
- GLfloat s_a = ind[MAT_INDEX_SPECULAR] - ind[MAT_INDEX_AMBIENT];
- index = (ind[MAT_INDEX_AMBIENT]
- + diffuse[side] * (1.0F-specular[side]) * d_a
- + specular[side] * s_a);
- if (index > ind[MAT_INDEX_SPECULAR]) {
- index = ind[MAT_INDEX_SPECULAR];
- }
- }
- indexResult[side][j] = index;
- }
- } /*for vertex*/
-}
-
-
-
static void TAG(init_light_tab)( void )
{
_tnl_light_tab[IDX] = TAG(light_rgba);
_tnl_light_fast_tab[IDX] = TAG(light_fast_rgba);
_tnl_light_fast_single_tab[IDX] = TAG(light_fast_rgba_single);
_tnl_light_spec_tab[IDX] = TAG(light_rgba_spec);
- _tnl_light_ci_tab[IDX] = TAG(light_ci);
}
diff --git a/src/mesa/tnl_dd/t_dd_tritmp.h b/src/mesa/tnl_dd/t_dd_tritmp.h
index 6acd837317..2c36d845ab 100644
--- a/src/mesa/tnl_dd/t_dd_tritmp.h
+++ b/src/mesa/tnl_dd/t_dd_tritmp.h
@@ -42,7 +42,6 @@
* DO_UNFILLED: Decompose triangles to lines and points where appropriate.
* DO_TWOSTENCIL:Gross hack for two-sided stencil.
*
- * HAVE_RGBA: Vertices have rgba values (otherwise index values).
* HAVE_SPEC: Vertices have secondary rgba values.
*
* VERT_X(v): Alias for vertex x value.
@@ -59,29 +58,15 @@
* VERT_COPY_RGBA: Copy vertex rgba another vertex.
* VERT_SAVE_RGBA: Save vertex rgba to a local variable.
* VERT_RESTORE_RGBA: Restore vertex rgba from a local variable.
- * --> Similar for IND and SPEC.
+ * --> Similar for SPEC.
*
* LOCAL_VARS(n): (At least) define local vars for save/restore rgba.
*
*/
-#if HAVE_RGBA
-#define VERT_SET_IND( v, c ) (void) c
-#define VERT_COPY_IND( v0, v1 )
-#define VERT_SAVE_IND( idx )
-#define VERT_RESTORE_IND( idx )
#if HAVE_BACK_COLORS
#define VERT_SET_RGBA( v, c )
#endif
-#else
-#define VERT_SET_RGBA( v, c ) (void) c
-#define VERT_COPY_RGBA( v0, v1 )
-#define VERT_SAVE_RGBA( idx )
-#define VERT_RESTORE_RGBA( idx )
-#if HAVE_BACK_COLORS
-#define VERT_SET_IND( v, c )
-#endif
-#endif
#if !HAVE_SPEC
#define VERT_SET_SPEC( v, c ) (void) c
@@ -99,7 +84,6 @@
#if !HAVE_BACK_COLORS
#define VERT_COPY_SPEC1( v )
-#define VERT_COPY_IND1( v )
#define VERT_COPY_RGBA1( v )
#endif
@@ -171,82 +155,68 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
}
}
- if (DO_TWOSIDE && facing == 1)
- {
- if (HAVE_RGBA) {
- if (HAVE_BACK_COLORS) {
+ if (DO_TWOSIDE && facing == 1) {
+ if (HAVE_BACK_COLORS) {
+ if (!DO_FLAT) {
+ VERT_SAVE_RGBA( 0 );
+ VERT_SAVE_RGBA( 1 );
+ VERT_COPY_RGBA1( v[0] );
+ VERT_COPY_RGBA1( v[1] );
+ }
+ VERT_SAVE_RGBA( 2 );
+ VERT_COPY_RGBA1( v[2] );
+ if (HAVE_SPEC) {
if (!DO_FLAT) {
- VERT_SAVE_RGBA( 0 );
- VERT_SAVE_RGBA( 1 );
- VERT_COPY_RGBA1( v[0] );
- VERT_COPY_RGBA1( v[1] );
- }
- VERT_SAVE_RGBA( 2 );
- VERT_COPY_RGBA1( v[2] );
- if (HAVE_SPEC) {
- if (!DO_FLAT) {
- VERT_SAVE_SPEC( 0 );
- VERT_SAVE_SPEC( 1 );
- VERT_COPY_SPEC1( v[0] );
- VERT_COPY_SPEC1( v[1] );
- }
- VERT_SAVE_SPEC( 2 );
- VERT_COPY_SPEC1( v[2] );
+ VERT_SAVE_SPEC( 0 );
+ VERT_SAVE_SPEC( 1 );
+ VERT_COPY_SPEC1( v[0] );
+ VERT_COPY_SPEC1( v[1] );
}
+ VERT_SAVE_SPEC( 2 );
+ VERT_COPY_SPEC1( v[2] );
}
- else {
- GLfloat (*vbcolor)[4] = VB->BackfaceColorPtr->data;
- (void) vbcolor;
+ }
+ else {
+ GLfloat (*vbcolor)[4] = VB->BackfaceColorPtr->data;
+ (void) vbcolor;
- if (!DO_FLAT) {
- VERT_SAVE_RGBA( 0 );
- VERT_SAVE_RGBA( 1 );
- }
- VERT_SAVE_RGBA( 2 );
+ if (!DO_FLAT) {
+ VERT_SAVE_RGBA( 0 );
+ VERT_SAVE_RGBA( 1 );
+ }
+ VERT_SAVE_RGBA( 2 );
- if (VB->BackfaceColorPtr->stride) {
- ASSERT(VB->BackfaceColorPtr->stride == 4*sizeof(GLfloat));
+ if (VB->BackfaceColorPtr->stride) {
+ ASSERT(VB->BackfaceColorPtr->stride == 4*sizeof(GLfloat));
- if (!DO_FLAT) {
- VERT_SET_RGBA( v[0], vbcolor[e0] );
- VERT_SET_RGBA( v[1], vbcolor[e1] );
- }
- VERT_SET_RGBA( v[2], vbcolor[e2] );
+ if (!DO_FLAT) {
+ VERT_SET_RGBA( v[0], vbcolor[e0] );
+ VERT_SET_RGBA( v[1], vbcolor[e1] );
}
- else {
- if (!DO_FLAT) {
- VERT_SET_RGBA( v[0], vbcolor[0] );
- VERT_SET_RGBA( v[1], vbcolor[0] );
- }
- VERT_SET_RGBA( v[2], vbcolor[0] );
+ VERT_SET_RGBA( v[2], vbcolor[e2] );
+ }
+ else {
+ if (!DO_FLAT) {
+ VERT_SET_RGBA( v[0], vbcolor[0] );
+ VERT_SET_RGBA( v[1], vbcolor[0] );
}
+ VERT_SET_RGBA( v[2], vbcolor[0] );
+ }
- if (HAVE_SPEC && VB->BackfaceSecondaryColorPtr) {
- GLfloat (*vbspec)[4] = VB->BackfaceSecondaryColorPtr->data;
- ASSERT(VB->BackfaceSecondaryColorPtr->stride == 4*sizeof(GLfloat));
+ if (HAVE_SPEC && VB->BackfaceSecondaryColorPtr) {
+ GLfloat (*vbspec)[4] = VB->BackfaceSecondaryColorPtr->data;
+ ASSERT(VB->BackfaceSecondaryColorPtr->stride == 4*sizeof(GLfloat));
- if (!DO_FLAT) {
- VERT_SAVE_SPEC( 0 );
- VERT_SAVE_SPEC( 1 );
- VERT_SET_SPEC( v[0], vbspec[e0] );
- VERT_SET_SPEC( v[1], vbspec[e1] );
- }
- VERT_SAVE_SPEC( 2 );
- VERT_SET_SPEC( v[2], vbspec[e2] );
+ if (!DO_FLAT) {
+ VERT_SAVE_SPEC( 0 );
+ VERT_SAVE_SPEC( 1 );
+ VERT_SET_SPEC( v[0], vbspec[e0] );
+ VERT_SET_SPEC( v[1], vbspec[e1] );
}
+ VERT_SAVE_SPEC( 2 );
+ VERT_SET_SPEC( v[2], vbspec[e2] );
}
}
- else {
- GLfloat (*vbindex) = (GLfloat *)VB->BackfaceIndexPtr->data;
- if (!DO_FLAT) {
- VERT_SAVE_IND( 0 );
- VERT_SAVE_IND( 1 );
- VERT_SET_IND( v[0], vbindex[e0] );
- VERT_SET_IND( v[1], vbindex[e1] );
- }
- VERT_SAVE_IND( 2 );
- VERT_SET_IND( v[2], vbindex[e2] );
- }
}
}
@@ -274,23 +244,15 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
}
if (DO_FLAT) {
- if (HAVE_RGBA) {
- VERT_SAVE_RGBA( 0 );
- VERT_SAVE_RGBA( 1 );
- VERT_COPY_RGBA( v[0], v[2] );
- VERT_COPY_RGBA( v[1], v[2] );
- if (HAVE_SPEC && VB->AttribPtr[_TNL_ATTRIB_COLOR1]) {
- VERT_SAVE_SPEC( 0 );
- VERT_SAVE_SPEC( 1 );
- VERT_COPY_SPEC( v[0], v[2] );
- VERT_COPY_SPEC( v[1], v[2] );
- }
- }
- else {
- VERT_SAVE_IND( 0 );
- VERT_SAVE_IND( 1 );
- VERT_COPY_IND( v[0], v[2] );
- VERT_COPY_IND( v[1], v[2] );
+ VERT_SAVE_RGBA( 0 );
+ VERT_SAVE_RGBA( 1 );
+ VERT_COPY_RGBA( v[0], v[2] );
+ VERT_COPY_RGBA( v[1], v[2] );
+ if (HAVE_SPEC && VB->AttribPtr[_TNL_ATTRIB_COLOR1]) {
+ VERT_SAVE_SPEC( 0 );
+ VERT_SAVE_SPEC( 1 );
+ VERT_COPY_SPEC( v[0], v[2] );
+ VERT_COPY_SPEC( v[1], v[2] );
}
}
@@ -344,45 +306,29 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
VERT_SET_Z(v[2], z[2]);
}
- if (DO_TWOSIDE && facing == 1)
- {
- if (HAVE_RGBA) {
- if (!DO_FLAT) {
- VERT_RESTORE_RGBA( 0 );
- VERT_RESTORE_RGBA( 1 );
- }
- VERT_RESTORE_RGBA( 2 );
- if (HAVE_SPEC) {
- if (!DO_FLAT) {
- VERT_RESTORE_SPEC( 0 );
- VERT_RESTORE_SPEC( 1 );
- }
- VERT_RESTORE_SPEC( 2 );
- }
+ if (DO_TWOSIDE && facing == 1) {
+ if (!DO_FLAT) {
+ VERT_RESTORE_RGBA( 0 );
+ VERT_RESTORE_RGBA( 1 );
}
- else {
+ VERT_RESTORE_RGBA( 2 );
+ if (HAVE_SPEC) {
if (!DO_FLAT) {
- VERT_RESTORE_IND( 0 );
- VERT_RESTORE_IND( 1 );
+ VERT_RESTORE_SPEC( 0 );
+ VERT_RESTORE_SPEC( 1 );
}
- VERT_RESTORE_IND( 2 );
+ VERT_RESTORE_SPEC( 2 );
}
}
if (DO_FLAT) {
- if (HAVE_RGBA) {
VERT_RESTORE_RGBA( 0 );
VERT_RESTORE_RGBA( 1 );
if (HAVE_SPEC && VB->AttribPtr[_TNL_ATTRIB_COLOR1]) {
VERT_RESTORE_SPEC( 0 );
VERT_RESTORE_SPEC( 1 );
}
- }
- else {
- VERT_RESTORE_IND( 0 );
- VERT_RESTORE_IND( 1 );
- }
}
}
#endif
@@ -433,90 +379,74 @@ static void TAG(quadr)( GLcontext *ctx,
}
}
- if (DO_TWOSIDE && facing == 1)
- {
- if (HAVE_RGBA) {
- GLfloat (*vbcolor)[4] = VB->BackfaceColorPtr->data;
- (void)vbcolor;
-
- if (HAVE_BACK_COLORS) {
- if (!DO_FLAT) {
- VERT_SAVE_RGBA( 0 );
- VERT_SAVE_RGBA( 1 );
- VERT_SAVE_RGBA( 2 );
- VERT_COPY_RGBA1( v[0] );
- VERT_COPY_RGBA1( v[1] );
- VERT_COPY_RGBA1( v[2] );
- }
- VERT_SAVE_RGBA( 3 );
- VERT_COPY_RGBA1( v[3] );
- if (HAVE_SPEC) {
- if (!DO_FLAT) {
- VERT_SAVE_SPEC( 0 );
- VERT_SAVE_SPEC( 1 );
- VERT_SAVE_SPEC( 2 );
- VERT_COPY_SPEC1( v[0] );
- VERT_COPY_SPEC1( v[1] );
- VERT_COPY_SPEC1( v[2] );
- }
- VERT_SAVE_SPEC( 3 );
- VERT_COPY_SPEC1( v[3] );
- }
+ if (DO_TWOSIDE && facing == 1) {
+ GLfloat (*vbcolor)[4] = VB->BackfaceColorPtr->data;
+ (void)vbcolor;
+
+ if (HAVE_BACK_COLORS) {
+ if (!DO_FLAT) {
+ VERT_SAVE_RGBA( 0 );
+ VERT_SAVE_RGBA( 1 );
+ VERT_SAVE_RGBA( 2 );
+ VERT_COPY_RGBA1( v[0] );
+ VERT_COPY_RGBA1( v[1] );
+ VERT_COPY_RGBA1( v[2] );
}
- else {
- if (!DO_FLAT) {
- VERT_SAVE_RGBA( 0 );
- VERT_SAVE_RGBA( 1 );
- VERT_SAVE_RGBA( 2 );
- }
- VERT_SAVE_RGBA( 3 );
-
- if (VB->BackfaceColorPtr->stride) {
- if (!DO_FLAT) {
- VERT_SET_RGBA( v[0], vbcolor[e0] );
- VERT_SET_RGBA( v[1], vbcolor[e1] );
- VERT_SET_RGBA( v[2], vbcolor[e2] );
- }
- VERT_SET_RGBA( v[3], vbcolor[e3] );
- }
- else {
- if (!DO_FLAT) {
- VERT_SET_RGBA( v[0], vbcolor[0] );
- VERT_SET_RGBA( v[1], vbcolor[0] );
- VERT_SET_RGBA( v[2], vbcolor[0] );
- }
- VERT_SET_RGBA( v[3], vbcolor[0] );
+ VERT_SAVE_RGBA( 3 );
+ VERT_COPY_RGBA1( v[3] );
+ if (HAVE_SPEC) {
+ if (!DO_FLAT) {
+ VERT_SAVE_SPEC( 0 );
+ VERT_SAVE_SPEC( 1 );
+ VERT_SAVE_SPEC( 2 );
+ VERT_COPY_SPEC1( v[0] );
+ VERT_COPY_SPEC1( v[1] );
+ VERT_COPY_SPEC1( v[2] );
}
-
- if (HAVE_SPEC && VB->BackfaceSecondaryColorPtr) {
- GLfloat (*vbspec)[4] = VB->BackfaceSecondaryColorPtr->data;
- ASSERT(VB->BackfaceSecondaryColorPtr->stride==4*sizeof(GLfloat));
-
- if (!DO_FLAT) {
- VERT_SAVE_SPEC( 0 );
- VERT_SAVE_SPEC( 1 );
- VERT_SAVE_SPEC( 2 );
- VERT_SET_SPEC( v[0], vbspec[e0] );
- VERT_SET_SPEC( v[1], vbspec[e1] );
- VERT_SET_SPEC( v[2], vbspec[e2] );
- }
- VERT_SAVE_SPEC( 3 );
- VERT_SET_SPEC( v[3], vbspec[e3] );
- }
+ VERT_SAVE_SPEC( 3 );
+ VERT_COPY_SPEC1( v[3] );
}
}
else {
- GLfloat *vbindex = (GLfloat *)VB->BackfaceIndexPtr->data;
if (!DO_FLAT) {
- VERT_SAVE_IND( 0 );
- VERT_SAVE_IND( 1 );
- VERT_SAVE_IND( 2 );
- VERT_SET_IND( v[0], vbindex[e0] );
- VERT_SET_IND( v[1], vbindex[e1] );
- VERT_SET_IND( v[2], vbindex[e2] );
+ VERT_SAVE_RGBA( 0 );
+ VERT_SAVE_RGBA( 1 );
+ VERT_SAVE_RGBA( 2 );
+ }
+ VERT_SAVE_RGBA( 3 );
+
+ if (VB->BackfaceColorPtr->stride) {
+ if (!DO_FLAT) {
+ VERT_SET_RGBA( v[0], vbcolor[e0] );
+ VERT_SET_RGBA( v[1], vbcolor[e1] );
+ VERT_SET_RGBA( v[2], vbcolor[e2] );
+ }
+ VERT_SET_RGBA( v[3], vbcolor[e3] );
+ }
+ else {
+ if (!DO_FLAT) {
+ VERT_SET_RGBA( v[0], vbcolor[0] );
+ VERT_SET_RGBA( v[1], vbcolor[0] );
+ VERT_SET_RGBA( v[2], vbcolor[0] );
+ }
+ VERT_SET_RGBA( v[3], vbcolor[0] );
+ }
+
+ if (HAVE_SPEC && VB->BackfaceSecondaryColorPtr) {
+ GLfloat (*vbspec)[4] = VB->BackfaceSecondaryColorPtr->data;
+ ASSERT(VB->BackfaceSecondaryColorPtr->stride==4*sizeof(GLfloat));
+
+ if (!DO_FLAT) {
+ VERT_SAVE_SPEC( 0 );
+ VERT_SAVE_SPEC( 1 );
+ VERT_SAVE_SPEC( 2 );
+ VERT_SET_SPEC( v[0], vbspec[e0] );
+ VERT_SET_SPEC( v[1], vbspec[e1] );
+ VERT_SET_SPEC( v[2], vbspec[e2] );
+ }
+ VERT_SAVE_SPEC( 3 );
+ VERT_SET_SPEC( v[3], vbspec[e3] );
}
- VERT_SAVE_IND( 3 );
- VERT_SET_IND( v[3], vbindex[e3] );
}
}
}
@@ -546,7 +476,6 @@ static void TAG(quadr)( GLcontext *ctx,
}
if (DO_FLAT) {
- if (HAVE_RGBA) {
VERT_SAVE_RGBA( 0 );
VERT_SAVE_RGBA( 1 );
VERT_SAVE_RGBA( 2 );
@@ -561,15 +490,6 @@ static void TAG(quadr)( GLcontext *ctx,
VERT_COPY_SPEC( v[1], v[3] );
VERT_COPY_SPEC( v[2], v[3] );
}
- }
- else {
- VERT_SAVE_IND( 0 );
- VERT_SAVE_IND( 1 );
- VERT_SAVE_IND( 2 );
- VERT_COPY_IND( v[0], v[3] );
- VERT_COPY_IND( v[1], v[3] );
- VERT_COPY_IND( v[2], v[3] );
- }
}
if (mode == GL_POINT) {
@@ -625,37 +545,25 @@ static void TAG(quadr)( GLcontext *ctx,
VERT_SET_Z(v[3], z[3]);
}
- if (DO_TWOSIDE && facing == 1)
- {
- if (HAVE_RGBA) {
- if (!DO_FLAT) {
- VERT_RESTORE_RGBA( 0 );
- VERT_RESTORE_RGBA( 1 );
- VERT_RESTORE_RGBA( 2 );
- }
- VERT_RESTORE_RGBA( 3 );
- if (HAVE_SPEC) {
- if (!DO_FLAT) {
- VERT_RESTORE_SPEC( 0 );
- VERT_RESTORE_SPEC( 1 );
- VERT_RESTORE_SPEC( 2 );
- }
- VERT_RESTORE_SPEC( 3 );
- }
+ if (DO_TWOSIDE && facing == 1) {
+ if (!DO_FLAT) {
+ VERT_RESTORE_RGBA( 0 );
+ VERT_RESTORE_RGBA( 1 );
+ VERT_RESTORE_RGBA( 2 );
}
- else {
+ VERT_RESTORE_RGBA( 3 );
+ if (HAVE_SPEC) {
if (!DO_FLAT) {
- VERT_RESTORE_IND( 0 );
- VERT_RESTORE_IND( 1 );
- VERT_RESTORE_IND( 2 );
+ VERT_RESTORE_SPEC( 0 );
+ VERT_RESTORE_SPEC( 1 );
+ VERT_RESTORE_SPEC( 2 );
}
- VERT_RESTORE_IND( 3 );
+ VERT_RESTORE_SPEC( 3 );
}
}
if (DO_FLAT) {
- if (HAVE_RGBA) {
VERT_RESTORE_RGBA( 0 );
VERT_RESTORE_RGBA( 1 );
VERT_RESTORE_RGBA( 2 );
@@ -664,12 +572,6 @@ static void TAG(quadr)( GLcontext *ctx,
VERT_RESTORE_SPEC( 1 );
VERT_RESTORE_SPEC( 2 );
}
- }
- else {
- VERT_RESTORE_IND( 0 );
- VERT_RESTORE_IND( 1 );
- VERT_RESTORE_IND( 2 );
- }
}
}
#else
@@ -705,33 +607,22 @@ static void TAG(line)( GLcontext *ctx, GLuint e0, GLuint e1 )
v[1] = (VERTEX *)GET_VERTEX(e1);
if (DO_FLAT) {
- if (HAVE_RGBA) {
VERT_SAVE_RGBA( 0 );
VERT_COPY_RGBA( v[0], v[1] );
if (HAVE_SPEC && VB->AttribPtr[_TNL_ATTRIB_COLOR1]) {
VERT_SAVE_SPEC( 0 );
VERT_COPY_SPEC( v[0], v[1] );
}
- }
- else {
- VERT_SAVE_IND( 0 );
- VERT_COPY_IND( v[0], v[1] );
- }
}
LINE( v[0], v[1] );
if (DO_FLAT) {
- if (HAVE_RGBA) {
VERT_RESTORE_RGBA( 0 );
if (HAVE_SPEC && VB->AttribPtr[_TNL_ATTRIB_COLOR1]) {
VERT_RESTORE_SPEC( 0 );
}
- }
- else {
- VERT_RESTORE_IND( 0 );
- }
}
}
#endif
@@ -781,23 +672,9 @@ static void TAG(init)( void )
#undef IND
#undef TAG
-#if HAVE_RGBA
-#undef VERT_SET_IND
-#undef VERT_COPY_IND
-#undef VERT_SAVE_IND
-#undef VERT_RESTORE_IND
#if HAVE_BACK_COLORS
#undef VERT_SET_RGBA
#endif
-#else
-#undef VERT_SET_RGBA
-#undef VERT_COPY_RGBA
-#undef VERT_SAVE_RGBA
-#undef VERT_RESTORE_RGBA
-#if HAVE_BACK_COLORS
-#undef VERT_SET_IND
-#endif
-#endif
#if !HAVE_SPEC
#undef VERT_SET_SPEC
@@ -815,7 +692,6 @@ static void TAG(init)( void )
#if !HAVE_BACK_COLORS
#undef VERT_COPY_SPEC1
-#undef VERT_COPY_IND1
#undef VERT_COPY_RGBA1
#endif
diff --git a/src/mesa/tnl_dd/t_dd_unfilled.h b/src/mesa/tnl_dd/t_dd_unfilled.h
index e4d82aa080..9c467291a1 100644
--- a/src/mesa/tnl_dd/t_dd_unfilled.h
+++ b/src/mesa/tnl_dd/t_dd_unfilled.h
@@ -25,13 +25,6 @@
* Keith Whitwell <keith@tungstengraphics.com>
*/
-#if HAVE_RGBA
-#define VERT_SET_IND( v, c )
-#define VERT_COPY_IND( v0, v1 )
-#define VERT_SAVE_IND( idx )
-#define VERT_RESTORE_IND( idx )
-#endif
-
#if !HAVE_SPEC
#define VERT_SET_SPEC( v, c )
#define VERT_COPY_SPEC( v0, v1 )
@@ -53,23 +46,16 @@ static void TAG(unfilled_tri)( GLcontext *ctx,
v[2] = (VERTEX *)GET_VERTEX(e2);
if (ctx->Light.ShadeModel == GL_FLAT && HAVE_HW_FLATSHADE) {
- if (HAVE_RGBA) {
- VERT_SAVE_RGBA(0);
- VERT_SAVE_RGBA(1);
- VERT_COPY_RGBA(v[0], v[2]);
- VERT_COPY_RGBA(v[1], v[2]);
-
- if (HAVE_SPEC) {
- VERT_SAVE_SPEC(0);
- VERT_SAVE_SPEC(1);
- VERT_COPY_SPEC(v[0], v[2]);
- VERT_COPY_SPEC(v[1], v[2]);
- }
- } else {
- VERT_SAVE_IND(0);
- VERT_SAVE_IND(1);
- VERT_COPY_IND(v[0], v[2]);
- VERT_COPY_IND(v[1], v[2]);
+ VERT_SAVE_RGBA(0);
+ VERT_SAVE_RGBA(1);
+ VERT_COPY_RGBA(v[0], v[2]);
+ VERT_COPY_RGBA(v[1], v[2]);
+
+ if (HAVE_SPEC) {
+ VERT_SAVE_SPEC(0);
+ VERT_SAVE_SPEC(1);
+ VERT_COPY_SPEC(v[0], v[2]);
+ VERT_COPY_SPEC(v[1], v[2]);
}
}
@@ -98,17 +84,12 @@ static void TAG(unfilled_tri)( GLcontext *ctx,
}
if (ctx->Light.ShadeModel == GL_FLAT && HAVE_HW_FLATSHADE) {
- if (HAVE_RGBA) {
- VERT_RESTORE_RGBA(0);
- VERT_RESTORE_RGBA(1);
-
- if (HAVE_SPEC) {
- VERT_RESTORE_SPEC(0);
- VERT_RESTORE_SPEC(1);
- }
- } else {
- VERT_RESTORE_IND(0);
- VERT_RESTORE_IND(1);
+ VERT_RESTORE_RGBA(0);
+ VERT_RESTORE_RGBA(1);
+
+ if (HAVE_SPEC) {
+ VERT_RESTORE_SPEC(0);
+ VERT_RESTORE_SPEC(1);
}
}
}
@@ -133,29 +114,20 @@ static void TAG(unfilled_quad)( GLcontext *ctx,
* support flatshading, this will already have been done:
*/
if (ctx->Light.ShadeModel == GL_FLAT && HAVE_HW_FLATSHADE) {
- if (HAVE_RGBA) {
- VERT_SAVE_RGBA(0);
- VERT_SAVE_RGBA(1);
- VERT_SAVE_RGBA(2);
- VERT_COPY_RGBA(v[0], v[3]);
- VERT_COPY_RGBA(v[1], v[3]);
- VERT_COPY_RGBA(v[2], v[3]);
-
- if (HAVE_SPEC) {
- VERT_SAVE_SPEC(0);
- VERT_SAVE_SPEC(1);
- VERT_SAVE_SPEC(2);
- VERT_COPY_SPEC(v[0], v[3]);
- VERT_COPY_SPEC(v[1], v[3]);
- VERT_COPY_SPEC(v[2], v[3]);
- }
- } else {
- VERT_SAVE_IND(0);
- VERT_SAVE_IND(1);
- VERT_SAVE_IND(2);
- VERT_COPY_IND(v[0], v[3]);
- VERT_COPY_IND(v[1], v[3]);
- VERT_COPY_IND(v[2], v[3]);
+ VERT_SAVE_RGBA(0);
+ VERT_SAVE_RGBA(1);
+ VERT_SAVE_RGBA(2);
+ VERT_COPY_RGBA(v[0], v[3]);
+ VERT_COPY_RGBA(v[1], v[3]);
+ VERT_COPY_RGBA(v[2], v[3]);
+
+ if (HAVE_SPEC) {
+ VERT_SAVE_SPEC(0);
+ VERT_SAVE_SPEC(1);
+ VERT_SAVE_SPEC(2);
+ VERT_COPY_SPEC(v[0], v[3]);
+ VERT_COPY_SPEC(v[1], v[3]);
+ VERT_COPY_SPEC(v[2], v[3]);
}
}
@@ -175,32 +147,19 @@ static void TAG(unfilled_quad)( GLcontext *ctx,
}
if (ctx->Light.ShadeModel == GL_FLAT && HAVE_HW_FLATSHADE) {
- if (HAVE_RGBA) {
- VERT_RESTORE_RGBA(0);
- VERT_RESTORE_RGBA(1);
- VERT_RESTORE_RGBA(2);
-
- if (HAVE_SPEC) {
- VERT_RESTORE_SPEC(0);
- VERT_RESTORE_SPEC(1);
- VERT_RESTORE_SPEC(2);
- }
- } else {
- VERT_RESTORE_IND(0);
- VERT_RESTORE_IND(1);
- VERT_RESTORE_IND(2);
+ VERT_RESTORE_RGBA(0);
+ VERT_RESTORE_RGBA(1);
+ VERT_RESTORE_RGBA(2);
+
+ if (HAVE_SPEC) {
+ VERT_RESTORE_SPEC(0);
+ VERT_RESTORE_SPEC(1);
+ VERT_RESTORE_SPEC(2);
}
}
}
-#if HAVE_RGBA
-#undef VERT_SET_IND
-#undef VERT_COPY_IND
-#undef VERT_SAVE_IND
-#undef VERT_RESTORE_IND
-#endif
-
#if !HAVE_SPEC
#undef VERT_SET_SPEC
#undef VERT_COPY_SPEC
diff --git a/src/mesa/x86-64/glapi_x86-64.S b/src/mesa/x86-64/glapi_x86-64.S
index 4c9eab882b..a76cbb07d5 100644
--- a/src/mesa/x86-64/glapi_x86-64.S
+++ b/src/mesa/x86-64/glapi_x86-64.S
@@ -31,7 +31,7 @@
#include "x86/assyntax.h"
-#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
+#ifdef __GNUC__
# pragma GCC visibility push(default)
# define HIDDEN(x) .hidden x
#else
@@ -45,7 +45,7 @@
# define GL_PREFIX(n) GLNAME(CONCAT(gl,n))
# endif
-#if defined(PTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)
+#if defined(PTHREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)
# define THREADS
#endif
@@ -30201,10 +30201,9 @@ GL_PREFIX(_dispatch_stub_797):
.size GL_PREFIX(_dispatch_stub_797), .-GL_PREFIX(_dispatch_stub_797)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_798)
- .type GL_PREFIX(_dispatch_stub_798), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_798))
-GL_PREFIX(_dispatch_stub_798):
+ .globl GL_PREFIX(GetObjectParameterivAPPLE)
+ .type GL_PREFIX(GetObjectParameterivAPPLE), @function
+GL_PREFIX(GetObjectParameterivAPPLE):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
movq 6384(%rax), %r11
@@ -30244,13 +30243,12 @@ GL_PREFIX(_dispatch_stub_798):
movq 6384(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_798), .-GL_PREFIX(_dispatch_stub_798)
+ .size GL_PREFIX(GetObjectParameterivAPPLE), .-GL_PREFIX(GetObjectParameterivAPPLE)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_799)
- .type GL_PREFIX(_dispatch_stub_799), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_799))
-GL_PREFIX(_dispatch_stub_799):
+ .globl GL_PREFIX(ObjectPurgeableAPPLE)
+ .type GL_PREFIX(ObjectPurgeableAPPLE), @function
+GL_PREFIX(ObjectPurgeableAPPLE):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
movq 6392(%rax), %r11
@@ -30259,11 +30257,7 @@ GL_PREFIX(_dispatch_stub_799):
pushq %rdi
pushq %rsi
pushq %rdx
- pushq %rcx
- pushq %rbp
call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
popq %rdx
popq %rsi
popq %rdi
@@ -30279,24 +30273,19 @@ GL_PREFIX(_dispatch_stub_799):
pushq %rdi
pushq %rsi
pushq %rdx
- pushq %rcx
- pushq %rbp
call _glapi_get_dispatch
- popq %rbp
- popq %rcx
popq %rdx
popq %rsi
popq %rdi
movq 6392(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_799), .-GL_PREFIX(_dispatch_stub_799)
+ .size GL_PREFIX(ObjectPurgeableAPPLE), .-GL_PREFIX(ObjectPurgeableAPPLE)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_800)
- .type GL_PREFIX(_dispatch_stub_800), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_800))
-GL_PREFIX(_dispatch_stub_800):
+ .globl GL_PREFIX(ObjectUnpurgeableAPPLE)
+ .type GL_PREFIX(ObjectUnpurgeableAPPLE), @function
+GL_PREFIX(ObjectUnpurgeableAPPLE):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
movq 6400(%rax), %r11
@@ -30305,11 +30294,7 @@ GL_PREFIX(_dispatch_stub_800):
pushq %rdi
pushq %rsi
pushq %rdx
- pushq %rcx
- pushq %rbp
call _x86_64_get_dispatch@PLT
- popq %rbp
- popq %rcx
popq %rdx
popq %rsi
popq %rdi
@@ -30325,18 +30310,14 @@ GL_PREFIX(_dispatch_stub_800):
pushq %rdi
pushq %rsi
pushq %rdx
- pushq %rcx
- pushq %rbp
call _glapi_get_dispatch
- popq %rbp
- popq %rcx
popq %rdx
popq %rsi
popq %rdi
movq 6400(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_800), .-GL_PREFIX(_dispatch_stub_800)
+ .size GL_PREFIX(ObjectUnpurgeableAPPLE), .-GL_PREFIX(ObjectUnpurgeableAPPLE)
.p2align 4,,15
.globl GL_PREFIX(_dispatch_stub_801)
@@ -30351,7 +30332,11 @@ GL_PREFIX(_dispatch_stub_801):
pushq %rdi
pushq %rsi
pushq %rdx
+ pushq %rcx
+ pushq %rbp
call _x86_64_get_dispatch@PLT
+ popq %rbp
+ popq %rcx
popq %rdx
popq %rsi
popq %rdi
@@ -30367,7 +30352,11 @@ GL_PREFIX(_dispatch_stub_801):
pushq %rdi
pushq %rsi
pushq %rdx
+ pushq %rcx
+ pushq %rbp
call _glapi_get_dispatch
+ popq %rbp
+ popq %rcx
popq %rdx
popq %rsi
popq %rdi
@@ -30389,7 +30378,11 @@ GL_PREFIX(_dispatch_stub_802):
pushq %rdi
pushq %rsi
pushq %rdx
+ pushq %rcx
+ pushq %rbp
call _x86_64_get_dispatch@PLT
+ popq %rbp
+ popq %rcx
popq %rdx
popq %rsi
popq %rdi
@@ -30405,7 +30398,11 @@ GL_PREFIX(_dispatch_stub_802):
pushq %rdi
pushq %rsi
pushq %rdx
+ pushq %rcx
+ pushq %rbp
call _glapi_get_dispatch
+ popq %rbp
+ popq %rcx
popq %rdx
popq %rsi
popq %rdi
@@ -30415,9 +30412,10 @@ GL_PREFIX(_dispatch_stub_802):
.size GL_PREFIX(_dispatch_stub_802), .-GL_PREFIX(_dispatch_stub_802)
.p2align 4,,15
- .globl GL_PREFIX(EGLImageTargetRenderbufferStorageOES)
- .type GL_PREFIX(EGLImageTargetRenderbufferStorageOES), @function
-GL_PREFIX(EGLImageTargetRenderbufferStorageOES):
+ .globl GL_PREFIX(_dispatch_stub_803)
+ .type GL_PREFIX(_dispatch_stub_803), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_803))
+GL_PREFIX(_dispatch_stub_803):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
movq 6424(%rax), %r11
@@ -30425,9 +30423,13 @@ GL_PREFIX(EGLImageTargetRenderbufferStorageOES):
#elif defined(PTHREADS)
pushq %rdi
pushq %rsi
+ pushq %rdx
+ pushq %rcx
pushq %rbp
call _x86_64_get_dispatch@PLT
popq %rbp
+ popq %rcx
+ popq %rdx
popq %rsi
popq %rdi
movq 6424(%rax), %r11
@@ -30441,14 +30443,131 @@ GL_PREFIX(EGLImageTargetRenderbufferStorageOES):
1:
pushq %rdi
pushq %rsi
+ pushq %rdx
+ pushq %rcx
pushq %rbp
call _glapi_get_dispatch
popq %rbp
+ popq %rcx
+ popq %rdx
popq %rsi
popq %rdi
movq 6424(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(_dispatch_stub_803), .-GL_PREFIX(_dispatch_stub_803)
+
+ .p2align 4,,15
+ .globl GL_PREFIX(_dispatch_stub_804)
+ .type GL_PREFIX(_dispatch_stub_804), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_804))
+GL_PREFIX(_dispatch_stub_804):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 6432(%rax), %r11
+ jmp *%r11
+#elif defined(PTHREADS)
+ pushq %rdi
+ pushq %rsi
+ pushq %rdx
+ call _x86_64_get_dispatch@PLT
+ popq %rdx
+ popq %rsi
+ popq %rdi
+ movq 6432(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 6432(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rdi
+ pushq %rsi
+ pushq %rdx
+ call _glapi_get_dispatch
+ popq %rdx
+ popq %rsi
+ popq %rdi
+ movq 6432(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(_dispatch_stub_804), .-GL_PREFIX(_dispatch_stub_804)
+
+ .p2align 4,,15
+ .globl GL_PREFIX(_dispatch_stub_805)
+ .type GL_PREFIX(_dispatch_stub_805), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_805))
+GL_PREFIX(_dispatch_stub_805):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 6440(%rax), %r11
+ jmp *%r11
+#elif defined(PTHREADS)
+ pushq %rdi
+ pushq %rsi
+ pushq %rdx
+ call _x86_64_get_dispatch@PLT
+ popq %rdx
+ popq %rsi
+ popq %rdi
+ movq 6440(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 6440(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rdi
+ pushq %rsi
+ pushq %rdx
+ call _glapi_get_dispatch
+ popq %rdx
+ popq %rsi
+ popq %rdi
+ movq 6440(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(_dispatch_stub_805), .-GL_PREFIX(_dispatch_stub_805)
+
+ .p2align 4,,15
+ .globl GL_PREFIX(EGLImageTargetRenderbufferStorageOES)
+ .type GL_PREFIX(EGLImageTargetRenderbufferStorageOES), @function
+GL_PREFIX(EGLImageTargetRenderbufferStorageOES):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 6448(%rax), %r11
+ jmp *%r11
+#elif defined(PTHREADS)
+ pushq %rdi
+ pushq %rsi
+ pushq %rbp
+ call _x86_64_get_dispatch@PLT
+ popq %rbp
+ popq %rsi
+ popq %rdi
+ movq 6448(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 6448(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rdi
+ pushq %rsi
+ pushq %rbp
+ call _glapi_get_dispatch
+ popq %rbp
+ popq %rsi
+ popq %rdi
+ movq 6448(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(EGLImageTargetRenderbufferStorageOES), .-GL_PREFIX(EGLImageTargetRenderbufferStorageOES)
.p2align 4,,15
@@ -30457,7 +30576,7 @@ GL_PREFIX(EGLImageTargetRenderbufferStorageOES):
GL_PREFIX(EGLImageTargetTexture2DOES):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6432(%rax), %r11
+ movq 6456(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30467,13 +30586,13 @@ GL_PREFIX(EGLImageTargetTexture2DOES):
popq %rbp
popq %rsi
popq %rdi
- movq 6432(%rax), %r11
+ movq 6456(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6432(%rax), %r11
+ movq 6456(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30483,7 +30602,7 @@ GL_PREFIX(EGLImageTargetTexture2DOES):
popq %rbp
popq %rsi
popq %rdi
- movq 6432(%rax), %r11
+ movq 6456(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
.size GL_PREFIX(EGLImageTargetTexture2DOES), .-GL_PREFIX(EGLImageTargetTexture2DOES)
diff --git a/src/mesa/x86/assyntax.h b/src/mesa/x86/assyntax.h
index de1f6a48de..4a41812f6b 100644
--- a/src/mesa/x86/assyntax.h
+++ b/src/mesa/x86/assyntax.h
@@ -1737,7 +1737,7 @@ SECTION _DATA public align=16 class=DATA use32 flat
*/
#if defined(GNU_ASSEMBLER) && !defined(__DJGPP__) && !defined(__MINGW32__) && !defined(__APPLE__)
# define HIDDEN(x) .hidden x
-#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303 && !defined(__DJGPP__) && !defined(__MINGW32__) && !defined(__APPLE__)
+#elif defined(__GNUC__) && !defined(__DJGPP__) && !defined(__MINGW32__) && !defined(__APPLE__)
# pragma GCC visibility push(default)
# define HIDDEN(x) .hidden x
#else
diff --git a/src/mesa/x86/glapi_x86.S b/src/mesa/x86/glapi_x86.S
index 13270ef35d..a7dd8d7218 100644
--- a/src/mesa/x86/glapi_x86.S
+++ b/src/mesa/x86/glapi_x86.S
@@ -52,7 +52,7 @@
#define GLOBL_FN(x) GLOBL x
#endif
-#if defined(PTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)
+#if defined(PTHREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)
# define THREADS
#endif
@@ -981,16 +981,19 @@ GLNAME(gl_dispatch_functions_start):
HIDDEN(GL_PREFIX(_dispatch_stub_796, _dispatch_stub_796@12))
GL_STUB(_dispatch_stub_797, _gloffset_TextureRangeAPPLE, _dispatch_stub_797@12)
HIDDEN(GL_PREFIX(_dispatch_stub_797, _dispatch_stub_797@12))
- GL_STUB(_dispatch_stub_798, _gloffset_StencilFuncSeparateATI, _dispatch_stub_798@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_798, _dispatch_stub_798@16))
- GL_STUB(_dispatch_stub_799, _gloffset_ProgramEnvParameters4fvEXT, _dispatch_stub_799@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_799, _dispatch_stub_799@16))
- GL_STUB(_dispatch_stub_800, _gloffset_ProgramLocalParameters4fvEXT, _dispatch_stub_800@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_800, _dispatch_stub_800@16))
- GL_STUB(_dispatch_stub_801, _gloffset_GetQueryObjecti64vEXT, _dispatch_stub_801@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_801, _dispatch_stub_801@12))
- GL_STUB(_dispatch_stub_802, _gloffset_GetQueryObjectui64vEXT, _dispatch_stub_802@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_802, _dispatch_stub_802@12))
+ GL_STUB(GetObjectParameterivAPPLE, _gloffset_GetObjectParameterivAPPLE, GetObjectParameterivAPPLE@16)
+ GL_STUB(ObjectPurgeableAPPLE, _gloffset_ObjectPurgeableAPPLE, ObjectPurgeableAPPLE@12)
+ GL_STUB(ObjectUnpurgeableAPPLE, _gloffset_ObjectUnpurgeableAPPLE, ObjectUnpurgeableAPPLE@12)
+ GL_STUB(_dispatch_stub_801, _gloffset_StencilFuncSeparateATI, _dispatch_stub_801@16)
+ HIDDEN(GL_PREFIX(_dispatch_stub_801, _dispatch_stub_801@16))
+ GL_STUB(_dispatch_stub_802, _gloffset_ProgramEnvParameters4fvEXT, _dispatch_stub_802@16)
+ HIDDEN(GL_PREFIX(_dispatch_stub_802, _dispatch_stub_802@16))
+ GL_STUB(_dispatch_stub_803, _gloffset_ProgramLocalParameters4fvEXT, _dispatch_stub_803@16)
+ HIDDEN(GL_PREFIX(_dispatch_stub_803, _dispatch_stub_803@16))
+ GL_STUB(_dispatch_stub_804, _gloffset_GetQueryObjecti64vEXT, _dispatch_stub_804@12)
+ HIDDEN(GL_PREFIX(_dispatch_stub_804, _dispatch_stub_804@12))
+ GL_STUB(_dispatch_stub_805, _gloffset_GetQueryObjectui64vEXT, _dispatch_stub_805@12)
+ HIDDEN(GL_PREFIX(_dispatch_stub_805, _dispatch_stub_805@12))
GL_STUB(EGLImageTargetRenderbufferStorageOES, _gloffset_EGLImageTargetRenderbufferStorageOES, EGLImageTargetRenderbufferStorageOES@8)
GL_STUB(EGLImageTargetTexture2DOES, _gloffset_EGLImageTargetTexture2DOES, EGLImageTargetTexture2DOES@8)
GL_STUB_ALIAS(ArrayElementEXT, _gloffset_ArrayElement, ArrayElementEXT@4, ArrayElement, ArrayElement@4)