summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--configs/autoconf.in1
-rw-r--r--configs/default2
-rw-r--r--configs/freebsd-dri1
-rw-r--r--configs/linux-dri1
-rw-r--r--configs/linux-dri-xcb2
-rw-r--r--configs/linux-egl1
-rw-r--r--configs/linux-indirect1
-rw-r--r--configure.ac3
-rw-r--r--docs/relnotes-7.8.html1
-rw-r--r--docs/relnotes-7.9.html50
-rw-r--r--docs/relnotes.html1
-rw-r--r--include/GL/glut_h.dja340
-rw-r--r--include/GL/mglmesa.h79
-rw-r--r--progs/demos/.gitignore1
-rw-r--r--progs/demos/Makefile1
-rw-r--r--progs/demos/SConscript1
-rw-r--r--progs/demos/arbocclude2.c314
-rw-r--r--progs/gallium/unit/u_format_test.c586
-rw-r--r--progs/tests/getprocaddress.py2
-rw-r--r--progs/xdemos/.gitignore1
-rw-r--r--progs/xdemos/Makefile1
-rw-r--r--progs/xdemos/glsync.c11
-rw-r--r--progs/xdemos/msctest.c13
-rw-r--r--progs/xdemos/omlsync.c267
-rw-r--r--scons/llvm.py143
-rw-r--r--src/gallium/auxiliary/Makefile1
-rw-r--r--src/gallium/auxiliary/SConscript3
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_decompose.h40
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_vcache_tmp.h38
-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_logic.c5
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_pack.c15
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample.c33
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample.h17
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c917
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c19
-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/util/u_format.h15
-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_simple_screen.c16
-rw-r--r--src/gallium/docs/source/cso/sampler.rst101
-rw-r--r--src/gallium/drivers/i915/i915_context.h7
-rw-r--r--src/gallium/drivers/i915/i915_screen.c6
-rw-r--r--src/gallium/drivers/i915/i915_texture.c116
-rw-r--r--src/gallium/drivers/i915/intel_winsys.h39
-rw-r--r--src/gallium/drivers/i965/brw_screen.c6
-rw-r--r--src/gallium/drivers/i965/brw_screen.h9
-rw-r--r--src/gallium/drivers/i965/brw_screen_texture.c237
-rw-r--r--src/gallium/drivers/i965/brw_winsys.h32
-rw-r--r--src/gallium/drivers/identity/id_drm.c59
-rw-r--r--src/gallium/drivers/identity/id_screen.c68
-rw-r--r--src/gallium/drivers/llvmpipe/lp_jit.c14
-rw-r--r--src/gallium/drivers/llvmpipe/lp_jit.h7
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast.c6
-rw-r--r--src/gallium/drivers/llvmpipe/lp_screen.c19
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup.c16
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_vbuf.c129
-rw-r--r--src/gallium/drivers/llvmpipe/lp_tex_sample_llvm.c53
-rw-r--r--src/gallium/drivers/llvmpipe/lp_texture.c41
-rw-r--r--src/gallium/drivers/llvmpipe/lp_texture.h8
-rw-r--r--src/gallium/drivers/nouveau/nouveau_screen.c73
-rw-r--r--src/gallium/drivers/nouveau/nouveau_screen.h12
-rw-r--r--src/gallium/drivers/nv30/nv30_miptree.c7
-rw-r--r--src/gallium/drivers/nv30/nv30_state.h4
-rw-r--r--src/gallium/drivers/nv40/nv40_miptree.c7
-rw-r--r--src/gallium/drivers/nv40/nv40_state.h4
-rw-r--r--src/gallium/drivers/nv50/nv50_context.h4
-rw-r--r--src/gallium/drivers/nv50/nv50_miptree.c5
-rw-r--r--src/gallium/drivers/r300/Makefile3
-rw-r--r--src/gallium/drivers/r300/SConscript1
-rw-r--r--src/gallium/drivers/r300/r300_context.c19
-rw-r--r--src/gallium/drivers/r300/r300_context.h16
-rw-r--r--src/gallium/drivers/r300/r300_emit.c36
-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.c116
-rw-r--r--src/gallium/drivers/r300/r300_state_derived.c10
-rw-r--r--src/gallium/drivers/r300/r300_state_inlines.h24
-rw-r--r--src/gallium/drivers/r300/r300_texture.c135
-rw-r--r--src/gallium/drivers/r300/r300_texture.h6
-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/r300/r300_winsys.h5
-rw-r--r--src/gallium/drivers/softpipe/sp_prim_vbuf.c80
-rw-r--r--src/gallium/drivers/softpipe/sp_screen.c6
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_sample.c63
-rw-r--r--src/gallium/drivers/softpipe/sp_texture.c19
-rw-r--r--src/gallium/drivers/softpipe/sp_texture.h8
-rw-r--r--src/gallium/drivers/softpipe/sp_tile_cache.c7
-rw-r--r--src/gallium/drivers/svga/svga_screen_texture.c133
-rw-r--r--src/gallium/drivers/svga/svga_screen_texture.h2
-rw-r--r--src/gallium/drivers/svga/svga_winsys.h33
-rw-r--r--src/gallium/drivers/trace/tr_drm.c66
-rw-r--r--src/gallium/drivers/trace/tr_screen.c84
-rw-r--r--src/gallium/include/pipe/p_defines.h5
-rw-r--r--src/gallium/include/pipe/p_screen.h44
-rw-r--r--src/gallium/include/pipe/p_state.h10
-rw-r--r--src/gallium/include/state_tracker/drm_api.h57
-rw-r--r--src/gallium/state_trackers/dri/dri_drawable.c8
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d.c37
-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.c43
-rw-r--r--src/gallium/state_trackers/egl/kms/native_kms.h2
-rw-r--r--src/gallium/state_trackers/egl/x11/native_dri2.c49
-rw-r--r--src/gallium/state_trackers/egl/x11/native_x11.c5
-rw-r--r--src/gallium/state_trackers/egl/x11/native_x11.h4
-rw-r--r--src/gallium/state_trackers/egl/x11/native_ximage.c32
-rw-r--r--src/gallium/state_trackers/vega/Makefile2
-rw-r--r--src/gallium/state_trackers/vega/paint.c3
-rw-r--r--src/gallium/state_trackers/xorg/xorg_crtc.c15
-rw-r--r--src/gallium/state_trackers/xorg/xorg_dri2.c14
-rw-r--r--src/gallium/state_trackers/xorg/xorg_driver.c15
-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/i965/gem/i965_drm_api.c126
-rw-r--r--src/gallium/winsys/drm/i965/gem/i965_drm_buffer.c75
-rw-r--r--src/gallium/winsys/drm/intel/gem/intel_drm_api.c96
-rw-r--r--src/gallium/winsys/drm/intel/gem/intel_drm_buffer.c63
-rw-r--r--src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c74
-rw-r--r--src/gallium/winsys/drm/radeon/core/radeon_buffer.c71
-rw-r--r--src/gallium/winsys/drm/radeon/core/radeon_drm.c121
-rw-r--r--src/gallium/winsys/drm/radeon/core/radeon_drm.h22
-rw-r--r--src/gallium/winsys/drm/radeon/core/radeon_winsys.h12
-rw-r--r--src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c79
-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/glxcmds.c4
-rw-r--r--src/glx/glxext.c3
-rw-r--r--src/mesa/drivers/common/meta.c2
-rw-r--r--src/mesa/drivers/dri/i810/Makefile3
-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_texstate.c36
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_sf.c21
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf.h6
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf_emit.c135
-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.c19
-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.c4
-rw-r--r--src/mesa/drivers/dri/intel/intel_batchbuffer.h79
-rw-r--r--src/mesa/drivers/dri/intel/intel_blit.c8
-rw-r--r--src/mesa/drivers/dri/intel/intel_buffer_objects.c142
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c6
-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.c3
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.h3
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.c3
-rw-r--r--src/mesa/drivers/dri/intel/intel_regions.c6
-rw-r--r--src/mesa/drivers/dri/intel/intel_screen.c26
-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/mga/Makefile2
-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.c1
-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/server/r128_dri.c1112
-rw-r--r--src/mesa/drivers/dri/r200/Makefile6
-rw-r--r--src/mesa/drivers/dri/r200/r200_blit.c11
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.c11
-rw-r--r--src/mesa/drivers/dri/r300/r300_cmdbuf.c21
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.c4
-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_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.c12
-rw-r--r--src/mesa/drivers/dri/r600/r600_context.c1
-rw-r--r--src/mesa/drivers/dri/r600/r700_state.c4
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.c11
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common.c5
-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_tex_copy.c4
-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/sis/Makefile4
-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/unichrome/Makefile2
-rw-r--r--src/mesa/drivers/dri/unichrome/server/via_dri.c1251
-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/gl_API.xml1
-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.h44
-rw-r--r--src/mesa/glapi/glprocs.h640
-rw-r--r--src/mesa/main/api_exec.c6
-rw-r--r--src/mesa/main/api_validate.c13
-rw-r--r--src/mesa/main/bufferobj.c498
-rw-r--r--src/mesa/main/bufferobj.h11
-rw-r--r--src/mesa/main/dd.h17
-rw-r--r--src/mesa/main/dlist.c6
-rw-r--r--src/mesa/main/enums.c6108
-rw-r--r--src/mesa/main/extensions.c4
-rw-r--r--src/mesa/main/mfeatures.h1
-rw-r--r--src/mesa/main/mtypes.h4
-rw-r--r--src/mesa/main/remap_helper.h3040
-rw-r--r--src/mesa/main/texrender.c97
-rw-r--r--src/mesa/main/version.h6
-rw-r--r--src/mesa/shader/prog_execute.c13
-rw-r--r--src/mesa/sparc/glapi_sparc.S19
-rw-r--r--src/mesa/state_tracker/st_cb_fbo.c5
-rw-r--r--src/mesa/state_tracker/st_extensions.c3
-rw-r--r--src/mesa/swrast/s_accum.c6
-rw-r--r--src/mesa/swrast/s_linetemp.h1
-rw-r--r--src/mesa/swrast/s_readpix.c18
-rw-r--r--src/mesa/x86-64/glapi_x86-64.S195
-rw-r--r--src/mesa/x86/glapi_x86.S23
287 files changed, 11936 insertions, 17007 deletions
diff --git a/Makefile b/Makefile
index c4ee9e583cf..4a813120468 100644
--- a/Makefile
+++ b/Makefile
@@ -180,7 +180,7 @@ ultrix-gcc:
# Rules for making release tarballs
-VERSION=7.8-devel
+VERSION=7.9-devel
DIRECTORY = Mesa-$(VERSION)
LIB_NAME = MesaLib-$(VERSION)
DEMO_NAME = MesaDemos-$(VERSION)
@@ -215,7 +215,6 @@ MAIN_FILES = \
$(DIRECTORY)/include/GL/glx_mangle.h \
$(DIRECTORY)/include/GL/glfbdev.h \
$(DIRECTORY)/include/GL/mesa_wgl.h \
- $(DIRECTORY)/include/GL/mglmesa.h \
$(DIRECTORY)/include/GL/osmesa.h \
$(DIRECTORY)/include/GL/vms_x_fix.h \
$(DIRECTORY)/include/GL/wglext.h \
diff --git a/configs/autoconf.in b/configs/autoconf.in
index 023b86eed63..bf34f3bffad 100644
--- a/configs/autoconf.in
+++ b/configs/autoconf.in
@@ -84,7 +84,6 @@ PROGRAM_DIRS = @PROGRAM_DIRS@
# Driver specific build vars
DRI_DIRS = @DRI_DIRS@
-WINDOW_SYSTEM = @WINDOW_SYSTEM@
EGL_DISPLAYS = @EGL_DISPLAYS@
# Dependencies
diff --git a/configs/default b/configs/default
index 45eaf8752e0..fb1a35522e0 100644
--- a/configs/default
+++ b/configs/default
@@ -9,7 +9,7 @@ CONFIG_NAME = default
# Version info
MESA_MAJOR=7
-MESA_MINOR=8
+MESA_MINOR=9
MESA_TINY=0
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
diff --git a/configs/freebsd-dri b/configs/freebsd-dri
index 0b91cfc37e9..2c697e1c6e4 100644
--- a/configs/freebsd-dri
+++ b/configs/freebsd-dri
@@ -44,7 +44,6 @@ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/local/lib -lGL -lXt -lX11
SRC_DIRS = glx gallium mesa glu glut/glx glew glw
DRIVER_DIRS = dri
PROGRAM_DIRS =
-WINDOW_SYSTEM=dri
DRM_SOURCE_PATH=$(TOP)/../drm
diff --git a/configs/linux-dri b/configs/linux-dri
index ae339730002..04bcfd859d1 100644
--- a/configs/linux-dri
+++ b/configs/linux-dri
@@ -58,7 +58,6 @@ PROGRAM_DIRS := egl $(PROGRAM_DIRS)
EGL_DRIVERS_DIRS = glx
DRIVER_DIRS = dri
-WINDOW_SYSTEM = dri
GALLIUM_WINSYS_DIRS = drm
GALLIUM_TARGET_DIRS =
GALLIUM_WINSYS_DRM_DIRS = vmware intel i965
diff --git a/configs/linux-dri-xcb b/configs/linux-dri-xcb
index c5ed89c4b34..1ed980aa36e 100644
--- a/configs/linux-dri-xcb
+++ b/configs/linux-dri-xcb
@@ -51,7 +51,5 @@ SRC_DIRS = glx gallium mesa glu glut/glx glew glw
PROGRAM_DIRS = xdemos
DRIVER_DIRS = dri
-WINDOW_SYSTEM=dri
-
DRI_DIRS = i810 i915 mach64 mga r128 r200 r300 radeon \
savage sis tdfx unichrome
diff --git a/configs/linux-egl b/configs/linux-egl
index 9d898182fc9..28165ed5b5a 100644
--- a/configs/linux-egl
+++ b/configs/linux-egl
@@ -51,7 +51,6 @@ SRC_DIRS = gallium mesa gallium/winsys gallium/targets glu egl
PROGRAM_DIRS = egl
DRIVER_DIRS = dri
-WINDOW_SYSTEM = dri
GALLIUM_WINSYS_DIRS = egl_drm
GALLIUM_TARGET_DIRS =
diff --git a/configs/linux-indirect b/configs/linux-indirect
index 0914fba19bc..1c7dd857db6 100644
--- a/configs/linux-indirect
+++ b/configs/linux-indirect
@@ -50,4 +50,3 @@ GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl
SRC_DIRS = glx glu glut/glx glew glw
DRIVER_DIRS =
PROGRAM_DIRS =
-WINDOW_SYSTEM=dri
diff --git a/configure.ac b/configure.ac
index 8ca274932cc..70e158f5d7a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -457,7 +457,6 @@ CORE_DIRS="glsl mesa"
SRC_DIRS="glew"
GLU_DIRS="sgi"
-WINDOW_SYSTEM=""
GALLIUM_DIRS="auxiliary drivers state_trackers"
GALLIUM_WINSYS_DIRS=""
GALLIUM_WINSYS_DRM_DIRS=""
@@ -472,7 +471,6 @@ xlib)
dri)
SRC_DIRS="$SRC_DIRS glx"
DRIVER_DIRS="dri"
- WINDOW_SYSTEM="dri"
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS drm"
;;
osmesa)
@@ -482,7 +480,6 @@ esac
AC_SUBST([SRC_DIRS])
AC_SUBST([GLU_DIRS])
AC_SUBST([DRIVER_DIRS])
-AC_SUBST([WINDOW_SYSTEM])
AC_SUBST([GALLIUM_DIRS])
AC_SUBST([GALLIUM_WINSYS_DIRS])
AC_SUBST([GALLIUM_WINSYS_DRM_DIRS])
diff --git a/docs/relnotes-7.8.html b/docs/relnotes-7.8.html
index 552b25a5dc6..ebe3d498b57 100644
--- a/docs/relnotes-7.8.html
+++ b/docs/relnotes-7.8.html
@@ -38,6 +38,7 @@ tbd
<li>GL_EXT_draw_buffers2 extension (swrast and i965 driver only)
<li>GL_ARB_fragment_coord_conventions extension (for swrast, i965, and Gallium drivers)
<li>GL_EXT_texture_array extension (swrast driver only)
+<li>GL_APPLE_object_purgeable extension (swrast and i945/i965 DRI drivers)
<li>Much improved support for <a href="egl.html">EGL in Mesa</a>
<li>New state trackers for <a href="opengles.html">OpenGL ES 1.1 and 2.0</a>
<li>Dedicated documentation for Gallium
diff --git a/docs/relnotes-7.9.html b/docs/relnotes-7.9.html
new file mode 100644
index 00000000000..f7d5016dc69
--- /dev/null
+++ b/docs/relnotes-7.9.html
@@ -0,0 +1,50 @@
+<HTML>
+
+<TITLE>Mesa Release Notes</TITLE>
+
+<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
+
+<BODY>
+
+<body bgcolor="#eeeeee">
+
+<H1>Mesa 7.9 Release Notes / date TBD</H1>
+
+<p>
+Mesa 7.9 is a new development release.
+People who are concerned with stability and reliability should stick
+with a previous release or wait for Mesa 7.9.1.
+</p>
+<p>
+Mesa 7.9 implements the OpenGL 2.1 API, but the version reported by
+glGetString(GL_VERSION) depends on the particular driver being used.
+Some drivers don't support all the features required in OpenGL 2.1.
+</p>
+<p>
+See the <a href="install.html">Compiling/Installing page</a> for prerequisites
+for DRI hardware acceleration.
+</p>
+
+
+<h2>MD5 checksums</h2>
+<pre>
+tbd
+</pre>
+
+
+<h2>New features</h2>
+<ul>
+</ul>
+
+
+<h2>Bug fixes</h2>
+<ul>
+</ul>
+
+
+<h2>Changes</h2>
+<ul>
+</ul>
+
+</body>
+</html>
diff --git a/docs/relnotes.html b/docs/relnotes.html
index f1f95c5d3ca..3e17a1e94ee 100644
--- a/docs/relnotes.html
+++ b/docs/relnotes.html
@@ -13,7 +13,6 @@ The release notes summarize what's new or changed in each Mesa release.
</p>
<UL>
-<<<<<<< HEAD:docs/relnotes.html
<LI><A HREF="relnotes-7.8.html">7.8 release notes</A>
<LI><A HREF="relnotes-7.7.1.html">7.7.1 release notes</A>
<LI><A HREF="relnotes-7.7.html">7.7 release notes</A>
diff --git a/include/GL/glut_h.dja b/include/GL/glut_h.dja
deleted file mode 100644
index e76dcb985e3..00000000000
--- a/include/GL/glut_h.dja
+++ /dev/null
@@ -1,340 +0,0 @@
-
-/*
- * Mesa 3-D graphics library
- * Version: 3.1
- * Copyright (C) 1995-1998 Brian Paul
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-
-/*
- * This header file is based on the REAL glut.h by Mark J. Kilgard.
- *
- * The DJGPP/ALLEGRO (DJA) GLUT implementation was written by
- * Bernhard Tschirren ([email protected]) for the sole purpose
- * of compiling all the sample programs (which use GLUT). Therefore,
- * is NOT AT ALL a complete version of GLUT!
- */
-
-
-#ifndef __AGLUT_H__
-#define __AGLUT_H__
-
-#include <GL/gl.h>
-#include <GL/glu.h>
-
-#define GLUTCALLBACK
-#define APIENTRY
-#define GLUTAPI extern
-
-#define GLUT_RGB 0
-#define GLUT_RGBA GLUT_RGB
-#define GLUT_INDEX 1
-#define GLUT_SINGLE 0
-#define GLUT_DOUBLE 2
-#define GLUT_ACCUM 4
-#define GLUT_ALPHA 8
-#define GLUT_DEPTH 16
-#define GLUT_STENCIL 32
-
-/* Mouse buttons. */
-#define GLUT_LEFT_BUTTON 0
-#define GLUT_MIDDLE_BUTTON 1
-#define GLUT_RIGHT_BUTTON 2
-
-/* Mouse button state. */
-#define GLUT_DOWN 0
-#define GLUT_UP 1
-
-/* function keys */
-#define GLUT_KEY_F1 1
-#define GLUT_KEY_F2 2
-#define GLUT_KEY_F3 3
-#define GLUT_KEY_F4 4
-#define GLUT_KEY_F5 5
-#define GLUT_KEY_F6 6
-#define GLUT_KEY_F7 7
-#define GLUT_KEY_F8 8
-#define GLUT_KEY_F9 9
-#define GLUT_KEY_F10 10
-#define GLUT_KEY_F11 11
-#define GLUT_KEY_F12 12
-
-/* directional keys */
-#define GLUT_KEY_LEFT 100
-#define GLUT_KEY_UP 101
-#define GLUT_KEY_RIGHT 102
-#define GLUT_KEY_DOWN 103
-#define GLUT_KEY_PAGE_UP 104
-#define GLUT_KEY_PAGE_DOWN 105
-#define GLUT_KEY_HOME 106
-#define GLUT_KEY_END 107
-#define GLUT_KEY_INSERT 108
-
-/* Entry/exit state. */
-#define GLUT_LEFT 0
-#define GLUT_ENTERED 1
-
-/* Visibility state. */
-#define GLUT_NOT_VISIBLE 0
-#define GLUT_VISIBLE 1
-
-/* Color index component selection values. */
-#define GLUT_RED 0
-#define GLUT_GREEN 1
-#define GLUT_BLUE 2
-
-/* Layers for use. */
-#define GLUT_NORMAL 0
-#define GLUT_OVERLAY 1
-
-/* Stroke font constants (use these in GLUT program). */
-#define GLUT_STROKE_ROMAN ((void*)0)
-#define GLUT_STROKE_MONO_ROMAN ((void*)1)
-
-/* Bitmap font constants (use these in GLUT program). */
-#define GLUT_BITMAP_9_BY_15 ((void*)2)
-#define GLUT_BITMAP_8_BY_13 ((void*)3)
-#define GLUT_BITMAP_TIMES_ROMAN_10 ((void*)4)
-#define GLUT_BITMAP_TIMES_ROMAN_24 ((void*)5)
-#define GLUT_BITMAP_HELVETICA_10 ((void*)6)
-#define GLUT_BITMAP_HELVETICA_12 ((void*)7)
-#define GLUT_BITMAP_HELVETICA_18 ((void*)8)
-
-/* glutGet parameters. */
-#define GLUT_WINDOW_X 100
-#define GLUT_WINDOW_Y 101
-#define GLUT_WINDOW_WIDTH 102
-#define GLUT_WINDOW_HEIGHT 103
-#define GLUT_WINDOW_BUFFER_SIZE 104
-#define GLUT_WINDOW_STENCIL_SIZE 105
-#define GLUT_WINDOW_DEPTH_SIZE 106
-#define GLUT_WINDOW_RED_SIZE 107
-#define GLUT_WINDOW_GREEN_SIZE 108
-#define GLUT_WINDOW_BLUE_SIZE 109
-#define GLUT_WINDOW_ALPHA_SIZE 110
-#define GLUT_WINDOW_ACCUM_RED_SIZE 111
-#define GLUT_WINDOW_ACCUM_GREEN_SIZE 112
-#define GLUT_WINDOW_ACCUM_BLUE_SIZE 113
-#define GLUT_WINDOW_ACCUM_ALPHA_SIZE 114
-#define GLUT_WINDOW_DOUBLEBUFFER 115
-#define GLUT_WINDOW_RGBA 116
-#define GLUT_WINDOW_PARENT 117
-#define GLUT_WINDOW_NUM_CHILDREN 118
-#define GLUT_WINDOW_COLORMAP_SIZE 119
-#define GLUT_WINDOW_NUM_SAMPLES 120
-#define GLUT_WINDOW_STEREO 121
-#define GLUT_WINDOW_CURSOR 122
-#define GLUT_SCREEN_WIDTH 200
-#define GLUT_SCREEN_HEIGHT 201
-#define GLUT_SCREEN_WIDTH_MM 202
-#define GLUT_SCREEN_HEIGHT_MM 203
-#define GLUT_MENU_NUM_ITEMS 300
-#define GLUT_DISPLAY_MODE_POSSIBLE 400
-#define GLUT_INIT_WINDOW_X 500
-#define GLUT_INIT_WINDOW_Y 501
-#define GLUT_INIT_WINDOW_WIDTH 502
-#define GLUT_INIT_WINDOW_HEIGHT 503
-#define GLUT_INIT_DISPLAY_MODE 504
-#define GLUT_ELAPSED_TIME 700
-#define GLUT_WINDOW_FORMAT_ID 123
-
-/* glutDeviceGet parameters. */
-#define GLUT_HAS_KEYBOARD 600
-#define GLUT_HAS_MOUSE 601
-#define GLUT_HAS_SPACEBALL 602
-#define GLUT_HAS_DIAL_AND_BUTTON_BOX 603
-#define GLUT_HAS_TABLET 604
-#define GLUT_NUM_MOUSE_BUTTONS 605
-#define GLUT_NUM_SPACEBALL_BUTTONS 606
-#define GLUT_NUM_BUTTON_BOX_BUTTONS 607
-#define GLUT_NUM_DIALS 608
-#define GLUT_NUM_TABLET_BUTTONS 609
-#define GLUT_DEVICE_IGNORE_KEY_REPEAT 610
-#define GLUT_DEVICE_KEY_REPEAT 611
-#define GLUT_HAS_JOYSTICK 612
-#define GLUT_OWNS_JOYSTICK 613
-#define GLUT_JOYSTICK_BUTTONS 614
-#define GLUT_JOYSTICK_AXES 615
-#define GLUT_JOYSTICK_POLL_RATE 616
-
-/* glutLayerGet parameters. */
-#define GLUT_OVERLAY_POSSIBLE 800
-#define GLUT_LAYER_IN_USE 801
-#define GLUT_HAS_OVERLAY 802
-#define GLUT_TRANSPARENT_INDEX 803
-#define GLUT_NORMAL_DAMAGED 804
-#define GLUT_OVERLAY_DAMAGED 805
-
-/* glutVideoResizeGet parameters. */
-#define GLUT_VIDEO_RESIZE_POSSIBLE 900
-#define GLUT_VIDEO_RESIZE_IN_USE 901
-#define GLUT_VIDEO_RESIZE_X_DELTA 902
-#define GLUT_VIDEO_RESIZE_Y_DELTA 903
-#define GLUT_VIDEO_RESIZE_WIDTH_DELTA 904
-#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA 905
-#define GLUT_VIDEO_RESIZE_X 906
-#define GLUT_VIDEO_RESIZE_Y 907
-#define GLUT_VIDEO_RESIZE_WIDTH 908
-#define GLUT_VIDEO_RESIZE_HEIGHT 909
-
-/* glutUseLayer parameters. */
-#define GLUT_NORMAL 0
-#define GLUT_OVERLAY 1
-
-/* glutGetModifiers return mask. */
-#define GLUT_ACTIVE_SHIFT 1
-#define GLUT_ACTIVE_CTRL 2
-#define GLUT_ACTIVE_ALT 4
-
-/* glutSetCursor parameters. */
-/* Basic arrows. */
-#define GLUT_CURSOR_RIGHT_ARROW 0
-#define GLUT_CURSOR_LEFT_ARROW 1
-/* Symbolic cursor shapes. */
-#define GLUT_CURSOR_INFO 2
-#define GLUT_CURSOR_DESTROY 3
-#define GLUT_CURSOR_HELP 4
-#define GLUT_CURSOR_CYCLE 5
-#define GLUT_CURSOR_SPRAY 6
-#define GLUT_CURSOR_WAIT 7
-#define GLUT_CURSOR_TEXT 8
-#define GLUT_CURSOR_CROSSHAIR 9
-/* Directional cursors. */
-#define GLUT_CURSOR_UP_DOWN 10
-#define GLUT_CURSOR_LEFT_RIGHT 11
-/* Sizing cursors. */
-#define GLUT_CURSOR_TOP_SIDE 12
-#define GLUT_CURSOR_BOTTOM_SIDE 13
-#define GLUT_CURSOR_LEFT_SIDE 14
-#define GLUT_CURSOR_RIGHT_SIDE 15
-#define GLUT_CURSOR_TOP_LEFT_CORNER 16
-#define GLUT_CURSOR_TOP_RIGHT_CORNER 17
-#define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 18
-#define GLUT_CURSOR_BOTTOM_LEFT_CORNER 19
-/* Inherit from parent window. */
-#define GLUT_CURSOR_INHERIT 100
-/* Blank cursor. */
-#define GLUT_CURSOR_NONE 101
-/* Fullscreen crosshair (if available). */
-#define GLUT_CURSOR_FULL_CROSSHAIR 102
-
-/* GLUT initialization sub-API. */
-GLUTAPI void APIENTRY glutInit(int *argcp, char **argv);
-GLUTAPI void APIENTRY glutInitDisplayMode(unsigned int mode);
-GLUTAPI void APIENTRY glutInitWindowPosition(int x, int y);
-GLUTAPI void APIENTRY glutInitWindowSize(int width, int height);
-GLUTAPI void APIENTRY glutMainLoop(void);
-
-/* GLUT window sub-API. */
-GLUTAPI int APIENTRY glutCreateWindow(const char *title);
-GLUTAPI int APIENTRY glutCreateSubWindow(int win, int x, int y, int width, int height);
-GLUTAPI void APIENTRY glutDestroyWindow(int win);
-GLUTAPI void APIENTRY glutPostRedisplay(void);
-GLUTAPI void APIENTRY glutSwapBuffers(void);
-GLUTAPI int APIENTRY glutGetWindow(void);
-GLUTAPI void APIENTRY glutSetWindow(int win);
-GLUTAPI void APIENTRY glutSetWindowTitle(const char *title);
-GLUTAPI void APIENTRY glutSetIconTitle(const char *title);
-GLUTAPI void APIENTRY glutPositionWindow(int x, int y);
-GLUTAPI void APIENTRY glutReshapeWindow(int width, int height);
-GLUTAPI void APIENTRY glutPopWindow(void);
-GLUTAPI void APIENTRY glutPushWindow(void);
-GLUTAPI void APIENTRY glutIconifyWindow(void);
-GLUTAPI void APIENTRY glutShowWindow(void);
-GLUTAPI void APIENTRY glutHideWindow(void);
-
-/* GLUT overlay sub-API. */
-GLUTAPI void APIENTRY glutEstablishOverlay(void);
-GLUTAPI void APIENTRY glutRemoveOverlay(void);
-GLUTAPI void APIENTRY glutUseLayer(GLenum layer);
-GLUTAPI void APIENTRY glutPostOverlayRedisplay(void);
-GLUTAPI void APIENTRY glutShowOverlay(void);
-GLUTAPI void APIENTRY glutHideOverlay(void);
-
-/* GLUT menu sub-API. */
-GLUTAPI int APIENTRY glutCreateMenu(void (GLUTCALLBACK *)(int));
-GLUTAPI void APIENTRY glutDestroyMenu(int menu);
-GLUTAPI int APIENTRY glutGetMenu(void);
-GLUTAPI void APIENTRY glutSetMenu(int menu);
-GLUTAPI void APIENTRY glutAddMenuEntry(const char *label, int value);
-GLUTAPI void APIENTRY glutAddSubMenu(const char *label, int submenu);
-GLUTAPI void APIENTRY glutChangeToMenuEntry(int item, const char *label, int value);
-GLUTAPI void APIENTRY glutChangeToSubMenu(int item, const char *label, int submenu);
-GLUTAPI void APIENTRY glutRemoveMenuItem(int item);
-GLUTAPI void APIENTRY glutAttachMenu(int button);
-GLUTAPI void APIENTRY glutDetachMenu(int button);
-
-/* GLUT window callback sub-API. */
-GLUTAPI void APIENTRY glutDisplayFunc(void (GLUTCALLBACK * func)(void));
-GLUTAPI void APIENTRY glutReshapeFunc(void (GLUTCALLBACK * func)(int width, int height));
-GLUTAPI void APIENTRY glutKeyboardFunc(void (GLUTCALLBACK * func)(unsigned char key, int x, int y));
-GLUTAPI void APIENTRY glutMouseFunc(void (GLUTCALLBACK * func)(int button, int state, int x, int y));
-GLUTAPI void APIENTRY glutMotionFunc(void (GLUTCALLBACK * func)(int x, int y));
-GLUTAPI void APIENTRY glutPassiveMotionFunc(void (GLUTCALLBACK * func)(int x, int y));
-GLUTAPI void APIENTRY glutEntryFunc(void (GLUTCALLBACK * func)(int state));
-GLUTAPI void APIENTRY glutVisibilityFunc(void (GLUTCALLBACK * func)(int state));
-GLUTAPI void APIENTRY glutIdleFunc(void (GLUTCALLBACK * func)(void));
-GLUTAPI void APIENTRY glutTimerFunc(unsigned int millis, void (GLUTCALLBACK * func)(int value), int value);
-GLUTAPI void APIENTRY glutMenuStateFunc(void (GLUTCALLBACK * func)(int state));
-GLUTAPI void APIENTRY glutSpecialFunc(void (GLUTCALLBACK * func)(int key, int x, int y));
-GLUTAPI void APIENTRY glutSpaceballMotionFunc(void (GLUTCALLBACK * func)(int x, int y, int z));
-GLUTAPI void APIENTRY glutSpaceballRotateFunc(void (GLUTCALLBACK * func)(int x, int y, int z));
-GLUTAPI void APIENTRY glutSpaceballButtonFunc(void (GLUTCALLBACK * func)(int button, int state));
-GLUTAPI void APIENTRY glutButtonBoxFunc(void (GLUTCALLBACK * func)(int button, int state));
-GLUTAPI void APIENTRY glutDialsFunc(void (GLUTCALLBACK * func)(int dial, int value));
-GLUTAPI void APIENTRY glutTabletMotionFunc(void (GLUTCALLBACK * func)(int x, int y));
-GLUTAPI void APIENTRY glutTabletButtonFunc(void (GLUTCALLBACK * func)(int button, int state, int x, int y));
-GLUTAPI void APIENTRY glutMenuStatusFunc(void (GLUTCALLBACK * func)(int status, int x, int y));
-GLUTAPI void APIENTRY glutOverlayDisplayFunc(void (GLUTCALLBACK * func)(void));
-GLUTAPI void APIENTRY glutWindowStatusFunc(void (GLUTCALLBACK * func)(int state));
-
-/* GLUT color index sub-API. */
-GLUTAPI void APIENTRY glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue);
-GLUTAPI GLfloat APIENTRY glutGetColor(int ndx, int component);
-GLUTAPI void APIENTRY glutCopyColormap(int win);
-
-/* GLUT state retrieval sub-API. */
-GLUTAPI int APIENTRY glutGet(GLenum type);
-GLUTAPI int APIENTRY glutDeviceGet(GLenum type);
-
-/* GLUT font sub-API */
-GLUTAPI void APIENTRY glutBitmapCharacter(void *font, int character);
-GLUTAPI int APIENTRY glutBitmapWidth(void *font, int character);
-GLUTAPI void APIENTRY glutStrokeCharacter(void *font, int character);
-GLUTAPI int APIENTRY glutStrokeWidth(void *font, int character);
-
-/* GLUT pre-built models sub-API */
-GLUTAPI void APIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks);
-GLUTAPI void APIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks);
-GLUTAPI void APIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
-GLUTAPI void APIENTRY glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
-GLUTAPI void APIENTRY glutWireCube(GLdouble size);
-GLUTAPI void APIENTRY glutSolidCube(GLdouble size);
-GLUTAPI void APIENTRY glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
-GLUTAPI void APIENTRY glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
-GLUTAPI void APIENTRY glutWireDodecahedron(void);
-GLUTAPI void APIENTRY glutSolidDodecahedron(void);
-GLUTAPI void APIENTRY glutWireTeapot(GLdouble size);
-GLUTAPI void APIENTRY glutSolidTeapot(GLdouble size);
-GLUTAPI void APIENTRY glutWireOctahedron(void);
-GLUTAPI void APIENTRY glutSolidOctahedron(void);
-GLUTAPI void APIENTRY glutWireTetrahedron(void);
-GLUTAPI void APIENTRY glutSolidTetrahedron(void);
-GLUTAPI void APIENTRY glutWireIcosahedron(void);
-GLUTAPI void APIENTRY glutSolidIcosahedron(void);
-
-#endif /* __AGLUT_H__ */
diff --git a/include/GL/mglmesa.h b/include/GL/mglmesa.h
deleted file mode 100644
index 0f9f7895714..00000000000
--- a/include/GL/mglmesa.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-*
-* Mesa bindings for SciTech MGL
-*
-* Copyright (C) 1996 SciTech Software.
-* All rights reserved.
-*
-* Filename: mglmesa.h
-* Version: Revision: 1.1.1.1
-*
-* Language: ANSI C
-* Environment: Any
-*
-* Description: Header file for the Mesa/OpenGL interface bindings for the
-* SciTech MGL graphics library. Uses the MGL internal
-* device context structures to get direct access to the
-* high performance MGL rasterization functions for maximum
-* performance. Utilizes the VESA VBE/AF Accelerator Functions
-* via the MGL's accelerated device driver functions, as well
-* as basic DirectDraw accelerated functions provided by the
-* MGL.
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Library General Public
-* License as published by the Free Software Foundation; either
-* version 2 of the License, or (at your option) any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Library General Public License for more details.
-*
-* You should have received a copy of the GNU Library General Public
-* License along with this library; if not, write to the Free
-* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*
-*
-****************************************************************************/
-
-#ifndef __MGLMESA_H
-#define __MGLMESA_H
-
-#include "mgraph.h"
-
-/*------------------------- Function Prototypes ---------------------------*/
-
-#ifdef __cplusplus
-extern "C" { /* Use "C" linkage when in C++ mode */
-#endif
-
-#ifndef __WINDOWS__
-#define GLAPIENTRY
-#endif
-
-#ifdef __WINDOWS__
-bool GLAPIENTRY MGLMesaInitDLL(MGLCallbacks *cb,char *version);
-#endif
-void GLAPIENTRY MGLMesaChooseVisual(MGLDC *dc,MGLVisual *visual);
-bool GLAPIENTRY MGLMesaSetVisual(MGLDC *dc,MGLVisual *visual);
-bool GLAPIENTRY MGLMesaCreateContext(MGLDC *dc,bool forceMemDC);
-void GLAPIENTRY MGLMesaDestroyContext(MGLDC *dc);
-void GLAPIENTRY MGLMesaMakeCurrent(MGLDC *dc);
-void GLAPIENTRY MGLMesaSwapBuffers(MGLDC *dc,bool waitVRT);
-
-/* Palette manipulation support. The reason we provide palette manipulation
- * routines is so that when rendering in double buffered modes with a
- * software backbuffer, the palette for the backbuffer is kept consistent
- * with the hardware front buffer.
- */
-
-void GLAPIENTRY MGLMesaSetPaletteEntry(MGLDC *dc,int entry,uchar red,uchar green,uchar blue);
-void GLAPIENTRY MGLMesaSetPalette(MGLDC *dc,palette_t *pal,int numColors,int startIndex);
-void GLAPIENTRY MGLMesaRealizePalette(MGLDC *dc,int numColors,int startIndex,int waitVRT);
-
-#ifdef __cplusplus
-} /* End of "C" linkage for C++ */
-#endif /* __cplusplus */
-
-#endif /* __MGLMESA_H */
diff --git a/progs/demos/.gitignore b/progs/demos/.gitignore
index 1b31866a850..aecdd9a0118 100644
--- a/progs/demos/.gitignore
+++ b/progs/demos/.gitignore
@@ -1,6 +1,7 @@
arbfplight
arbfslight
arbocclude
+arbocclude2
bounce
clearspd
copypix
diff --git a/progs/demos/Makefile b/progs/demos/Makefile
index 5b1d2a0b65b..a13a272ce9c 100644
--- a/progs/demos/Makefile
+++ b/progs/demos/Makefile
@@ -15,6 +15,7 @@ PROGS = \
arbfplight \
arbfslight \
arbocclude \
+ arbocclude2 \
bounce \
clearspd \
copypix \
diff --git a/progs/demos/SConscript b/progs/demos/SConscript
index 067c1623909..20ec6a002a7 100644
--- a/progs/demos/SConscript
+++ b/progs/demos/SConscript
@@ -4,6 +4,7 @@ progs = [
'arbfplight',
'arbfslight',
'arbocclude',
+ 'arbocclude2',
'bounce',
'clearspd',
'copypix',
diff --git a/progs/demos/arbocclude2.c b/progs/demos/arbocclude2.c
new file mode 100644
index 00000000000..195a23803a4
--- /dev/null
+++ b/progs/demos/arbocclude2.c
@@ -0,0 +1,314 @@
+/*
+ * GL_ARB_occlusion_query demo
+ *
+ * Brian Paul
+ * 12 June 2003
+ *
+ * Copyright (C) 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.
+ */
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <GL/glew.h>
+#include <GL/glut.h>
+
+static GLboolean Anim = GL_TRUE;
+static GLfloat Xpos = 0;
+static GLuint OccQuery1;
+static GLuint OccQuery2;
+static GLint Win = 0;
+
+
+static void
+PrintString(const char *s)
+{
+ while (*s) {
+ glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s);
+ s++;
+ }
+}
+
+
+
+static void Idle(void)
+{
+ static int lastTime = 0;
+ static int sign = +1;
+ int time = glutGet(GLUT_ELAPSED_TIME);
+ float step;
+
+ if (lastTime == 0)
+ lastTime = time;
+ else if (time - lastTime < 20) /* 50Hz update */
+ return;
+
+ step = (time - lastTime) / 1000.0 * sign;
+ lastTime = time;
+
+ Xpos += step;
+
+ if (Xpos > 2.5) {
+ Xpos = 2.5;
+ sign = -1;
+ }
+ else if (Xpos < -2.5) {
+ Xpos = -2.5;
+ sign = +1;
+ }
+ glutPostRedisplay();
+}
+
+
+static void Display( void )
+{
+ GLuint passed1, passed2;
+ GLint ready;
+ char s[100];
+
+ glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
+
+ glMatrixMode( GL_PROJECTION );
+ glLoadIdentity();
+ glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 );
+ glMatrixMode( GL_MODELVIEW );
+ glLoadIdentity();
+ glTranslatef( 0.0, 0.0, -15.0 );
+
+ /* draw the occluding polygons */
+ glColor3f(0, 0.6, 0.8);
+ glBegin(GL_QUADS);
+ glVertex2f(-1.6, -1.5);
+ glVertex2f(-0.4, -1.5);
+ glVertex2f(-0.4, 1.5);
+ glVertex2f(-1.6, 1.5);
+
+ glVertex2f( 0.4, -1.5);
+ glVertex2f( 1.6, -1.5);
+ glVertex2f( 1.6, 1.5);
+ glVertex2f( 0.4, 1.5);
+ glEnd();
+
+#if defined(GL_ARB_occlusion_query)
+ glColorMask(0, 0, 0, 0);
+ glDepthMask(GL_FALSE);
+
+ /* draw the first polygon with occlusion testing */
+ glPushMatrix();
+ glTranslatef(Xpos, 0.4, -0.5);
+ glScalef(0.3, 0.3, 1.0);
+ glRotatef(-90.0 * Xpos, 0, 0, 1);
+
+ glBeginQueryARB(GL_SAMPLES_PASSED_ARB, OccQuery1);
+
+ glBegin(GL_POLYGON);
+ glVertex3f(-1, -1, 0);
+ glVertex3f( 1, -1, 0);
+ glVertex3f( 1, 1, 0);
+ glVertex3f(-1, 1, 0);
+ glEnd();
+
+ glEndQueryARB(GL_SAMPLES_PASSED_ARB);
+
+ /* draw the second polygon with occlusion testing */
+ glPopMatrix();
+ glPushMatrix();
+ glTranslatef(Xpos, -0.4, -0.5);
+ glScalef(0.3, 0.3, 1.0);
+
+ glBeginQueryARB(GL_SAMPLES_PASSED_ARB, OccQuery2);
+
+ glBegin(GL_POLYGON);
+ glVertex3f(-1, -1, 0);
+ glVertex3f( 1, -1, 0);
+ glVertex3f( 1, 1, 0);
+ glVertex3f(-1, 1, 0);
+ glEnd();
+
+ glEndQueryARB(GL_SAMPLES_PASSED_ARB);
+
+ /* turn off occlusion testing */
+ glColorMask(1, 1, 1, 1);
+ glDepthMask(GL_TRUE);
+
+ do {
+ /* do useful work here, if any */
+ glGetQueryObjectivARB(OccQuery1, GL_QUERY_RESULT_AVAILABLE_ARB, &ready);
+ } while (!ready);
+ glGetQueryObjectuivARB(OccQuery1, GL_QUERY_RESULT_ARB, &passed1);
+
+ do {
+ /* do useful work here, if any */
+ glGetQueryObjectivARB(OccQuery2, GL_QUERY_RESULT_AVAILABLE_ARB, &ready);
+ } while (!ready);
+ glGetQueryObjectuivARB(OccQuery2, GL_QUERY_RESULT_ARB, &passed2);
+#endif /* GL_ARB_occlusion_query */
+
+ /* draw the second rect, so we can see what's going on */
+ glColor3f(0.8, 0.5, 0);
+ glBegin(GL_POLYGON);
+ glVertex3f(-1, -1, 0);
+ glVertex3f( 1, -1, 0);
+ glVertex3f( 1, 1, 0);
+ glVertex3f(-1, 1, 0);
+ glEnd();
+
+ glPopMatrix();
+ glPushMatrix();
+ glTranslatef(Xpos, 0.4, -0.5);
+ glScalef(0.3, 0.3, 1.0);
+ glRotatef(-90.0 * Xpos, 0, 0, 1);
+
+ /* draw the first rect, so we can see what's going on */
+ glBegin(GL_POLYGON);
+ glVertex3f(-1, -1, 0);
+ glVertex3f( 1, -1, 0);
+ glVertex3f( 1, 1, 0);
+ glVertex3f(-1, 1, 0);
+ glEnd();
+
+ glPopMatrix();
+
+ /* Print result message */
+ glMatrixMode( GL_PROJECTION );
+ glLoadIdentity();
+ glOrtho( -1.0, 1.0, -1.0, 1.0, -1.0, 1.0 );
+ glMatrixMode( GL_MODELVIEW );
+ glLoadIdentity();
+
+ glColor3f(1, 1, 1);
+#if defined(GL_ARB_occlusion_query)
+ sprintf(s, " %4d Fragments Visible", passed1);
+ glRasterPos3f(-0.50, -0.6, 0);
+ PrintString(s);
+ if (!passed1) {
+ glRasterPos3f(-0.25, -0.7, 0);
+ PrintString("Fully Occluded");
+ }
+ sprintf(s, " %4d Fragments Visible", passed2);
+ glRasterPos3f(-0.50, -0.8, 0);
+ PrintString(s);
+ if (!passed2) {
+ glRasterPos3f(-0.25, -0.9, 0);
+ PrintString("Fully Occluded");
+ }
+#else
+ glRasterPos3f(-0.25, -0.8, 0);
+ PrintString("GL_ARB_occlusion_query not available at compile time");
+#endif /* GL_ARB_occlusion_query */
+
+ glutSwapBuffers();
+}
+
+
+static void Reshape( int width, int height )
+{
+ glViewport( 0, 0, width, height );
+}
+
+
+static void Key( unsigned char key, int x, int y )
+{
+ (void) x;
+ (void) y;
+ switch (key) {
+ case 27:
+ glutDestroyWindow(Win);
+ exit(0);
+ break;
+ case ' ':
+ Anim = !Anim;
+ if (Anim)
+ glutIdleFunc(Idle);
+ else
+ glutIdleFunc(NULL);
+ break;
+ }
+ glutPostRedisplay();
+}
+
+
+static void SpecialKey( int key, int x, int y )
+{
+ const GLfloat step = 0.1;
+ (void) x;
+ (void) y;
+ switch (key) {
+ case GLUT_KEY_LEFT:
+ Xpos -= step;
+ break;
+ case GLUT_KEY_RIGHT:
+ Xpos += step;
+ break;
+ }
+ glutPostRedisplay();
+}
+
+
+static void Init( void )
+{
+ const char *ext = (const char *) glGetString(GL_EXTENSIONS);
+ GLint bits;
+
+ if (!strstr(ext, "GL_ARB_occlusion_query")) {
+ printf("Sorry, this demo requires the GL_ARB_occlusion_query extension\n");
+ exit(-1);
+ }
+
+#if defined(GL_ARB_occlusion_query)
+ glGetQueryivARB(GL_SAMPLES_PASSED_ARB, GL_QUERY_COUNTER_BITS_ARB, &bits);
+ if (!bits) {
+ printf("Hmmm, GL_QUERY_COUNTER_BITS_ARB is zero!\n");
+ exit(-1);
+ }
+#endif /* GL_ARB_occlusion_query */
+
+ glGetIntegerv(GL_DEPTH_BITS, &bits);
+ printf("Depthbits: %d\n", bits);
+
+#if defined(GL_ARB_occlusion_query)
+ glGenQueriesARB(1, &OccQuery1);
+ assert(OccQuery1 > 0);
+ glGenQueriesARB(1, &OccQuery2);
+ assert(OccQuery2 > 0);
+#endif /* GL_ARB_occlusion_query */
+
+ glEnable(GL_DEPTH_TEST);
+}
+
+
+int main( int argc, char *argv[] )
+{
+ glutInitWindowSize( 400, 400 );
+ glutInit( &argc, argv );
+ glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
+ Win = glutCreateWindow(argv[0]);
+ glewInit();
+ glutReshapeFunc( Reshape );
+ glutKeyboardFunc( Key );
+ glutSpecialFunc( SpecialKey );
+ glutIdleFunc( Idle );
+ glutDisplayFunc( Display );
+ Init();
+ glutMainLoop();
+ return 0;
+}
diff --git a/progs/gallium/unit/u_format_test.c b/progs/gallium/unit/u_format_test.c
index 2dfba5538bf..5274311e035 100644
--- a/progs/gallium/unit/u_format_test.c
+++ b/progs/gallium/unit/u_format_test.c
@@ -30,546 +30,10 @@
#include <stdio.h>
#include "util/u_format.h"
+#include "util/u_format_tests.h"
#include "util/u_format_pack.h"
-#define 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[MAX_PACKED_BYTES];
-
- uint8_t packed[MAX_PACKED_BYTES];
-
- /**
- * RGBA.
- */
- double unpacked[4];
-};
-
-
-/*
- * 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.
- */
-static const struct util_format_test_case
-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_1x32(0x00ffffff), PACKED_1x32(0x00000000), { 0.0, 0.0, 0.0, 1.0}},
- {PIPE_FORMAT_R8SG8SB8UX8U_NORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x0000007f), { 1.0, 0.0, 0.0, 1.0}},
- {PIPE_FORMAT_R8SG8SB8UX8U_NORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00000081), {-1.0, 0.0, 0.0, 1.0}},
- {PIPE_FORMAT_R8SG8SB8UX8U_NORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00007f00), { 0.0, 1.0, 0.0, 1.0}},
- {PIPE_FORMAT_R8SG8SB8UX8U_NORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00008100), { 0.0, -1.0, 0.0, 1.0}},
- {PIPE_FORMAT_R8SG8SB8UX8U_NORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00ff0000), { 0.0, 0.0, 1.0, 1.0}},
- {PIPE_FORMAT_R8SG8SB8UX8U_NORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0xff000000), { 0.0, 0.0, 0.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}},
-};
-
-
static boolean
test_format_unpack_4f(const struct util_format_test_case *test)
{
@@ -596,7 +60,7 @@ test_format_unpack_4f(const struct util_format_test_case *test)
static boolean
test_format_pack_4f(const struct util_format_test_case *test)
{
- uint8_t packed[MAX_PACKED_BYTES];
+ uint8_t packed[UTIL_FORMAT_MAX_PACKED_BYTES];
unsigned i;
boolean success;
@@ -605,7 +69,7 @@ test_format_pack_4f(const struct util_format_test_case *test)
util_format_pack_4f(test->format, packed, test->unpacked[0], test->unpacked[1], test->unpacked[2], test->unpacked[3]);
success = TRUE;
- for (i = 0; i < MAX_PACKED_BYTES; ++i)
+ for (i = 0; i < UTIL_FORMAT_MAX_PACKED_BYTES; ++i)
if ((test->packed[i] & test->mask[i]) != (packed[i] & test->mask[i]))
success = FALSE;
@@ -627,13 +91,27 @@ test_format_pack_4f(const struct util_format_test_case *test)
}
-static void
+static boolean
convert_4f_to_4ub(uint8_t *dst, const double *src)
{
unsigned i;
+ boolean accurate = TRUE;
- for (i = 0; i < 4; ++i)
- dst[i] = CLAMP(src[i], 0.0, 1.0) * 255.0;
+ for (i = 0; i < 4; ++i) {
+ if (src[i] < 0.0) {
+ accurate = FALSE;
+ dst[i] = 0;
+ }
+ else if (src[i] > 1.0) {
+ accurate = FALSE;
+ dst[i] = 255;
+ }
+ else {
+ dst[i] = src[i] * 255.0;
+ }
+ }
+
+ return accurate;
}
@@ -667,18 +145,23 @@ static boolean
test_format_pack_4ub(const struct util_format_test_case *test)
{
uint8_t unpacked[4];
- uint8_t packed[MAX_PACKED_BYTES];
+ uint8_t packed[UTIL_FORMAT_MAX_PACKED_BYTES];
unsigned i;
boolean success;
- convert_4f_to_4ub(unpacked, test->unpacked);
+ if (!convert_4f_to_4ub(unpacked, test->unpacked)) {
+ /*
+ * Skip test cases which cannot be represented by four unorm bytes.
+ */
+ return TRUE;
+ }
memset(packed, 0, sizeof packed);
util_format_pack_4ub(test->format, packed, unpacked[0], unpacked[1], unpacked[2], unpacked[3]);
success = TRUE;
- for (i = 0; i < MAX_PACKED_BYTES; ++i)
+ for (i = 0; i < UTIL_FORMAT_MAX_PACKED_BYTES; ++i)
if ((test->packed[i] & test->mask[i]) != (packed[i] & test->mask[i]))
success = FALSE;
@@ -711,15 +194,16 @@ test_one(test_func_t func, const char *suffix)
unsigned i;
bool success = TRUE;
- for (i = 0; i < sizeof(test_cases)/sizeof(test_cases[0]); ++i) {
- if (test_cases[i].format != last_format) {
+ for (i = 0; i < util_format_nr_test_cases; ++i) {
+ const struct util_format_test_case *test = &util_format_test_cases[i];
+ if (test->format != last_format) {
const struct util_format_description *format_desc;
- format_desc = util_format_description(test_cases[i].format);
- printf("Testing %s.%s ...\n", format_desc->name, suffix);
- last_format = test_cases[i].format;
+ format_desc = util_format_description(test->format);
+ printf("Testing util_format_%s_%s ...\n", format_desc->short_name, suffix);
+ last_format = test->format;
}
- if (!func(&test_cases[i]))
+ if (!func(&util_format_test_cases[i]))
success = FALSE;
}
diff --git a/progs/tests/getprocaddress.py b/progs/tests/getprocaddress.py
index e88ad4c5e4c..60111cb8010 100644
--- a/progs/tests/getprocaddress.py
+++ b/progs/tests/getprocaddress.py
@@ -4,7 +4,7 @@
# Helper for the getprocaddress.c test.
import sys, getopt, re
-sys.path.append("../../src/mesa/glapi/" )
+sys.path.append("../../src/mesa/glapi/gen" )
import gl_XML
import license
diff --git a/progs/xdemos/.gitignore b/progs/xdemos/.gitignore
index 5ae0f5a0627..a65b890d3dc 100644
--- a/progs/xdemos/.gitignore
+++ b/progs/xdemos/.gitignore
@@ -27,3 +27,4 @@ xfont
xrotfontdemo
yuvrect_client
msctest
+omlsync
diff --git a/progs/xdemos/Makefile b/progs/xdemos/Makefile
index f866a328656..9cf984b59e5 100644
--- a/progs/xdemos/Makefile
+++ b/progs/xdemos/Makefile
@@ -32,6 +32,7 @@ PROGS = \
msctest \
multictx \
offset \
+ omlsync \
overlay \
pbinfo \
pbdemo \
diff --git a/progs/xdemos/glsync.c b/progs/xdemos/glsync.c
index c00ba9e4687..3751373e23b 100644
--- a/progs/xdemos/glsync.c
+++ b/progs/xdemos/glsync.c
@@ -63,10 +63,9 @@ void (*swap_interval)();
static int GLXExtensionSupported(Display *dpy, const char *extension)
{
- const char *extensionsString, *client_extensions, *pos;
+ const char *extensionsString, *pos;
extensionsString = glXQueryExtensionsString(dpy, DefaultScreen(dpy));
- client_extensions = glXGetClientString(dpy, GLX_EXTENSIONS);
pos = strstr(extensionsString, extension);
@@ -74,12 +73,6 @@ static int GLXExtensionSupported(Display *dpy, const char *extension)
(pos[strlen(extension)] == ' ' || pos[strlen(extension)] == '\0'))
return 1;
- pos = strstr(client_extensions, extension);
-
- if (pos != NULL && (pos == extensionsString || pos[-1] == ' ') &&
- (pos[strlen(extension)] == ' ' || pos[strlen(extension)] == '\0'))
- return 1;
-
return 0;
}
@@ -235,7 +228,7 @@ int main(int argc, char *argv[])
XMapWindow(disp, winGL);
ret = glXMakeCurrent(disp, winGL, context);
- if (ret) {
+ if (!ret) {
fprintf(stderr, "failed to make context current: %d\n", ret);
}
diff --git a/progs/xdemos/msctest.c b/progs/xdemos/msctest.c
index 001ecf04d6c..11b04344426 100644
--- a/progs/xdemos/msctest.c
+++ b/progs/xdemos/msctest.c
@@ -45,10 +45,9 @@ void (*wait_sync)(Display *dpy, Window winGL, int64_t target_msc, int64_t diviso
static int GLXExtensionSupported(Display *dpy, const char *extension)
{
- const char *extensionsString, *client_extensions, *pos;
+ const char *extensionsString, *pos;
extensionsString = glXQueryExtensionsString(dpy, DefaultScreen(dpy));
- client_extensions = glXGetClientString(dpy, GLX_EXTENSIONS);
pos = strstr(extensionsString, extension);
@@ -56,12 +55,6 @@ static int GLXExtensionSupported(Display *dpy, const char *extension)
(pos[strlen(extension)] == ' ' || pos[strlen(extension)] == '\0'))
return 1;
- pos = strstr(client_extensions, extension);
-
- if (pos != NULL && (pos == extensionsString || pos[-1] == ' ') &&
- (pos[strlen(extension)] == ' ' || pos[strlen(extension)] == '\0'))
- return 1;
-
return 0;
}
@@ -167,8 +160,8 @@ int main(int argc, char *argv[])
glXMakeCurrent(disp, winGL, context);
- get_sync_values = glXGetProcAddress((unsigned char *)"glXGetSyncValuesOML");
- wait_sync = glXGetProcAddress((unsigned char *)"glXWaitForMscOML");
+ get_sync_values = (void *)glXGetProcAddress((unsigned char *)"glXGetSyncValuesOML");
+ wait_sync = (void *)glXGetProcAddress((unsigned char *)"glXWaitForMscOML");
if (!get_sync_values || !wait_sync) {
fprintf(stderr, "failed to get sync values function\n");
diff --git a/progs/xdemos/omlsync.c b/progs/xdemos/omlsync.c
new file mode 100644
index 00000000000..061d6c68613
--- /dev/null
+++ b/progs/xdemos/omlsync.c
@@ -0,0 +1,267 @@
+/*
+ * Copyright © 2007-2010 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ * Authors:
+ * Jesse Barnes <[email protected]>
+ *
+ */
+
+/** @file omlsync.c
+ * The program is simple: it paints a window alternating colors (red &
+ * white) either as fast as possible or synchronized to vblank events
+ *
+ * If run normally, the program should display a window that exhibits
+ * significant tearing between red and white colors (e.g. you might get
+ * a "waterfall" effect of red and white horizontal bars).
+ *
+ * If run with the '-s b' option, the program should synchronize the
+ * window color changes with the vertical blank period, resulting in a
+ * window that looks orangish with a high frequency flicker (which may
+ * be invisible). If the window is moved to another screen, this
+ * property should be preserved. If the window spans two screens, it
+ * shouldn't tear on whichever screen most of the window is on; the
+ * portion on the other screen may show some tearing (like the
+ * waterfall effect above).
+ *
+ * Other options include '-w <width>' and '-h <height>' to set the
+ * window size.
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <GL/gl.h>
+#include <GL/glu.h>
+#include <GL/glx.h>
+#include <GL/glxext.h>
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+Bool (*glXGetSyncValuesOML)(Display *dpy, GLXDrawable drawable,
+ int64_t *ust, int64_t *msc, int64_t *sbc);
+Bool (*glXGetMscRateOML)(Display *dpy, GLXDrawable drawable, int32_t *numerator,
+ int32_t *denominator);
+int64_t (*glXSwapBuffersMscOML)(Display *dpy, GLXDrawable drawable,
+ int64_t target_msc, int64_t divisor,
+ int64_t remainder);
+Bool (*glXWaitForMscOML)(Display *dpy, GLXDrawable drawable, int64_t target_msc,
+ int64_t divisor, int64_t remainder, int64_t *ust,
+ int64_t *msc, int64_t *sbc);
+Bool (*glXWaitForSbcOML)(Display *dpy, GLXDrawable drawable, int64_t target_sbc,
+ int64_t *ust, int64_t *msc, int64_t *sbc);
+int (*glXSwapInterval)(int interval);
+
+static int GLXExtensionSupported(Display *dpy, const char *extension)
+{
+ const char *extensionsString, *pos;
+
+ extensionsString = glXQueryExtensionsString(dpy, DefaultScreen(dpy));
+
+ pos = strstr(extensionsString, extension);
+
+ if (pos != NULL && (pos == extensionsString || pos[-1] == ' ') &&
+ (pos[strlen(extension)] == ' ' || pos[strlen(extension)] == '\0'))
+ return 1;
+
+ return 0;
+}
+
+extern char *optarg;
+extern int optind, opterr, optopt;
+static char optstr[] = "w:h:vd:r:n:i:";
+
+static void usage(char *name)
+{
+ printf("usage: %s [-w <width>] [-h <height>] ...\n", name);
+ printf("\t-d<divisor> - divisor for OML swap\n");
+ printf("\t-r<remainder> - remainder for OML swap\n");
+ printf("\t-n<interval> - wait interval for OML WaitMSC\n");
+ printf("\t-i<swap interval> - swap at most once every n frames\n");
+ printf("\t-v: verbose (print count)\n");
+ exit(-1);
+}
+
+int main(int argc, char *argv[])
+{
+ Display *disp;
+ XVisualInfo *pvi;
+ XSetWindowAttributes swa;
+ Window winGL;
+ GLXContext context;
+ int dummy;
+ Atom wmDelete;
+ int64_t ust, msc, sbc;
+ int width = 500, height = 500, verbose = 0, divisor = 0, remainder = 0,
+ wait_interval = 0, swap_interval = 1;
+ int c, i = 1;
+ int ret;
+ int db_attribs[] = { GLX_RGBA,
+ GLX_RED_SIZE, 1,
+ GLX_GREEN_SIZE, 1,
+ GLX_BLUE_SIZE, 1,
+ GLX_DOUBLEBUFFER,
+ GLX_DEPTH_SIZE, 1,
+ None };
+ XSizeHints sizehints;
+
+ opterr = 0;
+ while ((c = getopt(argc, argv, optstr)) != -1) {
+ switch (c) {
+ case 'w':
+ width = atoi(optarg);
+ break;
+ case 'h':
+ height = atoi(optarg);
+ break;
+ case 'v':
+ verbose = 1;
+ break;
+ case 'd':
+ divisor = atoi(optarg);
+ break;
+ case 'r':
+ remainder = atoi(optarg);
+ break;
+ case 'n':
+ wait_interval = atoi(optarg);
+ break;
+ case 'i':
+ swap_interval = atoi(optarg);
+ break;
+ default:
+ usage(argv[0]);
+ break;
+ }
+ }
+
+ disp = XOpenDisplay(NULL);
+ if (!disp) {
+ fprintf(stderr, "failed to open display\n");
+ return -1;
+ }
+
+ if (!glXQueryExtension(disp, &dummy, &dummy)) {
+ fprintf(stderr, "glXQueryExtension failed\n");
+ return -1;
+ }
+
+ if (!GLXExtensionSupported(disp, "GLX_OML_sync_control")) {
+ fprintf(stderr, "GLX_OML_sync_control not supported\n");
+ return -1;
+ }
+
+ if (!GLXExtensionSupported(disp, "GLX_MESA_swap_control")) {
+ fprintf(stderr, "GLX_MESA_swap_control not supported\n");
+ return -1;
+ }
+
+ pvi = glXChooseVisual(disp, DefaultScreen(disp), db_attribs);
+
+ if (!pvi) {
+ fprintf(stderr, "failed to choose visual, exiting\n");
+ return -1;
+ }
+
+ pvi->screen = DefaultScreen(disp);
+
+ swa.colormap = XCreateColormap(disp, RootWindow(disp, pvi->screen),
+ pvi->visual, AllocNone);
+ swa.border_pixel = 0;
+ swa.event_mask = ExposureMask | KeyPressMask | ButtonPressMask |
+ StructureNotifyMask;
+ winGL = XCreateWindow(disp, RootWindow(disp, pvi->screen),
+ 0, 0,
+ width, height,
+ 0, pvi->depth, InputOutput, pvi->visual,
+ CWBorderPixel | CWColormap | CWEventMask, &swa);
+ if (!winGL) {
+ fprintf(stderr, "window creation failed\n");
+ return -1;
+ }
+ wmDelete = XInternAtom(disp, "WM_DELETE_WINDOW", True);
+ XSetWMProtocols(disp, winGL, &wmDelete, 1);
+
+ sizehints.x = 0;
+ sizehints.y = 0;
+ sizehints.width = width;
+ sizehints.height = height;
+ sizehints.flags = USSize | USPosition;
+
+ XSetNormalHints(disp, winGL, &sizehints);
+ XSetStandardProperties(disp, winGL, "glsync test", "glsync text",
+ None, NULL, 0, &sizehints);
+
+ context = glXCreateContext(disp, pvi, NULL, GL_TRUE);
+ if (!context) {
+ fprintf(stderr, "failed to create glx context\n");
+ return -1;
+ }
+
+ XMapWindow(disp, winGL);
+ ret = glXMakeCurrent(disp, winGL, context);
+ if (!ret) {
+ fprintf(stderr, "failed to make context current: %d\n", ret);
+ }
+
+ glXGetSyncValuesOML = (void *)glXGetProcAddress((unsigned char *)"glXGetSyncValuesOML");
+ glXGetMscRateOML = (void *)glXGetProcAddress((unsigned char *)"glXGetMscRateOML");
+ glXSwapBuffersMscOML = (void *)glXGetProcAddress((unsigned char *)"glXSwapBuffersMscOML");
+ glXWaitForMscOML = (void *)glXGetProcAddress((unsigned char *)"glXWaitForMscOML");
+ glXWaitForSbcOML = (void *)glXGetProcAddress((unsigned char *)"glXWaitForSbcOML");
+ glXSwapInterval = (void *)glXGetProcAddress((unsigned char *)"glXSwapIntervalMESA");
+
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+ glXSwapInterval(swap_interval);
+ fprintf(stderr, "set swap interval to %d\n", swap_interval);
+
+ glXGetSyncValuesOML(disp, winGL, &ust, &msc, &sbc);
+ while (i++) {
+ /* Alternate colors to make tearing obvious */
+ if (i & 1) {
+ glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
+ glColor3f(1.0f, 1.0f, 1.0f);
+ } else {
+ glClearColor(1.0f, 0.0f, 0.0f, 0.0f);
+ glColor3f(1.0f, 0.0f, 0.0f);
+ }
+
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ glRectf(0, 0, width, height);
+
+ if (!wait_interval)
+ glXSwapBuffersMscOML(disp, winGL, 0, divisor,
+ remainder);
+ else {
+ glXWaitForMscOML(disp, winGL, msc + wait_interval,
+ divisor, remainder, &ust, &msc, &sbc);
+ glXSwapBuffersMscOML(disp, winGL, 0, 0, 0);
+ }
+ }
+
+ XDestroyWindow(disp, winGL);
+ glXDestroyContext(disp, context);
+ XCloseDisplay(disp);
+
+ return 0;
+}
diff --git a/scons/llvm.py b/scons/llvm.py
index 37c503ec986..c8e50c5916d 100644
--- a/scons/llvm.py
+++ b/scons/llvm.py
@@ -29,7 +29,9 @@ Tool-specific initialization for LLVM
import os
import os.path
+import re
import sys
+import distutils.version
import SCons.Errors
import SCons.Util
@@ -60,71 +62,108 @@ def generate(env):
if env['platform'] == 'windows':
# XXX: There is no llvm-config on Windows, so assume a standard layout
- if llvm_dir is not None:
- env.Prepend(CPPPATH = [os.path.join(llvm_dir, 'include')])
- env.AppendUnique(CPPDEFINES = [
- '__STDC_LIMIT_MACROS',
- '__STDC_CONSTANT_MACROS',
- 'HAVE_STDINT_H',
+ if llvm_dir is None:
+ return
+
+ # Try to determine the LLVM version from llvm/Config/config.h
+ llvm_config = os.path.join(llvm_dir, 'include/llvm/Config/config.h')
+ if not os.path.exists(llvm_config):
+ print 'scons: could not find %s' % llvm_config
+ return
+ llvm_version_re = re.compile(r'^#define PACKAGE_VERSION "([^"]*)"')
+ llvm_version = None
+ for line in open(llvm_config, 'rt'):
+ mo = llvm_version_re.match(line)
+ if mo:
+ llvm_version = mo.group(1)
+ llvm_version = distutils.version.LooseVersion(llvm_version)
+ break
+ if llvm_version is None:
+ print 'scons: could not determine the LLVM version from %s' % llvm_config
+ return
+
+ if llvm_version >= distutils.version.LooseVersion('2.7'):
+ print 'scons: Ignoring unsupported LLVM version %s' % llvm_version
+ print 'scons: See http://www.llvm.org/bugs/show_bug.cgi?id=6429'
+ return
+
+ env.Prepend(CPPPATH = [os.path.join(llvm_dir, 'include')])
+ env.AppendUnique(CPPDEFINES = [
+ '__STDC_LIMIT_MACROS',
+ '__STDC_CONSTANT_MACROS',
+ 'HAVE_STDINT_H',
+ ])
+ env.Prepend(LIBPATH = [os.path.join(llvm_dir, 'lib')])
+ if llvm_version >= distutils.version.LooseVersion('2.7'):
+ # 2.7
+ env.Prepend(LIBS = [
+ 'LLVMLinker', 'LLVMipo', 'LLVMInterpreter',
+ 'LLVMInstrumentation', 'LLVMJIT', 'LLVMExecutionEngine',
+ 'LLVMBitWriter', 'LLVMX86Disassembler', 'LLVMX86AsmParser',
+ 'LLVMMCParser', 'LLVMX86AsmPrinter', 'LLVMX86CodeGen',
+ 'LLVMSelectionDAG', 'LLVMX86Info', 'LLVMAsmPrinter',
+ 'LLVMCodeGen', 'LLVMScalarOpts', 'LLVMInstCombine',
+ 'LLVMTransformUtils', 'LLVMipa', 'LLVMAsmParser',
+ 'LLVMArchive', 'LLVMBitReader', 'LLVMAnalysis', 'LLVMTarget',
+ 'LLVMMC', 'LLVMCore', 'LLVMSupport', 'LLVMSystem',
])
- env.Prepend(LIBPATH = [os.path.join(llvm_dir, 'lib')])
+ else:
+ # 2.6
env.Prepend(LIBS = [
- 'LLVMX86AsmParser',
- 'LLVMX86AsmPrinter',
- 'LLVMX86CodeGen',
- 'LLVMX86Info',
- 'LLVMLinker',
- 'LLVMipo',
- 'LLVMInterpreter',
- 'LLVMInstrumentation',
- 'LLVMJIT',
- 'LLVMExecutionEngine',
- 'LLVMDebugger',
- 'LLVMBitWriter',
- 'LLVMAsmParser',
- 'LLVMArchive',
- 'LLVMBitReader',
- 'LLVMSelectionDAG',
- 'LLVMAsmPrinter',
- 'LLVMCodeGen',
- 'LLVMScalarOpts',
- 'LLVMTransformUtils',
- 'LLVMipa',
- 'LLVMAnalysis',
- 'LLVMTarget',
- 'LLVMMC',
- 'LLVMCore',
- 'LLVMSupport',
+ 'LLVMX86AsmParser', 'LLVMX86AsmPrinter', 'LLVMX86CodeGen',
+ 'LLVMX86Info', 'LLVMLinker', 'LLVMipo', 'LLVMInterpreter',
+ 'LLVMInstrumentation', 'LLVMJIT', 'LLVMExecutionEngine',
+ 'LLVMDebugger', 'LLVMBitWriter', 'LLVMAsmParser',
+ 'LLVMArchive', 'LLVMBitReader', 'LLVMSelectionDAG',
+ 'LLVMAsmPrinter', 'LLVMCodeGen', 'LLVMScalarOpts',
+ 'LLVMTransformUtils', 'LLVMipa', 'LLVMAnalysis',
+ 'LLVMTarget', 'LLVMMC', 'LLVMCore', 'LLVMSupport',
'LLVMSystem',
- 'imagehlp',
- 'psapi',
])
- if env['msvc']:
- # Some of the LLVM C headers use the inline keyword without
- # defining it.
- env.Append(CPPDEFINES = [('inline', '__inline')])
- if env['debug']:
- # LLVM libraries are static, build with /MT, and they
- # automatically link agains LIBCMT. When we're doing a
- # debug build we'll be linking against LIBCMTD, so disable
- # that.
- env.Append(LINKFLAGS = ['/nodefaultlib:LIBCMT'])
- env['LLVM_VERSION'] = '2.6'
- return
+ env.Append(LIBS = [
+ 'imagehlp',
+ 'psapi',
+ ])
+ if env['msvc']:
+ # Some of the LLVM C headers use the inline keyword without
+ # defining it.
+ env.Append(CPPDEFINES = [('inline', '__inline')])
+ if env['debug']:
+ # LLVM libraries are static, build with /MT, and they
+ # automatically link agains LIBCMT. When we're doing a
+ # debug build we'll be linking against LIBCMTD, so disable
+ # that.
+ env.Append(LINKFLAGS = ['/nodefaultlib:LIBCMT'])
elif env.Detect('llvm-config'):
- version = env.backtick('llvm-config --version').rstrip()
+ llvm_version = env.backtick('llvm-config --version').rstrip()
+ llvm_version = distutils.version.LooseVersion(llvm_version)
+
+ if llvm_version >= distutils.version.LooseVersion('2.7'):
+ print 'scons: Ignoring unsupported LLVM version %s' % llvm_version
+ print 'scons: See http://www.llvm.org/bugs/show_bug.cgi?id=6429'
+ return
try:
env.ParseConfig('llvm-config --cppflags')
env.ParseConfig('llvm-config --libs jit interpreter nativecodegen bitwriter')
env.ParseConfig('llvm-config --ldflags')
except OSError:
- print 'llvm-config version %s failed' % version
+ print 'llvm-config version %s failed' % llvm_version
else:
- if env['platform'] == 'windows':
- env.Append(LIBS = ['imagehlp', 'psapi'])
env['LINK'] = env['CXX']
- env['LLVM_VERSION'] = version
+ else:
+ return
+
+ assert llvm_version is not None
+
+ print 'scons: Found LLVM version %s' % llvm_version
+ env['LLVM_VERSION'] = llvm_version
+
+ # Define HAVE_LLVM macro with the major/minor version number (e.g., 0x0206 for 2.6)
+ llvm_version_major = int(llvm_version.version[0])
+ llvm_version_minor = int(llvm_version.version[1])
+ llvm_version_hex = '0x%02x%02x' % (llvm_version_major, llvm_version_minor)
+ env.Prepend(CPPDEFINES = [('HAVE_LLVM', llvm_version_hex)])
def exists(env):
return True
diff --git a/src/gallium/auxiliary/Makefile b/src/gallium/auxiliary/Makefile
index 1d0930e024b..68b1a3e8546 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 \
diff --git a/src/gallium/auxiliary/SConscript b/src/gallium/auxiliary/SConscript
index f365c4bbdd6..d6185bcb5e3 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',
diff --git a/src/gallium/auxiliary/draw/draw_pt_decompose.h b/src/gallium/auxiliary/draw/draw_pt_decompose.h
index 4ca5b520204..3c44f7c11ee 100644
--- a/src/gallium/auxiliary/draw/draw_pt_decompose.h
+++ b/src/gallium/auxiliary/draw/draw_pt_decompose.h
@@ -105,40 +105,20 @@ static void FUNC( ARGS,
case PIPE_PRIM_QUADS:
- if (flatfirst) {
- for (i = 0; i+3 < count; i += 4) {
- QUAD( (i + 1),
- (i + 2),
- (i + 3),
- (i + 0) );
- }
- }
- else {
- for (i = 0; i+3 < count; i += 4) {
- QUAD( (i + 0),
- (i + 1),
- (i + 2),
- (i + 3));
- }
+ for (i = 0; i+3 < count; i += 4) {
+ QUAD( (i + 0),
+ (i + 1),
+ (i + 2),
+ (i + 3));
}
break;
case PIPE_PRIM_QUAD_STRIP:
- if (flatfirst) {
- for (i = 0; i+3 < count; i += 2) {
- QUAD( (i + 1),
- (i + 3),
- (i + 2),
- (i + 0) );
- }
- }
- else {
- for (i = 0; i+3 < count; i += 2) {
- QUAD( (i + 2),
- (i + 0),
- (i + 1),
- (i + 3));
- }
+ for (i = 0; i+3 < count; i += 2) {
+ QUAD( (i + 2),
+ (i + 0),
+ (i + 1),
+ (i + 3));
}
break;
diff --git a/src/gallium/auxiliary/draw/draw_pt_vcache_tmp.h b/src/gallium/auxiliary/draw/draw_pt_vcache_tmp.h
index 62822a3d562..7cba8547f15 100644
--- a/src/gallium/auxiliary/draw/draw_pt_vcache_tmp.h
+++ b/src/gallium/auxiliary/draw/draw_pt_vcache_tmp.h
@@ -118,39 +118,21 @@ static void FUNC( struct draw_pt_front_end *frontend,
case PIPE_PRIM_QUADS:
for (i = 0; i+3 < count; i += 4) {
- if (flatfirst) {
- QUAD( vcache,
- get_elt(elts, i + 0),
- get_elt(elts, i + 1),
- get_elt(elts, i + 2),
- get_elt(elts, i + 3) );
- }
- else {
- QUAD( vcache,
- get_elt(elts, i + 0),
- get_elt(elts, i + 1),
- get_elt(elts, i + 2),
- get_elt(elts, i + 3) );
- }
+ QUAD( vcache,
+ get_elt(elts, i + 0),
+ get_elt(elts, i + 1),
+ get_elt(elts, i + 2),
+ get_elt(elts, i + 3) );
}
break;
case PIPE_PRIM_QUAD_STRIP:
for (i = 0; i+3 < count; i += 2) {
- if (flatfirst) {
- QUAD( vcache,
- get_elt(elts, i + 0),
- get_elt(elts, i + 1),
- get_elt(elts, i + 3),
- get_elt(elts, i + 2) );
- }
- else {
- QUAD( vcache,
- get_elt(elts, i + 2),
- get_elt(elts, i + 0),
- get_elt(elts, i + 1),
- get_elt(elts, i + 3) );
- }
+ QUAD( vcache,
+ get_elt(elts, i + 2),
+ get_elt(elts, i + 0),
+ get_elt(elts, i + 1),
+ get_elt(elts, i + 3) );
}
break;
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
index bbce31f9eb2..32f9e5201c5 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 da84b7ca02d..55385e3a66a 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_logic.c b/src/gallium/auxiliary/gallivm/lp_bld_logic.c
index 41ac81b7441..2726747eaea 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 bc360ad77ad..4c61d107494 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 a133b56ac55..311c9f1b9e4 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];
}
@@ -136,8 +162,7 @@ lp_build_sample_offset(struct lp_build_context *bld,
const struct util_format_description *format_desc,
LLVMValueRef x,
LLVMValueRef y,
- LLVMValueRef y_stride,
- LLVMValueRef data_ptr)
+ LLVMValueRef y_stride)
{
LLVMValueRef x_stride;
LLVMValueRef offset;
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.h b/src/gallium/auxiliary/gallivm/lp_bld_sample.h
index 39edcf13d14..68db91d6fd6 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,
@@ -134,8 +148,7 @@ lp_build_sample_offset(struct lp_build_context *bld,
const struct util_format_description *format_desc,
LLVMValueRef x,
LLVMValueRef y,
- LLVMValueRef y_stride,
- LLVMValueRef data_ptr);
+ LLVMValueRef y_stride);
void
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
index e2688622829..1dca29cdd58 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,36 +83,135 @@ 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 data_array,
LLVMValueRef *texel)
{
+ struct lp_build_context *int_coord_bld = &bld->int_coord_bld;
LLVMValueRef offset;
LLVMValueRef packed;
+ LLVMValueRef use_border = NULL;
+ LLVMValueRef data_ptr;
+
+ /* 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");
+ }
+ }
+
+ /* XXX always use mipmap level 0 for now */
+ {
+ const int level = 0;
+ LLVMValueRef indexes[2];
+ indexes[0] = LLVMConstInt(LLVMInt32Type(), 0, 0);
+ indexes[1] = LLVMConstInt(LLVMInt32Type(), level, 0);
+ data_ptr = LLVMBuildGEP(bld->builder, data_array, indexes, 2, "");
+ data_ptr = LLVMBuildLoad(bld->builder, data_ptr, "");
+ }
+
+ /*
+ * 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);
+ x, y, y_stride);
assert(bld->format_desc->block.width == 1);
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]);
+ }
+ }
}
@@ -117,19 +220,31 @@ lp_build_sample_packed(struct lp_build_sample_context *bld,
LLVMValueRef x,
LLVMValueRef y,
LLVMValueRef y_stride,
- LLVMValueRef data_ptr)
+ LLVMValueRef data_array)
{
LLVMValueRef offset;
+ LLVMValueRef data_ptr;
- 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);
+ x, y, y_stride);
assert(bld->format_desc->block.width == 1);
assert(bld->format_desc->block.height == 1);
assert(bld->format_desc->block.bits <= bld->texel_type.width);
+ /* XXX always use mipmap level 0 for now */
+ {
+ const int level = 0;
+ LLVMValueRef indexes[2];
+ /* get data_ptr[level] */
+ indexes[0] = LLVMConstInt(LLVMInt32Type(), 0, 0);
+ indexes[1] = LLVMConstInt(LLVMInt32Type(), level, 0);
+ data_ptr = LLVMBuildGEP(bld->builder, data_array, indexes, 2, "");
+ /* load texture base address */
+ data_ptr = LLVMBuildLoad(bld->builder, data_ptr, "");
+ }
+
return lp_build_gather(bld->builder,
bld->texel_type.length,
bld->format_desc->block.bits,
@@ -138,17 +253,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_sample_wrap(struct lp_build_sample_context *bld,
- LLVMValueRef coord,
- LLVMValueRef length,
- boolean is_pot,
- unsigned wrap_mode)
+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_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 +336,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 +349,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 +361,380 @@ 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);
+ coord0 = NULL;
+ coord1 = NULL;
+ weight = NULL;
+ }
+
+ *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);
+ icoord = NULL;
+ }
+
+ return icoord;
+}
+
+
+/**
+ * Sample 2D texture with nearest filtering.
+ */
static void
lp_build_sample_2d_nearest_soa(struct lp_build_sample_context *bld,
LLVMValueRef s,
@@ -193,26 +742,28 @@ lp_build_sample_2d_nearest_soa(struct lp_build_sample_context *bld,
LLVMValueRef width,
LLVMValueRef height,
LLVMValueRef stride,
- LLVMValueRef data_ptr,
+ LLVMValueRef data_array,
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_array, texel);
}
+/**
+ * Sample 2D texture with bilinear filtering.
+ */
static void
lp_build_sample_2d_linear_soa(struct lp_build_sample_context *bld,
LLVMValueRef s,
@@ -220,12 +771,9 @@ lp_build_sample_2d_linear_soa(struct lp_build_sample_context *bld,
LLVMValueRef width,
LLVMValueRef height,
LLVMValueRef stride,
- LLVMValueRef data_ptr,
+ LLVMValueRef data_array,
LLVMValueRef *texel)
{
- LLVMValueRef half;
- LLVMValueRef s_ipart;
- LLVMValueRef t_ipart;
LLVMValueRef s_fpart;
LLVMValueRef t_fpart;
LLVMValueRef x0, x1;
@@ -233,32 +781,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);
-
- 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_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);
- 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_array, neighbors[0][0]);
+ lp_build_sample_texel_soa(bld, width, height, x1, y0, stride, data_array, neighbors[0][1]);
+ lp_build_sample_texel_soa(bld, width, height, x0, y1, stride, data_array, neighbors[1][0]);
+ lp_build_sample_texel_soa(bld, width, height, x1, y1, stride, data_array, neighbors[1][1]);
/* TODO: Don't interpolate missing channels */
for(chan = 0; chan < 4; ++chan) {
@@ -309,7 +840,7 @@ lp_build_sample_2d_linear_aos(struct lp_build_sample_context *bld,
LLVMValueRef width,
LLVMValueRef height,
LLVMValueRef stride,
- LLVMValueRef data_ptr,
+ LLVMValueRef data_array,
LLVMValueRef *texel)
{
LLVMBuilderRef builder = bld->builder;
@@ -334,20 +865,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 +899,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
@@ -432,10 +980,10 @@ lp_build_sample_2d_linear_aos(struct lp_build_sample_context *bld,
* The higher 8 bits of the resulting elements will be zero.
*/
- neighbors[0][0] = lp_build_sample_packed(bld, x0, y0, stride, data_ptr);
- neighbors[0][1] = lp_build_sample_packed(bld, x1, y0, stride, data_ptr);
- neighbors[1][0] = lp_build_sample_packed(bld, x0, y1, stride, data_ptr);
- neighbors[1][1] = lp_build_sample_packed(bld, x1, y1, stride, data_ptr);
+ neighbors[0][0] = lp_build_sample_packed(bld, x0, y0, stride, data_array);
+ neighbors[0][1] = lp_build_sample_packed(bld, x1, y0, stride, data_array);
+ neighbors[1][0] = lp_build_sample_packed(bld, x0, y1, stride, data_array);
+ neighbors[1][1] = lp_build_sample_packed(bld, x1, y1, stride, data_array);
neighbors[0][0] = LLVMBuildBitCast(builder, neighbors[0][0], u8n_vec_type, "");
neighbors[0][1] = LLVMBuildBitCast(builder, neighbors[0][1], u8n_vec_type, "");
@@ -518,6 +1066,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,
@@ -533,10 +1270,14 @@ lp_build_sample_soa(LLVMBuilderRef builder,
LLVMValueRef width;
LLVMValueRef height;
LLVMValueRef stride;
- LLVMValueRef data_ptr;
+ LLVMValueRef data_array;
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 +1286,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);
@@ -555,36 +1298,34 @@ lp_build_sample_soa(LLVMBuilderRef builder,
width = dynamic_state->width(dynamic_state, builder, unit);
height = dynamic_state->height(dynamic_state, builder, unit);
stride = dynamic_state->stride(dynamic_state, builder, unit);
- data_ptr = dynamic_state->data_ptr(dynamic_state, builder, unit);
+ data_array = dynamic_state->data_ptr(dynamic_state, builder, unit);
+ /* Note that data_array is an array[level] of pointers to texture images */
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_array, 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_array, 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_array, texel);
break;
default:
assert(0);
@@ -593,5 +1334,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 ae866243a92..fbb664d43a0 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
@@ -152,8 +152,7 @@ static void lp_exec_mask_init(struct lp_exec_mask *mask, struct lp_build_context
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;
+ mask->has_mask = (mask->cond_stack_size > 0);
}
static void lp_exec_mask_cond_push(struct lp_exec_mask *mask,
@@ -384,6 +383,11 @@ emit_store(
assert(0);
break;
+ case TGSI_FILE_PREDICATE:
+ /* FIXME */
+ assert(0);
+ break;
+
default:
assert( 0 );
}
@@ -581,6 +585,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 ) {
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_type.c b/src/gallium/auxiliary/gallivm/lp_bld_type.c
index 8270cd057f6..c327ba045a6 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 62ee05be4df..16946cc28a2 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/util/u_format.h b/src/gallium/auxiliary/util/u_format.h
index e8fa0022b5b..b2aa5bfb188 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_pack.py b/src/gallium/auxiliary/util/u_format_pack.py
index 3f33f7cc021..b49039db39b 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 250926418ec..f74dc5e88a4 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 4e29d15f3bb..fb68852a530 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 00000000000..182a4740448
--- /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 00000000000..2d4d9d5fa9d
--- /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_simple_screen.c b/src/gallium/auxiliary/util/u_simple_screen.c
index 53f3c16dbcc..9203cb6580c 100644
--- a/src/gallium/auxiliary/util/u_simple_screen.c
+++ b/src/gallium/auxiliary/util/u_simple_screen.c
@@ -59,22 +59,7 @@ pass_user_buffer_create(struct pipe_screen *screen,
return buffer;
}
-static struct pipe_buffer *
-pass_surface_buffer_create(struct pipe_screen *screen,
- unsigned width, unsigned height,
- enum pipe_format format,
- unsigned usage,
- unsigned tex_usage,
- unsigned *stride)
-{
- struct pipe_buffer *buffer =
- screen->winsys->surface_buffer_create(screen->winsys, width, height,
- format, usage, tex_usage, stride);
- buffer->screen = screen;
-
- return buffer;
-}
static void *
pass_buffer_map(struct pipe_screen *screen,
@@ -135,7 +120,6 @@ u_simple_screen_init(struct pipe_screen *screen)
{
screen->buffer_create = pass_buffer_create;
screen->user_buffer_create = pass_user_buffer_create;
- screen->surface_buffer_create = pass_surface_buffer_create;
screen->buffer_map = pass_buffer_map;
screen->buffer_unmap = pass_buffer_unmap;
diff --git a/src/gallium/docs/source/cso/sampler.rst b/src/gallium/docs/source/cso/sampler.rst
index 77979fc44d1..9bbb784de8e 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/i915/i915_context.h b/src/gallium/drivers/i915/i915_context.h
index da769e7b290..499a727314d 100644
--- a/src/gallium/drivers/i915/i915_context.h
+++ b/src/gallium/drivers/i915/i915_context.h
@@ -187,6 +187,9 @@ struct i915_sampler_state {
unsigned maxlod;
};
+#define I915_MAX_TEXTURE_2D_LEVELS 11 /* max 1024x1024 */
+#define I915_MAX_TEXTURE_3D_LEVELS 8 /* max 128x128x128 */
+
struct i915_texture {
struct pipe_texture base;
@@ -199,7 +202,7 @@ struct i915_texture {
unsigned sw_tiled; /**< tiled with software flags */
unsigned hw_tiled; /**< tiled with hardware fences */
- unsigned nr_images[PIPE_MAX_TEXTURE_LEVELS];
+ unsigned nr_images[I915_MAX_TEXTURE_2D_LEVELS];
/* Explicitly store the offset of each image for each cube face or
* depth value. Pretty much have to accept that hardware formats
@@ -207,7 +210,7 @@ struct i915_texture {
* compute the offsets of depth/cube images within a mipmap level,
* so have to store them as a lookup table:
*/
- unsigned *image_offset[PIPE_MAX_TEXTURE_LEVELS]; /**< array [depth] of offsets */
+ unsigned *image_offset[I915_MAX_TEXTURE_2D_LEVELS]; /**< array [depth] of offsets */
/* The data is held here:
*/
diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c
index 72bd2635506..e5bf4a20bd0 100644
--- a/src/gallium/drivers/i915/i915_screen.c
+++ b/src/gallium/drivers/i915/i915_screen.c
@@ -116,11 +116,11 @@ i915_get_param(struct pipe_screen *screen, int param)
case PIPE_CAP_TEXTURE_SHADOW_MAP:
return 1;
case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
- return 11; /* max 1024x1024 */
+ return I915_MAX_TEXTURE_2D_LEVELS;
case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
- return 8; /* max 128x128x128 */
+ return I915_MAX_TEXTURE_3D_LEVELS;
case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
- return 11; /* max 1024x1024 */
+ return I915_MAX_TEXTURE_2D_LEVELS;
case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT:
case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER:
return 1;
diff --git a/src/gallium/drivers/i915/i915_texture.c b/src/gallium/drivers/i915/i915_texture.c
index 7ba222c78b7..3ce52cdcdbd 100644
--- a/src/gallium/drivers/i915/i915_texture.c
+++ b/src/gallium/drivers/i915/i915_texture.c
@@ -96,7 +96,7 @@ i915_miptree_set_level_info(struct i915_texture *tex,
unsigned nr_images,
unsigned w, unsigned h, unsigned d)
{
- assert(level < PIPE_MAX_TEXTURE_LEVELS);
+ assert(level < Elements(tex->nr_images));
tex->nr_images[level] = nr_images;
@@ -219,12 +219,12 @@ i915_miptree_layout_2d(struct i915_texture *tex)
unsigned nblocksy = util_format_get_nblocksy(pt->format, pt->width0);
/* used for scanouts that need special layouts */
- if (pt->tex_usage & PIPE_TEXTURE_USAGE_PRIMARY)
+ if (pt->tex_usage & PIPE_TEXTURE_USAGE_SCANOUT)
if (i915_scanout_layout(tex))
return;
- /* for shared buffers we use something very like scanout */
- if (pt->tex_usage & PIPE_TEXTURE_USAGE_DISPLAY_TARGET)
+ /* shared buffers needs to be compatible with X servers */
+ if (pt->tex_usage & PIPE_TEXTURE_USAGE_SHARED)
if (i915_display_target_layout(tex))
return;
@@ -369,12 +369,12 @@ i945_miptree_layout_2d(struct i915_texture *tex)
unsigned nblocksy = util_format_get_nblocksy(pt->format, pt->height0);
/* used for scanouts that need special layouts */
- if (tex->base.tex_usage & PIPE_TEXTURE_USAGE_PRIMARY)
+ if (tex->base.tex_usage & PIPE_TEXTURE_USAGE_SCANOUT)
if (i915_scanout_layout(tex))
return;
- /* for shared buffers we use some very like scanout */
- if (tex->base.tex_usage & PIPE_TEXTURE_USAGE_DISPLAY_TARGET)
+ /* shared buffers needs to be compatible with X servers */
+ if (tex->base.tex_usage & PIPE_TEXTURE_USAGE_SHARED)
if (i915_display_target_layout(tex))
return;
@@ -642,7 +642,7 @@ i915_texture_create(struct pipe_screen *screen,
/* for scanouts and cursors, cursors arn't scanouts */
- if (templat->tex_usage & PIPE_TEXTURE_USAGE_PRIMARY && templat->width0 != 64)
+ if (templat->tex_usage & PIPE_TEXTURE_USAGE_SCANOUT && templat->width0 != 64)
buf_usage = INTEL_NEW_SCANOUT;
else
buf_usage = INTEL_NEW_TEXTURE;
@@ -673,19 +673,24 @@ fail:
}
static struct pipe_texture *
-i915_texture_blanket(struct pipe_screen * screen,
- const struct pipe_texture *base,
- const unsigned *stride,
- struct pipe_buffer *buffer)
+i915_texture_from_handle(struct pipe_screen * screen,
+ const struct pipe_texture *templat,
+ struct winsys_handle *whandle)
{
-#if 0
+ struct i915_screen *is = i915_screen(screen);
struct i915_texture *tex;
+ struct intel_winsys *iws = is->iws;
+ struct intel_buffer *buffer;
+ unsigned stride;
+
assert(screen);
+ buffer = iws->buffer_from_handle(iws, whandle, &stride);
+
/* Only supports one type */
- if (base->target != PIPE_TEXTURE_2D ||
- base->last_level != 0 ||
- base->depth0 != 1) {
+ if (templat->target != PIPE_TEXTURE_2D ||
+ templat->last_level != 0 ||
+ templat->depth0 != 1) {
return NULL;
}
@@ -693,23 +698,33 @@ i915_texture_blanket(struct pipe_screen * screen,
if (!tex)
return NULL;
- tex->base = *base;
+ tex->base = *templat;
pipe_reference_init(&tex->base.reference, 1);
tex->base.screen = screen;
- tex->stride = stride[0];
+ tex->stride = stride;
- i915_miptree_set_level_info(tex, 0, 1, base->width0, base->height0, 1);
+ i915_miptree_set_level_info(tex, 0, 1, templat->width0, templat->height0, 1);
i915_miptree_set_image_offset(tex, 0, 0, 0, 0);
- pipe_buffer_reference(&tex->buffer, buffer);
+ tex->buffer = buffer;
return &tex->base;
-#else
- return NULL;
-#endif
}
+static boolean
+i915_texture_get_handle(struct pipe_screen * screen,
+ struct pipe_texture *texture,
+ struct winsys_handle *whandle)
+{
+ struct i915_screen *is = i915_screen(screen);
+ struct i915_texture *tex = (struct i915_texture *)texture;
+ struct intel_winsys *iws = is->iws;
+
+ return iws->buffer_get_handle(iws, tex->buffer, whandle, tex->stride);
+}
+
+
static void
i915_texture_destroy(struct pipe_texture *pt)
{
@@ -723,7 +738,7 @@ i915_texture_destroy(struct pipe_texture *pt)
iws->buffer_destroy(iws, tex->buffer);
- for (i = 0; i < PIPE_MAX_TEXTURE_LEVELS; i++)
+ for (i = 0; i < Elements(tex->image_offset); i++)
if (tex->image_offset[i])
FREE(tex->image_offset[i]);
@@ -869,7 +884,8 @@ void
i915_init_screen_texture_functions(struct i915_screen *is)
{
is->base.texture_create = i915_texture_create;
- is->base.texture_blanket = i915_texture_blanket;
+ is->base.texture_from_handle = i915_texture_from_handle;
+ is->base.texture_get_handle = i915_texture_get_handle;
is->base.texture_destroy = i915_texture_destroy;
is->base.get_tex_surface = i915_get_tex_surface;
is->base.tex_surface_destroy = i915_tex_surface_destroy;
@@ -878,53 +894,3 @@ i915_init_screen_texture_functions(struct i915_screen *is)
is->base.transfer_unmap = i915_transfer_unmap;
is->base.tex_transfer_destroy = i915_tex_transfer_destroy;
}
-
-struct pipe_texture *
-i915_texture_blanket_intel(struct pipe_screen *screen,
- struct pipe_texture *base,
- unsigned stride,
- struct intel_buffer *buffer)
-{
- struct i915_texture *tex;
- assert(screen);
-
- /* Only supports one type */
- if (base->target != PIPE_TEXTURE_2D ||
- base->last_level != 0 ||
- base->depth0 != 1) {
- return NULL;
- }
-
- tex = CALLOC_STRUCT(i915_texture);
- if (!tex)
- return NULL;
-
- tex->base = *base;
- pipe_reference_init(&tex->base.reference, 1);
- tex->base.screen = screen;
-
- tex->stride = stride;
-
- i915_miptree_set_level_info(tex, 0, 1, base->width0, base->height0, 1);
- i915_miptree_set_image_offset(tex, 0, 0, 0, 0);
-
- tex->buffer = buffer;
-
- return &tex->base;
-}
-
-boolean
-i915_get_texture_buffer_intel(struct pipe_texture *texture,
- struct intel_buffer **buffer,
- unsigned *stride)
-{
- struct i915_texture *tex = (struct i915_texture *)texture;
-
- if (!texture)
- return FALSE;
-
- *stride = tex->stride;
- *buffer = tex->buffer;
-
- return TRUE;
-}
diff --git a/src/gallium/drivers/i915/intel_winsys.h b/src/gallium/drivers/i915/intel_winsys.h
index b3a802b0e29..00fd0c1efea 100644
--- a/src/gallium/drivers/i915/intel_winsys.h
+++ b/src/gallium/drivers/i915/intel_winsys.h
@@ -33,6 +33,7 @@ struct intel_buffer;
struct intel_batchbuffer;
struct pipe_texture;
struct pipe_fence_handle;
+struct winsys_handle;
enum intel_buffer_usage
{
@@ -129,6 +130,25 @@ struct intel_winsys {
enum intel_buffer_type type);
/**
+ * Creates a buffer from a handle.
+ * Used to implement pipe_screen::texture_from_handle.
+ * Also provides the stride information needed for the
+ * texture via the stride argument.
+ */
+ struct intel_buffer *(*buffer_from_handle)(struct intel_winsys *iws,
+ struct winsys_handle *whandle,
+ unsigned *stride);
+
+ /**
+ * Used to implement pipe_screen::texture_get_handle.
+ * The winsys might need the stride information.
+ */
+ boolean (*buffer_get_handle)(struct intel_winsys *iws,
+ struct intel_buffer *buffer,
+ struct winsys_handle *whandle,
+ unsigned stride);
+
+ /**
* Fence a buffer with a fence reg.
* Not to be confused with pipe_fence_handle.
*/
@@ -204,23 +224,4 @@ struct intel_winsys {
struct pipe_screen *i915_create_screen(struct intel_winsys *iws, unsigned pci_id);
-/**
- * Get the intel_winsys buffer backing the texture.
- *
- * TODO UGLY
- */
-boolean i915_get_texture_buffer_intel(struct pipe_texture *texture,
- struct intel_buffer **buffer,
- unsigned *stride);
-
-/**
- * Wrap a intel_winsys buffer with a texture blanket.
- *
- * TODO UGLY
- */
-struct pipe_texture * i915_texture_blanket_intel(struct pipe_screen *screen,
- struct pipe_texture *tmplt,
- unsigned pitch,
- struct intel_buffer *buffer);
-
#endif
diff --git a/src/gallium/drivers/i965/brw_screen.c b/src/gallium/drivers/i965/brw_screen.c
index 66f3aad8b21..cef83ffea80 100644
--- a/src/gallium/drivers/i965/brw_screen.c
+++ b/src/gallium/drivers/i965/brw_screen.c
@@ -174,11 +174,11 @@ brw_get_param(struct pipe_screen *screen, int param)
case PIPE_CAP_TEXTURE_SHADOW_MAP:
return 1;
case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
- return 11; /* max 1024x1024 */
+ return BRW_MAX_TEXTURE_2D_LEVELS;
case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
- return 8; /* max 128x128x128 */
+ return BRW_MAX_TEXTURE_3D_LEVELS;
case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
- return 11; /* max 1024x1024 */
+ return BRW_MAX_TEXTURE_2D_LEVELS;
case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT:
case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER:
return 1;
diff --git a/src/gallium/drivers/i965/brw_screen.h b/src/gallium/drivers/i965/brw_screen.h
index 7226d9228b7..e0f3cd2a9fe 100644
--- a/src/gallium/drivers/i965/brw_screen.h
+++ b/src/gallium/drivers/i965/brw_screen.h
@@ -100,6 +100,9 @@ struct brw_surface
};
+#define BRW_MAX_TEXTURE_2D_LEVELS 11 /* max 1024x1024 */
+#define BRW_MAX_TEXTURE_3D_LEVELS 8 /* max 128x128x128 */
+
struct brw_texture
{
@@ -107,9 +110,9 @@ struct brw_texture
struct brw_winsys_buffer *bo;
struct brw_surface_state ss;
- unsigned *image_offset[PIPE_MAX_TEXTURE_LEVELS];
- unsigned nr_images[PIPE_MAX_TEXTURE_LEVELS];
- unsigned level_offset[PIPE_MAX_TEXTURE_LEVELS];
+ unsigned *image_offset[BRW_MAX_TEXTURE_2D_LEVELS];
+ unsigned nr_images[BRW_MAX_TEXTURE_2D_LEVELS];
+ unsigned level_offset[BRW_MAX_TEXTURE_2D_LEVELS];
boolean compressed;
unsigned brw_target;
diff --git a/src/gallium/drivers/i965/brw_screen_texture.c b/src/gallium/drivers/i965/brw_screen_texture.c
index e38fdf1869b..cc79bfc7715 100644
--- a/src/gallium/drivers/i965/brw_screen_texture.c
+++ b/src/gallium/drivers/i965/brw_screen_texture.c
@@ -231,8 +231,8 @@ static struct pipe_texture *brw_texture_create( struct pipe_screen *screen,
goto fail;
- if (templ->tex_usage & (PIPE_TEXTURE_USAGE_DISPLAY_TARGET |
- PIPE_TEXTURE_USAGE_PRIMARY)) {
+ if (templ->tex_usage & (PIPE_TEXTURE_USAGE_SCANOUT |
+ PIPE_TEXTURE_USAGE_SHARED)) {
buffer_type = BRW_BUFFER_TYPE_SCANOUT;
}
else {
@@ -303,14 +303,121 @@ fail:
return NULL;
}
-static struct pipe_texture *brw_texture_blanket(struct pipe_screen *screen,
- const struct pipe_texture *templ,
- const unsigned *stride,
- struct pipe_buffer *buffer)
+static struct pipe_texture *
+brw_texture_from_handle(struct pipe_screen *screen,
+ const struct pipe_texture *templ,
+ struct winsys_handle *whandle)
{
+ struct brw_screen *bscreen = brw_screen(screen);
+ struct brw_texture *tex;
+ struct brw_winsys_buffer *buffer;
+ unsigned tiling;
+ unsigned pitch;
+
+ if (templ->target != PIPE_TEXTURE_2D ||
+ templ->last_level != 0 ||
+ templ->depth0 != 1)
+ return NULL;
+
+ if (util_format_is_compressed(templ->format))
+ return NULL;
+
+ tex = CALLOC_STRUCT(brw_texture);
+ if (!tex)
+ return NULL;
+
+ if (bscreen->sws->bo_from_handle(bscreen->sws, whandle, &pitch, &tiling, &buffer) != PIPE_OK)
+ goto fail;
+
+ memcpy(&tex->base, templ, sizeof *templ);
+ pipe_reference_init(&tex->base.reference, 1);
+ tex->base.screen = screen;
+
+ /* XXX: cpp vs. blocksize
+ */
+ tex->cpp = util_format_get_blocksize(tex->base.format);
+ tex->tiling = tiling;
+
+ make_empty_list(&tex->views[0]);
+ make_empty_list(&tex->views[1]);
+
+ if (!brw_texture_layout(bscreen, tex))
+ goto fail;
+
+ /* XXX Maybe some more checks? */
+ if ((pitch / tex->cpp) < tex->pitch)
+ goto fail;
+
+ tex->pitch = pitch / tex->cpp;
+
+ tex->bo = buffer;
+
+ /* fix this warning */
+#if 0
+ if (tex->size > buffer->size)
+ goto fail;
+#endif
+
+ tex->ss.ss0.mipmap_layout_mode = BRW_SURFACE_MIPMAPLAYOUT_BELOW;
+ tex->ss.ss0.surface_type = translate_tex_target(tex->base.target);
+ tex->ss.ss0.surface_format = translate_tex_format(tex->base.format);
+ assert(tex->ss.ss0.surface_format != BRW_SURFACEFORMAT_INVALID);
+
+ /* This is ok for all textures with channel width 8bit or less:
+ */
+/* tex->ss.ss0.data_return_format = BRW_SURFACERETURNFORMAT_S1; */
+
+
+ /* XXX: what happens when tex->bo->offset changes???
+ */
+ tex->ss.ss1.base_addr = 0; /* reloc */
+ tex->ss.ss2.mip_count = tex->base.last_level;
+ tex->ss.ss2.width = tex->base.width0 - 1;
+ tex->ss.ss2.height = tex->base.height0 - 1;
+
+ switch (tex->tiling) {
+ case BRW_TILING_NONE:
+ tex->ss.ss3.tiled_surface = 0;
+ tex->ss.ss3.tile_walk = 0;
+ break;
+ case BRW_TILING_X:
+ tex->ss.ss3.tiled_surface = 1;
+ tex->ss.ss3.tile_walk = BRW_TILEWALK_XMAJOR;
+ break;
+ case BRW_TILING_Y:
+ tex->ss.ss3.tiled_surface = 1;
+ tex->ss.ss3.tile_walk = BRW_TILEWALK_YMAJOR;
+ break;
+ }
+
+ tex->ss.ss3.pitch = (tex->pitch * tex->cpp) - 1;
+ tex->ss.ss3.depth = tex->base.depth0 - 1;
+
+ tex->ss.ss4.min_lod = 0;
+
+ return &tex->base;
+
+fail:
+ FREE(tex);
return NULL;
}
+static boolean
+brw_texture_get_handle(struct pipe_screen *screen,
+ struct pipe_texture *texture,
+ struct winsys_handle *whandle)
+{
+ struct brw_screen *bscreen = brw_screen(screen);
+ struct brw_texture *tex = brw_texture(texture);
+ unsigned stride;
+
+ stride = tex->pitch * tex->cpp;
+
+ return bscreen->sws->bo_get_handle(tex->bo, whandle, stride);
+}
+
+
+
static void brw_texture_destroy(struct pipe_texture *pt)
{
struct brw_texture *tex = brw_texture(pt);
@@ -451,127 +558,13 @@ brw_tex_transfer_destroy(struct pipe_transfer *trans)
}
-/*
- * Functions exported to the winsys
- */
-
-boolean brw_texture_get_winsys_buffer(struct pipe_texture *texture,
- struct brw_winsys_buffer **buffer,
- unsigned *stride)
-{
- struct brw_texture *tex = brw_texture(texture);
-
- *buffer = tex->bo;
- if (stride)
- *stride = tex->pitch * tex->cpp;
-
- return TRUE;
-}
-
-struct pipe_texture *
-brw_texture_blanket_winsys_buffer(struct pipe_screen *screen,
- const struct pipe_texture *templ,
- unsigned pitch,
- unsigned tiling,
- struct brw_winsys_buffer *buffer)
-{
- struct brw_screen *bscreen = brw_screen(screen);
- struct brw_texture *tex;
- GLuint format;
-
- if (templ->target != PIPE_TEXTURE_2D ||
- templ->last_level != 0 ||
- templ->depth0 != 1)
- return NULL;
-
- if (util_format_is_compressed(templ->format))
- return NULL;
-
- tex = CALLOC_STRUCT(brw_texture);
- if (!tex)
- return NULL;
-
- memcpy(&tex->base, templ, sizeof *templ);
- pipe_reference_init(&tex->base.reference, 1);
- tex->base.screen = screen;
-
- /* XXX: cpp vs. blocksize
- */
- tex->cpp = util_format_get_blocksize(tex->base.format);
- tex->tiling = tiling;
-
- make_empty_list(&tex->views[0]);
- make_empty_list(&tex->views[1]);
-
- if (!brw_texture_layout(bscreen, tex))
- goto fail;
-
- /* XXX Maybe some more checks? */
- if ((pitch / tex->cpp) < tex->pitch)
- goto fail;
-
- tex->pitch = pitch / tex->cpp;
-
- tex->bo = buffer;
-
- /* fix this warning */
-#if 0
- if (tex->size > buffer->size)
- goto fail;
-#endif
-
- tex->ss.ss0.mipmap_layout_mode = BRW_SURFACE_MIPMAPLAYOUT_BELOW;
- tex->ss.ss0.surface_type = translate_tex_target(tex->base.target);
-
- format = translate_tex_format(tex->base.format);
- assert(format != BRW_SURFACEFORMAT_INVALID);
- tex->ss.ss0.surface_format = format;
-
- /* This is ok for all textures with channel width 8bit or less:
- */
-/* tex->ss.ss0.data_return_format = BRW_SURFACERETURNFORMAT_S1; */
-
-
- /* XXX: what happens when tex->bo->offset changes???
- */
- tex->ss.ss1.base_addr = 0; /* reloc */
- tex->ss.ss2.mip_count = tex->base.last_level;
- tex->ss.ss2.width = tex->base.width0 - 1;
- tex->ss.ss2.height = tex->base.height0 - 1;
-
- switch (tex->tiling) {
- case BRW_TILING_NONE:
- tex->ss.ss3.tiled_surface = 0;
- tex->ss.ss3.tile_walk = 0;
- break;
- case BRW_TILING_X:
- tex->ss.ss3.tiled_surface = 1;
- tex->ss.ss3.tile_walk = BRW_TILEWALK_XMAJOR;
- break;
- case BRW_TILING_Y:
- tex->ss.ss3.tiled_surface = 1;
- tex->ss.ss3.tile_walk = BRW_TILEWALK_YMAJOR;
- break;
- }
-
- tex->ss.ss3.pitch = (tex->pitch * tex->cpp) - 1;
- tex->ss.ss3.depth = tex->base.depth0 - 1;
-
- tex->ss.ss4.min_lod = 0;
-
- return &tex->base;
-
-fail:
- FREE(tex);
- return NULL;
-}
-
void brw_screen_tex_init( struct brw_screen *brw_screen )
{
brw_screen->base.is_format_supported = brw_is_format_supported;
brw_screen->base.texture_create = brw_texture_create;
+ brw_screen->base.texture_from_handle = brw_texture_from_handle;
+ brw_screen->base.texture_get_handle = brw_texture_get_handle;
brw_screen->base.texture_destroy = brw_texture_destroy;
- brw_screen->base.texture_blanket = brw_texture_blanket;
brw_screen->base.get_tex_transfer = brw_get_tex_transfer;
brw_screen->base.transfer_map = brw_transfer_map;
brw_screen->base.transfer_unmap = brw_transfer_unmap;
diff --git a/src/gallium/drivers/i965/brw_winsys.h b/src/gallium/drivers/i965/brw_winsys.h
index c82d00f4a47..f30c7f18132 100644
--- a/src/gallium/drivers/i965/brw_winsys.h
+++ b/src/gallium/drivers/i965/brw_winsys.h
@@ -162,6 +162,16 @@ struct brw_winsys_screen {
unsigned alignment,
struct brw_winsys_buffer **bo_out);
+ enum pipe_error (*bo_from_handle)(struct brw_winsys_screen *sws,
+ struct winsys_handle *whandle,
+ unsigned *stride,
+ unsigned *tiling,
+ struct brw_winsys_buffer **bo_out);
+
+ enum pipe_error (*bo_get_handle)(struct brw_winsys_buffer *buffer,
+ struct winsys_handle *whandle,
+ unsigned stride);
+
/* Destroy a buffer when our refcount goes to zero:
*/
void (*bo_destroy)(struct brw_winsys_buffer *buffer);
@@ -257,28 +267,6 @@ bo_reference(struct brw_winsys_buffer **ptr, struct brw_winsys_buffer *buf)
struct pipe_screen *brw_create_screen(struct brw_winsys_screen *iws, unsigned pci_id);
-/**
- * Get the brw_winsys buffer backing the texture.
- *
- * TODO UGLY
- */
-struct pipe_texture;
-boolean brw_texture_get_winsys_buffer(struct pipe_texture *texture,
- struct brw_winsys_buffer **buffer,
- unsigned *stride);
-
-/**
- * Wrap a brw_winsys buffer with a texture blanket.
- *
- * TODO UGLY
- */
-struct pipe_texture *
-brw_texture_blanket_winsys_buffer(struct pipe_screen *screen,
- const struct pipe_texture *template,
- unsigned pitch,
- unsigned tiling,
- struct brw_winsys_buffer *buffer);
-
/*************************************************************************
* Cooperative dumping between winsys and driver. TODO: make this
diff --git a/src/gallium/drivers/identity/id_drm.c b/src/gallium/drivers/identity/id_drm.c
index f258c38cd71..936ccc444a8 100644
--- a/src/gallium/drivers/identity/id_drm.c
+++ b/src/gallium/drivers/identity/id_drm.c
@@ -63,62 +63,6 @@ identity_drm_create_screen(struct drm_api *_api, int fd,
return identity_screen_create(screen);
}
-
-static struct pipe_texture *
-identity_drm_texture_from_shared_handle(struct drm_api *_api,
- struct pipe_screen *_screen,
- struct pipe_texture *templ,
- const char *name,
- unsigned stride,
- unsigned handle)
-{
- struct identity_screen *id_screen = identity_screen(_screen);
- struct identity_drm_api *id_api = identity_drm_api(_api);
- struct pipe_screen *screen = id_screen->screen;
- struct drm_api *api = id_api->api;
- struct pipe_texture *result;
-
- result = api->texture_from_shared_handle(api, screen, templ, name, stride, handle);
-
- result = identity_texture_create(identity_screen(_screen), result);
-
- return result;
-}
-
-static boolean
-identity_drm_shared_handle_from_texture(struct drm_api *_api,
- struct pipe_screen *_screen,
- struct pipe_texture *_texture,
- unsigned *stride,
- unsigned *handle)
-{
- struct identity_screen *id_screen = identity_screen(_screen);
- struct identity_texture *id_texture = identity_texture(_texture);
- struct identity_drm_api *id_api = identity_drm_api(_api);
- struct pipe_screen *screen = id_screen->screen;
- struct pipe_texture *texture = id_texture->texture;
- struct drm_api *api = id_api->api;
-
- return api->shared_handle_from_texture(api, screen, texture, stride, handle);
-}
-
-static boolean
-identity_drm_local_handle_from_texture(struct drm_api *_api,
- struct pipe_screen *_screen,
- struct pipe_texture *_texture,
- unsigned *stride,
- unsigned *handle)
-{
- struct identity_screen *id_screen = identity_screen(_screen);
- struct identity_texture *id_texture = identity_texture(_texture);
- struct identity_drm_api *id_api = identity_drm_api(_api);
- struct pipe_screen *screen = id_screen->screen;
- struct pipe_texture *texture = id_texture->texture;
- struct drm_api *api = id_api->api;
-
- return api->local_handle_from_texture(api, screen, texture, stride, handle);
-}
-
static void
identity_drm_destroy(struct drm_api *_api)
{
@@ -145,9 +89,6 @@ identity_drm_create(struct drm_api *api)
id_api->base.name = api->name;
id_api->base.driver_name = api->driver_name;
id_api->base.create_screen = identity_drm_create_screen;
- id_api->base.texture_from_shared_handle = identity_drm_texture_from_shared_handle;
- id_api->base.shared_handle_from_texture = identity_drm_shared_handle_from_texture;
- id_api->base.local_handle_from_texture = identity_drm_local_handle_from_texture;
id_api->base.destroy = identity_drm_destroy;
id_api->api = api;
diff --git a/src/gallium/drivers/identity/id_screen.c b/src/gallium/drivers/identity/id_screen.c
index b85492114a3..b9d0f003d74 100644
--- a/src/gallium/drivers/identity/id_screen.c
+++ b/src/gallium/drivers/identity/id_screen.c
@@ -135,27 +135,40 @@ identity_screen_texture_create(struct pipe_screen *_screen,
}
static struct pipe_texture *
-identity_screen_texture_blanket(struct pipe_screen *_screen,
- const struct pipe_texture *templat,
- const unsigned *stride,
- struct pipe_buffer *_buffer)
+identity_screen_texture_from_handle(struct pipe_screen *_screen,
+ const struct pipe_texture *templ,
+ struct winsys_handle *handle)
{
struct identity_screen *id_screen = identity_screen(_screen);
- struct identity_buffer *id_buffer = identity_buffer(_buffer);
struct pipe_screen *screen = id_screen->screen;
- struct pipe_buffer *buffer = id_buffer->buffer;
struct pipe_texture *result;
- result = screen->texture_blanket(screen,
- templat,
- stride,
- buffer);
+ /* TODO trace call */
- if (result)
- return identity_texture_create(id_screen, result);
- return NULL;
+ result = screen->texture_from_handle(screen, templ, handle);
+
+ result = identity_texture_create(identity_screen(_screen), result);
+
+ return result;
+}
+
+static boolean
+identity_screen_texture_get_handle(struct pipe_screen *_screen,
+ struct pipe_texture *_texture,
+ struct winsys_handle *handle)
+{
+ struct identity_screen *id_screen = identity_screen(_screen);
+ struct identity_texture *id_texture = identity_texture(_texture);
+ struct pipe_screen *screen = id_screen->screen;
+ struct pipe_texture *texture = id_texture->texture;
+
+ /* TODO trace call */
+
+ return screen->texture_get_handle(screen, texture, handle);
}
+
+
static void
identity_screen_texture_destroy(struct pipe_texture *_texture)
{
@@ -298,31 +311,6 @@ identity_screen_user_buffer_create(struct pipe_screen *_screen,
return NULL;
}
-static struct pipe_buffer *
-identity_screen_surface_buffer_create(struct pipe_screen *_screen,
- unsigned width,
- unsigned height,
- enum pipe_format format,
- unsigned usage,
- unsigned tex_usage,
- unsigned *stride)
-{
- struct identity_screen *id_screen = identity_screen(_screen);
- struct pipe_screen *screen = id_screen->screen;
- struct pipe_buffer *result;
-
- result = screen->surface_buffer_create(screen,
- width,
- height,
- format,
- usage,
- tex_usage,
- stride);
-
- if (result)
- return identity_buffer_create(id_screen, result);
- return NULL;
-}
static void *
identity_screen_buffer_map(struct pipe_screen *_screen,
@@ -495,7 +483,8 @@ identity_screen_create(struct pipe_screen *screen)
id_screen->base.is_format_supported = identity_screen_is_format_supported;
id_screen->base.context_create = identity_screen_context_create;
id_screen->base.texture_create = identity_screen_texture_create;
- id_screen->base.texture_blanket = identity_screen_texture_blanket;
+ id_screen->base.texture_from_handle = identity_screen_texture_from_handle;
+ id_screen->base.texture_get_handle = identity_screen_texture_get_handle;
id_screen->base.texture_destroy = identity_screen_texture_destroy;
id_screen->base.get_tex_surface = identity_screen_get_tex_surface;
id_screen->base.tex_surface_destroy = identity_screen_tex_surface_destroy;
@@ -505,7 +494,6 @@ identity_screen_create(struct pipe_screen *screen)
id_screen->base.transfer_unmap = identity_screen_transfer_unmap;
id_screen->base.buffer_create = identity_screen_buffer_create;
id_screen->base.user_buffer_create = identity_screen_user_buffer_create;
- id_screen->base.surface_buffer_create = identity_screen_surface_buffer_create;
if (screen->buffer_map)
id_screen->base.buffer_map = identity_screen_buffer_map;
if (screen->buffer_map_range)
diff --git a/src/gallium/drivers/llvmpipe/lp_jit.c b/src/gallium/drivers/llvmpipe/lp_jit.c
index b666ffc8043..08c8f93794d 100644
--- a/src/gallium/drivers/llvmpipe/lp_jit.c
+++ b/src/gallium/drivers/llvmpipe/lp_jit.c
@@ -51,12 +51,16 @@ 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);
+ elem_types[LP_JIT_TEXTURE_DATA] =
+ LLVMArrayType(LLVMPointerType(LLVMInt8Type(), 0),
+ LP_MAX_TEXTURE_2D_LEVELS);
texture_type = LLVMStructType(elem_types, Elements(elem_types), 0);
@@ -66,6 +70,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);
diff --git a/src/gallium/drivers/llvmpipe/lp_jit.h b/src/gallium/drivers/llvmpipe/lp_jit.h
index 8df3015d4b4..5cc7a12c03b 100644
--- a/src/gallium/drivers/llvmpipe/lp_jit.h
+++ b/src/gallium/drivers/llvmpipe/lp_jit.h
@@ -39,6 +39,7 @@
#include "gallivm/lp_bld_struct.h"
#include "pipe/p_state.h"
+#include "lp_texture.h"
struct llvmpipe_screen;
@@ -48,14 +49,18 @@ struct lp_jit_texture
{
uint32_t width;
uint32_t height;
+ uint32_t depth;
+ uint32_t last_level;
uint32_t stride;
- const void *data;
+ const void *data[LP_MAX_TEXTURE_2D_LEVELS];
};
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 0f83eea6853..dd9a8e8856f 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.c
+++ b/src/gallium/drivers/llvmpipe/lp_rast.c
@@ -846,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_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index 6759e39e015..9bb3043320c 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -108,11 +108,11 @@ llvmpipe_get_param(struct pipe_screen *screen, int param)
case PIPE_CAP_TEXTURE_SHADOW_MAP:
return 1;
case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
- return 13; /* max 4Kx4K */
+ return LP_MAX_TEXTURE_2D_LEVELS;
case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
- return 9; /* max 256x256x256 */
+ return LP_MAX_TEXTURE_3D_LEVELS;
case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
- return 13; /* max 4Kx4K */
+ return LP_MAX_TEXTURE_2D_LEVELS;
case PIPE_CAP_TGSI_CONT_SUPPORTED:
return 1;
case PIPE_CAP_BLEND_EQUATION_SEPARATE:
@@ -239,18 +239,6 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen,
}
-static struct pipe_buffer *
-llvmpipe_surface_buffer_create(struct pipe_screen *screen,
- unsigned width, unsigned height,
- enum pipe_format format,
- unsigned tex_usage,
- unsigned usage,
- unsigned *stride)
-{
- /* This function should never be used */
- assert(0);
- return NULL;
-}
static void
@@ -310,7 +298,6 @@ llvmpipe_create_screen(struct sw_winsys *winsys)
screen->base.get_paramf = llvmpipe_get_paramf;
screen->base.is_format_supported = llvmpipe_is_format_supported;
- screen->base.surface_buffer_create = llvmpipe_surface_buffer_create;
screen->base.context_create = llvmpipe_create_context;
screen->base.flush_frontbuffer = llvmpipe_flush_frontbuffer;
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c
index fe60eb0437e..fbe14924cb1 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup.c
@@ -469,20 +469,28 @@ 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;
+ if (!lp_tex->dt) {
+ /* regular texture - setup array of mipmap level pointers */
+ int j;
+ for (j = 0; j < LP_MAX_TEXTURE_2D_LEVELS; j++) {
+ jit_tex->data[j] =
+ (ubyte *) lp_tex->data + lp_tex->level_offset[j];
+ }
}
else {
+ /* display target texture/surface */
/*
* XXX: Where should this be unmapped?
*/
struct llvmpipe_screen *screen = llvmpipe_screen(tex->screen);
struct sw_winsys *winsys = screen->winsys;
- jit_tex->data = winsys->displaytarget_map(winsys, lp_tex->dt,
+ jit_tex->data[0] = winsys->displaytarget_map(winsys, lp_tex->dt,
PIPE_BUFFER_USAGE_CPU_READ);
- assert(jit_tex->data);
+ assert(jit_tex->data[0]);
}
/* the scene references this texture */
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c b/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c
index 24291da91e4..671e74465c0 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c
@@ -231,57 +231,29 @@ lp_setup_draw(struct vbuf_render *vbr, const ushort *indices, uint nr)
break;
case PIPE_PRIM_QUADS:
- if (setup->flatshade_first) {
- for (i = 3; i < nr; i += 4) {
- setup->triangle( setup,
- get_vert(vertex_buffer, indices[i-2], stride),
- get_vert(vertex_buffer, indices[i-1], stride),
- get_vert(vertex_buffer, indices[i-3], stride) );
- setup->triangle( setup,
- get_vert(vertex_buffer, indices[i-1], stride),
- get_vert(vertex_buffer, indices[i-0], stride),
- get_vert(vertex_buffer, indices[i-3], stride) );
- }
- }
- else {
- for (i = 3; i < nr; i += 4) {
- setup->triangle( setup,
- get_vert(vertex_buffer, indices[i-3], stride),
- get_vert(vertex_buffer, indices[i-2], stride),
- get_vert(vertex_buffer, indices[i-0], stride) );
+ for (i = 3; i < nr; i += 4) {
+ setup->triangle( setup,
+ get_vert(vertex_buffer, indices[i-3], stride),
+ get_vert(vertex_buffer, indices[i-2], stride),
+ get_vert(vertex_buffer, indices[i-0], stride) );
- setup->triangle( setup,
- get_vert(vertex_buffer, indices[i-2], stride),
- get_vert(vertex_buffer, indices[i-1], stride),
- get_vert(vertex_buffer, indices[i-0], stride) );
- }
+ setup->triangle( setup,
+ get_vert(vertex_buffer, indices[i-2], stride),
+ get_vert(vertex_buffer, indices[i-1], stride),
+ get_vert(vertex_buffer, indices[i-0], stride) );
}
break;
case PIPE_PRIM_QUAD_STRIP:
- if (setup->flatshade_first) {
- for (i = 3; i < nr; i += 2) {
- setup->triangle( setup,
- get_vert(vertex_buffer, indices[i-0], stride),
- get_vert(vertex_buffer, indices[i-1], stride),
- get_vert(vertex_buffer, indices[i-3], stride));
- setup->triangle( setup,
- get_vert(vertex_buffer, indices[i-2], stride),
- get_vert(vertex_buffer, indices[i-0], stride),
- get_vert(vertex_buffer, indices[i-3], stride) );
- }
- }
- else {
- for (i = 3; i < nr; i += 2) {
- setup->triangle( setup,
- get_vert(vertex_buffer, indices[i-3], stride),
- get_vert(vertex_buffer, indices[i-2], stride),
- get_vert(vertex_buffer, indices[i-0], stride) );
- setup->triangle( setup,
- get_vert(vertex_buffer, indices[i-1], stride),
- get_vert(vertex_buffer, indices[i-3], stride),
- get_vert(vertex_buffer, indices[i-0], stride) );
- }
+ for (i = 3; i < nr; i += 2) {
+ setup->triangle( setup,
+ get_vert(vertex_buffer, indices[i-3], stride),
+ get_vert(vertex_buffer, indices[i-2], stride),
+ get_vert(vertex_buffer, indices[i-0], stride) );
+ setup->triangle( setup,
+ get_vert(vertex_buffer, indices[i-1], stride),
+ get_vert(vertex_buffer, indices[i-3], stride),
+ get_vert(vertex_buffer, indices[i-0], stride) );
}
break;
@@ -415,57 +387,28 @@ lp_setup_draw_arrays(struct vbuf_render *vbr, uint start, uint nr)
break;
case PIPE_PRIM_QUADS:
- if (setup->flatshade_first) {
- for (i = 3; i < nr; i += 4) {
- setup->triangle( setup,
- get_vert(vertex_buffer, i-2, stride),
- get_vert(vertex_buffer, i-1, stride),
- get_vert(vertex_buffer, i-3, stride) );
- setup->triangle( setup,
- get_vert(vertex_buffer, i-1, stride),
- get_vert(vertex_buffer, i-0, stride),
- get_vert(vertex_buffer, i-3, stride) );
- }
- }
- else {
- for (i = 3; i < nr; i += 4) {
- setup->triangle( setup,
- get_vert(vertex_buffer, i-3, stride),
- get_vert(vertex_buffer, i-2, stride),
- get_vert(vertex_buffer, i-0, stride) );
- setup->triangle( setup,
- get_vert(vertex_buffer, i-2, stride),
- get_vert(vertex_buffer, i-1, stride),
- get_vert(vertex_buffer, i-0, stride) );
- }
+ for (i = 3; i < nr; i += 4) {
+ setup->triangle( setup,
+ get_vert(vertex_buffer, i-3, stride),
+ get_vert(vertex_buffer, i-2, stride),
+ get_vert(vertex_buffer, i-0, stride) );
+ setup->triangle( setup,
+ get_vert(vertex_buffer, i-2, stride),
+ get_vert(vertex_buffer, i-1, stride),
+ get_vert(vertex_buffer, i-0, stride) );
}
break;
case PIPE_PRIM_QUAD_STRIP:
- if (setup->flatshade_first) {
- for (i = 3; i < nr; i += 2) {
- setup->triangle( setup,
- get_vert(vertex_buffer, i-0, stride),
- get_vert(vertex_buffer, i-1, stride),
- get_vert(vertex_buffer, i-3, stride) );
- setup->triangle( setup,
-
- get_vert(vertex_buffer, i-2, stride),
- get_vert(vertex_buffer, i-0, stride),
- get_vert(vertex_buffer, i-3, stride) );
- }
- }
- else {
- for (i = 3; i < nr; i += 2) {
- setup->triangle( setup,
- get_vert(vertex_buffer, i-3, stride),
- get_vert(vertex_buffer, i-2, stride),
- get_vert(vertex_buffer, i-0, stride) );
- setup->triangle( setup,
- get_vert(vertex_buffer, i-1, stride),
- get_vert(vertex_buffer, i-3, stride),
- get_vert(vertex_buffer, i-0, stride) );
- }
+ for (i = 3; i < nr; i += 2) {
+ setup->triangle( setup,
+ get_vert(vertex_buffer, i-3, stride),
+ get_vert(vertex_buffer, i-2, stride),
+ get_vert(vertex_buffer, i-0, stride) );
+ setup->triangle( setup,
+ get_vert(vertex_buffer, i-1, stride),
+ get_vert(vertex_buffer, i-3, stride),
+ get_vert(vertex_buffer, i-0, stride) );
}
break;
diff --git a/src/gallium/drivers/llvmpipe/lp_tex_sample_llvm.c b/src/gallium/drivers/llvmpipe/lp_tex_sample_llvm.c
index 2533275dc18..5a3cf37d6d8 100644
--- a/src/gallium/drivers/llvmpipe/lp_tex_sample_llvm.c
+++ b/src/gallium/drivers/llvmpipe/lp_tex_sample_llvm.c
@@ -51,10 +51,11 @@
/**
- * This provides the bridge between the sampler state store in lp_jit_context
- * and lp_jit_texture and the sampler code generator. It provides the
- * texture layout information required by the texture sampler code generator
- * in terms of the state stored in lp_jit_context and lp_jit_texture in runtime.
+ * This provides the bridge between the sampler state store in
+ * lp_jit_context and lp_jit_texture and the sampler code
+ * generator. It provides the texture layout information required by
+ * the texture sampler code generator in terms of the state stored in
+ * lp_jit_context and lp_jit_texture in runtime.
*/
struct llvmpipe_sampler_dynamic_state
{
@@ -79,6 +80,9 @@ struct lp_llvm_sampler_soa
/**
* Fetch the specified member of the lp_jit_texture structure.
+ * \param emit_load if TRUE, emit the LLVM load instruction to actually
+ * fetch the field's value. Otherwise, just emit the
+ * GEP code to address the field.
*
* @sa http://llvm.org/docs/GetElementPtr.html
*/
@@ -87,9 +91,11 @@ lp_llvm_texture_member(struct lp_sampler_dynamic_state *base,
LLVMBuilderRef builder,
unsigned unit,
unsigned member_index,
- const char *member_name)
+ const char *member_name,
+ boolean emit_load)
{
- struct llvmpipe_sampler_dynamic_state *state = (struct llvmpipe_sampler_dynamic_state *)base;
+ struct llvmpipe_sampler_dynamic_state *state =
+ (struct llvmpipe_sampler_dynamic_state *)base;
LLVMValueRef indices[4];
LLVMValueRef ptr;
LLVMValueRef res;
@@ -107,7 +113,10 @@ lp_llvm_texture_member(struct lp_sampler_dynamic_state *base,
ptr = LLVMBuildGEP(builder, state->context_ptr, indices, Elements(indices), "");
- res = LLVMBuildLoad(builder, ptr, "");
+ if (emit_load)
+ res = LLVMBuildLoad(builder, ptr, "");
+ else
+ res = ptr;
lp_build_name(res, "context.texture%u.%s", unit, member_name);
@@ -116,26 +125,30 @@ lp_llvm_texture_member(struct lp_sampler_dynamic_state *base,
/**
- * Helper macro to instantiate the functions that generate the code to fetch
- * the members of lp_jit_texture to fulfill the sampler code generator requests.
+ * Helper macro to instantiate the functions that generate the code to
+ * fetch the members of lp_jit_texture to fulfill the sampler code
+ * generator requests.
*
- * This complexity is the price we have to pay to keep the texture sampler code
- * generator a reusable module without dependencies to llvmpipe internals.
+ * This complexity is the price we have to pay to keep the texture
+ * sampler code generator a reusable module without dependencies to
+ * llvmpipe internals.
*/
-#define LP_LLVM_TEXTURE_MEMBER(_name, _index) \
+#define LP_LLVM_TEXTURE_MEMBER(_name, _index, _emit_load) \
static LLVMValueRef \
lp_llvm_texture_##_name( struct lp_sampler_dynamic_state *base, \
LLVMBuilderRef builder, \
unsigned unit) \
{ \
- return lp_llvm_texture_member(base, builder, unit, _index, #_name ); \
+ return lp_llvm_texture_member(base, builder, unit, _index, #_name, _emit_load ); \
}
-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, TRUE)
+LP_LLVM_TEXTURE_MEMBER(height, LP_JIT_TEXTURE_HEIGHT, TRUE)
+LP_LLVM_TEXTURE_MEMBER(depth, LP_JIT_TEXTURE_DEPTH, TRUE)
+LP_LLVM_TEXTURE_MEMBER(last_level, LP_JIT_TEXTURE_LAST_LEVEL, TRUE)
+LP_LLVM_TEXTURE_MEMBER(stride, LP_JIT_TEXTURE_STRIDE, TRUE)
+LP_LLVM_TEXTURE_MEMBER(data_ptr, LP_JIT_TEXTURE_DATA, FALSE)
static void
@@ -145,6 +158,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 +202,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/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c
index ac3d62dc967..74b7b4ec5e1 100644
--- a/src/gallium/drivers/llvmpipe/lp_texture.c
+++ b/src/gallium/drivers/llvmpipe/lp_texture.c
@@ -125,7 +125,8 @@ llvmpipe_texture_create(struct pipe_screen *_screen,
lpt->base.screen = &screen->base;
if (lpt->base.tex_usage & (PIPE_TEXTURE_USAGE_DISPLAY_TARGET |
- PIPE_TEXTURE_USAGE_PRIMARY)) {
+ PIPE_TEXTURE_USAGE_SCANOUT |
+ PIPE_TEXTURE_USAGE_SHARED)) {
if (!llvmpipe_displaytarget_layout(screen, lpt))
goto fail;
}
@@ -142,43 +143,6 @@ llvmpipe_texture_create(struct pipe_screen *_screen,
}
-static struct pipe_texture *
-llvmpipe_texture_blanket(struct pipe_screen * screen,
- const struct pipe_texture *base,
- const unsigned *stride,
- struct pipe_buffer *buffer)
-{
- /* FIXME */
-#if 0
- struct llvmpipe_texture *lpt;
- assert(screen);
-
- /* Only supports one type */
- if (base->target != PIPE_TEXTURE_2D ||
- base->last_level != 0 ||
- base->depth0 != 1) {
- return NULL;
- }
-
- lpt = CALLOC_STRUCT(llvmpipe_texture);
- if (!lpt)
- return NULL;
-
- lpt->base = *base;
- pipe_reference_init(&lpt->base.reference, 1);
- lpt->base.screen = screen;
- lpt->stride[0] = stride[0];
-
- pipe_buffer_reference(&lpt->buffer, buffer);
-
- return &lpt->base;
-#else
- debug_printf("llvmpipe_texture_blanket() not implemented!");
- return NULL;
-#endif
-}
-
-
static void
llvmpipe_texture_destroy(struct pipe_texture *pt)
{
@@ -408,7 +372,6 @@ void
llvmpipe_init_screen_texture_funcs(struct pipe_screen *screen)
{
screen->texture_create = llvmpipe_texture_create;
- screen->texture_blanket = llvmpipe_texture_blanket;
screen->texture_destroy = llvmpipe_texture_destroy;
screen->get_tex_surface = llvmpipe_get_tex_surface;
diff --git a/src/gallium/drivers/llvmpipe/lp_texture.h b/src/gallium/drivers/llvmpipe/lp_texture.h
index 6a6d9f9222f..b23f929b167 100644
--- a/src/gallium/drivers/llvmpipe/lp_texture.h
+++ b/src/gallium/drivers/llvmpipe/lp_texture.h
@@ -32,6 +32,10 @@
#include "pipe/p_state.h"
+#define LP_MAX_TEXTURE_2D_LEVELS 13 /* 4K x 4K for now */
+#define LP_MAX_TEXTURE_3D_LEVELS 10 /* 512 x 512 x 512 for now */
+
+
struct pipe_context;
struct pipe_screen;
struct llvmpipe_context;
@@ -43,8 +47,8 @@ struct llvmpipe_texture
{
struct pipe_texture base;
- unsigned long level_offset[PIPE_MAX_TEXTURE_LEVELS];
- unsigned stride[PIPE_MAX_TEXTURE_LEVELS];
+ unsigned long level_offset[LP_MAX_TEXTURE_2D_LEVELS];
+ unsigned stride[LP_MAX_TEXTURE_2D_LEVELS];
/**
* Display target, for textures with the PIPE_TEXTURE_USAGE_DISPLAY_TARGET
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c
index 3c2f771b51e..f7d10a591f6 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.c
+++ b/src/gallium/drivers/nouveau/nouveau_screen.c
@@ -4,6 +4,7 @@
#include "util/u_memory.h"
#include "util/u_inlines.h"
+#include "util/u_format.h"
#include <stdio.h>
#include <errno.h>
@@ -12,6 +13,9 @@
#include "nouveau_winsys.h"
#include "nouveau_screen.h"
+/* XXX this should go away */
+#include "state_tracker/drm_api.h"
+
static const char *
nouveau_screen_get_name(struct pipe_screen *pscreen)
{
@@ -231,6 +235,72 @@ nouveau_screen_fence_finish(struct pipe_screen *screen,
return 0;
}
+
+/*
+ * Both texture_{from|get}_handle use drm api defines directly which they
+ * shouldn't do. The problem is that from|get are pipe functions and as
+ * such they should be defined in the pipe level. If nouveau had a propper
+ * winsys interface we would have added from|get to that interface using
+ * the winsys_handle struct as done with other drivers. However this code
+ * calls directly into the libdrm_nouveau.so functions (nouveau_bo_*). So
+ * we need to translate the handle into something they understand.
+ */
+static struct pipe_texture *
+nouveau_screen_texture_from_handle(struct pipe_screen *pscreen,
+ const struct pipe_texture *templ,
+ struct winsys_handle *whandle)
+{
+ struct nouveau_device *dev = nouveau_screen(pscreen)->device;
+ struct pipe_texture *pt;
+ struct pipe_buffer *pb;
+ int ret;
+
+ pb = CALLOC(1, sizeof(struct pipe_buffer) + sizeof(struct nouveau_bo*));
+ if (!pb)
+ return NULL;
+
+ ret = nouveau_bo_handle_ref(dev, whandle->handle, (struct nouveau_bo**)(pb+1));
+ if (ret) {
+ debug_printf("%s: ref name 0x%08x failed with %d\n",
+ __func__, whandle->handle, ret);
+ FREE(pb);
+ return NULL;
+ }
+
+ pipe_reference_init(&pb->reference, 1);
+ pb->screen = pscreen;
+ pb->alignment = 0;
+ pb->usage = PIPE_BUFFER_USAGE_GPU_READ_WRITE |
+ PIPE_BUFFER_USAGE_CPU_READ_WRITE;
+ pb->size = nouveau_bo(pb)->size;
+ pt = nouveau_screen(pscreen)->texture_blanket(pscreen, templ,
+ &whandle->stride, pb);
+ pipe_buffer_reference(&pb, NULL);
+ return pt;
+}
+
+static boolean
+nouveau_screen_texture_get_handle(struct pipe_screen *pscreen,
+ struct pipe_texture *pt,
+ struct winsys_handle *whandle)
+{
+ struct nouveau_miptree *mt = nouveau_miptree(pt);
+
+ if (!mt || !mt->bo)
+ return false;
+
+ whandle->stride = util_format_get_stride(mt->base.format, mt->base.width0);
+
+ if (whandle->type == DRM_API_HANDLE_TYPE_SHARED) {
+ return nouveau_bo_handle_get(mt->bo, &whandle->handle) == 0;
+ } else if (whandle->type == DRM_API_HANDLE_TYPE_KMS) {
+ whandle->handle = mt->bo->handle;
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
+
int
nouveau_screen_init(struct nouveau_screen *screen, struct nouveau_device *dev)
{
@@ -258,6 +328,9 @@ nouveau_screen_init(struct nouveau_screen *screen, struct nouveau_device *dev)
pscreen->fence_signalled = nouveau_screen_fence_signalled;
pscreen->fence_finish = nouveau_screen_fence_finish;
+ pscreen->texture_from_handle = nouveau_screen_texture_from_handle;
+ pscreen->texture_get_handle = nouveau_screen_texture_get_handle;
+
return 0;
}
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.h b/src/gallium/drivers/nouveau/nouveau_screen.h
index a7927d88dfc..f4a7a2bc234 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.h
+++ b/src/gallium/drivers/nouveau/nouveau_screen.h
@@ -6,6 +6,18 @@ struct nouveau_screen {
struct nouveau_device *device;
struct nouveau_channel *channel;
+ /**
+ * Create a new texture object, using the given template info, but on top of
+ * existing memory.
+ *
+ * It is assumed that the buffer data is layed out according to the expected
+ * by the hardware. NULL will be returned if any inconsistency is found.
+ */
+ struct pipe_texture * (*texture_blanket)(struct pipe_screen *,
+ const struct pipe_texture *templat,
+ const unsigned *stride,
+ struct pipe_buffer *buffer);
+
int (*pre_pipebuffer_map_callback) (struct pipe_screen *pscreen,
struct pipe_buffer *pb, unsigned usage);
};
diff --git a/src/gallium/drivers/nv30/nv30_miptree.c b/src/gallium/drivers/nv30/nv30_miptree.c
index 697b1b92ff6..5ef74a832dc 100644
--- a/src/gallium/drivers/nv30/nv30_miptree.c
+++ b/src/gallium/drivers/nv30/nv30_miptree.c
@@ -18,7 +18,7 @@ nv30_miptree_layout(struct nv30_miptree *nv30mt)
PIPE_TEXTURE_USAGE_DEPTH_STENCIL |
PIPE_TEXTURE_USAGE_RENDER_TARGET |
PIPE_TEXTURE_USAGE_DISPLAY_TARGET |
- PIPE_TEXTURE_USAGE_PRIMARY);
+ PIPE_TEXTURE_USAGE_SCANOUT);
if (pt->target == PIPE_TEXTURE_CUBE) {
nr_faces = 6;
@@ -78,7 +78,7 @@ nv30_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *pt)
pt->height0 & (pt->height0 - 1))
mt->base.tex_usage |= NOUVEAU_TEXTURE_USAGE_LINEAR;
else
- if (pt->tex_usage & (PIPE_TEXTURE_USAGE_PRIMARY |
+ if (pt->tex_usage & (PIPE_TEXTURE_USAGE_SCANOUT |
PIPE_TEXTURE_USAGE_DISPLAY_TARGET |
PIPE_TEXTURE_USAGE_DEPTH_STENCIL))
mt->base.tex_usage |= NOUVEAU_TEXTURE_USAGE_LINEAR;
@@ -232,8 +232,9 @@ void
nv30_screen_init_miptree_functions(struct pipe_screen *pscreen)
{
pscreen->texture_create = nv30_miptree_create;
- pscreen->texture_blanket = nv30_miptree_blanket;
pscreen->texture_destroy = nv30_miptree_destroy;
pscreen->get_tex_surface = nv30_miptree_surface_new;
pscreen->tex_surface_destroy = nv30_miptree_surface_del;
+
+ nouveau_screen(pscreen)->texture_blanket = nv50_miptree_blanket;
}
diff --git a/src/gallium/drivers/nv30/nv30_state.h b/src/gallium/drivers/nv30/nv30_state.h
index e42e872de75..66c26360cb2 100644
--- a/src/gallium/drivers/nv30/nv30_state.h
+++ b/src/gallium/drivers/nv30/nv30_state.h
@@ -70,6 +70,8 @@ struct nv30_fragment_program {
struct nouveau_stateobj *so;
};
+#define NV30_MAX_TEXTURE_LEVELS 16
+
struct nv30_miptree {
struct pipe_texture base;
struct nouveau_bo *bo;
@@ -80,7 +82,7 @@ struct nv30_miptree {
struct {
uint pitch;
uint *image_offset;
- } level[PIPE_MAX_TEXTURE_LEVELS];
+ } level[NV30_MAX_TEXTURE_LEVELS];
};
#endif
diff --git a/src/gallium/drivers/nv40/nv40_miptree.c b/src/gallium/drivers/nv40/nv40_miptree.c
index 85d7e1f1972..62e97bcea48 100644
--- a/src/gallium/drivers/nv40/nv40_miptree.c
+++ b/src/gallium/drivers/nv40/nv40_miptree.c
@@ -20,7 +20,7 @@ nv40_miptree_layout(struct nv40_miptree *mt)
PIPE_TEXTURE_USAGE_DEPTH_STENCIL |
PIPE_TEXTURE_USAGE_RENDER_TARGET |
PIPE_TEXTURE_USAGE_DISPLAY_TARGET |
- PIPE_TEXTURE_USAGE_PRIMARY);
+ PIPE_TEXTURE_USAGE_SCANOUT);
if (pt->target == PIPE_TEXTURE_CUBE) {
nr_faces = 6;
@@ -80,7 +80,7 @@ nv40_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *pt)
pt->height0 & (pt->height0 - 1))
mt->base.tex_usage |= NOUVEAU_TEXTURE_USAGE_LINEAR;
else
- if (pt->tex_usage & (PIPE_TEXTURE_USAGE_PRIMARY |
+ if (pt->tex_usage & (PIPE_TEXTURE_USAGE_SCANOUT |
PIPE_TEXTURE_USAGE_DISPLAY_TARGET |
PIPE_TEXTURE_USAGE_DEPTH_STENCIL))
mt->base.tex_usage |= NOUVEAU_TEXTURE_USAGE_LINEAR;
@@ -227,9 +227,10 @@ void
nv40_screen_init_miptree_functions(struct pipe_screen *pscreen)
{
pscreen->texture_create = nv40_miptree_create;
- pscreen->texture_blanket = nv40_miptree_blanket;
pscreen->texture_destroy = nv40_miptree_destroy;
pscreen->get_tex_surface = nv40_miptree_surface_new;
pscreen->tex_surface_destroy = nv40_miptree_surface_del;
+
+ nouveau_screen(pscreen)->texture_blanket = nv40_miptree_blanket;
}
diff --git a/src/gallium/drivers/nv40/nv40_state.h b/src/gallium/drivers/nv40/nv40_state.h
index 192074e7471..e2e69420eae 100644
--- a/src/gallium/drivers/nv40/nv40_state.h
+++ b/src/gallium/drivers/nv40/nv40_state.h
@@ -73,6 +73,8 @@ struct nv40_fragment_program {
struct nouveau_stateobj *so;
};
+#define NV40_MAX_TEXTURE_LEVELS 16
+
struct nv40_miptree {
struct pipe_texture base;
struct nouveau_bo *bo;
@@ -83,7 +85,7 @@ struct nv40_miptree {
struct {
uint pitch;
uint *image_offset;
- } level[PIPE_MAX_TEXTURE_LEVELS];
+ } level[NV40_MAX_TEXTURE_LEVELS];
};
#endif
diff --git a/src/gallium/drivers/nv50/nv50_context.h b/src/gallium/drivers/nv50/nv50_context.h
index c540594b949..044437e75fa 100644
--- a/src/gallium/drivers/nv50/nv50_context.h
+++ b/src/gallium/drivers/nv50/nv50_context.h
@@ -90,10 +90,12 @@ struct nv50_miptree_level {
unsigned tile_mode;
};
+#define NV50_MAX_TEXTURE_LEVELS 16
+
struct nv50_miptree {
struct nouveau_miptree base;
- struct nv50_miptree_level level[PIPE_MAX_TEXTURE_LEVELS];
+ struct nv50_miptree_level level[NV50_MAX_TEXTURE_LEVELS];
int image_nr;
int total_size;
};
diff --git a/src/gallium/drivers/nv50/nv50_miptree.c b/src/gallium/drivers/nv50/nv50_miptree.c
index 3f9d869d7a4..e091cae6024 100644
--- a/src/gallium/drivers/nv50/nv50_miptree.c
+++ b/src/gallium/drivers/nv50/nv50_miptree.c
@@ -104,7 +104,7 @@ nv50_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *tmp)
tile_flags = 0x7400;
break;
default:
- if ((pt->tex_usage & PIPE_TEXTURE_USAGE_PRIMARY) &&
+ if ((pt->tex_usage & PIPE_TEXTURE_USAGE_SCANOUT) &&
util_format_get_blocksizebits(pt->format) == 32)
tile_flags = 0x7a00;
else
@@ -255,9 +255,10 @@ void
nv50_screen_init_miptree_functions(struct pipe_screen *pscreen)
{
pscreen->texture_create = nv50_miptree_create;
- pscreen->texture_blanket = nv50_miptree_blanket;
pscreen->texture_destroy = nv50_miptree_destroy;
pscreen->get_tex_surface = nv50_miptree_surface_new;
pscreen->tex_surface_destroy = nv50_miptree_surface_del;
+
+ nouveau_screen(pscreen)->texture_blanket = nv50_miptree_blanket;
}
diff --git a/src/gallium/drivers/r300/Makefile b/src/gallium/drivers/r300/Makefile
index 1f69daec819..61b54af4ddf 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 183aa17f9b3..27b2e309932 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_context.c b/src/gallium/drivers/r300/r300_context.c
index 86b98a4ba52..e0a55323273 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -72,11 +72,8 @@ r300_is_texture_referenced(struct pipe_context *pipe,
struct pipe_texture *texture,
unsigned face, unsigned level)
{
- struct pipe_buffer* buf = 0;
-
- r300_get_texture_buffer(pipe->screen, texture, &buf, NULL);
-
- return pipe->is_buffer_referenced(pipe, buf);
+ return pipe->is_buffer_referenced(pipe,
+ ((struct r300_texture *)texture)->buffer);
}
static unsigned int
@@ -86,7 +83,14 @@ r300_is_buffer_referenced(struct pipe_context *pipe,
/* This only checks to see whether actual hardware buffers are
* referenced. Since we use managed BOs and transfers, it's actually not
* possible for pipe_buffers to ever reference the actual hardware, so
- * buffers are never referenced. */
+ * buffers are never referenced.
+ */
+
+ /* XXX: that doesn't make sense given that
+ * r300_is_texture_referenced is implemented on top of this
+ * function and hardware can certainly refer to textures
+ * directly...
+ */
return 0;
}
@@ -159,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;
@@ -212,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 0d1518a05bc..c2825d5f267 100644
--- a/src/gallium/drivers/r300/r300_context.h
+++ b/src/gallium/drivers/r300/r300_context.h
@@ -124,13 +124,15 @@ struct r300_texture_format_state {
uint32_t format2; /* R300_TX_FORMAT2: 0x4500 */
};
+#define R300_MAX_TEXTURE_LEVELS 13
+
struct r300_texture_fb_state {
/* Colorbuffer. */
- uint32_t colorpitch[PIPE_MAX_TEXTURE_LEVELS]; /* R300_RB3D_COLORPITCH[0-3]*/
+ uint32_t colorpitch[R300_MAX_TEXTURE_LEVELS]; /* R300_RB3D_COLORPITCH[0-3]*/
uint32_t us_out_fmt; /* R300_US_OUT_FMT[0-3] */
/* Zbuffer. */
- uint32_t depthpitch[PIPE_MAX_TEXTURE_LEVELS]; /* R300_RB3D_DEPTHPITCH */
+ uint32_t depthpitch[R300_MAX_TEXTURE_LEVELS]; /* R300_RB3D_DEPTHPITCH */
uint32_t zb_format; /* R300_ZB_FORMAT */
};
@@ -236,16 +238,16 @@ struct r300_texture {
struct pipe_texture tex;
/* Offsets into the buffer. */
- unsigned offset[PIPE_MAX_TEXTURE_LEVELS];
+ unsigned offset[R300_MAX_TEXTURE_LEVELS];
/* A pitch for each mip-level */
- unsigned pitch[PIPE_MAX_TEXTURE_LEVELS];
+ unsigned pitch[R300_MAX_TEXTURE_LEVELS];
/* Size of one zslice or face based on the texture target */
- unsigned layer_size[PIPE_MAX_TEXTURE_LEVELS];
+ unsigned layer_size[R300_MAX_TEXTURE_LEVELS];
/* Whether the mipmap level is macrotiled. */
- enum r300_buffer_tiling mip_macrotile[PIPE_MAX_TEXTURE_LEVELS];
+ enum r300_buffer_tiling mip_macrotile[R300_MAX_TEXTURE_LEVELS];
/**
* If non-zero, override the natural texture layout with
@@ -368,6 +370,8 @@ struct r300_context {
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 addb28bded3..51fc590e5d9 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -675,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);
@@ -794,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)
{
@@ -868,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;
}
@@ -907,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;
}
@@ -1135,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 e37d3092703..70de152713d 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 3c2625269b8..9e71e61c303 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 770a92be74f..c8420bcdd5b 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 d397a8eb2b4..5880eecd5fe 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 <[email protected]>
+ * Copyright 2010 Marek Olšák <[email protected]>
*
* 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"
@@ -231,14 +231,16 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
/* Check colorbuffer format support. */
if ((usage & (PIPE_TEXTURE_USAGE_RENDER_TARGET |
PIPE_TEXTURE_USAGE_DISPLAY_TARGET |
- PIPE_TEXTURE_USAGE_PRIMARY)) &&
+ PIPE_TEXTURE_USAGE_SCANOUT |
+ PIPE_TEXTURE_USAGE_SHARED)) &&
/* 2101010 cannot be rendered to on non-r5xx. */
(is_r500 || !is_color2101010) &&
r300_is_colorbuffer_format_supported(format)) {
retval |= usage &
(PIPE_TEXTURE_USAGE_RENDER_TARGET |
PIPE_TEXTURE_USAGE_DISPLAY_TARGET |
- PIPE_TEXTURE_USAGE_PRIMARY);
+ PIPE_TEXTURE_USAGE_SCANOUT |
+ PIPE_TEXTURE_USAGE_SHARED);
}
/* Check depth-stencil format support. */
@@ -250,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);
@@ -350,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 502fbfa5a24..484bde6a6be 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 <[email protected]>
+ * Copyright 2010 Marek Olšák <[email protected]>
*
* 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 1f6f99d3e52..8c9f6046228 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -571,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;
@@ -595,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) {
@@ -716,8 +724,7 @@ 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 no TCL engine is present, turn off the HW TCL. */
if (!r300screen->caps->has_tcl) {
rs->vap_control_status |= R300_VAP_TCL_BYPASS;
}
@@ -807,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);
@@ -815,20 +823,17 @@ static void r300_bind_rs_state(struct pipe_context* pipe, void* state)
if (rs) {
r300->polygon_offset_enabled = rs->rs.offset_cw || rs->rs.offset_ccw;
+ r300->scissor_enabled = rs->rs.scissor;
} else {
r300->polygon_offset_enabled = FALSE;
+ r300->scissor_enabled = FALSE;
}
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;
}
}
@@ -973,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,
@@ -1088,68 +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);
-
- tgsi_scan_shader(shader->tokens, &vs->info);
+ struct r300_vertex_shader* vs = CALLOC_STRUCT(r300_vertex_shader);
+ r300_vertex_shader_common_init(vs, shader);
- 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;
+
+ /* 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. */
- UPDATE_STATE(shader, r300->vs_state);
+ 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,
@@ -1201,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 9c8e907fdf7..e9e40747ef1 100644
--- a/src/gallium/drivers/r300/r300_state_derived.c
+++ b/src/gallium/drivers/r300/r300_state_derived.c
@@ -433,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);
@@ -582,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_state_inlines.h b/src/gallium/drivers/r300/r300_state_inlines.h
index 2f3a56e1fbc..af7827820cc 100644
--- a/src/gallium/drivers/r300/r300_state_inlines.h
+++ b/src/gallium/drivers/r300/r300_state_inlines.h
@@ -453,7 +453,6 @@ r300_translate_vertex_data_type(enum pipe_format format) {
static INLINE uint16_t
r300_translate_vertex_data_swizzle(enum pipe_format format) {
const struct util_format_description *desc = util_format_description(format);
- unsigned swizzle[4], i;
assert(format);
@@ -463,25 +462,10 @@ r300_translate_vertex_data_swizzle(enum pipe_format format) {
return 0;
}
- /* Swizzles for 8bits formats are in the reversed order, not sure why. */
- if (desc->channel[0].size == 8) {
- for (i = 0; i < 4; i++) {
- if (desc->swizzle[i] <= 3) {
- swizzle[i] = 3 - desc->swizzle[i];
- } else {
- swizzle[i] = desc->swizzle[i];
- }
- }
- } else {
- for (i = 0; i < 4; i++) {
- swizzle[i] = desc->swizzle[i];
- }
- }
-
- return ((swizzle[0] << R300_SWIZZLE_SELECT_X_SHIFT) |
- (swizzle[1] << R300_SWIZZLE_SELECT_Y_SHIFT) |
- (swizzle[2] << R300_SWIZZLE_SELECT_Z_SHIFT) |
- (swizzle[3] << R300_SWIZZLE_SELECT_W_SHIFT) |
+ return ((desc->swizzle[0] << R300_SWIZZLE_SELECT_X_SHIFT) |
+ (desc->swizzle[1] << R300_SWIZZLE_SELECT_Y_SHIFT) |
+ (desc->swizzle[2] << R300_SWIZZLE_SELECT_Z_SHIFT) |
+ (desc->swizzle[3] << R300_SWIZZLE_SELECT_W_SHIFT) |
(0xf << R300_WRITE_ENA_SHIFT));
}
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index c0144f64b4a..04124afd4dc 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -617,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;
}
}
@@ -692,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);
@@ -724,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);
@@ -742,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);
@@ -806,14 +851,17 @@ static void r300_tex_surface_destroy(struct pipe_surface* s)
FREE(s);
}
+
static struct pipe_texture*
- r300_texture_blanket(struct pipe_screen* screen,
- const struct pipe_texture* base,
- const unsigned* stride,
- struct pipe_buffer* buffer)
+ r300_texture_from_handle(struct pipe_screen* screen,
+ const struct pipe_texture* base,
+ struct winsys_handle *whandle)
{
- struct r300_texture* tex;
+ struct radeon_winsys* winsys = (struct radeon_winsys*)screen->winsys;
struct r300_screen* rscreen = r300_screen(screen);
+ struct pipe_buffer *buffer;
+ struct r300_texture* tex;
+ unsigned stride;
/* Support only 2D textures without mipmaps */
if (base->target != PIPE_TEXTURE_2D ||
@@ -822,6 +870,11 @@ static struct pipe_texture*
return NULL;
}
+ buffer = winsys->buffer_from_handle(winsys, screen, whandle, &stride);
+ if (!buffer) {
+ return NULL;
+ }
+
tex = CALLOC_STRUCT(r300_texture);
if (!tex) {
return NULL;
@@ -831,17 +884,38 @@ static struct pipe_texture*
pipe_reference_init(&tex->tex.reference, 1);
tex->tex.screen = screen;
- tex->stride_override = *stride;
- tex->pitch[0] = *stride / util_format_get_blocksize(base->format);
+ tex->stride_override = stride;
+ tex->pitch[0] = stride / util_format_get_blocksize(base->format);
r300_setup_flags(tex);
r300_setup_texture_state(rscreen, tex);
- pipe_buffer_reference(&tex->buffer, buffer);
+ /* one ref already taken */
+ tex->buffer = buffer;
return (struct pipe_texture*)tex;
}
+static boolean
+ r300_texture_get_handle(struct pipe_screen* screen,
+ struct pipe_texture *texture,
+ struct winsys_handle *whandle)
+{
+ struct radeon_winsys* winsys = (struct radeon_winsys*)screen->winsys;
+ struct r300_texture* tex = (struct r300_texture*)texture;
+ unsigned stride;
+
+ if (!tex) {
+ return FALSE;
+ }
+
+ stride = r300_texture_get_stride(r300_screen(screen), tex, 0);
+
+ winsys->buffer_get_handle(winsys, tex->buffer, stride, whandle);
+
+ return TRUE;
+}
+
static struct pipe_video_surface *
r300_video_surface_create(struct pipe_screen *screen,
enum pipe_video_chroma_format chroma_format,
@@ -893,30 +967,13 @@ static void r300_video_surface_destroy(struct pipe_video_surface *vsfc)
void r300_init_screen_texture_functions(struct pipe_screen* screen)
{
screen->texture_create = r300_texture_create;
+ screen->texture_from_handle = r300_texture_from_handle;
+ screen->texture_get_handle = r300_texture_get_handle;
screen->texture_destroy = r300_texture_destroy;
screen->get_tex_surface = r300_get_tex_surface;
screen->tex_surface_destroy = r300_tex_surface_destroy;
- screen->texture_blanket = r300_texture_blanket;
screen->video_surface_create = r300_video_surface_create;
screen->video_surface_destroy= r300_video_surface_destroy;
}
-boolean r300_get_texture_buffer(struct pipe_screen* screen,
- struct pipe_texture* texture,
- struct pipe_buffer** buffer,
- unsigned* stride)
-{
- struct r300_texture* tex = (struct r300_texture*)texture;
- if (!tex) {
- return FALSE;
- }
-
- pipe_buffer_reference(buffer, tex->buffer);
-
- if (stride) {
- *stride = r300_texture_get_stride(r300_screen(screen), tex, 0);
- }
-
- return TRUE;
-}
diff --git a/src/gallium/drivers/r300/r300_texture.h b/src/gallium/drivers/r300/r300_texture.h
index 46a5fb6188b..138b62784e6 100644
--- a/src/gallium/drivers/r300/r300_texture.h
+++ b/src/gallium/drivers/r300/r300_texture.h
@@ -60,13 +60,11 @@ r300_video_surface(struct pipe_video_surface *pvs)
return (struct r300_video_surface *)pvs;
}
-#ifndef R300_WINSYS_H
-
+/* Used internally for texture_is_referenced()
+ */
boolean r300_get_texture_buffer(struct pipe_screen* screen,
struct pipe_texture* texture,
struct pipe_buffer** buffer,
unsigned* stride);
-#endif /* R300_WINSYS_H */
-
#endif /* R300_TEXTURE_H */
diff --git a/src/gallium/drivers/r300/r300_transfer.c b/src/gallium/drivers/r300/r300_transfer.c
new file mode 100644
index 00000000000..ec89681a3c0
--- /dev/null
+++ b/src/gallium/drivers/r300/r300_transfer.c
@@ -0,0 +1,270 @@
+/*
+ * Copyright 2008 Corbin Simpson <[email protected]>
+ * Copyright 2010 Marek Olšák <[email protected]>
+ *
+ * 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 00000000000..60d1d3dc85c
--- /dev/null
+++ b/src/gallium/drivers/r300/r300_transfer.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2008 Corbin Simpson <[email protected]>
+ * Copyright 2010 Marek Olšák <[email protected]>
+ *
+ * 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 60a04bbfeda..379939ac750 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 18cfeee3cd4..f6f0b86b683 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/r300/r300_winsys.h b/src/gallium/drivers/r300/r300_winsys.h
index 40fb8a95ca5..ddf2b790039 100644
--- a/src/gallium/drivers/r300/r300_winsys.h
+++ b/src/gallium/drivers/r300/r300_winsys.h
@@ -40,11 +40,6 @@ struct radeon_winsys;
struct pipe_screen* r300_create_screen(struct radeon_winsys* radeon_winsys);
-boolean r300_get_texture_buffer(struct pipe_screen* screen,
- struct pipe_texture* texture,
- struct pipe_buffer** buffer,
- unsigned* stride);
-
#ifdef __cplusplus
}
#endif
diff --git a/src/gallium/drivers/softpipe/sp_prim_vbuf.c b/src/gallium/drivers/softpipe/sp_prim_vbuf.c
index 98c08eaffaf..6749243ab41 100644
--- a/src/gallium/drivers/softpipe/sp_prim_vbuf.c
+++ b/src/gallium/drivers/softpipe/sp_prim_vbuf.c
@@ -264,57 +264,29 @@ sp_vbuf_draw(struct vbuf_render *vbr, const ushort *indices, uint nr)
break;
case PIPE_PRIM_QUADS:
- if (softpipe->rasterizer->flatshade_first) {
- for (i = 3; i < nr; i += 4) {
- sp_setup_tri( setup_ctx,
- get_vert(vertex_buffer, indices[i-2], stride),
- get_vert(vertex_buffer, indices[i-1], stride),
- get_vert(vertex_buffer, indices[i-3], stride) );
- sp_setup_tri( setup_ctx,
- get_vert(vertex_buffer, indices[i-1], stride),
- get_vert(vertex_buffer, indices[i-0], stride),
- get_vert(vertex_buffer, indices[i-3], stride) );
- }
- }
- else {
- for (i = 3; i < nr; i += 4) {
- sp_setup_tri( setup_ctx,
+ for (i = 3; i < nr; i += 4) {
+ sp_setup_tri( setup_ctx,
get_vert(vertex_buffer, indices[i-3], stride),
get_vert(vertex_buffer, indices[i-2], stride),
get_vert(vertex_buffer, indices[i-0], stride) );
- sp_setup_tri( setup_ctx,
+ sp_setup_tri( setup_ctx,
get_vert(vertex_buffer, indices[i-2], stride),
get_vert(vertex_buffer, indices[i-1], stride),
get_vert(vertex_buffer, indices[i-0], stride) );
- }
}
break;
case PIPE_PRIM_QUAD_STRIP:
- if (softpipe->rasterizer->flatshade_first) {
- for (i = 3; i < nr; i += 2) {
- sp_setup_tri( setup_ctx,
- get_vert(vertex_buffer, indices[i-0], stride),
- get_vert(vertex_buffer, indices[i-1], stride),
- get_vert(vertex_buffer, indices[i-3], stride));
- sp_setup_tri( setup_ctx,
- get_vert(vertex_buffer, indices[i-2], stride),
- get_vert(vertex_buffer, indices[i-0], stride),
- get_vert(vertex_buffer, indices[i-3], stride) );
- }
- }
- else {
- for (i = 3; i < nr; i += 2) {
- sp_setup_tri( setup_ctx,
+ for (i = 3; i < nr; i += 2) {
+ sp_setup_tri( setup_ctx,
get_vert(vertex_buffer, indices[i-3], stride),
get_vert(vertex_buffer, indices[i-2], stride),
get_vert(vertex_buffer, indices[i-0], stride) );
- sp_setup_tri( setup_ctx,
+ sp_setup_tri( setup_ctx,
get_vert(vertex_buffer, indices[i-1], stride),
get_vert(vertex_buffer, indices[i-3], stride),
get_vert(vertex_buffer, indices[i-0], stride) );
- }
}
break;
@@ -448,56 +420,28 @@ sp_vbuf_draw_arrays(struct vbuf_render *vbr, uint start, uint nr)
break;
case PIPE_PRIM_QUADS:
- if (softpipe->rasterizer->flatshade_first) {
- for (i = 3; i < nr; i += 4) {
- sp_setup_tri( setup_ctx,
- get_vert(vertex_buffer, i-2, stride),
- get_vert(vertex_buffer, i-1, stride),
- get_vert(vertex_buffer, i-3, stride) );
- sp_setup_tri( setup_ctx,
- get_vert(vertex_buffer, i-1, stride),
- get_vert(vertex_buffer, i-0, stride),
- get_vert(vertex_buffer, i-3, stride) );
- }
- }
- else {
- for (i = 3; i < nr; i += 4) {
- sp_setup_tri( setup_ctx,
+ for (i = 3; i < nr; i += 4) {
+ sp_setup_tri( setup_ctx,
get_vert(vertex_buffer, i-3, stride),
get_vert(vertex_buffer, i-2, stride),
get_vert(vertex_buffer, i-0, stride) );
- sp_setup_tri( setup_ctx,
+ sp_setup_tri( setup_ctx,
get_vert(vertex_buffer, i-2, stride),
get_vert(vertex_buffer, i-1, stride),
get_vert(vertex_buffer, i-0, stride) );
- }
}
break;
case PIPE_PRIM_QUAD_STRIP:
- if (softpipe->rasterizer->flatshade_first) {
- for (i = 3; i < nr; i += 2) {
- sp_setup_tri( setup_ctx,
- get_vert(vertex_buffer, i-0, stride),
- get_vert(vertex_buffer, i-1, stride),
- get_vert(vertex_buffer, i-3, stride) );
- sp_setup_tri( setup_ctx,
- get_vert(vertex_buffer, i-2, stride),
- get_vert(vertex_buffer, i-0, stride),
- get_vert(vertex_buffer, i-3, stride) );
- }
- }
- else {
- for (i = 3; i < nr; i += 2) {
- sp_setup_tri( setup_ctx,
+ for (i = 3; i < nr; i += 2) {
+ sp_setup_tri( setup_ctx,
get_vert(vertex_buffer, i-3, stride),
get_vert(vertex_buffer, i-2, stride),
get_vert(vertex_buffer, i-0, stride) );
- sp_setup_tri( setup_ctx,
+ sp_setup_tri( setup_ctx,
get_vert(vertex_buffer, i-1, stride),
get_vert(vertex_buffer, i-3, stride),
get_vert(vertex_buffer, i-0, stride) );
- }
}
break;
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index 9eb3ff68756..44680ea70c8 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -83,11 +83,11 @@ softpipe_get_param(struct pipe_screen *screen, int param)
case PIPE_CAP_TEXTURE_SHADOW_MAP:
return 1;
case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
- return 13; /* max 4Kx4K */
+ return SP_MAX_TEXTURE_2D_LEVELS;
case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
- return 9; /* max 256x256x256 */
+ return SP_MAX_TEXTURE_3D_LEVELS;
case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
- return 13; /* max 4Kx4K */
+ return SP_MAX_TEXTURE_2D_LEVELS;
case PIPE_CAP_TGSI_CONT_SUPPORTED:
return 1;
case PIPE_CAP_BLEND_EQUATION_SEPARATE:
diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c
index ecd6b39863c..ef7ccf41898 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 9641652da85..11d184effb9 100644
--- a/src/gallium/drivers/softpipe/sp_texture.c
+++ b/src/gallium/drivers/softpipe/sp_texture.c
@@ -36,6 +36,7 @@
#include "util/u_format.h"
#include "util/u_math.h"
#include "util/u_memory.h"
+#include "util/u_simple_screen.h"
#include "sp_context.h"
#include "sp_texture.h"
@@ -121,7 +122,8 @@ softpipe_texture_create(struct pipe_screen *screen,
util_is_power_of_two(template->depth0));
if (spt->base.tex_usage & (PIPE_TEXTURE_USAGE_DISPLAY_TARGET |
- PIPE_TEXTURE_USAGE_PRIMARY)) {
+ PIPE_TEXTURE_USAGE_SCANOUT |
+ PIPE_TEXTURE_USAGE_SHARED)) {
if (!softpipe_displaytarget_layout(screen, spt))
goto fail;
}
@@ -138,20 +140,6 @@ softpipe_texture_create(struct pipe_screen *screen,
}
-/**
- * Create a new pipe_texture which wraps an existing buffer.
- */
-static struct pipe_texture *
-softpipe_texture_blanket(struct pipe_screen * screen,
- const struct pipe_texture *base,
- const unsigned *stride,
- struct pipe_buffer *buffer)
-{
- /* Texture blanket is going away.
- */
- debug_printf("softpipe_texture_blanket() not implemented!");
- return NULL;
-}
static void
@@ -463,7 +451,6 @@ void
softpipe_init_screen_texture_funcs(struct pipe_screen *screen)
{
screen->texture_create = softpipe_texture_create;
- screen->texture_blanket = softpipe_texture_blanket;
screen->texture_destroy = softpipe_texture_destroy;
screen->get_tex_surface = softpipe_get_tex_surface;
diff --git a/src/gallium/drivers/softpipe/sp_texture.h b/src/gallium/drivers/softpipe/sp_texture.h
index e8d17ce7daf..1c8636d1d56 100644
--- a/src/gallium/drivers/softpipe/sp_texture.h
+++ b/src/gallium/drivers/softpipe/sp_texture.h
@@ -33,6 +33,10 @@
#include "pipe/p_video_state.h"
+#define SP_MAX_TEXTURE_2D_LEVELS 13 /* 4K x 4K */
+#define SP_MAX_TEXTURE_3D_LEVELS 9 /* 512 x 512 x 512 */
+
+
struct pipe_context;
struct pipe_screen;
struct softpipe_context;
@@ -42,8 +46,8 @@ struct softpipe_texture
{
struct pipe_texture base;
- unsigned long level_offset[PIPE_MAX_TEXTURE_LEVELS];
- unsigned stride[PIPE_MAX_TEXTURE_LEVELS];
+ unsigned long level_offset[SP_MAX_TEXTURE_2D_LEVELS];
+ unsigned stride[SP_MAX_TEXTURE_2D_LEVELS];
/**
* Display target, for textures with the PIPE_TEXTURE_USAGE_DISPLAY_TARGET
diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c
index 3b30954ac8d..aedfdf1b469 100644
--- a/src/gallium/drivers/softpipe/sp_tile_cache.c
+++ b/src/gallium/drivers/softpipe/sp_tile_cache.c
@@ -299,13 +299,14 @@ sp_tile_cache_flush_clear(struct softpipe_tile_cache *tc)
x, y, TILE_SIZE, TILE_SIZE,
tc->tile.data.color32, 0/*STRIDE*/);
- /* do this? */
- clear_clear_flag(tc->clear_flags, addr);
-
numCleared++;
}
}
}
+
+ /* reset all clear flags to zero */
+ memset(tc->clear_flags, 0, sizeof(tc->clear_flags));
+
#if 0
debug_printf("num cleared: %u\n", numCleared);
#endif
diff --git a/src/gallium/drivers/svga/svga_screen_texture.c b/src/gallium/drivers/svga/svga_screen_texture.c
index e9792e063e0..5b581debfc7 100644
--- a/src/gallium/drivers/svga/svga_screen_texture.c
+++ b/src/gallium/drivers/svga/svga_screen_texture.c
@@ -315,7 +315,11 @@ svga_texture_create(struct pipe_screen *screen,
tex->key.cachable = 0;
}
- if(templat->tex_usage & PIPE_TEXTURE_USAGE_PRIMARY) {
+ if(templat->tex_usage & PIPE_TEXTURE_USAGE_SHARED) {
+ tex->key.cachable = 0;
+ }
+
+ if(templat->tex_usage & PIPE_TEXTURE_USAGE_SCANOUT) {
tex->key.flags |= SVGA3D_SURFACE_HINT_SCANOUT;
tex->key.cachable = 0;
}
@@ -355,80 +359,18 @@ error1:
}
-static struct pipe_texture *
-svga_texture_blanket(struct pipe_screen * screen,
- const struct pipe_texture *base,
- const unsigned *stride,
- struct pipe_buffer *buffer)
-{
- struct svga_texture *tex;
- struct svga_buffer *sbuf = svga_buffer(buffer);
- struct svga_winsys_screen *sws = svga_winsys_screen(screen);
- assert(screen);
-
- /* Only supports one type */
- if (base->target != PIPE_TEXTURE_2D ||
- base->last_level != 0 ||
- base->depth0 != 1) {
- return NULL;
- }
-
- /**
- * We currently can't do texture blanket on
- * SVGA3D_BUFFER. Need to blit to a temporary surface?
- */
-
- assert(sbuf->handle);
- if (!sbuf->handle)
- return NULL;
-
- if (svga_translate_format(base->format) != sbuf->key.format) {
- unsigned f1 = svga_translate_format(base->format);
- unsigned f2 = sbuf->key.format;
-
- /* It's okay for XRGB and ARGB or depth with/out stencil to get mixed up */
- if ( !( (f1 == SVGA3D_X8R8G8B8 && f2 == SVGA3D_A8R8G8B8) ||
- (f1 == SVGA3D_A8R8G8B8 && f2 == SVGA3D_X8R8G8B8) ||
- (f1 == SVGA3D_Z_D24X8 && f2 == SVGA3D_Z_D24S8) ) ) {
- debug_printf("%s wrong format %u != %u\n", __FUNCTION__, f1, f2);
- return NULL;
- }
- }
-
- tex = CALLOC_STRUCT(svga_texture);
- if (!tex)
- return NULL;
-
- tex->base = *base;
-
-
- if (sbuf->key.format == 1)
- tex->base.format = PIPE_FORMAT_B8G8R8X8_UNORM;
- else if (sbuf->key.format == 2)
- tex->base.format = PIPE_FORMAT_B8G8R8A8_UNORM;
-
- pipe_reference_init(&tex->base.reference, 1);
- tex->base.screen = screen;
- SVGA_DBG(DEBUG_DMA, "blanket sid %p\n", sbuf->handle);
- /* We don't own this storage, so don't try to cache it.
- */
- assert(sbuf->key.cachable == 0);
- tex->key.cachable = 0;
- sws->surface_reference(sws, &tex->handle, sbuf->handle);
- return &tex->base;
-}
-
-
-struct pipe_texture *
-svga_screen_texture_wrap_surface(struct pipe_screen *screen,
- struct pipe_texture *base,
- enum SVGA3dSurfaceFormat format,
- struct svga_winsys_surface *srf)
+static struct pipe_texture *
+svga_screen_texture_from_handle(struct pipe_screen *screen,
+ const struct pipe_texture *base,
+ struct winsys_handle *whandle)
{
+ struct svga_winsys_screen *sws = svga_winsys_screen(screen);
+ struct svga_winsys_surface *srf;
struct svga_texture *tex;
+ enum SVGA3dSurfaceFormat format = 0;
assert(screen);
/* Only supports one type */
@@ -438,6 +380,8 @@ svga_screen_texture_wrap_surface(struct pipe_screen *screen,
return NULL;
}
+ srf = sws->surface_from_handle(sws, whandle, &format);
+
if (!srf)
return NULL;
@@ -478,6 +422,22 @@ svga_screen_texture_wrap_surface(struct pipe_screen *screen,
}
+static boolean
+svga_screen_texture_get_handle(struct pipe_screen *screen,
+ struct pipe_texture *texture,
+ struct winsys_handle *whandle)
+{
+ struct svga_winsys_screen *sws = svga_winsys_screen(texture->screen);
+ unsigned stride;
+
+ assert(svga_texture(texture)->key.cachable == 0);
+ svga_texture(texture)->key.cachable = 0;
+ stride = util_format_get_nblocksx(texture->format, texture->width0) *
+ util_format_get_blocksize(texture->format);
+ return sws->surface_get_handle(sws, svga_texture(texture)->handle, stride, whandle);
+}
+
+
static void
svga_texture_destroy(struct pipe_texture *pt)
{
@@ -955,10 +915,11 @@ void
svga_screen_init_texture_functions(struct pipe_screen *screen)
{
screen->texture_create = svga_texture_create;
+ screen->texture_from_handle = svga_screen_texture_from_handle;
+ screen->texture_get_handle = svga_screen_texture_get_handle;
screen->texture_destroy = svga_texture_destroy;
screen->get_tex_surface = svga_get_tex_surface;
screen->tex_surface_destroy = svga_tex_surface_destroy;
- screen->texture_blanket = svga_texture_blanket;
screen->get_tex_transfer = svga_get_tex_transfer;
screen->transfer_map = svga_transfer_map;
screen->transfer_unmap = svga_transfer_unmap;
@@ -1120,33 +1081,3 @@ svga_destroy_sampler_view_priv(struct svga_sampler_view *v)
pipe_texture_reference(&v->texture, NULL);
FREE(v);
}
-
-boolean
-svga_screen_buffer_from_texture(struct pipe_texture *texture,
- struct pipe_buffer **buffer,
- unsigned *stride)
-{
- struct svga_texture *stex = svga_texture(texture);
-
- *buffer = svga_screen_buffer_wrap_surface
- (texture->screen,
- svga_translate_format(texture->format),
- stex->handle);
-
- *stride = util_format_get_stride(texture->format, texture->width0);
-
- return *buffer != NULL;
-}
-
-
-struct svga_winsys_surface *
-svga_screen_texture_get_winsys_surface(struct pipe_texture *texture)
-{
- struct svga_winsys_screen *sws = svga_winsys_screen(texture->screen);
- struct svga_winsys_surface *vsurf = NULL;
-
- assert(svga_texture(texture)->key.cachable == 0);
- svga_texture(texture)->key.cachable = 0;
- sws->surface_reference(sws, &vsurf, svga_texture(texture)->handle);
- return vsurf;
-}
diff --git a/src/gallium/drivers/svga/svga_screen_texture.h b/src/gallium/drivers/svga/svga_screen_texture.h
index 24c1f78ca55..ca6602b4369 100644
--- a/src/gallium/drivers/svga/svga_screen_texture.h
+++ b/src/gallium/drivers/svga/svga_screen_texture.h
@@ -78,7 +78,7 @@ struct svga_texture
{
struct pipe_texture base;
- boolean defined[6][PIPE_MAX_TEXTURE_LEVELS];
+ boolean defined[6][SVGA_MAX_TEXTURE_LEVELS];
struct svga_sampler_view *cached_view;
diff --git a/src/gallium/drivers/svga/svga_winsys.h b/src/gallium/drivers/svga/svga_winsys.h
index b4e3af0eafc..d4bb176f9a8 100644
--- a/src/gallium/drivers/svga/svga_winsys.h
+++ b/src/gallium/drivers/svga/svga_winsys.h
@@ -51,6 +51,7 @@ struct pipe_context;
struct pipe_fence_handle;
struct pipe_texture;
struct svga_region;
+struct winsys_handle;
#define SVGA_BUFFER_USAGE_PINNED (PIPE_BUFFER_USAGE_CUSTOM << 0)
@@ -187,6 +188,25 @@ struct svga_winsys_screen
uint32 numMipLevels);
/**
+ * Creates a surface from a winsys handle.
+ * Used to implement pipe_screen::texture_from_handle.
+ */
+ struct svga_winsys_surface *
+ (*surface_from_handle)(struct svga_winsys_screen *sws,
+ struct winsys_handle *whandle,
+ SVGA3dSurfaceFormat *format);
+
+ /**
+ * Get a winsys_handle from a surface.
+ * Used to implement pipe_screen::texture_get_handle.
+ */
+ boolean
+ (*surface_get_handle)(struct svga_winsys_screen *sws,
+ struct svga_winsys_surface *surface,
+ unsigned stride,
+ struct winsys_handle *whandle);
+
+ /**
* Whether this surface is sitting in a validate list
*/
boolean
@@ -284,19 +304,6 @@ svga_screen_buffer_wrap_surface(struct pipe_screen *screen,
struct svga_winsys_surface *srf);
struct svga_winsys_surface *
-svga_screen_texture_get_winsys_surface(struct pipe_texture *texture);
-struct svga_winsys_surface *
svga_screen_buffer_get_winsys_surface(struct pipe_buffer *buffer);
-boolean
-svga_screen_buffer_from_texture(struct pipe_texture *texture,
- struct pipe_buffer **buffer,
- unsigned *stride);
-
-struct pipe_texture *
-svga_screen_texture_wrap_surface(struct pipe_screen *screen,
- struct pipe_texture *base,
- enum SVGA3dSurfaceFormat format,
- struct svga_winsys_surface *srf);
-
#endif /* SVGA_WINSYS_H_ */
diff --git a/src/gallium/drivers/trace/tr_drm.c b/src/gallium/drivers/trace/tr_drm.c
index 2b4915003e2..c16989fa529 100644
--- a/src/gallium/drivers/trace/tr_drm.c
+++ b/src/gallium/drivers/trace/tr_drm.c
@@ -62,69 +62,8 @@ trace_drm_create_screen(struct drm_api *_api, int fd,
screen = api->create_screen(api, fd, arg);
- return trace_screen_create(screen);
-}
-
-
-static struct pipe_texture *
-trace_drm_texture_from_shared_handle(struct drm_api *_api,
- struct pipe_screen *_screen,
- struct pipe_texture *templ,
- const char *name,
- unsigned stride,
- unsigned handle)
-{
- struct trace_screen *tr_screen = trace_screen(_screen);
- struct trace_drm_api *tr_api = trace_drm_api(_api);
- struct pipe_screen *screen = tr_screen->screen;
- struct drm_api *api = tr_api->api;
- struct pipe_texture *result;
-
- /* TODO trace call */
-
- result = api->texture_from_shared_handle(api, screen, templ, name, stride, handle);
-
- result = trace_texture_create(trace_screen(_screen), result);
-
- return result;
-}
-
-static boolean
-trace_drm_shared_handle_from_texture(struct drm_api *_api,
- struct pipe_screen *_screen,
- struct pipe_texture *_texture,
- unsigned *stride,
- unsigned *handle)
-{
- struct trace_screen *tr_screen = trace_screen(_screen);
- struct trace_texture *tr_texture = trace_texture(_texture);
- struct trace_drm_api *tr_api = trace_drm_api(_api);
- struct pipe_screen *screen = tr_screen->screen;
- struct pipe_texture *texture = tr_texture->texture;
- struct drm_api *api = tr_api->api;
-
- /* TODO trace call */
-
- return api->shared_handle_from_texture(api, screen, texture, stride, handle);
-}
-static boolean
-trace_drm_local_handle_from_texture(struct drm_api *_api,
- struct pipe_screen *_screen,
- struct pipe_texture *_texture,
- unsigned *stride,
- unsigned *handle)
-{
- struct trace_screen *tr_screen = trace_screen(_screen);
- struct trace_texture *tr_texture = trace_texture(_texture);
- struct trace_drm_api *tr_api = trace_drm_api(_api);
- struct pipe_screen *screen = tr_screen->screen;
- struct pipe_texture *texture = tr_texture->texture;
- struct drm_api *api = tr_api->api;
-
- /* TODO trace call */
-
- return api->local_handle_from_texture(api, screen, texture, stride, handle);
+ return trace_screen_create(screen);
}
static void
@@ -158,9 +97,6 @@ trace_drm_create(struct drm_api *api)
tr_api->base.name = api->name;
tr_api->base.driver_name = api->driver_name;
tr_api->base.create_screen = trace_drm_create_screen;
- tr_api->base.texture_from_shared_handle = trace_drm_texture_from_shared_handle;
- tr_api->base.shared_handle_from_texture = trace_drm_shared_handle_from_texture;
- tr_api->base.local_handle_from_texture = trace_drm_local_handle_from_texture;
tr_api->base.destroy = trace_drm_destroy;
tr_api->api = api;
diff --git a/src/gallium/drivers/trace/tr_screen.c b/src/gallium/drivers/trace/tr_screen.c
index 388d83eb5c2..a15addeb8cf 100644
--- a/src/gallium/drivers/trace/tr_screen.c
+++ b/src/gallium/drivers/trace/tr_screen.c
@@ -236,39 +236,41 @@ trace_screen_texture_create(struct pipe_screen *_screen,
return result;
}
-
static struct pipe_texture *
-trace_screen_texture_blanket(struct pipe_screen *_screen,
- const struct pipe_texture *templat,
- const unsigned *ppitch,
- struct pipe_buffer *_buffer)
+trace_screen_texture_from_handle(struct pipe_screen *_screen,
+ const struct pipe_texture *templ,
+ struct winsys_handle *handle)
{
- struct trace_screen *tr_scr = trace_screen(_screen);
- struct trace_buffer *tr_buf = trace_buffer(_buffer);
- struct pipe_screen *screen = tr_scr->screen;
- struct pipe_buffer *buffer = tr_buf->buffer;
- unsigned pitch = *ppitch;
+ struct trace_screen *tr_screen = trace_screen(_screen);
+ struct pipe_screen *screen = tr_screen->screen;
struct pipe_texture *result;
- trace_dump_call_begin("pipe_screen", "texture_blanket");
+ /* TODO trace call */
- trace_dump_arg(ptr, screen);
- trace_dump_arg(template, templat);
- trace_dump_arg(uint, pitch);
- trace_dump_arg(ptr, buffer);
+ result = screen->texture_from_handle(screen, templ, handle);
- result = screen->texture_blanket(screen, templat, ppitch, buffer);
+ result = trace_texture_create(trace_screen(_screen), result);
- trace_dump_ret(ptr, result);
+ return result;
+}
- trace_dump_call_end();
+static boolean
+trace_screen_texture_get_handle(struct pipe_screen *_screen,
+ struct pipe_texture *_texture,
+ struct winsys_handle *handle)
+{
+ struct trace_screen *tr_screen = trace_screen(_screen);
+ struct trace_texture *tr_texture = trace_texture(_texture);
+ struct pipe_screen *screen = tr_screen->screen;
+ struct pipe_texture *texture = tr_texture->texture;
- result = trace_texture_create(tr_scr, result);
+ /* TODO trace call */
- return result;
+ return screen->texture_get_handle(screen, texture, handle);
}
+
static void
trace_screen_texture_destroy(struct pipe_texture *_texture)
{
@@ -484,45 +486,7 @@ trace_screen_transfer_unmap(struct pipe_screen *_screen,
*/
-static struct pipe_buffer *
-trace_screen_surface_buffer_create(struct pipe_screen *_screen,
- unsigned width, unsigned height,
- enum pipe_format format,
- unsigned usage,
- unsigned tex_usage,
- unsigned *pstride)
-{
- struct trace_screen *tr_scr = trace_screen(_screen);
- struct pipe_screen *screen = tr_scr->screen;
- unsigned stride;
- struct pipe_buffer *result;
-
- trace_dump_call_begin("pipe_screen", "surface_buffer_create");
-
- trace_dump_arg(ptr, screen);
- trace_dump_arg(uint, width);
- trace_dump_arg(uint, height);
- trace_dump_arg(format, format);
- trace_dump_arg(uint, usage);
- trace_dump_arg(uint, tex_usage);
- result = screen->surface_buffer_create(screen,
- width, height,
- format,
- usage,
- tex_usage,
- pstride);
-
- stride = *pstride;
-
- trace_dump_arg(uint, stride);
-
- trace_dump_ret(ptr, result);
-
- trace_dump_call_end();
-
- return trace_buffer_create(tr_scr, result);
-}
static struct pipe_buffer *
@@ -931,7 +895,8 @@ trace_screen_create(struct pipe_screen *screen)
assert(screen->context_create);
tr_scr->base.context_create = trace_screen_context_create;
tr_scr->base.texture_create = trace_screen_texture_create;
- tr_scr->base.texture_blanket = trace_screen_texture_blanket;
+ tr_scr->base.texture_from_handle = trace_screen_texture_from_handle;
+ tr_scr->base.texture_get_handle = trace_screen_texture_get_handle;
tr_scr->base.texture_destroy = trace_screen_texture_destroy;
tr_scr->base.get_tex_surface = trace_screen_get_tex_surface;
tr_scr->base.tex_surface_destroy = trace_screen_tex_surface_destroy;
@@ -941,7 +906,6 @@ trace_screen_create(struct pipe_screen *screen)
tr_scr->base.transfer_unmap = trace_screen_transfer_unmap;
tr_scr->base.buffer_create = trace_screen_buffer_create;
tr_scr->base.user_buffer_create = trace_screen_user_buffer_create;
- tr_scr->base.surface_buffer_create = trace_screen_surface_buffer_create;
if (screen->buffer_map)
tr_scr->base.buffer_map = trace_screen_buffer_map;
if (screen->buffer_map_range)
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index 5cebd43ace2..5c97dc87e82 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -176,11 +176,12 @@ enum pipe_texture_target {
#define PIPE_TEX_COMPARE_R_TO_TEXTURE 1
#define PIPE_TEXTURE_USAGE_RENDER_TARGET 0x1
-#define PIPE_TEXTURE_USAGE_DISPLAY_TARGET 0x2 /* ie a backbuffer */
-#define PIPE_TEXTURE_USAGE_PRIMARY 0x4 /* ie a frontbuffer */
+#define PIPE_TEXTURE_USAGE_DISPLAY_TARGET 0x2 /* windows presentable buffer, ie a backbuffer */
+#define PIPE_TEXTURE_USAGE_SCANOUT 0x4 /* ie a frontbuffer */
#define PIPE_TEXTURE_USAGE_DEPTH_STENCIL 0x8
#define PIPE_TEXTURE_USAGE_SAMPLER 0x10
#define PIPE_TEXTURE_USAGE_DYNAMIC 0x20
+#define PIPE_TEXTURE_USAGE_SHARED 0x40
/** Pipe driver custom usage flags should be greater or equal to this value */
#define PIPE_TEXTURE_USAGE_CUSTOM (1 << 16)
diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h
index e4a92228093..690455f7222 100644
--- a/src/gallium/include/pipe/p_screen.h
+++ b/src/gallium/include/pipe/p_screen.h
@@ -50,6 +50,8 @@ extern "C" {
/** Opaque type */
+struct winsys_handle;
+/** Opaque type */
struct pipe_fence_handle;
struct pipe_winsys;
struct pipe_buffer;
@@ -108,16 +110,23 @@ struct pipe_screen {
const struct pipe_texture *templat);
/**
- * Create a new texture object, using the given template info, but on top of
- * existing memory.
- *
- * It is assumed that the buffer data is layed out according to the expected
- * by the hardware. NULL will be returned if any inconsistency is found.
+ * Create a texture from a winsys_handle. The handle is often created in
+ * another process by first creating a pipe texture and then calling
+ * texture_get_handle.
+ */
+ struct pipe_texture * (*texture_from_handle)(struct pipe_screen *,
+ const struct pipe_texture *templat,
+ struct winsys_handle *handle);
+
+ /**
+ * Get a winsys_handle from a texture. Some platforms/winsys requires
+ * that the texture is created with a special usage flag like
+ * DISPLAYTARGET or PRIMARY.
*/
- struct pipe_texture * (*texture_blanket)(struct pipe_screen *,
- const struct pipe_texture *templat,
- const unsigned *stride,
- struct pipe_buffer *buffer);
+ boolean (*texture_get_handle)(struct pipe_screen *,
+ struct pipe_texture *tex,
+ struct winsys_handle *handle);
+
void (*texture_destroy)(struct pipe_texture *pt);
@@ -187,23 +196,6 @@ struct pipe_screen {
void *ptr,
unsigned bytes);
- /**
- * Allocate storage for a display target surface.
- *
- * Often surfaces which are meant to be blitted to the front screen (i.e.,
- * display targets) must be allocated with special characteristics, memory
- * pools, or obtained directly from the windowing system.
- *
- * This callback is invoked by the pipe_screenwhen creating a texture marked
- * with the PIPE_TEXTURE_USAGE_DISPLAY_TARGET flag to get the underlying
- * buffer storage.
- */
- struct pipe_buffer *(*surface_buffer_create)(struct pipe_screen *screen,
- unsigned width, unsigned height,
- enum pipe_format format,
- unsigned usage,
- unsigned tex_usage,
- unsigned *stride);
/**
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index 02558520bfe..72635d1031b 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -249,7 +249,7 @@ struct pipe_framebuffer_state
{
unsigned width, height;
- /** multiple colorbuffers for multiple render targets */
+ /** multiple color buffers for multiple render targets */
unsigned nr_cbufs;
struct pipe_surface *cbufs[PIPE_MAX_COLOR_BUFS];
@@ -285,12 +285,12 @@ struct pipe_sampler_state
struct pipe_surface
{
struct pipe_reference reference;
- enum pipe_format format; /**< PIPE_FORMAT_x */
+ enum pipe_format format;
unsigned width; /**< logical width in pixels */
unsigned height; /**< logical height in pixels */
unsigned layout; /**< PIPE_SURFACE_LAYOUT_x */
unsigned offset; /**< offset from start of buffer, in bytes */
- unsigned usage; /**< PIPE_BUFFER_USAGE_* */
+ unsigned usage; /**< bitmask of PIPE_BUFFER_USAGE_x */
unsigned zslice;
struct pipe_texture *texture; /**< texture into which this is a view */
@@ -336,7 +336,7 @@ struct pipe_texture
unsigned nr_samples:8; /**< for multisampled surfaces, nr of samples */
- unsigned tex_usage; /* PIPE_TEXTURE_USAGE_* */
+ unsigned tex_usage; /**< bitmask of PIPE_TEXTURE_USAGE_* */
struct pipe_screen *screen; /**< screen that this texture belongs to */
};
@@ -375,7 +375,7 @@ struct pipe_vertex_element
unsigned vertex_buffer_index:8;
unsigned nr_components:8;
- enum pipe_format src_format; /**< PIPE_FORMAT_* */
+ enum pipe_format src_format;
};
diff --git a/src/gallium/include/state_tracker/drm_api.h b/src/gallium/include/state_tracker/drm_api.h
index e9fa9b4d2a3..fe7ef253ef0 100644
--- a/src/gallium/include/state_tracker/drm_api.h
+++ b/src/gallium/include/state_tracker/drm_api.h
@@ -17,6 +17,32 @@ enum drm_create_screen_mode {
DRM_CREATE_MAX
};
+#define DRM_API_HANDLE_TYPE_SHARED 0
+#define DRM_API_HANDLE_TYPE_KMS 1
+
+/**
+ * For use with pipe_screen::{texture_from_handle|texture_get_handle}.
+ */
+struct winsys_handle
+{
+ /**
+ * Unused for texture_from_handle, always
+ * DRM_API_HANDLE_TYPE_SHARED. Input to texture_get_handle,
+ * use TEXTURE_USAGE to select handle for kms or ipc.
+ */
+ unsigned type;
+ /**
+ * Input to texture_from_handle.
+ * Output for texture_get_handle.
+ */
+ unsigned handle;
+ /**
+ * Input to texture_from_handle.
+ * Output for texture_get_handle.
+ */
+ unsigned stride;
+};
+
/**
* Modes other than DRM_CREATE_NORMAL derive from this struct.
*/
@@ -28,6 +54,8 @@ struct drm_create_screen_arg {
struct drm_api
{
+ void (*destroy)(struct drm_api *api);
+
const char *name;
/**
@@ -36,37 +64,10 @@ struct drm_api
const char *driver_name;
/**
- * Special buffer functions
+ * Create a pipe srcreen.
*/
- /*@{*/
struct pipe_screen* (*create_screen)(struct drm_api *api, int drm_fd,
struct drm_create_screen_arg *arg);
- /*@}*/
-
- /**
- * Special buffer functions
- */
- /*@{*/
- struct pipe_texture*
- (*texture_from_shared_handle)(struct drm_api *api,
- struct pipe_screen *screen,
- struct pipe_texture *templ,
- const char *name,
- unsigned stride,
- unsigned handle);
- boolean (*shared_handle_from_texture)(struct drm_api *api,
- struct pipe_screen *screen,
- struct pipe_texture *texture,
- unsigned *stride,
- unsigned *handle);
- boolean (*local_handle_from_texture)(struct drm_api *api,
- struct pipe_screen *screen,
- struct pipe_texture *texture,
- unsigned *stride,
- unsigned *handle);
- /*@}*/
-
- void (*destroy)(struct drm_api *api);
};
extern struct drm_api * drm_api_create(void);
diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c
index 173f4041c8c..458473853cf 100644
--- a/src/gallium/state_trackers/dri/dri_drawable.c
+++ b/src/gallium/state_trackers/dri/dri_drawable.c
@@ -58,6 +58,7 @@ dri_surface_from_handle(struct drm_api *api,
struct pipe_surface *surface = NULL;
struct pipe_texture *texture = NULL;
struct pipe_texture templat;
+ struct winsys_handle whandle;
memset(&templat, 0, sizeof(templat));
templat.tex_usage |= PIPE_TEXTURE_USAGE_RENDER_TARGET;
@@ -68,8 +69,11 @@ dri_surface_from_handle(struct drm_api *api,
templat.width0 = width;
templat.height0 = height;
- texture = api->texture_from_shared_handle(api, screen, &templat,
- "dri2 buffer", pitch, handle);
+ memset(&whandle, 0, sizeof(whandle));
+ whandle.handle = handle;
+ whandle.stride = pitch;
+
+ texture = screen->texture_from_handle(screen, &templat, &whandle);
if (!texture) {
debug_printf("%s: Failed to blanket the buffer with a texture\n", __func__);
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c b/src/gallium/state_trackers/egl/common/egl_g3d.c
index 2f7a8a8f7eb..f54c51a6681 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"
/**
@@ -517,6 +518,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)
{
@@ -561,12 +580,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->update_buffer = egl_g3d_update_buffer;
egl_g3d_init_st(&gdrv->base);
@@ -580,6 +601,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;
@@ -761,6 +786,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) ?
@@ -922,8 +948,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;
@@ -975,7 +1001,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");
@@ -1286,6 +1312,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 5d2d9c481ab..e3e55e46d3b 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 00000000000..d701f9c9a88
--- /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 <[email protected]>
+ */
+
+#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 00000000000..c199c466456
--- /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 <[email protected]>
+ */
+
+#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 4c9217e1a5b..93c81b26e10 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
@@ -140,9 +143,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.
*
@@ -193,46 +209,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);
};
/**
@@ -264,6 +251,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 00000000000..71dc3ec860e
--- /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 <[email protected]>
+ *
+ * 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 aedf3d430ca..73222408565 100644
--- a/src/gallium/state_trackers/egl/kms/native_kms.c
+++ b/src/gallium/state_trackers/egl/kms/native_kms.c
@@ -55,7 +55,7 @@ kms_surface_validate(struct native_surface *nsurf, uint attachment_mask,
templ.format = ksurf->color_format;
templ.tex_usage = PIPE_TEXTURE_USAGE_RENDER_TARGET;
if (ksurf->type == KMS_SURFACE_TYPE_SCANOUT)
- templ.tex_usage |= PIPE_TEXTURE_USAGE_PRIMARY;
+ templ.tex_usage |= PIPE_TEXTURE_USAGE_SCANOUT;
}
/* create textures */
@@ -100,7 +100,7 @@ kms_surface_init_framebuffers(struct native_surface *nsurf, boolean need_back)
for (i = 0; i < num_framebuffers; i++) {
struct kms_framebuffer *fb;
enum native_attachment natt;
- unsigned int handle, stride;
+ struct winsys_handle whandle;
uint block_bits;
if (i == 0) {
@@ -128,13 +128,17 @@ kms_surface_init_framebuffers(struct native_surface *nsurf, boolean need_back)
/* TODO detect the real value */
fb->is_passive = TRUE;
- if (!kdpy->api->local_handle_from_texture(kdpy->api,
- kdpy->base.screen, fb->texture, &stride, &handle))
+ memset(&whandle, 0, sizeof(whandle));
+ whandle.type = DRM_API_HANDLE_TYPE_KMS;
+
+ if (!kdpy->base.screen->texture_get_handle(kdpy->base.screen,
+ fb->texture, &whandle))
return FALSE;
block_bits = util_format_get_blocksizebits(ksurf->color_format);
err = drmModeAddFB(kdpy->fd, ksurf->width, ksurf->height,
- block_bits, block_bits, stride, handle, &fb->buffer_id);
+ block_bits, block_bits, whandle.stride, whandle.handle,
+ &fb->buffer_id);
if (err) {
fb->buffer_id = 0;
return FALSE;
@@ -201,6 +205,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;
}
@@ -663,6 +669,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 +783,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 +793,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 +830,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 +871,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 +880,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 095186e3cf3..f9cbcb158b5 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 74d3d104b94..98399792311 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;
@@ -112,6 +114,7 @@ dri2_surface_process_drawable_buffers(struct native_surface *nsurf,
struct dri2_surface *dri2surf = dri2_surface(nsurf);
struct dri2_display *dri2dpy = dri2surf->dri2dpy;
struct pipe_texture templ;
+ struct winsys_handle whandle;
uint valid_mask;
int i;
@@ -169,9 +172,11 @@ dri2_surface_process_drawable_buffers(struct native_surface *nsurf,
continue;
}
- dri2surf->textures[natt] =
- dri2dpy->api->texture_from_shared_handle(dri2dpy->api,
- dri2dpy->base.screen, &templ, desc, xbuf->pitch, xbuf->name);
+ memset(&whandle, 0, sizeof(whandle));
+ whandle.stride = xbuf->pitch;
+ whandle.handle = xbuf->name;
+ dri2surf->textures[natt] = dri2dpy->base.screen->texture_from_handle(
+ dri2dpy->base.screen, &templ, &whandle);
if (dri2surf->textures[natt])
valid_mask |= 1 << natt;
}
@@ -324,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;
}
@@ -353,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;
}
@@ -699,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)
{
@@ -737,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);
}
/**
@@ -796,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;
@@ -804,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;
@@ -836,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 ef7490503b0..2b3edbc006a 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) {
diff --git a/src/gallium/state_trackers/egl/x11/native_x11.h b/src/gallium/state_trackers/egl/x11/native_x11.h
index 2e71de1885b..21ed6a2e063 100644
--- a/src/gallium/state_trackers/egl/x11/native_x11.h
+++ b/src/gallium/state_trackers/egl/x11/native_x11.h
@@ -32,6 +32,8 @@ struct native_display *
x11_create_ximage_display(EGLNativeDisplayType dpy);
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 6c6ba24e7b3..0006b0caca4 100644
--- a/src/gallium/state_trackers/egl/x11/native_ximage.c
+++ b/src/gallium/state_trackers/egl/x11/native_ximage.c
@@ -196,6 +196,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.
@@ -278,6 +288,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;
}
@@ -294,6 +305,7 @@ ximage_surface_swap_buffers(struct native_surface *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];
@@ -579,6 +591,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)
{
@@ -625,6 +656,7 @@ x11_create_ximage_display(EGLNativeDisplayType dpy)
xdpy->base.screen = xdpy->driver->create_pipe_screen(xdpy->dpy);
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/vega/Makefile b/src/gallium/state_trackers/vega/Makefile
index 037d8dc911a..7f04b2aa832 100644
--- a/src/gallium/state_trackers/vega/Makefile
+++ b/src/gallium/state_trackers/vega/Makefile
@@ -53,7 +53,7 @@ INCLUDE_DIRS = \
.c.o:
- $(CC) -c $(INCLUDE_DIRS) $(DEFINES) $(CFLAGS) $< -o $@
+ $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
default: depend $(TOP)/$(LIB_DIR)/$(VG_LIB_NAME)
diff --git a/src/gallium/state_trackers/vega/paint.c b/src/gallium/state_trackers/vega/paint.c
index caf0c14b745..cdb87d3bf68 100644
--- a/src/gallium/state_trackers/vega/paint.c
+++ b/src/gallium/state_trackers/vega/paint.c
@@ -639,9 +639,6 @@ VGint paint_bind_samplers(struct vg_paint *paint, struct pipe_sampler_state **sa
}
break;
default:
- samplers[0] = &paint->pattern.sampler; /* dummy */
- textures[0] = 0;
- return 0;
break;
}
return 0;
diff --git a/src/gallium/state_trackers/xorg/xorg_crtc.c b/src/gallium/state_trackers/xorg/xorg_crtc.c
index 000ec9048f5..44f7da0f960 100644
--- a/src/gallium/state_trackers/xorg/xorg_crtc.c
+++ b/src/gallium/state_trackers/xorg/xorg_crtc.c
@@ -197,11 +197,11 @@ crtc_load_cursor_argb_ga3d(xf86CrtcPtr crtc, CARD32 * image)
if (!crtcp->cursor_tex) {
struct pipe_texture templat;
- unsigned pitch;
+ struct winsys_handle whandle;
memset(&templat, 0, sizeof(templat));
templat.tex_usage |= PIPE_TEXTURE_USAGE_RENDER_TARGET;
- templat.tex_usage |= PIPE_TEXTURE_USAGE_PRIMARY;
+ templat.tex_usage |= PIPE_TEXTURE_USAGE_SCANOUT;
templat.target = PIPE_TEXTURE_2D;
templat.last_level = 0;
templat.depth0 = 1;
@@ -209,13 +209,14 @@ crtc_load_cursor_argb_ga3d(xf86CrtcPtr crtc, CARD32 * image)
templat.width0 = 64;
templat.height0 = 64;
+ memset(&whandle, 0, sizeof(whandle));
+ whandle.type = DRM_API_HANDLE_TYPE_KMS;
+
crtcp->cursor_tex = ms->screen->texture_create(ms->screen,
&templat);
- ms->api->local_handle_from_texture(ms->api,
- ms->screen,
- crtcp->cursor_tex,
- &pitch,
- &crtcp->cursor_handle);
+ ms->screen->texture_get_handle(ms->screen, crtcp->cursor_tex, &whandle);
+
+ crtcp->cursor_handle = whandle.handle;
}
transfer = ms->screen->get_tex_transfer(ms->screen, crtcp->cursor_tex,
diff --git a/src/gallium/state_trackers/xorg/xorg_dri2.c b/src/gallium/state_trackers/xorg/xorg_dri2.c
index 5fc85c0e98c..f23e4c6cc7c 100644
--- a/src/gallium/state_trackers/xorg/xorg_dri2.c
+++ b/src/gallium/state_trackers/xorg/xorg_dri2.c
@@ -67,7 +67,7 @@ dri2_do_create_buffer(DrawablePtr pDraw, DRI2BufferPtr buffer, unsigned int form
struct exa_pixmap_priv *exa_priv;
BufferPrivatePtr private = buffer->driverPrivate;
PixmapPtr pPixmap;
- unsigned stride, handle;
+ struct winsys_handle whandle;
if (pDraw->type == DRAWABLE_PIXMAP)
pPixmap = (PixmapPtr) pDraw;
@@ -75,6 +75,7 @@ dri2_do_create_buffer(DrawablePtr pDraw, DRI2BufferPtr buffer, unsigned int form
pPixmap = (*pScreen->GetWindowPixmap)((WindowPtr) pDraw);
exa_priv = exaGetPixmapDriverPrivate(pPixmap);
+
switch (buffer->attachment) {
default:
if (buffer->attachment != DRI2BufferFakeFrontLeft ||
@@ -128,7 +129,7 @@ dri2_do_create_buffer(DrawablePtr pDraw, DRI2BufferPtr buffer, unsigned int form
template.depth0 = 1;
template.last_level = 0;
template.tex_usage = PIPE_TEXTURE_USAGE_DEPTH_STENCIL |
- PIPE_TEXTURE_USAGE_DISPLAY_TARGET;
+ PIPE_TEXTURE_USAGE_SHARED;
tex = ms->screen->texture_create(ms->screen, &template);
pipe_texture_reference(&exa_priv->depth_stencil_tex, tex);
}
@@ -153,10 +154,13 @@ dri2_do_create_buffer(DrawablePtr pDraw, DRI2BufferPtr buffer, unsigned int form
if (!tex)
FatalError("NO TEXTURE IN DRI2\n");
- ms->api->shared_handle_from_texture(ms->api, ms->screen, tex, &stride, &handle);
+ memset(&whandle, 0, sizeof(whandle));
+ whandle.type = DRM_API_HANDLE_TYPE_SHARED;
+
+ ms->screen->texture_get_handle(ms->screen, tex, &whandle);
- buffer->name = handle;
- buffer->pitch = stride;
+ buffer->name = whandle.handle;
+ buffer->pitch = whandle.stride;
buffer->cpp = 4;
buffer->driverPrivate = private;
buffer->flags = 0; /* not tiled */
diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c b/src/gallium/state_trackers/xorg/xorg_driver.c
index 8fb6e5a96dd..004a28f00e1 100644
--- a/src/gallium/state_trackers/xorg/xorg_driver.c
+++ b/src/gallium/state_trackers/xorg/xorg_driver.c
@@ -989,8 +989,9 @@ static Bool
drv_create_front_buffer_ga3d(ScrnInfoPtr pScrn)
{
modesettingPtr ms = modesettingPTR(pScrn);
- unsigned handle, stride, fb_id;
struct pipe_texture *tex;
+ struct winsys_handle whandle;
+ unsigned fb_id;
int ret;
ms->noEvict = TRUE;
@@ -1001,10 +1002,10 @@ drv_create_front_buffer_ga3d(ScrnInfoPtr pScrn)
if (!tex)
return FALSE;
- if (!ms->api->local_handle_from_texture(ms->api, ms->screen,
- tex,
- &stride,
- &handle))
+ memset(&whandle, 0, sizeof(whandle));
+ whandle.type = DRM_API_HANDLE_TYPE_KMS;
+
+ if (!ms->screen->texture_get_handle(ms->screen, tex, &whandle))
goto err_destroy;
ret = drmModeAddFB(ms->fd,
@@ -1012,8 +1013,8 @@ drv_create_front_buffer_ga3d(ScrnInfoPtr pScrn)
pScrn->virtualY,
pScrn->depth,
pScrn->bitsPerPixel,
- stride,
- handle,
+ whandle.stride,
+ whandle.handle,
&fb_id);
if (ret) {
debug_printf("%s: failed to create framebuffer (%i, %s)\n",
diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
index a242e02ee77..a7ffe3f4992 100644
--- a/src/gallium/state_trackers/xorg/xorg_exa.c
+++ b/src/gallium/state_trackers/xorg/xorg_exa.c
@@ -789,7 +789,7 @@ xorg_exa_set_displayed_usage(PixmapPtr pPixmap)
return 0;
}
- priv->flags |= PIPE_TEXTURE_USAGE_PRIMARY;
+ priv->flags |= PIPE_TEXTURE_USAGE_SCANOUT;
return 0;
}
@@ -805,7 +805,7 @@ xorg_exa_set_shared_usage(PixmapPtr pPixmap)
return 0;
}
- priv->flags |= PIPE_TEXTURE_USAGE_DISPLAY_TARGET;
+ priv->flags |= PIPE_TEXTURE_USAGE_SHARED;
return 0;
}
@@ -943,7 +943,7 @@ xorg_exa_set_texture(PixmapPtr pPixmap, struct pipe_texture *tex)
{
struct exa_pixmap_priv *priv = exaGetPixmapDriverPrivate(pPixmap);
- int mask = PIPE_TEXTURE_USAGE_PRIMARY | PIPE_TEXTURE_USAGE_DISPLAY_TARGET;
+ int mask = PIPE_TEXTURE_USAGE_SHARED | PIPE_TEXTURE_USAGE_SCANOUT;
if (!priv)
return FALSE;
@@ -976,8 +976,8 @@ xorg_exa_create_root_texture(ScrnInfoPtr pScrn,
template.depth0 = 1;
template.last_level = 0;
template.tex_usage |= PIPE_TEXTURE_USAGE_RENDER_TARGET;
- template.tex_usage |= PIPE_TEXTURE_USAGE_PRIMARY;
- template.tex_usage |= PIPE_TEXTURE_USAGE_DISPLAY_TARGET;
+ template.tex_usage |= PIPE_TEXTURE_USAGE_SCANOUT;
+ template.tex_usage |= PIPE_TEXTURE_USAGE_SHARED;
return exa->scrn->texture_create(exa->scrn, &template);
}
diff --git a/src/gallium/state_trackers/xorg/xvmc/surface.c b/src/gallium/state_trackers/xorg/xvmc/surface.c
index 87d1dfaace2..12d94e0c5ca 100644
--- a/src/gallium/state_trackers/xorg/xvmc/surface.c
+++ b/src/gallium/state_trackers/xorg/xvmc/surface.c
@@ -106,7 +106,7 @@ CreateOrResizeBackBuffer(struct pipe_video_context *vpipe, unsigned int width, u
template.width0 = width;
template.height0 = height;
template.depth0 = 1;
- template.tex_usage = PIPE_TEXTURE_USAGE_DISPLAY_TARGET;
+ template.tex_usage = PIPE_TEXTURE_USAGE_SHARED;
tex = vpipe->screen->texture_create(vpipe->screen, &template);
if (!tex)
diff --git a/src/gallium/winsys/drm/i965/gem/i965_drm_api.c b/src/gallium/winsys/drm/i965/gem/i965_drm_api.c
index a061eef0beb..21e82303f72 100644
--- a/src/gallium/winsys/drm/i965/gem/i965_drm_api.c
+++ b/src/gallium/winsys/drm/i965/gem/i965_drm_api.c
@@ -37,129 +37,6 @@ i965_libdrm_get_device_id(unsigned int *device_id)
fclose(file);
}
-static struct i965_libdrm_buffer *
-i965_libdrm_buffer_from_handle(struct i965_libdrm_winsys *idws,
- const char* name, unsigned handle)
-{
- struct i965_libdrm_buffer *buf = CALLOC_STRUCT(i965_libdrm_buffer);
- uint32_t swizzle = 0;
-
- if (BRW_DUMP)
- debug_printf("%s\n", __FUNCTION__);
-
- if (!buf)
- return NULL;
- pipe_reference_init(&buf->base.reference, 1);
- buf->bo = drm_intel_bo_gem_create_from_name(idws->gem, name, handle);
- buf->base.size = buf->bo->size;
- buf->base.sws = &idws->base;
- buf->flinked = TRUE;
- buf->flink = handle;
-
-
- if (!buf->bo)
- goto err;
-
- drm_intel_bo_get_tiling(buf->bo, &buf->tiling, &swizzle);
- if (buf->tiling != 0)
- buf->map_gtt = TRUE;
-
- return buf;
-
-err:
- FREE(buf);
- return NULL;
-}
-
-
-/*
- * Exported functions
- */
-
-
-static struct pipe_texture *
-i965_libdrm_texture_from_shared_handle(struct drm_api *api,
- struct pipe_screen *screen,
- struct pipe_texture *template,
- const char* name,
- unsigned pitch,
- unsigned handle)
-{
- /* XXX: this is silly -- there should be a way to get directly from
- * the "drm_api" struct to ourselves, without peering into
- * unrelated code:
- */
- struct i965_libdrm_winsys *idws = i965_libdrm_winsys(brw_screen(screen)->sws);
- struct i965_libdrm_buffer *buffer;
-
- if (BRW_DUMP)
- debug_printf("%s %s pitch %d handle 0x%x\n", __FUNCTION__,
- name, pitch, handle);
-
- buffer = i965_libdrm_buffer_from_handle(idws, name, handle);
- if (!buffer)
- return NULL;
-
- return brw_texture_blanket_winsys_buffer(screen, template, pitch,
- buffer->tiling,
- &buffer->base);
-}
-
-
-static boolean
-i965_libdrm_shared_handle_from_texture(struct drm_api *api,
- struct pipe_screen *screen,
- struct pipe_texture *texture,
- unsigned *pitch,
- unsigned *handle)
-{
- struct i965_libdrm_buffer *buf = NULL;
- struct brw_winsys_buffer *buffer = NULL;
-
- if (BRW_DUMP)
- debug_printf("%s\n", __FUNCTION__);
-
- if (!brw_texture_get_winsys_buffer(texture, &buffer, pitch))
- return FALSE;
-
- buf = i965_libdrm_buffer(buffer);
- if (!buf->flinked) {
- if (drm_intel_bo_flink(buf->bo, &buf->flink))
- return FALSE;
- buf->flinked = TRUE;
- }
-
- *handle = buf->flink;
-
- if (BRW_DUMP)
- debug_printf(" -> pitch %d handle 0x%x\n", *pitch, *handle);
-
- return TRUE;
-}
-
-static boolean
-i965_libdrm_local_handle_from_texture(struct drm_api *api,
- struct pipe_screen *screen,
- struct pipe_texture *texture,
- unsigned *pitch,
- unsigned *handle)
-{
- struct brw_winsys_buffer *buffer = NULL;
-
- if (BRW_DUMP)
- debug_printf("%s\n", __FUNCTION__);
-
- if (!brw_texture_get_winsys_buffer(texture, &buffer, pitch))
- return FALSE;
-
- *handle = i965_libdrm_buffer(buffer)->bo->handle;
-
- if (BRW_DUMP)
- debug_printf(" -> pitch %d handle 0x%x\n", *pitch, *handle);
-
- return TRUE;
-}
-
static void
i965_libdrm_winsys_destroy(struct brw_winsys_screen *iws)
{
@@ -225,9 +102,6 @@ struct drm_api i965_libdrm_api =
{
.name = "i965",
.create_screen = i965_libdrm_create_screen,
- .texture_from_shared_handle = i965_libdrm_texture_from_shared_handle,
- .shared_handle_from_texture = i965_libdrm_shared_handle_from_texture,
- .local_handle_from_texture = i965_libdrm_local_handle_from_texture,
.destroy = destroy,
};
diff --git a/src/gallium/winsys/drm/i965/gem/i965_drm_buffer.c b/src/gallium/winsys/drm/i965/gem/i965_drm_buffer.c
index 07be1df87f0..33a17496b2b 100644
--- a/src/gallium/winsys/drm/i965/gem/i965_drm_buffer.c
+++ b/src/gallium/winsys/drm/i965/gem/i965_drm_buffer.c
@@ -1,4 +1,5 @@
+#include "state_tracker/drm_api.h"
#include "i965_drm_winsys.h"
#include "util/u_memory.h"
#include "util/u_inlines.h"
@@ -122,6 +123,78 @@ err:
return PIPE_ERROR_OUT_OF_MEMORY;
}
+static enum pipe_error
+i965_libdrm_bo_from_handle(struct brw_winsys_screen *sws,
+ struct winsys_handle *whandle,
+ unsigned *stride,
+ unsigned *tile,
+ struct brw_winsys_buffer **bo_out)
+{
+ struct i965_libdrm_winsys *idws = i965_libdrm_winsys(sws);
+ struct i965_libdrm_buffer *buf = CALLOC_STRUCT(i965_libdrm_buffer);
+ uint32_t swizzle = 0;
+
+ if (BRW_DUMP)
+ debug_printf("%s\n", __FUNCTION__);
+
+ if (!buf)
+ return PIPE_ERROR_OUT_OF_MEMORY;
+
+ pipe_reference_init(&buf->base.reference, 1);
+ buf->bo = drm_intel_bo_gem_create_from_name(idws->gem, "FROM_HANDLE", whandle->handle);
+ buf->base.size = buf->bo->size;
+ buf->base.sws = &idws->base;
+ buf->flinked = TRUE;
+ buf->flink = whandle->handle;
+
+
+ if (!buf->bo)
+ goto err;
+
+ drm_intel_bo_get_tiling(buf->bo, &buf->tiling, &swizzle);
+ if (buf->tiling != 0)
+ buf->map_gtt = TRUE;
+
+ *tile = buf->tiling;
+ *stride = whandle->stride;
+
+ *bo_out = &buf->base;
+ return PIPE_OK;
+
+err:
+ FREE(buf);
+ return PIPE_ERROR_OUT_OF_MEMORY;
+}
+
+static enum pipe_error
+i965_libdrm_bo_get_handle(struct brw_winsys_buffer *buffer,
+ struct winsys_handle *whandle,
+ unsigned stride)
+{
+ struct i965_libdrm_buffer *buf = i965_libdrm_buffer(buffer);
+
+ if (BRW_DUMP)
+ debug_printf("%s\n", __FUNCTION__);
+
+ if (whandle->type == DRM_API_HANDLE_TYPE_SHARED) {
+ if (!buf->flinked) {
+ if (drm_intel_bo_flink(buf->bo, &buf->flink))
+ return PIPE_ERROR_BAD_INPUT;
+ buf->flinked = TRUE;
+ }
+
+ whandle->handle = buf->flink;
+ } else if (whandle->type == DRM_API_HANDLE_TYPE_KMS) {
+ whandle->handle = buf->bo->handle;
+ } else {
+ assert(!"unknown usage");
+ return PIPE_ERROR_BAD_INPUT;
+ }
+
+ whandle->stride = stride;
+ return PIPE_OK;
+}
+
static void
i965_libdrm_bo_destroy(struct brw_winsys_buffer *buffer)
{
@@ -415,6 +488,8 @@ void
i965_libdrm_winsys_init_buffer_functions(struct i965_libdrm_winsys *idws)
{
idws->base.bo_alloc = i965_libdrm_bo_alloc;
+ idws->base.bo_from_handle = i965_libdrm_bo_from_handle;
+ idws->base.bo_get_handle = i965_libdrm_bo_get_handle;
idws->base.bo_destroy = i965_libdrm_bo_destroy;
idws->base.bo_emit_reloc = i965_libdrm_bo_emit_reloc;
idws->base.bo_exec = i965_libdrm_bo_exec;
diff --git a/src/gallium/winsys/drm/intel/gem/intel_drm_api.c b/src/gallium/winsys/drm/intel/gem/intel_drm_api.c
index 377ed255131..e3b980a832b 100644
--- a/src/gallium/winsys/drm/intel/gem/intel_drm_api.c
+++ b/src/gallium/winsys/drm/intel/gem/intel_drm_api.c
@@ -38,99 +38,6 @@ intel_drm_get_device_id(unsigned int *device_id)
fclose(file);
}
-static struct intel_buffer *
-intel_drm_buffer_from_handle(struct intel_drm_winsys *idws,
- const char* name, unsigned handle)
-{
- struct intel_drm_buffer *buf = CALLOC_STRUCT(intel_drm_buffer);
- uint32_t tile = 0, swizzle = 0;
-
- if (!buf)
- return NULL;
-
- buf->magic = 0xDEAD1337;
- buf->bo = drm_intel_bo_gem_create_from_name(idws->pools.gem, name, handle);
- buf->flinked = TRUE;
- buf->flink = handle;
-
- if (!buf->bo)
- goto err;
-
- drm_intel_bo_get_tiling(buf->bo, &tile, &swizzle);
- if (tile != INTEL_TILE_NONE)
- buf->map_gtt = TRUE;
-
- return (struct intel_buffer *)buf;
-
-err:
- FREE(buf);
- return NULL;
-}
-
-
-/*
- * Exported functions
- */
-
-
-static struct pipe_texture *
-intel_drm_texture_from_shared_handle(struct drm_api *api,
- struct pipe_screen *screen,
- struct pipe_texture *templ,
- const char* name,
- unsigned pitch,
- unsigned handle)
-{
- struct intel_drm_winsys *idws = intel_drm_winsys(i915_screen(screen)->iws);
- struct intel_buffer *buffer;
-
- buffer = intel_drm_buffer_from_handle(idws, name, handle);
- if (!buffer)
- return NULL;
-
- return i915_texture_blanket_intel(screen, templ, pitch, buffer);
-}
-
-static boolean
-intel_drm_shared_handle_from_texture(struct drm_api *api,
- struct pipe_screen *screen,
- struct pipe_texture *texture,
- unsigned *pitch,
- unsigned *handle)
-{
- struct intel_drm_buffer *buf = NULL;
- struct intel_buffer *buffer = NULL;
- if (!i915_get_texture_buffer_intel(texture, &buffer, pitch))
- return FALSE;
-
- buf = intel_drm_buffer(buffer);
- if (!buf->flinked) {
- if (drm_intel_bo_flink(buf->bo, &buf->flink))
- return FALSE;
- buf->flinked = TRUE;
- }
-
- *handle = buf->flink;
-
- return TRUE;
-}
-
-static boolean
-intel_drm_local_handle_from_texture(struct drm_api *api,
- struct pipe_screen *screen,
- struct pipe_texture *texture,
- unsigned *pitch,
- unsigned *handle)
-{
- struct intel_buffer *buffer = NULL;
- if (!i915_get_texture_buffer_intel(texture, &buffer, pitch))
- return FALSE;
-
- *handle = intel_drm_buffer(buffer)->bo->handle;
-
- return TRUE;
-}
-
static void
intel_drm_winsys_destroy(struct intel_winsys *iws)
{
@@ -192,9 +99,6 @@ struct drm_api intel_drm_api =
.name = "i915",
.driver_name = "i915",
.create_screen = intel_drm_create_screen,
- .texture_from_shared_handle = intel_drm_texture_from_shared_handle,
- .shared_handle_from_texture = intel_drm_shared_handle_from_texture,
- .local_handle_from_texture = intel_drm_local_handle_from_texture,
.destroy = destroy,
};
diff --git a/src/gallium/winsys/drm/intel/gem/intel_drm_buffer.c b/src/gallium/winsys/drm/intel/gem/intel_drm_buffer.c
index ac4dd6e00e9..cb4f92a3b17 100644
--- a/src/gallium/winsys/drm/intel/gem/intel_drm_buffer.c
+++ b/src/gallium/winsys/drm/intel/gem/intel_drm_buffer.c
@@ -1,4 +1,5 @@
+#include "state_tracker/drm_api.h"
#include "intel_drm_winsys.h"
#include "util/u_memory.h"
@@ -52,6 +53,66 @@ err:
return NULL;
}
+static struct intel_buffer *
+intel_drm_buffer_from_handle(struct intel_winsys *iws,
+ struct winsys_handle *whandle,
+ unsigned *stride)
+{
+ struct intel_drm_winsys *idws = intel_drm_winsys(iws);
+ struct intel_drm_buffer *buf = CALLOC_STRUCT(intel_drm_buffer);
+ uint32_t tile = 0, swizzle = 0;
+
+ if (!buf)
+ return NULL;
+
+ buf->magic = 0xDEAD1337;
+ buf->bo = drm_intel_bo_gem_create_from_name(idws->pools.gem, "gallium3d_from_handle", whandle->handle);
+ buf->flinked = TRUE;
+ buf->flink = whandle->handle;
+
+ if (!buf->bo)
+ goto err;
+
+ drm_intel_bo_get_tiling(buf->bo, &tile, &swizzle);
+ if (tile != INTEL_TILE_NONE)
+ buf->map_gtt = TRUE;
+
+ *stride = whandle->stride;
+
+ return (struct intel_buffer *)buf;
+
+err:
+ FREE(buf);
+ return NULL;
+}
+
+static boolean
+intel_drm_buffer_get_handle(struct intel_winsys *iws,
+ struct intel_buffer *buffer,
+ struct winsys_handle *whandle,
+ unsigned stride)
+{
+ struct intel_drm_buffer *buf = intel_drm_buffer(buffer);
+
+ if (whandle->type == DRM_API_HANDLE_TYPE_SHARED) {
+ if (!buf->flinked) {
+ if (drm_intel_bo_flink(buf->bo, &buf->flink))
+ return FALSE;
+ buf->flinked = TRUE;
+ }
+
+ whandle->handle = buf->flink;
+ } else if (whandle->type == DRM_API_HANDLE_TYPE_KMS) {
+ whandle->handle = buf->bo->handle;
+ } else {
+ assert(!"unknown usage");
+ return FALSE;
+ }
+
+ whandle->stride = stride;
+ return TRUE;
+}
+
static int
intel_drm_buffer_set_fence_reg(struct intel_winsys *iws,
struct intel_buffer *buffer,
@@ -146,6 +207,8 @@ void
intel_drm_winsys_init_buffer_functions(struct intel_drm_winsys *idws)
{
idws->base.buffer_create = intel_drm_buffer_create;
+ idws->base.buffer_from_handle = intel_drm_buffer_from_handle;
+ idws->base.buffer_get_handle = intel_drm_buffer_get_handle;
idws->base.buffer_set_fence_reg = intel_drm_buffer_set_fence_reg;
idws->base.buffer_map = intel_drm_buffer_map;
idws->base.buffer_unmap = intel_drm_buffer_unmap;
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 0d05f316c42..21517b4bb54 100644
--- a/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
+++ b/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
@@ -21,9 +21,10 @@ dri_surface_from_handle(struct drm_api *api, struct pipe_screen *pscreen,
struct pipe_surface *ps = NULL;
struct pipe_texture *pt = NULL;
struct pipe_texture tmpl;
+ struct winsys_handle whandle;
memset(&tmpl, 0, sizeof(tmpl));
- tmpl.tex_usage = PIPE_TEXTURE_USAGE_PRIMARY;
+ tmpl.tex_usage = PIPE_TEXTURE_USAGE_SCANOUT;
tmpl.target = PIPE_TEXTURE_2D;
tmpl.last_level = 0;
tmpl.depth0 = 1;
@@ -31,8 +32,11 @@ dri_surface_from_handle(struct drm_api *api, struct pipe_screen *pscreen,
tmpl.width0 = width;
tmpl.height0 = height;
- pt = api->texture_from_shared_handle(api, pscreen, &tmpl,
- "front buffer", pitch, handle);
+ memset(&whandle, 0, sizeof(whandle));
+ whandle.stride = pitch;
+ whandle.handle = handle;
+
+ pt = pscreen->texture_from_handle(pscreen, &tmpl, &whandle);
if (!pt)
return NULL;
@@ -142,74 +146,10 @@ nouveau_drm_create_screen(struct drm_api *api, int fd,
return nvws->pscreen;
}
-static struct pipe_texture *
-nouveau_drm_pt_from_name(struct drm_api *api, struct pipe_screen *pscreen,
- struct pipe_texture *templ, const char *name,
- unsigned stride, unsigned handle)
-{
- struct nouveau_device *dev = nouveau_screen(pscreen)->device;
- struct pipe_texture *pt;
- struct pipe_buffer *pb;
- int ret;
-
- pb = CALLOC(1, sizeof(struct pipe_buffer) + sizeof(struct nouveau_bo*));
- if (!pb)
- return NULL;
-
- ret = nouveau_bo_handle_ref(dev, handle, (struct nouveau_bo**)(pb+1));
- if (ret) {
- debug_printf("%s: ref name 0x%08x failed with %d\n",
- __func__, handle, ret);
- FREE(pb);
- return NULL;
- }
-
- pipe_reference_init(&pb->reference, 1);
- pb->screen = pscreen;
- pb->alignment = 0;
- pb->usage = PIPE_BUFFER_USAGE_GPU_READ_WRITE |
- PIPE_BUFFER_USAGE_CPU_READ_WRITE;
- pb->size = nouveau_bo(pb)->size;
- pt = pscreen->texture_blanket(pscreen, templ, &stride, pb);
- pipe_buffer_reference(&pb, NULL);
- return pt;
-}
-
-static boolean
-nouveau_drm_name_from_pt(struct drm_api *api, struct pipe_screen *pscreen,
- struct pipe_texture *pt, unsigned *stride,
- unsigned *handle)
-{
- struct nouveau_miptree *mt = nouveau_miptree(pt);
-
- if (!mt || !mt->bo)
- return false;
-
- return nouveau_bo_handle_get(mt->bo, handle) == 0;
-}
-
-static boolean
-nouveau_drm_handle_from_pt(struct drm_api *api, struct pipe_screen *pscreen,
- struct pipe_texture *pt, unsigned *stride,
- unsigned *handle)
-{
- struct nouveau_miptree *mt = nouveau_miptree(pt);
-
- if (!mt || !mt->bo)
- return false;
-
- *handle = mt->bo->handle;
- *stride = util_format_get_stride(mt->base.format, mt->base.width0);
- return true;
-}
-
struct drm_api drm_api_hooks = {
.name = "nouveau",
.driver_name = "nouveau",
.create_screen = nouveau_drm_create_screen,
- .texture_from_shared_handle = nouveau_drm_pt_from_name,
- .shared_handle_from_texture = nouveau_drm_name_from_pt,
- .local_handle_from_texture = nouveau_drm_handle_from_pt,
};
struct drm_api *
diff --git a/src/gallium/winsys/drm/radeon/core/radeon_buffer.c b/src/gallium/winsys/drm/radeon/core/radeon_buffer.c
index e5c69199330..daa032af6f2 100644
--- a/src/gallium/winsys/drm/radeon/core/radeon_buffer.c
+++ b/src/gallium/winsys/drm/radeon/core/radeon_buffer.c
@@ -264,6 +264,75 @@ static int radeon_fence_finish(struct pipe_winsys *ws,
return 0;
}
+/* Create a buffer from a handle. */
+static struct pipe_buffer* radeon_buffer_from_handle(struct radeon_winsys *radeon_ws,
+ struct pipe_screen *screen,
+ struct winsys_handle *whandle,
+ unsigned *stride)
+{
+ struct radeon_bo_manager* bom = radeon_ws->priv->bom;
+ struct radeon_pipe_buffer* radeon_buffer;
+ struct radeon_bo* bo = NULL;
+
+ bo = radeon_bo_open(bom, whandle->handle, 0, 0, 0, 0);
+ if (bo == NULL) {
+ return NULL;
+ }
+
+ radeon_buffer = CALLOC_STRUCT(radeon_pipe_buffer);
+ if (radeon_buffer == NULL) {
+ radeon_bo_unref(bo);
+ return NULL;
+ }
+
+ pipe_reference_init(&radeon_buffer->base.reference, 1);
+ radeon_buffer->base.screen = screen;
+ radeon_buffer->base.usage = PIPE_BUFFER_USAGE_PIXEL;
+ radeon_buffer->bo = bo;
+
+ *stride = whandle->stride;
+
+ return &radeon_buffer->base;
+}
+
+static boolean radeon_buffer_get_handle(struct radeon_winsys *radeon_ws,
+ struct pipe_buffer *buffer,
+ unsigned stride,
+ struct winsys_handle *whandle)
+{
+ int retval, fd;
+ struct drm_gem_flink flink;
+ struct radeon_pipe_buffer* radeon_buffer;
+
+ radeon_buffer = (struct radeon_pipe_buffer*)buffer;
+
+
+ if (whandle->type == DRM_API_HANDLE_TYPE_SHARED) {
+ if (!radeon_buffer->flinked) {
+ fd = radeon_ws->priv->fd;
+
+ flink.handle = radeon_buffer->bo->handle;
+
+ retval = ioctl(fd, DRM_IOCTL_GEM_FLINK, &flink);
+ if (retval) {
+ debug_printf("radeon: DRM_IOCTL_GEM_FLINK failed, error %d\n",
+ retval);
+ return FALSE;
+ }
+
+ radeon_buffer->flink = flink.name;
+ radeon_buffer->flinked = TRUE;
+ }
+
+ whandle->handle = radeon_buffer->flink;
+ } else if (whandle->type == DRM_API_HANDLE_TYPE_KMS) {
+ whandle->handle = ((struct radeon_pipe_buffer*)buffer)->bo->handle;
+ }
+ whandle->stride = stride;
+
+ return TRUE;
+}
+
struct radeon_winsys* radeon_pipe_winsys(int fd)
{
struct radeon_winsys* radeon_ws;
@@ -298,6 +367,8 @@ struct radeon_winsys* radeon_pipe_winsys(int fd)
radeon_ws->base.get_name = radeon_get_name;
radeon_ws->buffer_set_tiling = radeon_buffer_set_tiling;
+ radeon_ws->buffer_from_handle = radeon_buffer_from_handle;
+ radeon_ws->buffer_get_handle = radeon_buffer_get_handle;
return radeon_ws;
}
diff --git a/src/gallium/winsys/drm/radeon/core/radeon_drm.c b/src/gallium/winsys/drm/radeon/core/radeon_drm.c
index e817a26da6d..97edb6a47e3 100644
--- a/src/gallium/winsys/drm/radeon/core/radeon_drm.c
+++ b/src/gallium/winsys/drm/radeon/core/radeon_drm.c
@@ -148,124 +148,6 @@ struct pipe_screen* radeon_create_screen(struct drm_api* api,
}
}
-
-boolean radeon_buffer_from_texture(struct drm_api* api,
- struct pipe_screen* screen,
- struct pipe_texture* texture,
- struct pipe_buffer** buffer,
- unsigned* stride)
-{
- /* XXX fix this */
- return r300_get_texture_buffer(screen, texture, buffer, stride);
-}
-
-/* Create a buffer from a handle. */
-/* XXX what's up with name? */
-struct pipe_buffer* radeon_buffer_from_handle(struct drm_api* api,
- struct pipe_screen* screen,
- const char* name,
- unsigned handle)
-{
- struct radeon_bo_manager* bom =
- ((struct radeon_winsys*)screen->winsys)->priv->bom;
- struct radeon_pipe_buffer* radeon_buffer;
- struct radeon_bo* bo = NULL;
-
- bo = radeon_bo_open(bom, handle, 0, 0, 0, 0);
- if (bo == NULL) {
- return NULL;
- }
-
- radeon_buffer = CALLOC_STRUCT(radeon_pipe_buffer);
- if (radeon_buffer == NULL) {
- radeon_bo_unref(bo);
- return NULL;
- }
-
- pipe_reference_init(&radeon_buffer->base.reference, 1);
- radeon_buffer->base.screen = screen;
- radeon_buffer->base.usage = PIPE_BUFFER_USAGE_PIXEL;
- radeon_buffer->bo = bo;
- return &radeon_buffer->base;
-}
-
-static struct pipe_texture*
-radeon_texture_from_shared_handle(struct drm_api *api,
- struct pipe_screen *screen,
- struct pipe_texture *templ,
- const char *name,
- unsigned stride,
- unsigned handle)
-{
- struct pipe_buffer *buffer;
- struct pipe_texture *blanket;
-
- buffer = radeon_buffer_from_handle(api, screen, name, handle);
- if (!buffer) {
- return NULL;
- }
-
- blanket = screen->texture_blanket(screen, templ, &stride, buffer);
-
- pipe_buffer_reference(&buffer, NULL);
-
- return blanket;
-}
-
-static boolean radeon_shared_handle_from_texture(struct drm_api *api,
- struct pipe_screen *screen,
- struct pipe_texture *texture,
- unsigned *stride,
- unsigned *handle)
-{
- int retval, fd;
- struct drm_gem_flink flink;
- struct radeon_pipe_buffer* radeon_buffer;
- struct pipe_buffer *buffer = NULL;
-
- if (!radeon_buffer_from_texture(api, screen, texture, &buffer, stride)) {
- return FALSE;
- }
-
- radeon_buffer = (struct radeon_pipe_buffer*)buffer;
- if (!radeon_buffer->flinked) {
- fd = ((struct radeon_winsys*)screen->winsys)->priv->fd;
-
- flink.handle = radeon_buffer->bo->handle;
-
- retval = ioctl(fd, DRM_IOCTL_GEM_FLINK, &flink);
- if (retval) {
- debug_printf("radeon: DRM_IOCTL_GEM_FLINK failed, error %d\n",
- retval);
- return FALSE;
- }
-
- radeon_buffer->flink = flink.name;
- radeon_buffer->flinked = TRUE;
- }
-
- *handle = radeon_buffer->flink;
- return TRUE;
-}
-
-static boolean radeon_local_handle_from_texture(struct drm_api *api,
- struct pipe_screen *screen,
- struct pipe_texture *texture,
- unsigned *stride,
- unsigned *handle)
-{
- struct pipe_buffer *buffer = NULL;
- if (!radeon_buffer_from_texture(api, screen, texture, &buffer, stride)) {
- return FALSE;
- }
-
- *handle = ((struct radeon_pipe_buffer*)buffer)->bo->handle;
-
- pipe_buffer_reference(&buffer, NULL);
-
- return TRUE;
-}
-
static void radeon_drm_api_destroy(struct drm_api *api)
{
return;
@@ -275,9 +157,6 @@ struct drm_api drm_api_hooks = {
.name = "radeon",
.driver_name = "radeon",
.create_screen = radeon_create_screen,
- .texture_from_shared_handle = radeon_texture_from_shared_handle,
- .shared_handle_from_texture = radeon_shared_handle_from_texture,
- .local_handle_from_texture = radeon_local_handle_from_texture,
.destroy = radeon_drm_api_destroy,
};
diff --git a/src/gallium/winsys/drm/radeon/core/radeon_drm.h b/src/gallium/winsys/drm/radeon/core/radeon_drm.h
index f62a9b80485..78451b6f011 100644
--- a/src/gallium/winsys/drm/radeon/core/radeon_drm.h
+++ b/src/gallium/winsys/drm/radeon/core/radeon_drm.h
@@ -37,28 +37,6 @@ struct pipe_screen* radeon_create_screen(struct drm_api* api,
int drmFB,
struct drm_create_screen_arg *arg);
-
-boolean radeon_buffer_from_texture(struct drm_api* api,
- struct pipe_screen* screen,
- struct pipe_texture* texture,
- struct pipe_buffer** buffer,
- unsigned* stride);
-
-struct pipe_buffer* radeon_buffer_from_handle(struct drm_api* api,
- struct pipe_screen* screen,
- const char* name,
- unsigned handle);
-
-boolean radeon_handle_from_buffer(struct drm_api* api,
- struct pipe_screen* screen,
- struct pipe_buffer* buffer,
- unsigned* handle);
-
-boolean radeon_global_handle_from_buffer(struct drm_api* api,
- struct pipe_screen* screen,
- struct pipe_buffer* buffer,
- unsigned* handle);
-
void radeon_destroy_drm_api(struct drm_api* api);
/* Guess at whether this chipset should use r300g.
diff --git a/src/gallium/winsys/drm/radeon/core/radeon_winsys.h b/src/gallium/winsys/drm/radeon/core/radeon_winsys.h
index 4901080ca7b..37eeb459791 100644
--- a/src/gallium/winsys/drm/radeon/core/radeon_winsys.h
+++ b/src/gallium/winsys/drm/radeon/core/radeon_winsys.h
@@ -56,6 +56,18 @@ struct radeon_winsys {
/* VRAM size. */
uint32_t vram_size;
+ /* Create a buffer from a winsys handle. */
+ struct pipe_buffer *(*buffer_from_handle)(struct radeon_winsys *winsys,
+ struct pipe_screen *screen,
+ struct winsys_handle *whandle,
+ unsigned *stride);
+
+ /* Get the handle from a buffer. */
+ boolean (*buffer_get_handle)(struct radeon_winsys *winsys,
+ struct pipe_buffer *buffer,
+ unsigned stride,
+ struct winsys_handle *whandle);
+
/* Add a pipe_buffer to the list of buffer objects to validate. */
boolean (*add_buffer)(struct radeon_winsys* winsys,
struct pipe_buffer* pbuffer,
diff --git a/src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c b/src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c
index a7c6e88b9eb..657544dcb21 100644
--- a/src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c
+++ b/src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c
@@ -44,6 +44,16 @@
#include <stdio.h>
+static struct svga_winsys_surface *
+vmw_drm_surface_from_handle(struct svga_winsys_screen *sws,
+ struct winsys_handle *whandle,
+ SVGA3dSurfaceFormat *format);
+static boolean
+vmw_drm_surface_get_handle(struct svga_winsys_screen *sws,
+ struct svga_winsys_surface *surface,
+ unsigned stride,
+ struct winsys_handle *whandle);
+
static struct dri1_api dri1_api_hooks;
static struct dri1_api_version ddx_required = { 0, 1, 0 };
static struct dri1_api_version ddx_compat = { 0, 0, 0 };
@@ -129,7 +139,12 @@ vmw_drm_create_screen(struct drm_api *drm_api,
&drm_compat, "use old scanout field (not a error)"))
use_old_scanout_flag = TRUE;
dri1->api = &dri1_api_hooks;
+#if 0
break;
+#else
+ assert(!"No dri 1 support for now\n");
+ return NULL;
+#endif
default:
return NULL;
}
@@ -139,6 +154,10 @@ vmw_drm_create_screen(struct drm_api *drm_api,
if (!vws)
goto out_no_vws;
+ /* XXX do this properly */
+ vws->base.surface_from_handle = vmw_drm_surface_from_handle;
+ vws->base.surface_get_handle = vmw_drm_surface_get_handle;
+
screen = svga_screen_create( &vws->base );
if (!screen)
goto out_no_screen;
@@ -200,6 +219,7 @@ vmw_dri1_present_locked(struct pipe_context *locked_pipe,
const struct drm_clip_rect *bbox,
struct pipe_fence_handle **p_fence)
{
+#if 0
struct svga_winsys_surface *srf =
svga_screen_texture_get_winsys_surface(surf->texture);
struct vmw_svga_winsys_surface *vsrf = vmw_svga_winsys_surface(srf);
@@ -246,21 +266,19 @@ vmw_dri1_present_locked(struct pipe_context *locked_pipe,
*p_fence = (visible) ? vmw_pipe_fence(fence_seq) : NULL;
vmw_svga_winsys_surface_reference(&vsrf, NULL);
+#else
+ assert(!"No dri 1 support for now\n");
+#endif
}
-static struct pipe_texture *
-vmw_drm_texture_from_handle(struct drm_api *drm_api,
- struct pipe_screen *screen,
- struct pipe_texture *templat,
- const char *name,
- unsigned stride,
- unsigned handle)
+static struct svga_winsys_surface *
+vmw_drm_surface_from_handle(struct svga_winsys_screen *sws,
+ struct winsys_handle *whandle,
+ SVGA3dSurfaceFormat *format)
{
struct vmw_svga_winsys_surface *vsrf;
struct svga_winsys_surface *ssrf;
- struct vmw_winsys_screen *vws =
- vmw_winsys_screen(svga_winsys_screen(screen));
- struct pipe_texture *tex;
+ struct vmw_winsys_screen *vws = vmw_winsys_screen(sws);
union drm_vmw_surface_reference_arg arg;
struct drm_vmw_surface_arg *req = &arg.req;
struct drm_vmw_surface_create_req *rep = &arg.rep;
@@ -273,7 +291,7 @@ vmw_drm_texture_from_handle(struct drm_api *drm_api,
*/
memset(&arg, 0, sizeof(arg));
- req->sid = handle;
+ req->sid = whandle->handle;
ret = drmCommandWriteRead(vws->ioctl.drm_fd, DRM_VMW_REF_SURFACE,
&arg, sizeof(arg));
@@ -281,14 +299,14 @@ vmw_drm_texture_from_handle(struct drm_api *drm_api,
if (ret) {
fprintf(stderr, "Failed referencing shared surface. SID %d.\n"
"Error %d (%s).\n",
- handle, ret, strerror(-ret));
+ whandle->handle, ret, strerror(-ret));
return NULL;
}
if (rep->mip_levels[0] != 1) {
fprintf(stderr, "Incorrect number of mipmap levels on shared surface."
" SID %d, levels %d\n",
- handle, rep->mip_levels[0]);
+ whandle->handle, rep->mip_levels[0]);
goto out_mip;
}
@@ -296,7 +314,7 @@ vmw_drm_texture_from_handle(struct drm_api *drm_api,
if (rep->mip_levels[i] != 0) {
fprintf(stderr, "Incorrect number of faces levels on shared surface."
" SID %d, face %d present.\n",
- handle, i);
+ whandle->handle, i);
goto out_mip;
}
}
@@ -308,38 +326,32 @@ vmw_drm_texture_from_handle(struct drm_api *drm_api,
pipe_reference_init(&vsrf->refcnt, 1);
p_atomic_set(&vsrf->validated, 0);
vsrf->screen = vws;
- vsrf->sid = handle;
+ vsrf->sid = whandle->handle;
ssrf = svga_winsys_surface(vsrf);
- tex = svga_screen_texture_wrap_surface(screen, templat, rep->format, ssrf);
- if (!tex)
- vmw_svga_winsys_surface_reference(&vsrf, NULL);
+ *format = rep->format;
+
+ return ssrf;
- return tex;
- out_mip:
- vmw_ioctl_surface_destroy(vws, handle);
+out_mip:
+ vmw_ioctl_surface_destroy(vws, whandle->handle);
return NULL;
}
static boolean
-vmw_drm_handle_from_texture(struct drm_api *drm_api,
- struct pipe_screen *screen,
- struct pipe_texture *texture,
- unsigned *stride,
- unsigned *handle)
+vmw_drm_surface_get_handle(struct svga_winsys_screen *sws,
+ struct svga_winsys_surface *surface,
+ unsigned stride,
+ struct winsys_handle *whandle)
{
- struct svga_winsys_surface *surface =
- svga_screen_texture_get_winsys_surface(texture);
struct vmw_svga_winsys_surface *vsrf;
if (!surface)
return FALSE;
vsrf = vmw_svga_winsys_surface(surface);
- *handle = vsrf->sid;
- *stride = util_format_get_nblocksx(texture->format, texture->width0) *
- util_format_get_blocksize(texture->format);
+ whandle->handle = vsrf->sid;
+ whandle->stride = stride;
- vmw_svga_winsys_surface_reference(&vsrf, NULL);
return TRUE;
}
@@ -353,9 +365,6 @@ static struct drm_api vmw_drm_api_hooks = {
.name = "vmwgfx",
.driver_name = "vmwgfx",
.create_screen = vmw_drm_create_screen,
- .texture_from_shared_handle = vmw_drm_texture_from_handle,
- .shared_handle_from_texture = vmw_drm_handle_from_texture,
- .local_handle_from_texture = vmw_drm_handle_from_texture,
};
struct drm_api* drm_api_create()
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 29d589cdb90..5b0f335db6a 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 f9fe9a25db4..e47db82b70f 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 eed9a8c4723..1b94a56fd13 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/glxcmds.c b/src/glx/glxcmds.c
index 4fbc6b6ab21..49cbce72f8a 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 c2de1a3fff8..b5657baf2e8 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/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 8e229bbe388..b97b760f181 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/i810/Makefile b/src/mesa/drivers/dri/i810/Makefile
index 3874faee518..54a837d5ea9 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/server/i810_dri.c b/src/mesa/drivers/dri/i810/server/i810_dri.c
deleted file mode 100644
index f52797c5ed2..00000000000
--- 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 ([email protected])
- */
-
-#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 dc15ae425c9..5b49d0c77c6 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 b755d48678b..d7eb9c2d44b 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 7525f9f2e05..e8f7e378ec7 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 a8df77c600e..be96419ff19 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_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c
index 3ee4c8653a9..a1ab8f8b6d2 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/server/intel_dri.c b/src/mesa/drivers/dri/i915/server/intel_dri.c
deleted file mode 120000
index effdd26448a..00000000000
--- 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 f98a1a27db2..a242580273f 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 6f2ead793d2..4e78b08cfed 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 f0a4e8ad65d..71a43577bfd 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_sf.c b/src/mesa/drivers/dri/i965/brw_sf.c
index 8e6839b8120..57d1c29ade1 100644
--- a/src/mesa/drivers/dri/i965/brw_sf.c
+++ b/src/mesa/drivers/dri/i965/brw_sf.c
@@ -46,7 +46,6 @@
static void compile_sf_prog( struct brw_context *brw,
struct brw_sf_prog_key *key )
{
- GLcontext *ctx = &brw->intel.ctx;
struct brw_sf_compile c;
const GLuint *program;
GLuint program_size;
@@ -69,20 +68,14 @@ static void compile_sf_prog( struct brw_context *brw,
/* Construct map from attribute number to position in the vertex.
*/
- for (i = idx = 0; i < VERT_RESULT_MAX; i++)
+ for (i = idx = 0; i < VERT_RESULT_MAX; i++) {
if (c.key.attrs & BITFIELD64_BIT(i)) {
c.attr_to_idx[i] = idx;
c.idx_to_attr[idx] = i;
- if (i >= VERT_RESULT_TEX0 && i <= VERT_RESULT_TEX7) {
- c.point_attrs[i].CoordReplace =
- ctx->Point.CoordReplace[i - VERT_RESULT_TEX0];
- }
- else {
- c.point_attrs[i].CoordReplace = GL_FALSE;
- }
idx++;
}
-
+ }
+
/* Which primitive? Or all three?
*/
switch (key->primitive) {
@@ -162,6 +155,14 @@ static void upload_sf_prog(struct brw_context *brw)
}
key.do_point_sprite = ctx->Point.PointSprite;
+ if (key.do_point_sprite) {
+ int i;
+
+ for (i = 0; i < 8; i++) {
+ if (ctx->Point.CoordReplace[i])
+ key.point_sprite_coord_replace |= (1 << i);
+ }
+ }
key.sprite_origin_lower_left = (ctx->Point.SpriteOrigin == GL_LOWER_LEFT);
/* _NEW_LIGHT */
key.do_flat_shading = (ctx->Light.ShadeModel == GL_FLAT);
diff --git a/src/mesa/drivers/dri/i965/brw_sf.h b/src/mesa/drivers/dri/i965/brw_sf.h
index 0ba731fac99..a0680a56f2c 100644
--- a/src/mesa/drivers/dri/i965/brw_sf.h
+++ b/src/mesa/drivers/dri/i965/brw_sf.h
@@ -46,6 +46,7 @@
struct brw_sf_prog_key {
GLbitfield64 attrs;
+ uint8_t point_sprite_coord_replace;
GLuint primitive:2;
GLuint do_twoside_color:1;
GLuint do_flat_shading:1;
@@ -56,10 +57,6 @@ struct brw_sf_prog_key {
GLuint pad:24;
};
-struct brw_sf_point_tex {
- GLboolean CoordReplace;
-};
-
struct brw_sf_compile {
struct brw_compile func;
struct brw_sf_prog_key key;
@@ -100,7 +97,6 @@ struct brw_sf_compile {
GLubyte attr_to_idx[VERT_RESULT_MAX];
GLubyte idx_to_attr[VERT_RESULT_MAX];
- struct brw_sf_point_tex point_attrs[VERT_RESULT_MAX];
};
diff --git a/src/mesa/drivers/dri/i965/brw_sf_emit.c b/src/mesa/drivers/dri/i965/brw_sf_emit.c
index bb08055e3bb..56f7c986e78 100644
--- a/src/mesa/drivers/dri/i965/brw_sf_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_sf_emit.c
@@ -354,6 +354,33 @@ static GLboolean calculate_masks( struct brw_sf_compile *c,
return is_last_attr;
}
+/* Calculates the predicate control for which channels of a reg
+ * (containing 2 attrs) to do point sprite coordinate replacement on.
+ */
+static uint16_t
+calculate_point_sprite_mask(struct brw_sf_compile *c, GLuint reg)
+{
+ int attr1, attr2;
+ uint16_t pc = 0;
+
+ attr1 = c->idx_to_attr[reg * 2];
+ if (attr1 >= VERT_RESULT_TEX0 && attr1 <= VERT_RESULT_TEX7) {
+ if (c->key.point_sprite_coord_replace & (1 << (attr1 - VERT_RESULT_TEX0)))
+ pc |= 0x0f;
+ }
+
+ if (reg * 2 + 1 < c->nr_setup_attrs) {
+ attr2 = c->idx_to_attr[reg * 2 + 1];
+ if (attr2 >= VERT_RESULT_TEX0 && attr2 <= VERT_RESULT_TEX7) {
+ if (c->key.point_sprite_coord_replace & (1 << (attr2 -
+ VERT_RESULT_TEX0)))
+ pc |= 0xf0;
+ }
+ }
+
+ return pc;
+}
+
void brw_emit_tri_setup( struct brw_sf_compile *c, GLboolean allocate)
@@ -529,22 +556,27 @@ void brw_emit_point_sprite_setup( struct brw_sf_compile *c, GLboolean allocate)
copy_z_inv_w(c);
for (i = 0; i < c->nr_setup_regs; i++)
{
- struct brw_sf_point_tex *tex = &c->point_attrs[c->idx_to_attr[2*i]];
struct brw_reg a0 = offset(c->vert[0], i);
- GLushort pc, pc_persp, pc_linear;
+ GLushort pc, pc_persp, pc_linear, pc_coord_replace;
GLboolean last = calculate_masks(c, i, &pc, &pc_persp, &pc_linear);
-
- if (pc_persp)
- {
- if (!tex->CoordReplace) {
- brw_set_predicate_control_flag_value(p, pc_persp);
- brw_MUL(p, a0, a0, c->inv_w[0]);
- }
+
+ pc_coord_replace = calculate_point_sprite_mask(c, i);
+ pc_persp &= ~pc_coord_replace;
+
+ if (pc_persp) {
+ brw_set_predicate_control_flag_value(p, pc_persp);
+ brw_MUL(p, a0, a0, c->inv_w[0]);
}
- if (tex->CoordReplace) {
- /* Caculate 1.0/PointWidth */
- brw_math(&c->func,
+ /* Point sprite coordinate replacement: A texcoord with this
+ * enabled gets replaced with the value (x, y, 0, 1) where x and
+ * y vary from 0 to 1 across the horizontal and vertical of the
+ * point.
+ */
+ if (pc_coord_replace) {
+ brw_set_predicate_control_flag_value(p, pc_coord_replace);
+ /* Caculate 1.0/PointWidth */
+ brw_math(&c->func,
c->tmp,
BRW_MATH_FUNCTION_INV,
BRW_MATH_SATURATE_NONE,
@@ -553,50 +585,51 @@ void brw_emit_point_sprite_setup( struct brw_sf_compile *c, GLboolean allocate)
BRW_MATH_DATA_SCALAR,
BRW_MATH_PRECISION_FULL);
- if (c->key.sprite_origin_lower_left) {
- brw_MUL(p, c->m1Cx, c->tmp, c->inv_w[0]);
- brw_MOV(p, vec1(suboffset(c->m1Cx, 1)), brw_imm_f(0.0));
- brw_MUL(p, c->m2Cy, c->tmp, negate(c->inv_w[0]));
- brw_MOV(p, vec1(suboffset(c->m2Cy, 0)), brw_imm_f(0.0));
- } else {
- brw_MUL(p, c->m1Cx, c->tmp, c->inv_w[0]);
- brw_MOV(p, vec1(suboffset(c->m1Cx, 1)), brw_imm_f(0.0));
- brw_MUL(p, c->m2Cy, c->tmp, c->inv_w[0]);
- brw_MOV(p, vec1(suboffset(c->m2Cy, 0)), brw_imm_f(0.0));
- }
- } else {
- brw_MOV(p, c->m1Cx, brw_imm_ud(0));
- brw_MOV(p, c->m2Cy, brw_imm_ud(0));
- }
+ brw_set_access_mode(p, BRW_ALIGN_16);
- {
- brw_set_predicate_control_flag_value(p, pc);
- if (tex->CoordReplace) {
- if (c->key.sprite_origin_lower_left) {
- brw_MUL(p, c->m3C0, c->inv_w[0], brw_imm_f(1.0));
- brw_MOV(p, vec1(suboffset(c->m3C0, 0)), brw_imm_f(0.0));
- }
- else
- brw_MOV(p, c->m3C0, brw_imm_f(0.0));
+ /* dA/dx, dA/dy */
+ brw_MOV(p, c->m1Cx, brw_imm_f(0.0));
+ brw_MOV(p, c->m2Cy, brw_imm_f(0.0));
+ brw_MOV(p, brw_writemask(c->m1Cx, WRITEMASK_X), c->tmp);
+ if (c->key.sprite_origin_lower_left) {
+ brw_MOV(p, brw_writemask(c->m2Cy, WRITEMASK_Y), negate(c->tmp));
} else {
- brw_MOV(p, c->m3C0, a0); /* constant value */
+ brw_MOV(p, brw_writemask(c->m2Cy, WRITEMASK_Y), c->tmp);
}
- /* Copy m0..m3 to URB.
- */
- brw_urb_WRITE(p,
- brw_null_reg(),
- 0,
- brw_vec8_grf(0, 0),
- 0, /* allocate */
- 1, /* used */
- 4, /* msg len */
- 0, /* response len */
- last, /* eot */
- last, /* writes complete */
- i*4, /* urb destination offset */
- BRW_URB_SWIZZLE_TRANSPOSE);
+ /* attribute constant offset */
+ brw_MOV(p, c->m3C0, brw_imm_f(0.0));
+ if (c->key.sprite_origin_lower_left) {
+ brw_MOV(p, brw_writemask(c->m3C0, WRITEMASK_YW), brw_imm_f(1.0));
+ } else {
+ brw_MOV(p, brw_writemask(c->m3C0, WRITEMASK_W), brw_imm_f(1.0));
+ }
+
+ brw_set_access_mode(p, BRW_ALIGN_1);
}
+
+ if (pc & ~pc_coord_replace) {
+ brw_set_predicate_control_flag_value(p, pc & ~pc_coord_replace);
+ brw_MOV(p, c->m1Cx, brw_imm_ud(0));
+ brw_MOV(p, c->m2Cy, brw_imm_ud(0));
+ brw_MOV(p, c->m3C0, a0); /* constant value */
+ }
+
+
+ brw_set_predicate_control_flag_value(p, pc);
+ /* Copy m0..m3 to URB. */
+ brw_urb_WRITE(p,
+ brw_null_reg(),
+ 0,
+ brw_vec8_grf(0, 0),
+ 0, /* allocate */
+ 1, /* used */
+ 4, /* msg len */
+ 0, /* response len */
+ last, /* eot */
+ last, /* writes complete */
+ i*4, /* urb destination offset */
+ BRW_URB_SWIZZLE_TRANSPOSE);
}
}
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 ead623fc0ea..4007b5a15ce 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 27a2a3e8a7e..96a44bfbec7 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 c232cd27914..d7650af3d9d 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 a42067611ce..ce0bf0b97d2 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 42b41f3210c..f7acad69129 100644
--- a/src/mesa/drivers/dri/i965/gen6_cc.c
+++ b/src/mesa/drivers/dri/i965/gen6_cc.c
@@ -32,8 +32,9 @@
#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;
@@ -42,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;
@@ -86,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;
@@ -149,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);
@@ -172,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];
@@ -180,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;
@@ -210,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;
@@ -239,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 08e6753a910..8d96b44f1dc 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 211a6231c9f..fe597dfb945 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 e3552617691..1eb17ca627d 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 effdd26448a..00000000000
--- 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 a7bfd62b285..9768b0deee7 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);
@@ -234,6 +236,8 @@ intel_batchbuffer_emit_reloc_fenced(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);
diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.h b/src/mesa/drivers/dri/intel/intel_batchbuffer.h
index 79bdbc17ae1..e5ad2617ab9 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;
@@ -71,6 +73,17 @@ GLboolean intel_batchbuffer_emit_reloc_fenced(struct intel_batchbuffer *batch,
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
@@ -86,67 +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 { \
- assert((unsigned) (delta) < buf->size); \
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 6d6af863476..f2769aa3e8c 100644
--- a/src/mesa/drivers/dri/intel/intel_blit.c
+++ b/src/mesa/drivers/dri/intel/intel_blit.c
@@ -122,8 +122,8 @@ intelEmitCopyBlit(struct intel_context *intel,
intel_prepare_render(intel);
if (pass >= 2) {
- intel_bo_map_gtt_preferred(intel, dst_buffer, GL_TRUE);
- intel_bo_map_gtt_preferred(intel, src_buffer, GL_FALSE);
+ 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,
@@ -132,8 +132,8 @@ intelEmitCopyBlit(struct intel_context *intel,
(GLubyte *)src_buffer->virtual + src_offset,
src_pitch,
src_x, src_y);
- intel_bo_unmap_gtt_preferred(intel, src_buffer);
- intel_bo_unmap_gtt_preferred(intel, dst_buffer);
+ drm_intel_gem_bo_unmap_gtt(src_buffer);
+ drm_intel_gem_bo_unmap_gtt(dst_buffer);
return GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
index 312866d865d..103aaf2b956 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 ec379a77ace..d6a1ba69524 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;
diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h
index d20d44497e1..22736a93279 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 a9c75d44cf3..00000000000
--- 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 <[email protected]>
- *
- */
-
-/**
- * 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 e16c33b33d7..a1aac699c91 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 b388a3de2ef..a429f8d003d 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);
}
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.h b/src/mesa/drivers/dri/intel/intel_fbo.h
index 586dbbbb25a..72413f73694 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 a20ea5afdb7..4f14946ec72 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))
diff --git a/src/mesa/drivers/dri/intel/intel_regions.c b/src/mesa/drivers/dri/intel/intel_regions.c
index e3c0635e5ba..f042bcbc28c 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);
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index a42af71104a..6e4bb643651 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,11 @@ 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);
diff --git a/src/mesa/drivers/dri/intel/intel_screen.h b/src/mesa/drivers/dri/intel/intel_screen.h
index 1ce476dacaa..5863093f001 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 0072bb15fc3..fb5c01bc4dc 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 bad03398f68..00000000000
--- 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 <[email protected]>
- *
- */
-
-/**
- * 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 f3cc0fff5c8..4bb012dc65e 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 f586aee9929..bac36eeb569 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 3ad10d3d238..5f60e0ea4f3 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 e49c4214ad4..00000000000
--- 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 ([email protected])
-
- 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 a8f463e9fd0..c20fdece297 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/mga/Makefile b/src/mesa/drivers/dri/mga/Makefile
index 0cc329fb22d..92533bccc29 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/server/mga_dri.c b/src/mesa/drivers/dri/mga/server/mga_dri.c
deleted file mode 100644
index bc575e62ee8..00000000000
--- 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 <[email protected]>
- * Gareth Hughes <[email protected]>
- */
-
-#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 49e89335614..7be19b26fda 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 26297332732..502e01255cb 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 846478650e2..2ec3dc92420 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 e1871db0eb9..bc610451b40 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);
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.h b/src/mesa/drivers/dri/nouveau/nouveau_state.h
index d001fa259aa..d01d962c9f2 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 02c85807608..a365b977f29 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 1acd41de54d..a442425e448 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 aad1e491d2f..5e5e0c58742 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 89c6753694c..c191571a5f8 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 8e70c419ede..860d0aeb8f5 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 b5ab19b3bc0..d662712533b 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 05c36b4f8f5..6bd383ebcd3 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 68882ef05f2..a62cd807a91 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 6db14d83b83..406e24c455d 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 635b5c09968..db39ef70750 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 869acd6e317..d638541df9e 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 0d566064f67..43f8c723122 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 52c5a38a705..8144c9b43ff 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/server/r128_dri.c b/src/mesa/drivers/dri/r128/server/r128_dri.c
deleted file mode 100644
index 6e3db948af7..00000000000
--- 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 <[email protected]>
- * Rickard E. Faith <[email protected]>
- * Daryll Strauss <[email protected]>
- * Gareth Hughes <[email protected]>
- *
- */
-
-#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 14eb96c1bab..3f871005705 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 b56327dad5f..30757600934 100644
--- a/src/mesa/drivers/dri/r200/r200_blit.c
+++ b/src/mesa/drivers/dri/r200/r200_blit.c
@@ -211,19 +211,16 @@ static GLboolean validate_buffers(struct r200_context *r200,
struct radeon_bo *dst_bo)
{
int ret;
- 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_reset_bos(r200->radeon.cmdbuf.cs);
ret = radeon_cs_space_check_with_bo(r200->radeon.cmdbuf.cs,
- dst_bo, 0, RADEON_GEM_DOMAIN_VRAM);
+ src_bo, RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT, 0);
if (ret)
return GL_FALSE;
ret = radeon_cs_space_check_with_bo(r200->radeon.cmdbuf.cs,
- first_elem(&r200->radeon.dma.reserved)->bo,
- RADEON_GEM_DOMAIN_GTT, 0);
+ dst_bo, 0, RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT);
if (ret)
return GL_FALSE;
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 00000000000..d9836d7326e
--- /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 00000000000..d4bfe27da64
--- /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 00000000000..31074c581ea
--- /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 d05847d650f..00000000000
--- 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 04459c2ddfa..4257a32b89f 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 2bc761bc208..d870c7f852a 100644
--- a/src/mesa/drivers/dri/r300/r300_blit.c
+++ b/src/mesa/drivers/dri/r300/r300_blit.c
@@ -381,19 +381,16 @@ static GLboolean validate_buffers(struct r300_context *r300,
struct radeon_bo *dst_bo)
{
int ret;
- ret = radeon_cs_space_check_with_bo(r300->radeon.cmdbuf.cs,
- src_bo, RADEON_GEM_DOMAIN_VRAM, 0);
- if (ret)
- return GL_FALSE;
+
+ radeon_cs_space_reset_bos(r300->radeon.cmdbuf.cs);
ret = radeon_cs_space_check_with_bo(r300->radeon.cmdbuf.cs,
- dst_bo, 0, RADEON_GEM_DOMAIN_VRAM);
+ 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,
- first_elem(&r300->radeon.dma.reserved)->bo,
- RADEON_GEM_DOMAIN_GTT, 0);
+ dst_bo, 0, RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT);
if (ret)
return GL_FALSE;
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
index 4787bafc66a..6cfa5686f4a 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 df4cc11da42..ff35cd52753 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 },
@@ -456,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 78ab43a99f9..df7115e7dae 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 9d1ff6e2ba2..5979dedac4f 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_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c
index cbe4cb83047..129004fee78 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 00000000000..d9836d7326e
--- /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 00000000000..d4bfe27da64
--- /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 00000000000..31074c581ea
--- /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 d05847d650f..00000000000
--- 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 5d509415393..f76859d11e2 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 9d17463cae1..244fdc4ffbb 100644
--- a/src/mesa/drivers/dri/r600/r600_blit.c
+++ b/src/mesa/drivers/dri/r600/r600_blit.c
@@ -1533,13 +1533,15 @@ static GLboolean validate_buffers(context_t *rmesa,
{
int ret;
+ radeon_cs_space_reset_bos(rmesa->radeon.cmdbuf.cs);
+
ret = radeon_cs_space_check_with_bo(rmesa->radeon.cmdbuf.cs,
- src_bo, RADEON_GEM_DOMAIN_VRAM, 0);
+ src_bo, RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT, 0);
if (ret)
return GL_FALSE;
ret = radeon_cs_space_check_with_bo(rmesa->radeon.cmdbuf.cs,
- dst_bo, 0, RADEON_GEM_DOMAIN_VRAM);
+ dst_bo, 0, RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT);
if (ret)
return GL_FALSE;
@@ -1549,12 +1551,6 @@ static GLboolean validate_buffers(context_t *rmesa,
if (ret)
return GL_FALSE;
- ret = radeon_cs_space_check_with_bo(rmesa->radeon.cmdbuf.cs,
- first_elem(&rmesa->radeon.dma.reserved)->bo,
- RADEON_GEM_DOMAIN_GTT, 0);
- if (ret)
- return GL_FALSE;
-
return GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/r600/r600_context.c b/src/mesa/drivers/dri/r600/r600_context.c
index 3d6802e735b..134e97e7c33 100644
--- a/src/mesa/drivers/dri/r600/r600_context.c
+++ b/src/mesa/drivers/dri/r600/r600_context.c
@@ -140,6 +140,7 @@ static const struct dri_extension card_extensions[] = {
{"GL_NV_blend_square", NULL},
{"GL_NV_vertex_program", GL_NV_vertex_program_functions},
{"GL_SGIS_generate_mipmap", NULL},
+ {"GL_ARB_pixel_buffer_object", NULL},
{NULL, NULL}
/* *INDENT-ON* */
};
diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c
index 4ebdbbfad25..6f156b54096 100644
--- a/src/mesa/drivers/dri/r600/r700_state.c
+++ b/src/mesa/drivers/dri/r600/r700_state.c
@@ -911,10 +911,12 @@ static void r700PointParameter(GLcontext * ctx, GLenum pname, const GLfloat * pa
case GL_POINT_SIZE_MIN:
SETfield(r700->PA_SU_POINT_MINMAX.u32All, (int)(ctx->Point.MinSize * 8.0),
MIN_SIZE_shift, MIN_SIZE_mask);
+ r700PointSize(ctx, ctx->Point.Size);
break;
case GL_POINT_SIZE_MAX:
SETfield(r700->PA_SU_POINT_MINMAX.u32All, (int)(ctx->Point.MaxSize * 8.0),
MAX_SIZE_shift, MAX_SIZE_mask);
+ r700PointSize(ctx, ctx->Point.Size);
break;
case GL_POINT_DISTANCE_ATTENUATION:
break;
@@ -1626,8 +1628,6 @@ void r700InitState(GLcontext * ctx) //-------------------
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
int id = 0;
- radeon_firevertices(&context->radeon);
-
r700->TA_CNTL_AUX.u32All = 0;
SETfield(r700->TA_CNTL_AUX.u32All, 28, TD_FIFO_CREDIT_shift, TD_FIFO_CREDIT_mask);
r700->VC_ENHANCE.u32All = 0;
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 00000000000..d9836d7326e
--- /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 00000000000..d4bfe27da64
--- /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 00000000000..31074c581ea
--- /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 d05847d650f..00000000000
--- 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 a54ea16ec63..6904ebbee3b 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 e188a122d53..e1e1f215508 100644
--- a/src/mesa/drivers/dri/radeon/radeon_blit.c
+++ b/src/mesa/drivers/dri/radeon/radeon_blit.c
@@ -204,19 +204,16 @@ static GLboolean validate_buffers(struct r100_context *r100,
struct radeon_bo *dst_bo)
{
int ret;
- 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_reset_bos(r100->radeon.cmdbuf.cs);
ret = radeon_cs_space_check_with_bo(r100->radeon.cmdbuf.cs,
- dst_bo, 0, RADEON_GEM_DOMAIN_VRAM);
+ src_bo, RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT, 0);
if (ret)
return GL_FALSE;
ret = radeon_cs_space_check_with_bo(r100->radeon.cmdbuf.cs,
- first_elem(&r100->radeon.dma.reserved)->bo,
- RADEON_GEM_DOMAIN_GTT, 0);
+ dst_bo, 0, RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT);
if (ret)
return GL_FALSE;
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index 79f3ff7da65..13f1f0611b8 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_mipmap_tree.c b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
index cd843d965e5..c6cc417dd6c 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 c911688c1a5..088f9701722 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_tex_copy.c b/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
index 89fe9915a70..a4bb03d5d39 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
@@ -53,6 +53,10 @@ do_copy_texsubimage(GLcontext *ctx,
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);
} else {
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 00000000000..7bf6dcc2e32
--- /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 ff37fd3e86e..3ccc711253b 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 00000000000..403da110106
--- /dev/null
+++ b/src/mesa/drivers/dri/radeon/radeon_tile.c
@@ -0,0 +1,512 @@
+/*
+ * Copyright (C) 2010 Maciej Cencora <[email protected]>
+ *
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#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 00000000000..31d9c5611c3
--- /dev/null
+++ b/src/mesa/drivers/dri/radeon/radeon_tile.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2010 Maciej Cencora <[email protected]>
+ *
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#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 7ead588dac8..00000000000
--- 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 2e5c40802c1..53511552c6d 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/sis/Makefile b/src/mesa/drivers/dri/sis/Makefile
index ad009fc2398..6b4f938bab3 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/tdfx/Makefile b/src/mesa/drivers/dri/tdfx/Makefile
index b9f25db4fe8..96bd8f8202f 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 63fe875f59e..00000000000
--- 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/unichrome/Makefile b/src/mesa/drivers/dri/unichrome/Makefile
index 344d34fce36..14cf9f30386 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 74034485e28..00000000000
--- 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/es/glapi/es_EXT.xml b/src/mesa/es/glapi/es_EXT.xml
index 629ba90528c..291a53b4b27 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 f6f33130b15..17665d8df5b 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 6c2ece26080..17935502689 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 f34782fedb9..a463bed11c6 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 00000000000..62fa64ad212
--- /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 8e9c909f312..8aa74ce4343 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/gl_API.xml b/src/mesa/glapi/gen/gl_API.xml
index 0b3d57baa68..4a4d0d5382e 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/glapidispatch.h b/src/mesa/glapi/glapidispatch.h
index b7f661c535e..7e0f21390ff 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 8e16e22983a..6d7bc2a0fa9 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 8aeb450b997..149ff3f3c4e 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 67c691c3fbe..ea6b61159d2 100644
--- a/src/mesa/glapi/glapitemp.h
+++ b/src/mesa/glapi/glapitemp.h
@@ -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 513fa897264..44861863e63 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/main/api_exec.c b/src/mesa/main/api_exec.c
index 70c154b62b2..fa8d409caa8 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 326ad6f909b..4fb7b5ad61f 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/bufferobj.c b/src/mesa/main/bufferobj.c
index 971b280f3bb..71d1514fe49 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 f8bca5ff717..912529cfdf9 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/dd.h b/src/mesa/main/dd.h
index 84b83fe2731..197de09b22a 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -777,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 673db30f254..43aadb1de57 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/enums.c b/src/mesa/main/enums.c
index 140902f6778..06d51d4e5cd 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 0e7e52a54ac..30245d6aafa 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/mfeatures.h b/src/mesa/main/mfeatures.h
index f0896ee626f..cb96c4d1d05 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/mtypes.h b/src/mesa/main/mtypes.h
index 4d55ebb9722..9d9b475dd17 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1244,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];
@@ -1439,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? */
};
@@ -2104,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
@@ -2491,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/remap_helper.h b/src/mesa/main/remap_helper.h
index 0a5b6296886..ee898efa5f9 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/texrender.c b/src/mesa/main/texrender.c
index 5a528535c04..d29af5a5b2f 100644
--- a/src/mesa/main/texrender.c
+++ b/src/mesa/main/texrender.c
@@ -84,6 +84,14 @@ texture_get_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
zValues[i] = ((GLuint) (flt * 0xffffff)) << 8;
}
}
+ else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
+ GLuint *zValues = (GLuint *) values;
+ for (i = 0; i < count; i++) {
+ GLfloat flt;
+ trb->TexImage->FetchTexelf(trb->TexImage, x + i, y, z, &flt);
+ zValues[i] = (GLuint) (flt * 0xffffff);
+ }
+ }
else {
_mesa_problem(ctx, "invalid rb->DataType in texture_get_row");
}
@@ -139,6 +147,15 @@ texture_get_values(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
zValues[i] = ((GLuint) (flt * 0xffffff)) << 8;
}
}
+ else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
+ GLuint *zValues = (GLuint *) values;
+ for (i = 0; i < count; i++) {
+ GLfloat flt;
+ trb->TexImage->FetchTexelf(trb->TexImage, x[i], y[i] + trb->Yoffset,
+ z, &flt);
+ zValues[i] = (GLuint) (flt * 0xffffff);
+ }
+ }
else {
_mesa_problem(ctx, "invalid rb->DataType in texture_get_values");
}
@@ -193,6 +210,15 @@ texture_put_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
}
}
}
+ else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
+ const GLuint *zValues = (const GLuint *) values;
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ GLfloat flt = (GLfloat) ((zValues[i] & 0xffffff) * (1.0 / 0xffffff));
+ trb->Store(trb->TexImage, x + i, y, z, &flt);
+ }
+ }
+ }
else {
_mesa_problem(ctx, "invalid rb->DataType in texture_put_row");
}
@@ -246,6 +272,15 @@ texture_put_row_rgb(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
}
}
}
+ else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
+ const GLuint *zValues = (const GLuint *) values;
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ GLfloat flt = (GLfloat) ((zValues[i] & 0xffffff) * (1.0 / 0xffffff));
+ trb->Store(trb->TexImage, x + i, y, z, &flt);
+ }
+ }
+ }
else {
_mesa_problem(ctx, "invalid rb->DataType in texture_put_row");
}
@@ -296,6 +331,15 @@ texture_put_mono_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
}
}
}
+ else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
+ const GLuint zValue = *((const GLuint *) value);
+ const GLfloat flt = (GLfloat) ((zValue & 0xffffff) * (1.0 / 0xffffff));
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ trb->Store(trb->TexImage, x + i, y, z, &flt);
+ }
+ }
+ }
else {
_mesa_problem(ctx, "invalid rb->DataType in texture_put_mono_row");
}
@@ -346,6 +390,15 @@ texture_put_values(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
}
}
}
+ else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
+ const GLuint *zValues = (const GLuint *) values;
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ GLfloat flt = (GLfloat) ((zValues[i] & 0xffffff) * (1.0 / 0xffffff));
+ trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, &flt);
+ }
+ }
+ }
else {
_mesa_problem(ctx, "invalid rb->DataType in texture_put_values");
}
@@ -395,6 +448,15 @@ texture_put_mono_values(GLcontext *ctx, struct gl_renderbuffer *rb,
}
}
}
+ else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
+ const GLuint zValue = *((const GLuint *) value);
+ const GLfloat flt = (GLfloat) ((zValue & 0xffffff) * (1.0 / 0xffffff));
+ for (i = 0; i < count; i++) {
+ if (!mask || mask[i]) {
+ trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, &flt);
+ }
+ }
+ }
else {
_mesa_problem(ctx, "invalid rb->DataType in texture_put_mono_values");
}
@@ -491,24 +553,35 @@ update_wrapper(GLcontext *ctx, const struct gl_renderbuffer_attachment *att)
trb->Base.Width = trb->TexImage->Width;
trb->Base.Height = trb->TexImage->Height;
trb->Base.InternalFormat = trb->TexImage->InternalFormat;
+ trb->Base.Format = trb->TexImage->TexFormat;
+
/* XXX may need more special cases here */
- if (trb->TexImage->TexFormat == MESA_FORMAT_Z24_S8) {
- trb->Base.Format = MESA_FORMAT_Z24_S8;
+ switch (trb->TexImage->TexFormat) {
+ case MESA_FORMAT_Z24_S8:
trb->Base.DataType = GL_UNSIGNED_INT_24_8_EXT;
trb->Base._BaseFormat = GL_DEPTH_STENCIL;
- }
- else if (trb->TexImage->TexFormat == MESA_FORMAT_Z16) {
- trb->Base.Format = MESA_FORMAT_Z16;
- trb->Base.DataType = GL_UNSIGNED_SHORT;
+ break;
+ case MESA_FORMAT_S8_Z24:
+ trb->Base.DataType = GL_UNSIGNED_INT_8_24_REV_MESA;
trb->Base._BaseFormat = GL_DEPTH_STENCIL;
- }
- else if (trb->TexImage->TexFormat == MESA_FORMAT_Z32) {
- trb->Base.Format = MESA_FORMAT_Z32;
+ break;
+ case MESA_FORMAT_Z24_X8:
+ trb->Base.DataType = GL_UNSIGNED_INT_24_8_EXT;
+ trb->Base._BaseFormat = GL_DEPTH_COMPONENT;
+ break;
+ case MESA_FORMAT_X8_Z24:
+ trb->Base.DataType = GL_UNSIGNED_INT_8_24_REV_MESA;
+ trb->Base._BaseFormat = GL_DEPTH_COMPONENT;
+ break;
+ case MESA_FORMAT_Z16:
+ trb->Base.DataType = GL_UNSIGNED_SHORT;
+ trb->Base._BaseFormat = GL_DEPTH_COMPONENT;
+ break;
+ case MESA_FORMAT_Z32:
trb->Base.DataType = GL_UNSIGNED_INT;
trb->Base._BaseFormat = GL_DEPTH_COMPONENT;
- }
- else {
- trb->Base.Format = trb->TexImage->TexFormat;
+ break;
+ default:
trb->Base.DataType = CHAN_TYPE;
trb->Base._BaseFormat = GL_RGBA;
}
diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h
index d521569f8d3..59f62ebd6c5 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 a1c20a325e6..37750cc330a 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/sparc/glapi_sparc.S b/src/mesa/sparc/glapi_sparc.S
index 3fbdb4abb37..478adc6520d 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_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index 8fded0c69fc..00e9d1dccbd 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -410,17 +410,12 @@ st_finish_render_texture(GLcontext *ctx,
st_flush( ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL );
- if (strb->surface)
- pipe_surface_reference( &strb->surface, NULL );
-
strb->rtt = NULL;
/*
printf("FINISH RENDER TO TEXTURE surf=%p\n", strb->surface);
*/
- _mesa_reference_renderbuffer(&att->Renderbuffer, NULL);
-
/* restore previous framebuffer state */
st_invalidate_state(ctx, _NEW_BUFFERS);
}
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 79be833768f..e03dd30f0f5 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -137,6 +137,9 @@ void st_init_limits(struct st_context *st)
/* XXX separate query for early function return? */
st->ctx->Shader.EmitContReturn =
screen->get_param(screen, PIPE_CAP_TGSI_CONT_SUPPORTED);
+
+ /* Quads always follow GL provoking rules. */
+ c->QuadsFollowProvokingVertexConvention = GL_FALSE;
}
diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c
index 2dd9ca6348b..854e106b7f0 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_linetemp.h b/src/mesa/swrast/s_linetemp.h
index 182f962e1eb..033431df232 100644
--- a/src/mesa/swrast/s_linetemp.h
+++ b/src/mesa/swrast/s_linetemp.h
@@ -84,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;
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
index ecabac6921d..368311e14dd 100644
--- a/src/mesa/swrast/s_readpix.c
+++ b/src/mesa/swrast/s_readpix.c
@@ -253,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;
@@ -390,7 +390,7 @@ read_rgba_pixels( GLcontext *ctx,
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 */
diff --git a/src/mesa/x86-64/glapi_x86-64.S b/src/mesa/x86-64/glapi_x86-64.S
index 03a2c999ff0..a76cbb07d5e 100644
--- a/src/mesa/x86-64/glapi_x86-64.S
+++ b/src/mesa/x86-64/glapi_x86-64.S
@@ -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/glapi_x86.S b/src/mesa/x86/glapi_x86.S
index ae5dd2b0d17..a7dd8d72186 100644
--- a/src/mesa/x86/glapi_x86.S
+++ b/src/mesa/x86/glapi_x86.S
@@ -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)